1Algorithm::CheckDigits:U:sMe9r7_C0o0n1t(r3i)buted Perl DAolcguomreintthamt:i:oCnheckDigits::M97_001(3)
2
3
4

NAME

6       CheckDigits::M97_001 - compute check digits for VAT Registration Number
7       (BE)
8

SYNOPSIS

10         use Algorithm::CheckDigits;
11
12         $ustid = CheckDigits('ustid_be');
13
14         if ($ustid->is_valid('136695962')) {
15               # do something
16         }
17
18         $cn = $ustid->complete('1366959');
19         # $cn = '136695962'
20
21         $cd = $ustid->checkdigit('136695962');
22         # $cd = '62'
23
24         $bn = $ustid->basenumber('136695962');
25         # $bn = '1366959'
26

DESCRIPTION

28   ALGORITHM
29       1.  The whole number (without checksum) is taken modulo 97.
30
31       2.  The checksum is difference of the remainder from step 1 to 97.
32
33   METHODS
34       is_valid($number)
35           Returns true if $number consists solely of numbers and the last
36           digit is a valid check digit according to the algorithm given
37           above.
38
39           A leading 'BE' before the numbers will be ignored.
40
41           Returns false otherwise,
42
43       complete($number)
44           The check digit for $number is computed and concatenated to the end
45           of $number.
46
47           Returns the complete number with check digit or '' if $number does
48           not consist solely of digits and spaces.
49
50           A leading 'BE' before the digits is ignored for the computation and
51           retained for the result.
52
53       basenumber($number)
54           Returns the basenumber of $number if $number has a valid check
55           digit.
56
57           A leading 'BE' before the digits will be ignored and not returned
58           with the result.
59
60           Return '' otherwise.
61
62       checkdigit($number)
63           Returns the checkdigits of $number if $number has a valid check
64           digit.
65
66           Return '' otherwise.
67
68   EXPORT
69       None by default.
70

AUTHOR

72       Mathias Weidner, "<mamawe@cpan.org>"
73

SEE ALSO

75       perl, CheckDigits, <http://www.pruefziffernberechnung.de>.
76       <https://en.wikipedia.org/wiki/VAT_identification_number>
77
78
79
80perl v5.32.0                      2020-07-28Algorithm::CheckDigits::M97_001(3)
Impressum