@extends('admin.layouts.app') @section('content')

{{ $page_title }}

Order Information

{{ $order->order_number }}

@php $statusColors = [ 'pending' => 'warning', 'partially_paid' => 'info', 'paid' => 'success', 'cancelled' => 'danger', 'refunded' => 'secondary' ]; $statusColor = $statusColors[$order->status] ?? 'secondary'; @endphp {{ ucfirst(str_replace('_', ' ', $order->status)) }}

{{ $order->created_at->format('M d, Y h:i A') }}

{{ $order->updated_at->format('M d, Y h:i A') }}

@if($order->coupon_code)

{{ $order->coupon_code }}

@endif

Customer Information

@if($order->user)

{{ $order->user->name }}

{{ $order->user->email }}

@if($order->user->phone)

{{ $order->user->phone }}

@endif @else
Customer information not available
@endif

Package Information

@if($order->package)

{{ $order->package->title }}

₹{{ number_format($order->package->price, 2) }}

@if($order->package->description)

{{ $order->package->description }}

@endif @else
Package information not available
@endif

Order Summary

Total Amount: ₹{{ number_format($order->amount_total, 2) }}
@if($order->amount_offer > 0)
Discount: -₹{{ number_format($order->amount_offer, 2) }}
@endif
Final Amount: ₹{{ number_format($order->amount_final, 2) }}
@if($order->amount_offer > 0)
You saved ₹{{ number_format($order->amount_offer, 2) }}!
@endif
@if($order->userPayments && $order->userPayments->count() > 0)

Payment History

@foreach($order->userPayments as $payment)
Payment #{{ $payment->id }} ₹{{ number_format($payment->amount_paid, 2) }}
{{ $payment->created_at->format('M d, Y') }} {{ ucfirst($payment->payment_status) }}
@if($payment->transaction_id) Transaction ID: {{ $payment->transaction_id }} @endif
@endforeach
@endif

Actions

@endsection