- Posts: 34
- Thank you received: 0
Tax Calculation Error
14 years 10 months ago #30559
by SD
Tax Calculation Error was created by SD
Joomla 1.7 and Hikashop 1.5.3.
I have 36 quantity of a $7.99 product.
The tax rate is 13%.
The subtotal is $287.64 (correct)
The amount with tax calculated is $37.44. This is incorrect; the tax is actually 37.39 when calculated with a calculator.
Can anything be done to correct this? With larger orders this difference between the calculated tax and actual tax will become far too large. Even $0.05 is too much. It should be perfect everytime.
I noticed in the backend product edit display it rounds up the amount with tax. In this case, instead of using the correct calculated amount ($9.0287) it uses $9.03. This is fine for smaller quantity orders, but becomes a problem with larger orders. Is there any way for the "Price with tax" field in the backend product add/edit page can be calculated to a greater number of decimal places and not rounded up?
I have 36 quantity of a $7.99 product.
The tax rate is 13%.
The subtotal is $287.64 (correct)
The amount with tax calculated is $37.44. This is incorrect; the tax is actually 37.39 when calculated with a calculator.
Can anything be done to correct this? With larger orders this difference between the calculated tax and actual tax will become far too large. Even $0.05 is too much. It should be perfect everytime.
I noticed in the backend product edit display it rounds up the amount with tax. In this case, instead of using the correct calculated amount ($9.0287) it uses $9.03. This is fine for smaller quantity orders, but becomes a problem with larger orders. Is there any way for the "Price with tax" field in the backend product add/edit page can be calculated to a greater number of decimal places and not rounded up?
Please Log in or Create an account to join the conversation.
14 years 10 months ago #30571
by nicolas
Replied by nicolas on topic Re: Tax Calculation Error
The product price's tax is first added to the unit price and rounded. Then, the quantity is multiplied to that value.
So:
7.99*1.13=9.0287
rounded it becomes: 9.03 for the price with taxes of one product
Then, 9.03-7.99 = 1.04 of taxes for each product
1.04 * 36 = 37.44 of taxes for all the products
Thus, the calculation is perfect.
The thing is that there are two ways to calculate taxes. Usually, ecommerce application calculate taxes like that while accounting applications calculate taxes like you want.
We've created a small plugin which changes the calculation to have the taxes calculated like you want:
www.hikashop.com/en/support/forum/4-how-...-problems.html#26364
So:
7.99*1.13=9.0287
rounded it becomes: 9.03 for the price with taxes of one product
Then, 9.03-7.99 = 1.04 of taxes for each product
1.04 * 36 = 37.44 of taxes for all the products
Thus, the calculation is perfect.
The thing is that there are two ways to calculate taxes. Usually, ecommerce application calculate taxes like that while accounting applications calculate taxes like you want.
We've created a small plugin which changes the calculation to have the taxes calculated like you want:
www.hikashop.com/en/support/forum/4-how-...-problems.html#26364
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43113
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
Hello Nicolas, I applied this Tax fix for US tax purposes, but it does not display the correct tax in the tax line - the total cart final price is correct.
Can you help with this?
Can you help with this?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43250
by nicolas
Replied by nicolas on topic Re: Tax Calculation Error
Did you publish the plugin ?
Could you explain why you think it doesn't work ?
Could you explain why you think it doesn't work ?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43271
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
I am attaching a picture of the cart. If you look at the sales tax line, it appears to be per unit. It should show the total tax on the order so all of the fields add up, and of course pass those values to the back end order so that everything is in sync.
Thanks in advance,
Mike
P.S. I changed the custom fields from country to state, and state to county tax zone, and also added an additional country field. Will those changes break the payment plug ins?
Thanks in advance,
Mike
P.S. I changed the custom fields from country to state, and state to county tax zone, and also added an additional country field. Will those changes break the payment plug ins?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43274
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
By the way, i used the file "custom_quantity_tax-20110929-2.zip" for the plugin...
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43445
by nicolas
Replied by nicolas on topic Re: Tax Calculation Error
Could you try to turn off the "show detailed taxes" option in the Display tab of the configuration ?
For the Payment plugins, you might have some problems with some of them as the country code might be rejected. You'll have to test that...
For the Payment plugins, you might have some problems with some of them as the country code might be rejected. You'll have to test that...
The following user(s) said Thank You: Mike2001
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43455
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
LOL, You're Brilliant!
Please Log in or Create an account to join the conversation.
14 years 6 months ago - 14 years 6 months ago #43523
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
Ok, I noticed the generated order email includes tax at the detail product level and I want to eliminate that. I upgraded to the Business version to accommodate this need.
What is the easiest way to eliminate the detailed tax in the email?
Can I set the system to not display detail product tax on all screens?
Thanks again for all the help...
(the cart currently displays this exactly the way I want the email, see pic below)
What is the easiest way to eliminate the detailed tax in the email?
Can I set the system to not display detail product tax on all screens?
Thanks again for all the help...
(the cart currently displays this exactly the way I want the email, see pic below)
Last edit: 14 years 6 months ago by Mike2001.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43700
by nicolas
Replied by nicolas on topic Re: Tax Calculation Error
There is no global option for taxes.
You will have to edit the emails via the menu System>Emails and change the code:
$item->order_product_price+$item->order_product_tax
by:
$item->order_product_price
and the code:
$item->order_product_total_price
by:
$item->order_product_total_price_no_vat
You will have to edit the emails via the menu System>Emails and change the code:
$item->order_product_price+$item->order_product_tax
by:
$item->order_product_price
and the code:
$item->order_product_total_price
by:
$item->order_product_total_price_no_vat
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43735
by Mike2001
Replied by Mike2001 on topic Re: Tax Calculation Error
Works like a charm, thanks again...
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds