@extends('layouts.master') @section('title'){{translate('add')}} {{translate('pay_off')}} @endsection @section('content')
{{translate('add')}} {{translate('pay_off')}}
{!! Form::open(array('url' => url('loan/'.$loan->id.'/pay-off/store'), 'method' => 'post', 'class' => 'form-horizontal')) !!}
{!! Form::label('principal',translate('principal').' '.translate('principal'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('principal',$principal, array('id' => 'principal','class' => 'form-control touchspin', 'placeholder'=>"Number or decimal only",'required'=>'required')) !!}
{!! Form::label('payOffInterestRate',translate('interest').' '.translate('amount'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('payOffInterestRate',$payOffInterestRate, array('id' => 'interest','class' => 'form-control touchspin', 'placeholder'=>"Number or decimal only",'required'=>'required')) !!}
{!! Form::label('total',translate('total').' '.translate('amount'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('total',0, array('id' => 'total', 'class' => 'form-control touchspin', 'placeholder'=>"Number or decimal only",'required'=>'required', 'style'=>'background: #ff5722; color:black')) !!}
{!! Form::label('repayment_method_id',translate('pay_off').' '.translate('method'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('repayment_method_id',$repayment_methods,null, array('class' => ' form-control','required'=>'required','id'=>'loanProduct')) !!}
{!! Form::label('receipt',translate('receipt'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('receipt',null, array('class' => 'form-control', 'placeholder'=>"",''=>'required')) !!}
{!! Form::label('collection_date',translate('collection').' '.translate('date'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('collection_date',date("Y-m-d"), array('class' => 'form-control date-picker', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('notes',translate('description'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::textarea('notes',null, array('class' => 'form-control', 'rows'=>"4")) !!}

{{translate('custom_field')}}

@foreach($custom_fields as $key)
{!! Form::label($key->id,$key->name,array('class'=>'')) !!} @if($key->field_type=="number") required==1) required @endif> @endif @if($key->field_type=="textfield") required==1) required @endif> @endif @if($key->field_type=="date") required==1) required @endif> @endif @if($key->field_type=="textarea") @endif @if($key->field_type=="decimal") required==1) required @endif> @endif
@endforeach
{!! Form::close() !!}
@endsection