| Path : /var/www/html/usd_loan_system/resources/views/saving/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //var/www/html/usd_loan_system/resources/views/saving/create.blade.php |
@extends('layouts.master')
@section('title')
{{translate('add saving account')}}
@endsection
@section('content')
<div class="panel panel-white">
<div class="panel-heading">
<h6 class="panel-title">{{translate('add saving account')}}</h6>
<div class="heading-elements">
</div>
</div>
{!! Form::open(array('url' => url('saving/store'), 'method' => 'post', 'id' => 'savings_form',"enctype"=>"multipart/form-data", 'class' => 'form-horizontal')) !!}
<div class="panel-body">
<div class="form-group">
{!! Form::label('borrower_id',translate('borrower')." *",array('class'=>'col-sm-3 control-label')) !!}
<div class="col-sm-5">
{!! Form::select('borrower_id',$borrowers,$borrower_id, array('class' => ' select2 form-control', 'placeholder'=>"Select",'required'=>'required','id'=>'borrower_id')) !!}
</div>
<div class="col-sm-4">
<i class="icon-info3" data-toggle="tooltip" title="Select the borrower here"></i>
</div>
</div>
<div class="form-group">
{!! Form::label('savings_product_id',translate('product')." *",array('class'=>'col-sm-3 control-label')) !!}
<div class="col-sm-5">
{!! Form::select('savings_product_id',$savings_products,null, array('class' => 'select2 form-control','required'=>'','id'=>'savings_product_id')) !!}
</div>
<div class="col-sm-4">
<i class="icon-info3" data-toggle="tooltip" title="Select the Savings product"></i>
</div>
</div>
<div class="form-group">
{!! Form::label('date',translate('date')." *",array('class'=>'col-sm-3 control-label')) !!}
<div class="col-sm-5">
{!! Form::text('date',date("Y-m-d"), array('class' => 'form-control date-picker', 'placeholder'=>"yyyy-mm-dd",'required'=>'required','id'=>'date')) !!}
</div>
</div>
<div class="form-group">
{!! Form::label('notes',translate('note'),array('class'=>'col-sm-3 control-label')) !!}
<div class="col-sm-5">
{!! Form::textarea('notes',null, array('class' => 'form-control', 'rows'=>'2',)) !!}
</div>
</div>
<p class="bg-navy color-palette">{{translate('charge')}}</p>
<div class="form-group" id="chargesDiv">
<div style="display: none;" id="saved_charges">
@foreach($savings_product->charges as $key)
<input name="charges[]" id="charge{{$key->charge_id}}" value="{{$key->charge_id}}">
@endforeach
</div>
<table class="table table-bordered">
<thead>
<tr>
<th>{{translate('name')}}</th>
<th>{{translate('type')}}</th>
<th>{{translate('amount')}}</th>
<th>{{translate('collected on')}}</th>
<th>{{translate('date')}}</th>
</tr>
</thead>
<tbody id="charges_table">
@foreach($savings_product->charges as $key)
@if(!empty($key->charge))
<tr id="row{{$key->charge->id}}">
<td>{{ $key->charge->name }}</td>
<td>
@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
</td>
<td>
@if($key->charge->override==1)
<input type="text" class="form-control"
name="charge_amount_{{$key->charge->id}}"
value="{{$key->charge->amount}}" required>
@else
<input type="hidden" class="form-control"
name="charge_amount_{{$key->charge->id}}"
value="{{$key->charge->amount}}">
{{$key->charge->amount}}
@endif
</td>
<td>
@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
</td>
<td>
@if($key->charge->charge_type=='specified_due_date')
<input type="text" class="form-control date-picker"
name="charge_date_{{$key->charge->id}}"
value="" required>
@else
<input type="hidden" class="form-control"
name="charge_date_{{$key->charge->id}}"
value="">
@endif
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
</div>
<!-- /.panel-body -->
<div class="panel-footer">
<div class="heading-elements">
<button type="submit" class="btn btn-primary pull-right">{{translate('save')}}</button>
</div>
</div>
{!! Form::close() !!}
</div>
<!-- /.box -->
@endsection
@section('footer-scripts')
<script>
$(document).ready(function () {
$('#savings_product_id').change(function (e) {
window.location = "{!! url('saving/create?product_id=') !!}" + $("#savings_product_id").val()+"&borrower_id="+ $("#borrower_id").val();
})
});
</script>
<script>
$("#savings_form").validate({
rules: {
field: {
required: true,
number: true
}
}
});
</script>
@endsection