{{ __('Transactions') }}

{{ __('Every movement of your wallet balance.') }}

{{ __('Add Funds') }}
{{-- Type pills --}}
@foreach ($this->types() as $t) @endforeach
@forelse ($entries as $entry) @php $isCredit = ! str_starts_with((string) $entry->amount, '-'); // Label and tone from the shared LedgerTypes map, so a client // reads the same words for a movement as the admin does. $label = \App\Support\LedgerTypes::label($entry->type); $tone = \App\Support\LedgerTypes::tone($entry->type); // PaymentTransaction (loaded via morphTo reference relation for deposit entries). $payTxn = ($entry->type === 'deposit') ? $entry->reference : null; // Transaction UID: prefer meta (set by AddFundsService), fall back to the morphed model. $txnUid = $entry->meta['transaction_uid'] ?? $payTxn?->uid ?? null; $txnRef = $txnUid ? 'TXN-' . strtoupper(substr($txnUid, -8)) : ('TXN-' . str_pad($entry->id, 6, '0', STR_PAD_LEFT)); // Payment method label (only for deposit entries). $methodLabel = null; if ($payTxn) { $methodLabel = match($payTxn->driver ?? '') { 'manual' => __('Manual / Bank'), 'binance_manual' => 'Binance Pay', 'stripe' => 'Stripe', 'paypal' => 'PayPal', default => ucfirst(str_replace('_', ' ', $payTxn->driver ?? '')), }; } // Bonus amount merged from the sibling bonus ledger entry. $bonusAmt = $entry->bonus_amount ?? null; $hasBonus = $entry->type === 'deposit' && $bonusAmt && \App\Support\Money::isPositive((string) $bonusAmt); @endphp {{-- Transaction reference number --}} {{-- Type badge --}} {{-- Payment method (only for deposits) --}} {{-- Amount + inline bonus --}} {{-- Running balance: use bonus row's balance_after when present (includes bonus). --}} {{-- Date --}} {{-- Invoice column --}} @empty @endforelse
{{ __('Transaction') }} {{ __('Type') }} {{ __('Method') }} {{ __('Amount') }} {{ __('Balance After') }} {{ __('Date') }} {{ __('Invoice') }}
{{ $txnRef }} {{ $label }} @if($methodLabel) {{ $methodLabel }} @else — @endif {{ $isCredit ? '+' : '' }}{{ client_money($entry->amount) }} @if ($hasBonus)
🎁 +{{ client_money((string) $bonusAmt) }} {{ __('bonus') }}
@endif
{{ client_money($hasBonus && $entry->bonus_balance_after ? $entry->bonus_balance_after : $entry->balance_after) }} {{ rf_datetime($entry->created_at) }} @if ($entry->type === 'deposit' && $txnUid) @else — @endif
@if ($entries->hasPages())
{{ $entries->links() }}
@endif