From 38265efc391039c6adf7ae7a2b93a39bb31abd8b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 21 Oct 2014 20:23:39 +0530 Subject: [PATCH] Minor fix --- 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 b444e84193..889c30ced3 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -100,7 +100,7 @@ def get_fifo_rate(previous_stock_queue, qty): """get FIFO (average) Rate from Queue""" if qty >= 0: total = sum(f[0] for f in previous_stock_queue) - return total and sum(f[0] * f[1] for f in previous_stock_queue) / flt(total) or 0.0 + return sum(flt(f[0]) * flt(f[1]) for f in previous_stock_queue) / flt(total) if total else 0.0 else: available_qty_for_outgoing, outgoing_cost = 0, 0 qty_to_pop = abs(qty)