@extends('admin-layouts.master') @section('title', 'Booking Details') @section('content')

Booking Details

Booking ID: #{{ $booking->id }}

{{ $booking->booking_type_display ?? 'Unknown' }} {{ ucfirst($booking->status) }} Back to Bookings
Guest Information

{{ $booking->guest->name ?? 'N/A' }}

{{ $booking->guest->phone ?? 'N/A' }}

{{ $booking->guest->email ?? 'N/A' }}

{{ $booking->guest->identity_number ?? 'N/A' }}

@if($booking->booking_type === 'per_person' && $booking->guest_count)

{{ $booking->guest_count }} person(s)

@endif
Booking Duration
@switch($booking->booking_type) @case('hourly') @break @case('per_person') @break @default @endswitch
{{ $booking->booking_type_display ?? 'Unknown' }}

{{ $booking->duration_display ?? 'N/A' }}

@if($booking->booking_type === 'hourly') {{ $booking->check_in_date_time_formatted ?? $booking->check_in_date_formatted ?? 'N/A' }} @else {{ $booking->check_in_date_formatted ?? 'N/A' }} @endif

@if($booking->booking_type === 'hourly') {{ \Carbon\Carbon::parse($booking->check_in_date)->addHours($booking->duration_hours ?? 1)->format('d/m/Y H:i') }} @else {{ $booking->check_out_date_formatted ?? 'N/A' }} @endif

Room Details
@foreach($booking->bookingDetails as $detail)
Room {{ $detail->room->room_number ?? 'N/A' }}
{{ $detail->room->typeRoom->name ?? 'Unknown Type' }}
{{ $detail->booking_type_display ?? 'Unknown' }} @switch($detail->booking_type) @case('hourly') Rp {{ number_format($detail->base_price ?? 0, 0, ',', '.') }}/hour @break @case('per_person') Rp {{ number_format($detail->base_price ?? 0, 0, ',', '.') }}/person @break @default Rp {{ number_format($detail->base_price ?? 0, 0, ',', '.') }}/night @endswitch
Calculation: {{ $detail->calculation_display ?? 'N/A' }}
Subtotal Rp {{ number_format($detail->total_price ?? 0, 0, ',', '.') }}
@if($detail->ppn_amount > 0)
PPN ({{ $detail->ppn_rate * 100 ?? 11 }}%) Rp {{ number_format($detail->ppn_amount ?? 0, 0, ',', '.') }}
@endif
Total Rp {{ number_format($detail->grand_total ?? 0, 0, ',', '.') }}
@endforeach
@if($booking->checkIn || $booking->checkOut)
Check-in/Check-out Details
@if($booking->checkIn)
Check-in

Time: {{ $booking->checkIn->check_in_time_formatted ?? 'N/A' }}

@if($booking->checkIn->notes)

Notes: {{ $booking->checkIn->notes }}

@endif
@endif @if($booking->checkOut)
Check-out

Time: {{ $booking->checkOut->check_out_time_formatted ?? 'N/A' }}

@if($booking->checkOut->notes)

Notes: {{ $booking->checkOut->notes }}

@endif
@endif
@endif
Booking Summary
Booking Type {{ $booking->booking_type_display ?? 'Unknown' }}
Duration {{ $booking->duration_display ?? 'N/A' }}
@if($booking->booking_type === 'hourly') Check-in Time @else Check-in Date @endif @if($booking->booking_type === 'hourly') {{ $booking->check_in_date_time_formatted ?? $booking->check_in_date_formatted ?? 'N/A' }} @else {{ $booking->check_in_date_formatted ?? 'N/A' }} @endif
@if($booking->booking_type === 'hourly') Check-out Time @else Check-out Date @endif @if($booking->booking_type === 'hourly') {{ \Carbon\Carbon::parse($booking->check_in_date)->addHours($booking->duration_hours ?? 1)->format('d/m/Y H:i') }} @else {{ $booking->check_out_date_formatted ?? 'N/A' }} @endif
Total Amount Rp {{ number_format($booking->total_amount ?? 0, 0, ',', '.') }}
Booking Date {{ $booking->created_at->format('d/m/Y H:i') }}
@if($booking->status === 'booked' && $booking->canCheckIn()) @endif @if($booking->status === 'checked_in' && $booking->canCheckOut()) @endif @if($booking->canBeCancelled()) @endif {{-- @if(in_array($booking->status, ['booked', 'checked_in']) && Route::has('bookings.edit')) Edit Booking @endif --}}
@push('scripts') @endpush @endsection