@extends('layouts.master') @section('page_title', 'Fee Collection Report') @section('content')
Period: {{ Carbon\Carbon::parse($startDate)->format('M d, Y') }} - {{ Carbon\Carbon::parse($endDate)->format('M d, Y') }}
Generated: {{ Carbon\Carbon::now()->format('M d, Y g:i A') }}
Total Students: {{ $feeCollections->count() }}
Total Collected
Students Paid
Average Payment
Total Transactions
| Class | Students | Total Collected | Average per Student |
|---|---|---|---|
| {{ $summary->class_name }} | {{ $summary->student_count }} | ${{ number_format($summary->total_collected, 2) }} | ${{ number_format($summary->avg_payment, 2) }} |
| Total | {{ $classSummary->sum('student_count') }} | ${{ number_format($classSummary->sum('total_collected'), 2) }} | ${{ $classSummary->count() > 0 ? number_format($classSummary->avg('avg_payment'), 2) : '0.00' }} |
| Student ID | Student Name | Class | Section | Amount Paid | Payments | First Payment | Last Payment |
|---|---|---|---|---|---|---|---|
{{ $collection->student_id }} |
{{ $collection->student_name }} | {{ $collection->class_name }} | {{ $collection->section_name ?? 'N/A' }} | ${{ number_format($collection->total_paid, 2) }} | {{ $collection->payment_count }} | {{ Carbon\Carbon::parse($collection->first_payment)->format('M d, Y') }} | {{ Carbon\Carbon::parse($collection->last_payment)->format('M d, Y') }} |
| Grand Total | ${{ number_format($feeCollections->sum('total_paid'), 2) }} | {{ $feeCollections->sum('payment_count') }} | |||||