@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
| Plan | Learner | Total | Paid | Remaining | Next installment | Status | |
@forelse($plans as $p)
@php($next = $p->nextInstallment())
| {{ $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 |
|
|
@empty
| New payment plan |
@endforelse
{{ $plans->links() }}
@endsection