@extends('layouts.app') @section('title', 'Expenses') @section('content') @php $groups = [ 'Utilities' => ['Electricity & Water', 'Internet & Communications'], 'Supplies' => ['Teaching Materials', 'Kitchen Supplies'], 'Maintenance' => ['Repairs & Maintenance'], 'Transport' => ['Transport Costs'], 'Staff Costs' => ['Teaching Staff Salaries', 'Non-Teaching Staff Salaries', 'Staff Benefits'], ]; @endphp

Expenses

Record and manage school expenses with printable vouchers

Total Valid

KES {{ number_format($summary['total'], 2) }}

Vouchers

{{ $summary['count'] }}

Voided

KES {{ number_format($summary['voided'], 2) }}

+ Record Expense
@csrf
@foreach ($expenses as $e) @endforeach
Voucher Payee Ledger Date Mode Amount Status Actions
{{ $e->voucher_no }} {{ $e->payee }} {{ $e->ledger }} {{ $e->date }} {{ $e->mode_of_payment }} KES {{ number_format($e->amount, 2) }} {{ $e->status }} @if ($e->void_reason) {{ $e->void_reason }} @endif
PDF @if ($e->status !== 'Voided')
Edit
@csrf @method('PUT')
@csrf
@endif
{{ $expenses->links() }}

Spending by Ledger

@foreach ($ledgerGroups as $g) @endforeach
Group Ledger Total
{{ $g->group }} {{ $g->ledger }} KES {{ number_format($g->total, 2) }}
@endsection @push('scripts') @endpush