Pricing Rule w/ Apply Multiple Pricing Rules Margin

Hello everyone,

I’ve been trying to figure out how to apply multiple price rules. The feature is defiantly available as it describes in the documentation.

Apply Multiple Pricing Rules : To understand this, consider an Item of Rate 500. There are two Pricing Rules on it P1 and P2. P1 applies 10% discount and P2 applies 5%. Enabling this option will apply a total of 15% on the Item Rate which gives 425.

I’m trying to achieve the same process only with margin instead of discount percentage.

I have 2 price rules, both with Apply Multiple Pricing Rules checked.

  1. MIN (10%)
  2. LST (74%)

Expected Outcome
I have ITEM_A with a list price of $33.19. The pricing rules should override the rate of ITEM_A by 84% (10% + 74%) making the selling rate: $61.07

Actual Outcome
Only the last pricing rule is being applied at 74% making the selling rate only $57.75

I know for sure the pricing rule conditions are being fulfilled when adding ITEM_A to sales order.

But why is only 74% margin being used?

Is this a bug in the program, or have I missed some steps?

I’m pretty sure this is a bug. I’ve fixed the problem with this PR: fix: multiple price rules margin. by dj12djdjs · Pull Request #24844 · frappe/erpnext · GitHub

1 Like