@extends('statistics.base') @section('action-content')

🏦 Financial Dashboard

@if(auth()->user()->isAdmin() || auth()->user()->hasRole('manager'))

{{ number_format($openingBalance,2) }}

Opening Balance

{{ number_format($inflows,2) }}

Total Inflows

{{ number_format($outflows,2) }}

Total Outflows

{{ number_format($closingBalance,2) }}

Closing Balance

Deposits {{ number_format($deposits,2) }}
Withdrawals {{ number_format($withdrawals,2) }}
Loan Repayments {{ number_format($loanRepayments,2) }}
New Clients {{ $newClients }}
Loan Disbursement Today {{ number_format($loanDisbursement,2) }}
💰 Total Savings

{{ number_format($totalSavings,2) }}

📉 Outstanding Loans

{{ number_format($outstandingLoans,2) }}

📈 Cash Flow Trend (Last 7 Days)
📊 Deposits vs Withdrawals
👨‍💼 Staff Performance
@php $totalTransactions = $staffPerformance->sum('total_transactions'); $totalAmount = $staffPerformance->sum('total_amount'); @endphp @forelse($staffPerformance as $key => $staff) @empty @endforelse @if($staffPerformance->count()) @endif
# Staff Name Total Transactions Total Amount
{{ $key + 1 }} {{ $staff->staff_name }} {{ $staff->total_transactions }} {{ number_format($staff->total_amount,2) }}
No data available
TOTAL {{ $totalTransactions }} {{ number_format($totalAmount,2) }}
@else
You are not authorized to view this dashboard.
@endif
@endsection @section('scripts') @endsection