Eduardokum\LaravelBoleto\Cnab\Retorno\Cnab400\Banco\Itau::processarDetalhe PHP Method

processarDetalhe() protected method

protected processarDetalhe ( array $detalhe )
$detalhe array
    protected function processarDetalhe(array $detalhe)
    {
        $d = $this->detalheAtual();
        $d->setNossoNumero($this->rem(86, 94, $detalhe))->setNumeroDocumento($this->rem(117, 126, $detalhe))->setOcorrencia($this->rem(109, 110, $detalhe))->setOcorrenciaDescricao(array_get($this->ocorrencias, $d->getOcorrencia(), 'Desconhecida'))->setDataOcorrencia($this->rem(111, 116, $detalhe))->setDataVencimento($this->rem(147, 152, $detalhe))->setDataCredito($this->rem(296, 301, $detalhe))->setValor(Util::nFloat($this->rem(153, 165, $detalhe) / 100, 2, false))->setValorTarifa(Util::nFloat($this->rem(176, 188, $detalhe) / 100, 2, false))->setValorIOF(Util::nFloat($this->rem(215, 227, $detalhe) / 100, 2, false))->setValorAbatimento(Util::nFloat($this->rem(228, 240, $detalhe) / 100, 2, false))->setValorDesconto(Util::nFloat($this->rem(241, 253, $detalhe) / 100, 2, false))->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));
        if ($d->hasOcorrencia('06', '07', '08', '10', '59')) {
            $this->totais['liquidados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
        } elseif ($d->hasOcorrencia('02', '64', '71', '73')) {
            $this->totais['entradas']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_ENTRADA);
        } elseif ($d->hasOcorrencia('05', '09', '47', '72')) {
            $this->totais['baixados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_BAIXADA);
        } elseif ($d->hasOcorrencia('32')) {
            $this->totais['protestados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_PROTESTADA);
        } elseif ($d->hasOcorrencia('14')) {
            $this->totais['alterados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_ALTERACAO);
        } elseif ($d->hasOcorrencia('03', '15', '16', '60', '03')) {
            $this->totais['erros']++;
            $d->setError('Consulte seu Internet Banking');
        } else {
            $d->setOcorrenciaTipo($d::OCORRENCIA_OUTROS);
        }
        return true;
    }