[FIX] strip the P for doing the eleven test

This commit is contained in:
Holger Brunn
2013-01-27 12:28:10 +01:00
parent 9b47ef9da4
commit 229f33d020

View File

@@ -320,7 +320,7 @@ class Payment(Transaction):
def __init__(self, *args, **kwargs):
reknr = kwargs['accountno_beneficiary']
if len(reknr.lstrip('0P')) > 7:
if not eleven_test(reknr):
if not eleven_test(reknr.lstrip('P')):
raise ValueError, '%s is not a valid bank account' % reknr
kwargs['type_'] = 5
self.name = NameBeneficiaryRecord()