@extends('platform.layout') @section('title', 'Payments to review') @section('content')

Proofs of payment

Check each payment against your Mpamba, Airtel Money or bank statement, then approve or reject it.

@foreach(['pending' => 'Waiting (' . $pendingCount . ')', 'approved' => 'Approved', 'rejected' => 'Rejected', 'all' => 'All'] as $key => $label) {{ $label }} @endforeach
@if($errors->any())
{{ implode(' ', $errors->all()) }}
@endif @forelse($submissions as $s)
{{ $s->tenant->name }} /{{ $s->tenant->slug }}
{{ formatCurrency($s->amount) }} for {{ $s->months }} {{ $s->months == 1 ? 'month' : 'months' }}
@if($s->plan && $s->plan !== $s->tenant->plan)
Changing plan: {{ $s->tenant->planName() }} → {{ config("tenancy.plans.{$s->plan}.name", $s->plan) }} (applied when approved)
@endif @php $expected = \App\Http\Controllers\BillingController::priceFor($s->plan ?: (string) $s->tenant->plan, (int) $s->months); @endphp @if($expected > 0 && abs($expected - (float) $s->amount) >= 1)
{{ $s->tenant->planName() }} plan expects {{ formatCurrency($expected) }}
@endif
Paid to: {{ $s->accountLabel() }}
Transaction ID: {{ $s->reference ?: '—' }}
Date paid: {{ $s->paid_on->format('d M Y') }}
Sent by: {{ $s->submitted_by_name }} · {{ $s->created_at->format('d M Y H:i') }}
Paid until now: {{ $s->tenant->paid_until?->format('d M Y') ?? 'no end date' }}
@if($s->note)
Note: {{ $s->note }}
@endif
@if($s->notified_at) Email sent {{ $s->notified_at->format('d M H:i') }} @else Email not sent yet{{ $s->notify_attempts ? ' (' . $s->notify_attempts . ' tries)' : '' }} @endif
Open proof ({{ $s->proof_name }})
@csrf
@if($s->isPending())
@csrf
months
MWK
@csrf
@else {{ ucfirst($s->status) }}
by {{ $s->reviewed_by }}, {{ $s->reviewed_at?->format('d M Y H:i') }}
@if($s->payment)
Extended to {{ $s->payment->period_to->format('d M Y') }}
@endif @if($s->review_note)
{{ $s->review_note }}
@endif @endif
@empty
Nothing here.
@endforelse {{ $submissions->links() }} @endsection