@extends('layouts.bootstrap') @section('title', 'Financial Dashboard') @section('content')

Financial Dashboard

Total Income

${{ number_format($totalIncome, 2) }}

Total Expenses

${{ number_format($totalExpenses, 2) }}

Net Profit

${{ number_format($netProfit, 2) }}

{{ number_format($profitMargin, 1) }}% margin
Outstanding Loans

${{ number_format($totalOutstanding, 2) }}

Income by Category
@if($incomeByCategory->count() > 0) @foreach($incomeByCategory as $category => $amount)
{{ $category }}
${{ number_format($amount, 2) }} ({{ $totalIncome > 0 ? number_format(($amount / $totalIncome) * 100, 1) : 0 }}%)
@endforeach @else

No income data for this period.

@endif
Expenses by Category
@if($expensesByCategory->count() > 0) @foreach($expensesByCategory as $category => $amount)
{{ $category }}
${{ number_format($amount, 2) }} ({{ $totalExpenses > 0 ? number_format(($amount / $totalExpenses) * 100, 1) : 0 }}%)
@endforeach @else

No expense data for this period.

@endif
Monthly Trends (Last 12 Months)
@foreach($monthlyTrends as $trend) @endforeach
Month Income Expenses Profit
{{ $trend['month'] }} ${{ number_format($trend['income'], 2) }} ${{ number_format($trend['expenses'], 2) }} ${{ number_format($trend['profit'], 2) }}
Pending Actions
@if($pendingExpenses > 0)
{{ $pendingExpenses }} expenses pending approval Review now
@endif @if($upcomingPayments > 0)
{{ $upcomingPayments }} investment payments due soon View details
@endif @if($pendingExpenses == 0 && $upcomingPayments == 0)

No pending actions at this time.

@endif
@endsection