@foreach([
['farmers_with_balance', 'Can remind (debt)', 'farmers with balance + phone', 'bx-wallet', 'danger'],
['total_outstanding_ugx', 'Outstanding advances', 'UGX total owed', 'bx-money', 'coffee'],
['farmers_balance_no_phone', 'Missing phones', 'debtors we cannot SMS', 'bx-phone-off', 'warning'],
['payment_queue', 'Payment queue', 'waiting at desk', 'bx-megaphone', 'blue'],
['pending_cash_vouchers', 'Cash ready', 'approved vouchers', 'bx-receipt', 'green'],
['farmers_with_phone', 'Farmer contacts', 'reachable numbers', 'bx-user', 'neutral'],
] as [$key, $label, $sub, $icon, $tone])
@endforeach
@if(count($missingContacts) > 0)
@if(str_contains($key, 'ugx') || str_contains($key, 'outstanding'))
{{ number_format($dashboardStats[$key] ?? 0, 0) }}
@else
{{ number_format($dashboardStats[$key] ?? 0) }}
@endif
{{ $label }}
{{ $sub }}
{{ $dashboardStats['farmers_balance_no_phone'] ?? count($missingContacts) }} farmer(s) owe money but have no phone number
Add contacts on their profile before you can SMS them about advances.
| Farmer | No. | Balance | |
|---|---|---|---|
| {{ $row['name'] }} | {{ $row['farmer_number'] }} | UGX {{ $row['balance'] }} | @can('farmer.edit') Add phone @endcan |
Delivery report
{{ $report['audience'] ?? 'Campaign' }} — {{ $report['sent'] ?? 0 }} sent, {{ $report['failed'] ?? 0 }} failed @if(!empty($report['estimated_cost_ugx'])) · est. UGX {{ number_format($report['estimated_cost_ugx']) }} @endif
| Recipient | Phone | Status | Message |
|---|---|---|---|
| {{ $row['name'] ?? '—' }} | {{ $row['phone'] ?? '—' }} | {{ ucfirst($row['status'] ?? '') }} | {{ \Illuminate\Support\Str::limit($row['message'] ?? '', 100) }} |
Tap to load message + audience
@foreach($templatesByCategory as $category => $items)
{{ $category }}
@foreach($items as $key => $template)
@endforeach
@endforeach
{{ $senderId }}
Select a template or type a message to see how it looks on a phone.
| When | Audience | By | Sent | Failed | Est. cost |
|---|---|---|---|---|---|
| {{ $c->created_at?->format('M j, H:i') }} | {{ config('sms.audiences.'.$c->audience.'.label', $c->audience) }} | {{ $c->user?->name ?? '—' }} | {{ $c->sent_count }} | @if($c->failed_count){{ $c->failed_count }}@else — @endif | UGX {{ number_format($c->estimated_cost ?? 0) }} |