The cell highlighted should have a Balance Qty of 13, since this item has only been decreased by 1 Qty since last transaction when the Balance was 14. For some reason, the Balance Qty is 0.
These transactions are not back-dated therefore it is unlikely that this issue is arising out of Repost Item Valuation.
I checked the corresponding Stock Ledger Entry, here is the snapshot
The Actual Qty after Transaction field in Stock Ledger entry for Previous Stock Ledger Entry (for Item and Warehouse combination) is not calculated correctly for some reason, which is leading to wrong Actual Qty after Transaction in current SLE (Current qty_after_transaction = Previous qty_after_transaction + actual_quantity. Not able to find the cause of this issue but looks like this is the problem
I was able to fix the issue (symptomatically) by setting the correct Actual Qty after Transaction at DB level, but still need to find the root cause
I am facing Similar issue with my instance my whole stock is messed up because of this, I am on erpnext version 13.6.0.
I have also enabled negative stock. Is it something which is causing this problem?
Please help with this
@Manan_Shah have you solved your issue? I have discovered the same case when creating a stock reconciliation, a pop-up message appears when trying to submit it. Upon checking the current qty and the current serial no count is not the same. The current active serial number is 506 while 491 stocks are on the stock ledger.
@Francisco_Buendia do you know can I create another stock ledger entry? I think this case was because of a cancelled delivery note. A cancelled transaction should automatically create a positive stock ledger entry, however, ERPNEXT did not do it.
With this, the stock ledger qty balance is incorrect. Now, I need to create or refresh the stock ledger report so that the qty will be corrected.
Do you know how to do it since I am not a developer/programmer so I have no idea how to do it
I have been trying to fight this problem for a very long time, not that I have managed to successfully fix it but I do notice this happening if the system is very busy i.e. there are alot of users and alot of stock related transactions.
I actually think it may have something to do with DB calls, rollbacks and commits etc. Been studying this for a long time now but still cannot conclude why exactly this happens.
Is there any chance someone who is seriously knowledgable about the Stock Ledger Entries can assist with this? perhaps from the Frappe team. It is from my POV quite a serious problem.