From c1331d0e8e6270461b5fcd3f59a0135a94301676 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Fri, 29 Jan 2016 15:44:56 +0530 Subject: [PATCH] [minor-fix] pricing rule test-case fix --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index b9c4cbb7352..0dcfc1fe5cc 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -171,8 +171,8 @@ def get_pricing_rule_for_item(args): }) else: # if user changed the discount percentage then set discount_percentage of user - item_details.discount_percentage = pricing_rule.discount_percentage if args.discount_percentage == pricing_rule.discount_percentage\ - else args.discount_percentage + item_details.discount_percentage = args.discount_percentage if args.discount_percentage != pricing_rule.discount_percentage\ + and args.discount_percentage > 0 else pricing_rule.discount_percentage return item_details def get_pricing_rules(args):