Forums / Currencies & Sales Taxes, VAT, GST, etc. / Brexit, VAT, minimum order requirement for UK addresses?

Brexit, VAT, minimum order requirement for UK addresses?

Views: 14,974

Results 21 to 36 of 36
27 Mar 2021, 7:01 PM
#21
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Brexit, VAT, minimum order requirement for UK addresses?

We have a hiccup today. Customer address is in the Netherlands and is receiving the Brexit ERROR during checkout.

zen-cart 1.5.6.c

I changed the ```
Zone Description: [135:GBP:Deny]


Based upon the To Use notes, my original steps were:

Create/Insert  Zone Definition:
Zone Name:  UK-Brexit
Zone Description:  [135:GBP:   deny]  no spaces
Status:  yellow

UK-Brexit Zone Name details:
Country:  United Kingdom
Zone:  All Zones
 
Note:  Nothing done to the other 3 zone definitions:  Idaho, International, USA
 
Customer in the Netherlands logs into their account, adds items to cart and begins checkout process.
Error message
ERROR: Orders to this destination must be greater than £135
Currency selected:  USD
Currency is updated every 3rd day by CRON and was last updated 3/25/2021 @ 10am PDT

I cannot do anything to troubleshoot until after the affected customer places their order, which I expect sometime today.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

29 Mar 2021, 11:43 AM
#22
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

I had a similar problem when i was testing this. I did find a sloution but my test machine died. I'll try to reproduce again and let you know what i did. I think I changed zone_id to Null from 0 because if the country id does not have a tax rate then it assumes 0 for the zone_id and if you have any countries with the deny set then they are picked up. I'll have a more detaile look and see if i can post a suggested fix other than changing the data.
Bit of code causing issue is the select line 148.```php
$sql = "SELECT geo_zone_description
FROM " . TABLE_GEO_ZONES . "
INNER JOIN " . TABLE_ZONES_TO_GEO_ZONES . " za USING (geo_zone_id)
WHERE zone_country_id = " . (int)$country_id . "
OR zone_id = " . (int)$zone_id . "
ORDER BY zone_id DESC";

Or Zone_id is overriding country code

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

29 Mar 2021, 7:26 PM
#23
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

Done some more research. This is only an issue if the country you are sending to does not have any regions zones set up. (237 of them)
I think if i understand the logic correctly that the query should return all tax details for the country code regardless of zone and all zones with no country set.
therefore i think the sql should be
Line 148

 $sql = "SELECT geo_zone_description 
                FROM " . TABLE_GEO_ZONES . " 
                INNER JOIN " . TABLE_ZONES_TO_GEO_ZONES . " za USING (geo_zone_id) 
                WHERE zone_country_id = " . (int)$country_id . "
                OR (zone_country_id = 0 and zone_id = " . (int)$zone_id . ") 
                ORDER BY zone_id DESC";  

this assumes that 0 is the value used for "all countries" as it is used for "All zones"

Need someone to check the logic if OK can I make change but don't know where the source is.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

29 Mar 2021, 7:47 PM
#24
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

Mark,

I appreciate everything but you are way over my head.

My pea brain just can't comprehend how Country: The Netherlands is affected by code that is supposed to only be Country: United Kingdom

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

29 Mar 2021, 7:59 PM
#25
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

The issue is in the logic. I have put it there for Dr Byte to check that i have understood it correctly.
When you add a rule to a country for all zones it sets it up with a zone_id of zero meaning to apply to all zones in the country.
The issue is that when you have a country with no zones in it then its zone id defaults to 0 this causes the select to return the deny rule you have set up for all zones regardless of country.

I have tested this on my test site and it works fine. I will have an issue with the whole of the EU from June 1 so i want to deny all orders there below a limit.
when I set it up it worked fine for all countries i had set up but just like you it also blocked payments to non EU countries that did not have zones.
The Netherlands is effected because the query is bringing back the UK rule as the zone_id in the Netherlands is 0.

The two ways of fixing it i have found are the code change above.
or changing the zone_id to Null in the database. Both worked in testing. I prefer the former as it should be a permanent fix. But as it is not my code i cannot say if I have completely understood the logic. If i have then great and hopefully Dr Byte will amend or allow me to amend the file.

Not sure if that helps or not.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

30 Mar 2021, 3:06 PM
#26
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

Thanks Mark

That explanation does help.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

31 Mar 2021, 12:09 AM
#27
drbyte avatar

drbyte

Sensei

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

Re: Brexit, VAT, minimum order requirement for UK addresses?

Yes, brittainmark's query should be fine.

Updated version attached.

.
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 Jun 2021, 8:20 AM
#28
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

Thanks, DrByte. I'm continually amazed at how flexible a system Zen Cart is. I had been chasing my tail trying to come up with a solution for this (or find a Zen Cart expert I could pay to do it) and I can't believe I missed this thread.

One thing I don't see mentioned in the thread, and I realise it will be irrelevant to many Zen Cart stores, is that the rule being implemented for both EU and UK customers only applies to B2C transactions. B2B transactions should not include VAT no matter what the order value. I assume this is because business customers have no mechanism to reclaim VAT paid on purchases from foreign sellers.
As far as I can see, the definition of a "business" customer in this context is one that holds an EORI number. So a complete solution would capture an EORI number in the customer details, if they have one. Then we would only charge VAT if ((zone requires it) and (order_value <= threshold) and (customer EORI exists))

This requires a change outside DrByte's class but it won't be too hard to do (unless you want to verify the EORI number's validity online at the point of capture rather than checking it manually prior to shipping) and as I say, won't be a requirement for the majority of stores.

3 Jun 2021, 11:12 AM
#29
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

BillJ:

Then we would only charge VAT if ((zone requires it) and (order_value <= threshold) and (customer EORI exists))
Oops! :blush:
I meant: Then we would only charge VAT if ((zone requires it) and (order_value <= threshold) and (customer EORI does not exist))

13 Sep 2022, 9:42 AM
#30
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

Finally getting round to testing this out as I've found a cost effective way to file IOSS VAT returns.
However I can't get it to work.
ZC1.57c
I am using a shipping address in Belgium to test on my dev site.
I want the relevant zone tax added only up to 130GBP. Excluded above.

Zone name: Belgium IOSS
Zone Description: [130:GBP]
Zone Name details:
Country: Belgium
Zone: All Zones

VAT is correctly added at the correct rate for the zone.
However it doesn't exclude VAT over £130.
When I have this installed it also messes up the VAT calculation displayed at checkout. It only shows the VAT amount on the shipping, even though the product price is still showing VAT included. Remove it and the VAT shown is correct for the total order value including shipping.
If I change shipping tax class to NONE it doesn't show any tax line, even though the totals are showing correct for including tax.

I even changed the shipping to be over £130 just to see if it would exclude VAT on the shipping and it didn't.

I'm completely flummoxed on this one.
I assume it's something I've done/not done.
The file just needs to be uploaded without any editing, right? It just looks for the relevant language in the zone descriptions, which I have set up.

Any ideas would be appreciated.

13 Sep 2022, 3:33 PM
#31
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

I assume that you had created the required geo zones as per #12 above

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

13 Sep 2022, 7:19 PM
#32
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

brittainmark:

I assume that you had created the required geo zones as per #12 above
I thought I had unless I am confusing what a geo zone is?

Tax rate 21%
Tax Class: Taxable goods
Zone Definitions (isn't this the geo zone?)
Zone Name: EU 21% Zone Description: [130:GBP]
Country: Belgium All zones

I've just deleted everything and started from scratch and get the same results.
Without the file installed the tax rate when using a shipping address in Belgium is shown correctly in the cart and on checkout. The correct VAT is displayed during checkout.
With the _threshold.php file the VAT shown in checkout is only being calculated on the shipping, even though the cart total is correct for VAT being added to everything.

Change the shipping tax class to none and checkout does not show any tax rate but the totals are still correct for 21% VAT being included.

Remove the _threshold.php file and the VAT line is reinstated in checkout.

And of course the tax is not being excluded on carts over the threshold when installed.

13 Sep 2022, 9:05 PM
#33
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

OK, more testing.

Tested with all the same settings as above, with shipping as taxable goods.
For a product with a GBP price of £45 (37.50 incl 20% VAT- remember in UK we have to display retail prices including VAT), I get the following on checkout.

Sub-Total: £45.38
Royal Mail International Tracked (Shipping to BE): £11.98 (9.90 +21% VAT)
VAT 21% (included): £9.95
Total: £57.35

All of this is correct for 21% VAT

For a cart with a value of £180 (£150 incl 20% VAT) I get the following
Sub-Total: £181.50 = correct for 150+ 21%
Royal Mail International Tracked (Shipping to BE): £15.97 (13.20 + 2.77 VAT)
VAT 21% (included): £2.77 = 21% VAT on shipping
Total: £197.47 = correct total for 21% on cart+shipping

I changed the shipping fee to £132 to make sure that was above the threshold and got the following.
Sub-Total: £181.50
Royal Mail International Tracked (Shipping to BE): £159.72
VAT 21% (included): £27.72
Total: £341.22

Again, all correct for 21% VAT but only the shipping VAT is being shown and confirms that VAT is being added over the threshold, assuming for some reason product display prices including VAT was related to the issue.

Changing shipping to non-taxable results in the following

Cart £45 GBP
Sub-Total: £45.38
Royal Mail International Tracked (Shipping to BE): £9.90
VAT 21% (included): £7.88
Total: £55.28
All correct with 21% VAT only added to the cart contents and not shipping.

Cart £180GBP
Sub-Total: £181.50
Royal Mail International Tracked (Shipping to BE): £13.20
Total: £194.70
Note VAT has been eliminated here but is still being charged on the cart contents.

Cart £180GBP with £132 shipping
Sub-Total: £181.50
Royal Mail International Tracked (Shipping to BE): £132.00
Total: £313.50
No VAT added to shipping but still added to cart contents.

14 Sep 2022, 8:18 PM
#34
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

I think I've pinpointed the issues for my particular usage.

Changed store to display prices without tax.
Customer from Belgium with 21% VAT rate set as above.
Threshold £130

Sub-Total: £129.17
Royal Mail International Tracked (Shipping to BE): £14.35
VAT 21%: £30.14
Total: £173.65
CORRECT

Sub-Total: £130.21
Royal Mail International Tracked (Shipping to BE): £14.35
VAT 21%: £3.01
Total: £174.92
Correctly stopped including VAT on cart contents but still adding VAT to shipping.

If shipping is increased to £132
Sub-Total: £130.21
Royal Mail International Tracked (Shipping to BE): £132.00
VAT 21%: £27.72
Total: £317.27
Correctly stopped including VAT on cart contents but still adding VAT to shipping.

So it can be seen that there are two issues.

First is that the net price is not being used when prices are displayed inclusive of VAT, and that stops any VAT being added or dropped from the total when cart contents are below the threshold because it is being assumed the price in the cart is without tax.

Second is that the shipping is being accounted for separately for calculating VAT.
When the cart contents are above threshold the VAT is still added to shipping if a taxable class. However the threshold for not including VAT is not being used on the shipping fee if it alone is above the threshold.

I tried out the Deny function and it works as you'd expect from the above - it basis whether to show or not on the price displayed in the cart, regardless of inclusive or exclusive of VAT.

I'm assuming no-one else in the UK is actually using this method to add vat for EU orders - rather it's being used to set a minimum price for orders to avoid the VAT/administrative implications.

For my situation, this is how I need it to act to exclude VAT over a certain amount for specific zones.
Store must show gross price including taxes to customers by law.

Use the cart price without VAT for threshold calculation, not including shipping.
If cart total is below threshold, add relevant tax rate to both cart total and shipping.
If cart total is above threshold, exclude all tax from both cart total and shipping.

Is this something that can be accomplished with this method or is a more complex mod needed?

TIA

15 Sep 2022, 4:52 PM
#35
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Brexit, VAT, minimum order requirement for UK addresses?

I have had a quick look at the code and the decision to charge/not charge tax is base on the value of the goods before tax and after any discounts. I believe that this is how it was intended to work. So if you set your threshold at £130 for GBP. Then, if you have an item that costs £130.01 before tax, it will not have vat applied to the transactions. (The value of the item is the value in local currency adjusted to GBP). If the item is valued at £130.00 or less, then tax will be charged.
This Notifier is basically a switch that turns off the tax calculations if it exceeds the value in your Zone Definitions "[130:GBP]"

NOTE: Depends on the store having associated currencies defined and exchange-rates up-to-date (ideally at least weekly)

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

15 Sep 2022, 6:56 PM
#36
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Brexit, VAT, minimum order requirement for UK addresses?

brittainmark:

I have had a quick look at the code and the decision to charge/not charge tax is base on the value of the goods before tax and after any discounts. I believe that this is how it was intended to work.
It's not working like that when the store is set to show prices including VAT which as you know is a legal requirement in UK.
It only works like that when set to display prices without VAT, and even then it isn't working properly as it still adds VAT to the shipping when the cart contents are above the threshold.