Hello everybody
I use Hoteldruid without problem on my website but since the last update (2.0.0 and 2.0.1) I have a problem with the tax calculation.
1/ The problem appears when there is a rounded apply. I'm in Canada and I had 2 taxes on the base rate: ex
******************************************************************************
Rate type: 2 Bedroom Deluxe (465 CAD$ ) .
Single extra cost "GST" (5% of total multiplied by 1: 23.25 CAD$ ).
Single extra cost "PST" (10% of total multiplied by 1: 48.82 CAD$ ).
Total to be paid: 537.7 CAD$
*******************************************************************************
Total amount is wrong, the right price should be 537.07 CAD$
If I don't have taxes with decimal (ex .15.00), no problem. Trouble is decimals.
2/ Currently, for a tax = $ 12,231 CAD, the rounding will be 12. $ 23 CAD, this value is right.
But if tax = $ 12,237 CAD, again the rounding will be a $ 12.23 CAD when it should be for $ 12.24 CAD.
For online reservation, it's a problem. If anyone has a solution to these problems, I'll appreciate.
Thank you and congratulations for the work.
Olivier
Malpeque Cove Cottages
Tax rounded error
Moderator: marco
Re: Tax rounded error
Hello Olivier,
the problem should be solved in hoteldruid 2.0.3.
Regards,
Marco
the problem should be solved in hoteldruid 2.0.3.
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Re: Tax rounded error
The rental tax rate in US North Carolina is 11.75%. Since the application does not allow us to enter that percentage, we handled it by creating an "Extra Cost" item. NC Tax. However, we have found that the rounding issue discussed here also affects the Extra Cost calculations. So, in our case, the tax when added to the amounts, does not round properly. This causes us to many times end up with amounts that should be 94.07, to show as 94.06.
Any help would be appreciated.
--(scott)
Any help would be appreciated.
--(scott)
Re: Tax rounded error
Stretching my mind back a few years (1980, 1981??) ...
-- I believe the computer course was called "Numerical Computational Methods" and the course book was entitled "Numerical Calculus".
There was a whole section surrounding how to determine the number of decimal places needed for calculation variables, so that the result was accurate to a particular number of decimal places.
Basically, if you want accuracy to two decimal places, then the calculations would need to be performed on 3-4 decimal places (accuracy to the 0.01 place, calculations must be done at least to 0.001 or 0.0001 places).
This is the type of thing:
-- http://www.symphony-consulting.com/blog ... -rounding/
----- (a lot to say, do your calculations with more decimal places than you want final accuracy to be)
-- http://cr4.globalspec.com/thread/27880/ ... lculations
----- (to cut down on decimal round-off errors during calculations, you can multiply by 1000, do the calculations, and then divide by 1000)
-- http://encyclopedia2.thefreedictionary. ... l+calculus
-----
-- (mary)
-- I believe the computer course was called "Numerical Computational Methods" and the course book was entitled "Numerical Calculus".
There was a whole section surrounding how to determine the number of decimal places needed for calculation variables, so that the result was accurate to a particular number of decimal places.
Basically, if you want accuracy to two decimal places, then the calculations would need to be performed on 3-4 decimal places (accuracy to the 0.01 place, calculations must be done at least to 0.001 or 0.0001 places).
This is the type of thing:
-- http://www.symphony-consulting.com/blog ... -rounding/
----- (a lot to say, do your calculations with more decimal places than you want final accuracy to be)
-- http://cr4.globalspec.com/thread/27880/ ... lculations
----- (to cut down on decimal round-off errors during calculations, you can multiply by 1000, do the calculations, and then divide by 1000)
-- http://encyclopedia2.thefreedictionary. ... l+calculus
-----
I think that it would be accurate to say that if you NEED to be accurate to two decimal places, you cannot simply do your calculations with variable that only have two decimal places.An otherwise satisfactory computational process may become useless, because of the amplification of rounding errors. A computational process is called stable to the extent that its results are not spoiled by rounding errors. The extended calculations involving millions of arithmetic steps now possible on computers have made the stability of a computational process a prime consideration.
-- (mary)
Re: Tax rounded error
The rounding is done by php functions, so no need to have more decimals. The error won't propagate as the value is not even stored in the database, it is calculated each time it is shown. At least from version 2.0.3 it's possible to insert percentages with 2 decimals for taxes.
Regards,
Marco
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Re: Tax rounded error
Okay, I'm confused. When do you anticipate us being able to enter 11.75% tax rate? I can enter 6.75% or 11.7%, but not 11.75%, which is what we need.
In extra costs, we can enter 11.75% for tax rate
In defining over-all tax:
Insert >> Rate
Go down to "Taxes" area:
Field only allows 3 digits total (combined both before and after decimal).
I can enter 6.75% or 11.7%, but not 11.75%
Perhaps when we can use the actual tax field for the tax, the occasional $0.01 (1 cent) error will no longer be there.
In extra costs, we can enter 11.75% for tax rate
In defining over-all tax:
Insert >> Rate
Go down to "Taxes" area:
Field only allows 3 digits total (combined both before and after decimal).
I can enter 6.75% or 11.7%, but not 11.75%
Perhaps when we can use the actual tax field for the tax, the occasional $0.01 (1 cent) error will no longer be there.
Re: Tax rounded error
Marco:
Thanks for fixing this. We are now able to enter 11.75 % tax amount in the tax field on Rates.
--
Mary
Thanks for fixing this. We are now able to enter 11.75 % tax amount in the tax field on Rates.
--
Mary