From 9cf7260fa74ce27dbc986c4bcb0657a5b0f0d873 Mon Sep 17 00:00:00 2001 From: Chrystian Toigo Date: Sun, 6 Jan 2019 16:08:41 -0200 Subject: [PATCH] Homologado arquivo retorno da SICREDI --- README.md | 2 +- src/Cnab/Retorno/Cnab400/Banco/Sicredi.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f01581e..3931c88 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Banco | Boleto | Remessa 400 | Remessa 240 | Retorno 400 | Retorno 240 Hsbc | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | Itau | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | Santander | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - Sicredi | :white_check_mark: | :white_check_mark: | | :eight_pointed_black_star: | | + Sicredi | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | Banco do Nordeste | :eight_pointed_black_star: | :eight_pointed_black_star: | | | | **\:eight_pointed_black_star: necessita de homologação** diff --git a/src/Cnab/Retorno/Cnab400/Banco/Sicredi.php b/src/Cnab/Retorno/Cnab400/Banco/Sicredi.php index 9c20884..d35ba5e 100644 --- a/src/Cnab/Retorno/Cnab400/Banco/Sicredi.php +++ b/src/Cnab/Retorno/Cnab400/Banco/Sicredi.php @@ -237,11 +237,11 @@ protected function processarDetalhe(array $detalhe) { $d = $this->detalheAtual(); $d->setNossoNumero($this->rem(48, 62, $detalhe)) - ->setNumeroDocumento($this->rem(117, 126, $detalhe)) ->setOcorrencia($this->rem(109, 110, $detalhe)) + ->setNumeroDocumento($this->rem(117, 126, $detalhe)) ->setOcorrenciaDescricao(array_get($this->ocorrencias, $d->getOcorrencia(), 'Desconhecida')) - ->setDataOcorrencia($this->rem(111, 116, $detalhe)) - ->setDataVencimento($this->rem(147, 152, $detalhe)) + ->setDataOcorrencia($this->rem(111, 116, $detalhe), 'dmy') + ->setDataVencimento($this->rem(147, 152, $detalhe), 'dmy') ->setValor(Util::nFloat($this->rem(153, 165, $detalhe)/100, 2, false)) ->setValorTarifa(Util::nFloat($this->rem(176, 188, $detalhe)/100, 2, false)) ->setValorAbatimento(Util::nFloat($this->rem(228, 240, $detalhe)/100, 2, false)) @@ -249,9 +249,9 @@ protected function processarDetalhe(array $detalhe) ->setValorRecebido(Util::nFloat($this->rem(254, 266, $detalhe)/100, 2, false)) ->setValorMora(Util::nFloat($this->rem(267, 279, $detalhe)/100, 2, false)) ->setValorMulta(Util::nFloat($this->rem(280, 292, $detalhe)/100, 2, false)) - ->setDataCredito(Util::nFloat($this->rem(329, 336, $detalhe)/100, 2, false)); - - $this->totais['valor_recebido'] += $d->getValorRecebido(); + ->setDataCredito($this->rem(329, 336, $detalhe), 'Ymd'); + + $this->totais['valor_recebido'] += (double)$d->getValorRecebido(); if ($d->hasOcorrencia('06', '15', '16')) { $this->totais['liquidados']++;