diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 14ec325bea2..6a58ae17059 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -346,8 +346,7 @@ def apply_pricing_rule(args, doc=None): args = frappe._dict(args) - if not args.transaction_type: - set_transaction_type(args) + set_transaction_type(args) # list of dictionaries out = [] @@ -684,7 +683,7 @@ def remove_pricing_rules(item_list): def set_transaction_type(args): - if args.transaction_type: + if args.transaction_type in ["buying", "selling"]: return if args.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"): args.transaction_type = "selling"