@extends('layouts.main') @section('title', 'Contribution Statistics') @section('breadcrumb') @endsection @section('content')

Our mosque runs by your donations

(Sūrat al-Tawbah, Āyat 18) إِنَّمَا يَعْمُرُ مَسَاجِدَ اللَّهِ مَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَأَقَامَ الصَّلَاةَ وَآتَى الزَّكَاةَ وَلَمْ يَخْشَ إِلَّا اللَّهَ

The masjid (mosque) is an essential part of the spiritual and social fabric of a believing community. Those who maintain it and frequent it must possess certain qualities. The main aim of the masjid is to nurture pure individuals and the maintainers of the mosque must be people who nourish that growth.

{{ number_format($totalContributions ?? 0, 2) }} €

Total Contributions

{{ number_format($totalExpenses ?? 0, 2) }} €

Total Expenses

{{ number_format($totalTarget ?? 0, 2) }} €

Total Target

@foreach($statistics as $key => $stat)

{{ $stat['title'] }} - Target {{ number_format($stat['target']) }} {{ $stat['currency'] }}

Total Spent {{ number_format($stat['spent']) }} {{ $stat['currency'] }}
@php $spentPercent = $stat['target'] > 0 ? min(100, ($stat['spent'] / $stat['target']) * 100) : 0; @endphp
Remaining Budget {{ number_format($stat['remaining']) }} {{ $stat['currency'] }}
@php $remainingPercent = $stat['target'] > 0 ? ($stat['remaining'] / $stat['target']) * 100 : 0; @endphp

{{ number_format($spentPercent, 1) }}%

Budget Used

@endforeach

Expense Summary by Category

@php $grandTarget = 0; $grandSpent = 0; $grandRemaining = 0; @endphp @foreach($statistics as $key => $stat) @php $grandTarget += $stat['target']; $grandSpent += $stat['spent']; $grandRemaining += $stat['remaining']; $percentage = $stat['target'] > 0 ? min(100, ($stat['spent'] / $stat['target']) * 100) : 0; @endphp @endforeach
Category Target Budget Total Spent Remaining Progress
{{ $stat['title'] }} {{ number_format($stat['target']) }} {{ $stat['currency'] }} {{ number_format($stat['spent']) }} {{ $stat['currency'] }} {{ number_format($stat['remaining']) }} {{ $stat['currency'] }}
{{ number_format($percentage, 1) }}%
Grand Total {{ number_format($grandTarget) }} € {{ number_format($grandSpent) }} € {{ number_format($grandRemaining) }} € @php $grandPercentage = $grandTarget > 0 ? ($grandSpent / $grandTarget) * 100 : 0; @endphp {{ number_format($grandPercentage, 1) }}% Used
@endsection @push('scripts') @endpush