python-stdnum icon indicating copy to clipboard operation
python-stdnum copied to clipboard

Add support for Panama TIN

Open unho opened this issue 2 years ago • 2 comments

Note this only adds support for the legal person's TIN number.

Adding support for Natural persons should be fairly easy based on the algorithm descriptions in https://studylib.es/doc/545131/algoritmo-para-el-calculo-del-digito-verificador-de-la-ru and the Python script at https://github.com/apple314159/panama-dv The reason why I didn't add support for those is that it would complicate the compact method, and will require performing plenty of tweaks when calculating the check digit, and this doesn't seems straightforward when we don't have plenty of examples for some of these variants.

Closes #102

unho avatar Jan 09 '23 17:01 unho

@arthurdejong I am not sure what is wrong with the CI. It says there are some lines of code not covered by tests, but I am pretty sure I have added specific tests for those. Any idea?

unho avatar Jan 09 '23 18:01 unho

@arthurdejong I have managed to figure out what was wrong. PR ready to review.

unho avatar Jan 10 '23 11:01 unho