@can('do',['view','order'])
@endcan
@can('delete','order')
@endcan
{{ optional($name[$order->order_id] ?? null)->firstname }} {{ optional($name[$order->order_id] ?? null)->surname }}
@if($count > 2)
{{ $names[0] }}, {{ $names[1] }}, (and {{ $count - 2 }} more)
@elseif($count == 2)
{{ $names[0] }}, {{ $names[1] }}
@elseif($count == 1)
{{ $names[0] }}
@else
No Products
@endif
{{$order->reference}}
₱{{number_format($order->amount,2)}}
{{$order->product_quantity}}
₱{{number_format($order->amount*$order->product_quantity,2)}}
{{$order->shipping_method}}
{{$order->payment_method}}
@if($order->payment_status == "UNPAID")
{{$order->payment_status}}
@else
{{$order->payment_status}}
@endif
{{$order->branch}}
@if ($order->status == "PENDING")
{{$order->status}}
@elseif ($order->status == "PROCESSING")
{{$order->status}}
@elseif ($order->status == "OUT FOR DELIVERY")
{{$order->status}}
@elseif ($order->status == "DELIVERED")
{{$order->status}}
@elseif ($order->status == "FAILED")
{{$order->status}}
@else
{{$order->status}}
@endif
{{ \Carbon\Carbon::parse($order->created_at)->format('Y-m-d') }}
{{ \Carbon\Carbon::parse($order->created_at)->format('h:i:s A') }}
@endforeach