AfterReprice
Description:
Reprice functions are designed to simplify definition of tariffs to handle repricing. Frequent repricing is very common and invoices often straddle the repricing date. When that happens, the invoice component is prorated on number of days using the repricing date and the two rates. AfterReprice returns the portion of a charge accrued on or after the repricing date.
Use ProratedReprice where there is no need to see the separate values before and after the repricing date. Many providers break out these values on invoices, and in those cases use BeforeReprice and AfterReprice to create the same level of visibility in the invoice records.
Syntax:
AfterReprice(ReadingPeriod, RepricingDate, AfterValue)
Type:
Double Precision Numeric
Arguments:
Argument |
Type |
Description |
ReadingPeriod |
DateRange |
|
RepricingDate |
DateTime |
The date when the new price came into effect |
AfterValue |
Double |
The value calculated as if ReadingPeriod occurred entirely on or after RepricingDate** |
** AfterValue will typically be a Qty x Unit Cost calculation, or a SumOfTiers function.
Examples:
Consider a natural gas meter component group NG1, a meter reading period of May 23 2010 to June 19 2010, and repricing as of June 1 2010. The price of natural gas is $0.28 per therm after the repricing date. Gas consumption during the metering period is 10,000 therms. There are 27 days in the metered period, 8 before the repricing and 19 after the repricing.
NG1 - Meter Component Group
[NG1].StartDate - May 23 2010
[NG1].EndDate - June 19 2010
RepriceDate - June 1 2010
NGCommodityAfter - 0.28
NGConsumption - 10,000
Expression |
Result |
AfterReprice([NG1].Period, [RepriceDate], [NGConsumption] * [NGCommodityAfter]) |
1970.37 |