@if($result)
[ {{$result->customerPhone}} ]
| Courier | Total | Delivered | Returned | Success Ratio |
|---|---|---|---|---|
|
@php
$total = $delivered = $returned = 0;
@endphp
@foreach($data as $key => $value)
@if($key == 'Total Parcels' || $key == 'Total Delivery')
@php $total += $value; @endphp
{{ $total }} | @elseif($key == 'Delivered Parcels' || $key == 'Successful Delivery') @php $delivered += $value; @endphp{{ $delivered }} | @elseif($key == 'Canceled Parcels' || $key == 'Canceled Delivery') @php $returned += $value; @endphp{{ $returned }} | @endif @endforeach @php $successRatio = $total > 0 ? round(($delivered / $total) * 100, 2) : 0; @endphp{{ $successRatio }}% |
Details:
|
||||
Customer Order History
@php $number = $result->customerPhone ?: '000000000000'; $oldOrders = App\Models\Order::whereHas('user', function($q) use ($number) { $q->where('mobile','like','%' . $number . '%'); })->get(); @endphp| Order ID | Product Info | Status |
|---|---|---|
| {{$oldOrder->invoice_no}} |
@foreach($oldOrder->details()->whereHas('product')->get() as $item)
{{$item->product->name}}
Amount: {{number_format($item->unit_price * $item->quantity)}} TK QTY: {{ $item->quantity }} |
{{$oldOrder->status}} |