Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default need help with tax calculations

    I'm doing some customizations to a non-stock shipping module and am running into a little problem. When shipping is configured to be taxed it is coming in off by a penny sometimes, it's a rounding issue and after a bunch of testing I have narrowed it to the tax added from shipping. So, on the checkout page the combined tax in the cart is off if it should be rounded up, such as $4.2567 is what is calculated at the configured tax rate. It's returning $4.25 instead of $4.26. I need to know where the shipping tax is added to the total tax so I can see if it's using zen_round. I've been looking around for hours and hours now trying to figure out where the shipping tax is calculated and also where it's added to the product tax to get the total. It has been a really long time since I did some serious zen coding and I am pretty rusty with the structure of how it all ties together. I've been looking in class and function files but haven't located it.

    Can you please point out which file(s) I need to be checking for the shipping tax calculation and where it's added to the cart tax?

    Zen Cart and it's community are the best!!

  2. #2
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: need help with tax calculations

    I believe it is calculated in

    /includes/modules/order_total/ot_shipping.php

  3. #3
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: need help with tax calculations

    Thanks, I had looked there but after even more testing I see it's not the shipping, it's when items are on sale. I thought I had that issue worked out, and it is with the displayed price of the sale items. I also had altered the various number_format functions in functions_prices to round to 2 decimal places so I am not sure where I am getting this issue.

    Zen Cart and it's community are the best!!

  4. #4
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: need help with tax calculations

    Quote Originally Posted by lankeeyankee View Post
    Thanks, I had looked there but after even more testing I see it's not the shipping, it's when items are on sale. I thought I had that issue worked out, and it is with the displayed price of the sale items. I also had altered the various number_format functions in functions_prices to round to 2 decimal places so I am not sure where I am getting this issue.
    It is kind of hard to know without knowing more about your site and what code you changed. If you can answer some of the posting questions it would help.

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Re: need help with tax calculations

    just to muddy the waters further, but maybe its related...
    https://www.zen-cart.com/showthread....ing-cart-price
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  6. #6
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: need help with tax calculations

    Or see if this is related or might offer some insight....

    https://www.zen-cart.com/showthread....error%29/page2
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  7. #7
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: need help with tax calculations

    Thanks. Yes, I have looked at both threads and had thought Frank's fix would do it. The strange thing is, after a bunch more testing it seems random. I can't make any sense of the issue, I think it's one thing then after more testing show that it's not then come up with another idea and that's not it either. Hahaha. I have decided since it's not happening every time, on one item on special I get the error with one item but not on multiples of the item regardless of quantity the tax is always rounding correctly. My cart is highly customized so it would be difficult to pin it down and for the 10 or 20 cents per quarter difference it's not worth it to me since we are undercharging the tax and I can just make it up when paying it to the state.

    Thanks for the suggestions, I was hoping for an easy fix but it seems it's going to take more effort than it's worth to get to the bottom of it and I have already spent probably 8 or more hours on it so far. Like a dog with a bone I just didn't want to give it up hahahaha

    Zen Cart and it's community are the best!!

 

 

Similar Threads

  1. Need help with Ohio's Sales Tax Web Service
    By jgarvas in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 11 Aug 2010, 03:35 PM
  2. i need help with shipping calculations!!
    By shawnstar86 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 Jun 2009, 08:04 AM
  3. Need help with Tax Rates and SQL
    By pleitch in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 19 Sep 2006, 02:15 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR