Tax Calculation Error

  • Posts: 34
  • Thank you received: 0
12 years 5 months ago #30559

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?

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 5 months ago #30571

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

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43113

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?

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 1 month ago #43250

Did you publish the plugin ?

Could you explain why you think it doesn't work ?

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43271

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?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43274

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.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 1 month ago #43445

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...

The following user(s) said Thank You: Mike2001

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43455

LOL, You're Brilliant!

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43523

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)

Attachments:
Last edit: 12 years 1 month ago by Mike2001.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 1 month ago #43700

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

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 2
12 years 1 month ago #43735

Works like a charm, thanks again...

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum