stdnum.lu.tva

TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number).

The n° TVA (Numéro d’identification à la taxe sur la valeur ajoutée) is used for tax purposes in Luxembourg. The number consists of 8 digits of which the last two are check digits.

>>> validate('LU 150 274 42')
'15027442'
>>> validate('150 274 43')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.lu.tva.calc_check_digits(number)

Calculate the check digits for the number.

stdnum.lu.tva.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.lu.tva.is_valid(number)

Check if the number is a valid VAT number.

stdnum.lu.tva.validate(number)

Check if the number is a valid VAT number. This checks the length, formatting and check digit.