Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40
  1. #1
    Join Date
    Nov 2007
    Posts
    125
    Plugin Contributions
    0

    Default Sales tax calculations incorrect.

    I am using ZenCart 1.3.7 and am not seeing any error messages. This is an issue with calculations of sales tax.

    ZenCart's method of calculating tax appears to be to this (based on my experiments):

    • Take each line item in an order
    • Calculate the tax on that line, truncating to 2 significant figures
    • Add all the calculated subtaxes together to produce the total tax on the order


    On my web site, it's possible to order up to 10 different items, all of which cost $6. The sales tax rate I use (for California) is 8.75%. 8.75% of $6 is $0.5250, which should produce a tax of $5.25 on this $60 order. However, because ZenCart truncates the individual tax figures instead of rounding them, or instead of calculating the tax once on the full order amount, when it adds up 10 instances of $0.52, it produces a tax of $5.20. On orders with a large number of small items, this process will unpredictably underestimate the sales tax. I can submit spreadsheets demonstrating the calculations if desired. When I order 3 copies of a $20 item, the sales tax is correctly calculated.

    I respectfully request a fix in which more than 2 significant figures are used to calculate sales tax, and rounding rather than truncation is used for display. Undercollecting the sales tax could subject our site to penalties from the CA State Board of Equalization.
    hedera

    Nature bats last.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sales tax calculations incorrect.

    Just adding a link to related discussion: http://www.zen-cart.com/forum/showth...200#post549200


    By way of comment, the problem is worse when tax rates are of a .5 or .75 percentage instead of just a plain integer value.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2007
    Posts
    125
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    Yes, the related discussion was my original thread on the subject, detailing how I've worked this out.

    Unfortunately, a .75 tax rate is what I have to deal with. I don't want to encourage the state of California to raise it to 9% just to make the calculations easier!
    hedera

    Nature bats last.

  4. #4
    Join Date
    Oct 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    As I've posted on the other thread that you (hedera) began and which DrByte referenced - I am having this exact problem. Using Quickbooks the numbers do not match up. Tax on an order should be computed by totaling the items - not on a line item basis as that can return an under valued number. I have not found a solution for this - is there one?

  5. #5
    Join Date
    Nov 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    I've noticed the same problem in a few of my sales when there is a discount and the sales tax is then calculated incorrectly. I haven't been able to find any postings where this has been fixed. Are we all stuck with this or did anyone find a solution?

  6. #6
    Join Date
    Oct 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    Dr Byte - Is there a way to have zen cart compute tax on the order sub total before shipping instead of on each item and then adding the tax for each item up? This seems to be a bug that should be corrected. Am I mistaken?

  7. #7
    Join Date
    Oct 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    Should I be posting this in the bug area?

  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    You can set the number of decimal places to 3 instead of two -- see Admin / Localization / Currencies. This causes Zen Cart to use 3 decimal places instead of 2 for calculations, but has the unfortunate side effect of showing 3 digits after the decimal everywhere on the site.

    So Zen Cart can do the right thing, but may display wrongly. The issue then is to have separate settings in Admin for the decimal places used in calculations and the decimal places displayed. I have no doubt this is on the To Do list displayed prominently in the lobby of Zen Cart's vast and palatial headquarters.

    HTH

    Rob

  9. #9
    Join Date
    Oct 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    thanks for the info rstevenson. Will this actually solve the problem even though it might not look too good?

  10. #10
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Sales tax calculations incorrect.

    Well, it's a simple change to make in Admin, so make the change then run some test orders to see.

    It will cause the item costs to be truncated at 3 digits instead of 2 (they still won't be rounded properly) so that will make the addition correct(er), though the fundamental problem -- adding tax to each item rather than to the total -- remains unchanged. At least with 3 digits you'll end up with the right number of cents (if you mentally round the third digit yourself.)

    This works fine for those of us who use a disconnected accounting system, but would still cause a small problem -- never more than 1 cent, I think -- for anyone who is using an accounting system directly connected to ZC.


    Rob

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Replies: 4
    Last Post: 17 Apr 2016, 09:04 PM
  2. Incorrect UK tax calculations on admin invoice. What's going wrong?
    By Dunk in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 17 Aug 2010, 02:56 PM
  3. coupons and incorrect tax calculations
    By jdubs in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 8 Jun 2009, 07:38 PM
  4. Incorrect tax calculations
    By RobWUK in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 5 Jun 2008, 08:04 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