fix: pricing rule not ignored in Sales Order (#46248)

* fix: pricing rule not ignored in Sales Order

* test: update parameter do_not_submit to do_not_save
This commit is contained in:
Sugesh G
2025-03-12 16:27:48 +05:30
committed by GitHub
parent 08c7e8a602
commit f8c659d8d5
2 changed files with 2 additions and 3 deletions

View File

@@ -128,7 +128,7 @@ class TestCouponCode(IntegrationTestCase):
item_code="_Test Tesla Car",
rate=5000,
qty=1,
do_not_submit=True,
do_not_save=True,
)
self.assertEqual(so.items[0].rate, 5000)

View File

@@ -454,8 +454,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
if pricing_rule.coupon_code_based == 1:
if not args.coupon_code:
return item_details
continue
coupon_code = frappe.db.get_value(
doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name"
)