@extends('layouts.app') @section('title', 'Finance Reports') @section('content')

Finance reports

Collection performance, expenditure and class-wise outstanding balances for the selected period.
Payments CSV Expenses CSV
@include('finance._nav')

Daily collection

{{ $from }} to {{ $to }}
{{ money($collected) }}
@if($daily->count()) {!! \App\Support\Chart::line($daily->mapWithKeys(fn ($row) => [\Carbon\Carbon::parse($row->paid_on)->format('d M') => (float) $row->total])->all()) !!} @else @endif

By payment mode

Share of collections
@if($modes->count()) {!! \App\Support\Chart::donut($modes->pluck('total', 'mode')->all()) !!}
@foreach($modes as $mode)
{{ $mode->mode }} ({{ $mode->entries }}) {{ money($mode->total) }}
@endforeach
@else @endif

Class-wise fee position

Invoiced, collected and outstanding per class.
@php($classTotal = max(1, $byClass->sum('total'))) @forelse($byClass as $row) @php($rate = $row->total > 0 ? round($row->paid / $row->total * 100) : 0) @empty @endforelse @if($byClass->count()) @endif
ClassInvoicedPaidBalanceCollection rate
{{ $row->name }} {{ money($row->total) }} {{ money($row->paid) }} {{ money($row->balance) }}
{{ $rate }}%
Total {{ money($byClass->sum('total')) }} {{ money($byClass->sum('paid')) }} {{ money($byClass->sum('balance')) }} {{ $classTotal > 0 ? round($byClass->sum('paid') / $classTotal * 100) : 0 }}% overall
Government funding in period
{{ money($gov) }}
Net cash position in period
{{ money($collected + $otherIncome + $gov - $expenses) }}
Collection vs invoiced
{{ $invoiced > 0 ? round($collected / $invoiced * 100) : 0 }}%
@endsection