From 92e8200bbe06db1663529bdc1eb3423cae702ee8 Mon Sep 17 00:00:00 2001 From: Jhonatan Eduardo Date: Mon, 26 Feb 2018 15:37:59 -0300 Subject: [PATCH 1/2] Habilita o objeto BoletoCaixaSigcb --- pyboleto/bank/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyboleto/bank/__init__.py b/pyboleto/bank/__init__.py index 99ed096..3f7ab0d 100644 --- a/pyboleto/bank/__init__.py +++ b/pyboleto/bank/__init__.py @@ -4,7 +4,7 @@ '001': 'bancodobrasil.BoletoBB', '041': 'banrisul.BoletoBanrisul', '237': 'bradesco.BoletoBradesco', - '104': 'caixa.BoletoCaixa', + '104': 'caixa_sigcb.BoletoCaixaSigcb', '399': 'hsbc.BoletoHsbc', '341': 'itau.BoletoItau', '356': 'real.BoletoReal', From 08f75e315843e4532ec19df2f1da091c35d3aea9 Mon Sep 17 00:00:00 2001 From: Jhonatan Eduardo Date: Tue, 20 Mar 2018 09:52:13 -0300 Subject: [PATCH 2/2] Substitui campo conta_cedente pelo campo convenio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Essa alteração foi uma orientação do próprio banco da Caixa. Sem essa informação não é possível realizar e leitura do código de barras. --- pyboleto/bank/caixa_sigcb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyboleto/bank/caixa_sigcb.py b/pyboleto/bank/caixa_sigcb.py index 96f582e..54cfa27 100644 --- a/pyboleto/bank/caixa_sigcb.py +++ b/pyboleto/bank/caixa_sigcb.py @@ -9,7 +9,7 @@ class BoletoCaixaSigcb(BoletoData): ''' agencia_cedente = CustomProperty('agencia_cedente', 4) - conta_cedente = CustomProperty('conta_cedente', 6) + convenio = CustomProperty('convenio', 6) nosso_numero = CustomProperty('nosso_numero', 17) def __init__(self): @@ -23,8 +23,8 @@ def __init__(self): @property def campo_livre(self): # 24 digits content = "%6s%1s%3s%1s%3s%1s%9s" % ( - self.conta_cedente.split('-')[0], - self.modulo11(self.conta_cedente.split('-')[0]), + self.convenio.split('-')[0], + self.modulo11(self.convenio.split('-')[0]), self.nosso_numero[2:5], self.nosso_numero[0:1], self.nosso_numero[5:8],