Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sales Tax to Billing Address


johnnymke

Recommended Posts

Hi-

 

I never bothered to notice, but a customer of mine pointed this out: The sales tax is only applied to the shipping address, not the billing address. In talking to my CPA, it seems, at least in my state, sales tax must be applied to person who pays for the sale, regardless of the shipping address.

 

My question then is this: Is my site the only one not calculating this properly? Also, what could I do to fix this? Thanks everyone...

Link to comment
Share on other sites

Update:

 

I found two areas that I think this is calculated from (maybe someone can enlighten me)

 

in catalog/includes/modules/order_total/ot_shipping.php

CODE

$shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

$shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

 

$order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

$order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

$order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

 

if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

}

 

 

This certainly looks like tax is based off of the delivery address exclusively...How could I port this to the billing address if thats the case?

 

OR

 

catalog/includes/classes/order.php

 

CODE

 

$tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'");

$tax_address = tep_db_fetch_array($tax_address_query);

 

 

 

Should I modfy this query?

 

I also found this advice but I cannot find the referenced code anywhere in order.php:

 

QUOTE

I've found a solution for the tax calculation being based in the shipping address instead of the billing address!

In the catalog/includes/classes/order.php find the

 

$tax_address_query

 

replace it by the $billing_address_query (find it a couple of lines before).

In the following line:

$billing_address = tep_db_fetch_array($tax_address_query);

 

replace it by:

$billing_address = tep_db_fetch_array($billing_address_query);

 

And that's it!

You now have the tax calculated according to the billing address.

 

 

Since its a live store I dont want to mess around to much without knowing for sure...

 

Im not the only one taking consideration to this issue...

 

http://www.oscommerce.com/forums/index.php?showtopic=66450

 

Calculating sales tax on the shipping address is not sound since the BILLING address is the location/zone/whatever that the payee resides in, and therefore would be subject to taxation. However, I dont want them taxed TWICE, once for billing and again for shipping so you see the issues here...

Link to comment
Share on other sites

Calculating sales tax on the shipping address is not sound since the BILLING address is the location/zone/whatever that the payee resides in, and therefore would be subject to taxation. However, I dont want them taxed TWICE, once for billing and again for shipping so you see the issues here...

 

In Ohio, you need to calculate the sales tax based on the delivery address.

Link to comment
Share on other sites

Right, but what if the billing address differs from the delivery address?

 

Considering Im from Wisconsin, and I buy something from a Wisconsin-based sales operation, and then ship it to Granny in Michigan, I would still be charged the sales tax...since both I and the business are from Wisconsin. It doesnt make sense to figure the sales tax based on the delivery address all the time....

 

In Ohio, you need to calculate the sales tax based on the delivery address.

Link to comment
Share on other sites

  • 4 weeks later...

Mine doesn't even show the tax at all... Can anyone tell me how to get oscommerce to add the tax in?

 

Any help is greatly appreciated. We are ready to launch, but I can't get the tax to show up for in state purchases.

 

Thanks.....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...