@extends("frontend.layout.master") @section('title','Emart | My Wallet') @section("content")

{{__('My Wallet')}}

{{__('Current Balance')}} : @if(isset($user->wallet)) {{ $user->wallet->balance }} @else 0.00 @endif @if(isset($user->wallet) && $defCurrency->currency->code != session()->get('currency')['id']) {{ price_format(currency($user->wallet->balance, $from = $defCurrency->currency->code, $to = session()->get('currency')['id'] , $format = false)) }} @endif

@csrf
  • {{__('Once the money is added in wallet its non refundable.')}}
  • {{__('You can use this money to purchase product on this portal.')}}
  • {{__('Money will expire after 1 year from credited date.')}}
  • {{__('Wallet amount will always added in default currency which is:')}} {{ $defCurrency->currency->code }}

@if(isset($wallethistory))

Wallet History')}}


@foreach($wallethistory->sortByDesc('id') as $history)
{{ $history->log }}

@if($history->type == 'Credit') {{ __('Credited ON') }}: {{ date('d/m/Y | h:i A',strtotime($history->created_at)) }} | {{ __('Ref ID:') }} {{ $history->txn_id }} | {{ __('Expire ON:') }} {{ date('d/m/Y | h:i A',strtotime($history->expire_at)) }} @else {{ __('Debited ON') }}: {{ date('d/m/Y | h:i A',strtotime($history->created_at)) }} | {{ __('Ref ID:') }} {{ $history->txn_id }} @endif

@if($history->type == 'Credit') {{ __('+') }} @else {{ __('-') }} @endif {{ price_format($history->amount,2) }} @if(isset($user->wallet) && $defCurrency->currency->code != session()->get('currency')['id'])
( {{ price_format(currency($history->amount, $from = $defCurrency->currency->code, $to = session()->get('currency')['id'] , $format = false)) }})
@endif

@endforeach
{!! $wallethistory->links() !!}
@endif
@endsection