@php $total = 0; @php $vl_total = 0; @php $collspan_total_mod = 2; @php $collspan_total = 2; @php $collspan_obs = 5; @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 @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 @if(isset($exibe_vlr) && $exibe_vlr == 1) @endif @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, ',', '.') }}
Consumo de MateriaisConsumo de Materiais
@php $no_media_consumo = 1; @foreach ($dados as $item) @php $no_media_consumo = isset($item->MEDIA_CONSUMO) ? 0 : 1; @endforeach @if($no_media_consumo == 0 && $agp_unitario == 0) @endif @if($agp_unitario == 1) @endif @forelse ($familias as $familia) @forelse ($dados as $item) @php $coluna = 2; @if ($familia->ID == $item->FAMILIA_CODIGO) @if(isset($item->MEDIA_CONSUMO) && $agp_unitario == 0 ) @php $coluna = $coluna + 1; @endif @if($agp_unitario == 1) @php $coluna = $coluna + 1; @endif @php $coluna = $coluna + 2; @if(isset($exibe_cons) && $exibe_cons == 1 && strlen(trim_null($item->OBSERVACAO)) > 0) @endif @endif @empty @if($no_media_consumo == 0) @endif @endforelse @empty @if($no_media_consumo == 0) @endif @endforelse
Produto TamanhoMéd.Consumo UnitárioConsumo UnitárioQuantidade Qtd.Alternativa
{{ $familia->DESC_ID .' - '. $familia->DESCRICAO}}
{{ $item->CODIGO .' - '. $item->DESCRICAO}} {{ $item->DESC_TAMANHO }}{{ number_format($item->MEDIA_CONSUMO,4, ',', '.') }} {{ $item->UM }}{{ number_format($item->MEDIA_CONSUMO,4, ',', '.') }} {{ $item->UM }}{{ number_format($item->QUANTIDADE,2, ',', '.') }} {{ $item->UM }} {{ number_format($item->QTD_ALT,2, ',', '.') }} {{ $item->UM_ALT }}
{{ trim_null($item->OBSERVACAO) }}