chore: use flt() in qty check

(cherry picked from commit 69de8f2d62)
This commit is contained in:
R-Jayaraman
2026-08-04 16:38:49 +05:30
committed by Mergify
parent f47346aa90
commit 7ef039f6ed

View File

@@ -145,7 +145,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