Skip to content

Commit

Permalink
[FIX] Santander Remessa 240: Digito da Agência (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynnan committed May 17, 2024
1 parent 12ff0ce commit cd928e8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/brcobranca/remessa/cnab240/santander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: ' ',
Expand All @@ -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
Expand Down

0 comments on commit cd928e8

Please sign in to comment.