Symptoms

When an upgrade/downgrade order was placed, several details was seen generated for this order; refund for the previous period on old price, fee for the previous period by the new price and charges for current period with new price.


Cause

Resource Rates prices was changed recently and synchronized with subscription. This action is not supported for Rating Engine and there is an existing feature request to support such functionality:

#PFR-5233 - 'Rating Engine to work consistently with Plan/Subscription synchronization or API to update prices'

Such behavior exists because of the following:


1) Rating Engine calculates charges historically.

2) Synchronization process updates current tariff of subscription.

3) Tariffs are considered to be the price history for the subscription.

4) Changing prices in current tariff is equal to changing prices for the subscription in the past (because tariffs have start date - the date when tariff was created).


On attempt to calculate charges for Change Order, Rating Engine notices that the price history for the subscription was changed in the past. This means the charges that Rating Engine calculated previously are now incorrect and it needs to be recalculated, subsequently causing such details to be generated in Change Order.


Resolution

This is the expected behavior of current Rating Engine, therefore there is nothing to be done. In case it is needed, please feel free to create Credit Memo to compensate the recalculated charges.