@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=='active') @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('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}}
{{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
@if($savings->status=='active' ||$savings->status=='closed'||$savings->status=='inactive'||$savings->status=='dormant'||$savings->status=='rescheduled')
@foreach($savings->transactions as $key) @endforeach
{{trans_choice('core::general.date',1)}} {{trans_choice('core::general.submitted_on',1)}} {{trans_choice('savings::general.transaction',1)}} {{trans_choice('core::general.type',1)}} {{trans_choice('savings::general.transaction',1)}} {{trans_choice('core::general.id',1)}} {{trans_choice('accounting::general.debit',1)}} {{trans_choice('accounting::general.credit',1)}} {{trans_choice('savings::general.balance',1)}} {{trans_choice('core::general.action',1)}}
{{$key->created_on}} {{$key->submitted_on}} {{$key->name}} {{$key->id}} {{number_format($key->debit,$savings->decimals)}} {{number_format($key->credit,$savings->decimals)}} {{number_format($balance,$savings->decimals)}}
@endcan
@foreach($savings->charges as $key) @endforeach
{{ trans_choice('core::general.name',1) }} {{ trans_choice('savings::general.charge',1) }} {{ trans_choice('core::general.type',1) }} {{ trans_choice('savings::general.collected_on',1) }} {{ trans_choice('core::general.action',1) }}
{{$key->name}} @if($key->savings_charge_option_id==1) {{number_format($key->amount,2)}} {{ trans_choice('savings::general.flat',1) }} @endif @if($key->savings_charge_option_id==2) {{number_format($key->amount,2)}} % {{ trans_choice('savings::general.percentage_of_amount',1) }} @endif @if($key->savings_charge_option_id==3) {{number_format($key->amount,2)}} % {{ trans_choice('savings::general.percentage_of_savings_balance',1) }} @endif @if($key->savings_charge_type_id==1) {{ trans_choice('savings::general.savings_activation',1) }} @endif @if($key->savings_charge_type_id==2) {{ trans_choice('savings::general.specified_due_date',1) }} @endif @if($key->savings_charge_type_id==3) {{ trans_choice('savings::general.withdrawal_fee',1) }} @endif @if($key->savings_charge_type_id==4) {{ trans_choice('savings::general.annual_fee',1) }} @endif @if($key->savings_charge_type_id==5) {{ trans_choice('savings::general.monthly_fee',1) }} @endif @if($key->savings_charge_type_id==6) {{ trans_choice('savings::general.inactivity_fee',1) }} @endif @if($key->savings_charge_type_id==7) {{ trans_choice('savings::general.quarterly_fee',1) }} @endif @if($key->is_paid==1) {{ trans_choice('savings::general.charge',1) }} {{ trans_choice('savings::general.paid',1) }} @else @if($key->waived==1) {{ trans_choice('savings::general.charge',1) }} {{ trans_choice('savings::general.waived',1) }} @else {{ trans_choice('savings::general.outstanding',1) }} @endif @endif
@endsection @section('scripts') @if($savings->status=='active') @endif @endsection