@php use App\Support\ConfigurazioneFormatter; use Illuminate\Support\Facades\Storage; $cliente = $preventivo->cliente; $logoPath = public_path('images/kreios-logo.jpg'); $logoBase64 = file_exists($logoPath) ? base64_encode(file_get_contents($logoPath)) : null; @endphp
@if($logoBase64) @endif

Preventivo n. {{ $preventivo->numero }}

Krèios Infissi · Emesso il {{ optional($preventivo->confirmed_at)->format('d/m/Y') ?? now()->format('d/m/Y') }}

Dati cliente

@if($cliente?->ragione_sociale) @endif @if($cliente?->note) @endif
Nominativo{{ $cliente?->nominativo }}
Ragione sociale{{ $cliente->ragione_sociale }}
Email{{ $cliente?->email }}
Telefono{{ $cliente?->telefono ?: '—' }}
Indirizzo{{ trim(($cliente?->indirizzo ?: '').' '.($cliente?->cap ?: '').' '.($cliente?->citta ?: '').' '.($cliente?->provincia ? '('.$cliente->provincia.')' : '')) ?: '—' }}
Note{{ $cliente->note }}

Configurazioni ({{ $preventivo->items->count() }})

@foreach($preventivo->items as $i => $item) @php $imgAbs = $item->immagine_path && Storage::disk('public')->exists($item->immagine_path) ? Storage::disk('public')->path($item->immagine_path) : null; $rows = ConfigurazioneFormatter::toRows($item->payload); @endphp
{{ $i + 1 }}. {{ $item->nome_modello ?: 'Prodotto' }} @if($item->sistema) ({{ ucfirst($item->sistema) }}) @endif
@if($imgAbs) @endif
@foreach($rows as $row) @endforeach
{{ $row['label'] }}{{ $row['value'] }}
Quantità: {{ $item->quantita }}  ×  € {{ number_format($item->prezzo_unitario, 2, ',', '.') }} = € {{ number_format($item->prezzo_totale, 2, ',', '.') }}
@endforeach
Totale: € {{ number_format($preventivo->totale, 2, ',', '.') }}
IVA 22% inclusa. Preventivo indicativo, salvo verifica tecnica e rilievo misure.