| Order | Date | Customer | Total | Type | Payment | Status | Agent | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $order->order_number }} | {{ $order->created_at->format('M d, H:i') }} |
@if($order->user)
{{ $order->user->name }}
{{ Str::limit($order->user->email, 20) }}
@else
{{ $order->name }} (Guest)
{{ Str::limit($order->email, 20) }}
@endif
|
₹{{ number_format($order->total, 2) }} | {{ $order->order_scope }} | {{ $order->payment_method ?? '-' }} ({{ $order->payment_status }}) | {{ ucfirst($order->status) }} @if($order->agentRating || $order->productReviews->isNotEmpty()) @php $avgRating = 0; $totalRatings = 0; if($order->agentRating) { $avgRating += $order->agentRating->rating; $totalRatings++; } foreach($order->productReviews as $pr) { $avgRating += $pr->rating; $totalRatings++; } $finalAvg = $totalRatings > 0 ? round($avgRating / $totalRatings, 1) : 0; @endphp @endif |
@if($order->deliveryAgent)
{{ Str::limit($order->deliveryAgent->user->name ?? 'Unknown', 15) }}
|
|
| No orders found. | ||||||||
{{ $orders->withQueryString()->links() }}