From cc699a94fdb9fc211cd8e92d2d846a0dd9aabfaf Mon Sep 17 00:00:00 2001 From: nick9822 Date: Tue, 20 Jun 2017 17:13:29 +0530 Subject: [PATCH] Bug while fetching new item balance. --- erpnext/stock/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index fd1ece2151..2b9def35a8 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -65,7 +65,7 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None if with_valuation_rate: return (last_entry.qty_after_transaction, last_entry.valuation_rate) if last_entry else (0.0, 0.0) else: - return last_entry.qty_after_transaction or 0.0 + return last_entry.qty_after_transaction if last_entry else 0.0 def get_latest_stock_balance(): bin_map = {}