Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Problem with VAT after using discount coupon VAT is not changing...

Problem with VAT after using discount coupon VAT is not changing...

Locked

Views: 7,051

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
21 Dec 2006, 9:44 AM
#1
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Problem with VAT after using discount coupon VAT is not changing...

Hi everyone,

Im using Zencart 1.3.5 and just added the use of discount coupons.
VAT rate is set to 17,5%.

Everything was working OK until I added the use of a discount coupon. This is before using the discount coupon:

Sub-Total: £19.95
Flat Rate (Best Way):£9.95

Total: £29.90
VAT: £4.45

Until here everything is fine.
Now let see if I set up a discount coupon for 10%.

Sub-Total: £19.95
Flat Rate (Best Way):£9.95

Discount Coupon: LL0107 :-£1.99

Total: £27.91
VAT: £4.45

VAT should be calculated over £27.91 and should be £4.15 but calculates it over £29.90 but is still £4.45

Could anyone point me in the right direction!

Thanks upfront for your time and effort!!

Mr. Plants

21 Dec 2006, 5:47 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Problem with VAT after using discount coupon VAT is not changing...

What are your settings in Admin->Modules->Order Total - Discount Coupons ?

.
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.

22 Dec 2006, 9:53 AM
#3
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Problem with VAT after using discount coupon VAT is not changing...

These are settings which doesnt look to good is it?

Order Total ModulesModules Sort OrderAction
Warning: main(/home/worldofp/public_html/shop/includes/languages/english/modules/order_total/old_ot_coupon.php) [function.main]: failed to open stream: No such file or directory in /home/worldofp/public_html/shop/shop_admin/modules.php on line 174

Warning: main(/home/worldofp/public_html/shop/includes/languages/english/modules/order_total/old_ot_coupon.php) [function.main]: failed to open stream: No such file or directory in /home/worldofp/public_html/shop/shop_admin/modules.php on line 174

Warning: main() [function.include]: Failed opening '/home/worldofp/public_html/shop/includes/languages/english/modules/order_total/old_ot_coupon.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/worldofp/public_html/shop/shop_admin/modules.php on line 174
COD Feeot_cod_fee
Fatal error: Cannot redeclare class ot_coupon in /home/worldofp/public_html/shop/includes/modules/order_total/ot_coupon.php on line 19

22 Dec 2006, 11:31 AM
#4
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Problem with VAT after using discount coupon VAT is not changing...

Hi Dr Byte. We had attempted a code tweak to fix this as in:
http://www.zen-cart.com/forum/showthread.php?t=45213&highlight=tax+calculation (post 9)
The errors were due to renamimg original ot_coupon.php to old.ot_coupon.php. Oops. The tweak has been removed so we can sort this out.

The settings are:

Order Total Modules > Discount Coupon >
This module is installed : true
Sort Order : 280
Include Shipping : false
Include Tax : true
Re-calculate Tax : None
Tax Class : VAT (which is 17.5%)

The Sort order for all the order total modules has been tweaked to:
Discount Coupon : 280
Low Order Fee : 400
Shipping : 200
Sub-Total : 100
Tax : 999
Total : 888
See: http://www.zen-cart.com/forum/showthread.php?t=46241 (post 7)
I don't think this is part of the problem though.

The coupon is set up like this:
Coupon Name : test01
Coupon Amount : 10.0000%
Start Date : 12/18/2006
End Date : 12/19/2007
Uses per Coupon : Unlimited
Uses per Customer : 3
Valid Product List : NONE
Valid Categories List : NONE
Date Created : 12/18/2006
Date Modified : 12/18/2006

All this give the following information in the Order Confirmation page:
Sub-Total : £59.90
Flat Rate (Best Way) : £9.95
Discount Coupon: LL0107 : -£5.99
Total : £63.86
VAT : £10.40

As you can see the VAT is not correct. If I tweak the coupon module to have 'Re-Calculate tax: Standard' it gives:
Sub-Total : £59.90
Flat Rate (Best Way) : £9.95
Discount Coupon: LL0107 : -£5.99
Total : £62.06
VAT : £8.60

With 'Re-Calculate tax: None' and 'Include Tax : False' it gives
Sub-Total : £59.90
Flat Rate (Best Way) : £9.95
Discount Coupon: LL0107 : -£5.10
Total : £64.75
VAT : £10.40

And with 'Re-Calculate tax: Standard' and 'Include Tax : False' it gives
Sub-Total : £59.90
Flat Rate (Best Way) : £9.95
Discount Coupon: LL0107 : -£5.10
Total : £62.95
VAT : £8.60

As you can see it works out the total differently every time but the tax can stay the same.

Thanks...

3 Jan 2007, 10:14 AM
#5
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Problem with VAT after using discount coupon VAT is not changing...

Hi DrByte,

First of all best wishes to everyone!

During the holidays I have been trying to figure this VAT problem out but came out with nothing...did you maybe found an answer to what is causing this VAT error?

5 Jan 2007, 8:35 AM
#6
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Problem with VAT after using discount coupon VAT is not changing...

We have just tried an upgrade of our site to 1.3.7 (we were on 1.3.5) it all seems to have gone swimmingly (mostly) but I'm afraid it has not resolved this issue.

I should point out that the VAT (Value Added Tax) is 17.5% for those who don't know and we are displaying products with tax included.

The figures we have shown have been for a basket with two items but the same issues can be seen with any amount of items. The experiments as before are below.

Sub-Total: £59.90
Flat Rate (Best Way): £9.95
Discount Coupon: LL0107 : -£5.99
Total: £63.86
VAT: £10.40

With 'Recalculate Tax' set to 'Standard':
Sub-Total: £59.90
Flat Rate (Best Way): £9.95
Discount Coupon: LL0107 : -£6.04
Total: £62.97
VAT: £9.51

With 'Re-Calculate tax: None' and 'Include Tax : False' it gives
Sub-Total: £59.90
Flat Rate (Best Way): £9.95
Discount Coupon: LL0107 : -£5.10
Total: £64.75
VAT: £10.4

And with 'Re-Calculate tax: Standard' and 'Include Tax : False' it gives
Sub-Total: £59.90
Flat Rate (Best Way): £9.95
Discount Coupon: LL0107 : -£5.15
Total: £63.86
VAT: £9.51

As you can see they are NEARLY the same. Obviously something has been done in this area. Are we missing something? We're finding it hard to believe we are the only suffering from this issue!

Cheers.

5 Jan 2007, 9:28 AM
#7
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Problem with VAT after using discount coupon VAT is not changing...

We're finding it hard to believe we are the only suffering from this issue!You are surely not the only one. ot_coupon has several bugs (surely for including tax stores).

Here's a discussion about coupon issues: http://www.zen-cart.com/forum/showthread.php?t=54847

JeffD has uploaded an improved version in the above thread which fixes most issues (in my case, I am also using including tax prices).

11 Jan 2007, 2:54 PM
#8
mrplants avatar

mrplants

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Problem with VAT after using discount coupon VAT is not changing...

Yes! .....Thanks Paul, everything is finally working!

Cheers,

Mr. Plants