{{ ucwords(str_replace('_', ' ', $wallet->currency?->type)) }}
{{ $wallet->currency?->code }}{{ $wallet->is_default == 'Yes' ? '(default)' : '' }}
{{ __('Balance') }}
{{ formatNumber($wallet->balance, $wallet->currency?->id) }}
@php
$lastTransaction = \App\Models\Transaction::with('transaction_type')->where('currency_id', $wallet->currency?->id)->where(function($query){
$query->where('user_id', auth()->id())->orWhere('end_user_id', auth()->id());
})->latest()->first();
@endphp
@if (is_null($lastTransaction))
{{ __('Last Action') }}:
{{ __('No transaction available.') }}
@else
{{ __('Last Action') }}:
{{ moneyFormat($wallet->currency->symbol, formatNumber($lastTransaction->subtotal)) }}
@php
if (!empty($lastTransaction)) {
if ($lastTransaction->transaction_type->name == 'Transferred') {
$transactionName = 'Money Transfer';
} elseif ($lastTransaction->transaction_type->name == 'Received') {
$transactionName = 'Money Received';
} elseif ($lastTransaction->transaction_type->name == 'Exchange_From' || $lastTransaction->transaction_type->name == 'Exchange_To') {
$transactionName = 'Money Exchange';
} elseif ($lastTransaction->transaction_type->name == 'Request_Sent' || $lastTransaction->transaction_type->name == 'Request_Received') {
$transactionName = 'Request Money';
} else {
if (str_contains($lastTransaction->transaction_type->name, '_')) {
$transactionName = str_replace('_', ' ', $lastTransaction->transaction_type->name);
} else {
$transactionName = $lastTransaction->transaction_type->name;
}
}
}
@endphp
( {{ $transactionName }} )
@endif
@if (($wallet->currency->type == 'crypto' || $wallet->currency->type == 'fiat') && $wallet->currency->status == 'Active')
@if(Common::has_permission(auth()->id(), 'manage_deposit'))
@endif
{!! Common::has_permission(auth()->id(),'manage_deposit') && Common::has_permission(auth()->id(),'manage_withdrawal') ? '
' : '' !!}
@if(Common::has_permission(auth()->id(),'manage_withdrawal'))
@endif
@elseif ($wallet->currency->type == 'crypto_asset' && $provider_status == 'Active' && isActive('BlockIo'))
@if(Common::has_permission(auth()->id(),'manage_crypto_send_receive'))
@endif
@endif