mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
Merge pull request #40034 from frappe/mergify/bp/version-14/pr-40025
fix: negative stock error while making stock reconciliation (backport #40016) (backport #40025)
This commit is contained in:
@@ -699,8 +699,13 @@ class StockReconciliation(StockController):
|
|||||||
|
|
||||||
def has_negative_stock_allowed(self):
|
def has_negative_stock_allowed(self):
|
||||||
allow_negative_stock = cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock"))
|
allow_negative_stock = cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock"))
|
||||||
|
if allow_negative_stock:
|
||||||
|
return True
|
||||||
|
|
||||||
if all(d.batch_no and flt(d.qty) == flt(d.current_qty) for d in self.items):
|
if any(
|
||||||
|
(d.batch_no and flt(d.qty) == flt(d.current_qty))
|
||||||
|
for d in self.items
|
||||||
|
):
|
||||||
allow_negative_stock = True
|
allow_negative_stock = True
|
||||||
|
|
||||||
return allow_negative_stock
|
return allow_negative_stock
|
||||||
|
|||||||
Reference in New Issue
Block a user