From 7ef039f6eda7f7e0943a78e7545271e6b1180f35 Mon Sep 17 00:00:00 2001 From: R-Jayaraman Date: Tue, 4 Aug 2026 16:38:49 +0530 Subject: [PATCH] chore: use flt() in qty check (cherry picked from commit 69de8f2d62c16a96b868885694d6dcc6fd5e5a35) --- erpnext/crm/doctype/opportunity/opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 3cd927c938d..aa8d75e1826 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -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