mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 22:12:12 +00:00
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
(cherry picked from commit f8c659d8d5)
This commit is contained in:
@@ -128,7 +128,7 @@ class TestCouponCode(unittest.TestCase):
|
|||||||
item_code="_Test Tesla Car",
|
item_code="_Test Tesla Car",
|
||||||
rate=5000,
|
rate=5000,
|
||||||
qty=1,
|
qty=1,
|
||||||
do_not_submit=True,
|
do_not_save=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertEqual(so.items[0].rate, 5000)
|
self.assertEqual(so.items[0].rate, 5000)
|
||||||
|
|||||||
@@ -454,8 +454,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
|
|||||||
|
|
||||||
if pricing_rule.coupon_code_based == 1:
|
if pricing_rule.coupon_code_based == 1:
|
||||||
if not args.coupon_code:
|
if not args.coupon_code:
|
||||||
return item_details
|
continue
|
||||||
|
|
||||||
coupon_code = frappe.db.get_value(
|
coupon_code = frappe.db.get_value(
|
||||||
doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name"
|
doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user