@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
Dati cliente
| Nominativo | {{ $cliente?->nominativo }} |
@if($cliente?->ragione_sociale)
| Ragione sociale | {{ $cliente->ragione_sociale }} |
@endif
| Email | {{ $cliente?->email }} |
| Telefono | {{ $cliente?->telefono ?: '—' }} |
| Indirizzo | {{ trim(($cliente?->indirizzo ?: '').' '.($cliente?->cap ?: '').' '.($cliente?->citta ?: '').' '.($cliente?->provincia ? '('.$cliente->provincia.')' : '')) ?: '—' }} |
@if($cliente?->note)
| Note | {{ $cliente->note }} |
@endif
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)
| {{ $row['label'] }} | {{ $row['value'] }} |
@endforeach
|
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.