Every manufacturing operation raises a critical question once production is complete: what did it actually cost to produce each unit?
Once a Production Run is complete, Apache OFBiz captures the actual costs incurred across every stage of production: the materials consumed, the time spent on each operation, and any additional product-level costs such as packaging or overhead. This gives manufacturers a precise view of their true production costs, not estimates, but what was actually spent.
In Apache OFBiz, production cost calculation is built around the relationship between routing tasks, cost formulas, and inventory values. When set up correctly, the system calculates costs automatically as production progresses, leaving no room for manual guesswork or end-of-month reconciliation surprises.
Before configuring cost calculation, it helps to understand the two main categories of costs Apache OFBiz supports.
Actual Costs are the real expenses incurred during production. They are calculated after production is complete and reflect what was truly consumed to manufacture the product, covering materials used, labor time logged, and any operational overhead applied. This guide focuses entirely on actual cost calculation.
Standard Costs are predetermined estimates set before production begins. They serve as a benchmark for measuring efficiency and comparing against actual costs once production is done.
Within actual costs, Apache OFBiz distinguishes between two types:
Apache OFBiz calculates actual production costs at two levels: the routing task level and the product level. Together, these cover every component of what it costs to manufacture a finished good.
Each routing task in a production run, such as Lamination, Shape Deck, or Final Assembly, can have a cost formula attached to it. This formula defines how the cost of that task is calculated based on the time taken to complete it.
The formula Apache OFBiz uses is:
Fixed Cost + (Variable Cost per Time Slot ÷ Time Slot) × Actual Task Time
Once a routing task is completed and the actual time is logged, Apache OFBiz applies this formula automatically to calculate the task cost. This means the more precisely task times are recorded, the more accurate the cost output.
Beyond routing tasks, manufacturers often need to include additional costs that are specific to the product but not tied to any individual operation. Examples include packaging, labeling, quality checks, or overhead percentages.
Apache OFBiz allows these to be defined at the product level using a Cost Component Calc. Once attached to the product, these costs are included in the final production cost calculation alongside material and task costs.
Material costs are fetched automatically from inventory. When components are issued against a production run, Apache OFBiz picks up the inventory item cost for each component. This cost is determined at the time of receiving, based either on the purchase cost from the supplier or the manufacturing cost if the item was produced internally.
Let's revisit the skateboard manufacturing example used throughout this series. The finished product, Skateboard (STC1005), is made up of an intermediate sub-assembly, the Deck (STC1004), along with individually sourced components: Sticker (STC1001), Warranty Card (STC1002), and Transfer (STC1003).
Apache OFBiz fetches the following material costs from inventory when components are issued against the production run:
|
Category |
Component |
Cost |
Notes |
|
Deck Components |
Glue |
$10 |
|
|
|
Face |
$30 |
|
|
|
Core |
$100 |
|
|
|
Ply |
$53 |
|
|
Deck Subtotal |
|
$193 |
|
|
Individual Components |
Sticker |
$4 |
2 pieces @ $2 each |
|
|
Warranty Card |
$1 |
|
|
|
Transfer |
$2 |
|
|
Total Material Cost |
|
$200 |
|
Three routing tasks are performed across the two production runs (Deck and Skateboard). A cost formula is defined for each:
|
Task |
Cost Calc ID |
Time Slot (ms) |
Fixed Cost |
Variable Cost / Slot |
|
Deck Lamination |
Costing - Lamination |
45,000 |
$0 |
$5 |
|
Shape Deck |
Costing - Shape Deck |
45,000 |
$0 |
$5 |
|
Final Assembly |
Costing - Final Assembly |
1,800,000 |
$0 |
$10 |
Once actual task times are recorded during the production run, Apache OFBiz applies the formula to each task and calculates the operational cost automatically.
For the skateboard, an additional overhead cost is applied at the product level using the GEN_COST_CALC formula available in Apache OFBiz. This represents a 5% overhead on total cost, covering expenses such as packaging and shipping that are not captured at the task level.
Configuring production cost calculation in Apache OFBiz involves three steps: creating cost formulas, linking them to routing tasks, and attaching any product-level cost formulas to the finished product.
Step 1: Create Cost Component Calcs
Navigate to Manufacturing > Cost Calculation to define the cost formulas. For each routing task, create a Cost Component Calc record specifying the Fixed Cost, Variable Cost per Time Slot, and the Time Slot interval. For product-level costs, create or use an existing formula such as GEN_COST_CALC.
Step 2: Assign Cost Formulas to Routing Tasks
Navigate to Manufacturing > Routing Tasks, open each task, and go to the Routing Task Costs tab. Select the Cost Component Type and link the corresponding Cost Component Calc ID. Set the effective From Date and an optional Through Date.
Step 3: Assign Cost Formulas to Products
Navigate to Catalog > Products, open the finished product, and go to the Costs tab. Attach the product-level Cost Component Calc to capture overhead or additional costs that apply at the product level rather than at individual tasks.
For detailed step-by-step instructions, refer to the Understanding Actual Production Cost Calculation in Apache OFBiz guide on the Apache OFBiz Confluence wiki.
Accurate cost calculation does more than satisfy accounting requirements. In Apache OFBiz, it:
Production cost calculation is the final step in the manufacturing cycle. It brings together the material costs from inventory, the operational costs from routing tasks, and any product-level overhead into a single, accurate view of what it cost to produce each unit.
Apache OFBiz handles this through a structured combination of Cost Component Calcs, routing task assignments, and product-level cost formulas, ensuring that every cost is captured, every formula is applied consistently, and every production run produces a reliable cost record.
This completes the Apache OFBiz Manufacturing series, from defining the Bill of Materials and Routing, through MRP, Purchase Orders, Inventory Receiving, and Production Runs, to understanding the true cost of what was manufactured.
Looking to implement and optimize Apache OFBiz manufacturing for your business? Partner with HotWax Systems for a tailored solution built around your operations.