@extends('backend.app') @section('content')
Courier Performance
@forelse($courierPerformance as $key => $courier) @php $courierName = $courier->courier_name ?? 'Unknown / Self Pick'; $successRatio = ($courier->total_assigned > 0) ? round(($courier->total_delivered / $courier->total_assigned) * 100, 1) : 0; $returnRatio = ($courier->total_assigned > 0) ? round(($courier->total_returned / $courier->total_assigned) * 100, 1) : 0; @endphp @empty @endforelse
# Courier Name Assigned On Transit Delivered Returned
{{ $key + 1 }} {{ $courierName }} {{ $courier->total_assigned }} {{ $courier->total_processing }} {{ $courier->total_delivered }}
{{ $successRatio }}%
{{ $courier->total_returned }}
@if($returnRatio > 15) {{ $returnRatio }}% @else {{ $returnRatio }}% @endif
No courier data found.
* On Transit includes Shipped, Courier, Processing.
@endsection