@extends('admin.layouts.master') @section('title', __('admin.reports.title')) @section('css')@endsection @section('content') @php $totals = $liveSnapshot['totals'] ?? []; $highlights = $liveSnapshot['payload']['highlights'] ?? []; $activitySummary = $systemActivity['summary'] ?? []; $activityTimeline = $systemActivity['timeline'] ?? []; $activityTypeBreakdown = $systemActivity['breakdown_by_type'] ?? []; $activityEntityBreakdown = $systemActivity['breakdown_by_entity'] ?? []; @endphp

{{ __('admin.reports.title') }}

{{ __('admin.reports.subtitle') }}

{{ __('admin.reports.add') }}
@if(session('success')) @endif

{{ __('admin.reports.total_payments') }}

{{ number_format((float) ($totals['payments'] ?? 0), 2) }}

{{ __('admin.reports.total_expenses') }}

{{ number_format((float) ($totals['expenses'] ?? 0), 2) }}

{{ __('admin.reports.net_result') }}

{{ number_format((float) ($totals['net'] ?? 0), 2) }}

{{ __('admin.reports.collection_rate') }}

{{ number_format((float) ($totals['collection_rate'] ?? 0), 2) }}%

{{ __('admin.reports.quick_filter_title') }}

{{ __('admin.reports.quick_filter_hint') }}

{{ __('admin.actions.reset') }}
{{ __('admin.reports.highlights.top_expense_category') }}
{{ $highlights['top_expense_category']['name'] ?? '—' }}
{{ number_format((float) ($highlights['top_expense_category']['amount'] ?? 0), 2) }}
{{ __('admin.reports.highlights.lowest_cash_project') }}
{{ $highlights['lowest_cash_project']['name'] ?? '—' }}
{{ number_format((float) ($highlights['lowest_cash_project']['cash_profit'] ?? 0), 2) }}
{{ __('admin.reports.highlights.top_collection_project') }}
{{ $highlights['top_collection_project']['name'] ?? '—' }}
{{ number_format((float) ($highlights['top_collection_project']['payments'] ?? 0), 2) }}

{{ __('admin.reports.activity.title') }}

{{ __('admin.reports.activity.subtitle') }}

{{ __('admin.reports.activity.summary.total_activities') }}

{{ number_format((int) ($activitySummary['total_activities'] ?? 0)) }}

{{ __('admin.reports.activity.summary.active_users') }}

{{ number_format((int) ($activitySummary['active_users'] ?? 0)) }}

{{ __('admin.reports.activity.summary.active_entities') }}

{{ number_format((int) ($activitySummary['active_entities'] ?? 0)) }}

{{ __('admin.reports.activity.summary.activity_days') }}

{{ number_format((int) ($activitySummary['activity_days'] ?? 0)) }}
{{ __('admin.reports.activity.breakdown_by_type') }}
@foreach($activityTypeBreakdown as $item) {{ $item['label'] }}: {{ number_format((int) $item['count']) }} @endforeach
{{ __('admin.reports.activity.breakdown_by_entity') }}
@forelse($activityEntityBreakdown as $item) {{ $item['label'] }}: {{ number_format((int) $item['count']) }} @empty {{ __('admin.reports.activity.timeline_empty') }} @endforelse
{{ __('admin.reports.activity.timeline_title') }}
# {{ __('admin.reports.activity.filters.type') }} {{ __('admin.reports.activity.timeline_title') }} {{ __('admin.reports.activity.actor_label') }} {{ __('admin.reports.generated_at') }}
@endsection @push('scripts') @endpush