Skip to content

Commit

Permalink
Merge pull request #7 from GMakarenko/fix-validation-number-conditions
Browse files Browse the repository at this point in the history
Fix residuo conditions
  • Loading branch information
rootsantiago authored Sep 26, 2021
2 parents 21c15f7 + f175186 commit ade92d9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pyfiscal/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,18 @@ def verification_number(self, rfc):

if residuo == 0:
digito = '0'
elif residuo > 0:
digito = str((11-residuo))
elif residuo == 10:
digito = 'A'
return digito

return digito
if residuo > 0:
digito = str((11 - residuo))

if digito == '10':
digito = 'A'
return digito

return digito

return digito


@property
Expand Down

0 comments on commit ade92d9

Please # to comment.