@php $restaurant = $quotation->restaurant ?? (function_exists('restaurant') ? restaurant() : null); $branch = $quotation->branch ?? (function_exists('branch') ? branch() : null); $statusLabel = optional($quotation->status)->label() ?? (string) ($quotation->status->value ?? $quotation->status); // DomPDF is most reliable with local paths or embedded data URIs. $logoUrl = $restaurant?->logo_url ?? $restaurant?->logoUrl ?? null; $logoSrc = $logoUrl; if (!blank($logoUrl)) { $parsedPath = parse_url($logoUrl, PHP_URL_PATH); $localPath = $parsedPath ? public_path(ltrim($parsedPath, '/')) : null; // Fallback to legacy upload location when we have filename only. if ((!$localPath || !is_file($localPath)) && !empty($restaurant?->logo)) { $legacyPath = public_path('user-uploads/logo/' . $restaurant->logo); $localPath = is_file($legacyPath) ? $legacyPath : $localPath; } if ($localPath && is_file($localPath)) { $ext = strtolower(pathinfo($localPath, PATHINFO_EXTENSION)); $mime = match ($ext) { 'jpg', 'jpeg' => 'image/jpeg', 'png' => 'image/png', 'gif' => 'image/gif', 'webp' => 'image/webp', default => null, }; if ($mime) { $logoSrc = 'data:' . $mime . ';base64,' . base64_encode(file_get_contents($localPath)); } } } @endphp
@if(!blank($logoSrc)) @endif
{{ $restaurant?->name ?? 'Hotel' }}
@if($branch?->name) {{ $branch->name }} @endif
Quotation: {{ $quotation->quotation_number }}
Status: {{ $statusLabel }}
Date
{{ optional($quotation->check_in_date)->format('d M Y') }}
Guest
{{ $quotation->primaryGuest?->full_name ?? '' }}
Stay
Check-in: {{ optional($quotation->check_in_date)->format('D, M d, Y') }} @if($quotation->check_in_time) · {{ \Carbon\Carbon::parse($quotation->check_in_time)->format('H:i') }} @endif
Check-out: {{ optional($quotation->check_out_date)->format('D, M d, Y') }} @if($quotation->check_out_time) · {{ \Carbon\Carbon::parse($quotation->check_out_time)->format('H:i') }} @endif
Rooms
@foreach($quotation->quotationRooms as $qr) @endforeach @if($quotation->quotationRooms->isEmpty()) @endif
Room Type Qty Rate Total
{{ $qr->roomType?->name ?? '-' }} {{ $qr->quantity ?? 0 }} {{ currency_format($qr->rate ?? 0) }} {{ currency_format($qr->total_amount ?? 0) }}
No rooms selected
@if($quotation->quotationExtras->count())
Extras
@foreach($quotation->quotationExtras as $qe) @endforeach
Extra Qty Unit Total
{{ $qe->extraService?->name ?? '-' }} {{ $qe->quantity ?? 0 }} {{ currency_format($qe->unit_price ?? 0) }} {{ currency_format($qe->total_amount ?? 0) }}
@endif
Summary
@php $receiptTaxLines = $quotation->invoiceTaxes(); @endphp @forelse($receiptTaxLines as $line) @empty @endforelse
Rooms & Extras {{ currency_format($grossSubtotal) }}
Discount @if(!empty($quotation->discount_type) && ($quotation->discount_value ?? 0) > 0) ({{ $quotation->discount_type }}: {{ $quotation->discount_value }}) @endif - {{ currency_format($discountAmount) }}
Amount after discount {{ currency_format($netAfterDiscount) }}
{{ $line['tax']->name ?? __('hotel::modules.reservation.bookingTax') }} @if($line['tax']->rate !== null && (float) $line['tax']->rate != 0) ({{ $line['tax']->rate }}%) @endif {{ currency_format($line['amount']) }}
{{ __('hotel::modules.reservation.bookingTax') }} {{ currency_format($quotation->tax_amount ?? 0) }}
Total {{ currency_format($quotation->total_amount ?? 0) }}
Advance paid {{ currency_format($advancePaid) }}
Balance due {{ currency_format($balanceDue) }}
Generated on {{ now()->format('d M Y H:i') }}