mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 07:15:11 +00:00
fix: stock reco negative batch (#40533)
(cherry picked from commit a64c2ecf39)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -832,6 +832,13 @@ class SerialandBatchBundle(Document):
|
|||||||
if not self.has_batch_no:
|
if not self.has_batch_no:
|
||||||
return
|
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]
|
batches = [d.batch_no for d in self.entries if d.batch_no]
|
||||||
if not batches:
|
if not batches:
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ class StockReconciliation(StockController):
|
|||||||
{
|
{
|
||||||
"current_serial_and_batch_bundle": sn_doc.name,
|
"current_serial_and_batch_bundle": sn_doc.name,
|
||||||
"current_serial_no": "",
|
"current_serial_no": "",
|
||||||
"batch_no": "",
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user