diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index e4a85b86b83..ff1ccfd352a 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -28,7 +28,7 @@ def get_pricing_rules(args, doc=None): pricing_rules = [] values = {} - if not frappe.db.exists("Pricing Rule", {"disable": 0, args.transaction_type: 1}): + if not frappe.db.count("Pricing Rule", cache=True): return for apply_on in ["Item Code", "Item Group", "Brand"]: