custompresta Posted November 12, 2010 Share Posted November 12, 2010 The tax is calculated wrong, depending on the product quantity.Sample 1:Product incl. 19% tax = 13.48Cart quantity 6Total incl. tax = 80.88Tax in Cart = 12.90Total excl. tax in cart = 67.98But must be:Tax in Cart = 12.91(80.88 / 119 * 19) = 12.9136Total excl. tax in cart = 67.97(80.88 / 119 * 100) = 67.9663Total incl. tax in cart = 80.88(12.9136 + 67.9663) = 80.8799----------------------------------------Sample 2:Product incl. 19% tax = 13.48Cart quantity 5Total incl. tax = 67.40Tax in Cart = 10.75Total excl. tax in cart = 56.65But must be:Tax in Cart = 10.76(67.40 / 119 * 19) = 10.7613Total excl. tax in cart = 56.64(67.40 / 119 * 100) = 56.6386Total incl. tax in cart = 67.40(10.7613 + 56.6386) = 67.3999----------------------------------------Sample 3:Product incl. 19% tax = 13.48Cart quantity 4Total incl. tax = 53.92Tax in Cart = 8.60Total excl. tax in cart = 45.32But must be:Tax in Cart = 8.61(53.92 / 119 * 19) = 8.6090Total excl. tax in cart = 45.31(53.92 / 119 * 100) = 45.3109Total incl. tax in cart = 53.92(8.6090 + 45.3109) = 53.9199---------------------------------------So as you can see, the total incl. tax is right. But the total excl. tax and the the tax itself is wrong calculated.And here is a right calculated one, with 2 products in cart.It also is correct with 1 product in cart.Sample 4:Product incl. 19% tax = 13.48Cart quantity 2Total incl. tax = 26.96Tax in Cart = 4.30Total excl. tax in cart = 22.66This is calculated right:Tax in Cart = 4.30(26.96 / 119 * 19) = 4.3045Total excl. tax in cart = 22.66(26.96 / 119 * 100) = 22.6554Total incl. tax in cart = 26.96(4.3045 + 22.6554) = 26.9599 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now