@extends('layouts.admin') @section('title', 'Branch Details - ' . $church->name) @section('page-title', $church->name) @section('page-subtitle', 'Detailed view of branch activities') @section('content')

{{ $church->name }}

{{ $church->location ?? 'No location set' }}

@if($church->parent) Sub-branch of {{ $church->parent->name }} @endif

Members

{{ number_format($stats['total_members']) }}

{{ $stats['active_members'] }} active

Total Income

GH₵{{ number_format($stats['total_donations'] + $stats['total_tithes'] + $stats['total_welfare'] + $stats['total_offerings'], 0) }}

Total Expenses

GH₵{{ number_format($stats['total_expenses'], 0) }}

Attendance

{{ number_format($stats['total_attendance']) }}

Users

{{ $stats['total_users'] }}

Financial Trends

Income Breakdown

Donations GH₵{{ number_format($stats['total_donations'], 2) }}
Tithes GH₵{{ number_format($stats['total_tithes'], 2) }}
Welfare GH₵{{ number_format($stats['total_welfare'], 2) }}
Offerings GH₵{{ number_format($stats['total_offerings'], 2) }}

Recent Donations

@forelse($recentDonations as $donation)

{{ $donation->is_anonymous ? 'Anonymous' : ($donation->member?->full_name ?? 'Unknown') }}

{{ $donation->donation_date->format('M d, Y') }}

GH₵{{ number_format($donation->amount, 2) }}
@empty

No donations recorded

@endforelse

Recent Expenses

@forelse($recentExpenses as $expense)

{{ Str::limit($expense->description, 30) }}

{{ $expense->expense_date->format('M d, Y') }}

GH₵{{ number_format($expense->amount, 2) }}
@empty

No expenses recorded

@endforelse
@if($church->parent || $church->children->count() > 0)

Branch Hierarchy

@if($church->parent) @endif @if($church->children->count() > 0)
@foreach($church->children as $child)

{{ $child->name }}

{{ $child->location ?? 'No location' }}

@endforeach
@endif
@endif
@endsection @section('inline_scripts') @endsection