@foreach($transactions as $key=>$transaction) @php $transactionTypes = [Deposit, Withdrawal, Transferred, Received, Exchange_From, Exchange_To, Request_Sent, Request_Received, Payment_Sent, Payment_Received, Crypto_Sent, Crypto_Received, Token_Sent, Token_Received]; @endphp @if (in_array($transaction->transaction_type?->id, $transactionTypes))
@php if (in_array($transaction->transaction_type?->id, [Deposit, Withdrawal])) { $transactionImage = null; $directoryName = $transaction->payment_method?->name; } else if (in_array($transaction->transaction_type?->id, [Transferred, Received, Request_Sent, Request_Received])) { $transactionImage = $transaction->end_user?->picture ?? null; $directoryName = 'profile'; } else if (in_array($transaction->transaction_type?->id, [Exchange_From, Exchange_To])) { $transactionImage = $transaction->currency?->logo; $directoryName = 'currency'; } else if (in_array($transaction->transaction_type?->id, [Payment_Sent, Payment_Received])) { $transactionImage = $transaction->merchant?->logo; $directoryName = 'merchant'; } else if (in_array($transaction->transaction_type?->id, [Crypto_Sent, Crypto_Received, Token_Sent, Token_Received])) { $transactionImage = $transaction->end_user?->picture ?? null; $directoryName = 'profile'; } else { $transactionImage = null; $directoryName = null; } @endphp {{ __('Transaction') }}

{{ transactionTypeName($transaction->transaction_type) }}

@php if (in_array($transaction->transaction_type?->id, [Deposit, Withdrawal, Payment_Sent, Payment_Received, Crypto_Sent, Token_Sent])) { $transactionInfo = $transaction->payment_method?->id == Mts ? settings('name') : $transaction->payment_method?->name; } else if (in_array($transaction->transaction_type?->id, [Transferred, Received, Request_Sent, Request_Received, Crypto_Received, Token_Received])) { $transactionInfo = getColumnValue($transaction->end_user, 'first_name', 'last_name', 'unregistered'); } else if (in_array($transaction->transaction_type?->id, [Exchange_From, Exchange_To])) { $transactionInfo = $transaction->currency?->code; } else { $transactionInfo = null; $directoryName = null; } @endphp

{{ $transactionInfo }}

{{ dateFormat($transaction->created_at) }}

@if (in_array($transaction->transaction_type?->id, [Deposit, Received, Exchange_To, Payment_Received, Request_Sent, Crypto_Received])) @else @endif {{ moneyFormat($transaction->currency?->symbol, formatNumber($transaction->subtotal, $transaction->currency_id)) }}

{{ getStatus($transaction->status) }}

@endif @if (!in_array($transaction->transaction_type?->id, $transactionTypes)) @foreach (getCustomModules() as $addon) @if (module($addon->get('name')) && view()->exists(strtolower($addon->get('name')) . '::user.transaction.'.strtolower($addon->get('name'))) && in_array($transaction->transaction_type?->id, config($addon->get('alias') . '.' . 'transaction_types'))) @include(strtolower($addon->get('name')) . '::user.transaction.'.strtolower($addon->get('name'))) @endif @endforeach @endif @endforeach