@extends('layouts.admin') @section('title', 'Quotation '.$quotation->number) @section('content') @php $currency = \App\Models\Hotel::query()->value('currency') ?? 'USD'; @endphp @if($quotation->status !== 'converted') Edit @endif @if(in_array($quotation->status, ['draft', 'sent', 'accepted'], true))
@csrf
@endif
@if ($errors->any())
Could not convert quotation
@endif @if (session('success'))
{{ session('success') }}
@endif
Stay Details
Guest
{{ $quotation->guest?->first_name }} {{ $quotation->guest?->last_name ?? '—' }}
Status
Check-in
{{ $quotation->check_in_date?->format('M j, Y') }}
Check-out
{{ $quotation->check_out_date?->format('M j, Y') }}
Corporate
{{ $quotation->corporateAccount?->company_name ?? '—' }}
Travel Agent
{{ $quotation->travelAgent?->agency_name ?? '—' }}
Expiry
{{ $quotation->expiry_date?->format('M j, Y') ?? '—' }}
@if($quotation->convertedReservation) @endif @if($quotation->notes)
Notes
{{ $quotation->notes }}
@endif @if($quotation->terms_conditions)
Terms & conditions
{{ $quotation->terms_conditions }}
@endif
@if($quotation->rooms)
Rooms
@foreach($quotation->rooms as $line) @php $typeId = $line['room_type_id'] ?? null; $roomId = $line['room_id'] ?? null; $packageId = $line['package_id'] ?? null; $isLegacy = isset($line['quantity']) && ! isset($line['adults']); @endphp @endforeach
Room type Room Package Adults Children Qty Rate
{{ $roomTypes[$typeId]->name ?? '—' }} @if($roomId) {{ $rooms[$roomId]->number ?? ('#'.$roomId) }} @else Auto-assign @endif {{ $packageId ? ($packages[$packageId]->name ?? '—') : '—' }} {{ $line['adults'] ?? ($isLegacy ? 1 : '—') }} {{ $line['children'] ?? ($isLegacy ? 0 : '—') }} {{ $isLegacy ? ($line['quantity'] ?? 1) : 1 }} @if(isset($line['rate'])) {{ $currency }} {{ number_format((float) $line['rate'], 2) }} @else — @endif
@endif
Totals
Subtotal{{ $currency }} {{ number_format($quotation->subtotal, 2) }}
Discount{{ $currency }} {{ number_format($quotation->discount, 2) }}
Tax{{ $currency }} {{ number_format($quotation->tax, 2) }}
Service{{ $currency }} {{ number_format($quotation->service_charge, 2) }}

Total{{ $currency }} {{ number_format($quotation->total, 2) }}
Deposit{{ $currency }} {{ number_format($quotation->deposit_required, 2) }}
@if(in_array($quotation->status, ['draft', 'sent', 'accepted'], true))
Converting checks that each chosen room (or room type) is still free for these dates. If not, you will see which room and dates are unavailable.
@endif
@endsection