Merge pull request #9384 from nick9822/nick9822-patch-2

Bug while fetching stock balance of new item.
This commit is contained in:
Makarand Bauskar 2017-06-20 19:52:28 +05:30 committed by GitHub
commit cd5dd890aa

View File

@ -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 = {}