@extends('layouts.portal')
@section('title', 'Finance overview')
@section('subtitle', 'Invoiced, collected, outstanding and overdue — with installments, revenue mix and learner balances.')
@section('actions')
Export balances (CSV)
New payment plan
@endsection
@section('content')
Total invoiced{{ money($kpis['invoiced']) }}{{ $from->format('d M Y') }} – {{ $to->format('d M Y') }}
Total collected{{ money($kpis['collected']) }}{{ $kpis['collection_rate'] !== null ? $kpis['collection_rate'].'% collection rate' : 'verified payments' }}
Outstanding{{ money($kpis['outstanding']) }}open invoices, all time
Overdue{{ money($kpis['overdue']) }}past due installments & invoices
Due in 30 days{{ money($kpis['upcoming_30']) }}upcoming installments
Active plans{{ number_format($kpis['plans_active']) }}installment plans running
Waived{{ money($kpis['waived']) }}authorised waivers in period
Refunded{{ money($kpis['refunded']) }}reversed payments in period
Revenue by month
collected
@include('partials.charts.bars', ['data' => $byMonth, 'height' => 210, 'format' => 'money', 'title' => 'Revenue by month'])
Revenue by course
top 10
@include('partials.charts.donut', ['data' => $byCourse, 'size' => 160, 'format' => 'money', 'title' => 'Revenue by course', 'center' => 'Collected'])
| Status | Installments | Amount | Outstanding |
@forelse(collect(\App\Models\Installment::STATUSES)->keys()->filter(fn ($k) => isset($instStatus[$k])) as $k)
| {{ $instStatus[$k]['count'] }} | {{ money2($instStatus[$k]['amount']) }} | {{ money2($instStatus[$k]['outstanding']) }} |
@empty
| No installment plans yet. |
@endforelse
Payment methods
collected in period
@include('partials.charts.donut', ['data' => $methods, 'size' => 150, 'format' => 'money', 'title' => 'Payment methods', 'center' => 'Methods'])