Opened 16 years ago

Closed 16 years ago

#11000 closed (duplicate)

Spanish NIF/NIE not fully implemented

Reported by: Cesar Ortiz <cesar.ortiz@…> Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords: localfavlor es nie nif
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the file http://code.djangoproject.com/browser/django/trunk/django/contrib/localflavor/es/forms.py,

the calculation of the nif/nif is not totally implemented.
The nif_get_checksum() call, only will work for the letter X.
It should be upgraded to support letters Y and Z.

Furthemore the following definition is wrong:

self.nie_types = 'XT'

'T' is not a NIE type. I guess it shoudl be an 'Y'.

When the number for a nie is calculated, the X,Y and Z should be replaced by 0,1 and 2.

More info (there is talked about the Y but not about the Z): http://es.wikibooks.org/wiki/Algoritmo_para_obtener_la_letra_del_NIF

Change History (2)

comment:1 by Cesar Ortiz <cesar.ortiz@…>, 16 years ago

comment:2 by Ramiro Morales, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #10204. Please post you comments regarding the 'T' prefix there or better yet, coordinate with the reporter of that ticket to arrive at a correct, comprehensive patch.

Note: See TracTickets for help on using tickets.
Back to Top