@extends('layouts.app') @section('title', 'Agent Orders') @section('content')
Orders from agent sales (Online & COD)
| Date | Agent | Customer | Source | Total | Status | Actions |
|---|---|---|---|---|---|---|
|
{{ $order->order_date->format('d M Y') }}
{{ $order->order_date->format('H:i') }}
|
{{ $order->agent->name }}
{{ $order->agent->coupon_code }}
|
{{ $order->customer_name }}
@if($order->customer_phone)
{{ $order->customer_phone }}
@endif
|
@php $sourceBadgeClass = match($order->source) { 'online' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400', 'cod' => 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400', 'ops' => 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400', default => 'bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400', }; @endphp {{ $order->source_display }} | RM {{ number_format($order->total_amount, 2) }} | {{ $order->status_display }} |