PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Codice Fiscale Italia
Codice Fiscale Italia
Débuté par Nappo sabato, 09 aoû. 2024 10:05 - 3 réponses
Posté le 09 août 2024 - 10:05
Non riesco ad inserire il codice fiscale in un edit con controllo codice fiscale Italia.

SLAHMZ04T28Z330U

Ma il codice fiscale è corretto.
Qualche soluzione?
Grazie.
Membre enregistré
214 messages
Popularité : +1 (1 vote)
Posté le 22 août 2024 - 12:21
Nappo sabato wrote:
Non riesco ad inserire il codice fiscale in un edit con controllo codice fiscale Italia.

SLAHMZ04T28Z330U

Ma il codice fiscale è corretto.
Qualche soluzione?
Grazie.


Good day

If you go check the control code you will see:

CASE "IT"
nMinSize = 11
sTextAfter = NoLetter(sTextAfter[[1 TO 11]])


Just adjust that so it works for you

Regards

Ruan
Posté le 22 août 2024 - 13:35
Thanks to this post, I’m discovering the functions for managing administrative IDs.
On my end, your codice fiscale is valid using the Italy.CheckTaxNumber function.

I have a medical app that checks the validity of these codes for many countries (BTW I noticed that the NHS number is missing from the Windev functions). I’d recommend writing your own functions rather than relying on those provided by PCSoft.

This way, you won’t end up in a situation where the check fails due to a change in the algorithm or a PCSoft bug that forces you to urgently migrate to the latest version of Windev prior to deploy a patch.
Generally, these algorithms are available for free in JAVA and are easily translatable to Windev.
This is a tip from 25 years of experience with PC Soft!
Posté le 22 août 2024 - 14:42
In fact, I realize that you were referring to the control with the Codice Fiscale mask, which indeed does not work with your valid example. This makes my previous comment even more relevant!