@extends('layouts.app') @section('title', 'Accounting Reports') @section('content') @php $tabs = ['Income Statement', 'Balance Sheet', 'Receipts & Payments', 'Account View', 'Trial Balance', 'Vouchers', 'Payroll']; $active = request('tab', 'Income Statement'); @endphp

Accounting Reports

Financial summaries for the period — month {{ $month }}

@foreach ($tabs as $tab) {{ $tab }} @endforeach
{{-- Income Statement --}}

Income Statement — 2026

Income

Tuition & Fees CollectedKES {{ number_format($collected, 2) }}
@foreach ($incomeByGroup as $g)
{{ $g->group }}KES {{ number_format($g->total, 2) }}
@endforeach
Total IncomeKES {{ number_format($income + $collected, 2) }}

Expenses

@foreach ($expenseByLedger as $e)
{{ $e->ledger }}KES {{ number_format($e->total, 2) }}
@endforeach
Total ExpensesKES {{ number_format($expenses, 2) }}
Surplus / (Deficit) KES {{ number_format(($income + $collected) - $expenses, 2) }}
{{-- Balance Sheet --}}

Balance Sheet — as at {{ now()->format('d M Y') }}

Assets

Cash & BankKES {{ number_format($income + $collected - $expenses, 2) }}
Accounts Receivable (fees)KES {{ number_format($outstanding, 2) }}
Accounts Receivable (suppliers)KES {{ number_format($payables->sum('balance'), 2) }}
Total AssetsKES {{ number_format($income + $collected - $expenses + $outstanding + $payables->sum('balance'), 2) }}

Liabilities & Equity

Accounts PayableKES {{ number_format($payables->sum('balance'), 2) }}
Deferred Fees (starting B/F)KES 0.00
Retained SurplusKES {{ number_format($income + $collected - $expenses, 2) }}
Total Liabilities & EquityKES {{ number_format($income + $collected - $expenses + $payables->sum('balance'), 2) }}
{{-- Receipts & Payments --}}

Receipts & Payments Statement

Receipts

Fees collected (receipts)KES {{ number_format($receiptsTotal, 2) }}
Other incomeKES {{ number_format($incomeTotal, 2) }}
Total ReceiptsKES {{ number_format($receiptsTotal + $incomeTotal, 2) }}

Payments

@foreach ($expenseByLedger as $e)
{{ $e->ledger }}KES {{ number_format($e->total, 2) }}
@endforeach
Total PaymentsKES {{ number_format($expensesTotal, 2) }}
{{-- Account View --}}

Account View

Recent fee receipts

@foreach ($recent as $r) @endforeach
Receipt Student Date Mode Amount
{{ $r->receipt_no }} {{ $r->student_name }} {{ $r->date }} {{ $r->mode }} KES {{ number_format($r->amount, 2) }}
{{-- Trial Balance --}}

Trial Balance — as at {{ now()->format('d M Y') }}

@foreach ($ledgers as $l) @endforeach
Ledger Debit Credit
{{ $l->ledger_name }} {{ $l->account_code }} {{ $l->normal_balance === 'Debit' ? 'KES '.number_format($l->account_code >= '3001' ? $expenses : $outstanding, 2) : '' }} {{ $l->normal_balance === 'Credit' ? 'KES '.number_format($l->account_code < '3000' ? $collected + $income : 0, 2) : '' }}
{{-- Vouchers --}}

Payment Vouchers

@foreach ($vouchers as $v) @endforeach
Voucher Payee Ledger Date Amount
{{ $v->voucher_no }} {{ $v->payee }} {{ $v->ledger }} {{ $v->date }} KES {{ number_format($v->amount, 2) }}
{{-- Payroll --}}

Payroll Summary — August 2026

Monthly statutory and staff earnings summary (computed from staff basic salary)

@foreach ($payroll as $p) @endforeach
Staff No. Employer Role Basic Gross Deductions Net Pay
{{ $p['staff_no'] }} {{ $p['name'] }} {{ $p['role'] }} KES {{ number_format($p['basic'], 2) }} KES {{ number_format($p['gross'], 2) }} KES {{ number_format($p['deductions'], 2) }} KES {{ number_format($p['net'], 2) }}
Totals ({{ $payroll->count() }} staff) KES {{ number_format($payroll->sum('basic'), 2) }} KES {{ number_format($payroll->sum('gross'), 2) }} KES {{ number_format($payroll->sum('deductions'), 2) }} KES {{ number_format($payroll->sum('net'), 2) }}
@endsection