Something is very wrong and/or has serious bug in stock item valuation rate and last purchase rate calculations.
Specifically, in stock ledger, the valuation rate is not calculated correctly.
Material transfers should not change the valuation rate of the stock item.
The valuation rate should change only when there is a purchase invoice or a material receipt.
Please note: The following screenshots show currency values and floating numbers with comma as decimal separator due to regional settings.
The valuation rate should be steady after the last purchase rate. Instead it fluctuates with every material transfer. Keep in mind that the specific stock item has valuation method set to FIFO.
When in manufacturing BOM, the valuation rate shows the miscalculated last valuation rate value.
Also in the same form, the last purchase rate is totally wrong.
In the above screenshot, the rate labeled as “Random value?” should be € 2.88034, the last purchase rate as highlighted in blue color on the first screenshot (Stock Ledger).
How do we fix these miscalculation bugs in a way that is not affected by consecutive ERPnext updates?