mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
Merge pull request #46483 from frappe/mergify/bp/version-15-hotfix/pr-46248
fix: pricing rule not ignored in Sales Order (backport #46248)
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