diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 57f9f832d0..83045eae4e 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -348,6 +348,8 @@ def apply_internal_priority(pricing_rules, field_set, args): return filtered_rules or pricing_rules def set_transaction_type(args): + if args.transaction_type: + return if args.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"): args.transaction_type = "selling" elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order", @@ -356,4 +358,4 @@ def set_transaction_type(args): elif args.customer: args.transaction_type = "selling" else: - args.transaction_type = "buying" \ No newline at end of file + args.transaction_type = "buying"