Subject: | Bug irish VAT-IDs allow 2 letters after the digits (since 2013) |
Date: | Tue, 21 Jul 2020 11:27:35 +0200 |
To: | bug-Algorithm-CheckDigits [...] rt.cpan.org |
From: | Jan Büren <jan [...] kivitendo-premium.de> |
Hi,
thanks for the fix of the belgian vatid.
We have another issue with irish vat-ids, since 2013 they may have two
instead of one letter after the digits.
Maybe you can check some wikipedia data proactively?
https://en.wikipedia.org/wiki/VAT_identification_number
The fix in this case could be like this:
M23_002.pm
<https://metacpan.org/release/Algorithm-CheckDigits/source/lib/Algorithm/CheckDigits/M23_002.pm>
|- $number =~ /^(\d{7})([A-W])$/i +||$number =~ /^(\d{7})([A-Z]{1,2})$/i|||
Thanks
Jan
--
Bloghttp://blog.kivitendo.de/
kivitendo GmbH
Jan Büren
Kölnstr. 311
53117 Bonn
USt-IdNr. DE292363254
Telefon: 0228 92 98 2012
persönliche Durchwahl: 0228 92 97 8965