@extends('layouts.app') @section('title', 'View Booking') @section('content')

Booking Details

Order ID: {{ $booking->order_id }}

{{-- ✅ Booking Info --}}
Booking Information

Order ID: {{ $booking->order_id ?? '-' }}

Order Date: {{ $booking->order_date ? \Carbon\Carbon::parse($booking->order_date)->format('d-m-Y') : '-' }}

Total Amount: QAR {{ $booking->total_amount ?? 0 }}

Final Amount: QAR {{ $booking->final_amount ?? 0 }}

Payment Method: {{ ucfirst($booking->payment_method ?? '-') }}

Created At: {{ $booking->created_at ? $booking->created_at->format('d-m-Y H:i:s') : '-' }}

Status: @if($booking->status == 1) Confirmed @elseif($booking->status == 0) Pending @else Cancelled @endif

{{-- ✅ User Info --}}
User Information

Name: {{ $booking->user->name ?? '-' }}

Email: {{ $booking->user->email ?? '-' }}

Phone: {{ $booking->user->phone ?? '-' }}


{{-- ✅ Items Info --}}
Booking Items
@if($booking->items && count($booking->items) > 0) @foreach($booking->items as $key => $item) @endforeach @else @endif
# Item Name Qty Price Total
{{ $key + 1 }} {{ $item->name ?? 'Item' }} {{ $item->qty ?? 1 }} QAR {{ $item->price ?? 0 }} QAR {{ ($item->qty ?? 1) * ($item->price ?? 0) }}
No Items Found
Final Amount: QAR {{ $booking->final_amount ?? 0 }}
@endsection