@extends('Admin.layout') @section('content')
View Completed Order
User Name : {{ trim(($order->customer->first_name ?? '') . ' ' . ($order->customer->last_name ?? 'N/A')) }}
User ID : {{ $order->customer->customer_id ?? ('ID' . $order->user_id) }}
Completed
Order ID : {{ $order->order_id }} Date : {{ $order->created_at ? $order->created_at->format('d/m/Y') : 'N/A' }}
Restaurant Details
Name
: {{ $order->restaurant->name ?? 'N/A' }}
Restaurant ID
: {{ $order->restaurant->restaurant_id ?? ('ID' . $order->restaurant_id) }}
Phone
: {{ $order->restaurant->phno ?? ($order->restaurant->phone ?? 'N/A') }}
Address
: {{ $order->restaurant->address ?? 'N/A' }}
User Details
Name
: {{ trim(($order->customer->first_name ?? '') . ' ' . ($order->customer->last_name ?? '')) ?: 'N/A' }}
Customer ID
: {{ $order->customer->customer_id ?? ('ID' . $order->user_id) }}
Phone
: {{ $order->phone ?? ($order->customer->phno ?? 'N/A') }}
Email Address
: {{ $order->customer->email ?? 'N/A' }}
Address
: {{ $userAddress->address ?? 'N/A' }}
Delivery Address
Name
: {{ $deliveryAddress->name ?? trim(($order->customer->first_name ?? '') . ' ' . ($order->customer->last_name ?? '')) }}
Phone
: {{ $deliveryAddress->phone ?? ($order->phone ?? 'N/A') }}
Email Address
: {{ $deliveryAddress->email ?? ($order->customer->email ?? 'N/A') }}
Address
: {{ $deliveryAddress->address ?? 'N/A' }} {{ isset($deliveryAddress->pincode) ? '- ' . $deliveryAddress->pincode : '' }}
Landmark
: {{ $deliveryAddress->landmark ?? 'N/A' }}
Address Type
: {{ ucfirst($deliveryAddress->address_type ?? 'Home') }}
{{-- --}} Download Bill
Product Details
SNO CATEGORY PRODUCT NAME OFFERS PRICE QTY TOTAL
Total ₹{{ number_format($order->sub_total ?? 0, 2) }}
Payment Details
{{-- @if ($order->payment_type) @endif @if ($order->payment_status) @endif --}}
Subtotal ₹{{ number_format($order->sub_total ?? 0, 2) }}
Discount ₹{{ number_format($order->discount ?? 0, 2) }}
Offer {{ $order->offer ?? 0 }}%
Payment Type {{ str_replace('_', ' ', strtoupper($order->payment_type)) }}
Payment Status {{ ucfirst(str_replace('_', ' ', $order->payment_status)) }}
Grand Total ₹{{ number_format($order->grand_total ?? 0, 2) }}
@endsection