@php $loopItems = isset($received_order) ? $received_order : ($items ?? collect()); @endphp
@forelse($loopItems as $key => $item) @empty @endforelse
Sl Action Invoice / Order Customer Info Products & Variant Status Fraud Check Payment Courier Info Assigned Amount
{{ method_exists($loopItems, 'firstItem') ? ($loopItems->firstItem() + $key) : $loop->iteration }}
@can('order.delete') @endcan
#{{ $item->invoice_no }} ID: {{ $item->id }} {{ $item->created_at->format('d M y, h:i A') }}
{{ trim($item->first_name.' '.$item->last_name) }} {{ $item->mobile }} @php $mobileCount = \App\Models\Order::where('mobile', $item->mobile)->count(); $historyClass = $mobileCount > 1 ? 'bg-warning text-dark' : 'bg-success text-white'; @endphp
@foreach($item->details as $detail) {{ $detail->product->name ?? 'Unavailable' }}
SKU: {{ $detail->product['sku'] ?? 'N/A' }} | Var: {{ $detail->variant_name ?? ($detail->variation->display_title ?? 'N/A') }}
@endforeach
@php $sColor = 'bg-secondary'; $s = strtolower($item->status); if($s == 'pending') $sColor = 'bg-warning text-dark'; elseif($s == 'confirmed') $sColor = 'bg-primary text-white'; elseif($s == 'processing') $sColor = 'bg-info text-white'; elseif(in_array($s, ['shipped','courier'])) $sColor = 'bg-dark text-white'; elseif(in_array($s, ['delivered','complete'])) $sColor = 'bg-success text-white'; elseif(in_array($s, ['returning','return received','cancelled','cancell','return'])) $sColor = 'bg-danger text-white'; elseif($s == 'return missing') $sColor = 'bg-warning text-dark fw-bold border border-warning'; @endphp {{ ucfirst($item->status) }} @php $percent = $item->getCourierPercent(); @endphp @php $color = $percent>50 ? '#10b981' : ($percent>20?'#f59e0b':'#ef4444'); @endphp
{{$percent}}%
{{ $item->payment_status ?? 'Due' }} @if($item->transaction_id)
{{ $item->transaction_id }}
@endif
{{ $item->courier ? $item->courier->name : '—' }} {{$item->courier_tracking_id ?? ''}} {{ $item->courier_status ?? '' }}
{{ $item->assign ? $item->assign->username : 'Admin' }} ৳{{ (int) $item->final_amount }}
No orders found!
@if(method_exists($loopItems,'links'))
{!! urldecode(str_replace("/?","?",$loopItems->appends(Request::all())->render())) !!}
@endif