{{ __('Voucher agents') }} {{ __('Batches') }} @if (session('agent-flash'))
{{ session('agent-flash') }}
@endif
{{-- ── Add / edit ── --}} @if ($showForm)
{{ $editingId ? __('Edit agent') : __('New agent') }}
@if ($editingId)

{{ __('Changing the rate only affects stock assigned from now on — codes already handed out keep the commission they were given.') }}

@endif
@endif {{-- ── Record a payout ── --}} @if ($payoutAgentId)
{{ __('Record a payout') }}

{{ __('This only clears what you owe. Their sales history is kept.') }}

@endif {{-- ── Agents ── --}}
{{ __('Agents') }}
@forelse ($agents as $a) @empty @endforelse
{{ __('Agent') }} {{ __('Location') }} {{ __('Rate') }} {{ __('Stock') }} {{ __('Sold') }} {{ __('Sales') }} {{ __('Owed') }} {{ __('Status') }} {{ __('Actions') }}
{{ $a->name }} @if ($a->phone) {{ $a->phone }} @endif {{ $a->location ?: '—' }} {{ (float) $a->commission_percentage }}% {{ $a->stock_count }} {{ $a->sold_count }} {{ money($a->sales_value ?? 0, 0) }} {{ money($a->balance, 0) }} {{ ucfirst($a->status) }} @if ($a->balance > 0) @endif
{{ __('No agents yet. Add the shops and people who sell your cards.') }}
@if ($agents->hasPages())
{{ $agents->links() }}
@endif