@extends('layouts.school') @section('title', 'Collections Report') @section('header', 'Collections Report') @section('content')

By Fee Category

@forelse ($byCategory as $row) @php $rate = $row['billed'] > 0 ? round($row['collected'] / $row['billed'] * 100) : 0; @endphp @empty @endforelse
Category Billed Collected Rate
{{ $row['category'] }} ₦{{ number_format($row['billed'], 0) }} ₦{{ number_format($row['collected'], 0) }} {{ $rate }}%
No invoice items yet.

Monthly Collections (Current Year)

@if (empty($byMonth))

No collections recorded yet.

@else @php $max = max($byMonth); @endphp
@foreach ($byMonth as $month => $total)
{{ \Carbon\Carbon::parse($month . '-01')->format('M Y') }}₦{{ number_format($total, 0) }}
@endforeach
@endif
@endsection