CUIT (Código Único de Identificación Tributaria, Argentinian tax number).
The CUIT is a taxpayer identification number used for VAT (IVA, Impuesto al Valor Agregado) and other taxes.
>>> validate('200-5536168-2')
'20055361682'
>>> validate('2026756539')
Traceback (most recent call last):
...
InvalidLength: ...
>>> validate('2026756A393')
Traceback (most recent call last):
...
InvalidFormat: ...
>>> validate('20267565392')
Traceback (most recent call last):
...
InvalidChecksum: ...
Traceback (most recent call last):
...
InvalidChecksum: ...
Calculate the check digit.
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Checks to see if the number provided is a valid CUIT.
Checks to see if the number provided is a valid CUIT.