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

Adiciona Santander CNAB240 Remessa #254

Merged
merged 2 commits into from
Jan 12, 2024
Merged

Conversation

henriqueshiraishi
Copy link
Contributor

Implementação do CNAB240 de Remessa do Santander.

@@ -181,6 +181,7 @@ module Cnab240
autoload :BaseCorrespondente, 'brcobranca/remessa/cnab240/base_correspondente'
autoload :Caixa, 'brcobranca/remessa/cnab240/caixa'
autoload :BancoBrasil, 'brcobranca/remessa/cnab240/banco_brasil'
autoload :Santander, 'brcobranca/remessa/cnab240/santander'
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.

segmento_q << ''.rjust(19, ' ') # Reservado (uso Branco) 19
segmento_q
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/EmptyLinesAroundClassBody: Extra empty line detected at class body end.

segmento_q << pagamento.documento_avalista.to_s.rjust(15, '0') # documento sacador 15
segmento_q << pagamento.nome_avalista.format_size(40) # nome avalista 40
segmento_q << ''.rjust(12, '0') # Reservado (uso Branco) 12
segmento_q << ''.rjust(19, ' ') # Reservado (uso Branco) 19
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_q << pagamento.identificacao_avalista(false) # identificacao do sacador 1
segmento_q << pagamento.documento_avalista.to_s.rjust(15, '0') # documento sacador 15
segmento_q << pagamento.nome_avalista.format_size(40) # nome avalista 40
segmento_q << ''.rjust(12, '0') # Reservado (uso Branco) 12
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_q << pagamento.uf_sacado # uf 2
segmento_q << pagamento.identificacao_avalista(false) # identificacao do sacador 1
segmento_q << pagamento.documento_avalista.to_s.rjust(15, '0') # documento sacador 15
segmento_q << pagamento.nome_avalista.format_size(40) # nome avalista 40
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [113/80]

segmento_q << pagamento.documento_sacado.to_s.rjust(15, '0') # documento sacado 14
segmento_q << pagamento.nome_sacado.format_size(40) # nome cliente 40
segmento_q << pagamento.endereco_sacado.format_size(40) # endereco cliente 40
segmento_q << pagamento.bairro_sacado.format_size(15) # bairro 15
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [113/80]

segmento_q << pagamento.identificacao_sacado(false) # tipo insc. sacado 1
segmento_q << pagamento.documento_sacado.to_s.rjust(15, '0') # documento sacado 14
segmento_q << pagamento.nome_sacado.format_size(40) # nome cliente 40
segmento_q << pagamento.endereco_sacado.format_size(40) # endereco cliente 40
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [113/80]

segmento_q << pagamento.identificacao_ocorrencia # cod. movimento remessa 2
segmento_q << pagamento.identificacao_sacado(false) # tipo insc. sacado 1
segmento_q << pagamento.documento_sacado.to_s.rjust(15, '0') # documento sacado 14
segmento_q << pagamento.nome_sacado.format_size(40) # nome cliente 40
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [113/80]

segmento_q << ' ' # uso exclusivo 1
segmento_q << pagamento.identificacao_ocorrencia # cod. movimento remessa 2
segmento_q << pagamento.identificacao_sacado(false) # tipo insc. sacado 1
segmento_q << pagamento.documento_sacado.to_s.rjust(15, '0') # documento sacado 14
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_q << 'Q' # cod. segmento 1
segmento_q << ' ' # uso exclusivo 1
segmento_q << pagamento.identificacao_ocorrencia # cod. movimento remessa 2
segmento_q << pagamento.identificacao_sacado(false) # tipo insc. sacado 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [112/80]

@henriqueshiraishi henriqueshiraishi changed the title Adiciona Santander CNABb240 Remessa Adiciona Santander CNAB240 Remessa Jan 5, 2024
segmento_q << sequencial.to_s.rjust(5, '0') # num. sequencial do registro no lote 5
segmento_q << 'Q' # cod. segmento 1
segmento_q << ' ' # uso exclusivo 1
segmento_q << pagamento.identificacao_ocorrencia # cod. movimento remessa 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [112/80]

segmento_q << '3' # tipo de registro 1
segmento_q << sequencial.to_s.rjust(5, '0') # num. sequencial do registro no lote 5
segmento_q << 'Q' # cod. segmento 1
segmento_q << ' ' # uso exclusivo 1
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.
Metrics/LineLength: Line is too long. [112/80]

segmento_q << nro_lote.to_s.rjust(4, '0') # lote de servico 4
segmento_q << '3' # tipo de registro 1
segmento_q << sequencial.to_s.rjust(5, '0') # num. sequencial do registro no lote 5
segmento_q << 'Q' # cod. segmento 1
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.
Metrics/LineLength: Line is too long. [112/80]

segmento_q += cod_banco # codigo banco 3
segmento_q << nro_lote.to_s.rjust(4, '0') # lote de servico 4
segmento_q << '3' # tipo de registro 1
segmento_q << sequencial.to_s.rjust(5, '0') # num. sequencial do registro no lote 5
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.
Metrics/LineLength: Line is too long. [112/80]

segmento_q = '' # CAMPO TAMANHO
segmento_q += cod_banco # codigo banco 3
segmento_q << nro_lote.to_s.rjust(4, '0') # lote de servico 4
segmento_q << '3' # tipo de registro 1
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.
Metrics/LineLength: Line is too long. [112/80]

segmento_p << pagamento.codigo_protesto # cod. para protesto 1
segmento_p << pagamento.dias_protesto.to_s.rjust(2, '0') # dias para protesto 2
segmento_p << '3' # cod. para baixa 1
segmento_p << '0' # zero fixo 1
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_p << formata_documento_ou_numero(pagamento) # identificacao titulo empresa 25
segmento_p << pagamento.codigo_protesto # cod. para protesto 1
segmento_p << pagamento.dias_protesto.to_s.rjust(2, '0') # dias para protesto 2
segmento_p << '3' # cod. para baixa 1
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_p << pagamento.formata_valor_abatimento(15) # valor abatimento 15
segmento_p << formata_documento_ou_numero(pagamento) # identificacao titulo empresa 25
segmento_p << pagamento.codigo_protesto # cod. para protesto 1
segmento_p << pagamento.dias_protesto.to_s.rjust(2, '0') # dias para protesto 2
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.
Metrics/LineLength: Line is too long. [113/80]

segmento_p << pagamento.formata_valor_iof(15) # valor IOF 15
segmento_p << pagamento.formata_valor_abatimento(15) # valor abatimento 15
segmento_p << formata_documento_ou_numero(pagamento) # identificacao titulo empresa 25
segmento_p << pagamento.codigo_protesto # cod. para protesto 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [113/80]

segmento_p << pagamento.formata_valor_desconto(15) # valor desconto 15
segmento_p << pagamento.formata_valor_iof(15) # valor IOF 15
segmento_p << pagamento.formata_valor_abatimento(15) # valor abatimento 15
segmento_p << formata_documento_ou_numero(pagamento) # identificacao titulo empresa 25
Copy link
Collaborator

Choose a reason for hiding this comment

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

Metrics/LineLength: Line is too long. [114/80]

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Rubocop found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@kivanio kivanio merged commit 789af1c into kivanio:master Jan 12, 2024
6 of 10 checks passed
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