Do not check for batch on cancellation (#14506)
This commit is contained in:
parent
8e74df09a4
commit
dd8fba6783
@ -77,7 +77,7 @@ class StockLedgerEntry(Document):
|
|||||||
elif not frappe.db.get_value("Batch",{"item": self.item_code, "name": self.batch_no}):
|
elif not frappe.db.get_value("Batch",{"item": self.item_code, "name": self.batch_no}):
|
||||||
frappe.throw(_("{0} is not a valid Batch Number for Item {1}").format(self.batch_no, self.item_code))
|
frappe.throw(_("{0} is not a valid Batch Number for Item {1}").format(self.batch_no, self.item_code))
|
||||||
|
|
||||||
elif item_det.has_batch_no ==0 and self.batch_no:
|
elif item_det.has_batch_no ==0 and self.batch_no and self.is_cancelled == "No":
|
||||||
frappe.throw(_("The Item {0} cannot have Batch").format(self.item_code))
|
frappe.throw(_("The Item {0} cannot have Batch").format(self.item_code))
|
||||||
|
|
||||||
if item_det.has_variants:
|
if item_det.has_variants:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user