chore: use flt() in qty check

This commit is contained in:
R-Jayaraman
2026-08-04 16:38:49 +05:30
parent c47cc37441
commit 69de8f2d62

View File

@@ -146,7 +146,7 @@ class Opportunity(TransactionBase, CRMNote):
def validate_qty(self):
for item in self.items:
if item.qty <= 0:
if flt(item.qty) <= 0:
frappe.throw(
_("Row #{0}: Quantity must be greater than 0 for Item {1}").format(
item.idx, item.item_code