django/django — pull request #194 by kevinschaul (2012-07-09 04:03:45+00:00)
Title: [1.4.x] Fixed #18537 -- Fixed calculation of CUIT

Added check for corner cases in calculation. The procdure for the
calculation this code is based on is outlined at the Spanish Wikipedia
entry for Código_Único_de_Identificación_Tributaria:

http://es.wikipedia.org/wiki/
C%C3%B3digo_%C3%9Anico_de_Identificaci%C3%B3n_Tributaria

Added check for a legal type (the first two digits of the CUIT,
according to the same Wikipedia article.

Added tests for corner cases of CUIT calculation, and for legal type
checking. The improved algorithm was added at commit:
d03b6eac56e83425ea4b02ed611e63335768710a