@if($courierBreakdown->isNotEmpty())
Courier-wise Breakdown
@foreach($courierBreakdown as $row) @php $rate = $row->total > 0 ? round(($row->delivered / $row->total) * 100, 1) : 0; $rateBadge = $rate >= 80 ? 'success' : ($rate >= 50 ? 'warning' : 'danger'); @endphp @endforeach
Courier Total Processing Delivered Failed Cancelled Returned COD (৳) Charge (৳) Net (৳) Success %
{{ $row->courier?->name ?? 'Unknown' }} @if($row->courier?->is_manual) Manual @endif {{ $row->total }} {{ $row->processing }} {{ $row->delivered }} {{ $row->failed }} {{ $row->cancelled }} {{ $row->returned }} {{ number_format($row->cod_amount, 0) }} {{ number_format($row->courier_charge, 0) }} {{ number_format($row->net_amount, 0) }} {{ $rate }}%
@endif