@extends('layouts.app') @section('title', 'Fee Setup') @php $students = \App\Models\Student::where('status', 'active')->orderBy('first_name')->get(['id', 'first_name', 'surname', 'admission_no', 'class_id']); @endphp @section('content')

Fees & invoicing

Build fee structures per class, raise invoices and track collection against each votehead.
@csrf
@include('finance._nav')

{{ $structure ? 'Structure for term '.$term : 'No structure yet' }}

Enter the amount charged per votehead. Zero entries are ignored.
@csrf
@forelse($voteheads as $votehead) @empty @endforelse
VoteheadTypeAmount
{{ $votehead->name }}
{{ ucfirst($votehead->category ?? 'General') }} @if($activityAmounts->has($votehead->id))
Activity {{ money($activityAmounts->get($votehead->id)) }}
@endif
{{ $votehead->type }}
Structure total: {{ money($structure->total ?? 0) }}

Invoicing

Raise invoices for the whole class.
@if($structure)
Class{{ $classes->firstWhere('id', $structure->class_id)?->name }}
Term total{{ money($structure->total) }}
Status{{ $structure->invoiced ? 'Invoiced' : 'Not invoiced' }}
@csrf
@else @endif

Single learner invoice

@csrf

Invoices for term {{ $term }} {{ $year }}

{{ $termInvoices->count() }} shown (latest 100).
@forelse($termInvoices as $invoice) @empty @endforelse
InvoiceLearnerClassTotalDiscountPaidBalanceStatusActions
{{ $invoice->invoice_no ?? '#'.$invoice->id }}
{{ $invoice->student_name }}
{{ $invoice->admission_no }}
{{ $invoice->class_name }} {{ money($invoice->total) }} {{ money($invoice->discount) }} {{ money($invoice->paid) }} {{ money($invoice->balance) }}
@if($invoice->sibling_eligible && $invoice->tuition_amount > 0) @endif

Voteheads

Fee heads appear in the structure builder and on invoices.
@forelse($voteheads as $votehead) @empty @endforelse
NameTypeCategoryPrioritySystemActions
{{ $votehead->name }} {{ $votehead->type }} {{ $votehead->category ?: '—' }} {{ $votehead->priority }} {!! $votehead->is_system ? 'System' : 'Custom' !!} @if(!$votehead->is_system)
@csrf @method('DELETE')
@endif

Government allocations

Recorded capitation and grants for the term.
@forelse($gov as $allocation) @empty @endforelse
AccountTermYearAmountReferenceStatus
{{ $allocation->account }} {{ $allocation->term }} {{ $allocation->year }} {{ money($allocation->amount) }} {{ $allocation->reference ?: '—' }}

Votehead allocation plan

How government funds are spread across voteheads.
@csrf @foreach($voteheads->take(10) as $votehead)
@endforeach
@csrf
@csrf

Existing target structures are replaced.

@foreach($termInvoices as $invoice) @if($invoice->sibling_eligible && $invoice->tuition_amount > 0)
@csrf

Available only because another active learner shares a recorded parent ID, phone, or email. This discount applies to Tuition only and cannot exceed unpaid tuition.

@endif @endforeach @endsection