Skip to content

Commit

Permalink
fix: stock reco negative batch (#40533)
Browse files Browse the repository at this point in the history
(cherry picked from commit a64c2ec)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Mar 19, 2024
1 parent 44bbf4b commit 75cd089
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,13 @@ def validate_batch_inventory(self):
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def make_bundle_for_current_qty(self):
{
"current_serial_and_batch_bundle": sn_doc.name,
"current_serial_no": "",
"batch_no": "",
}
)

Expand Down

0 comments on commit 75cd089

Please sign in to comment.