@php $total = 0; @php $vl_total = 0; @php $max_tam = 0; @php $lista_tamanhos_final = []; @forelse ($modelos as $key => $item) @php $last_modelo = 0; @php $vl_total2 = 0; @php $max_tam = $max_tam < count($item->LISTA_TAMANHOS) ? count($item->LISTA_TAMANHOS) : $max_tam @php $total_cor = $item->LISTA_TAMANHOS; @foreach($item->LISTA_TAMANHOS as $tamanho) @php $tamanho->TOTAL = 0; @foreach($item->ARRAY_CORES as $cores) @foreach($cores->ARRAY_GRADE as $grade) @if($tamanho->DESC_TAMANHO == $grade->DESC_TAMANHO) @php $tamanho->TOTAL += intval($grade->QUANTIDADE); $last_modelo += intval($grade->QUANTIDADE); @endif @endforeach @endforeach @endforeach @foreach ($item->LISTA_TAMANHOS as $grade_tamanho) @endforeach @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif @foreach($item->ARRAY_CORES as $cores) @php $vl_total = $vl_total + ($cores->TOTAL * $cores->VALOR_UNITARIO); @php $vl_total2 = $vl_total2 + ($cores->TOTAL * $cores->VALOR_UNITARIO); @foreach ($cores->ARRAY_GRADE as $grade_tamanho) @if(intval($grade_tamanho->QUANTIDADE) > 0) @endif @if(intval($grade_tamanho->QUANTIDADE) == 0) @endif @endforeach @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif @endforeach @foreach ($item->LISTA_TAMANHOS as $grade_tamanho) @php $lista_tamanhos_final = $item->LISTA_TAMANHOS; @if(intval($grade_tamanho->TOTAL) > 0) @endif @if(intval($grade_tamanho->TOTAL) == 0) @endif @endforeach @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif @if(isset($exibe_obs) && $exibe_obs == 1) @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif @if(isset($exibe_vlr) && $exibe_vlr != 1) @endif @endif @php $total = $total + $item->TOTAL; @empty @foreach ($item->LISTA_TAMANHOS as $grade_tamanho) @endforeach @endforelse @foreach ($item->LISTA_TAMANHOS as $grade_tamanho) @endforeach @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif
{{ fn_lpad($item->MODELO_ID, 5 ,'0') .' - '. $item->MODELO_DESCRICAO}}{{$grade_tamanho->DESC_TAMANHO}}TotalVl.Unit Vl.Total
{{ fn_lpad($cores->COR_ID, 4, '0') .' - '. $cores->COR_DESCRICAO}}{{ intval($grade_tamanho->QUANTIDADE) }}{{ number_format(intval($cores->TOTAL),0, ',', '.') }}R$ {{ number_format($cores->VALOR_UNITARIO,2, ',', '.') }} R$ {{ number_format(($cores->TOTAL * $cores->VALOR_UNITARIO),2, ',', '.') }}
TOTAL{{ intval($grade_tamanho->TOTAL) }}{{ intval($last_modelo) }} R$ {{ number_format($vl_total2,2, ',', '.') }}
OBSERVAÇÕES
{{ $item->OBSERVACAO }}
OBSERVAÇÕES
{{ $item->OBSERVACAO }}
TOTAL DOS MODELOS{{ intval($total) }} R$ {{ number_format($vl_total,2, ',', '.') }}