stdnum.lt.pvm¶
PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number).
The PVM is used for VAT purposes in Lithuania. It is 9 digits (for legal entities) or 12 digits long (for temporarily registered taxpayers). This module does not check the format of Lithuanian personal codes (Asmens kodas).
>>> validate('119511515') # organisation
'119511515'
>>> validate('LT 100001919017') # temporarily registered
'100001919017'
>>> validate('100001919018') # invalid check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('100004801610') # second step in check digit calculation
'100004801610'
- stdnum.lt.pvm.calc_check_digit(number)¶
Calculate the check digit. The number passed should not have the check digit included.
- stdnum.lt.pvm.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.lt.pvm.is_valid(number)¶
Check if the number is a valid VAT number.
- stdnum.lt.pvm.validate(number)¶
Check if the number is a valid VAT number. This checks the length, formatting and check digit.