{{-- HEADER --}} {{-- FILTERS --}}
{{-- TABLE --}}
@foreach($orders as $index=>$order) @php $paymentBadge = match($order->payment_status){ 'paid'=>'success', 'pending'=>'warning', 'failed'=>'danger', 'partially_refunded'=>'info', 'refunded'=>'secondary', default=>'dark' }; $statusBadge = match($order->status){ 'completed'=>'success', 'cancelled'=>'danger', default=>'secondary' }; @endphp @endforeach
# Order # Invoice Customer Type Items Grand Total Payment Status Date Actions
{{ $index+1 }} {{ $order->order_number }} {{ $order->invoice?->invoice_number ?? '-' }} {{ trim(($order->contact?->first_name ?? $order->guest_name).' '.($order->contact?->last_name ?? '')) }} {{ ucfirst($order->customer_type) }} {{ $order->items->whereNull('parent_order_item_id')->sum('quantity') }} {{ format_currency($order->total_amount) }} {{ ucwords(str_replace('_',' ',$order->payment_status)) }} {{ ucfirst($order->status) }} {{ $order->created_at->format('d M Y') }}
{{ $order->created_at->format('h:i A') }}
@push('scripts') @endpush