fix: validate Blanket Order item quantity is greater than zero

This commit is contained in:
R-Jayaraman
2026-08-04 19:05:51 +05:30
parent 69de8f2d62
commit e897c4d82d

View File

@@ -120,8 +120,8 @@ class BlanketOrder(Document):
def validate_item_qty(self):
for d in self.items:
if flt(d.qty) < 0:
frappe.throw(_("Row {0}: Quantity cannot be negative.").format(d.idx))
if flt(d.qty) <= 0:
frappe.throw(_("Row {0}: Quantity must be greater than zero.").format(d.idx))
@frappe.whitelist()