@extends('layouts.admin') @section('title', 'Cash Collection') @section('content')

Rider Cash Collection

Summary of COD collected from delivered parcels

Back to Profiles
@php $totalRidersWithCOD = $riders->count(); $totalParcels = 0; $totalCOD = 0; foreach ($riders as $rider) { $totalParcels += $rider->parcels->count(); $totalCOD += $rider->parcels->sum('cod_amount'); } @endphp

Riders with COD

{{ $totalRidersWithCOD }}

Total Parcels

{{ $totalParcels }}

Total COD

Rs. {{ number_format($totalCOD, 2) }}

COD Collections by Rider

@forelse($riders as $rider) @php $parcelCount = $rider->parcels->count(); $riderTotalCOD = $rider->parcels->sum('cod_amount'); @endphp @empty @endforelse
Rider Phone Parcels Total COD Details
{{ $rider->name }} {{ $rider->phone }} {{ $parcelCount }} Rs. {{ number_format($riderTotalCOD, 2) }} @forelse($rider->parcels as $parcel) #{{ $parcel->tracking_id ?? $parcel->id }} (Rs. {{ number_format($parcel->cod_amount, 2) }}) @empty No parcels @endforelse
No COD collections found.
@endsection