@php if (!function_exists('formatCnpj')) { function formatCnpj($value) { if (empty($value)) return $value; $value = preg_replace('/[^0-9]/', '', (string)$value); if (strlen($value) === 14) { return preg_replace('/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/', '$1.$2.$3/$4-$5', $value); } if (strlen($value) === 11) { return preg_replace('/(\d{3})(\d{3})(\d{3})(\d{2})/', '$1.$2.$3-$4', $value); } return $value; } } if (!function_exists('formatTelefone')) { function formatTelefone($value) { if (empty($value)) return $value; $value = preg_replace('/[^0-9]/', '', (string)$value); if (strlen($value) === 11) { return preg_replace('/(\d{2})(\d{5})(\d{4})/', '($1) $2-$3', $value); } elseif (strlen($value) === 10) { return preg_replace('/(\d{2})(\d{4})(\d{4})/', '($1) $2-$3', $value); } return $value; } } if (!function_exists('formatCep')) { function formatCep($value) { if (empty($value)) return $value; $value = preg_replace('/[^0-9]/', '', (string)$value); if (strlen($value) === 8) { return preg_replace('/(\d{5})(\d{3})/', '$1-$2', $value); } return $value; } } @endphp
|
{{ $destroca->nome ?? 'CENTRO DE DESTROCA' }}
CNPJ: {{ formatCnpj($destroca->cnpj ?? '') ?: '---' }} {{ $destroca->endereco ?? '' }}, {{ $destroca->numero ?? '' }} {{ !empty($destroca->complemento) ? ' - ' . $destroca->complemento : '' }} - {{ $destroca->bairro ?? '' }}, {{ $destroca->ncidade ?? '' }} - CEP: {{ formatCep($destroca->cep ?? '') ?: '' }} Contato: {{ formatTelefone($destroca->telefone ?? '') ?: '' }} {{ !empty($destroca->telefone2) ? ' / ' . formatTelefone($destroca->telefone2) . '' : '' }} | Email: {{ $destroca->email ?? '' }} |
Nº CIV
{{ $pedido->id }}
{{ $pedido->data }}
|
|
| COMPANHIA / REVENDA | NF | SÉRIE | P05 | P08 | P13 | P20 | P45 |
|---|---|---|---|---|---|---|---|
| {{ $revenda }} | {{ $nf }} | {{ $serie }} | {{ $p05 > 0 ? $p05 : '' }} | {{ $p08 > 0 ? $p08 : '' }} | {{ $p13 > 0 ? $p13 : '' }} | {{ $p20 > 0 ? $p20 : '' }} | {{ $p45 > 0 ? $p45 : '' }} |
| TOTAL | {{ $totalP05 > 0 ? $totalP05 : '' }} | {{ $totalP08 > 0 ? $totalP08 : '' }} | {{ $totalP13 > 0 ? $totalP13 : '' }} | {{ $totalP20 > 0 ? $totalP20 : '' }} | {{ $totalP45 > 0 ? $totalP45 : '' }} | ||
| Nenhuma revenda vinculada a este CIV. | |||||||
| MARCA | ENTRADA | SAÍDA | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $col }} | @endforeach @foreach($colunas as $col){{ $col }} | @endforeach|||||||||
| {{ $pedido->companhia->fantasia ?? '---' }} | @foreach($colunas as $col)--- | @endforeach @foreach($colunas as $col){{ ($totaisSaida[$col] > 0) ? $totaisSaida[$col] : '---' }} | @endforeach||||||||
| OUTRAS / SEM MARCA | @foreach($colunas as $col){{ ($totaisEntrada[$col] > 0) ? $totaisEntrada[$col] : '---' }} | @endforeach @foreach($colunas as $col)--- | @endforeach||||||||
| TOTAL | @foreach($colunas as $col){{ ($totaisEntrada[$col] > 0) ? $totaisEntrada[$col] : '' }} | @endforeach @foreach($colunas as $col){{ ($totaisSaida[$col] > 0) ? $totaisSaida[$col] : '' }} | @endforeach||||||||