Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2008
    Posts
    22
    Plugin Contributions
    0

    Default Serious problem with VAT

    This is a little hard to explain, but I will try my best.

    On an invoice, Zen Cart (1.3.8a) displays the 'Total (inc)' price next to each product sold.

    Here the VAT appears to be calculated on an individual item, rounded, then multiplied by the quantity. As far as I know this is the 'correct' way to do this.

    But then underneath where the VAT total is shown, it is calculated based only on the subtotal (so not taking rounding into account!)

    This means the VAT shown next to the products will not always add up to the VAT total on an invoice, when large product quantities are involved, it can become a big difference.

    This appears to be a serious problem with Zen Cart's invoicing system.

    I apologize if this is a known issue, but are there any plans for a fix?

  2. #2
    Join Date
    Oct 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    Sorry for the double post but I just thought I would give you an example:

    The individual VAT(15%) on a £0.95 product would be £0.1425 rounded to £0.14

    So ten of these would be £9.50(ex) + £1.40(VAT) = £10.90 (inc)

    But the VAT total shows as £1.43

    I guess it is working it out something like this:
    9.50 x 0.15 = 1.425 ...then rounded to £1.43

    Any ideas?

  3. #3
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    I'm a UK zenner so would appear to be in the same tax system as you.

    My understanding is UK VAT is on sales. If you Google for a "VAT calculator UK" it will agree with Zen Cart.

    So if your sales are £0.95 then the VAT is £0.14, but if your sales are £9.50 then your VAT is £1.43.

    I'm sure this has been explained better in a previous thread (sorry haven't searched), but I would agree it can lead to confusion to both shop owner and customer. I recall customising the messages so I felt it was explained better.

  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Serious problem with VAT

    Quote Originally Posted by refreshmentshop View Post
    The individual VAT(15%) on a £0.95 product would be £0.1425 rounded to £0.14

    So ten of these would be £9.50(ex) + £1.40(VAT) = £10.90 (inc)

    But the VAT total shows as £1.43

    I guess it is working it out something like this:
    9.50 x 0.15 = 1.425 ...then rounded to £1.43

    Any ideas?
    Hey I am an aussie but even I can see the flaw in your logic
    Our GST and your VAT are calculated on the TOTAL (FINAL) sale price, not on individual sub totals.
    so your example becomes

    So ten of these would be £9.50(ex) + £1.43(VAT) = £10.93 (inc)

    as per Zen

  5. #5
    Join Date
    Oct 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    That's the problem it is NOT 'as per zen'.

    I don't think I made my example clear enough, on a Zencart invoice it shows the following INCORRECT total by the products:

    £9.50 Total (ex)
    £10.90 Total (inc) WRONG!!! It should be £10.93

    The final total on an invoice is correct but the per-product totals are calculated incorrectly.

    To clarify... The problem is Zencart is using two different ways of calculating VAT on the same invoice that don't add up.

    I was wrong about which was the correct way, but the problem remains. I hope you can see what I mean now, this needs to be fixed.

  6. #6
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    Is it possible to paste in a full example of what the invoice looks like as I am still unsure I have understood you?

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Serious problem with VAT

    I noticed this years ago and the OP is correct...

    ZC calculates the vat on individual items and rounds it, then adds the rounded amounts. When the cart has ONE item (or perhaps just a couple), this is not serious as the vat total will usually be correct.

    But when a cart has many items, the vat total can be out by several pennies!

    I believe this may have something to do with the policy of sales tax calculation being different in the USA, where tax can be added to individual items and rounded, before it is finally totalled up...

    ... but in the UK, vat policy is to apply the vat to the transaction TOTAL.

    This may be complex to resolve, as it may require a completely separate taxation module for markets where tax is applied to the transaction TOTAL, rather than to individual items.
    20 years a Zencart User

  8. #8
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    When I did my testing some time ago I don't recall having any issues. Mind you I had applied several fixes maybe I patched before I tested.

    PS: Sorry was does "the OP" mean?

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Serious problem with VAT

    Quote Originally Posted by silslendir View Post
    PS: Sorry was does "the OP" mean?
    OP = Original Poster (Person who made the initial request / post)
    20 years a Zencart User

  10. #10
    Join Date
    Oct 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Serious problem with VAT

    This is interesting and stems from the same mistake in zen:

    learnwebdesignonline.com/tutorials/zencart/sales-tax-error

    ...But I think the problem I'm encountering is more to do with invoice.php in the admin directory, around line 200, I've cut the echo down a bit for clarity:

    Code:
    <?php
    
    echo '<td class="dataTableContent" align="right" valign="top"><b>' .
            $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
            ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
         '</b></td>' . "\n";
    
    ?>
    That scary use of Zencart functions is a little hard to decipher, but as far as I can tell, it is adding the VAT then totalling, which is wrong, not just for the UK but generally.

    Once I've woken up a bit, I might try to post a fix.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Serious problem with customizing my online store
    By beautynexus in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 6 May 2011, 09:32 PM
  2. I have a problem with cupons and vat - EU VAT Mod
    By oberheimer in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 8 Feb 2011, 04:31 PM
  3. Customer Order - VAT - Serious Problem -Help
    By rabz in forum Managing Customers and Orders
    Replies: 1
    Last Post: 22 Dec 2008, 05:04 PM
  4. Serious problem with my zencart
    By doll5272 in forum Basic Configuration
    Replies: 3
    Last Post: 1 Aug 2008, 02:56 PM
  5. Problem with VAT after using discount coupon VAT is not changing...
    By mrplants in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 7
    Last Post: 11 Jan 2007, 03:54 PM

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