@php $settings = \App\Models\AppSetting::all()->pluck('value', 'key'); @endphp @php $logoPath = \App\Models\AppSetting::get('company_logo'); @endphp
@if($logoPath && \Illuminate\Support\Facades\Storage::disk('public')->exists($logoPath)) Company Logo @else {{ \App\Models\AppSetting::get('company_name', 'Degabriele Kitchens') }} @endif
Quote
{{ $settings['company_name'] }}
ABN {{ $settings['company_abn'] }}
{{ $settings['company_address'] ?? '1/123 Business Park Drive, Sydney NSW 2000' }}
Phone {{ $settings['company_phone'] }}  Email: {{ $settings['company_email'] }}
Quote Number {{ $quote->quote_number }}
Date {{ $quote->created_at?->format('d F Y') }}

Customer
{{ $quote->contact?->first_name ?? 'Valued Client' }} {{ $quote->contact?->last_name ?? '' }}
Job
{{ $quote->job?->job_number ?? '—' }}

@foreach($quote->sections as $section)
{{ $section->name }}
@foreach($section->items as $item) @endforeach
Description Item Code Unit Qty Unit Price Total
{{ $item->description }}@if($item->materialType)[{{ $item->materialType->name }}]@endif {{ $item->item_code }} {{ $item->unit }} {{ $item->qty }} ${{ number_format($item->retail_price ?? $item->unit_price, 2) }} ${{ number_format($item->total_retail ?? $item->total, 2) }}
@endforeach @php $allItems = $quote->sections->flatMap->items; $grandWsale = $allItems->sum(fn($i) => (float)($i->total_wsale ?? 0)); $grandRetail = $allItems->sum(fn($i) => (float)($i->total_retail ?? $i->total ?? 0)); $gstAmt = $grandRetail * 0.10; @endphp
Sub-total (excl. GST)    ${{ number_format($grandRetail,2) }}
GST    ${{ number_format($gstAmt,2) }}
Total includes GST    ${{ number_format($grandRetail + $gstAmt,2) }}

@if($quote->notes)
{{ $quote->notes }}
@endif