@extends('central.super.layout') @section('title', __('super.payments.overview_title')) @section('content') {{-- Stats row --}}
{{ __('super.payments.total_revenue') }}
{{ $currencySymbol }}{{ number_format($totalRevenue, 2) }}
{{ __('super.payments.monthly_revenue') }}
{{ $currencySymbol }}{{ number_format($monthlyRevenue, 2) }}
{{ __('super.payments.total_transactions') }}
{{ number_format($totalTransactions) }}
{{ __('super.payments.total_tax') }}
{{ $currencySymbol }}{{ number_format($totalTax, 2) }}
{{-- Pending offline registrations banner --}} @php $pendingOfflineCount = \App\Models\Central\PendingRegistration::where('gateway', 'offline') ->where('status', \App\Models\Central\PendingRegistration::STATUS_PROCESSING) ->count(); @endphp @if($pendingOfflineCount > 0)
{{ $pendingOfflineCount }} offline {{ Str::plural('payment', $pendingOfflineCount) }} awaiting verification
Review Now
@endif {{-- Status summary --}}

{{ __('super.status.paid') }}

{{ $paidCount }}

{{ __('super.status.pending') }}

{{ $pendingCount }}

{{ __('super.status.failed') }}

{{ $failedCount }}

{{ __('super.status.refunded') }}

{{ $refundedCount }}

{{-- Revenue chart --}}

{{ __('super.payments.revenue_chart') }}

{{-- Gateway breakdown --}}

{{ __('super.payments.by_gateway') }}

@if($gatewayBreakdown->isNotEmpty())
@foreach($gatewayBreakdown as $gw)
{{ \App\Models\Central\TenantBillingPayment::GATEWAYS[$gw->gateway] ?? ucfirst($gw->gateway ?? 'Unknown') }} {{ $currencySymbol }}{{ number_format($gw->total, 2) }}
@php $pct = $totalRevenue > 0 ? ($gw->total / $totalRevenue * 100) : 0; @endphp

{{ $gw->count }} {{ Str::plural('transaction', $gw->count) }} · {{ number_format($pct, 1) }}%

@endforeach
@else

{{ __('super.payments.no_data') }}

@endif
{{-- Recent payments --}}

{{ __('super.payments.recent_payments') }}

{{ __('super.payments.view_all') }}
@if($recentPayments->isNotEmpty())
@foreach($recentPayments as $p) @endforeach
{{ __('super.payments.invoice') }} {{ __('super.payments.tenant') }} {{ __('super.payments.plan') }} {{ __('super.common.amount') }} {{ __('super.payments.gateway') }} {{ __('super.common.status') }} {{ __('super.payments.date') }}
{{ $p->invoice_number ?? '—' }} {{ $p->tenant_id }} {{ $p->plan->name ?? '—' }} {{ $currencySymbol }}{{ number_format($p->amount, 2) }} {{ $p->gateway_label }} {{ ucfirst($p->status) }} {{ $p->created_at->format('M d, Y') }}
@else

{{ __('super.payments.no_payments') }}

{{ __('super.payments.no_payments_desc') }}

@endif
@push('scripts') @endpush @endsection