@extends('components.app-layout') @section('title', 'SMS Credit Transactions') @section('subtitle', 'View your complete SMS credit transaction history') @section('content')

Transaction History

Complete record of your SMS credit activities

Current Balance

{{ number_format($userCredit->credits) }}

Total Purchased

{{ number_format($totalPurchased) }}

Total Used

{{ number_format($totalUsed) }}

Total Spent

GHS {{ number_format($totalSpent, 2) }}

Clear

Transactions

{{ $transactions->total() }} total transactions

@forelse($transactions as $transaction) @empty @endforelse
Date Type Description Credits Amount Status Reference
{{ $transaction->created_at->format('M d, Y') }}
{{ $transaction->created_at->format('g:i A') }}
{{ ucfirst($transaction->type) }} {{ $transaction->description }} {{ $transaction->type === 'purchase' || $transaction->type === 'refund' || $transaction->type === 'bonus' ? '+' : '-' }}{{ number_format(abs($transaction->credits)) }} @if($transaction->amount) GHS {{ number_format($transaction->amount, 2) }} @else - @endif {{ ucfirst($transaction->status) }} @if($transaction->paystack_reference) {{ $transaction->paystack_reference }} @else - @endif

No transactions found

Your transaction history will appear here

Purchase Credits
@if($transactions->hasPages())
{{ $transactions->appends(request()->query())->links() }}
@endif
@endsection