@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'||$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('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}}
@endsection @section('scripts') @if($savings->status=='active') @endif @endsection