1CheckDigits::M97_001(3)User Contributed Perl DocumentatioCnheckDigits::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 only if $number consists solely of numbers and the
36           last digit is a valid check digit according to the algorithm given
37           above.
38
39           Returns false otherwise,
40
41       complete($number)
42           The check digit for $number is computed and concatenated to the end
43           of $number.
44
45           Returns the complete number with check digit or '' if $number does
46           not consist solely of digits and spaces.
47
48       basenumber($number)
49           Returns the basenumber of $number if $number has a valid check
50           digit.
51
52           Return '' otherwise.
53
54       checkdigit($number)
55           Returns the checkdigits of $number if $number has a valid check
56           digit.
57
58           Return '' otherwise.
59
60   EXPORT
61       None by default.
62

AUTHOR

64       Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
65

SEE ALSO

67       perl, CheckDigits, www.pruefziffernberechnung.de.
68
69
70
71perl v5.12.1                      2009-11-20           CheckDigits::M97_001(3)
Impressum