App Codice fiscale..è un impresa farla!

@TIMAI2 anni fa mi dicesti che non era possibile creare un'app del codice fiscale con Mit App Inventor; avevi ragione, difatti ho visto chi l'ha creata utilizzando il codice di programmazione in C :astonished:
Saluti
Nicola

Secondo me è possibile, esistono esempi addirittura in VBA per excel, però non è facile ed occorre utilizzare archivi per cercare i codici delle nazioni e città

1 Like

I actually said that it was a "world of mystery, best left to the tax collectors!"

You can do it, but you would need a very good understanding of the tax rules for a country, and how they are applied, and be able to keep up with any changes to tax rules that are made. The rules are likely to be complex for earnings/tax bands, age groups, professions, compensations, exemptions, avoidance and evasion. You could consider a simplified version, to give users a rough estimate.

See here for one such thing provided in the UK:

https://www.moneysavingexpert.com/tax-calculator/

2 Likes

Why? It is a well known and simple algorithm and it may be implemented in any language, also using AI2. Here you can find one of the simplest descriptions: https://www.alus.it/pubs/CodiceFiscale/index.php?lang=it

The "most" difficult thing is to create a function to say if a character is a vowel or a consonant so... it is quite simple.

Ho letto tutta la descrizione di cui è composto un codice fiscale; ma haimè per me, rimane comunque complesso implementarlo in AI2.

È complesso con qualsiasi linguaggio, non solo con ai2, ma a cosa ti serve farlo tu? Di app ce ne sono tante.

Lo so che ce ne sono tante..ma era un modo per mettermi in gioco..

Ora sai che è possibile, basta avere la volontà di farlo, dividi il progetto in più moduli e affrontare uno alla volta

Ci proverò..

No, it is very simple, there are all the logic and text functions needed, it takes not more than 4 hours of work. It is not a problem of AI2, you have to analize the problem and implement it in the simplest way you can. My suggestion is to start field by field after define the output. The output has to be a string of 16 chars. Start producing the first 3 chars for the family name, then everything else will be simpler.

1 Like

For the other English natives here, it turns out that the tax code under discussion is a fixed length alphanumeric hash of a taxpayer's

  • first name
  • last name
  • date of birth
  • gender
  • place of birth

Capture

Unfortunately, I know of no English version of that.

2 Likes

Va bene, cercherò di fare del mio meglio, grazie @mmanca e @ABG per il vostro supporto.
Saluti
Nicola

It is an Italian code assigned to every person not only to pay taxes. It is a sort of "plate" for humans. And because it is for italians I do not think that exists in other languages.
Cognome=family name
Nome=name
Data di nascita=birth date
Sesso=gender M=male F=female
Luogo di nascita=birth place (italain city/municipality or foreign state for people birth out of Italy)
Codice fiscale: tax code (this is the result after pressing the button CALCOLA.
CALCOLA=Calculate (better to write "EXECUTE")
Reimposta=Cancel

Ciao Nicola
Questo è il classico esempio di programmazione a scatole cinesi.
Tu devi implementare 6 funzioni con i relativi metodi, una per ogni variante.
Le varianti sono:

Nome ,
Cognome,
Sesso,
Luogo di nascita,
Data di nascita
Carattere di controlllo.
Io ti consiglio di fare un interfaccia a piu pagine per non trovarti con una grande quantita' di blocchi su una singola pagina,e di concatenare le varianti in uscita nella pagina finale.
Codice fiscale=nome+cognome+sesso+luogodinascita+datadinascita+caratteredicontrollo.
Buon lavoro.
Marco

Hello Nicola
This is the classic example of Chinese box programming.
You have to implement 6 functions with related methods, one for each variant.
The variants are:

First name ,
Last name,
Gender,
Birth place,
Date of birth
Character to check it.
I advise you to make a multipage interface so as not to find yourself with a large amount of blocks on a single page, and to concatenate the variants in output in the final page.
Tax code = name + surname + gender + place of birth + date of birth + control character.
Good job.
Marco

Ciao @marco_tanzi, grazie..ci sarà da lavorare tantissimo..spero di farcela.
Saluti
Nicola

Ho sviluppato un estensione e ti posso assicurare che con molto impegno e' possibile svilupparla con il codice a blocchi di AppInventor2.
Guarda l'esempio su codepen per capire la tecnica.

I have developed an extension and I can assure you that with a lot of effort it is possible to develop it with the block code of AppInventor2
See the example on codepen to understand the technique.

1 Like