mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: max_qty validation condition
This commit is contained in:
@@ -640,7 +640,7 @@ class WorkOrder(Document):
|
|||||||
|
|
||||||
max_qty = qty_dict.get("planned_qty", 0) + allowance_qty - qty_dict.get("ordered_qty", 0)
|
max_qty = qty_dict.get("planned_qty", 0) + allowance_qty - qty_dict.get("ordered_qty", 0)
|
||||||
|
|
||||||
if max_qty < 1:
|
if not max_qty > 0:
|
||||||
frappe.throw(_("Cannot produce more item for {0}")
|
frappe.throw(_("Cannot produce more item for {0}")
|
||||||
.format(self.production_item), OverProductionError)
|
.format(self.production_item), OverProductionError)
|
||||||
elif self.qty > max_qty:
|
elif self.qty > max_qty:
|
||||||
|
|||||||
Reference in New Issue
Block a user