The following example is for a utility with a more complex tariff structure. Items of note include:
1) This tariff allows for prorating across a date where rates will change. NG_CommEarlier would be the rate for consumption in the first part of the billing period; NG_CommLater would be the newer price/m3. The NG_PriceChangeDate is the date at which this change occurs.
If the invoice had the reading dates of December 3 to January 3, the tariff would calculate 28 days at the earlier rate, and 3 days at the new rate.
2) There is a sliding delivery rate by volume. The SumOfTiers function will calculate the total cost for this tiered rate structure.
The first 100m3 will be charged at 3.7644 cents/m3. The next 150 m3 will be charged at 3.5579 cents/m3. Anything above 250 m3 will be charged at 3.0694 cents/m3.