DavidePastore / codice-fiscale

A PHP library to calculate and check the italian tax code (codice fiscale).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with omocodia

miscellone opened this issue · comments

Hi Davide,

I found a problem with the CF validation in the case of omocodia. Seems the standard algorithm to substitute one digit at a time beginning from most right is not valid anymore. For example, in the code

CNTFNC84R44H5L1E (instead of standard CNTFNC84R44H501T)

the substituted digit is the second from the right. This code is valid, as you can check on the official site:

https://telematici.agenziaentrate.gov.it/VerificaCF/VerificaCf.do
CNTFNC84R44H5L1E

Please let me know if the validation in your project could be adjusted accordingly.

Thanks,
Mikhail

Hi @miscellone, thanks for your reporting. Can you please include information (all the ones required for the calculation) about the subject of the CF to understand where the problem lies? Thanks.

Hi @DavidePastore, it is a real person and I wouldn't like to leave here the name and birthday because of privacy. If you agree I will send you the data in a private email.

The different omocodia levels are 128 and we should be sure to follow the process indicated here (search for the string "H5L1" to find the interesting section).