@php use \App\Enums\TransactionType as dTType; use \App\Enums\TransactionStatus as dTStatus; use \App\Enums\TransactionCalcType as dTCType; $base_currency = base_currency(); $amount = $tnx->amount; $total = $tnx->total; $currency = $tnx->currency; $tnx_currency = $tnx->tnx_currency; $tnx_amount = $tnx->tnx_amount; $tnx_total = $tnx->tnx_amount; $exchange = $tnx->exchange; $completed_by = data_get($tnx, 'completed_by'); $confirmed_by = data_get($tnx, 'confirmed_by'); $pay_to_acc_name = ''; if ($tnx->tnx_method == 'bank-transfer') { $pay_to_acc_name = data_get($tnx, 'meta.pay_meta.account_name'); } if ($tnx->tnx_method == 'crypto-wallet') { $pay_to_acc_name = get_currency(data_get($tnx, 'meta.currency'), 'name'); } if ($tnx->tnx_method == 'wd-bank-transfer') { $pay_to_acc_name = data_get($tnx, 'meta.pay_meta.payment.acc_name'); } if ($tnx->tnx_method == 'wd-paypal') { $pay_to_acc_name = data_get($tnx, 'meta.pay_meta.label'); } @endphp

{{ __('Transaction') }} #{{ the_tnx(data_get($tnx, 'tnx')) }}

{!! tnx_type_icon($transaction, 'tnx-type-icon') !!}
{{ money($tnx_amount, $tnx_currency, ['dp' => 'calc']) }}
{{ show_date(data_get($tnx, 'created_at'), true) }}
{{ __('In Account') }}
@if(!in_array($tnx->type, [dTType::TRANSFER]))
{{ __('Amount') }} {{ money($amount, $base_currency, ['dp' => 'calc']) }}
@endif @if(!in_array($tnx->type, [dTType::BONUS, dTType::TRANSFER, dTType::REFERRAL]))
{{ __('Fees') }} {{ money(data_get($tnx, 'fees', '0'), $base_currency) }}
@endif
@if($tnx->type == dTType::TRANSFER) {{ __('Amount to :Calc', ['calc' => __(ucfirst($tnx->calc))]) }} @else {{ __('Total :Type', ['type' => __(ucfirst(data_get($tnx, 'type')))]) }} @endif {{ money($total, $base_currency, ['dp' => 'calc']) }}
{{ __('In Transaction') }}
@if(!in_array($tnx->type, [dTType::TRANSFER]))
{{ __('Amount') }} {{ money($tnx_amount, $tnx_currency, ['dp' => 'calc']) }}
@endif @if(!in_array($tnx->type, [dTType::BONUS, dTType::TRANSFER, dTType::REFERRAL]))
{{ __('Fees') }} {{ money(data_get($tnx, 'tnx_fees', '0'), $tnx_currency, ['dp' => 'calc']) }} @if (data_get($tnx, 'tnx_fees')) ({{ __(':flat + :percent', ['flat' => amount(data_get($tnx, 'meta.fees.fee.flat'), $tnx_currency, ['dp' => 'calc']), 'percent' => amount(data_get($tnx, 'meta.fees.fee.percent'), $tnx_currency, ['dp' => 'calc'])]) }}) @endif
@endif
@if ($tnx->type == dTType::WITHDRAW) {{ __('Total Withdraw') }} @elseif($tnx->type == dTType::DEPOSIT) {{ __('Total Payment') }} @elseif($tnx->type == dTType::TRANSFER) {{ __('Transfer Amount') }} @else {{ __('Total Amount') }} @endif {{ money(data_get($tnx, 'tnx_total', '-'), $tnx_currency, ['dp' => 'calc']) }} @if ($tnx->type == dTType::REFERRAL && data_get($tnx, 'meta.referral.action') == dTType::DEPOSIT) @endif
{{ __('User Account') }} {{ the_uid($tnx->customer->id) }}
{{ __('User Email') }} {{ str_protect($tnx->customer->email) }}
@if($tnx_currency!=$currency)
{{ __('Exchange Rate') }} {{ __('1 :from = :rate', ['rate' => money($exchange, $tnx_currency, ['dp' => 'calc']), 'from' => $base_currency]) }}
@endif @if($base_currency!=$currency)

{{ __("Attention: Current base currency (:system) does not match with this transaction currency (:tnx).", ['system' => $base_currency, 'tnx' => $currency]) }}

{{ __('Note: System base currency was changed after transaction made. ') }}

@endif
{{ __('Order Details') }}
{{ __('Order Date') }} {{ show_date(data_get($tnx, 'created_at')) }}
{{ __('Placed By') }} {{ the_uid($tnx->transaction_by->id) }}
@if(data_get($tnx, 'confirmed_at'))
{{ __('Confirmed At') }} {{ show_date(data_get($tnx, 'confirmed_at'), true) }}
{{ __('Confirmed By') }} {!! (isset($confirmed_by['name']) ? $confirmed_by['name'] : ''. __('Unknown') .'') !!}
@endif @if(data_get($tnx, 'completed_at'))
{{ __('Completed At') }} {{ show_date(data_get($tnx, 'completed_at'), true) }}
{{ __('Completed By') }} {!! (isset($completed_by['name']) ? $completed_by['name'] : ''. __('System') .'') !!}
@endif
{{ __('Additional Details') }}
{{ __('Transaction Type') }} {{ ucfirst(data_get($tnx, 'type')) }}
{{ __('Payment Gateway') }} {{ data_get($tnx, 'method_name') }} @if(data_get($tnx, 'is_online') == 1) {{ __('Online Gateway') }} @endif
@if (data_get($tnx, 'type') == 'referral' && !empty(get_user(data_get($tnx, 'meta.referral.user'))))
{{ __('Related to Account') }} {{ str_protect(get_user(data_get($tnx, 'meta.referral.user'))->username) }}
@endif @if (data_get($tnx, 'type') == 'referral')
{{ __('Commission') }} @if (data_get($tnx, 'meta.referral.calc') == 'fixed') {{ __("Flat amount on :type", ['type' => data_get($tnx, 'meta.referral.action')]) }} @else {{ __(":amount on :type", ['type' => data_get($tnx, 'meta.referral.action'), 'amount' => data_get($tnx, 'meta.referral.bonus')."%"]) }} @endif @if (!in_array(data_get($tnx, 'meta.referral.level'), ['lv1', 'lv0']))  / {{ str_replace('lv', __('Level#'), data_get($tnx, 'meta.referral.level')) }} @endif
@endif @if(data_get($tnx, 'pay_from'))
{{ __('Payment From') }} @if(w2n(data_get($tnx, 'pay_from'))) {{ w2n(data_get($tnx, 'pay_from')) }} @elseif (data_get($tnx, 'pay_from')) {{ data_get($tnx, 'pay_from', '~') }} {!! !empty(data_get($tnx, 'meta.admin_added')) ? '' : "" !!} @endif
@endif @if(data_get($tnx, 'reference'))
{{ __('Reference / Hash') }} {{ data_get($tnx, 'reference', '~') }}
@endif @if(data_get($tnx, 'pay_to'))
{{ __('Payment To') }} @if($pay_to_acc_name) ({{ $pay_to_acc_name }}) @endif @php $network = data_get($tnx, 'meta.pay_meta.network') ? data_get($tnx, 'meta.pay_meta.network') : ''; $currency_name = get_currency($tnx_currency, 'name'); $wallet_name = (!empty($network) && $network != 'default') ? $currency_name.' ('.__(short_to_full($network)).')' : ''; @endphp {!! ($wallet_name) ? '' : '' !!} {{ w2n(data_get($tnx, 'pay_to', '~')) }} @if (data_get($tnx, 'tnx_method') === 'wd-bank-transfer') {{ __('Show Details') }} @endif
@endif @if(data_get($tnx->ledger,'balance'))
{{ __('Updated Balance') }} {{ money(data_get($tnx->ledger, 'balance'), base_currency(), ['dp' => 'calc']) }}
@endif @if(data_get($tnx, 'description'))
{{ __('Transaction Details') }} {{ __(data_get($tnx, 'description')) }} @if (data_get($tnx, 'meta.transfer') == 'auto') @endif
@endif @if(data_get($tnx, 'meta.unote'))
{{ __('Description by User') }} {{ data_get($tnx, 'meta.unote') }}
@endif @if(data_get($tnx, 'note'))
{{ __('Admin Note for User') }} {{ data_get($tnx, 'note') }}
@endif @if(data_get($tnx, 'remarks'))
{{ __('Remarks by Admin') }} {{ data_get($tnx, 'remarks') }}
@endif @if (data_get($tnx, 'tnx_method') === 'wd-bank-transfer') @endif