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

processarDetalhe() protected method

protected processarDetalhe ( array $detalhe )
$detalhe array
    protected function processarDetalhe(array $detalhe)
    {
        $d = $this->detalheAtual();
        $d->setNossoNumero($this->rem(63, 73, $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))->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))->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));
        $this->totais['valor_recebido'] += $d->getValorRecebido();
        if ($d->hasOcorrencia('06', '07', '15', '16', '31', '32', '33', '36', '38', '39')) {
            $this->totais['liquidados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_LIQUIDADA);
        } elseif ($d->hasOcorrencia('02')) {
            $this->totais['entradas']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_ENTRADA);
        } elseif ($d->hasOcorrencia('09', '10', '16')) {
            $this->totais['baixados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_BAIXADA);
        } elseif ($d->hasOcorrencia('37')) {
            $this->totais['protestados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_PROTESTADA);
        } elseif ($d->hasOcorrencia('14', '49')) {
            $this->totais['alterados']++;
            $d->setOcorrenciaTipo($d::OCORRENCIA_ALTERACAO);
        } elseif ($d->hasOcorrencia('03')) {
            $this->totais['erros']++;
            $d->setError(array_get($this->rejeicoes, $this->rem(302, 303, $detalhe), 'Consulte seu Internet Banking'));
        } else {
            $d->setOcorrenciaTipo($d::OCORRENCIA_OUTROS);
        }
        return true;
    }