Skip to main content

Invalid VAT number

More
10 years 1 week ago #250181 by mohairbears
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 2.6.2
-- PHP version -- : 5.4.24
-- Browser(s) name and version -- : Fifefox
-- Error-message(debug-mod must be tuned on) -- : the VAT number is not valid

Hi,
I have an issue with a valid VAT number not being accepted. It is an Irish VAT number IE3332169AH, the checks out as valid on the European Commission VAT website but Hikashop give an invalid VAT number error? I have tried inputting by removing the IE & AH but still get an error?

I have not had problems with other VAT numbers giving errors?

thanks

Please Log in or Create an account to join the conversation.

More
10 years 6 days ago #250189 by nicolas
Replied by nicolas on topic Invalid VAT number
Hi,

Ah yes, it seems that Ireland has updated the possibilities in terms of VAT numbers.
Change the line:
Code:
$regex = '/^(IE){0,1}[0-9][0-9A-Z\+\*][0-9]{5}[A-Z]$/i';
to:
Code:
$regex = '/^(IE){0,1}[0-9][0-9A-Z\+\*][0-9]{5}[A-Z][A-Z]?$/i';
in the file administrator/components/com_hikashop/helpers/vat.php and it should handle that VAT number properly.
We add that patch on our end too.
The following user(s) said Thank You: mohairbears

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #317212 by mohairbears
Replied by mohairbears on topic Invalid VAT number
Hi, It looks like Ireland may have changed something again as this VAT number IE3662134UH will not work even though its valid on the EU check site?

Rgds

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #317214 by nicolas
Replied by nicolas on topic Invalid VAT number
Hi,

No the regex is still fine.
And it works fine with this number.
The issue is that this VAT number is not valid. I just checked on the EU website and it returned an error:
monosnap.com/file/4YRv29jHcm53XQSjM81PUC628C4h51
The following user(s) said Thank You: mohairbears

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum