@extends('backend.partials.master') @section('title') {{ ___('admin.agent_payouts_d62221') }} @endsection @section('maincontent') @if(hasPermission('agent_finance_create')) {{ ___('label.add') }} @endif @if(!empty($analytics)) @endif {{-- Marking a payout Paid is the only step that moves money: it debits the agent's wallet and posts Dr Agent Payable / Cr Cash-or-Bank. --}} @foreach($items as $w) @php $badge = match($w->status) { 'paid' => 'success', 'approved' => 'info', 'rejected' => 'danger', default => 'warning', }; @endphp {{ $w->reference }} {{ $w->agent->name ?? '—' }} {{ $w->requested_on?->translatedFormat('d M Y') }} {{ currency_symbol() }}{{ number_format($w->amount, 2) }} {{ admin_label($w->method) }} {{ $w->account_details }} {{ admin_label(ucfirst($w->status)) }} @if($w->processed_on) {{ $w->processed_on->translatedFormat('d M Y') }}
{{ $w->processedBy->name ?? '' }} @else — @endif
@if(hasPermission('agent_finance_update')) @if($w->status === 'requested')
@csrf
@endif @if(in_array($w->status, ['requested','approved']))
@csrf
@csrf
@endif @endif @if(hasPermission('agent_finance_delete') && $w->status !== 'paid') @endif
@endforeach
@endsection @push('scripts') @endpush