When any back dated stock transaction is cancelled then repost item valuation get stuck in Queued and stock ledger is not getting updated. I have tested this on latest [Release v13.0.0].
Later if we post any new transaction for the same item in current date then the item valuation gets updated only for the new transaction and stock balance value get corrected however, all the previous transactions which were recorded prior to current transaction still show wrong calculation in stock ledger.
As visible in above ledger the incoming rate is always 2800 however after some back dated cancelations the repost functionality has calculated wrong valuation rate.
It seems also the balance value suddenly jumps after purchase of 5 kg.
We faced similar issue - but in our case - the item quantities went completely off after the initial attempts. We are on FIFO. We followed these steps to resolve - unsure if/why needed - and not clear why they worked.
Check if there are subsequent stock reconciliations - cancel them. Cancel/delete any pending repost item valuations and attempt them again. Start with the earliest first where you notice an error and then move forward in time with each step. Depending on size of ledger repost item valuation can take time.
Sorry cannot help you more - but would be interesting for the community to learn how you resolve this issue…
We managed to correct the stock ledger and valuation rate once- not sure how but after so many trials and errors. However later on there was one back dated purchase receipt posted and again the stock ledger went crazy!!!
This reposting idea is knid of bullshit right now. Locks many things up and why it is needed at that stage of maturity is unknown. Messed up all the accounting.
@rmehta This seems like a major issue. Our ERP is showing incorrect stock and valuation. And I think the reason is stock ledger entry getting messed up. Is there a way to manually trigger recalculation/reposting of everything?
Dears, @rmehta,
this kind of valuation was not a problem before. Even before diving into the coding itself, we’ve been using perpetual inventory from the start. Now, we receive correction entry requests during stock transaction which were not an issue before. The rate is up to 10% of the inventory value.
Someone should delve into this problem to check what is going on and if it makes any business sense.
Financials is the key to corporate accounts and just this question will decrease the value of the product.
I just don’t understand why a system is posting valuation difference entries now that we are using Erpnext for over 5 years.
Thanks a lot @youssef… i will test this and update the results.
Just one clarification, if the repost entries are already stuck in queue, Will this code restart them over again or they will be stuck there and new repost will run?
How was it working before? Why are GL Entries updated? How can we keep a consistent ledger if it keeps being updated in every transaction? Say, we submitted the GL on 30-06-2021 and did a stock entry in 01-07-2021, will that change the GL entry in 30-06-2021? Just does not hold up! Just because it can be codded does not mean it is correct business wise!