stdnum.pl.nip¶
NIP (Numer Identyfikacji Podatkowej, Polish VAT number).
The NIP (Numer Identyfikacji Podatkowej) number consists of 10 digit with a straightforward weighted checksum.
>>> validate('PL 8567346215')
'8567346215'
>>> validate('PL 8567346216') # invalid check digits
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> format('PL 8567346215')
'856-734-62-15'
- stdnum.pl.nip.checksum(number)¶
Calculate the checksum.
- stdnum.pl.nip.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.pl.nip.format(number)¶
Reformat the number to the standard presentation format.
- stdnum.pl.nip.is_valid(number)¶
Check if the number is a valid VAT number.
- stdnum.pl.nip.validate(number)¶
Check if the number is a valid VAT number. This checks the length, formatting and check digit.