Skip to content

Commit

Permalink
Fix "nosso_numero" value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Furlan committed Jan 5, 2012
1 parent c26def8 commit 317de13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyboleto/bank/caixa.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs):
'''
self.inicio_nosso_numero = '80'

# Nosso numero (sem dv) sao 10 digitos
# Nosso numero (sem dv) sao 17 digitos
def _nosso_numero_get(self):
return self._nosso_numero
'''
Expand All @@ -31,7 +31,7 @@ def _nosso_numero_get(self):
def _nosso_numero_set(self, val):
try:
self._nosso_numero = self.inicio_nosso_numero + \
self.formata_numero(val, 8)
str(self.formata_numero(val, 15))
except AttributeError:
pass

Expand Down Expand Up @@ -72,3 +72,5 @@ def barcode(self):
num = num.replace('X', str(dv), 1)
return num

def format_nosso_numero(self):
return self._nosso_numero + '-' + str(self.dv_nosso_numero)

0 comments on commit 317de13

Please sign in to comment.