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: ...
- stdnum.fi.alv.checksum(number: str) int ¶
Calculate the checksum.
- stdnum.fi.alv.compact(number: str) str ¶
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: str) bool ¶
Check if the number is a valid VAT number.
- stdnum.fi.alv.validate(number: str) str ¶
Check if the number is a valid VAT number. This checks the length, formatting and check digit.