fix: negative stock error while submitting stock reconciliation (#40012)
fix: negative stock error while submitting stok reco
This commit is contained in:
parent
38e88db2c9
commit
45b25e09c1
@ -906,8 +906,12 @@ class StockReconciliation(StockController):
|
||||
|
||||
def has_negative_stock_allowed(self):
|
||||
allow_negative_stock = cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock"))
|
||||
if allow_negative_stock:
|
||||
return True
|
||||
|
||||
if all(d.serial_and_batch_bundle and flt(d.qty) == flt(d.current_qty) for d in self.items):
|
||||
if all(
|
||||
(not d.batch_no or (d.batch_no and flt(d.qty) == flt(d.current_qty))) for d in self.items
|
||||
):
|
||||
allow_negative_stock = True
|
||||
|
||||
return allow_negative_stock
|
||||
|
Loading…
x
Reference in New Issue
Block a user