@extends('admin.layouts.app') @section('title', 'My Fees') @section('breadcrumb') @endsection @section('content')
₹{{ number_format($totalPaid) }}
Total Paid
₹{{ number_format($totalPending) }}
Pending Amount
{{ $payments->count() }}
Total Transactions
@if($totalPending > 0)
You have pending dues of ₹{{ number_format($totalPending) }}. Please pay before the due date to avoid late fees.
@endif @if($assignedGroups->count())
Fee Schedule for Your Class
@foreach($assignedGroups->filter() as $group) @php $isPaid = $payments->where('fee_group_id', $group->id)->where('status','paid')->count() > 0; @endphp
{{ $group->name }}
Due: {{ $group->due_date ? $group->due_date->format('d M Y') : 'N/A' }}
@if($isPaid) Paid @else Pending @endif
@foreach($group->items as $item)
{{ $item->feeHead?->name }} ₹{{ number_format($item->amount) }}
@endforeach
Total ₹{{ number_format($group->items->sum('amount')) }}
@if(!$isPaid)
@csrf
@else @php $paidRecord = $payments->where('fee_group_id', $group->id)->first(); @endphp @if($paidRecord) Download Receipt @endif @endif
@endforeach
@endif
Payment History
@forelse($payments as $pay) @empty @endforelse
Payment No. Description Date Method Amount Status Receipt
{{ $pay->payment_no }} {{ $pay->feeGroup?->name ?? $pay->feeHead?->name ?? 'Fee Payment' }} {{ $pay->payment_date->format('d M Y') }} {{ $pay->payment_method }} ₹{{ number_format($pay->net_amount) }} {{ ucfirst($pay->status) }} @if($pay->status === 'paid') @endif
No payment history found
@endsection