@php $total = 0; @php $vl_total = 0; @php $collspan_total_mod = 2; @php $collspan_total = 2; @php $collspan_obs = 5; @php $parametro_cor_descricao = fn_parametro('SISTEMA.DESCRICAO_COR_CONSUMO'); @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 @if($exibe_foto == 1) @php $collspan_total = 3; @php $collspan_obs = 6; @php $rows = count($item->ARRAY_CORES) > 0 ? count($item->ARRAY_CORES)+1 : 1; @php $collspan_total_mod = count($item->ARRAY_CORES) >= 2 ? 3 : 2; @endif @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); @if($exibe_foto == 1) @endif @if($parametro_cor_descricao > 0) @endif @if(!($parametro_cor_descricao > 0)) @endif @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_COMERCIAL}}{{ 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, ',', '.') }}