Welcome to the world of VAT calculations. Unfortunately, the less decimal places the more likely this is to occur if your numbers aren't cleanly multiplyable/divisible by the VAT values.
That aside, I think your example is wrong.
If you have an item and your Price including VAT is £5.99
The Pre-VAT price is 5.99 / 1.2 = £4.99 (2.d.p.)
Your VAT is therefore £1 (2.d.p.) (Or £0.9983......)
Because of rounding you will always get a bit of a discrepancy when showing these breakdowns I'm afraid.
UK Vat - Getting the Actual VAT due, and Item Price
Running Umbraco 7.4.1, TC 3.0.7
I have enabled TeaCommerce to "Prices include VAT"
I have an item which is £6.99
TC XML order, totalprice is showing:
**vatFormatted: £1.17
formatted: £5.83
withVatFormatted : £6.99 **
Add (vatFormatted + formatted) together and you get £7. Is this a bug?...
... or is there another way to get the true amounts to 2 dec places without having to resort to an inline calc of (withVatFormatted - vatFormatted)
Currently doing something like this...
Welcome to the world of VAT calculations. Unfortunately, the less decimal places the more likely this is to occur if your numbers aren't cleanly multiplyable/divisible by the VAT values.
That aside, I think your example is wrong.
If you have an item and your Price including VAT is £5.99 The Pre-VAT price is 5.99 / 1.2 = £4.99 (2.d.p.)
Your VAT is therefore £1 (2.d.p.) (Or £0.9983......)
Because of rounding you will always get a bit of a discrepancy when showing these breakdowns I'm afraid.
Should say £6.99 :-) ... a small fundamental typo opppsie on my part - Sorry! :)
Would be cool if TC could just give the total amount minus the rounded VAT though.
Sub Total (Excluding VAT) : £5.82
VAT : £1.17
Total : £6.99
What if you dont use the formatted values, but the decimal values - they should be pretty correct. The formatted values are properly rounded.
is working on a reply...