{{ __('Payments ledger') }} {{ __('Record payment') }} {{-- Headline figures. Three periods, then the same month split by how the money arrived — so Mobile money and Vouchers add up to This month. --}}
{{-- Unmatched receipts are money you have been paid but not credited --}} @if ($this->unmatched > 0)
{{ trans_choice(':count M-Pesa receipt could not be matched to an account.|:count M-Pesa receipts could not be matched to an account.', $this->unmatched, ['count' => $this->unmatched]) }}
@endif {{-- Ledger --}}
{{ __('Payments') }}
{{ __('Loading...') }}
@forelse ($payments as $p) @php $paid = strtolower((string) $p->status) === 'paid'; // Reconciled means the gateway gave us a receipt for it. // Cash taken by hand has no receipt to match and is never // claimed as reconciled. $reconciled = $paid && filled($p->receipt); $activation = ($p->activated_at && $p->paid_at) ? max(0, \Carbon\Carbon::parse($p->paid_at)->diffInSeconds(\Carbon\Carbon::parse($p->activated_at), false)) : null; @endphp @empty @endforelse
{{ __('Subscriber') }} {{ __('Receipt') }} {{ __('Method') }} {{ __('Type') }} {{ __('Reconciled') }} {{ __('Payout') }} {{ __('Amount') }} {{ __('Date') }} {{ __('Activation') }}
{{ $p->who }} @if ($p->phone) {{ $p->phone }} @elseif ($p->taken_by) {{ $p->taken_by }} @endif {{ $p->receipt ?: '—' }} {{ strtoupper($p->method ?: '—') }} {{ strtoupper($p->kind ?: '—') }} @if ($reconciled) @else @endif {{ strtolower($p->method ?: '') === 'mpesa' ? $this->payoutRoute : __('Cash') }} {{ money($p->amount, 0) }} {{ \Carbon\Carbon::parse($p->paid_at)->format('M j, g:i A') }} {{-- How long the customer waited between paying and being let online. Anything but seconds here means the router was slow to take the credential. --}} @if ($activation === null) — @else {{ $activation < 60 ? $activation.'s' : round($activation / 60).'m' }} @endif
@if ($search !== '' || $method !== '' || $range !== 'all') {{ __('No payments match these filters.') }} @else {{ __('No payments recorded yet.') }} @endif
@if ($payments->hasPages())
{{ $payments->links() }}
@endif