| Order | Customer | Item | Reason | Actions | ||||
|---|---|---|---|---|---|---|---|---|
| {{ $r->rma_number }} | @if($r->order) {{ $r->order->order_number }} @else N/A @endif | {{ $r->order?->buyer_name ?? 'N/A' }} | {{ Str::limit($r->inventoryItem?->sku ?? 'N/A', 15) }} | @php $reasonClasses = match($r->reason) { 'defective' => 'bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300', 'not_as_described' => 'bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300', 'wrong_item' => 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-300', default => 'bg-neutral-100 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-300', }; @endphp {{ ucfirst(str_replace('_', ' ', $r->reason ?? 'unknown')) }} | @php $statusClasses = match($r->status) { 'requested' => 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-300', 'approved' => 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300', 'received' => 'bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300', 'processed' => 'bg-indigo-100 text-indigo-700 dark:bg-indigo-900 dark:text-indigo-300', 'refunded' => 'bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300', 'denied' => 'bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300', default => 'bg-neutral-100 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-300', }; @endphp {{ ucfirst($r->status ?? 'unknown') }} | @if($r->refund_amount) ${{ number_format($r->refund_amount, 2) }} @else — @endif | {{ $r->requested_at?->format('M d, Y') ?? '—' }} |
|
| No RMAs found. Click "Create RMA" to add one. | ||||||||
Refund Amount: ${{ number_format($rma->refund_amount ?? 0, 2) }}