@php $grandPaid = 0; $grandFee = 0; @endphp @forelse($instituteReport as $instName => $rows) @php $instPaid = $rows->sum('paid'); $instFee = $rows->sum('total_fee'); $grandPaid += $instPaid; $grandFee += $instFee; @endphp
{{ $instName }}   |   {{ $rows->count() }} Students   |   Collected: ₹{{ number_format($instPaid, 0) }}
@foreach($rows as $i => $row) @endforeach
# Student Name Enrollment No Total Fee Paid Due Mode
{{ $i+1 }} {{ $row->student_name }} {{ $row->enrollment_no }} ₹{{ number_format($row->total_fee, 0) }} ₹{{ number_format($row->paid, 0) }} ₹{{ number_format($row->due, 0) }} {{ $row->payment_mode }}
Institute Subtotal: ₹{{ number_format($instFee, 0) }} ₹{{ number_format($instPaid, 0) }}
@empty

No collection data found for this period.

@endforelse @if(!$instituteReport->isEmpty())
GRAND TOTAL: ₹{{ number_format($grandFee, 0) }} ₹{{ number_format($grandPaid, 0) }}
PAYMENT MODE SUMMARY
@foreach($modeReport as $m) @endforeach
Mode Count Amount
{{ $m->payment_mode }} {{ $m->count }} ₹{{ number_format($m->total, 0) }}
@endif