Skip to content

Commit

Permalink
boleto chave
Browse files Browse the repository at this point in the history
eduardokum committed Aug 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 57f33a9 commit d3141aa
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/Cnab/Remessa/Cnab400/Banco/Abc.php
Original file line number Diff line number Diff line change
@@ -211,20 +211,16 @@ public function addBoleto(BoletoContract $boleto)
$this->add(38, 81, Util::formatCnab('9', $nota1->getChave(), 44)); // Chave da nota 1

$nota2 = $boleto->getNotaFiscal(1);
if ($nota2->getChave()) {
$this->add(82, 96, Util::formatCnab('X', $nota2->getNumero(), 15)); // Numero da nota 2
$this->add(97, 109, Util::formatCnab('9', $nota2->getValor(), 11, 2)); // valor da nota 2
$this->add(110, 117, Util::formatCnab('9', $nota2->getData('dmY'), 8)); // data nota 2
$this->add(118, 161, Util::formatCnab('9', $nota2->getChave(), 44)); // Chave da nota 2
}
$this->add(82, 96, Util::formatCnab('X', $nota2->getNumero(), 15)); // Numero da nota 2
$this->add(97, 109, Util::formatCnab('9', $nota2->getValor(), 11, 2)); // valor da nota 2
$this->add(110, 117, Util::formatCnab('9', $nota2->getData('dmY'), 8)); // data nota 2
$this->add(118, 161, Util::formatCnab('9', $nota2->getChave(), 44)); // Chave da nota 2

$nota3 = $boleto->getNotaFiscal(2);
if ($nota3->getChave()) {
$this->add(162, 176, Util::formatCnab('X', $nota3->getNumero(), 15)); // Numero da nota 3
$this->add(177, 189, Util::formatCnab('9', $nota3->getValor(), 11, 2)); // valor da nota 3
$this->add(190, 197, Util::formatCnab('9', $nota3->getData('dmY'), 8)); // data nota 3
$this->add(198, 241, Util::formatCnab('9', $nota3->getChave(), 44)); // Chave da nota 3
}
$this->add(162, 176, Util::formatCnab('X', $nota3->getNumero(), 15)); // Numero da nota 3
$this->add(177, 189, Util::formatCnab('9', $nota3->getValor(), 11, 2)); // valor da nota 3
$this->add(190, 197, Util::formatCnab('9', $nota3->getData('dmY'), 8)); // data nota 3
$this->add(198, 241, Util::formatCnab('9', $nota3->getChave(), 44)); // Chave da nota 3

$this->add(395, 400, Util::formatCnab('9', $this->iRegistros + 1, 6));
}

0 comments on commit d3141aa

Please sign in to comment.