Post by robster » Thu Jul 26, 2012 1:27 am

OK I have now upgraded to the latest 1.5.3.1 version of Opencart.

Can someone please explain how the VAT vaidation works? In previous versions of Opencart that didn't have this system as core, I used an extension that validated the VAT number then automatically set that customer to be exempt from VAT on his sales.

Is this how the new Opencart core VAT validation system is supposed to work because if so I cannot get it to work.

I have 'fixed' the code that prevented valid VAT numbers from being validated and now when a customer enters their VAT number from another VAT member state it is validated correctly. But what happens now? If that customer places an order he is still charged VAT!! Am I missing something or is this system not working? If this is not meant to function like this then what is the point of it?

I can't find any documentation that explains this new feature so please, if someone knows the answer please post here.

Robster

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by madimar » Thu Jul 26, 2012 6:35 am

Hi Robster, new 1.5.3.1 feature just allow to collect VAT number and validate it. No VAT exemption mechanisms are implemented... for that feature you still need extensions like mine... but I didn't update it yet to 1.5.3.1

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by robster » Thu Jul 26, 2012 6:42 am

Hi

Yep, i was fast coming to that conclusion.

Best you get on with updating your extension then.......... :)

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by robster » Thu Jul 26, 2012 6:53 am

At the risk of starting a new thread here, I have looked at your extension before, however it is not quite right for the UK for two reasons:

In the UK you can be VAT registered but not be a limited company (for example I am VAT registered but my business is not a limited company - I am a sole trader)

and

You can be a limited company but not be VAT registered (VAT registration in the UK is based on either turnover or voluntarily registering)

If you can sort that out and update to 1.5.3.1 then I will purchase.

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by skries » Sat Sep 22, 2012 12:16 am

Hi Rob

Like you, I am keen on implementing a system that properly validates EU intracom numbers and then allows for the customers to purchase without being charged VAT.

You indicate in the first post of this thread that you managed to "fix" the validation process. Can you point to any files/patches? I have found a reference to a google code page which isn't available any more (http://code.google.com/p/opencart/source/detail?r=1119). On github I found a reference to changes that should be applied to five files in order to correct the validation process. I applied them, but still get an "VAT number is invalid!" message in the backend when trying to save a customer profile with any (valid or not valid) VAT intracom number in the Tax ID field. In the frontend, nothing is displayed - anything seems to be accepted. I have used both existing and non-existing VAT numbers to check this process. I am running OC 1.5.3.1 with the default template.

Any pointers to your "fix" would be greatly appreciated.

Susanne

Newbie

Posts

Joined
Fri Sep 21, 2012 11:59 pm

Post by robster » Tue Sep 25, 2012 7:15 pm

Hi Suzanne

I just applied the fixes in (http://code.google.com/p/opencart/source/detail?r=1119). and all seems to be fine.

robster
Last edited by robster on Tue Sep 25, 2012 8:33 pm, edited 1 time in total.

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by ADD Creative » Tue Sep 25, 2012 8:30 pm

In:
catalog\controller\account\address.php
catalog\controller\account\register.php
catalog\controller\checkout\guest.php
catalog\controller\checkout\payment_address.php
catalog\controller\checkout\register.php

Search for

Code: Select all

!= 'invalid'
And change to

Code: Select all

== 'invalid'

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ADD Creative » Tue Sep 25, 2012 8:43 pm

It is possible to set a customer group that requires a valid VAT number. You can then remove and VAT tax rate for that group. So if a customer select the VAT registered VAT group when registering and supplies a valid VAT number they will not be charged VAT.

You will also need a different VAT rate for you EU country and the rest of the EU. So if in the UK have.
UK VAT 20%, UK zone only, applied to Default and VAT Registered customer groups.
EU VAT 20%, rest of EU zone, applied to Default customer group only.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by robster » Tue Sep 25, 2012 9:04 pm

And therein lies my problem:

I have indeed created two groups - one VAT CHARGEABLE (like UK and worldwide) and the other NON VAT (like european VAT businesses) but this relies on the customer choosing the correct group at registration an dthere is no preventative measures to stop a UK company simply selecting the NON-VAT group and bypassing paying VAT.

Plus of course this als means that you have to 'duplicate' product options, etc for each group that you create which makes it a right faff!

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by ADD Creative » Tue Sep 25, 2012 9:20 pm

Yes there is. You set up a 20% VAT rat on a UK Geo Zone and apply it to the NON-VAT group. You can also set the group to require a valid VAT number.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by SXGuy » Tue Sep 25, 2012 11:10 pm

The problem is, the VAT validation service is only a service offered that validates a VAT number, it checks to see if the string of numbers is correct and a valid number. As far as i know, it does not know if the number is real, only if it is a correct string of numbers.

Also, the VAT validation service, does not know if a customer is exempt from VAT, it doesnt do anything like that, its simply a tool used to check if a number is valid.

The API for this service is very limited, and there is no way of changing it, as its a service provided by another company.

All opencart does, is use its API.

Madimar's Extension is the only way it can be done, and even then, you would have to assign people to the correct customer group.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by ADD Creative » Wed Sep 26, 2012 7:39 pm

No it uses http://ec.europa.eu/taxation_customs/vies/viesquer.do to check the number is a real VAT number. It does not tell you if the customer is VAT is except, as it could not possibly do this without locations. It looks like it's the same checker as the extensions use.

You can set OpenCart up to handle EU VAT, it just takes a while to work out how to do it. Once set up all the customer has to do is select the VAT registered customer group (other customers just use the default) and put in a valid VAT number.

The only situation if would fail on is if customer is in the same country as the store and wants shipping to another EU country. Something the extension you mention also get wrong.

To set up you need (taking UK as an example).
OpenCart 1.5.3.1 patch to fix the validation bug or 1.5.4.1 patched to fix the guest customer group bug.
Two customer groups, "Default" and "VAT registered".
A Geo Zone for the UK.
A Geo Zone for the rest of the EU.
Two 20% tax rates, one for the UK Geo Zone and one for the rest of the EU Geo Zone and in the taxable goods class.
VAT number validating enabled.

You need to make sure that.
The "VAT registered" customer group has both "Display Tax ID" and "Tax ID Required" set.
The UK tax rate applies to both customer groups.
The rest of EU applies to just the "Default" customer group.

It all seems to to work for me. Let me know if anything is not clear.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ADD Creative » Wed Sep 26, 2012 7:44 pm

I missed out the files in the admin for VAT validation fix. So best to do the following below to 1.5.3 and 1.5.4.

In:
admin\controller\sale\customer.php
admin\controller\sale\order.php

Search for

Code: Select all

!= 'invalid'
And change to

Code: Select all

== 'invalid'

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by skries » Wed Sep 26, 2012 10:35 pm

Thanks robster and ADD Creative for your hints / remarks on getting VAT validation to work.

I have applied the changes to the five files mentioned by ADD Creative, but no luck. I get an error during checkout with a valid VAT number (I have replaced that number with XXXXXXXXX below):

SyntaxError: JSON.parse: unexpected character
OK
<b>Warning</b>: file_get_contents(http://ec.europa.eu/taxation_customs/vi ... =XXXXXXXXX): failed to open stream: HTTP request failed! HTTP/1.0 503 Service Unavailable
in <b>/var/www/virtual/h1europe/html/webshop/system/helper/vat.php</b> on line <b>39</b>[]

I have not altered the vat.php file (the one in system/helper/) and have uploaded it again to the server just to check that it copied alright, but no change. Does http://code.google.com/p/opencart/source/detail?r=1119 (which is no longer available) link to a changed vat.php file?

If the vat.php file is really the one originally shipped with oc 1.5.3.1 and since you are all able to validate the VAT intracom number, I wonder if this problem is caused by the fact that I am running oc on php 4.4? If anybody could shed some light on this, I'd be really grateful.

Otherwise, I agree with ADD Creative about the setup of the customer groups as detailed above. This should work - as long as the validation process blocks those with invalid VAT intracom numbers. As a fallback it would be possible to manually approve those applying for a B2B account (= the customer group where people with a valid VAT intracom number do not pay VAT). This is my current scenario.

All the best

Susanne

Newbie

Posts

Joined
Fri Sep 21, 2012 11:59 pm

Post by ADD Creative » Thu Sep 27, 2012 12:08 am

The Error message you got was "503 Service Unavailable", which probable means OpenCart could not connect to the EU server. I also couldn't connect to the EU VAT server earlier today, so I would try again later.

I would take the system/helper/vat.php out of 1.5.4.1 and use that one as it has been updated.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by skries » Thu Sep 27, 2012 1:11 am

Thanks for your reply, ADD Creative. Have uploaded the vat.php file from oc 1.5.4.1. No change yet, but I'll wait and see if the error code is related to the EU VAT validation service being down or not.

And BTW, made an obvious mistake before: I am running oc on php 5.4.4 (not 4.4...ts).

Susanne

Newbie

Posts

Joined
Fri Sep 21, 2012 11:59 pm

Post by ADD Creative » Thu Sep 27, 2012 1:35 am

Try going to http://ec.europa.eu/taxation_customs/vies/viesquer.do in your web browser. Which should tell you if it's up or not.

If you can reach with your browser and still not OpenCart it might be a server configuration problem.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by SXGuy » Thu Sep 27, 2012 2:19 am

that website is down more times than my pants LOL

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by madimar » Fri Sep 28, 2012 2:02 pm

Hi all, just for better information, my extension still has some advantages with respect to current oc system. Simplifying and summarizing:
1) possibility to accept a registration with not validated vat number(information available in customer profile)
2) more sofisticate validation system, with retry management, fallback, and special validation algorithms (only for some countries, like Italy and Spain). In Italy, for instance, many companies are not registered on eu vies. Registration is mandatory only if you company desires to do business abroad and not only nationally.
3) using separated customer groups (specific for tax fdgistration) you are free to use standard ones for discounts.

Ciao,

M

Sent from my DesireHD.

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by ADD Creative » Fri Sep 28, 2012 4:42 pm

Hi Madimar,

OpenCart will accept an invalid VAT number if you switch the validate option off in the settings, although you will also lose any kind of format checking.

I can see there are still some big advantages to using your extension regarding the more sophisticated validation system.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 279 guests