1

I have my tax set to calculate tax on total however am getting slight miss matches in edge cases with Sage Accounts 50. From what i can tell this calculates on row total. So have changed this and flushed my cache however the issue still occurs.

This is how i believe each method to work and how i think Sage is working:

Row Calculation

Units   Item            Row Ex Vat     Row Total
4       Example Item    57.56          69.072 (69.07)
4       Example Item    57.56          69.072 (69.07)
4       Example Item    57.56          69.072 (69.07)
Total Ex Vat   172.68
Total Inc Vat  207.21

So for each row you calculate the Vat on the row total. So (14.39 x 4) x 1.2 = 69.072 and then round to nearest pound giving 69.07 for each row. This gives the same total of 207.21 that Sage 50 Accounts gives and what i want Magento 2 to calculate like.

Unit Calculation

Units   Item            Ex Vat     Inc Vat         Row Total
4       Example Item    14.39      17.268 (17.27)  69.08
4       Example Item    14.39      17.268 (17.27)  69.08
4       Example Item    14.39      17.268 (17.27)  69.08
Total Ex Vat   172.68
Total Inc Vat  207.24

This is how i feel unit calculation works where the tax calculation is based on units. So 14.39 x 1.2 = 17.268 and then rounded to nearest penny giving 17.27 for each unit total. This then gives a total of 207.24 for all units.

Total Calculation

Units   Item            Ex Vat     Inc Vat         Row Total
4       Example Item    14.39      17.268          69.072
4       Example Item    14.39      17.268          69.072
4       Example Item    14.39      17.268          69.072
Total Ex Vat   172.68
Total Inc Vat  207.216 (207.22)

For total calculation i feel there should be no rounding until all the totals are calculated. This works like so i believe. (14.39 x 12) x 1.2 giving 207.216 which then rounds to nearest penny so 207.22. I feel like Magento 2 always works like this for me however, no matter how i set in admin.

Actual Question

Can anyone suggest what i may have got wrong anywhere or how can i set Magento to work on row totals as i have described. I have set within Stores > Configuration > Sales > Tax > Tax Calculation Method Based On > Row Total and flushed the configuration tax however my total in this example always shows as 207.22?

Update

Flushing all my caches seems to have fixed my issue here. I was previously just flushing configuration so may be one of the others needed flushing too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.