@extends('core::layouts.master') @section('title') {{ trans_choice('wallet::general.wallet',1) }} {{ trans_choice('core::general.detail',2) }} @endsection @section('styles') @stop @section('content')

{{ trans_choice('wallet::general.wallet',1) }} {{ trans_choice('core::general.detail',2) }} {{ trans_choice('core::general.back',1) }}

{{ trans_choice('wallet::general.wallet',1) }} #{{$wallet->id}}
@if($wallet->status=='submitted' ||$wallet->status=='pending') @can('wallet.wallets.approve_wallet') {{ trans_choice('wallet::general.approve',1) }} {{ trans_choice('wallet::general.reject',1) }} @endcan @can('wallet.wallets.edit') {{ trans_choice('core::general.edit',1) }} @endcan @can('wallet.wallets.approve_wallet') @endcan @endif @if($wallet->status=='active') @can('wallet.wallets.transactions.create') {{ trans_choice('wallet::general.make',1) }} {{ trans_choice('wallet::general.deposit',1) }} {{ trans_choice('wallet::general.pay',1) }} {{ trans_choice('loan::general.loan',1) }} {{ trans_choice('wallet::general.pay',1) }} {{ trans_choice('savings::general.savings',1) }} @endcan @can('wallet.wallet.edit') {{ trans_choice('wallet::general.change',1) }} {{ trans_choice('wallet::general.wallet',1) }} {{ trans_choice('wallet::general.officer',1) }} @endcan @can('wallet.wallet.charges.create') {{ trans_choice('core::general.add',1) }} {{ trans_choice('wallet::general.charge',1) }} @endcan @can('wallet.wallet.close_wallet') {{ trans_choice('core::general.close',1) }} {{ trans_choice('wallet::general.wallet',1) }} @endcan @can('wallet.wallet.activate_wallet') {{ trans_choice('wallet::general.undo',1) }} {{ trans_choice('wallet::general.activation',1) }} @endcan @can('wallet.wallet.edit') @endcan @can('wallet.wallet.close_wallet') @endcan @endif @if($wallet->status=='closed') @can('wallet.wallets.close_wallet') {{ trans_choice('wallet::general.activate',1) }} {{ trans_choice('wallet::general.wallet',1) }} @endcan @endif @if($wallet->status=='inactive') @can('wallet.wallets.inactive_wallet') {{ trans_choice('wallet::general.activate',1) }} {{ trans_choice('wallet::general.wallet',1) }} @endcan @endif @if($wallet->status=='dormant') @can('wallet.wallets.dormant_wallet') {{ trans_choice('wallet::general.activate',1) }} {{ trans_choice('wallet::general.wallet',1) }} @endcan @endif @if($wallet->status=='approved') @can('wallet.wallets.activate_wallet') {{ trans_choice('wallet::general.activate',1) }} @endcan @can('wallet.wallets.approve_wallet') {{ trans_choice('wallet::general.undo',1) }} {{ trans_choice('wallet::general.approval',1) }} @endcan @can('wallet.wallets.activate_wallet') @endcan @endif @if($wallet->status=='rejected') @can('wallet.wallets.approve_wallet') {{ trans_choice('wallet::general.undo',1) }} {{ trans_choice('wallet::general.rejection',1) }} @endcan @endif @if($wallet->status=='withdrawn') @can('wallet.wallets.approve_wallet') {{ trans_choice('wallet::general.undo',1) }} {{ trans_choice('wallet::general.withdrawn',1) }} @endcan @endif
{{ trans_choice('wallet::general.current',1) }} {{ trans_choice('wallet::general.balance',1) }} {{number_format($wallet->transactions->where('reversed',0)->sum('credit')-$wallet->transactions->where('reversed',0)->sum('debit'),$wallet->decimals)}}
{{ trans_choice('core::general.total',1) }} {{ trans_choice('wallet::general.deposit',2) }} {{number_format($wallet->transactions->where('reversed',0)->where('transaction_type','deposit')->sum('amount'),$wallet->decimals)}}
{{ trans_choice('core::general.total',1) }} {{ trans_choice('wallet::general.withdrawal',2) }} {{number_format($wallet->transactions->where('reversed',0)->where('transaction_type','!=','deposit')->sum('amount'),$wallet->decimals)}}
@if($wallet->status=='active' ||$wallet->status=='closed'||$wallet->status=='dormant'||$wallet->status=='inactive') @endif
{{ trans_choice('core::general.status',1) }} @if($wallet->status=='submitted') {{ trans_choice('wallet::general.pending_approval',1) }} @endif @if($wallet->status=='approved') {{ trans_choice('wallet::general.awaiting_activation',1) }} @endif @if($wallet->status=='active') {{ trans_choice('wallet::general.active',1) }} @endif @if($wallet->status=='withdrawn') {{ trans_choice('wallet::general.withdrawn',1) }} @endif @if($wallet->status=='rejected') {{ trans_choice('wallet::general.rejected',1) }} @endif @if($wallet->status=='closed') {{ trans_choice('wallet::general.closed',1) }} @endif @if($wallet->status=='dormant') {{ trans_choice('wallet::general.dormant',1) }} @endif @if($wallet->status=='inactive') {{ trans_choice('wallet::general.inactive',1) }} @endif
{{ trans_choice('client::general.client',1) }} @if(!empty($wallet->client)) {{$wallet->client->first_name}} {{$wallet->client->middle_name}} {{$wallet->client->last_name}} @endif
{{ trans_choice('core::general.currency',1) }} @if(!empty($wallet->currency)) {{$wallet->currency->name}} @endif
{{ trans_choice('wallet::general.activated_on',1) }} {{$wallet->activated_on_date}}
@foreach($custom_fields as $custom_field)
{{trans_choice('core::general.submitted_on',1)}} {{$wallet->submitted_on_date}} {{trans_choice('core::general.by',1)}} @if(!empty($wallet->submitted_by)) {{$wallet->submitted_by->first_name}} {{$wallet->submitted_by->last_name}} @endif
{{trans_choice('wallet::general.approved',1)}} {{trans_choice('core::general.on',1)}} {{$wallet->approved_on_date}} @if(!empty($wallet->approved_by)) {{trans_choice('core::general.by',1)}} {{$wallet->approved_by->first_name}} {{$wallet->approved_by->last_name}} @endif
{{trans_choice('wallet::general.activated',1)}} {{trans_choice('core::general.on',1)}} {{$wallet->activated_on_date}} @if(!empty($wallet->activated_by)) {{trans_choice('core::general.by',1)}} {{$wallet->activated_by->first_name}} {{$wallet->activated_by->last_name}} @endif