fix: '<' not supported between instances of 'str' and 'int'

This commit is contained in:
Rohit Waghchaure 2020-05-11 11:44:45 +05:30
parent 5210761e57
commit 3a914a7cd7

View File

@ -181,7 +181,7 @@ class StockEntry(StockController):
stock_items = self.get_stock_items()
serialized_items = self.get_serialized_items()
for item in self.get("items"):
if item.qty and item.qty < 0:
if flt(item.qty) and flt(item.qty) < 0:
frappe.throw(_("Row {0}: The item {1}, quantity must be positive number")
.format(item.idx, frappe.bold(item.item_code)))