Django

Code

Ticket #11000 (closed: duplicate)

Opened 9 months ago

Last modified 9 months ago

Spanish NIF/NIE not fully implemented

Reported by: Cesar Ortiz <cesar.ortiz@gmail.com> Assigned to: nobody
Milestone: Component: Uncategorized
Version: 1.0 Keywords: localfavlor es nie nif
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Attachments

Change History

05/04/09 09:05:03 changed by Cesar Ortiz <cesar.ortiz@gmail.com>

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

05/04/09 11:09:50 changed by ramiro

  • status changed from new to closed.
  • resolution set to duplicate.

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.


Add/Change #11000 (Spanish NIF/NIE not fully implemented)




Change Properties
Action