@php $logoPath = \App\Models\AppSetting::get('company_logo'); @endphp
@if($logoPath && \Illuminate\Support\Facades\Storage::disk('public')->exists($logoPath))
@else
{{ \App\Models\AppSetting::get('company_name','Kitchen complex') }}
@endif
|
|
Quote
|
|
@php $settings = \App\Models\AppSetting::all()->pluck('value', 'key'); @endphp
{{$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 ?? 'Valued Client' }}
|
Job
{{ $quote->job?->job_number ?? '—' }}
|
|
@php
$allItems = $quote->sections->flatMap->items;
$grouped = $allItems->groupBy('material_type_id');
$types = \App\Models\MaterialType::orderBy('sort_order')->get()->keyBy('id');
$grandRetail = 0;
@endphp
@foreach($grouped as $typeId => $items)
@php
$typeName = $typeId ? ($types[$typeId]->name ?? 'Items') : 'Items';
$typeRetail = $items->sum(fn($i) => (float)($i->total_retail ?? ($i->qty * $i->retail_price)));
$grandRetail += $typeRetail;
@endphp
| Description |
Item Code |
Unit |
Qty |
Unit Price |
Total |
@foreach($items as $item)
|
{{ $item->description }}
|
{{ $item->item_code }} |
{{ $item->unit }} |
{{ number_format($item->qty,2) }} |
${{ number_format($item->retail_price ?? $item->unit_price,2) }} |
${{ number_format($item->total_retail ?? $item->total,2) }} |
@endforeach
| {{ $typeName }} Subtotal |
${{ number_format($typeRetail,2) }} |
|
@endforeach
@php
$gst = $grandRetail * 0.10;
$total = $grandRetail + $gst;
@endphp
|
Sub-total (excl. GST) ${{ number_format($grandRetail,2) }}
|
|
|
GST ${{ number_format($gst,2) }}
|
|
|
Total includes GST ${{ number_format($total,2) }}
|
|
|
|
{{ $quote->notes ?? ""}}
|
|
|
| Copyright |
© {{ date('Y') }} {{ $settings['company_name'] }}. All rights reserved. |
|