@extends('layouts.super-admin', ['title' => 'Payments - Booklio Super Admin', 'pageTitle' => 'Payments / Transactions', 'active' => 'payments']) @section('content')
@foreach ($kpis as $kpi) @include('super-admin.partials.kpi', $kpi) @endforeach
Filter
Reset
@forelse ($payments as $payment) @php $statusValue = $payment->status instanceof \App\Enums\PaymentStatus ? $payment->status->value : $payment->status; $statusLabel = $payment->status instanceof \App\Enums\PaymentStatus ? $payment->status->label() : \Illuminate\Support\Str::headline((string) $payment->status); $statusVariant = match ($statusValue) { 'paid' => 'success', 'pending' => 'warning', 'failed', 'cancelled' => 'danger', default => 'muted', }; @endphp

{{ $payment->business?->name ?? 'No business' }}

{{ $payment->plan?->name ?? 'No plan' }}

{{ strtoupper($payment->currency ?? 'USD') }} {{ number_format((float) $payment->amount, 2) }} {{ \Illuminate\Support\Str::headline($payment->payment_method ?? 'manual') }} {{ $payment->transaction_id ?? 'Pending' }} {{ $statusLabel }} {{ ($payment->paid_at ?? $payment->created_at)?->format('M d, Y') ?? '-' }} Receipt @empty No payments found for the selected filters. @endforelse
@endsection