johnnymke Posted December 17, 2004 Share Posted December 17, 2004 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... Quote Link to comment Share on other sites More sharing options...
johnnymke Posted December 17, 2004 Author Share Posted December 17, 2004 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... Quote Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2004 Share Posted December 17, 2004 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... <{POST_SNAPBACK}> In Ohio, you need to calculate the sales tax based on the delivery address. Quote Link to comment Share on other sites More sharing options...
johnnymke Posted December 17, 2004 Author Share Posted December 17, 2004 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. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
ibookie Posted January 10, 2005 Share Posted January 10, 2005 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..... Quote Link to comment Share on other sites More sharing options...
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.