NETLINK Posted June 12, 2016 Report Posted June 12, 2016 I'm having some trouble with the calculations of VAT/Sales Tax and invoice totals. For example, I have 2 line items... Line Item 1 -- Quantity 3 -- Unit Price 32.50 -- Cost 97.50 Line Item 2 -- Quantity 3 -- Unit Price 32.50 -- Cost 97.50 Subtotal: 195.00 VAT @ 23.0000%: 44.86 Total: 239.86 The subtotal is 195.00, which is correct. The sales tax on this invoice is 44.86, which is incorrect. 23% of 195.00 is 44.85, so the invoice total should be 239.85, not 239.86. The problem seems to be that the VAT/tax is being calculated on a per line basis, rounded, and then summed up. However, it should be calculated on the subtotal and then rounded. Or calculated on a per line basis, summed up, and then rounded. 23% of 97.50 is 22.425 Rounded, that becomes 22.43. 22.43 x 2 = 44.86. The rounding occurs before the addition. It should occur after the addition. Installed Version 3.6.1 jobplease 1 Quote
NETLINK Posted June 12, 2016 Author Report Posted June 12, 2016 I guess since it's possible to enable or disable sales tax on a per line basis, the tax cannot be calculated based on the subtotal, but then, the rounding should only occur after the total sales tax has been summed up. jobplease 1 Quote
jobplease Posted June 12, 2016 Report Posted June 12, 2016 That looks about right here also. Good pick up. NETLINK 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.