Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tennessee Sales Tax


aultl

Recommended Posts

I am in the process of setting up a store. However somebody in my state, Tennessee, royally screwed up our tax calculations and I need to figure out how to implement this in osCommerce. Here goes...

 

If the item being purchased is <= $1600.00 we charge 9.25% total sales tax. Example:

Purchase = $40.00 
Tax = (9.25% * $40.00) = $3.70
Total price = $43.70

 

If the item being purchased is >= $1600.01 but <= $3200.00 we charge (9.25% * $1600.00) + (9.75% * (purchase total - $1600.00) total sales tax. Example:

Purchase = $1800.00
Tax = (9.25% * 1600.00) + (9.75% * $200.00) = $167.50
Total price = $1967.50

 

If the item being purchased is >=$3200.01 we charge 9.25% for $1600 + 9.75% for $1600 + 7.0% for the remainder total sales tax. Example:

Purchase = $3300.00
Tax = (9.25% * $1600) + (9.75% * $1600.00) + (7.00% * $100.00) = $311.00
Total price = $3611.00

 

Anybody know how to implement this in osCommerce or even where to start?? Thanks,

 

Aultl

Link to comment
Share on other sites

I believe you are reading to much into the Tennessee sales tax law. What exactly do you sell? I briefly reviewed the Tennessee Department of Revenue website and read about their sales tax laws, since they did seem a little confusing I was curious.

 

The Tennessee state sales tax is 7%, plus an additional 1-2.75% local tax depending on where your business is based. There is a contribution that will do this for you. The local tax is only valid for up to the first $1600 of the price of a single tangible good. After that there is a 2.75% tax up to $3200.

 

I would double check with an accountant and your dept. of revenue regarding what you need to collect exactly.

 

If what you say is true and you have double checked, then I would go ahead and add the contribution to include the local tax, then you will need to make some code changes to work out the other tax rates. But, if your items are less $1600 and the chances of a customer running up a $1600 bill are slim, then I would not worry about anything else.

Link to comment
Share on other sites

We sell jewelry and this is the way our current POS in-store calculates tax as descibed by our CFO. The items we sell range from $100.00 dollars to $100,000.00 dollars, only selling items less than $1600.00 won't work (I already thought of that :-)). This is the tax rate we charge anyone that lives in the state of Tennessee, if the customer phones the order in because they live out of state and we ship it to an out of state address we do not charge sales tax. However if the customer lives out of state and picks up the merchandise in-store we have to charge Tennessee sales tax.

 

Aultl

Link to comment
Share on other sites

BTW, You are correct sales tax is 7% plus 2.25% for a total of 8.25% because we are based in Knoxville, however last year the state?senate?? voted a temporary 1% increase across the state. This is when they changed to the >< $1600 "sliding"?? tax scale.

 

Aultl

Link to comment
Share on other sites

@vasttech:

Re-reading your post we are saying the exact same thing. State(7%) + local (2.25%) for up to $1600 and then state (7%) + contribution (2.75%) for $1600 to $3200. Then there is the above $3200 tax that includes both the local (2.25%) and the contribution (2.75%). The problem is that osCommerce is only supporting two tax tables (the state and the contribution) and I need three, the only reason for this is because the local tax (2.25%) does not equal the contribution (2.75%) if the local tax and the contribution tax were equal the default tax rules would work fine..

 

ARRRRGH... see what I meant when I said the tax was screwed up??

 

Aultl

Link to comment
Share on other sites

Well, I fixed the sales tax problem I was having by modifying the ot_tax.php module.

 

ot_tax.php **BEFORE**:

   function process() {
     global $order, $currencies;

     reset($order->info['tax_groups']);
     while (list($key, $value) = each($order->info['tax_groups'])) {
       if ($value > 0) {
         $this->output[] = array('title' => $key . ':',
                                 'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
                                 'value' => $value);
       }
     }
   }

 

ot_tax.php **AFTER**:

   function process() {
     global $order, $currencies;

     reset($order->info['tax_groups']);
     while (list($key, $value) = each($order->info['tax_groups'])) {
       
       if($order->customer['state'] == 'TN') {
         $value = 0;
               
         for ($i=0, $n = count($order->products); $i <= $n; $i++) {
           $tax = 0;
                             
           if ($order->products[$i]['price'] > 1600.0000) {
             if (($order->products[$i]['price'] > 1600.0000) && ($order->products[$i]['price'] < 3200.0100)) {
               $tax = ((($order->products[$i]['price'] - 1600.0000) * .0975) + 148);    // $148.00 == ($1600.00 * 9.25%)
             } else {
               $tax = (($order->products[$i]['price'] * .0700) + 80);    // $80.00  == ($1600.00 * 2.25%) + ($1600.00 * 2.75%) 
             }
           
             if (strlen($key) < 21) 
                $key = $key . " + TN Contribution Tax (0.50%)";

           } else {
             $tax = ($order->products[$i]['price'] * .0925);
           }
          
           if ($order->products[$i]['qty'] > 1)
             $tax = $order->products[$i]['qty'] * $tax;
           
           $value += $tax;
               
         }
       }
       
       $order->info['tax']   = $value;
       $order->info['total'] = $order->info['shipping_cost'] + $order->info['subtotal'] + $order->info['tax'];
       
       if ($value > 0) {
           $this->output[] = array('title' => $key . ':',
                                   'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
                                   'value' => $value);
       }
     }
   }

 

 

Please let me know if there are any problems or questions...

Aultl

Link to comment
Share on other sites

I think I should explian this one piece of code to save questions later...

if (strlen($key) < 21)
               $key = $key . " + TN Contribution Tax (0.50%)";

 

On the checkout screen my tax description is "TN Sales Tax (9.25%)". If any of the purcahses are above $1600.00 and require charging of the contribution tax this if statement modifies the text to "TN Sales Tax (9.25%) + TN Contribution Tax (0.50%)".

 

My original string is 20 characters long so it will only add modify string once, just in case the user orders two products that are more than $1600.00. If you add this to your osCommerce installation you need to change the value of "21" to however long your standard tax description is.

 

Also this is only for stores located in Knoxville, TN and other towns where the standard sales tax is state tax (7.0%) + local tax (2.25%). You do not need to modify osCommerce if your city's local tax is 2.75%. Below is a link to the local tax rates in each city/county, but as it was explained to me you only charge for the city/county that you are based in, meaning if you live in Johnson City and bought something in Knoxville you would be charged Knoxville local tax rate (2.25%) not Johnson City local tax rate (2.50%).

 

Link: http://www.state.tn.us/revenue/pubs/taxlist.pdf

 

Aultl

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...