@extends('user.layouts.user') @section('content')

My Payment History

Total Spending

${{ number_format($paymentSummary['grand_total'], 2) }}

Booking Payments

{{ $paymentSummary['booking_count'] }}

Subscription Payments

{{ $paymentSummary['subscription_count'] }}

Booking Payment History
@if($bookingLogs->count() > 0)
@foreach($bookingLogs as $payment) @endforeach
Studio Amount Status Date Actions
{{ substr($payment->studio->name ?? 'NA', 0, 2) }}
{{ $payment->studio->name ?? 'N/A' }}
{{ $payment->payment_intent_id ? substr($payment->payment_intent_id, 0, 8) . '...' : 'Free via subscription' }}
${{ number_format($payment->amount, 2) }} {{ ucfirst(str_replace('-', ' ', $payment->status)) }}
{{ $payment->created_at->format('M d, Y') }}
{{ $payment->created_at->format('h:i A') }}
Details
@else
No Booking Payments Found

You haven't made any booking payments yet.

@endif
Subscription Payment History
@if($subscriptionLogs->count() > 0)
@foreach($subscriptionLogs as $payment) @endforeach
Package Transaction ID Amount Status Date Actions
{{ substr($payment->package->name ?? 'NA', 0, 2) }}
{{ $payment->package->name ?? 'N/A' }}
{{ $payment->studio->name ?? 'No studio' }}
{{ $payment->stripe_transaction_id ? substr($payment->stripe_transaction_id, 0, 8) . '...' : 'N/A' }} ${{ number_format($payment->amount, 2) }} {{ ucfirst($payment->payment_status) }} @if($payment->payment_date)
{{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }}
{{ \Carbon\Carbon::parse($payment->payment_date)->format('h:i A') }} @else - @endif
Details
@else
No Subscription Payments Found

You haven't made any subscription payments yet.

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