Skip to content

Commit

Permalink
Merge pull request #5 from viniciuseneas/master
Browse files Browse the repository at this point in the history
Correção de str_replace e atualização de configuração
  • Loading branch information
phlllpe authored Jun 28, 2018
2 parents b226a70 + 74b24ee commit d034b08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Builder/BBCnab400Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function detalhes()
$detalhe->setAceiteTitulo('N');
$detalhe->setDtEmissaoTitulo((new \DateTime($documento['dataEmissao']))->format('dmy'));
$detalhe->setInstrucaoCodificada1('00');
$detalhe->setInstrucaoCodificada2('');
$detalhe->setInstrucaoCodificada2('07');
$detalhe->setJurisMoraDia('');
$detalhe->setDtLimiteConcessaoDesconto('');
$detalhe->setVlDesconto('');
Expand Down
6 changes: 3 additions & 3 deletions src/Cnab/Cnab400/BB/Detalhe.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public function getVlTitulo()
*/
public function setVlTitulo($vlTitulo)
{
$vlTitulo = str_replace($vlTitulo, '.', '');
$vlTitulo = str_replace('.', '', $vlTitulo);

$this->vlTitulo = str_pad(substr($vlTitulo, 0, 13), 13, '0', STR_PAD_LEFT);
}
Expand Down Expand Up @@ -622,7 +622,7 @@ public function getJurisMoraDia()
*/
public function setJurisMoraDia($jurisMoraDia)
{
$this->jurisMoraDia = str_pad($jurisMoraDia, 13, ' ', STR_PAD_LEFT);
$this->jurisMoraDia = str_pad($jurisMoraDia, 13, '0', STR_PAD_LEFT);
}

/**
Expand All @@ -638,7 +638,7 @@ public function getDtLimiteConcessaoDesconto()
*/
public function setDtLimiteConcessaoDesconto($dtLimiteConcessaoDesconto)
{
$this->dtLimiteConcessaoDesconto = str_pad($dtLimiteConcessaoDesconto, 6, ' ', STR_PAD_LEFT);
$this->dtLimiteConcessaoDesconto = str_pad($dtLimiteConcessaoDesconto, 6, '0', STR_PAD_LEFT);
}

/**
Expand Down

0 comments on commit d034b08

Please sign in to comment.