Instituições financeiras > Configurações das instituições financeiras para processamento de arquivos > Configuração de cobrança Banco Safra

Configuração de leiaute de remessa de cobrança em formato CNAB 400 para o Banco Safra

BANCOS.RQ-053

Fluxo normal

Cabeçalho

0
1
$str.rightPad("REMESSA",7)
01
$str.rightPad("COBRANCA",15)
$str.rightPad( $lop.retornarConvenio() , 14)
$str.repeat(" ", 6)
$str.rightPad($conta.valueOfNomeCedente(), 30).substring(0,30)
422
$str.rightPad("BANCO SAFRA",15)
$str.rightPad($banco.getDataAtual6Digitos(),6," ")
$str.repeat(" ", 291)
$str.leftPad($remessa,3,"0")
000001

Corpo

1
02
$str.rightPad($titulo.findEmitente().getDocumento("CNPJ").replace(".", "").replace("/", "").replace("-", ""),14,"0")
$str.rightPad( $lop.retornarConvenio() , 14)
$str.repeat(" ", 6)
$str.repeat(" ", 25)
$str.leftPad($titulo.valueOfNumeroBanco(), 9, "0")
$str.repeat(" ", 30)
0
00
$str.repeat(" ", 1)
$str.leftPad($lop.getDiasProtesto().toText(), 2, "0")
$str.leftPad($conta.getCarteira().toString(),1,"0")
00#*Ocorrencia cadastro*#
$str.rightPad($titulo.retornaNumeroDocumento(), 10," ").substring(0,10)
$str.rightPad($titulo.retornoDataVencimento6Digitos(),6,"0")
$str.leftPad($titulo.getValor().toText().replace(",", "").replace(".", ""),13,"0")
$str.repeat(" ", 3)
$str.repeat(" ", 5)
01
N
$str.rightPad($titulo.retornoDataEmissao6Digitos(),6,"0")
$str.leftPad($conta.valueOfCodigoInstrucaoBancaria1(), 2, "0")
$str.leftPad($conta.valueOfCodigoInstrucaoBancaria2(), 2, "0")
$str.leftPad($titulo.retornoJuroDia().replace(",", "").replace(".", ""),13,"0")
$str.rightPad($titulo.retornoDataVencimento6Digitos(),6,"0")
$str.leftPad($titulo.getDescontos().toText().replace(",", "").replace(".", ""),13,"0")
$str.repeat(" ", 13)
$str.leftPad($titulo.retornoAbatimento(),13,"0")
$str.leftPad($titulo.getPessoaTipo(), 2,"0")
$str.leftPad($titulo.getPessoaDocumento(), 14 )
$str.rightPad($titulo.getPessoaNome(), 40).substring(0,40)
$str.rightPad($titulo.getPessoaEndereco(),40).substring(0,40)
$str.repeat(" ", 10)
$str.repeat(" ", 2)
$str.rightPad($titulo.getPessoaCep().replace("-", "").replace(".", ""),8)
$str.rightPad($titulo.findDestinatario().findEndereco().findCidade().valueOfCidade(), 15).substring(0,15)
$str.rightPad($titulo.findDestinatario().findEndereco().findCidade().findRegiao().valueOfSigla(), 2)
$str.repeat(" ", 30)
$str.repeat(" ", 7)
422
$str.leftPad($remessa,3,"0")
$str.leftPad($sequencia,6,"0")

Rodapé

9#*identificação do registro*#
$str.repeat(" ", 367)
$str.leftPad($sequencia_itens,8,"0")#*Quantidade de titulos*#
$str.leftPad($valor_total_titulos.toText().replace(",", "").replace(".", ""),15,"0")#*Valor total do arquivo*#
$str.leftPad($remessa,3,"0")
$str.leftPad($sequencia,6,"0")