Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  1. #21
    Join Date
    May 2008
    Location
    Thousand Oaks, CA
    Posts
    29
    Plugin Contributions
    0

    Default Re: Sales Tax Calculation Incorrect

    Perhaps a bad example of what I meant:

    Here's another Sample order:
    Sub-Total: $17.99
    Standard: $7.99
    Discount Coupon: SAVE20 : -$3.60
    Tax (CA residents only) + : $1.18
    Total: $23.56

    Tax Rate of 8.25%

    In the MySQL orders_total table it stores the tax as value 1.1838.

    The value I get with my trusty calculator is 1.187175. Rounded up the value should be 1.19.

    The problem is that half of the taxable orders end up rounding incorrectly, so at the end of the month I'm a dollar or more off my numbers. It's more annoying than anything else, but I'm really curious if this is a problem inherent in Zen Cart. I do have a number of mods installed--it could always be something like that--but I've tried not to tinker with anything crucial to order processing.

    Anyway, looking through my orders it looks like something that's existed since installation. I have two sites and one is running 1.3.8 and the other is still on 1.3.7 but the problem looks like it exists in both locations.

  2. #22
    Join Date
    Oct 2007
    Location
    Edinburgh, Scotland
    Posts
    243
    Plugin Contributions
    1

    Default Re: Sales Tax Calculation Incorrect

    Quote Originally Posted by fergusmacdonald View Post
    Fantastic, thanks. Will try it out and let you know if i get any problems.

    Much appreciated.
    Unfortunately it appears that this issue has not been fixed by the change posted in all areas.

    Discount Coupon
    Include Shipping
    false

    Include Tax
    false

    Re-calculate Tax
    Standard


    Sub-Total: £10.00
    Free Shipping: £0.00
    Discount Coupon: thanksforten :-£1.00
    Included VAT @ 15%:£1.17
    Total:£9.00

    All these figures appear to be correct, however, the coupon is including tax, yet include tax is set to false. When there is no tax on an order, it also calculates correctly, so even though the controls are the wrong way round - it works!

    However, when there is a quantity of 10 products in the cart:

    Sub-Total: £100.00
    Free Shipping: £0.00
    Discount Coupon: thanksforten :-£10.01
    Included VAT @ 15%:£11.74
    Total:£90.00

    A myseterious 1 pence appears on the discount, but not in the total. Change the quantity to 100 and it is corrected.

    Quantity Discount

    On the quantity discount module, a problem still exists.

    When:
    Include Tax
    true

    Re-calculate Tax
    None

    Sub-Total: £100.00
    Free Shipping: £0.00
    Quantity Discount (10%) :-£10.00
    Included VAT @ 15%:£13.04 (incorrect)
    Total:£90.00

    When:
    Include Tax
    false

    Re-calculate Tax
    Standard

    Sub-Total: £100.00
    Free Shipping: £0.00
    Quantity Discount (10%) :-£8.70
    Included VAT @ 15%:£11.73
    Total:£89.99

    Any help on this would be much appreciated.

  3. #23
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Sales Tax Calculation Incorrect

    @fergusmacdonald

    k

    on the include_tax setting, I think you might be misunderstanding its use.

    The include_tax setting does not govern whether the coupon will include tax in its output figure, but whether tax should be included in the total value that the coupon discount is calculated on.

    Generally as discount coupons recalculate the tax anyway, you do not need to include tax. However the reason for the setting is that in some tax jurisdictions, a discount coupon can be sometimes considered as a fixed discount amount (much like a Gift Voucher) where tax is not recalculated, but the coupon may reduce the total order value including tax.

    As for the penny difference you are seeing when using 10 items. I am not seeing this in my v139 code. (which contains fixes in a number of files to address rounding problems)

    These changes have been posted elsewhere, but i'll try and come up with a definitive list.

    N.B. haven't looked at the quantity discount prob you posted yet.

  4. #24
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Sales Tax Calculation Incorrect

    @batterygenie

    BTW haven't forgotten about you either. Will test asap

  5. #25
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Sales Tax Calculation Incorrect

    @fergusmacdonald

    The quantity discounts is a 3rd party contribution IIRC, so not sure how much I can help with that.

  6. #26
    Join Date
    Oct 2007
    Location
    Edinburgh, Scotland
    Posts
    243
    Plugin Contributions
    1

    Default Re: Sales Tax Calculation Incorrect

    Quote Originally Posted by wilt View Post
    @fergusmacdonald

    k

    on the include_tax setting, I think you might be misunderstanding its use.

    The include_tax setting does not govern whether the coupon will include tax in its output figure, but whether tax should be included in the total value that the coupon discount is calculated on.

    Generally as discount coupons recalculate the tax anyway, you do not need to include tax. However the reason for the setting is that in some tax jurisdictions, a discount coupon can be sometimes considered as a fixed discount amount (much like a Gift Voucher) where tax is not recalculated, but the coupon may reduce the total order value including tax.

    As for the penny difference you are seeing when using 10 items. I am not seeing this in my v139 code. (which contains fixes in a number of files to address rounding problems)

    These changes have been posted elsewhere, but i'll try and come up with a definitive list.

    N.B. haven't looked at the quantity discount prob you posted yet.
    Ah ok, maybe i understood it correctly. My understanding is as follows:

    Include tax:true

    Sub-total: £11.00
    Discount (10%): £1.10
    Total: £9.90

    That means the coupon would take 10% off the price including tax.

    If include tax:false
    Sub-total: £11.00
    Discount (10%): £1.00
    Total: £10.00


    So the include tax variable controls whether the discount is calculated from the sub-total including or excluding tax.

    Is that correct?

  7. #27
    Join Date
    Oct 2007
    Location
    Edinburgh, Scotland
    Posts
    243
    Plugin Contributions
    1

    Default Re: Sales Tax Calculation Incorrect

    Quote Originally Posted by wilt View Post
    @fergusmacdonald

    The quantity discounts is a 3rd party contribution IIRC, so not sure how much I can help with that.
    No worries, i thought that the two were a related problem. I will try posting on the support forum.

  8. #28
    Join Date
    Oct 2007
    Location
    Edinburgh, Scotland
    Posts
    243
    Plugin Contributions
    1

    Default Re: Sales Tax Calculation Incorrect

    Quote Originally Posted by wilt View Post
    @fergusmacdonald

    As for the penny difference you are seeing when using 10 items. I am not seeing this in my v139 code. (which contains fixes in a number of files to address rounding problems)

    These changes have been posted elsewhere, but i'll try and come up with a definitive list.
    Any news on where i can get a list of these changes, or where you can get v139?

    Thanks.

  9. #29
    Join Date
    May 2008
    Location
    Thousand Oaks, CA
    Posts
    29
    Plugin Contributions
    0

    Default Re: Sales Tax Calculation Incorrect

    Hmm...I initially thought I was having a similar problem as fergnus but I'm beginning to think after reading these latest posts that it may be an unrelated issue...at least as far as quantity discounts is concerned. Oh well, I can hang out here for a bit until someone can shine a light on this...

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 11
    Last Post: 23 Jul 2010, 11:49 AM
  2. Replies: 1
    Last Post: 22 Aug 2009, 08:12 PM
  3. Sales Tax Calculation incorrect
    By tzeyangng in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 16
    Last Post: 10 Apr 2009, 05:19 PM
  4. Incorrect tax calculation with Gift Certificate
    By Olivier@free in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 24 Mar 2007, 10:37 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