@extends('layouts.admin') @section('title', setting('school_name', 'ShulePoint') . ' | Finance Reports') @section('page-title', 'Finance Reports') @section('content') {{-- Statistic widgets --}}
KES {{ number_format($totals['collection'], 0) }} Total collection
KES {{ number_format($totals['balances'], 0) }} Outstanding balances
{{ number_format($totals['defaulters'], 0) }} Defaulters
{{-- Report type switcher --}}

Finance Reports

@if($type === 'collection') {{-- Collection by method --}}

Collection by method KES {{ number_format($totals['collection'], 0) }} total

@forelse($collection as $c) @empty @endforelse
Method Count Total
{{ $c->method }} {{ $c->n }} KES {{ number_format($c->total, 0) }}

No collections yet

Payments grouped by method will appear here.

@endif @if($type === 'balances') {{-- Outstanding balances --}}

Outstanding balances KES {{ number_format($totals['balances'], 0) }} total

@forelse($balances as $b) @empty @endforelse
Invoice Learner Balance
{{ $b->invoice_no }} @if($b->learner){{ $b->learner->first_name }} {{ $b->learner->last_name }} {{ $b->learner->admission_no }}@else#{{ $b->learner_id }}@endif KES {{ number_format($b->balance, 0) }}

No outstanding balances

All invoices are fully paid.

@endif @if($type === 'defaulters') {{-- Defaulters --}}

Defaulters {{ number_format($defaulters->total()) }} total

@forelse($defaulters as $d) @empty @endforelse
Invoice Learner Balance Status
{{ $d->invoice_no }} @if($d->learner){{ $d->learner->first_name }} {{ $d->learner->last_name }} {{ $d->learner->admission_no }}@else#{{ $d->learner_id }}@endif KES {{ number_format($d->balance, 0) }} {{ ucfirst($d->status) }}

No defaulters

Every learner is up to date on fees.

@endif @endsection