@extends('layouts/microfin_layout') @section('title', '| Edit Regular Loan') @section('content')
Edit Opening Balance Regular Loan
{!! Form::open(array('name' => 'memberForm', 'url' => '', 'role' => 'form', 'id' => 'rootwizard', 'files' => 'true', 'class' => 'form-wizard validate', 'novalidate' => '')) !!}
Member and Loan Details
{!! Form::hidden('loanId', $loan->id) !!}
{!! Form::label('memberName', 'Member:*', ['class' => 'control-label']) !!}
{!! Form::text('memberName', $memberName->id .'-'. $memberName->nameWithCode, ['class' => 'form-control', 'id' => 'memberName', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('disbursement date', 'Disbursement Date:*', ['class' => 'control-label']) !!}
{!! Form::text('disbursementDate', date('d-m-Y', strtotime($loan->disbursementDate)), ['class' => 'form-control datepicker', 'id' => 'disbursementDate', 'readonly' => 'readonly', 'type' => 'text', 'data-validate' => 'required']) !!}
{!! Form::label('productNmae', 'Product:*', ['class' => 'control-label']) !!}
{!! Form::text('productNmae', $product->nameWithCode, ['class' => 'form-control', 'id' => 'productNmae', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('loan cycle', 'Loan Cycle:*', ['class' => 'control-label']) !!}
{!! Form::text('loanCycle', $loan->loanCycle, ['class' => 'form-control', 'id' => 'loanCycle', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('loan code', 'Loan Code:*', ['class' => 'control-label']) !!}
{!! Form::text('loanCode', $loan->loanCode , ['class' => 'form-control', 'id' => 'loanCode', 'type' => 'text', 'readonly' => 'readonly']) !!}
Loan Configuration
{{--
{!! Form::label('loan application no', 'Loan Application No:', ['class' => 'control-label']) !!}
{!! Form::text('loanApplicationNo', $value = null, ['class' => 'form-control', 'id' => 'loanApplicationNo', 'type' => 'text']) !!}
--}} {{--
{!! Form::label('repayment frequency', 'Repayment Frequency:*', ['class' => 'control-label']) !!}
{!! Form::select('repaymentFrequencyIdFk', $repaymentFrequencyName, array('class'=>'form-control', 'id' => 'repaymentFrequencyIdFk', 'data-validate' => 'required')) !!}
--}}
{!! Form::label('repayment frequency', 'Repayment Frequency:*', ['class' => 'control-label']) !!}
{!! Form::select('repaymentFrequencyIdFk', array('' =>'Select') + $repaymentFrequency, $loan->repaymentFrequencyIdFk, array('class'=>'form-control', 'id' => 'repaymentFrequencyIdFk', 'data-validate' =>'required')) !!}
{{-- Fixed Date/Day for Daily Samity Case of Weekly/Monthly Product(Start) --}}
{!! Form::label('installmentDate', 'Installment Date:*', ['class' => 'control-label']) !!}
{!! Form::select('installmentDate', array('' => 'Select')+ $dateList, $loan->installmentDate, array('class'=>'form-control', 'id' => 'installmentDate', 'data-validate' => 'required')) !!}
{!! Form::label('installmentDay', 'Installment Date:*', ['class' => 'control-label']) !!}
{!! Form::select('installmentDay', array('' => 'Select')+ $weekMap, $loan->installmentDay, array('class'=>'form-control', 'id' => 'installmentDay', 'data-validate' => 'required')) !!}
{{-- Fixed Date/Day for Daily Samity Case of Weekly/Monthly Product(End) --}} {{--
{!! Form::label('loan repay period', 'Loan Repay Period:*', ['class' => 'control-label']) !!}
{!! Form::select('loanRepayPeriodIdFk', array('' => 'Select'), null, array('class'=>'form-control', 'id' => 'loanRepayPeriodIdFk', 'data-validate' => 'required')) !!}
--}}
{!! Form::label('first repay date', 'First Repay Date:*', ['class' => 'control-label']) !!}
{!! Form::text('firstRepayDate', date('d-m-Y', strtotime($loan->firstRepayDate)), ['class' => 'form-control', 'id' => 'firstRepayDate', 'type' => 'text', 'data-validate' => 'required','readonly' => 'readonly']) !!}
{!! Form::label('loan amount', 'Loan Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('loanAmount', $loan->loanAmount, ['class' => 'form-control', 'id' => 'loanAmount', 'type' => 'text', 'autocomplete' => 'off']) !!} {!! Form::text('', $value = null, ['class' => 'form-control hidden', 'id' => 'backupLoanAmount', 'type' => 'hidden']) !!} {!! Form::text('', $value = null, ['class' => 'form-control hidden', 'id' => 'maxLoanAmount', 'type' => 'hidden']) !!} {!! Form::text('', $value = null, ['class' => 'form-control hidden', 'id' => 'minLoanAmount', 'type' => 'hidden']) !!}
{{--
{!! Form::label('numberOfInstallment', 'No of Installment:*', ['class' => 'control-label']) !!}
{!! Form::select('numberOfInstallment', array($loan->numberOfInstallment => $loan->numberOfInstallment), array('class'=>'form-control', 'id' => 'numberOfInstallment', 'data-validate' => 'required')) !!}
--}}
{!! Form::label('no of installment', 'No of Installment:*', ['class' => 'control-label']) !!}
{!! Form::select('numberOfInstallment', array('' => 'Select') + $installments, $loan->numberOfInstallment, array('class'=>'form-control', 'id' => 'numberOfInstallment', 'data-validate' => 'required')) !!}
{!! Form::label('insurance amount', 'Insurance Amount:', ['class' => 'control-label']) !!}
{!! Form::text('insuranceAmount', $loan->insuranceAmount, ['class' => 'form-control', 'id' => 'insuranceAmount', 'type' => 'text', 'readonly' => 'readonly']) !!} {!! Form::text('', $value = null, ['class' => 'form-control hidden', 'id' => 'principalAmountOfLoan', 'type' => 'hidden']) !!}
{{--
{!! Form::label('loan purpose', 'Loan Purpose:*', ['class' => 'control-label']) !!}
{!! Form::select('loanSubPurposeIdFk', ($loanPurpose), null, array('class'=>'form-control', 'id' => 'loanSubPurposeIdFk', 'data-validate' => 'required')) !!}
--}}
{!! Form::label('folio number', 'Folio Number:', ['class' => 'control-label']) !!}
{!! Form::text('folioNum', $loan->folioNum , ['class' => 'form-control', 'id' => 'folioNum', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('loan_purpose_code_level_1', 'Loan Purpose (Layer-1):*', ['class' => 'control-label']) !!}
{!! Form::select('loan_purpose_code_level_1', $loan_purpose_level_1_list, $loan->loan_purpose_code_level_1, array('class'=>'form-control', 'id' => 'loan_purpose_code_level_1', 'data-validate' => 'required')) !!}
{!! Form::label('loan_purpose_code_level_2', 'Loan Purpose (Layer-2):*', ['class' => 'control-label']) !!}
{!! Form::select('loan_purpose_code_level_2', $loan_purpose_level_2_list, $loan->loan_purpose_code_level_2, array('class'=>'form-control', 'id' => 'loan_purpose_code_level_2', 'data-validate' => 'required')) !!}
{!! Form::label('loan_purpose_code_level_3', 'Loan Purpose (Layer-3):*', ['class' => 'control-label']) !!}
{!! Form::select('loan_purpose_code_level_3', $loan_purpose_level_3_list, $loan->loan_purpose_code_level_3, array('class'=>'form-control', 'id' => 'loan_purpose_code_level_3', 'data-validate' => 'required')) !!}
{!! Form::label('loan_purpose_code_level_4', 'Loan Purpose (Layer-4):*', ['class' => 'control-label']) !!}
{!! Form::select('loan_purpose_code_level_4', $loan_purpose_level_4_list, $loan->loan_purpose_code_level_4, array('class'=>'form-control', 'id' => 'loan_purpose_code_level_4', 'data-validate' => 'required')) !!}
Interest Calculation
{!! Form::label('mode of interest', 'Mode of Interest:*', ['class' => 'control-label']) !!}
{!! Form::text('interestMode', $loan->interestMode , ['class' => 'form-control', 'id' => 'interestMode', 'type' => 'text', 'readonly' => 'readonly', 'data-validate' => 'required, minlength[1]']) !!}
{!! Form::label('interest calculation method', 'Interest Calculation Method:*', ['class' => 'control-label']) !!}
{!! Form::text('interestCalculationMethod', $loan->interestCalculationMethod, ['class' => 'form-control', 'id' => 'interestCalculationMethod', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('interest rate', 'Interest Rate:*', ['class' => 'control-label']) !!}
{!! Form::text('interestRate', $loan->interestRate, ['class' => 'form-control', 'id' => 'interestDiscountAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{{--
{!! Form::label('interest discount amount', 'Interest Discount Amount:', ['class' => 'control-label']) !!}
{!! Form::text('interestDiscountAmount', $value = null, ['class' => 'form-control', 'id' => 'interestDiscountAmount', 'type' => 'text']) !!}
--}}
Payments
{!! Form::label('total repay amount', 'Total Repay Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('totalRepayAmount', $loan->totalRepayAmount, ['class' => 'form-control', 'id' => 'totalRepayAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('interest amount', 'Interest Amount:', ['class' => 'control-label']) !!}
{!! Form::text('interestAmount', $loan->interestAmount, ['class' => 'form-control', 'id' => 'interestAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('installment amount', 'Installment Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('installmentAmount', $loan->installmentAmount, ['class' => 'form-control', 'id' => 'installmentAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('payment type', 'Payment Type:', ['class' => 'control-label']) !!}
{!! Form::text('paymentTypeIdFk', $loan->paymentTypeIdFk , array('class'=>'form-control', 'id' => 'paymentTypeIdFk', 'readonly' => 'readonly')) !!}
Opening Balance Information
{{--
{!! Form::label('old loan code', 'Old Loan Code:', ['class' => 'control-label']) !!}
{!! Form::text('oldLoanCode', $value = null, ['class' => 'form-control', 'id' => 'oldLoanCode', 'type' => 'text']) !!}
--}}
{!! Form::label('total paid amount', 'Total Paid Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('paidLoanAmountOB', $openingBalance->paidLoanAmountOB, ['class' => 'form-control', 'id' => 'paidLoanAmountOB', 'type' => 'text', 'data-validate' => 'required']) !!}
{!! Form::label('principal amount', 'Principal Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('principalAmountOB', $openingBalance->principalAmountOB , ['class' => 'form-control', 'id' => 'principalAmountOB', 'type' => 'text', 'data-validate' => 'required','readonly' => 'readonly']) !!}
{!! Form::label('interest amount', 'Interest Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('interestAmountOB', $openingBalance->interestAmountOB , ['class' => 'form-control', 'id' => 'interestAmountOB', 'type' => 'text', 'data-validate' => 'required','readonly' => 'readonly']) !!}
{!! Form::label('due amount', 'Outstanding Amount:*', ['class' => 'control-label']) !!}
{!! Form::text('dueAmountOB', $outstandingAmount , ['class' => 'form-control', 'id' => 'dueAmountOB', 'type' => 'text', 'data-validate' => 'required','readonly' => 'readonly','readonly' => 'readonly']) !!}
Extra Loan Information
{!! Form::label('extra installment amount', 'Extra Installment Amount:', ['class' => 'control-label']) !!}
{!! Form::text('extraInstallmentAmount', $loan->extraInstallmentAmount , ['class' => 'form-control', 'id' => 'extraInstallmentAmount', 'type' => 'text','data-validate' => 'required']) !!}
{!! Form::label('actual installment amount', 'Actual Installment Amount:', ['class' => 'control-label']) !!}
{!! Form::text('actualInstallmentAmount', $loan->actualInstallmentAmount , ['class' => 'form-control', 'id' => 'actualInstallmentAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('last installment amount', 'Last Installment Amount:', ['class' => 'control-label']) !!}
{!! Form::text('lastInstallmentAmount', $loan->lastInstallmentAmount , ['class' => 'form-control', 'id' => 'lastInstallmentAmount', 'type' => 'text', 'readonly' => 'readonly']) !!}
{{--
{!! Form::label('actual number of installment', 'Actual Number of installment:', ['class' => 'control-label']) !!}
{!! Form::text('actualNumberOfInstallment', $value = null, ['class' => 'form-control', 'id' => 'actualNumberOfInstallment', 'type' => 'text', 'readonly' => 'readonly']) !!}
--}}
{!! Form::label('additional fee', 'Additional Fee:', ['class' => 'control-label']) !!}
{!! Form::text('additionalFee', $loan->additionalFee , ['class' => 'form-control', 'id' => 'additionalFee', 'type' => 'text', 'readonly' => 'readonly']) !!}
{{--
{!! Form::label('additional fee old loanee', 'Additional Fee for Old Loanee:', ['class' => 'control-label']) !!}
{!! Form::text('additionalFeeOldLoanee', $value = null, ['class' => 'form-control', 'id' => 'additionalFeeOldLoanee', 'type' => 'text', 'readonly' => 'readonly']) !!}
--}}
{!! Form::label('loan form fee', 'Loan Form Fee:', ['class' => 'control-label']) !!}
{!! Form::text('loanFormFee', $loan->loanFormFee , ['class' => 'form-control', 'id' => 'loanFormFee', 'type' => 'text', 'readonly' => 'readonly']) !!}
{!! Form::label('note', 'Note:', ['class' => 'control-label']) !!}
{!! Form::textarea('note', $loan->note , ['class' => 'form-control', 'id' => 'note', 'type' => 'textarea', 'rows' => '5', 'cols' => '50']) !!}
{!! Form::submit('Submit', ['id' => 'submit', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}