Dear Dale,
When I sell 3 items costing 2.99 per item including VAT (pricing set on including VAT), the total I get on the receipt is 8.98 .....
Best regards,
rounding mistake when using including VAT feature
Moderators:daleadmin, Dale Harris, Alan, Andrew
- Attachments
-
- rounding.jpg (110.08 KiB) Viewed 3915 times
Re: rounding mistake when using including VAT feature
Jake69,
This is a rounding error possibly cashed by using INT instead of FIX somewhere in the program. An interesting fact is that for the problem to occur the price must be an odd amout and you have to sell an odd amount of pieces. So a quick fix for you would be to sell the whatever at either 2.98 or 3.00 or only sell and even number of pieces.
This of course can be fixed for you. However since the computation of tax in the program can be compared to balancing an aircraft carrier on the point of a pin this means that the tax calculation for something else will probably go horribly wrong. This is how I fix a tax problem.
1. I find exactly what is causing the problem in a hundreds of lines of code.
2. I find some way to fix the problem.
3. I then test the problem using every possible way of setting up taxes with lots of different tax rates.
4. I ring up hundreds of sales while also calulating the sales on paper to see if they are correct. I do this for each possible set of tax parameters.
5. When I inevitably do find an error I go back to step #1.
6. END (Sure, like you can ever get here?)
This process takes forever. So while I may eventually fix this while not totally screwing up someone else's taxes it will be a while and will not be in the next version 7.02.
Dale
This is a rounding error possibly cashed by using INT instead of FIX somewhere in the program. An interesting fact is that for the problem to occur the price must be an odd amout and you have to sell an odd amount of pieces. So a quick fix for you would be to sell the whatever at either 2.98 or 3.00 or only sell and even number of pieces.
This of course can be fixed for you. However since the computation of tax in the program can be compared to balancing an aircraft carrier on the point of a pin this means that the tax calculation for something else will probably go horribly wrong. This is how I fix a tax problem.
1. I find exactly what is causing the problem in a hundreds of lines of code.
2. I find some way to fix the problem.
3. I then test the problem using every possible way of setting up taxes with lots of different tax rates.
4. I ring up hundreds of sales while also calulating the sales on paper to see if they are correct. I do this for each possible set of tax parameters.
5. When I inevitably do find an error I go back to step #1.
6. END (Sure, like you can ever get here?)
This process takes forever. So while I may eventually fix this while not totally screwing up someone else's taxes it will be a while and will not be in the next version 7.02.
Dale
Who is online
Users browsing this forum: No registered users and 196 guests