@php $global = $this->getGlobalStats(); $campaigns = $this->getCampaignData(); $failed = $this->getFailedPayments(); $upcoming = $this->getUpcomingPayments(); $quality = $this->getDataQuality(); @endphp {{-- ── Current Season Overview ─────────────────────────────── --}}
Ramadan {{ now()->year }} — Current Season
{{ number_format($global['current_subscribers']) }}
Active
{{ number_format($global['expired_subscribers']) }} past seasons
£{{ number_format($global['collected'], 0) }}
Collected
{{ number_format($global['paid_payments']) }}/{{ number_format($global['due_payments']) }} due paid
£{{ number_format($global['failed_amount'], 0) }}
Failed
{{ number_format($global['failed_count']) }} payments
£{{ number_format($global['scheduled_amount'], 0) }}
Upcoming
{{ number_format($global['scheduled_count']) }} not yet due
{{ $global['collection_rate'] }}%
Collection Rate
of due payments
{{-- ── Campaign Cards ──────────────────────────────────────── --}}
@foreach ($campaigns as $data) @php $c = $data['campaign']; $hasCurrent = $data['current_subscribers'] > 0; $duePct = $data['due_payments'] > 0 ? round($data['paid_payments'] / $data['due_payments'] * 100) : 0; $overallPct = $data['total_payments'] > 0 ? round($data['paid_payments'] / $data['total_payments'] * 100) : 0; @endphp
{{ $c->title }} @if ($hasCurrent) ● Active @else ○ No current season @endif
@if ($hasCurrent)
Subscribers
{{ $data['current_subscribers'] }}
Avg / Night
£{{ number_format($data['avg_per_night'], 2) }}
Collected
£{{ number_format($data['collected'], 0) }}
{{ $data['collection_rate'] }}% Rate
{{ $data['paid_payments'] }}/{{ $data['due_payments'] }} due
{{-- Progress bar: paid / total (including future) --}}
{{ number_format($data['paid_payments']) }} paid, {{ number_format($data['failed_payments']) }} failed, {{ number_format($data['scheduled_payments']) }} upcoming
@if ($data['total_payments'] > 0)
@endif
■ Paid @if ($data['failed_payments'] > 0) ■ Failed (£{{ number_format($data['failed_amount'], 0) }}) @endif ■ Upcoming (£{{ number_format($data['scheduled_amount'], 0) }})
Nights
{{ $data['total_nights'] }}
Completed
{{ $data['fully_completed'] }}
Failed
{{ $data['failed_payments'] }}
@endif {{-- All-time --}}
All Time
{{ $data['all_time_subscribers'] }} subscribers ({{ $data['expired_subscribers'] }} expired) £{{ number_format($data['all_time_collected'], 0) }}
@endforeach
{{-- ── Upcoming Payments ───────────────────────────────────── --}} @if (count($upcoming) > 0)
Upcoming Payments (Next 48h)
@foreach ($upcoming as $u)
{{ $u->campaign }}
{{ $u->payment_count }} payments
£{{ number_format($u->total_amount, 2) }}
{{ \Carbon\Carbon::parse($u->earliest)->diffForHumans() }}
@endforeach
@endif {{-- ── Failed Payments ─────────────────────────────────────── --}} @if (count($failed) > 0)
Failed Payments — This Season ({{ count($failed) }})
@foreach ($failed as $f) @endforeach
Donor Campaign Amount Expected Attempts
{{ $f->donor_name }}
{{ $f->donor_email }}
{{ $f->campaign }} £{{ number_format($f->amount / 100, 2) }} {{ \Carbon\Carbon::parse($f->expected_at)->format('d M') }} {{ $f->attempts }}× View →
@endif {{-- ── Data Quality ────────────────────────────────────────── --}}
Data Quality

{{ number_format($quality['total_records']) }} total records in database. Only {{ number_format($global['total_subscribers']) }} are real subscribers with payments.

{{ number_format($quality['soft_deleted']) }}
Soft-deleted
{{ number_format($quality['no_customer']) }}
No customer
{{ number_format($quality['no_payments']) }}
No payments
{{ number_format($quality['zero_amount']) }}
Zero amount