stdnum.fi.alv¶
ALV nro (Arvonlisäveronumero, Finnish VAT number).
The number is an 8-digit code with a weighted checksum.
>>> validate('FI 20774740')
'20774740'
>>> validate('FI 20774741') # invalid check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
Traceback (most recent call last):
...
InvalidChecksum: ...
-
stdnum.fi.alv.checksum(number)¶ Calculate the checksum.
-
stdnum.fi.alv.compact(number)¶ Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
-
stdnum.fi.alv.is_valid(number)¶ Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.
-
stdnum.fi.alv.validate(number)¶ Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.