Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix residuo conditions #7

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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