Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Santander Remessa 240: Digito da Agência #257

Merged
merged 1 commit into from
May 17, 2024

Conversation

kaynnan
Copy link
Contributor

@kaynnan kaynnan commented May 14, 2024

Objetivo:

Correção do cálculo do Código da Conta Corrente para garantir a geração correta do arquivo REM ao consumir a API.

Detalhes:

O cálculo do Código da Conta Corrente estava apresentando falhas quando baseado no módulo 11. Entretanto, ao remover o cálculo, o arquivo REM é gerado corretamente.

Testes Realizados:

  • Número da conta: 01058941
  • Dígito verificador: 2

Antes:
image

Depois:

image

Durante os testes, o dígito da conta correto está em conformidade como esperado.

cc @marcelsavegnago @antoniospneto

conta_corrente.modulo11(mapeamento: { 10 => 'X', 11 => 'X' }).to_s
end


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/TrailingWhitespace: Trailing whitespace detected.

@@ -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.'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

conta_corrente.modulo11(mapeamento: { 10 => 'X', 11 => 'X' }).to_s
end


Check notice

Code scanning / Rubocop

Avoid trailing whitespace. Note

Layout/TrailingWhitespace: Trailing whitespace detected.
@kivanio kivanio merged commit cd928e8 into kivanio:master May 17, 2024
12 checks passed
@kaynnan kaynnan deleted the santander-fix-remessa240 branch May 17, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants