@extends('layouts.admin') @section('title', 'Payments') @section('page-title', 'Payments & Transactions') @section('content')

Gross Revenue

{{ number_format($stats['gross_revenue'], 2) }}

Paid Transactions

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

Voucher Activations

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

Active Paid

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

Revenue by Source

A quick breakdown of collected subscription revenue by source.

@forelse($revenueBySource as $source => $total)
{{ strtoupper($source ?: 'unknown') }} {{ number_format((float) $total, 2) }}
@empty

No revenue recorded yet.

@endforelse
@forelse($payments as $payment) @empty @endforelse
User Plan Source Reference Amount Period Status
{{ $payment->user->name ?? 'Unknown user' }}
{{ $payment->user->email ?? 'No email' }}
{{ ucfirst($payment->plan) }} {{ strtoupper($payment->source) }}
{{ $payment->transaction_id ?: ($payment->voucher_code ?: 'N/A') }}
@if($payment->product_id)
{{ $payment->product_id }}
@endif
{{ strtoupper($payment->currency ?: 'USD') }} {{ number_format($payment->amount_paid ?? 0, 2) }}
{{ ucfirst($payment->period ?? 'N/A') }}
{{ $payment->starts_at?->format('d M Y') ?? 'N/A' }} → {{ $payment->expires_at?->format('d M Y') ?? 'Lifetime' }}
{{ $payment->isExpired() || !$payment->is_active ? 'Expired' : (($payment->amount_paid ?? 0) > 0 ? 'Paid' : 'Activated') }}
No payment activity found.
{{ $payments->links() }}
@endsection