From 903055b7b62e0f39ce096cb7f1a036a780325c7a Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 20 Oct 2020 11:59:06 +0530 Subject: [PATCH] fix: '>' not supported between instances of 'str' and 'int' --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 394883d239..f743d707f7 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -52,7 +52,7 @@ class StockController(AccountsController): frappe.throw(_("Row #{0}: Serial No {1} does not belong to Batch {2}") .format(d.idx, serial_no_data.name, d.batch_no)) - if d.qty > 0 and d.get("batch_no") and self.get("posting_date") and self.docstatus < 2: + if flt(d.qty) > 0.0 and d.get("batch_no") and self.get("posting_date") and self.docstatus < 2: expiry_date = frappe.get_cached_value("Batch", d.get("batch_no"), "expiry_date") if expiry_date and getdate(expiry_date) < getdate(self.posting_date):