Invalid VAT number

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
7 years 7 months ago #250181

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
7 years 7 months ago #250189

Hi,

Ah yes, it seems that Ireland has updated the possibilities in terms of VAT numbers.
Change the line:

$regex = '/^(IE){0,1}[0-9][0-9A-Z\+\*][0-9]{5}[A-Z]$/i';
to:
$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.

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
4 years 2 weeks ago #317212

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.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
4 years 2 weeks ago #317214

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.068 seconds
Powered by Kunena Forum