mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 11:27:55 +00:00
fix: validate Blanket Order item quantity is greater than zero
(cherry picked from commit e897c4d82d)
This commit is contained in:
@@ -120,8 +120,8 @@ class BlanketOrder(Document):
|
|||||||
|
|
||||||
def validate_item_qty(self):
|
def validate_item_qty(self):
|
||||||
for d in self.items:
|
for d in self.items:
|
||||||
if flt(d.qty) < 0:
|
if flt(d.qty) <= 0:
|
||||||
frappe.throw(_("Row {0}: Quantity cannot be negative.").format(d.idx))
|
frappe.throw(_("Row {0}: Quantity must be greater than zero.").format(d.idx))
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
Reference in New Issue
Block a user