{{ __('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...') }}
{{ __('Subscriber') }}
{{ __('Receipt') }}
{{ __('Method') }}
{{ __('Type') }}
{{ __('Reconciled') }}
{{ __('Payout') }}
{{ __('Amount') }}
{{ __('Date') }}
{{ __('Activation') }}
@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
{{-- 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
@empty
@if ($search !== '' || $method !== '' || $range !== 'all')
{{ __('No payments match these filters.') }}
@else
{{ __('No payments recorded yet.') }}
@endif