Docs/Cost & prices
VYRAB HANDBOOK

Cost & prices

Understand material and labor costs, coefficients and price history.

Purpose

This section answers two related but distinct questions about the same parts-catalog item: how much it actually costs today (cost — materials at current prices plus labor per the routing norms) and at what price it should be sold, to cover not only direct costs but also overhead/planned profit (price calculation). The first is an actual cost breakdown across the product composition tree; the second is a planning layer on top of it, with a choice of one of three markup-allocation methods. Neither calculation requires a production order to already exist — both can be run for any parts-catalog item and a "what if" quantity.

The section (in the menu — the Accounting group) consists of two screens: Cost (/cost, one calculation for one item) and Price list (/price-calc, a price calculation for several items at once, with the result saved).

Who uses it (roles)

Role What they do here
Cost accountant The section's main user — computes cost, maintains the price-calculation method settings, saves price lists
Administrator Has access to all of the section's actions on par with the Cost accountant

Both screens are gated by a single permission, cost.view — there is no separate permission for saving a price list, changing the coefficient settings, or exporting to Excel: whoever can see the section can do everything in it (see Getting started). Neither the Area foreman, the Dispatcher, nor any other production role has access to this section.

Key concepts

  • Cost (direct costs) — the sum of material cost (material_cost) and labor cost (labor_cost) across the whole product composition tree for a given quantity; total_cost = material_cost + labor_cost. Labor is never toggled off with a checkbox in Vyrab — it is always part of cost, not an optional add-on.
  • PriceRecord — the price of a material/purchased item on a specific date (price, valid_from, the K3 coefficient, supplier). One item can have several records with different dates; a calculation always uses the latest one with valid_from ≤ the calculation date — so a "price as of" a past date can be computed the same way as for today. Records are entered either manually on the parts card (the Price tab, PriceTab, see Products & orders), or as a batch when saving a price list on this screen — both write the same entity, through the price_of relation.
  • K3 — the coefficient the price from a price record is divided by to get the unit price used in the calculation (unit_price = price / K3); K1/K2 (see the Getting started glossary) enter into cost not directly, but through the same material consumption norm used by MRP (Warehouse & supply) — the quantity of material per unit of product, not its price.
  • Requirement — the quantity of material/part needed for the whole exploded composition, accounting for consumption-norm coefficients and whether the norm is tied to an operation (OperationQuantity) or to a whole batch (ForBatch) — the same calculation MRP uses when computing purchasing requirements (Warehouse & supply); here it is simply multiplied by price, rather than compared against the warehouse balance.
  • PriceCalcSettings (method settings) — tenant-wide default values for the K coefficients (k_simple, k_material, k_labor, the target profit target_profit); not tied to an operator — anyone with access to the section can change them, and doing so changes the defaults for everyone.
  • Price calculation method — one of three methods for allocating markup on top of direct costs, chosen on the Price list screen (see below).
  • Price list (batch) — a saved price-calculation result: a batch of PriceRecords created with one click of the "Save as price list" button, sharing a batch_id, a method, and source="price_list" — exactly the same price records used by the subsequent cost calculation of any assembly that includes this item, and by a warehouse arrival with no price explicitly given (Warehouse & supply).

Cost

What you see

The /cost screen — a request form above the result:

  • Request form: a parts-catalog item picker (PartPicker), quantity (QuantityInput, defaults to 1), calculation date (defaults to today), Calculate and Excel-export buttons (the export button becomes active only once an item is chosen).
  • Totals row: Material / Labor / Total — sums across the whole composition tree for the entered quantity.
  • Cost breakdown — a grouping toggle (By product kind / By place / By operation / By supplier), with, at the same time below it: a horizontal 100% stacked bar showing each group's share (hovering shows the amount and percentage; after 8 segments the remainder collapses into "Other") and a table with the same groups — Group / Material / Labor / Total.
  • Composition-row table — one row for every item participating in the composition (including the parent item itself), with columns Part, Unit, Requirement, Unit price (or "—" if there is no effective price record), Material, Labor.

Typical scenarios

  1. A one-off cost calculation. Pick an item → set the quantity and date → "Calculate." The summary Material/Labor/Total appears, along with a table of every composition item, with each material's price and each assembly's labor.
  2. See what makes up the costs. Switch the grouping in "Cost breakdown" to the view you need (for example, "By place," to see which place contributes most to labor intensity, or "By supplier," to see dependence on a single material supplier).
  3. Cost as of a past/future date. Change the calculation date — for every material item, the price record effective on that date is used instead of the current one (the latest with valid_from ≤ the given date); items with no price at all as of that date land in the table with "—" and add nothing to the material total.
  4. Export the calculation. The Excel-export button — a workbook with a "Composition" sheet (the same rows as the on-screen table), one sheet per each of the four groupings, and a "Total" sheet with the three sums.

Notes and limitations

  • An item with no effective price record on the chosen date is not treated as an error — it simply adds nothing to material cost (the "Unit price" column shows "—," "Material" is 0 for that row); when calculating for items with not a single price entered, the total cost can end up noticeably understated — worth checking against the table row by row, not just the total sum.
  • Labor is counted only for operations tied directly to an item (has_operation) — materials and purchased items have no such operations, so their "Labor" is always 0; this is expected, not missing data.
  • Unlike the original VOGBIT (support/584), where the price for a calculation could be taken one of three ways — from dated price lists, from the latest arrival price, or from the average cost of current warehouse stock — only the first way is used here: the latest price record (PriceRecord) with a date no later than the calculation date. The "latest arrival" and "average warehouse balance" methods do not exist in Vyrab.
  • Likewise, labor intensity here is not split into "per-operation" and "aggregated" norming with separate per-batch and per-unit time (setup time/piece time from support/584) — a single standard value per operation (Tman) from the routing is used, multiplied by the rate and the quantity.
  • The "By place" and "By operation" groupings are built from the operation's fields (place, name) as they currently stand in the item's actual routing at calculation time, not as frozen at the moment the order was launched into production — if the routing has changed, a repeat cost calculation reflects it immediately.
  • The calculation explodes the composition to the tree's full depth (up to 20 levels of nesting) in a single request — on very deep/wide structures this can take noticeable time.

Price list (Price calculation)

What you see

The /price-calc screen (in the menu — "Price list"), three blocks top to bottom plus a list of saved calculations:

  • Products — picking several parts-catalog items via PartPicker (each is added to the list once, adding it again is ignored), removing an item from the list with the × icon; a calculation date next to the picker field.

  • Calculation method — a toggle among three methods, with coefficient fields that change depending on the chosen method:

    • Simple — one field, K;
    • With coefficients — two fields, K material and K labor;
    • Target-profit averaging — one field, "Target profit, ₽."

    Next to it — a "Save as default settings" button (writes the current values of all four coefficients into PriceCalcSettings; they will be pre-filled the next time the screen is opened) and a "Calculate" button.

  • Calculation result (after clicking "Calculate"): a totals row — Direct costs / Markup / Total — and a per-item table: Part, Unit, Material, Labor, Direct costs, Markup, Price. Below the table — an "Effective from" date field and a "Save as price list" button.

  • Saved price lists — a table of previously saved calculations: Effective from / Method / Items; each row has a "Show"/"Hide" button (expands a Part/Price list under the row) and a button to export that specific price list to Excel.

Typical scenarios

  1. Calculate a price for a list of products. Add several items via the picker → choose a method and set the coefficients (or leave the values pre-filled from the saved settings) → "Calculate." A table appears with the price for each item, broken down into direct costs and markup.
  2. Save the default method. Set the coefficients normally used by the company → "Save as default settings" — the next time the screen is opened (including by a different user), the method fields are already filled with these values.
  3. Lock in the result as a price list. After calculating, set the "Effective from" date → "Save as price list." The product list and the on-screen result are cleared, the new price list appears in the "Saved price lists" table; a separate price record (PriceRecord) with that date is created for each item, which the subsequent cost calculation of any assembly including this item will pick up, as will a warehouse arrival with no explicit price (Warehouse & supply).
  4. View/export an old price list. In the saved price lists table, "Show" expands the list of items with their prices, and the export button builds an Excel file with a header (effective date, method) and a Part/Price table.

Notes and limitations

  • A price calculation always runs with quantity 1 per item — a price list gives a unit price, not a batch price; to compute cost for a specific quantity, a separate calculation on the Cost screen is needed.
  • The three methods' formulas:
    • Simple: Price = Direct_costs × K;
    • With coefficients: Price = Material × K_material + Labor × K_labor;
    • Target-profit averaging: a fixed "target profit" sum is split among the list's items in proportion to each one's share of labor cost in the list's total labor (Markup_i = Target_profit × Labor_i / ΣLabor); if labor is zero for every item in the list, the profit is split evenly. In all three methods, "Markup" in the table is the difference between the final price and the direct costs.
    • This differs from the original VOGBIT's methods (support/784): there, the "method with coefficients" is a chain of several multipliers and add-ons on material and labor, set through a separate Parameters reference, and "target-profit averaging" is built from a monthly work- time fund, staff workload, average salary, and fixed overhead. In Vyrab, both methods are simplified down to one coefficient (or a pair of coefficients) and one target-profit sum for the whole calculation.
    • The "Target-profit averaging" method only makes sense for a group of several items (one item's markup is computed relative to the labor of the others in the same list) — which is why this is a separate screen with several products, rather than a button on Cost for a single part.
  • The coefficient settings (PriceCalcSettings) are a single tenant-wide record, not personal: saving here changes the default values for every user of the section, not just the one who clicked the button.
  • Saving a price list supports only one form — a batch of price records named "price list." There is no separate "arbitrary document" with a screen snapshot, as in support/784, in Vyrab.
  • The price calculation for each item in the list fully repeats that item's cost calculation (including walking its entire composition) — with a large list of items, recalculation can take noticeable time, since each item is computed independently.
  • Products & orders. Parts** — the Price tab on an item's card (PriceTab) — the same storage location for price records (price_of), just manual entry of one record at a time instead of a batch price-list save.
  • Warehouse & supply. Warehouse and supply** — the material requirements calculation (MRP) uses the same consumption norm and composition- quantity explosion as the "Requirement" row on the Cost screen; a warehouse arrival with no explicit price uses the current price from the same PriceRecord entries.
  • Getting started. Overview and getting started** — roles and permissions (cost.view), the K1/K2/K3, Tman glossary.