@extends('admin.layout.app') @section('title', 'Financial Operations') @php $money = fn ($value) => number_format((float) $value, 2); $routeFor = fn ($name) => route('admin.finance-ops.section', $name); $tabs = [ 'dashboard' => ['label' => 'Dashboard', 'module' => 'reports'], 'employees' => ['label' => 'Employees', 'module' => 'employees'], 'payroll' => ['label' => 'Payroll', 'module' => 'payroll'], 'advances' => ['label' => 'Advances', 'module' => 'advances'], 'expenses' => ['label' => 'Expenses', 'module' => 'expenses'], 'exchange' => ['label' => 'Sarafi', 'module' => 'currency_exchange'], 'assets' => ['label' => 'Fixed Assets', 'module' => 'fixed_assets'], 'archive' => ['label' => 'Archive', 'module' => 'archive'], 'profit-loss' => ['label' => 'Profit & Loss', 'module' => 'reports'], 'testing' => ['label' => 'Testing Guide', 'module' => 'reports'], ]; $tabs = collect($tabs) ->filter(fn ($tab) => \App\Models\Finance\ModuleSetting::allows($tab['module'], auth()->user())) ->all(); @endphp @section('body')

Financial Operations

Student fees, payroll, advances, expenses, exchange, assets, archive, module control, and reports.

Student Fee Outstanding
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@endif @if($section === 'dashboard')
Fee income
{{ $money($feeIncome) }}
Total expenses
{{ $money($totalExpenses) }}
Net profit / loss
{{ $money($netProfit) }}
Student outstanding
{{ $money($studentFeeStats['outstanding']) }}
Student Fee Standing
Completely paid{{ $studentFeeStats['paid'] }}
Not paid{{ $studentFeeStats['unpaid'] }}
Partially paid{{ $studentFeeStats['partial'] }}
Total expected{{ $money($studentFeeStats['expected']) }}
Total collected{{ $money($studentFeeStats['collected']) }}
Total outstanding{{ $money($studentFeeStats['outstanding']) }}
Recent Financial Transactions
@forelse($recentTransactions as $tx) @empty @endforelse
DateTypeCategoryAmount
{{ $tx->transaction_date?->format('Y-m-d') ?? '—' }}
{{ $tx->shamsi_date }}
{{ $tx->type }} {{ $tx->category }} {{ $money($tx->amount) }} {{ $tx->currency }}
No financial transactions yet.
@endif @if($section === 'employees')
Employee and Teacher Financial Profiles
@foreach($employeeRows as $employee) @endforeach
NameRoleSalaryBank / ContractUpdate
{{ $employee->name }}
{{ $employee->email }}
{{ $employee->employee_type ?: $employee->roles->pluck('name')->join(', ') }} {{ $employee->salary_type ?: '—' }}
M {{ $money($employee->monthly_salary) }} / D {{ $money($employee->daily_rate) }} / H {{ $money($employee->hourly_rate) }}
{{ $employee->bank_account ?: '—' }}
{{ $employee->contract_start_date }} - {{ $employee->contract_end_date }}
@csrf
{{ $employeeRows->links('pagination::bootstrap-4') }}
@endif @if($section === 'payroll')
Generate Payroll
@csrf
Payroll History
@forelse($payrollRuns as $payroll) @empty @endforelse
EmployeePeriodGrossDeductionsNetStatus
{{ $payroll->employee->name ?? '—' }} {{ $payroll->period_start?->format('Y-m-d') }} - {{ $payroll->period_end?->format('Y-m-d') }} {{ $money($payroll->gross_salary) }} {{ $money($payroll->advance_deduction + $payroll->tax + $payroll->absence_deduction + $payroll->late_deduction + $payroll->other_deductions) }} {{ $money($payroll->net_salary) }} {{ $payroll->status }} Slip
No payroll runs yet.
{{ $payrollRuns->links('pagination::bootstrap-4') }}
@endif @if($section === 'advances')
Record Advance
@csrf
Advance Balances
@forelse($advances as $advance) @empty @endforelse
EmployeeDateAmountDeductedRemainingStatus
{{ $advance->employee->name ?? '—' }}{{ $advance->advance_date?->format('Y-m-d') }}
{{ $advance->shamsi_date }}
{{ $money($advance->amount) }}{{ $money($advance->deducted_amount) }}{{ $money($advance->remaining_amount) }}{{ $advance->approval_status }}Slip
No advances yet.
{{ $advances->links('pagination::bootstrap-4') }}
@endif @if($section === 'expenses')
Record Expense
@csrf
Expenses
@forelse($expenses as $expense) @empty @endforelse
DateTitleCategoryStatusAmount
{{ $expense->expense_date?->format('Y-m-d') }}
{{ $expense->shamsi_date }}
{{ $expense->title }}
{{ $expense->supplier }}
{{ $expense->category->name ?? '—' }}{{ $expense->approval_status }}{{ $money($expense->amount) }} {{ $expense->currency }}
No expenses yet.
{{ $expenses->links('pagination::bootstrap-4') }}
@endif @if($section === 'exchange')
Exchange Rate
@csrf
Exchange Transaction
@csrf
Exchange Transactions
@forelse($exchangeTransactions as $tx) @empty @endforelse
DateTypeFromRateTo
{{ $tx->transaction_date?->format('Y-m-d') }}
{{ $tx->shamsi_date }}
{{ $tx->transaction_type }}{{ $money($tx->from_amount) }} {{ $tx->from_currency }}{{ $tx->rate }}{{ $money($tx->to_amount) }} {{ $tx->to_currency }}
No exchange transactions yet.
{{ $exchangeTransactions->links('pagination::bootstrap-4') }}
@endif @if($section === 'assets')
Register Fixed Asset
@csrf
Fixed Assets
@forelse($assets as $asset) @empty @endforelse
CodeAssetLocationResponsibleStatusPrice
{{ $asset->asset_code }}{{ $asset->asset_name }}
{{ $asset->category->name ?? '—' }}
{{ $asset->location }}{{ $asset->responsiblePerson->name ?? '—' }}{{ $asset->status }}{{ $money($asset->purchase_price) }} {{ $asset->currency }}
No assets yet.
{{ $assets->links('pagination::bootstrap-4') }}
@endif @if($section === 'archive')
Archive Document
@csrf
Document Search
@forelse($documents as $doc) @empty @endforelse
NoDateTypeSubjectFrom / ToFile
{{ $doc->document_number }}{{ $doc->document_date?->format('Y-m-d') }}
{{ $doc->shamsi_date }}
{{ $doc->document_type }}{{ $doc->subject }}
{{ $doc->department }}
{{ $doc->sender ?: $doc->recipient }}@if($doc->attachment_path)Open@else — @endif
No archived documents found.
{{ $documents->links('pagination::bootstrap-4') }}
@endif @if($section === 'profit-loss')
Total income
{{ $money($totalIncome) }}
Total expenses
{{ $money($totalExpenses) }}
Net profit / loss
{{ $money($netProfit) }}
Profit and Loss Breakdown
Student fee income{{ $money($feeIncome) }}
Other income{{ $money($otherIncome) }}
Salary expenses{{ $money($salaryExpenses) }}
Operational and asset expenses{{ $money($operationalExpenses) }}
Net profit / loss{{ $money($netProfit) }}
@endif @if($section === 'testing')
System Testing Guide

Start at Step 1 and continue in order until final reports and dashboards are verified.

@foreach($steps as $step)
Step {{ $step->step_number }}: {{ $step->title }}
{{ $step->instructions }}
@endforeach
@endif @endsection