From ef0a6697ab1a51090a5201febe4529f95f0d7600 Mon Sep 17 00:00:00 2001 From: Kaynnan Lemes Date: Tue, 14 May 2024 17:21:14 -0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20Santander=20Remessa=20240:=20Digito=20d?= =?UTF-8?q?a=20Ag=C3=AAncia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/brcobranca/remessa/cnab240/santander.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/brcobranca/remessa/cnab240/santander.rb b/lib/brcobranca/remessa/cnab240/santander.rb index 08aa62aa..0ff7dc05 100644 --- a/lib/brcobranca/remessa/cnab240/santander.rb +++ b/lib/brcobranca/remessa/cnab240/santander.rb @@ -12,6 +12,7 @@ class Santander < Brcobranca::Remessa::Cnab240::Base validates_length_of :codigo_transmissao, maximum: 15, message: 'deve ter no máximo 15 dígitos.' validates_length_of :agencia, maximum: 4, message: 'deve ter 4 dígitos.' validates_length_of :conta_corrente, maximum: 9, message: 'deve ter 9 dígitos.' + validates_length_of :digito_conta, is: 1, message: 'deve ter 1 dígito.' def initialize(campos = {}) campos = { emissao_boleto: ' ', distribuicao_boleto: ' ', @@ -26,11 +27,7 @@ def codigo_transmissao=(valor) def digito_agencia agencia.modulo11(mapeamento: { 10 => 'X', 11 => 'X' }).to_s end - - def digito_conta - conta_corrente.modulo11(mapeamento: { 10 => 'X', 11 => 'X' }).to_s - end - + def complemento_header ''.rjust(29, ' ') end