From 40a8ae290743ce61882e204486bd63980f923486 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 29 Aug 2014 16:28:31 +0530 Subject: [PATCH] [fix] get incoming rate --- 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 100d338fd6..7264f360b9 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -67,7 +67,7 @@ def get_incoming_rate(args): from erpnext.stock.stock_ledger import get_previous_sle in_rate = 0 - if args.get("serial_no"): + if (args.get("serial_no") or "").strip(): in_rate = get_avg_purchase_rate(args.get("serial_no")) else: valuation_method = get_valuation_method(args.get("item_code"))