How to update actual valuation rate?

How does a user update actual valuation rate of an item (to fix an input error) ?

This gets a bit complicated with valuation methods, but usually the correct answer is to cancel the erroneous entry and recreate it.

If you want to just re-value the stock even there is no error on entry part, you can use the Stock Reconciliation tool. In the Stock Reconciliation keep the stock Qty as same and give the new value you want.

1 Like

Stock Reconciliation doesn’t work as explained here.

I cannot cancel the Stock Reconciliation entry as many other items have been consumed.

I submitted a github issue 3 months ago, no answer at all…

Hmm…I’m not sure I understand the issue, but I might just not be understanding how Moving Average is supposed to work. I would think that the correct approach here is to cancel the erroneous Stock Transaction and amend it, making the correction you need and reposting all other items as they were. Can you clarify why that wouldn’t work?

1 Like

I cannot cancel the Stock Transaction as many other items present in the transaction have been consumed.

Purchase Receipt made for ItemA and ItemB.
Consume ItemA via Work Order.
User realize valuation rate of ItemB is wrong and trace back to an input error in the Purchase Receipt.
Purchase Receipt cannot be cancelled as ItemA is already consumed.

What kind of error are you getting if you try? I just tested your example on my system, and I was able to cancel and resubmit the purchase receipt without problem. It’s very possible I’m missing a step or there’s a difference in versions (14-beta, for me).


80 units of Batch 20220621-2 was received and fully consumed. The cancel tries to remove 80 units of this batch, but there are none (or not enough) in actual stock.

Ah, that’s the difference. In my Stock Settings, I’ve got “Allow negative stock” set to true. If you don’t, the validations will give you that error.

That said, I just tested on the Stock Reconciliation process on my system, and it appears to be working properly for me. If I do a stock reconciliation for the entire quantity of a batch, the value is wiped out and replaced with the reconciled amount (not calculated as if it were a transaction).

In this case, I’ve got three items: Item Alpha and Item Beta were acquired via a single Purchase Receipt; Item Delta was manufactured from Item Alpha; Item Beta then had its valuation adjusted via a Stock Reconciliation entry.

Is the image showing the behavior you would have expected?

Thank you so much for your time Peter.
I think in your example you have a single batch of item Beta.

Can you retry with 2+ different batches of item Beta in stock, and make a Stock Recon to adjust all batches at the same price.

The resulting valuation rate for the item, in my case, is not the one set in the stock recon.

The only way I have found to adjust valuation rate of all batches of an item is with a manual stock entry Material Issue to remove all batch qty, then a Material Reception. This is tedious and my client is asking why the stock recon is not working.

Yep, that’s the issue.

It appears to be a semantic problem. All batches of a single item type share a single valuation, but it is possible in ERPNext to use Stock Reconciliation to change the value of only part of the inventory. This might make sense for FIFO/LIFO valuation, but it’s incoherent for moving average. Even when all batches are changed in a single reconciliation voucher, ERPNext is processing the revaluation one batch at a time, which is incorrect.

I don’t know enough about the accounting to have a clear sense of how this is supposed to work. When all batches are changed in a single reconciliation voucher, the bug here seems pretty obvious (and fixable). What’s supposed to happen, though, if I use reconciliation to change only one batch among several? Should all the other batches have their valuation changed too? Or should it do this weird weighted average thing that it currently does?

My sense would be that all batches need to be changed at once, but I’m not fully clear on the accounting principles.

1 Like