@extends('layouts.master') @section('title') {{ trans_choice('general.edit',1) }} {{ trans_choice('general.loan',1) }} @endsection @section('content')

{{ trans_choice('general.edit',1) }} {{ trans_choice('general.loan',1) }}

{{csrf_field()}}

{{trans_choice('general.group',1)}} {{trans_choice('general.member',1)}} {{trans_choice('general.allocation',1)}}

@foreach($loan->group->clients as $key)
@endforeach

{{trans_choice('general.charge',2)}}


@foreach($loan->charges as $key) @if(!empty($key->charge)) @endif @endforeach
{{trans_choice('general.name',1)}} {{trans_choice('general.type',1)}} {{trans_choice('general.amount',1)}} {{trans_choice('general.collected',1)}} {{trans_choice('general.on',1)}} {{trans_choice('general.date',1)}}
{{ $key->charge->name }} @if($key->charge->charge_option=="flat") {{trans_choice('general.flat',1)}} @endif @if($key->charge->charge_option=="installment_principal_due") % {{trans_choice('general.installment_principal_due',1)}} @endif @if($key->charge->charge_option=="installment_principal_interest_due") % {{trans_choice('general.installment_principal_interest_due',1)}} @endif @if($key->charge->charge_option=="installment_interest_due") % {{trans_choice('general.installment_interest_due',1)}} @endif @if($key->charge->charge_option=="total_due") % {{trans_choice('general.total_due',1)}} @endif @if($key->charge->charge_option=="original_principal") % {{trans_choice('general.original_principal',1)}} @endif @if($key->charge->charge_option=="percentage") % {{trans_choice('general.percentage',1)}} {{trans_choice('general.of',1)}} {{trans_choice('general.amount',1)}} @endif @if($key->charge->override==1) @else {{$key->amount}} @endif @if($key->charge->charge_type=='disbursement') {{trans_choice('general.disbursement',1)}} @endif @if($key->charge->charge_type=='specified_due_date') {{trans_choice('general.specified_due_date',2)}} @endif @if($key->charge->charge_type=='installment_fee') {{trans_choice('general.installment_fee',2)}} @endif @if($key->charge->charge_type=='overdue_installment_fee') {{trans_choice('general.overdue_installment_fee',2)}} @endif @if($key->charge->charge_type=='loan_rescheduling_fee') {{trans_choice('general.loan_rescheduling_fee',2)}} @endif @if($key->charge->charge_type=='overdue_maturity') {{trans_choice('general.overdue_maturity',2)}} @endif @if($key->charge->charge_type=='savings_activation') {{trans_choice('general.savings_activation',2)}} @endif @if($key->charge->charge_type=='withdrawal_fee') {{trans_choice('general.withdrawal_fee',2)}} @endif @if($key->charge->charge_type=='monthly_fee') {{trans_choice('general.monthly_fee',2)}} @endif @if($key->charge->charge_type=='annual_fee') {{trans_choice('general.annual_fee',2)}} @endif @if($key->charge->charge_type=='specified_due_date') @else @endif @if($key->charge->charge_type=="specified_due_date") @endif
@if(\App\Models\Setting::where('setting_key','enable_custom_fields')->first()->setting_value==1) @foreach(\App\Models\CustomField::where('category','loans')->get() as $key)
@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->id)->where('category','loans')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan->id)->where('category','loans')->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->id)->where('category','loans')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan->id)->where('category','loans')->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->id)->where('category','loans')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan->id)->where('category','loans')->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->id)->where('category','loans')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan->id)->where('category','loans')->first()->name}} @endif"> @endif @if($key->field_type=="select") @endif @if($key->field_type=="radiobox") @foreach(explode(',',$key->radio_box_values) as $v)
@endforeach @endif @if($key->field_type=="checkbox") @if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$loan->id)->where('category','loans')->first()))