fix: negative current qty causing recursion issue (backport #37752) (#37753)

fix: negative current qty causing recursion issue (#37752)

(cherry picked from commit f1407bcfd2)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2023-10-30 14:23:39 +05:30
committed by GitHub
parent cfb9d8c6be
commit 20ca948e6b

View File

@@ -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