Hi! Thanks for your reply! I have it set to round at the subtotal level. But in this case there shouldn’t be any rounding at all so where is the error coming from?
Some quick backstory of a related error if you care to read about it, since it leads up to why this can’t (or shouldn’t) be a rounding error.
—–
Due to the way we have to submit our taxes I have to do some calculations with the unrounded tax numbers split up by tax class, which I export from the database. They aren’t completely unrounded of course, but the six decimal places are precice enough for my purposes. Or should be!
Only, the numbers are incorrect! For example, I had a total of €8.55 including €4,90 shipping taxed at 10%. That should have given a tax of 0.777273 but the exported tax was 0.781818. Completely wrong.
———-
I never could figure out where those numbers were coming from, so in desperation I changed ALL our prices so that the tax would never have more than two decimal places (with the exception of shipping and vouchers, which have three decimal places when calculated with 20% tax, since there is no total that works equally well for 10% and 20%)
If you take a look at the numbers in my first post, they are all strangely precice (5.28, 4.95, 35.09). That’s by design, all in order to only get a maximum of two decimal places of calculated tax.
5.28 includes a 10% tax of 0.48
35.09 includes a 10% tax of 3.19
4.95 includes a 10% tax of 0.45
And yet, in this order, when I apply the voucher of 5.28 it steals a cent from the total and everything is out of whack again. There should be zero rounding going on, so why is it doing this?
I’m seriously running out of ideas here ??