Commit 45095c29 authored by Kevin Deldycke's avatar Kevin Deldycke

control keys must be return with 2 digits


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3125 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 271f8ebe
......@@ -114,7 +114,8 @@ class BankAccount(Folder, Coordinate):
n += table[c.upper()]
if c.isdigit():
n += c
return str(98 - (int(n) % 97))
key = str(98 - (int(n) % 97))
return key.zfill(2)
security.declareProtected(Permissions.View, 'getBban')
......@@ -174,5 +175,6 @@ class BankAccount(Folder, Coordinate):
branch += ('0' * (5 - len(branch)))
s = (bank + branch + ban).upper()
key = str(97 - ((transcode(s) * 100) % 97))
return key.zfill(2)
return str(97 - ((transcode(s) * 100) % 97))
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment