minor fix in applying pricing rule
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index a701024..57f9f83 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -285,8 +285,9 @@
 
 def filter_pricing_rules(args, pricing_rules):
 	# filter for qty
-	stock_qty = args.get('qty') * args.get('conversion_factor', 1)
 	if pricing_rules:
+		stock_qty = flt(args.get('qty')) * args.get('conversion_factor', 1)
+
 		pricing_rules = filter(lambda x: (flt(stock_qty)>=flt(x.min_qty)
 			and (flt(stock_qty)<=x.max_qty if x.max_qty else True)), pricing_rules)