mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: max_qty validation condition
(cherry picked from commit d198c488a4)
This commit is contained in:
committed by
mergify-bot
parent
a12a3bd441
commit
18d7c77bad
@@ -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