stdnum.sn.ninea¶
NINEA (Numéro d’Identification Nationale des Entreprises et Associations, Senegal tax number).
The National Identification Number for Businesses and Associations (NINEA) is a unique tax identifier for tax purposes in Senegal.
This number consists of 7 digits and is usually followed by a 3 digit tax identification code called COFI (Code d’Identification Fiscale) that is used to indicate the company’s tax status and legal structure.
More information:
https://www.wikiprocedure.com/index.php/Senegal%5F-_Obtain_a_Tax_Identification_Number
https://nkac-audit.com/comprendre-le-ninea-votre-guide-de-lecture-simplifie/
>>> validate('306 7221')
'3067221'
>>> validate('30672212G2')
'30672212G2'
>>> validate('3067221 2G2')
'30672212G2'
>>> validate('3067222')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('1234567 0AZ')
Traceback (most recent call last):
...
InvalidComponent: ...
>>> format('30672212G2')
'3067221 2G2'
- stdnum.sn.ninea.compact(number: str) str¶
Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.sn.ninea.format(number: str) str¶
Reformat the number to the standard presentation format.
- stdnum.sn.ninea.is_valid(number: str) bool¶
Check if the number is a valid Senegal NINEA.
- stdnum.sn.ninea.validate(number: str) str¶
Check if the number is a valid Senegal NINEA.
This checks the length and formatting.