fix: validate Blanket Order item quantity is greater than zero

(cherry picked from commit e897c4d82d)
This commit is contained in:
R-Jayaraman
2026-08-04 19:05:51 +05:30
committed by Mergify
parent e3af2f9302
commit 613e04745d

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()