{{-- resources/views/wallets/show.blade.php --}} @extends('layouts.app') @section('content')

Wallet: {{ $subscriber->name }}

{{-- Wallet Summary Cards --}}

Current Balance

৳{{ number_format($wallet->balance, 2) }}

Total Credits

৳{{ number_format($transactions->where('type', 'credit')->sum('amount'), 2) }}

Total Debits

৳{{ number_format($transactions->where('type', 'debit')->sum('amount'), 2) }}

Total Transactions

{{ $transactions->count() }}

{{-- Quick Actions --}}

Quick Actions

View All Transactions
{{-- Add Credit Modal --}} {{-- Debit Modal --}} {{-- Transaction History --}}

Transaction History

@if($transactions->count() > 0)
@foreach($transactions as $transaction) @endforeach
Date Type Amount Source Description Reference Created By
{{ $transaction->created_at->format('d M Y, h:i A') }} @if($transaction->type == 'credit') Credit @else Debit @endif {{ $transaction->type == 'credit' ? '+' : '-' }} ৳{{ number_format($transaction->amount, 2) }} {{ str_replace('_', ' ', ucfirst($transaction->source)) }} {{ $transaction->description ?? 'N/A' }} {{ $transaction->reference_id ?? 'N/A' }} {{ $transaction->creator->name ?? 'System' }}
{{-- Balance Summary --}}

Opening Balance

৳0.00

Total Credits

+ ৳{{ number_format($transactions->where('type', 'credit')->sum('amount'), 2) }}

Total Debits

- ৳{{ number_format($transactions->where('type', 'debit')->sum('amount'), 2) }}

@else

No transactions yet

Use the quick actions above to add credit or debit amount

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