@extends('layouts.app') @section('title', 'Finance & Accounting') @section('content') @php $f = $filters ?? []; $qParams = request()->query(); $barColors = ['bg-blue-500','bg-violet-500','bg-amber-500','bg-emerald-500','bg-red-400','bg-slate-500']; @endphp

Finance & Accounting

Costs, expenses and accounting records

Export Excel Export PDF
@if($filteredProject ?? null)

Ledger scoped to {{ $filteredProject->name }}

Clear project filter
@endif

Total Budget

{{ \App\Support\Format::mwkDecimal($totalBudget) }}

Total Invoiced

{{ \App\Support\Format::mwkDecimal($totalInvoiced) }}

Received

{{ \App\Support\Format::mwkDecimal($received) }}

Outstanding

{{ \App\Support\Format::mwkDecimal($outstanding) }}

Recent Transactions

Clear
@if($transactions->count() === 0)

No transactions found

Record your first transaction or adjust your filters.

@else @foreach($transactions as $t) @php $isInc = $t->transaction_type === 'Income'; $amtDisp = $isInc ? (float) $t->amount : -1 * abs((float) $t->amount); @endphp @endforeach
Date Description Project Amount Type
{{ $t->transaction_date?->format('M j, Y') }} {{ \Illuminate\Support\Str::limit($t->description, 48) }} @if($t->project_id) {{ $t->project?->name }} @else General @endif {{ \App\Support\Format::mwkDecimal($amtDisp) }} {{ $t->transaction_type }}
{{ $transactions->withQueryString()->links() }}
@endif

Cost Breakdown

From expense transactions (manual + approved expenses)

@if(($costBreakdown['total'] ?? 0) <= 0)

No approved expenses recorded yet.

@else
@foreach($costBreakdown['rows'] as $i => $row)
{{ $row['key'] }} {{ \App\Support\Format::mwkDecimal($row['amount']) }}

{{ number_format($row['pct'], 1) }}% of total

@endforeach
@endif

Expenses Pending Approval

@if($pendingExpenses->isEmpty())
No expenses pending approval.
@else @foreach($pendingExpenses as $e) @endforeach
Date Staff Description Project Amount Action
{{ $e->expense_date?->format('M j, Y') }} {{ $e->employee?->name ?? $e->staff_name ?? 'Unknown' }} {{ \Illuminate\Support\Str::limit($e->description, 40) }} @if($e->project_id) {{ $e->project?->name }} @else — @endif {{ \App\Support\Format::mwkDecimal($e->amount) }}
@endif
{{-- Add transaction --}} {{-- Submit expense --}} {{-- Reject expense --}} @endsection @push('scripts') @endpush