Skip Menu |

This queue is for tickets about the Algorithm-CheckDigits CPAN distribution.

Report information
The Basics
Id: 133031
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Algorithm-CheckDigits

People
Owner: Nobody in particular
Requestors: jan [...] kivitendo.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: v1.3.4



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
Hi, Am Di 21. Jul 2020, 05:34:27, jan@kivitendo.de schrieb: Show quoted text
> 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.
I'll have a look at this as soon as possible. Show quoted text
> > Maybe you can check some wikipedia data proactively?
Unfortunately I don't have the time to check this proactively. Show quoted text
> > 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 for digging into this. In https://www.revenue.ie/en/tax-professionals/historic-material/ebrief/2013/no-032013.aspx I found the following: "The Changes In brief, the format of the new numbers will be nine characters, seven numerics followed by two alpha characters. For individuals, the second alpha character in the new PPSN will be 'A' (e.g. 1234567FA) and for non-individual cases, e.g. Limited Companies, Trusts, Partnerships and Unincorporated Bodies, this will be 'H' (e.g. 1234567WH). The alpha character in position 8 will continue to operate as the check character for existing and new numbers, except that the calculation used (Modulus 23) will be revised to avoid confusion between 'old format' and 'new format' numbers." Do you know the revised calculation method? Kind regards, Mathias
CC: Jan Büren <jan [...] kivitendo-erp.de>
Subject: Re: [rt.cpan.org #133031] Bug irish VAT-IDs allow 2 letters after the digits (since 2013)
Date: Mon, 09 Nov 2020 12:00:44 +0100
To: bug-Algorithm-CheckDigits [...] rt.cpan.org
From: Moritz Bunkus <m.bunkus [...] linet.de>
Hey, we are no experts on VAT number algorithms ourselves, meaning all we can do is Google for it, too. The following document seems to describe the algorithm for all EU countries including Ireland: https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx I've found that by searching for "Ireland VAT ID Nr algorithm". Kind regards, mosu -- Dipl.-Inform. Moritz Bunkus Geschäftsführer/CTO LINET Services GmbH | Cyriaksring 10a | 38118 Braunschweig Tel. 0531-180508-113 | Fax 0531-180508-29 | http://www.linet-services.de LINET in den sozialen Netzwerken: https://twitter.com/linetservices | https://www.facebook.com/linetservices Wissenswertes aus der IT-Welt: http://www.linet-services.de/blog/ Geschäftsführung: Timo Springmann, Mirko Savic und Moritz Bunkus HR B 9170 Amtsgericht Braunschweig USt-IdNr. DE 259 526 516
RT-Send-CC: m.bunkus [...] linet.de, jan [...] kivitendo-premium.de, jan [...] kivitendo-erp.de
Hello and thanks for the link. Am Mo 09. Nov 2020, 06:10:43, m.bunkus@linet.de schrieb: Show quoted text
> Hey, > > we are no experts on VAT number algorithms ourselves, meaning all we > can do > is Google for it, too.
I am no expert on VAT numbers either. Additionally I don't use the library Algorithm::CheckDigits in any current project. Therefore I do not have the time to search for the different or changed algorithms and examples. Show quoted text
> > The following document seems to describe the algorithm for all EU > countries > including Ireland: > > https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms- > Public.docx
Again thanks for that link. I will go through the algorithms and update the modules. Please allow for some time. Looking into that document I found this URL https://ec.europa.eu/taxation_customs/tin/ Perhaps for your use case a simple module that uses the online check module could be an option. You would always have up-to-date algorithms as long as the site is available. Kind regards, Mathias
CC: jan [...] kivitendo-premium.de
Subject: Re: [rt.cpan.org #133031] Bug irish VAT-IDs allow 2 letters after the digits (since 2013)
Date: Fri, 13 Nov 2020 11:45:31 +0100
To: bug-Algorithm-CheckDigits [...] rt.cpan.org
From: Moritz Bunkus <m.bunkus [...] linet.de>
Hey Mathias, thanks for looking into it. On the topic of online checks: while I agree that such a feature might be useful for a lot of people, we do have several customers for whom an obligatory online check would be a no go. Some are simply very privacy-conscious, and even though VAT ID numbers are public, the fact that this one company has relationships with all those other companies isn't, and said customers wouldn't be OK with that kind of information being transmitted to anywhere. Other customers don't allow arbitrary network connections from their intranet to the internet. A third concern is increase in run time. We have customers that regularly import a couple thousand customer/vendor records into our application. Saving those records includes a validity check for VAT ID numbers. At the moment such a check can be done in a couple of ms (if at that). That time would skyrocket with an online check, especially if the site in question has problems. So if you implement an online check, please make it opt-in. Thanks. Kind regards, Moritz -- Dipl.-Inform. Moritz Bunkus Geschäftsführer/CTO LINET Services GmbH | Cyriaksring 10a | 38118 Braunschweig Tel. 0531-180508-113 | Fax 0531-180508-29 | http://www.linet-services.de LINET in den sozialen Netzwerken: https://twitter.com/linetservices | https://www.facebook.com/linetservices Wissenswertes aus der IT-Welt: http://www.linet-services.de/blog/ Geschäftsführung: Timo Springmann, Mirko Savic und Moritz Bunkus HR B 9170 Amtsgericht Braunschweig USt-IdNr. DE 259 526 516
Would you please have a look at version v1.3.4. This should solve the issue with irish VAT-IDs
This should be solved by any version greater or equal to v1.3.4