@extends('layouts.master') @section('title') {{translate('edit saving product')}} @endsection @section('content')
{{translate('edit saving product')}}
{!! Form::open(array('url' => url('saving/savings_product/'.$savings_product->id.'/update'), 'method' => 'post', 'name' => 'form', 'class' => 'form-horizontal')) !!}
{!! Form::label('name',translate('name')." *",array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('name',$savings_product->name, array('class' => 'form-control', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('notes',translate('description')." *",array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('notes',$savings_product->notes, array('class' => 'form-control', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('interest_rate',translate('interest_rate_per_annum')." *",array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('interest_rate',$savings_product->interest_rate, array('class' => 'form-control touchspin', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('allow_overdraw',translate('allow_saving_overdraw'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('allow_overdraw',array('0'=>translate('no'),'1'=>translate('yes')),$savings_product->allow_overdraw, array('class' => 'form-control','required'=>'required')) !!}
{!! Form::label('interest_posting',translate('interest_posting_frequency_on_savings_accounts')." *",array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('interest_posting',$interest_posting,$savings_product->interest_posting, array('class' => 'form-control','required'=>'')) !!}
{!! Form::label('interest_adding',translate('interest_adding')." *",array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('interest_adding',$interest_adding,$savings_product->interest_adding, array('class' => 'form-control','required'=>'','placeholder'=>'')) !!}
{!! Form::label('minimum_balance',translate('minimum').' '.translate('balance'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::number('minimum_balance',$savings_product->minimum_balance, array('class' => 'form-control', 'placeholder'=>translate('numbers_only'),'required'=>'')) !!}

{{translate('accounting')}}

{!! Form::label('accounting_rule',translate('accounting').' '.translate('rule'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('accounting_rule',['cash_based'=>translate('cash_based')],$savings_product->accounting_rule, array('class' => 'form-control ','required'=>'required','id'=>'accounting_rule')) !!}

{{translate('asset')}}:

{!! Form::label('chart_reference_id',translate('saving').' '.translate('reference'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_reference_id',$chart_assets,$savings_product->chart_reference_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}
{!! Form::label('chart_overdraft_portfolio_id',translate('overdraft').' '.translate('portfolio'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_overdraft_portfolio_id',$chart_assets,$savings_product->chart_overdraft_portfolio_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}

{{translate('liability')}}:

{!! Form::label('chart_savings_control_id',translate('saving').' '.translate('control'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_savings_control_id',$chart_liability,$savings_product->chart_savings_control_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}

{{translate('income')}}:

{!! Form::label('chart_income_fee_id',translate('income').' '.translate('from').' '.translate('fee'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_income_fee_id',$chart_income,$savings_product->chart_income_fee_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}
{!! Form::label('chart_income_penalty_id',translate('income').' '.translate('from').' '.translate('penalty'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_income_penalty_id',$chart_income,$savings_product->chart_income_penalty_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}
{!! Form::label('chart_income_interest_id',translate('income').' '.translate('for').' '.translate('interest'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_income_interest_id',$chart_income,$savings_product->chart_income_interest_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}

{{translate('expense')}}:

{!! Form::label('chart_expense_interest_id',translate('interest').' '.translate('on').' '.translate('saving'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_expense_interest_id',$chart_expenses,$savings_product->chart_expense_interest_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}
{!! Form::label('chart_expense_written_off_id',translate('write_off').' '.translate('account'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('chart_expense_written_off_id',$chart_expenses,$savings_product->chart_expense_written_off_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required')) !!}

{{translate('charge')}}

{!! Form::label('cha',translate('charge').' '.translate('string'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('cha',$charges,null, array('class' => 'form-control select2','placeholder'=>translate('select').' '.translate('charge'),'id'=>'charges_dropdown')) !!}
@foreach($savings_product->charges as $key) @if(!empty($key->charge)) @endif @endforeach
{{translate('name')}} {{translate('amount')}} {{translate('collected on')}}
{{ $key->charge->name }} {{$key->charge->amount}} @if($key->charge->charge_option=="fixed") {{translate('fixed')}} @endif @if($key->charge->charge_option=="principal_due") % {{translate('principal due')}} @endif @if($key->charge->charge_option=="principal_interest") % {{translate('principal')}} + {{translate('interest due')}} @endif @if($key->charge->charge_option=="interest_due") % {{translate('interest due')}} @endif @if($key->charge->charge_option=="total_due") % {{translate('total due')}} @endif @if($key->charge->charge_option=="original_principal") % {{translate('original principal')}} @endif @if($key->charge->charge_type=='disbursement') {{translate('disbursement')}} @endif @if($key->charge->charge_type=='specified_due_date') {{translate('specified_due_date')}} @endif @if($key->charge->charge_type=='installment_fee') {{translate('installment_fee')}} @endif @if($key->charge->charge_type=='overdue_installment_fee') {{translate('overdue_installment_fee')}} @endif @if($key->charge->charge_type=='loan_rescheduling_fee') {{translate('loan_rescheduling_fee')}} @endif @if($key->charge->charge_type=='overdue_maturity') {{translate('overdue_maturity')}} @endif @if($key->charge->charge_type=='savings_activation') {{translate('savings_activation')}} @endif @if($key->charge->charge_type=='withdrawal_fee') {{translate('withdrawal_fee')}} @endif @if($key->charge->charge_type=='monthly_fee') {{translate('monthly_fee')}} @endif @if($key->charge->charge_type=='annual_fee') {{translate('annual_fee')}} @endif
{!! Form::close() !!}
@endsection @section('footer-scripts') @endsection