diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index b9c4cbb735..0dcfc1fe5c 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):