Production Reference Public

Production Costing

Advanced Manufacturing Production Costing Define what a product should cost to make (Standard Cost), record what it actually cost (Actual Cost), and review the gap (Variance) so…

Guide version: r1 Module version: 1.0.0 Updated: 2026-07-22 Estimated time: 17 min
Advanced Manufacturing

Production Costing

Define what a product should cost to make (Standard Cost), record what it actually cost (Actual Cost), and review the gap (Variance) so you can spot over-budget jobs and act on them.

ℹ️
Production Costing lives at production/ProductionCosting and is a single feature with three screens — Standard Costs (the landing page), Actual Costs, and Cost Variance Analysis — plus an Order Cost Detail drill-down. All of it is gated by one permission, manufacturing_costing, and requires the manufacturing module to be enabled.

The big picture

Costing answers three questions, in order:

Standard Cost
What it should cost — per approved BOM
Actual Cost
What it did cost — per work order
Variance
Actual − Standard — over or under budget

Every cost — standard or actual — is broken into cost categories. Standard costs use four: Material, Labor, Machine, and Overhead. Actual costs add two more that have no standard equivalent: Scrap and Rework.

????
Material

Raw materials consumed to make one unit, per the BOM.

????
Labor

Direct human labor cost. Actuals are fed by Labor Tracking.

Machine

Machine / equipment running cost per unit.

????
Overhead

Allocated indirect (overhead) expense per unit.

????️
Scrap actual only

Cost of scrapped / wasted material. Added into Total Actual; no standard equivalent.

????
Rework actual only

Cost of reworking defective output. Added into Total Actual; no standard equivalent.

????
Variance direction. Variance is always Actual − Standard. A positive number means the job ran over budget (shown red / unfavorable); a negative number means it ran under budget (shown green / favorable); zero is on budget. Don't misread a red positive number as savings.

Standard Costs — the landing page

Standard Costs is the entry point (production/ProductionCosting). It lists every standard cost record — what a product should cost per its Bill of Materials — and lets you create, edit, and delete them. A standard cost is always anchored to an approved BOM, and there is exactly one active standard cost per BOM at a time.

What's on the page

ElementWhat it does
New Standard Cost buttonOpens the standard cost modal to add a record.
Actual Costs buttonNavigates to the Actual Costs screen.
Variance Analysis buttonNavigates to the Cost Variance Analysis dashboard.
#standard-costs-table (appTable)Lists all standard cost records. Columns below.
Row actionsPencil icon = Edit, times/× icon = Delete.

Standard Costs table columns

ColumnMeaningRequiredNotes
BOMThe Bill of Materials this standard cost applies to.DisplayShows bom_code joined from the BOM.
ProductThe product the BOM builds.DisplayDerived from the BOM on save (product_id).
MaterialStandard material cost per unit.DisplayStored decimal(15,4).
LaborStandard direct labor cost per unit.Display 
MachineStandard machine cost per unit.Display 
OverheadStandard allocated overhead per unit.Display 
Total CostStandard total per unit = Material + Labor + Machine + Overhead.ComputedShown bold; auto-computed on save.
Effective FromDate this standard cost becomes valid.RequiredRows are ordered newest effective_from first.
StatusWhether this is the live cost for the BOM.DisplayGreen Active label or grey Inactive label.
ActionsEdit and Delete for the row.Pencil = edit, × = delete.

The Standard Cost modal form

Reached from New Standard Cost (blank) or the pencil icon (pre-filled). Every field:

FieldMeaningRequiredNotes
id — (hidden)Primary key of the record.NoEmpty for new, populated for edit; drives insert vs. update.
bom_id — BOMThe Bill of Materials this standard cost applies to.RequiredSelect2, sourced from approved BOMs only; shows bom_code - product_name. product_id is derived from the chosen BOM on save. Carries data-rule-required.
material_cost — Material CostStandard cost of raw materials to make one unit.OptionalNumber, step 0.0001, defaults 0.0000. decimal(15,4).
labor_cost — Labor CostStandard direct labor cost per unit.OptionalNumber, step 0.0001, defaults 0.0000.
machine_cost — Machine CostStandard machine / equipment running cost per unit.OptionalNumber, step 0.0001, defaults 0.0000.
overhead_cost — Overhead CostStandard allocated overhead (indirect cost) per unit.OptionalNumber, step 0.0001, defaults 0.0000.
uom_id — UOMUnit of measure the standard cost is expressed in.OptionalSelect2 of active UOMs (is_active=1) shown as name (symbol). Defaults to 0 if blank — the column is NOT NULL, so it stores 0 when unset.
effective_from — Effective FromDate this standard cost becomes valid.RequiredDate input, defaults to today (Y-m-d). Carries data-rule-required.
effective_to — Effective ToDate this standard cost stops being valid.OptionalOpen-ended if blank; saved as NULL when empty.
is_active — Set as ActiveMarks this as the current live standard cost for the BOM.OptionalYes/No dropdown, defaults Yes. Saving with Yes deactivates all other standard costs for the same BOM.
notes — NotesFree-text remarks about this standard cost.OptionalTextarea, 2 rows.
total_cost — Total CostStandard total per unit.ComputedNot on the form. Auto-computed on save as Material + Labor + Machine + Overhead.

The footer has a Close button and a Save button.

⚠️
Only approved BOMs appear in the BOM dropdown. Draft or pending BOMs are not selectable — approve the BOM in Bill of Materials first, or you won't be able to create a standard cost for it.
“Set as Active” = Yes silently deactivates every other standard cost for the same BOM. There can be only one active standard cost per BOM. This happens without a prompt — expect the previously-active record to flip to Inactive the moment you save.

Active vs. Inactive — the standard cost lifecycle

Active
is_active = 1 · the live cost for the BOM
Inactive
is_active = 0 · superseded / not live

The two states swap back and forth as you edit. Saving a new active cost, or editing one and choosing Set as Active = Yes, makes it Active and pushes the others to Inactive. Editing and choosing Set as Active = No makes it Inactive.

Activeis_active = 1. The current live standard cost for its BOM. Only one per BOM; used as the should-cost basis by Variance Analysis and Order Cost Detail.
Inactiveis_active = 0. A superseded or not-yet-live cost. Ignored by variance / detail calculations.

SOP — set up a standard cost per product

????
Precondition: the product has an approved BOM.
  1. Open Production Costing

    You land on the Standard Costs page.

  2. Click New Standard Cost

    The standard cost modal opens blank.

  3. Select the approved BOM

    Pick from the dropdown (approved BOMs only). The product is derived automatically on save.

  4. Enter the per-unit category costs

    Fill in Material, Labor, Machine, and Overhead costs per unit.

  5. Set the effective window

    Set Effective From (defaults to today) and Effective To only if the cost is temporary. Optionally set UOM and Notes.

  6. Set as Active = Yes

    Leave this on to make it the live standard.

  7. Save and verify

    Click Save. Confirm Total Cost equals the sum of the four categories, Status shows Active, and any earlier standard cost for the same BOM flipped to Inactive.

On a successful save you'll see “Record saved successfully” (message key record_saved). If it fails you'll see “An error occurred. Please try again.” (error_occurred).

Replacing an outdated standard cost

To roll a product's standard forward, don't edit the old figure in place — create a fresh record:

  1. Add a new standard cost for the same BOM

    Enter the updated figures and a new Effective From date.

  2. Keep Set as Active = Yes and Save

    The previous active cost for that BOM is automatically set Inactive.

  3. (Optional) Close out the old record

    Edit the old record and set an Effective To date for clean record-keeping.

Deleting a standard cost

⚠️
The × icon soft-deletes the record. A standard framework delete-confirmation dialog (data-action="delete-confirmation") prompts you before removal. On success you'll see “Record deleted successfully” (record_deleted); if it can't be removed, record_cannot_be_deleted. Deletes are soft (deleted = 1) — the row stays in the database and a DBA can restore it.

Actual Costs

The Actual Costs screen (production/ProductionCosting/actual_costs) lists the as-incurred cost records you capture per Work Order and compares each to the standard benchmark you entered, showing the variance amount and variance %.

What's on the page

ElementWhat it does
New Actual Cost buttonOpens the actual cost modal.
Standard Costs buttonBack to the landing page.
Variance Analysis buttonTo the variance dashboard.
#actual-costs-tableLists all actual cost records. Columns below.
Row actiontimes/× icon = Delete. There is no edit action on actual costs.

Actual Costs table columns

ColumnMeaningNotes
Work OrderThe order the actual costs belong to.Shown as order_number - product_name.
MaterialActual material cost incurred. 
LaborActual labor cost incurred. 
MachineActual machine cost incurred. 
OverheadActual overhead allocated. 
Total ActualSum of all six actual components.Shown bold; computed on save.
StandardThe standard benchmark you entered.Manually typed on the form (see gotcha below).
VarianceTotal Actual − Standard.Red label when > 0 (over standard); green label when ≤ 0.
Variance %Variance as a percent of standard.(cost_variance / standard_cost) × 100, rounded to 2 dp; 0 when standard is 0.
ActionsDelete the row.× only — no edit.
Variance > 0Actual over standard — over budget (label-danger, red).
Variance ≤ 0Actual at or under standard — under / on budget (label-success, green).

The Actual Cost modal form

Reached from New Actual Cost. Every field:

FieldMeaningRequiredNotes
order_id — Work OrderThe work order the actual costs belong to.RequiredSelect2 of all work orders, shown as order_number - product_name. Unique per order (DB unique key on order_id + deleted). Carries data-rule-required.
actual_material_cost — Material CostActual material cost incurred on the order.OptionalNumber, step 0.01, default 0.00. decimal(15,2).
actual_labor_cost — Labor CostActual labor cost incurred.OptionalNumber, step 0.01, default 0.00.
actual_machine_cost — Machine CostActual machine / equipment cost incurred.OptionalNumber, step 0.01, default 0.00.
actual_overhead_cost — Overhead CostActual overhead allocated to the order.OptionalNumber, step 0.01, default 0.00.
scrap_cost — Scrap CostCost of scrapped / wasted material on the order.OptionalNumber, step 0.01, default 0.00. Added into Total Actual; actual-only (no standard equivalent).
rework_cost — Rework CostCost of reworking defective output.OptionalNumber, step 0.01, default 0.00. Added into Total Actual; actual-only.
standard_cost — Standard CostThe standard figure to benchmark the actuals against.OptionalNumber, step 0.01, default 0.00. Manually entered here — NOT auto-pulled from the standard cost record. Drives the variance calculation.
total_actual_cost — Total ActualSum of all six actual components.ComputedMaterial + Labor + Machine + Overhead + Scrap + Rework, computed on save.
cost_variance — VarianceTotal Actual − Standard.ComputedComputed on save. Red label if > 0, green if ≤ 0.
variance_percentage — Variance %Variance as a percent of standard.Computed(cost_variance / standard_cost) × 100, rounded 2 dp; 0 when standard is 0. decimal(5,2).
calculated_at — (not shown)Timestamp the variance was calculated.SystemSet to current UTC on save.

The footer has a Close button and a Save button.

The Standard Cost field on the actual cost form is entered manually — it is not auto-pulled from the active standard cost record. If you leave it at 0.00, Variance % will read 0 and Variance will equal the whole Total Actual. Type the standard benchmark deliberately.
ℹ️
Actual cost records are unique per work order (order_id). You generally record one actual cost per order, and there is no update path — saving always inserts. To change a figure, delete the record and re-add it.

SOP — capture actual costs for a completed job

????
Precondition: the work order is finished, and you know the actual material/labor/machine/overhead/scrap/rework spend plus the standard benchmark.
  1. Open Actual Costs, click New Actual Cost

    From the Standard Costs page, click Actual Costs, then New Actual Cost.

  2. Select the Work Order

    Pick the order from the dropdown.

  3. Enter each actual component

    Fill Material, Labor, Machine, Overhead, plus Scrap and Rework.

  4. Enter the Standard Cost benchmark

    Type the standard figure to compare against — remember it is not auto-filled.

  5. Save

    The system computes Total Actual, Variance (Total Actual − Standard) and Variance %. The row appears with a red (over) or green (under) variance label.


Cost Variance Analysis

The Variance Analysis dashboard (production/ProductionCosting/variance_analysis) is a company-wide roll-up of standard vs. actual cost across all completed work orders, with four summary cards and a per-order table that links into the drill-down.

⚠️
Only work orders with status completed appear here and in the roll-up totals. In-progress orders won't show. Work Order status is set in the Work Orders feature, not here.
This dashboard does NOT use the Actual Cost records you typed on the Actual Costs list. Variance Analysis and Order Cost Detail recompute the numbers live: standard cost = active-standard total_cost × quantity_produced, and actual cost = summed material issues + labor tracking for the order. The manually-entered manufacturing_actual_costs records are a separate data set — the two views can disagree.

Summary cards

Σ Std
Total Standard Cost
Σ Act
Total Actual Cost
±
Total Variance (Over / Under / On Budget)
%
Variance %

The Total Variance card carries a suffix that reads Over Budget when variance > 0, Under Budget when variance < 0, or On Budget when it's exactly 0.

“Variance by Work Order” table

ColumnMeaningNotes
Work OrderThe completed order.Hyperlink — opens the Order Cost Detail drill-down.
BOMThe BOM the order builds. 
Standard CostActive standard total × quantity produced.Per-unit standard scaled by the order quantity.
Actual CostSummed material issues + labor tracking.Machine & overhead actuals are 0 here (see gotcha).
VarianceActual − Standard.Colored red (over) or green (under).
Variance %Variance as a percent of standard.Drives the status badge.
StatusVariance band badge.High Variance / Moderate / On Target — see legend.
ℹ️
When there's nothing to show, the table displays a single row: “No variance data available.”

Variance status bands

Each completed order is classified by the absolute value of its variance %:

On Target
|variance %| ≤ 5% — within tolerance
Moderate
5% < |variance %| ≤ 10%
High Variance
|variance %| > 10% — investigate
On TargetAbsolute variance % ≤ 5% — within tolerance.
ModerateAbsolute variance % greater than 5% and up to 10%.
High VarianceAbsolute variance % greater than 10% — needs investigation.
????
The bands are recomputed every time the underlying actual or standard cost changes — they are not stored. A green/amber/red badge always reflects the latest data.

Order Cost Detail — the drill-down

Clicking a Work Order link opens the per-order drill-down (production/ProductionCosting/order_cost_detail/{order_id}). It compares standard vs. actual cost for each cost component with per-line and total variance, and a headline variance status. A Back button returns you to Variance Analysis.

Work Order Information panel

FieldMeaningNotes
Work OrderThe order being analysed. 
ProductThe product produced. 
BOMThe Bill of Materials used. 
Quantity ProducedUnits the order produced.Standard per-unit cost is multiplied by this. If 0, standard totals show 0.
StatusThe work order status.Only completed orders reach this view via the dashboard.

Cost Breakdown table

Cost ComponentStandard CostActual CostVariance
MaterialStd unit × qty producedΣ material issuesActual − Standard (red over / green under)
LaborStd unit × qty producedΣ labor trackingActual − Standard
MachineStd unit × qty produced0 (not summed)Actual − Standard
OverheadStd unit × qty produced0 (not summed)Actual − Standard
TotalSum of standard rowsSum of actual rowsTotal variance

Per-line and total variance are computed as component variance = actual − (standard unit cost × quantity produced), colored red when over and green when under.

⚠️
Machine and Overhead actual columns are always 0 in this view (and in Variance Analysis), because the live calculation only sums material issues and labor tracking. If your standard machine or overhead is non-zero, expect an apparent variance on those lines — it isn't real spend, it's an unmeasured category.

Variance Summary cards

±
Total Variance (Over / Under / On Budget)
%
Variance %
Variance Status badge

The Variance Status badge uses the same bands as the dashboard — On Target Moderate High Variance.

How the numbers are colored

Over (text-danger)Variance number/percent is red when actual exceeds standard.
Under (text-success)Green when actual is below standard.
ZeroNeutral when variance is exactly zero.

SOP — set a standard cost and review variance

????
Precondition: the BOM is approved; the work order is marked completed; component-level actuals come from recorded material issues and labor tracking.
  1. Set the standard

    On Standard Costs, create the active standard cost for the product's approved BOM (see the standard-cost SOP above).

  2. Run and complete the job

    Produce against the work order and mark it completed in Work Orders so it rolls into the dashboard.

  3. Open Variance Analysis

    Click Variance Analysis and read the four summary cards for the overall over/under-budget picture.

  4. Spot the outliers

    Scan the “Variance by Work Order” table for red High Variance and amber Moderate badges.

  5. Drill into an order

    Click the Work Order number to open Order Cost Detail.

  6. Read the component breakdown

    Inspect the Material / Labor / Machine / Overhead standard-vs-actual rows to see which category drove the variance.

  7. Read the status and act

    Check the Variance Status badge, then investigate the cause (material waste, labor overrun, etc.). Click Back to return to the dashboard.


Two variances live side by side — don't confuse them

This is the single most common point of confusion. There are two independent “variance” numbers:

Where: the Actual Costs list. Standard used: the number you manually typed into the standard_cost field on each actual cost record. Actual used: the six components you typed on that same record. Entirely operator-entered.

Where: Variance Analysis and Order Cost Detail. Standard used: the active standard cost total × quantity produced — the typed actual records are ignored. Actual used: summed material issues + labor tracking (material and labor only — machine and overhead read 0). Entirely recomputed from source data.

Because they draw on different inputs, the Actual Costs list variance and the Analysis/Detail variance can and often will disagree. Treat the list as a manual ledger and the dashboard as the live, source-driven view. There is no automatic bridge between the two — the operator connects them by hand.

Gotchas & things to watch

Only approved BOMs appear in the standard cost BOM dropdown. Draft/pending BOMs won't be selectable.
Total Cost, Total Actual, Variance and Variance % are computed automatically on save — they are not editable inputs, and Total Cost isn't even on the standard form.
Set as Active = Yes silently deactivates every other standard cost for the same BOM.
The Standard Cost field on the actual cost form is not auto-pulled from the active standard record. Leave it 0.00 and Variance % is 0 and Variance equals Total Actual.
In Order Cost Detail and Variance Analysis, actual Machine and Overhead columns are always 0 because only material issues and labor tracking are summed — even if standard machine/overhead is non-zero.
The analysis/detail views multiply the per-unit standard by quantity produced. If quantity produced is 0, the standard total shows 0.
Variance Analysis lists only work orders whose status is completed. In-progress orders won't appear.
Actual cost records are unique per work order. There is no edit action — delete and re-add to change one.
Variance sign convention: positive = over budget (red), negative = under budget (green). Don't misread a red positive number as savings.
Both deletes set deleted = 1; records remain in the database and can be restored by a DBA if needed.

Permissions & access

ItemDetail
Permission keymanufacturing_costing — single permission gating the entire feature (view, create, update, delete across Standard Costs, Actual Costs, Variance Analysis and Order Cost Detail).
Label / action / categoryLabel “Production Costing”, action “Access Production Costing”, category “Manufacturing: Costing”.
Module gateThe manufacturing module must be enabled (with_module('manufacturing','redirect')). Without permission or module, you are redirected.
Cost Planner Production Accountant Production Manager

See Permissions & Roles for the full matrix.

Validation & messages reference

SituationRule / message
Save standard costid numeric, bom_id required + numeric, effective_from required.
Save actual costorder_id required + numeric.
Delete (either)id required + numeric.
Open standard modalid numeric.
Client-side blocksBOM, Work Order and Effective From carry data-rule-required — the form won't submit if empty.
Save success“Record saved successfully” (record_saved).
Save failure“An error occurred. Please try again.” (error_occurred).
Delete success“Record deleted successfully” (record_deleted).
Delete failurerecord_cannot_be_deleted.
Empty variance table“No variance data available.”
Missing / bad orderOrder Cost Detail returns a 404 if no order_id is supplied or the order is not found.

Where the numbers come from

Costing does not stand alone — the analysis views pull live data from the rest of the shop floor:

BOM (approved only)
Standard costs are keyed to a BOM; only approved BOMs are selectable, and the product is derived from the BOM on save. See Bill of Materials.
UOM (active only)
The standard cost UOM dropdown lists only active units of measure as name (symbol).
Work Orders
Actual costs attach to a work order; Variance Analysis pulls only orders with status completed; quantity produced scales the per-unit standard into a total. See Work Orders.
Material Issues
The live actual material cost in the analysis/detail views is the sum of the order's material issues. See Material Requisitions & Issues.
Labor Tracking
The live actual labor cost is the sum of the order's labor records. See Labor Tracking.
Was this guide helpful?

Report a content problem