@php $i = 0; @php $x = 0; {{-- Nível C.Custo --}} @foreach ($ret['ccustos'] as $ccusto) @php $ccusto_valor = "R$ ". number_format($ccusto->VALOR, 2, ',', '.') @php $ccusto_extra = "R$ ". number_format($ccusto->EXTRA, 2, ',', '.') @php $ccusto_total = "R$ ". number_format($ccusto->TOTAL, 2, ',', '.') @php $ccusto_outros = "R$ ". number_format($ccusto->OUTROS, 2, ',', '.') @php $ccusto_saldo = "R$ ". number_format($ccusto->SALDO, 2, ',', '.') @php $ccusto_util = $ccusto->CCUSTO <> 99999999999 ? "R$ ". number_format($ccusto->UTIL, 2, ',', '.') : '' @php $ccusto_perc = $ccusto->CCUSTO <> 99999999999 ? number_format($ccusto->PERC_UTIL, 2, ',', '.') .'%' : '' @php $ccusto_custo = isset($ccusto->CUSTO_SETOR) ? number_format($ccusto->CUSTO_SETOR, 2, ',', '.') . '%' : '' @php $i++ @php $negativo = floatval($ccusto->PERC_UTIL) > 100 ? 'negativo' : ''
{{-- Nível Data --}} @foreach ($ret['periodos'] as $periodo) @php $periodo_valor = "R$ ". number_format($periodo->VALOR, 2, ',', '.') @php $periodo_extra = "R$ ". number_format($periodo->EXTRA, 2, ',', '.') @php $periodo_total = "R$ ". number_format($periodo->TOTAL, 2, ',', '.') @php $periodo_outros = "R$ ". number_format($periodo->OUTROS, 2, ',', '.') @php $periodo_util = $periodo->CCUSTO <> 99999999999 ? "R$ ". number_format($periodo->UTIL, 2, ',', '.') : '' @php $periodo_saldo = "R$ ". number_format($periodo->SALDO, 2, ',', '.') @php $periodo_perc = $periodo->CCUSTO <> 99999999999 ? number_format($periodo->PERC_UTIL, 2, ',', '.') .'%' : '' @php $periodo_custo = isset($periodo->CUSTO_SETOR) ? number_format($periodo->CUSTO_SETOR, 2, ',', '.') . '%' : '' @if ($periodo->CCUSTO === $ccusto->CCUSTO) @php $x++ @php $periodo_id = $periodo->CCUSTO . $periodo->ANO . $periodo->MES @php $negativo = floatval($periodo->PERC_UTIL) > 100 ? 'negativo' : ''
{{-- Nível Conta Contábil --}} @foreach ($ret['contas'] as $conta) @if ($conta->CCUSTO === $periodo->CCUSTO && $conta->ANO === $periodo->ANO && $conta->MES === $periodo->MES ) @php $conta_id = $periodo_id . $conta->CCONTABIL @if ( $permissaoMenu->ALTERAR ) {{-- $EditRota = '' --}} @php $EditRota = '' @else @php $EditRota = '' @endif @php $DelClass = $permissaoMenu->EXCLUIR ? 'deletar' : '' @php $DelPerm = $permissaoMenu->EXCLUIR ? '' : 'disabled' @php $destaque = $conta->DESTAQUE == 1 ? 'destaque' : '' @php $negativo = floatval($conta->PERC_UTIL) > 100 ? 'negativo' : '' @php $totaliza = (($conta->TOTALIZA == 1) && ($conta->CCUSTO <> 9999999999)) ? '' : ''
    @php $count = 0 {{-- Nível Itém --}} @foreach($ret['itens'] as $iten) @if( $iten->CCUSTO === $conta->CCUSTO && $iten->CCONTABIL === $conta->CCONTABIL && $iten->MES === $conta->MES && $iten->ANO === $conta->ANO ) @php $nat_class = strripos($iten->NATUREZA,'D') === 0 ? 'nat-debito' : 'nat-credit' @php $nat_desc = strripos($iten->NATUREZA,'D') === 0 ? 'Natureza: Débito' : 'Natureza: Crédito'
  • {{ $iten->DESCRICAO }}
    R$ {{ number_format($iten->VALOR, 2, ',', '.') }}
    {{ $iten->NATUREZA }}
    {{ date_format(date_create($iten->DATA), 'd/m/Y') }}
  • @php $count++ @endif @endforeach
@endif @endforeach
@endif @endforeach
@endforeach