2012 Mar 19 3:29 PM
Hi experts,
I got a problem calculating a price using the daily time control. I need to use it and I cannot change in monthly logic.
This is an example:
Price per month: 4,14166667
Price per month (round 2): 4,14
Meter reading 02:
12 april 2011 --> 12 days
Quota = 12 / 30 = 0,40000000000000 (round 14)
ROUND(0,40000000000000 * 4,14166667; 2) = 1,66
Meter reading 01:
30 april 2011 --> 18 days
Quota = 18 / 30 calculated as (1-0,40000000000000) = 0,60000000000000 (round 14)
ROUND(0,60000000000000 * 4,14166667; 2) = 2,49
2,49 + 1,66 = 4,15 (error!!)
Is there a way in order to guarantee that the final sum is exactly as defined for the monthly price?
This problem is getting me mad!!
Thanks
2012 Mar 20 2:17 PM
Hi,
If I understood, you are using:
- time depended price (operand type TPRICE) with basis 1 month, or flat price (LPRICE) with basis 1 month
- in the rate step you are using period control "00 - To the day".
The period control 00 - To the day is calculating the amount always with time basis 365 days.
It means, that the calculation looks like:
12 days / 365 * (tprice * 12) = 1,63
If you would like to use monthly price, you should use another period control rule, for example 01 - Month based using key date.
Vlado