@extends('layouts.portal') @section('title', 'Payment plans') @section('subtitle', 'Installment plans with automatic reminders, receipts and overdue follow-up.') @section('actions') New payment plan@endsection @section('content') @php($st = $filters['status'] ?? '')
Active plans{{ $counts['active'] }}{{ $counts['completed'] }} fully paid
Collected{{ money($totals['collected']) }}on active plans
Remaining{{ money($totals['remaining']) }}still to collect
Overdue{{ money($totals['overdue']) }}{{ $counts['overdue'] }} plan(s) behind
@forelse($plans as $p) @php($next = $p->nextInstallment()) @empty @endforelse
PlanLearnerTotalPaidRemainingNext installmentStatus
{{ $p->code }}{{ $p->installments->where('status', '!=', 'cancelled')->count() }} parts · {{ $p->invoice?->number }} {{ $p->customer_name }}{{ $p->course?->title ?? $p->customer_email }} {{ money2($p->total) }} {{ money2($p->paidAmount()) }}
{{ money2($p->remaining()) }} @if($next){{ money2($next->outstanding()) }}{{ $next->label }} · {{ $next->due_date->format('d M Y') }}@else—@endif
New payment plan
{{ $plans->links() }} @endsection