@extends('layouts.admin') @section('title','Payment Records') @section('page-title','πŸ’³ Payment Records') @section('styles') @endsection @section('content')

Payment Records

{{-- DONATIONS TAB --}}
πŸ“€ Export CSV
@forelse($donations as $d) @php $isAnon = (bool) $d->anonymous; $donorLabel = $d->donor_name ?? $d->business_name ?? 'Donor'; $toggleUrl = route('admin.donations.toggle-anon', $d->id); @endphp @empty @endforelse
Transaction ID Date Customer Amount Email / Phone Type Anonymous
Controls Wall of Fame visibility
{{ $d->donation_id }} {{ $d->created_at->format('Y-m-d') }}
@if($isAnon) Anonymous @else @if($d->type === 'business') {{ $d->business_name ?? $d->donor_name ?? 'Donor' }} @else {{ $d->donor_name ?? 'Donor' }} @endif @endif
@if($d->type === 'business' && $d->donor_name) Contact: {{ $d->donor_name }} @endif
${{ number_format($d->amount,2) }} @if($isAnon) β€” @else @if($d->email)
πŸ“§ {{ $d->email }}
@endif @if($d->contact)
πŸ“ž {{ $d->contact }}
@endif @if(!$d->email && !$d->contact) β€” @endif @endif
{{ ucfirst($d->type) }}@if($isAnon) Anonymous @endif {{-- Pure div-based toggle β€” no pseudo-elements --}}
{{ $isAnon ? 'Hidden' : 'Shown' }} Shows as {{ $isAnon ? 'Anonymous' : $donorLabel }} on Wall of Fame
No donations found
{{ $donations->appends(request()->except('pre_page'))->links() }}
{{-- PREPAYMENTS TAB --}}
@forelse($prepayments as $p) @empty @endforelse
Invoice #DateCustomer Amount (ex GST)GST (10%)Total (inc GST) CardStatusRefundedAction
{{ $p->invoice_no }} {{ $p->created_at->format('Y-m-d') }} {{ $p->customer_name }} ${{ number_format($p->amount_ex_gst,2) }} ${{ number_format($p->gst,2) }} ${{ number_format($p->amount,2) }} @if($p->card_brand) {{ ucfirst($p->card_brand) }} β€’β€’β€’β€’ {{ $p->card_last4 }} @else β€” @endif {{ ucfirst(str_replace('_',' ',$p->status)) }} ${{ number_format($p->refunded_amount,2) }} @php $refundable = (float) $p->amount - (float) $p->refunded_amount; $userStatus = $p->user?->status; $userExists = $p->user !== null; $balanceDonated = (bool) ($p->balance_donated ?? false); $balanceWithdrawn = (bool) ($p->balance_withdrawn ?? false); $canRefund = $p->status !== 'refunded' && $p->payment_intent_id && $refundable > 0 && $userExists && $userStatus === 'active' && ! $balanceDonated && ! $balanceWithdrawn; @endphp @if($canRefund)
@csrf
@else @if($balanceDonated) Donated @elseif($balanceWithdrawn) Withdrawn @elseif(!$userExists) Account Deleted @elseif($userStatus === 'suspended') Account Suspended @elseif($p->status === 'refunded') Fully Refunded @else β€” @endif @endif
No prepayments found
{{ $prepayments->appends(request()->except('don_page'))->links() }}
@endsection @section('scripts') {{-- EDIT DONOR NAME MODAL --}} @endsection