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

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

{{$savings->savings_product->name}}(#{{$savings->id}})
@if($savings->status=='submitted' ||$savings->status=='pending') @can('savings.savings.approve_savings') {{ trans_choice('savings::general.approve',1) }} {{ trans_choice('savings::general.reject',1) }} {{ trans_choice('savings::general.withdraw',1) }} @endcan @can('savings.savings.edit') {{ trans_choice('core::general.edit',1) }} @endcan @can('savings.savings.approve_savings') @endcan @endif @if($savings->status=='active') @can('savings.savings.transactions.create') {{ trans_choice('savings::general.make',1) }} {{ trans_choice('savings::general.deposit',1) }} {{ trans_choice('savings::general.make',1) }} {{ trans_choice('savings::general.withdrawal',1) }} @endcan @can('savings.savings.edit') {{ trans_choice('savings::general.change',1) }} {{ trans_choice('savings::general.savings',1) }} {{ trans_choice('savings::general.officer',1) }} @endcan @can('savings.savings.charges.create') {{ trans_choice('core::general.add',1) }} {{ trans_choice('savings::general.charge',1) }} @endcan @can('savings.savings.close_savings') {{ trans_choice('core::general.close',1) }} {{ trans_choice('savings::general.savings',1) }} @endcan @can('savings.savings.activate_savings') {{ trans_choice('savings::general.undo',1) }} {{ trans_choice('savings::general.activation',1) }} @endcan @can('savings.savings.edit') @endcan @can('savings.savings.close_savings') @endcan @endif @if($savings->status=='closed') @can('savings.savings.close_savings') {{ trans_choice('savings::general.activate',1) }} {{ trans_choice('savings::general.savings',1) }} @endcan @endif @if($savings->status=='inactive') @can('savings.savings.inactive_savings') {{ trans_choice('savings::general.activate',1) }} {{ trans_choice('savings::general.savings',1) }} @endcan @endif @if($savings->status=='dormant') @can('savings.savings.dormant_savings') {{ trans_choice('savings::general.activate',1) }} {{ trans_choice('savings::general.savings',1) }} @endcan @endif @if($savings->status=='approved') @can('savings.savings.activate_savings') {{ trans_choice('savings::general.activate',1) }} @endcan @can('savings.savings.edit') {{ trans_choice('savings::general.change',1) }} {{ trans_choice('savings::general.savings',1) }} {{ trans_choice('savings::general.officer',1) }} @endcan @can('savings.savings.approve_savings') {{ trans_choice('savings::general.undo',1) }} {{ trans_choice('savings::general.approval',1) }} @endcan @can('savings.savings.edit') @endcan @can('savings.savings.activate_savings') @endcan @endif @if($savings->status=='rejected') @can('savings.savings.approve_savings') {{ trans_choice('savings::general.undo',1) }} {{ trans_choice('savings::general.rejection',1) }} @endcan @endif @if($savings->status=='withdrawn') @can('savings.savings.approve_savings') {{ trans_choice('savings::general.undo',1) }} {{ trans_choice('savings::general.withdrawn',1) }} @endcan @endif
@if($savings->status=='submitted' ||$savings->status=='pending'||$savings->status=='withdrawn'||$savings->status=='approved'||$savings->status=='rejected') @if($savings->status=='submitted') {{ trans_choice('savings::general.pending_approval',1) }} @endif @if($savings->status=='approved') {{ trans_choice('savings::general.awaiting_activation',1) }} @endif @if($savings->status=='withdrawn') {{ trans_choice('savings::general.withdrawn',1) }} @endif @if($savings->status=='rejected') {{ trans_choice('savings::general.rejected',1) }} @endif @endif @if($savings->status=='active' ||$savings->status=='closed'||$savings->status=='dormant'||$savings->status=='inactive')
{{ trans_choice('savings::general.current',1) }} {{ trans_choice('savings::general.balance',1) }} {{number_format($savings->transactions->where('reversed',0)->sum('credit')-$savings->transactions->where('reversed',0)->sum('debit'),$savings->decimals)}}
{{ trans_choice('savings::general.interest',1) }} {{ trans_choice('savings::general.earned',1) }} {{number_format($savings->transactions->where('reversed',0)->where('savings_transaction_type_id',11)->sum('amount')+$savings->calculated_interest,$savings->decimals)}}
{{ trans_choice('savings::general.interest',1) }} {{ trans_choice('savings::general.posted',1) }} {{number_format($savings->transactions->where('reversed',0)->where('savings_transaction_type_id',11)->sum('amount'),$savings->decimals)}}
{{ trans_choice('core::general.total',1) }} {{ trans_choice('savings::general.deposit',2) }} {{number_format($savings->transactions->where('reversed',0)->where('savings_transaction_type_id',1)->sum('amount'),$savings->decimals)}}
{{ trans_choice('core::general.total',1) }} {{ trans_choice('savings::general.withdrawal',2) }} {{number_format($savings->transactions->where('reversed',0)->where('savings_transaction_type_id',2)->sum('amount'),$savings->decimals)}}
@endif
@if($savings->status=='active' ||$savings->status=='closed'||$savings->status=='dormant'||$savings->status=='inactive') @endif
{{ trans_choice('savings::general.status',1) }} @if($savings->status=='submitted') {{ trans_choice('savings::general.pending_approval',1) }} @endif @if($savings->status=='approved') {{ trans_choice('savings::general.awaiting_activation',1) }} @endif @if($savings->status=='active') {{ trans_choice('savings::general.active',1) }} @endif @if($savings->status=='withdrawn') {{ trans_choice('savings::general.withdrawn',1) }} @endif @if($savings->status=='rejected') {{ trans_choice('savings::general.rejected',1) }} @endif @if($savings->status=='closed') {{ trans_choice('savings::general.closed',1) }} @endif @if($savings->status=='dormant') {{ trans_choice('savings::general.dormant',1) }} @endif @if($savings->status=='inactive') {{ trans_choice('savings::general.inactive',1) }} @endif
{{ trans_choice('client::general.client',1) }} @if(!empty($savings->client)) {{$savings->client->first_name}} {{$savings->client->middle_name}} {{$savings->client->last_name}} @endif
{{ trans_choice('savings::general.account_number',1) }} {{$savings->account_number}}
{{ trans_choice('savings::general.external_id',1) }} {{$savings->external_id}}
{{ trans_choice('core::general.currency',1) }} @if(!empty($savings->currency)) {{$savings->currency->name}} @endif
{{ trans_choice('savings::general.savings',1) }} {{ trans_choice('savings::general.officer',1) }} @if(!empty($savings->savings_officer)) {{$savings->savings_officer->first_name}} {{$savings->savings_officer->last_name}} @endif
{{ trans_choice('savings::general.interest_rate',1) }} {{number_format($savings->interest_rate,2)}}%
{{ trans_choice('savings::general.activated_on',1) }} {{$savings->activated_on_date}}
@foreach($custom_fields as $custom_field)
{{trans_choice('savings::general.compounding_period',1)}} @if($savings->compounding_period=='daily') {{trans_choice('savings::general.daily',2)}} @endif @if($savings->compounding_period=='weekly') {{trans_choice('savings::general.weekly',2)}} @endif @if($savings->compounding_period=='monthly') {{trans_choice('savings::general.monthly',2)}} @endif @if($savings->compounding_period=='biannual') {{trans_choice('savings::general.biannual',2)}} @endif @if($savings->compounding_period=='annually') {{trans_choice('savings::general.annually',2)}} @endif
{{trans_choice('savings::general.interest_posting_period_type',1)}} @if($savings->interest_posting_period_type=='daily') {{trans_choice('savings::general.daily',2)}} @endif @if($savings->interest_posting_period_type=='weekly') {{trans_choice('savings::general.weekly',2)}} @endif @if($savings->interest_posting_period_type=='monthly') {{trans_choice('savings::general.monthly',2)}} @endif @if($savings->interest_posting_period_type=='biannual') {{trans_choice('savings::general.biannual',2)}} @endif @if($savings->interest_posting_period_type=='annually') {{trans_choice('savings::general.annually',2)}} @endif
{{trans_choice('savings::general.interest_calculation_type',1)}} @if($savings->interest_calculation_type=='daily_balance') {{trans_choice('savings::general.daily_balance',1)}} @endif @if($savings->interest_calculation_type=='average_daily_balance') {{trans_choice('savings::general.average_balance',1)}} @endif
{{trans_choice('savings::general.category',1)}} @if($savings->savings_product->savings_category=='voluntary') {{trans_choice('savings::general.voluntary',1)}} @endif @if($savings->savings_product->savings_category=='compulsory') {{trans_choice('savings::general.compulsory',1)}} @endif
{{trans_choice('core::general.submitted_on',1)}} {{$savings->submitted_on_date}} {{trans_choice('core::general.by',1)}} @if(!empty($savings->submitted_by)) {{$savings->submitted_by->first_name}} {{$savings->submitted_by->last_name}} @endif
{{trans_choice('savings::general.approved',1)}} {{trans_choice('core::general.on',1)}} {{$savings->approved_on_date}} @if(!empty($savings->approved_by)) {{trans_choice('core::general.by',1)}} {{$savings->approved_by->first_name}} {{$savings->approved_by->last_name}} @endif
{{trans_choice('savings::general.activated',1)}} {{trans_choice('core::general.on',1)}} {{$savings->activated_on_date}} @if(!empty($savings->activated_by)) {{trans_choice('core::general.by',1)}} {{$savings->activated_by->first_name}} {{$savings->activated_by->last_name}} @endif