The number on the shelf keeps moving

Picture a month-end costing meeting. The stock report values a pressure fitting at 42 per unit. The last three Purchase Invoices for it came in at 44, 47 and 39. The shop floor says the assembled unit now costs 61.

Everyone agrees on the quantity. Nobody agrees on the value, and the valuation report changes every time a receipt posts.

For many items, that movement is correct. FIFO and Moving Average follow what you actually paid. But for a part that the planners cost once a quarter, a value that shifts with every bill is noise. The planners want one number. The accountants want the difference somewhere they can see it.

That is the job of the Standard Cost valuation method. The version 16 hotfix branch now carries it. The backport is PR #69860, and the v16.62.0 release notes list it under Stock.

What Standard Cost does in ERPNext

An item on Standard Cost sits in stock at one fixed rate per company. Purchases and production still happen at their real cost. The stock ledger does not follow those costs. The gap goes to a variance account instead.

Two points shape everything else:

  • The method is set per item, through the Valuation Method field on the Item. Items on FIFO, Moving Average or other methods are not changed.
  • The rate is a document, not a field you quietly edit. Every change is a new submitted record, and that record moves stock.

Running bench migrate creates the new DocType and fields. Existing items keep their method until someone selects Standard Cost.

The Item Standard Cost document

Item Standard Cost is a submittable DocType with the naming series ISC-.YYYY.-. The fields that matter are:

  • item_code (Item) and company
  • standard_rate (Standard Valuation Rate)
  • effective_date
  • revaluation_entry (a read-only link to a Stock Reconciliation)

Here is how the pieces connect:

Architecture diagram 1

The rate document drives a reconciliation that revalues stock. The purchase path books the gap to a variance account. The account lookup checks the Item, Item Group and Brand defaults before it falls back to the Company defaults.

Where the variance goes

Take one fitting on a standard rate of 40. A clerk receives 10 units on a Purchase Receipt. Stock takes in 10 x 40 = 400. The Purchase Invoice then arrives at 44 per unit, 440 in total.

The stock side stays at 400. The 40 difference goes to the Purchase Price Variance account. These numbers are illustrative. Check your own case on a staging site.

The PR description sets the rules for each path:

  • A Purchase Receipt, a Purchase Invoice with Update Stock, and a Material Receipt book stock at the standard rate.
  • A Purchase Invoice without Update Stock clears Stock Received But Not Billed at the billed amount. It does not book the variance a second time.
  • A Manufacture or Repack books the finished good at its standard rate. The difference from the consumed cost goes to the Manufacturing Variance account.

The Company needs both default_purchase_price_variance_account and default_manufacturing_variance_account set, unless the Item or its groups provide them. If neither source has an account, the lookup throws. That is a good early failure. It is much better than a silent posting to the wrong account at month end.

A rate change revalues your stock

Changing the standard rate is the step teams underestimate. On submit, the document builds and submits a Stock Reconciliation at the new rate for every warehouse holding the item. It then stores that reconciliation's name in revaluation_entry.

Architecture diagram 2

The rate now moves stock on a date you chose, not on the day the bill arrived. The document refuses several things up front:

  • an effective date in the future, or one not later than the previous standard cost record
  • a rate of zero or less
  • a first-time setup on an item that already has stock
  • a date earlier than the last stock transaction
  • any submit that would leave a warehouse negative

Stock transactions also cannot be posted before the effective date of the latest rate. Cancelling the record is guarded too. If stock activity exists on or after the effective date, the cancel throws.

The guards are strict on purpose. A backdated correction to a standard rate is a stock event, and it should leave an audit trail. It feels slow the first time someone hits it, and that is the tradeoff you accept.

What the PR does not change

Items on FIFO, Moving Average and other methods are unaffected, according to the PR description. The author reports differential test runs against those methods and batch items, with no difference in results.

Serial-tracked items get a stricter rule. The PR includes a block on switching to Standard Cost without Serial No Wise Valuation.

The PR description also notes failing tests on the hotfix branch: two Company Restriction tests, and one Purchase Receipt test when Allow Negative Stock is on. Treat that as a pre-production warning. We have not reproduced those failures ourselves, so run your own test suite before you rely on this.

Before you switch an item

  1. Start with one item group, not the whole catalogue.
  2. Set both variance accounts on the Company, or on the item defaults, before the first submit.
  3. Switch items that have no stock, or pick an effective date after their last stock transaction.
  4. After the first revaluation, check that the stock value equals quantity times the new rate.
  5. Run the same steps on a staging copy of your site first.

The takeaway

Standard Cost trades a moving number for a stable one, with the variance shown on its own line. The cost is that the rate becomes a dated event that moves stock. If your planners need one number per item and your accountants need the gap visible, it fits. If you run FIFO everywhere because you want actual cost, leave it alone.

Have you tried Standard Cost on a live site yet? What did you do with the variance balance at year end?

Have questions about implementing this? Drop us a line — we're happy to help.