Manufacturing · 10 min read

Costing a work order correctly in ERPNext

“The system says this batch cost more than it did.” We hear this on most manufacturing sites in the first month after go-live, and the valuation is almost always right. What has gone wrong is that three separate cost streams are being compared against one remembered number.

What makes up the finished-goods value

When a work order is completed through a manufacture stock entry, ERPNext values the finished item from three inputs: the valuation of the raw materials consumed, the operating cost from the routing, and any additional costs posted against the entry. The result is divided across the quantity produced, net of scrap.

Each of those three is calculated differently, and each has its own common configuration fault. Taking them in order explains nearly every disputed valuation we have investigated.

1. Material cost uses valuation, not the purchase rate

The most frequent misunderstanding. Material consumed is valued at the warehouse valuation rate at the moment of consumption, not at the rate on the most recent purchase order.

Under moving average — the ERPNext default — the valuation rate is the weighted average of everything currently in that warehouse. If you bought steel at ₹52 last week and ₹61 this week, consumption is valued somewhere between the two, weighted by quantity. The shop floor, remembering the ₹61 invoice, expects ₹61.

Neither figure is wrong; they answer different questions. The valuation rate answers “what did the material we consumed cost us”, which is the correct basis for inventory. If you need consumption at the latest rate, that is a FIFO or batch-wise valuation decision, and it must be set per item before transactions exist. Changing valuation method on an item with history is not a configuration change — it is a repost, and it moves your general ledger.

Check: run the Stock Ledger for the raw material around the consumption date and read the valuation rate column. That is the number the work order used.

2. Operating cost comes from the BOM, not from reality

Operating cost on a work order is derived from the routing: each operation has a workstation, the workstation has an hourly rate, and the operation has a planned time. Multiply and sum.

Note what this means. Unless you are using job cards with actual time capture, the operating cost on your completed work order is the planned cost. If an operation that was planned at forty minutes actually took ninety, the valuation does not know.

Two configuration faults are near-universal in the first month:

  • Workstation hourly rates are left at zero. The BOM then shows a plausible material cost and no conversion cost at all, which makes every finished item look cheap. Set electricity, rent, consumable, wage and depreciation rates per workstation; they sum into the hourly rate.
  • Operation times were copied from the quotation. Quoted times carry commercial padding. Costing times should be the realistic cycle time, and they should be revised once job cards have produced a few weeks of actuals.

Check: open the BOM and read the Operating Cost and Raw Material Cost totals separately. If operating cost is zero or implausibly small, the workstation rates are the cause.

3. Overhead is not automatic

Indirect cost that is not attached to a workstation — supervision, quality, factory administration — does not reach the work order by itself. There are two sound routes.

The first is to build it into workstation hourly rates, which works when overhead is reasonably proportional to machine time. The second is to post it as an additional cost on the manufacture stock entry, which suits period charges allocated across a run.

What does not work is leaving it in a general ledger expense account and expecting product cost to include it. It will not, and the gap between your gross margin and your product costing will be exactly that amount.

Scrap, rework and the quantity denominator

Scrap items declared on the BOM are valued and deducted from the cost pool before the finished-goods rate is calculated, which is correct: the recovered value should not be charged to good production.

The problem is undeclared scrap. If the BOM assumes a hundred units from a given input and the line routinely produces ninety-four, those six units of material cost are being carried by the ninety-four — which is arithmetically correct and strategically invisible. Your valuation absorbs the loss silently instead of reporting it.

Declare realistic process loss on the BOM. The per-unit cost will rise, and it will rise to the truth.

Reading the result

When a valuation is disputed, work through it in this order:

  1. Open the manufacture Stock Entry and read the total incoming value and quantity produced.
  2. Compare consumed quantities against the BOM. A difference here is a floor discipline question, not a costing one.
  3. Check each raw material’s valuation rate in the Stock Ledger on that date.
  4. Read the operating cost on the work order and compare it against job-card actuals if you capture them.
  5. Look for additional costs on the entry, and for overhead that should be there and is not.

In our experience the difference is in step three or step four nine times out of ten, and the valuation is correct in nearly every case. What was wrong was the expectation — which is itself worth knowing, because it usually means the plant is quoting from a cost that does not include its own conversion.

Getting it right from the start

Set workstation rates before the first work order, not after the first dispute. Decide the valuation method per item category during implementation, since changing it later means reposting. Put realistic times and realistic scrap on the BOM. And start capturing job cards early, even imperfectly, because planned cost without actuals eventually becomes a number nobody trusts.

Read next

Production costs that do not add up?

We review manufacturing configurations and show you where the valuation and the floor disagree, and why.