From 15272d0e566eb7e4495fb799c5bd9e5fa5a61e9c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 14 Apr 2025 14:35:04 +0530 Subject: [PATCH] fix: consider negative stock qty in stock reco --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 5ea3a457c0b..c3d0480e820 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -336,6 +336,7 @@ class StockReconciliation(StockController): posting_date=self.posting_date, posting_time=self.posting_time, for_stock_levels=True, + consider_negative_batches=True, ) total_current_qty += current_qty @@ -1101,6 +1102,7 @@ class StockReconciliation(StockController): posting_time=doc.posting_time, ignore_voucher_nos=[doc.voucher_no], for_stock_levels=True, + consider_negative_batches=True, ) or 0 ) * -1