@extends('layouts.admin') @section('title', 'Hotel & Resort Bookings') @section('content') @php $can = fn ($route) => auth()->user()->hasRole('super-admin') || auth()->user()->hasPermission($route); $label = fn ($status) => ucfirst(strtolower(str_replace('_', ' ', (string) $status))); @endphp
| Type | Booking | Property | Customer | Check-in | Check-out | Rooms | Total | Due | Status | Action |
|---|---|---|---|---|---|---|---|---|---|---|
| Hotel | HV-{{ str_pad((string) $item->id, 5, '0', STR_PAD_LEFT) }} | {{ $item->hotel?->name }}@if ($item->roomType) {{ $item->roomType->name }}@endif |
{{ $item->customer?->full_name }} | {{ optional($item->check_in_date)->format('d M Y') }} | {{ optional($item->check_out_date)->format('d M Y') }} | {{ $item->number_of_rooms }} | {{ number_format($item->selling_price, 2) }} | {{ number_format($item->reservation_status === 'cancelled' ? 0 : max($item->selling_price - $item->paid_amount, 0), 2) }} | {{ $label($item->reservation_status) }} | View @if ($can('admin.hotel-bookings.invoice')) Invoice @endif Edit |
| Resort | {{ $item->booking_no }} | {{ $item->resort_name }} | {{ $item->customer_details['name'] ?? '' }}@if (!empty($item->customer_details['phone'])) {{ $item->customer_details['phone'] }}@endif |
{{ \Illuminate\Support\Carbon::parse($item->check_in)->format('d M Y') }} | {{ \Illuminate\Support\Carbon::parse($item->check_out)->format('d M Y') }} | {{ $item->total_rooms }} | {{ number_format($item->grand_total, 2) }} | {{ number_format($cancelled ? 0 : max($item->grand_total - $item->paid, 0), 2) }} | {{ $label($item->status) }} | @if ($can('admin.resort-bookings.show')) View @endif @if ($can('admin.resort-bookings.invoice')) Invoice @endif |