Book Orders
| # | Transaction ID | Order No | Student | Course | Total Amount | Discount | Final Amount | Paid Amount | Payment Method | Payment Status | Date | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $order->payments->first()?->transaction_id ?? 'N/A' }} | {{ $order->order_no }} |
{{ $order->user->name ?? '-' }} {{ $order->user->email ?? '' }} |
{{ $order->enrollments->first()->course->title ?? '-' }} | ৳{{ number_format($order->subtotal, 2) }} | ৳{{ number_format($order->discount, 2) }} | ৳{{ number_format($order->total, 2) }} | ৳{{ number_format($order->payments()->where('status', 'paid')->sum('amount'), 2) }} | {{ $order->payments->first()?->gateway ?? 'N/A' }} | @php $status = $order->payment_status ?? 'pending'; $statusClass = match($status) { 'paid' => 'bg-success', 'pending' => 'bg-warning text-dark', 'failed' => 'bg-danger', 'refunded' => 'bg-secondary', 'cancelled' => 'bg-dark', default => 'bg-light text-muted' }; @endphp {{ ucfirst($status) }} | {{ $order->created_at->format('d M, Y') }} | |
| No orders found | ||||||||||||
{{ $orders->links() }}