@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
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
| Room Type |
Qty |
Rate |
Total |
@foreach($quotation->quotationRooms as $qr)
| {{ $qr->roomType?->name ?? '-' }} |
{{ $qr->quantity ?? 0 }} |
{{ currency_format($qr->rate ?? 0) }} |
{{ currency_format($qr->total_amount ?? 0) }} |
@endforeach
@if($quotation->quotationRooms->isEmpty())
| No rooms selected |
@endif
@if($quotation->quotationExtras->count())
Extras
| Extra |
Qty |
Unit |
Total |
@foreach($quotation->quotationExtras as $qe)
| {{ $qe->extraService?->name ?? '-' }} |
{{ $qe->quantity ?? 0 }} |
{{ currency_format($qe->unit_price ?? 0) }} |
{{ currency_format($qe->total_amount ?? 0) }} |
@endforeach
@endif
Summary
| 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) }} |
@php $receiptTaxLines = $quotation->invoiceTaxes(); @endphp
@forelse($receiptTaxLines as $line)
|
{{ $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']) }} |
@empty
| {{ __('hotel::modules.reservation.bookingTax') }} |
{{ currency_format($quotation->tax_amount ?? 0) }} |
@endforelse
| 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') }}