@extends('layouts.master') @section('page_title', 'Financial Health Report - ' . ucfirst($type)) @section('content')
Financial Health Report - {{ ucfirst($type) }}
{{ $reportData['school_info']['name'] ?? 'School Financial Health Report' }}

{{ $reportData['period']['label'] }} | Generated: {{ $reportData['generated_at']->format('M d, Y \a\t g:i A') }}

@php $riskLevel = $reportData['summary']['risk_level'] ?? 'unknown'; $riskBadgeClass = match($riskLevel) { 'low' => 'success', 'medium' => 'warning', 'high' => 'danger', 'critical' => 'danger', default => 'secondary' }; @endphp Risk Level: {{ ucfirst($riskLevel) }}

{{ $reportData['revenue_analysis']['bills_generated']['count'] }}

Bills Generated

₵{{ number_format($reportData['revenue_analysis']['bills_generated']['amount'], 2) }}

{{ $reportData['revenue_analysis']['payments_received']['count'] }}

Payments Received

₵{{ number_format($reportData['revenue_analysis']['payments_received']['amount'], 2) }}

{{ $reportData['revenue_analysis']['outstanding_bills']['count'] }}

Outstanding Bills

₵{{ number_format($reportData['revenue_analysis']['outstanding_bills']['amount'], 2) }}

{{ number_format($reportData['revenue_analysis']['collection_rate'], 1) }}%

Collection Rate

Payment efficiency
Payment Methods Breakdown
@if(!empty($reportData['payment_analysis']['payment_methods']) && $reportData['payment_analysis']['payment_methods']->count() > 0)
@foreach($reportData['payment_analysis']['payment_methods'] as $method) @endforeach
Method Transactions Amount
{{ ucfirst($method->payment_method) }} {{ $method->count }} ₵{{ number_format($method->total_amount, 2) }}
@else

No payment method data available for this period.

@endif
Fraud Risk Indicators
@if(!empty($reportData['fraud_indicators']) && count($reportData['fraud_indicators']) > 0) @foreach($reportData['fraud_indicators'] as $indicator) @php $indicatorRiskLevel = $indicator['risk_level'] ?? 'low'; $alertClass = match($indicatorRiskLevel) { 'high' => 'danger', 'critical' => 'danger', 'medium' => 'warning', default => 'info' }; @endphp
{{ ucfirst(str_replace('_', ' ', $indicator['type'])) }}

{{ $indicator['description'] }}

Value: {{ $indicator['value'] ?? 'N/A' }} | Risk Level: {{ ucfirst($indicatorRiskLevel) }}
@endforeach @else
No fraud indicators detected during this period.
@endif
Cash Payment Analysis

{{ $reportData['cash_discrepancies']['cash_not_deposited']->count() }}

Undeposited Cash

{{ $reportData['cash_discrepancies']['potential_duplicates']->count() }}

Potential Duplicates

{{ $reportData['cash_discrepancies']['round_number_payments']->count() }}

Round Number Payments

{{ $reportData['cash_discrepancies']['risk_score'] }}

Risk Score

@if(!empty($reportData['recommendations']) && count($reportData['recommendations']) > 0)
Recommendations
    @foreach($reportData['recommendations'] as $recommendation)
  • {{ $recommendation['title'] ?? 'Recommendation' }}

    {{ $recommendation['description'] ?? ($recommendation['recommendation'] ?? 'No description available') }}

    Priority: {{ ucfirst($recommendation['priority'] ?? 'low') }}
    {{ ucfirst($recommendation['priority'] ?? 'low') }}
  • @endforeach
@endif
Report Actions
Download Report
@endsection @section('scripts') @endsection