Results 1 to 10 of 659

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    After 8 hours of tweeking, I am a little closer. Tax is applied to the shipping, and appears to be in the total, However, the numbers displayed do not add up.

    Taxing based on: Shipping
    Taxing For Zone: 195
    Local Tax For:
    Confer LAPT30- $72.4:
    FL-Broward County - 4.344 @ 6.00
    76.744
    FL-Broward CountyTotal Tax = 4.344

    Tax on shipping: 1.2558

    $72.40 Sub-Total:

    $20.93 United Parcel Service (Ground):

    $4.34 FL-Broward County: (Does Not Include Shipping)

    $98.93 Tax on Shipping appears to be included)

    Any Thoughts on where to go would be appreciated?

    Thanks

    Jack

  2. #2
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    Quote Originally Posted by genochem View Post
    After 8 hours of tweeking, I am a little closer. Tax is applied to the shipping, and appears to be in the total, However, the numbers displayed do not add up.

    Taxing based on: Shipping
    Taxing For Zone: 195
    Local Tax For:
    Confer LAPT30- $72.4:
    FL-Broward County - 4.344 @ 6.00
    76.744
    FL-Broward CountyTotal Tax = 4.344

    Tax on shipping: 1.2558

    $72.40 Sub-Total:

    $20.93 United Parcel Service (Ground):

    $4.34 FL-Broward County: (Does Not Include Shipping)

    $98.93 Tax on Shipping appears to be included)

    Any Thoughts on where to go would be appreciated?

    Thanks

    Jack
    I'm having what I believe is the same problem.

    Example:
    Product subtotal: $34.00
    Shipping (UPS Ground): $13.15
    NY State sales tax (4%): $1.89
    Ulster county sales tax (4%): $1.89
    Total: $51.45

    The tax calculations appear correct. $34+$13.15= $47.15 x 4% = $1.89

    BUT! when you add $47.15 + 1.89 + 1.89 = $50.93 NOT $51.45

    There's a $0.52 discrepancy in the calculated final total. Interestingly enough the shipping amt. $13.15 x 4% = .526

    It looks like the local sales tax mod is adding in the tax on the shipping twice, but I can't quite see where that is happening. I'm using the files from 2.5.1 from June that you had sent me.

  3. #3
    Join Date
    Apr 2012
    Posts
    2
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    Mine was running 54 times. There's a stray end bracket in the PHP file causing the problem; it's the one that says endif apply local tax. That needs to be moved to below the shipping, order info, and update final total sections.

  4. #4
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    Could you be a little more specific? I think I see the extra bracket, but I'm not sure where you mean for it to go.

    Code:
                    //update order info totals 
                    $apply_tax_to_shipping = check_tax_on_shipping($taxrec['tax_shipping']);    
                    
                    if($apply_tax_to_shipping){
                    
                          $shipping_tax = zen_calculate_tax($order->info['shipping_cost'], $taxrec['tax']);
                          $order->info['shipping_tax'] += $shipping_tax;    
                          $tax_total_for_class  +=    $shipping_tax;
                    } // end if apply to shipping
                    
                    
                    // Update the final total to include tax
                    $order->info['total'] = $order->info['subtotal'] + $order->info['tax'] + $order->info['shipping_cost'] + $order->info['shipping_tax'];
                    
                    $showtax = $currencies->format($tax_total_for_class, true, $order->info['currency'], $order->info['currency_value']);
                    
                    $this->output[] = array(
                                    'title' => $taxdesc .':' ,
                                    'text' => $showtax,
                                    'value' => $tax_total_for_class);
                }Should the bracket go here instead?
                          
                } //end if tax total > 0 
                
                }  //end if apply local tax <- offending bracket?
           } //end foreach tax 
    
        } //end if local tax <> 0
        
    } //end function

  5. #5
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    I tried moving the bracket, that is not my problem as it made no difference.

    There's some error in the function or the loop that is causing the local tax on shipping to be added into the total twice.

  6. #6
    Join Date
    Apr 2012
    Posts
    2
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    You have a different version of the file than I do. I don't have if tax total >0 so I have no idea which side it should go on. Not that it really matters if it doesn't fix your problem.

  7. #7
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    I think I managed to fix my problem. It might not have been the right way, but the calculation is working properly now. I commented out line 109 on the ot_local_sales_taxes.php file (I'm using version 2.5.1 which I guess never actually got posted to the repository for download but it's available earlier in this thread. Posting the function below in case it helps someone else - or in case someone sees a flaw in my very rudimentary attempt.

    //update order info totals
    $apply_tax_to_shipping = check_tax_on_shipping($taxrec['tax_shipping']);

    if($apply_tax_to_shipping){

    $shipping_tax = zen_calculate_tax($order->info['shipping_cost'], $taxrec['tax']);
    //commented out line below to fix addition of shipping tax twice into order total
    //$order->info['shipping_tax'] += $shipping_tax;
    $tax_total_for_class += $shipping_tax;
    } // end if apply to shipping

  8. #8
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Idea or Suggestion Re: Local Sales Tax Mod - Support Thread

    Hello, in-case anyone is still using this, I am looking at updating this plugin to Zencart v1.5.0. So, if anyone has information on specific bugs that should be or have been resolved in the forum, please send then, I am hopping this update will not be too time consuming, but I need it for a store and thought others may like it as well. I am starting the update based upon the latest code I found posted in this forum and the updates that were on the plugins download site (v2.5, and v2.5.1). as a start to the update I have already created a Florida specific SQL file with counties and related zip codes as of 2012, and related uninstaller, I will post those here for anyone that would like them.

 

 

Similar Threads

  1. v151 Tax getting added twice after installing Local Sales Tax mod
    By RFree190 in forum General Questions
    Replies: 0
    Last Post: 19 Mar 2013, 05:10 AM
  2. v150 Problem with Local Sales Tax mod
    By pwithers in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jun 2012, 10:16 PM
  3. local sales tax mod not working
    By sharpie82 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 12 Dec 2011, 11:43 AM
  4. New York State Sales Tax by Zip Full Database for Local Sales Tax Mod 2011
    By SCHNiKEN in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 11 Apr 2011, 04:51 AM
  5. Local Sales Tax Mod and Reward Points Mod
    By retched in forum Addon Payment Modules
    Replies: 1
    Last Post: 9 Feb 2011, 02:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg