Merge pull request #32238 from rohitwaghchaure/fix-pricing-rules-issues
fix: suggestion threshold label and rule was not working for other item with min and max amount
This commit is contained in:
@@ -572,6 +572,11 @@ class AccountsController(TransactionBase):
|
||||
# if user changed the discount percentage then set user's discount percentage ?
|
||||
if pricing_rule_args.get("price_or_product_discount") == "Price":
|
||||
item.set("pricing_rules", pricing_rule_args.get("pricing_rules"))
|
||||
if pricing_rule_args.get("apply_rule_on_other_items"):
|
||||
other_items = json.loads(pricing_rule_args.get("apply_rule_on_other_items"))
|
||||
if other_items and item.item_code not in other_items:
|
||||
return
|
||||
|
||||
item.set("discount_percentage", pricing_rule_args.get("discount_percentage"))
|
||||
item.set("discount_amount", pricing_rule_args.get("discount_amount"))
|
||||
if pricing_rule_args.get("pricing_rule_for") == "Rate":
|
||||
|
||||
Reference in New Issue
Block a user