From 6b1f21d1bb4053362aaa3a31915ececb0409589e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 16 Jan 2013 17:17:17 +0530 Subject: [PATCH] fixes in get_incoming_rate --- stock/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock/utils.py b/stock/utils.py index e05e07aa38..e7702a89fd 100644 --- a/stock/utils.py +++ b/stock/utils.py @@ -82,7 +82,7 @@ def get_incoming_rate(args): return 0.0 previous_stock_queue = json.loads(previous_sle.get('stock_queue', '[]')) in_rate = previous_stock_queue and \ - get_fifo_rate(previous_stock_queue, args.get("qty")) or 0 + get_fifo_rate(previous_stock_queue, args.get("qty") or 0) or 0 elif valuation_method == 'Moving Average': in_rate = previous_sle.get('valuation_rate') or 0 return in_rate