@extends('layouts.master') @section('title'){{translate('edit repayment')}} @endsection @section('content')
{{translate('edit repayment')}}
{!! Form::open(array('url' => url('loan/repayment/'.$loan_transaction->id.'/update'), 'method' => 'post', 'class' => 'form-horizontal')) !!}
{!! Form::label('amount',translate('repayment').' '.translate('amount'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('amount',$loan_transaction->credit, array('class' => 'form-control touchspin', 'placeholder'=>"Number or decimal only",'required'=>'required')) !!}
{!! Form::label('repayment_method_id',translate('repayment').' '.translate('method'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::select('repayment_method_id',$repayment_methods,$loan_transaction->repayment_method_id, array('class' => ' form-control','required'=>'required','id'=>'loanProduct')) !!}
{!! Form::label('receipt',translate('receipt'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::text('receipt',$loan_transaction->receipt, 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',$loan_transaction->date, array('class' => 'form-control date-picker', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('notes',translate('description'),array('class'=>'col-sm-3 control-label')) !!}
{!! Form::textarea('notes',$loan_transaction->notes, 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 value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first()->name}} @endif"> @endif @if($key->field_type=="textfield") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first()->name}} @endif"> @endif @if($key->field_type=="date") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first()->name}} @endif"> @endif @if($key->field_type=="textarea") @endif @if($key->field_type=="decimal") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan_transaction->id)->where('category','repayments')->first()->name}} @endif"> @endif
@endforeach
{!! Form::close() !!}
@endsection