@extends('layouts.app') @section('title', 'Payout Run ' . $run->run_number) @section('content')
← Payouts

{{ $run->run_number }}

{{ $run->scheme?->name }} · {{ $run->period_start->format('d M') }}–{{ $run->period_end->format('d M Y') }}
@php $statusColors = [ 'Draft' => 'bg-gray-100 text-gray-700', 'Approved' => 'bg-blue-100 text-blue-700', 'Sent' => 'bg-amber-100 text-amber-800', 'Reconciled' => 'bg-green-100 text-green-800', 'Cancelled' => 'bg-red-100 text-red-700', ]; @endphp {{ $run->status }} @if($run->status === 'Draft')
@csrf
@endif @if($run->status === 'Approved')
@csrf
@endif @if(in_array($run->status, ['Draft','Approved'])) @endif
@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
@foreach($errors->all() as $err)
• {{ $err }}
@endforeach
@endif {{-- Stats --}}
Riders
{{ $run->rider_count }}
Referrals
{{ $run->referral_count }}
Total KES
{{ number_format($run->total_amount) }}
{{-- Lines --}}
@if($run->lines->isEmpty())
No lines in this run. There were no eligible successful referrals in the period.
@else @foreach($run->lines as $line) @endforeach
Rider M-Pesa Referrals Amount Status M-Pesa Ref
{{ $line->rider?->first_name }} {{ $line->rider?->last_name }}
{{ $line->rider?->rider_code }}
{{ $line->mpesa_number }} {{ $line->referral_count }} {{ number_format($line->amount) }} {{ $line->status }} @if($line->status === 'Sent') {{ $line->mpesa_reference }} @elseif($run->status === 'Sent')
@csrf
@else @endif
@endif
@endsection