Skip to content

Commit

Permalink
fix PR #269
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokum committed Feb 21, 2018
1 parent c476b69 commit d950c25
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Bancoob.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%010s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%010s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '17', '50')) {
$this->totais['liquidados']++;
$d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Banrisul.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '17')) {
$this->totais['liquidados']++;
$ocorrencia = Util::appendStrings(
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Bb.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '17')) {
$this->totais['liquidados']++;
$ocorrencia = Util::appendStrings(
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Bradesco.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '17')) {
$this->totais['liquidados']++;
$ocorrencia = Util::appendStrings(
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Caixa.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '46')) {
$this->totais['liquidados']++;
$ocorrencia = Util::appendStrings(
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Itau.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 221, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 221, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '08', '10')) {
$this->totais['liquidados']++;
$d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Santander.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%010s', $this->rem(209, 218, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%010s', $this->rem(209, 218, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '09', '17')) {
$this->totais['liquidados']++;
$d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab240/Banco/Sicredi.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%08s', $this->rem(214, 223, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '17')) {
$this->totais['liquidados']++;
$d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab400/Banco/Banrisul.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected function processarDetalhe(array $detalhe)
/**
* ocorrencias
*/
$msgAdicional = str_split(sprintf('%010s', $this->rem(383, 392, $detalhe)), 2);
$msgAdicional = str_split(sprintf('%010s', $this->rem(383, 392, $detalhe)), 2) + array_fill(0, 5, '');
if ($d->hasOcorrencia('06', '25', '08')) {
$this->totais['liquidados']++;
$ocorrencia = Util::appendStrings(
Expand Down
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab400/Banco/Santander.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ protected function processarDetalhe(array $detalhe)
$d->setOcorrenciaTipo($d::OCORRENCIA_ALTERACAO);
} elseif ($d->hasOcorrencia('03')) {
$this->totais['erros']++;
$errorsRetorno = str_split(sprintf('%09s', $this->rem(137, 145, $detalhe)), 3);
$errorsRetorno = str_split(sprintf('%09s', $this->rem(137, 145, $detalhe)), 3) + array_fill(0, 3, '');
$error = [];
$error[] = array_get($this->rejeicoes, $errorsRetorno[0], '');
$error[] = array_get($this->rejeicoes, $errorsRetorno[1], '');
Expand Down
4 changes: 2 additions & 2 deletions src/Cnab/Retorno/Cnab400/Banco/Sicredi.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ protected function processarDetalhe(array $detalhe)
$d->setOcorrenciaTipo($d::OCORRENCIA_OUTROS);
}

$stringErrors = sprintf('%010s', $this->rem(319, 328, $detalhe));
$errorsRetorno = str_split($stringErrors, 2);
$stringErrors = sprintf('%010s', $this->rem(319, 328, $detalhe)) + array_fill(0, 5, '');
$errorsRetorno = str_split($stringErrors, 2) + array_fill(0, 5, '');
if (trim($stringErrors, '0') != '') {
$error = [];
$error[] = array_get($this->rejeicoes, $errorsRetorno[0], '');
Expand Down

0 comments on commit d950c25

Please sign in to comment.