@extends('layouts.app') @section('title', 'Finance Analytics') @section('subtitle', 'Revenue, collections and debtors') @section('content') Alerts Full reports

Revenue trend

Paid invoices over the last 6 months

Payment methods

Share of collected revenue

@if ($byMethod->isEmpty()) @else @endif

Top debtors

Students with the highest outstanding balance

@forelse ($debtors as $row) @empty @endforelse
StudentCourseBalance
{{ $row['student']->user->name }}
{{ $row['student']->student_number }}
{{ $row['student']->course?->name ?? '—' }} {{ money($row['balance']) }}

Invoice status

@php($totalInvoices = max(1, $statusCounts->sum())) @foreach (\App\Models\Payment::STATUSES as $key => $label) @php($count = $statusCounts[$key] ?? 0)
{{ $label }} {{ $count }}
@endforeach
{{ $overdueCount }} invoice(s) are overdue and need follow-up.
@endsection @push('scripts') @endpush