Skip to content

Commit

Permalink
fix bradesco
Browse files Browse the repository at this point in the history
  • Loading branch information
felipepaloschi committed Mar 1, 2018
1 parent 95634d0 commit 9276f86
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions br_cnab/febraban/cnab_240/bancos/bradesco.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ def __init__(self):
from cnab240.bancos import bradesco
self.bank = bradesco

def get_identificacao_titulo(self, line):
identificacao = 0
carteira = line.payment_mode_id.boleto_carteira

return identificacao

def _prepare_header(self):
vals = super(Bradesco240, self)._prepare_header()
vals['servico_servico'] = 1
vals['cedente_convenio'] = self.order.payment_mode_id.bank_account_id.\
codigo_convenio
vals['controlecob_numero'] = self.order.id
vals['controlecob_data_gravacao'] = self.data_hoje()
vals['codigo_moeda'] = 9
return vals

def _prepare_segmento(self, line):
Expand All @@ -33,8 +42,7 @@ def _prepare_segmento(self, line):
vals['desconto1_percentual'] = Decimal('0.00')
vals['valor_iof'] = Decimal('0.00')
# vals['cobrancasimples_valor_titulos'] = Decimal('02.00')
vals['identificacao_titulo_banco'] = int(
vals['identificacao_titulo_banco'])
vals['identificacao_titulo_banco'] = self.get_identificacao_titulo(line)
vals['cedente_conta_dv'] = unicode(str(
vals['cedente_conta_dv']), "utf-8")
vals['cedente_agencia_dv'] = unicode(str(
Expand Down

0 comments on commit 9276f86

Please sign in to comment.