From f1407bcfd2b93af9daa2d8e9befa71f7f1004090 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 30 Oct 2023 13:53:48 +0530 Subject: [PATCH] fix: negative current qty causing recursion issue (#37752) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index e469291eac99..d37b2a67e118 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -647,7 +647,7 @@ def recalculate_current_qty(self, voucher_detail_no, sle_creation, add_new_sle=F {"voucher_detail_no": row.name, "actual_qty": ("<", 0), "is_cancelled": 0}, "name", ) - and current_qty + and current_qty > 0 ): new_sle = self.get_sle_for_items(row) new_sle.actual_qty = current_qty * -1