stdnum.co.nit¶
NIT (Número De Identificación Tributaria, Colombian identity code).
This number, also referred to as RUT (Registro Unico Tributario) is the Colombian business tax number.
>>> validate('213.123.432-1')
'2131234321'
>>> validate('2131234325')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> format('2131234321')
'213.123.432-1'
- stdnum.co.nit.calc_check_digit(number)¶
Calculate the check digit. The number passed should not have the check digit included.
- stdnum.co.nit.compact(number)¶
Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.
- stdnum.co.nit.format(number)¶
Reformat the number to the standard presentation format.
- stdnum.co.nit.is_valid(number)¶
Check if the number is a valid NIT.
- stdnum.co.nit.validate(number)¶
Check if the number is a valid NIT. This checks the length, formatting and check digit.