@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' : ''