@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
Filter Options
@php $collectionRate = $total_collectable > 0 ? ($total_collected / $total_collectable) * 100 : 0; @endphp
Total Fee

৳ {{ number_format($total_fee, 0) }}

৳ {{ number_format($total_fee, 2) }}
Total Waiver

৳ {{ number_format($total_waiver, 0) }}

৳ {{ number_format($total_waiver, 2) }} @if($total_fee > 0) {{ number_format(($total_waiver / $total_fee) * 100, 1) }}% @endif
Collectable

৳ {{ number_format($total_collectable, 0) }}

৳ {{ number_format($total_collectable, 2) }}
Total Collected

৳ {{ number_format($total_collected, 0) }}

৳ {{ number_format($total_collected, 2) }} @if($total_collectable > 0) {{ number_format(($total_collected / $total_collectable) * 100, 1) }}% @endif
Total Due

৳ {{ number_format($total_due, 0) }}

৳ {{ number_format($total_due, 2) }} @if($total_collectable > 0) {{ number_format(($total_due / $total_collectable) * 100, 1) }}% @endif
Today

৳ {{ number_format($today_collect, 0) }}

৳ {{ number_format($today_collect, 2) }} {{ date('M d') }}
Overall Collection Rate
@if($total_collectable > 0)

{{ number_format($collectionRate, 1) }}%

@else N/A @endif
Target: 100% {{ $collectionRate >= 80 ? 'Excellent Standing' : ($collectionRate >= 60 ? 'Moderate Recovery' : 'Attention Needed') }}
@php $financialCharts = [ [ 'key' => 'session', 'title' => 'Full Session', 'subtitle' => $selectedSessionData?->name ?? 'Selected Session', 'summary' => $sessionFinancials, ], [ 'key' => 'monthly', 'title' => 'Monthly', 'subtitle' => now()->format('F Y'), 'summary' => $monthlyFinancials, ], [ 'key' => 'weekly', 'title' => 'Weekly', 'subtitle' => now()->format('M d').' - '.now()->copy()->endOfWeek()->format('M d'), 'summary' => $weeklyFinancials, ], [ 'key' => 'today', 'title' => 'Today', 'subtitle' => now()->format('M d, Y'), 'summary' => $todayFinancials, ], ]; foreach ($financialCharts as &$financialChart) { $financialChart['payload'] = json_encode([ 'labels' => ['Income', 'Expense'], 'values' => [ round($financialChart['summary']['income'] ?? 0, 2), round($financialChart['summary']['expense'] ?? 0, 2), ], 'colors' => ['#103f38', '#e11d48'], ]); } unset($financialChart); @endphp
@foreach($financialCharts as $chart)
{{ $chart['title'] }}
{{ $chart['subtitle'] }}
Income vs Expense
Income: ৳{{ number_format($chart['summary']['income'] ?? 0, 2) }} Expense: ৳{{ number_format($chart['summary']['expense'] ?? 0, 2) }}
@php $net = $chart['summary']['net'] ?? 0; @endphp Net: {{ $net >= 0 ? '+' : '' }}৳ {{ number_format($net, 2) }}
@endforeach
Student Statistics ({{ $selectedSessionData?->name ?? 'Selected Session' }})
# Category Total Students Share / Percentage
1
Total Enrolled Students
{{ number_format($total_students) }} 100%
2
New Admissions
{{ number_format($new_admissions) }} @if($total_students > 0) {{ number_format(($new_admissions / $total_students) * 100, 1) }}% @else N/A @endif
3
Previous / Returning Students
{{ number_format($returning_students) }} @if($total_students > 0) {{ number_format(($returning_students / $total_students) * 100, 1) }}% @else N/A @endif
4
Promoted Students
{{ number_format($promoted_students) }} @if($total_students > 0) {{ number_format(($promoted_students / $total_students) * 100, 1) }}% @else N/A @endif
Updating Dashboard...
@endsection @section('customjs') @endsection