Add a "Margin" Surcharge to a Discounted Price
We have a requirement to add a "Margin" surcharge to a discounted price on a quote. The scenario is as follows:
The customer gets a discount off of the list price of 20%. There is then a 12% margin applied to the discounted price.
EXAMPLE:
List Price = $1200
Customer Discount Price = List Price - (List Price * Customer Discount) or 1200 - (1200 * .20) = 960
Margin Price = Customer Discount Price / (1 - Margin Percentage) or 960 / (1 - .12) = 1090.91
We are using buckets to ensure that the pricing happens in the correct order. The first discount would be Bucket 1 and the second Bucket 2.
Where we are having the issue is passing the discounted price from the Bucket 1 discount into the formula for the bucket 2 surcharge. Any ideas on how to achieve this would be greatly appreciated.