erpnext
erpnext copied to clipboard
fix: negative stock qty error for stock reconciliation
Steps To Replicate Issue
- Create Purchase Receipt for 10 Qty with Batch Item (First Batch)
- Create Deliver Note for 1 Qty balance qty 9 (First Batch)
- Create Deliver Note for 1 Qty balance qty 8 (First Batch)
- Create Deliver Note for 1 Qty balance qty 7 (First Batch)
- Create Deliver Note for 1 Qty balance qty 6 (First Batch)
- Create Deliver Note for 1 Qty balance qty 5 (First Batch)
- Create Deliver Note for 1 Qty balance qty 4 (First Batch)
- Create Purchase Receipt for 3 Qty with Batch Item (Second Batch)
- Create Stock Reco against the First batch and keep qty as 9
- Create Deliver Note for 3 Qty balance qty against the second batch
- Create Deliver Note for 3 Qty balance qty 6 (Second Batch)
- Create Deliver Note for 3 Qty balance qty 3 (Second Batch)
- Create Deliver Note for 3 Qty balance qty 0 (Second Batch)
- Now Cancel the delivery note which was created at step 7
- Delivery Note get cancel but when you try to complete reposting, system will throw the negative stock error.