We recently discovered an issue with amending a Contract containing lines that had a Discount Amount on the original Quote. The issue is that, when you amend a line that has a Discount Amount from the original Quote, the whole discount value is put on that line from before. Which doesn’t make sense because when it is an amount, it should be a prorated amount based on the time left on the Contract. Because of this, when a customer cancels a Contract, the refund amount (negative amount) on the Quote would be different than what was actually owed.
A Quote Line that had a Discount % applied turns into a Subscription with the Discount % filled in. All good. When it renews, the renewal Quote Line has Discount AMOUNT $ filled in?! Not a Discount %. So as your discounted customers renew, this issue is propagated.
But but but, what about the ProrateAmountDiscounts__c special field as referenced here? This is a great solution but this will apply the proration to all types of Quotes. We only want it to apply to amendments.
So I made a thing! It is two formula fields and a Price Rule. This thing will prorate the discount for any lines that had a Discount Amount on the original Quote.
Subscription – Original Discount $
Quote Line – Original Discount $
Price Rule – Quote Line – Amendment – Inject Calculated Discount $