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

Correções nos arquivos de remessa (Base e Bradesco) #93

Merged
merged 1 commit into from
Jul 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/brcobranca/remessa/cnab400/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def data_geracao
#
def monta_header
# CAMPO TAMANHO VALOR
# tipo do registro [1] 1
# tipo do registro [1] 0
# operacao [1] 1
# literal remessa [7] REMESSA
# cod. servico [15] COBRANCA
Expand All @@ -31,7 +31,7 @@ def monta_header
# data geracao [6] formato DDMMAA
# complemento registro [294]
# num. sequencial [6] 000001
"11REMESSA01COBRANCA #{info_conta}#{empresa_mae.to_s.ljust(30, ' ')}#{cod_banco}#{nome_banco}#{data_geracao}#{complemento}000001"
"01REMESSA01COBRANCA #{info_conta}#{empresa_mae.to_s.ljust(30, ' ')}#{cod_banco}#{nome_banco}#{data_geracao}#{complemento}000001"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is too long. [145/80]

end

# Trailer do arquivo remessa
Expand Down
6 changes: 3 additions & 3 deletions lib/brcobranca/remessa/cnab400/bradesco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ def monta_detalhe(pagamento, sequencial)
detalhe << ''.rjust(1, '0') # digito da conta corrente (op) X[01] 020 a 020
detalhe << identificacao_empresa # identficacao da empresa X[17] 021 a 037
detalhe << ''.rjust(25, ' ') # num. controle X[25] 038 a 062
detalhe << cod_banco # codigo do banco 9[03] 063 a 065
detalhe << ''.rjust(3, '0') # codigo do banco (debito automatico apenas) 9[03] 063 a 065
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is too long. [137/80]
Unnecessary spacing detected.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

detalhe << ''.rjust(1, '0') # campo da multa 9[01] 066 a 066 *
detalhe << ''.rjust(4, '0') # percentual multa 9[04] 067 a 070 *
detalhe << pagamento.nosso_numero.to_s.rjust(11, '0') # identificacao do titulo (nosso numero) 9[11] 071 a 081
detalhe << digito_nosso_numero(pagamento.nosso_numero) # digito de conferencia do nosso numero (dv) X[01] 082 a 082
detalhe << digito_nosso_numero(pagamento.nosso_numero).to_s # digito de conferencia do nosso numero (dv) X[01] 082 a 082
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is too long. [137/80]

detalhe << ''.rjust(10, '0') # desconto por dia 9[10] 083 a 092
detalhe << '2' # condicao emissao boleto (2 = cliente) 9[01] 093 a 093
detalhe << 'N' # emite boleto para debito X[01] 094 a 094
detalhe << ''.rjust(10, ' ') # operacao no banco (brancos) X[10] 095 a 104
detalhe << ' ' # indicador rateio X[01] 105 a 105
detalhe << ' ' # endereco para aviso debito (op) 9[01] 106 a 106
detalhe << '2' # endereco para aviso debito (op 2 = ignora) 9[01] 106 a 106
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is too long. [137/80]
Unnecessary spacing detected.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

detalhe << ''.rjust(2, ' ') # brancos X[02] 107 a 108
detalhe << '01' # identif. da ocorrencia 9[02] 109 a 110
detalhe << pagamento.nosso_numero.to_s.rjust(10, ' ') # numero do documento alfanum. X[10] 111 a 120
Expand Down