From 20ca948e6b4acc4fdc056593ee9769139ca6d302 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:23:39 +0530 Subject: [PATCH] fix: negative current qty causing recursion issue (backport #37752) (#37753) fix: negative current qty causing recursion issue (#37752) (cherry picked from commit f1407bcfd2b93af9daa2d8e9befa71f7f1004090) Co-authored-by: rohitwaghchaure --- .../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 e469291eac9..d37b2a67e11 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -647,7 +647,7 @@ class StockReconciliation(StockController): {"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