@extends('layouts.app') @section('title', 'Library Fines | Library') @section('sidebar-menu') @include('schooladmin.partials.sidebar') @endsection @section('sidebar-footer')

{{ auth()->user()->school?->name ?? 'Institution Axis' }}

@endsection @section('breadcrumb') Home / Library / Fines @endsection @section('navbar-right')
5
@endsection @section('content')

Fine Management

Track and collect overdue fines
@foreach(['success', 'error'] as $msg) @if(session($msg))
{{ session($msg) }}
@endif @endforeach {{-- Summary Cards --}}
KES {{ number_format($totalUnpaid, 2) }}
Total Unpaid Fines
KES {{ number_format($totalPaid, 2) }}
Total Collected
{{ $fines->total() }}
Total Fine Records
{{-- Fines Table --}}
All Fine Records
@forelse($fines as $fine) @empty @endforelse
# Borrower Book Due Date Amount (KES) Status Paid On Action
{{ $loop->iteration }} {{ $fine->user->name }} {{ $fine->loan->book->title ?? '—' }} {{ $fine->loan->due_date?->format('d M Y') ?? '—' }} {{ number_format($fine->amount, 2) }} @if($fine->status === 'paid') Paid @else Unpaid @endif {{ $fine->paid_at ? $fine->paid_at->format('d M Y') : '—' }} @if($fine->status === 'unpaid')
@csrf
@else Cleared @endif
No fines recorded. All borrowers are on time!
@if($fines->hasPages()) @endif
@endsection @section('custom-scripts') @endsection