fix: stock reco negative batch (#40533)
This commit is contained in:
@@ -832,6 +832,13 @@ class SerialandBatchBundle(Document):
|
||||
if not self.has_batch_no:
|
||||
return
|
||||
|
||||
if (
|
||||
self.voucher_type == "Stock Reconciliation"
|
||||
and self.type_of_transaction == "Outward"
|
||||
and frappe.db.get_value("Stock Reconciliation Item", self.voucher_detail_no, "qty") > 0
|
||||
):
|
||||
return
|
||||
|
||||
batches = [d.batch_no for d in self.entries if d.batch_no]
|
||||
if not batches:
|
||||
return
|
||||
|
||||
@@ -154,7 +154,6 @@ class StockReconciliation(StockController):
|
||||
{
|
||||
"current_serial_and_batch_bundle": sn_doc.name,
|
||||
"current_serial_no": "",
|
||||
"batch_no": "",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user