Do not check for batch on cancellation (#14506)
This commit is contained in:
parent
8e74df09a4
commit
dd8fba6783
@ -77,8 +77,8 @@ class StockLedgerEntry(Document):
|
||||
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))
|
||||
|
||||
elif item_det.has_batch_no ==0 and self.batch_no:
|
||||
frappe.throw(_("The Item {0} cannot have Batch").format(self.item_code))
|
||||
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))
|
||||
|
||||
if item_det.has_variants:
|
||||
frappe.throw(_("Stock cannot exist for Item {0} since has variants").format(self.item_code),
|
||||
|
Loading…
x
Reference in New Issue
Block a user