Reports
Both tools are read-only and take no arguments — same computations
apps/web’s Reports page runs.
report_overdue_payments
Section titled “report_overdue_payments”Invoices with status='overdue', joined to the student and plan they
belong to, oldest due_date first.
Returns a list of { invoice_id, amount, due_date, student_name, plan_name }.
report_students_per_teacher
Section titled “report_students_per_teacher”Count of actively-enrolled students per teacher (via classes →
class_enrollments where status='active'), highest first. This is the
basis for teacher pay.
Returns a list of { teacher_id, teacher_name, student_count }.