@extends('layouts/acc_layout') @section('title', '| Loan Register') @section('content')
Donor/Bank Repayment
{{-- ////////////////////////////// --}}
{!! Form::open(['url'=>'','class'=>'form-horizontal form-groups']) !!}
{!! Form::label('paymentId', 'Payment ID:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('paymentId',$paymentId, ['class'=>'form-control', 'id' => 'paymentId','readonly']) !!}
{!! Form::label('projectType', 'Project Type:', ['class' => 'col-sm-4 control-label']) !!}
@php $activeProjectTypes = DB::table('acc_loan_register_account')->pluck('projectTypeId_fk')->toArray(); $projectTypes = DB::table('gnr_project_type')->whereIn('id',$activeProjectTypes)->select('id','name','projectTypeCode')->get(); @endphp

{!! Form::label('donor', 'Donor:', ['class' => 'col-sm-4 control-label']) !!}
@php $activeDonors = DB::table('acc_loan_register_account')->pluck('bankId_fk')->toArray(); $donorList = array(''=>'Select Donor') + DB::table('gnr_bank')->whereIn('id',$activeDonors)->pluck('name','id')->toArray(); @endphp {!! Form::select('donor',$donorList ,null, ['class'=>'form-control', 'id' => 'donor']) !!}

{!! Form::hidden('donorType',null,['id'=>'donorType']) !!}
{!! Form::label('branch', 'Branch:', ['class' => 'col-sm-4 control-label']) !!}
@php $activeBranches = DB::table('acc_loan_register_account')->pluck('bankBranchId_fk')->toArray(); $donorBranchList = DB::table('gnr_bank_branch')->whereIn('id',$activeBranches)->select('name','id','bankId_fk')->get(); $bankShortNameList = array(); foreach ($donorBranchList as $key => $donorBranch) { $bankShortName = DB::table('gnr_bank')->where('id',$donorBranch->bankId_fk)->value('shortName'); array_push($bankShortNameList, $bankShortName); } @endphp

{!! Form::label('loanProduct', 'Loan Product:', ['class' => 'col-sm-4 control-label']) !!}
@php $activeLoanProduts = DB::table('acc_loan_register_account')->where('status',1)->groupBy('loanProductId_fk')->pluck('loanProductId_fk')->toArray(); $loanProductList = array(''=>'Select Loan Product') + DB::table('gnr_loan_product')->whereIn('id',$activeLoanProduts)->pluck('name','id')->toArray(); @endphp {!! Form::select('loanProduct',$loanProductList ,null, ['class'=>'form-control', 'id' => 'loanProduct']) !!}

{{--
{!! Form::label('project', 'Project:', ['class' => 'col-sm-4 control-label']) !!}
@php $projects = DB::table('gnr_project')->select('id','name','projectCode')->get(); @endphp

--}}
{!! Form::label('accNo', 'Account No:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('accNo', [''=>'Select Account'],null, ['class'=>'form-control', 'id' => 'accNo','disabled']) !!}

{!! Form::label('isRebate', 'Is Rebate?:', ['class' => 'col-sm-4 control-label']) !!}
@php $rebateArray = array('0'=>'No','1'=>'Yes'); @endphp {!! Form::select('isRebate',$rebateArray ,null, ['class'=>'form-control', 'id' => 'isRebate']) !!}

{{--
{!! Form::label('agreementDate', 'Agreement/Sanction Date:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('agreementDate', null, ['class'=>'form-control', 'id' => 'agreementDate','readonly','style'=>'cursor:pointer']) !!}

--}} {{--
{!! Form::label('loanSanctionNumber', 'Loan Sanction Number:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('loanSanctionNumber', null, ['class'=>'form-control', 'id' => 'loanSanctionNumber']) !!}

--}} {{--
{!! Form::label('loanDate', 'Loan Date:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('loanDate', null, ['class'=>'form-control', 'id' => 'loanDate','readonly','style'=>'cursor:pointer']) !!}

--}}
{{-- End of 1st coloum --}}
{!! Form::label('phase', 'Phase:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('phase', [''=>'Select Phase'],null, ['class'=>'form-control', 'id' => 'phase','disabled']) !!}

{!! Form::label('cycle', 'Cycle:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('cycle', [''=>'Select Cycle'],null, ['class'=>'form-control', 'id' => 'cycle','disabled']) !!}

{!! Form::label('numOfInstallment', 'No Of Installment:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('numOfInstallment', null, ['class'=>'form-control', 'id' => 'numOfInstallment','readonly']) !!}

{!! Form::label('loanAmount', 'Loan Amount:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('loanAmount', null, ['class'=>'form-control', 'id' => 'loanAmount','readonly']) !!}

{!! Form::label('principalAmount', 'Principal Amount:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('principalAmount', null, ['amount'=>'0','class'=>'form-control', 'id' => 'principalAmount']) !!}

{!! Form::label('interestAmount', 'Interest Amount:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('interestAmount', null, ['amount'=>'0','class'=>'form-control', 'id' => 'interestAmount']) !!}

{!! Form::label('paymentDate', 'Payment Date:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('paymentDate', null, ['class'=>'form-control', 'id' => 'paymentDate','readonly','style'=>'cursor:pointer;']) !!}

{{--
{!! Form::label('repaymentFrequency', 'Repayment Frequency:', ['class' => 'col-sm-4 control-label']) !!}
@php $monthArray = array(''=>'Select Duration','1'=>'1 month','2'=>'2 months','3'=>'3 months','4'=>'4 months','5'=>'5 months','6'=>'6 months','7'=>'7 months','8'=>'8 months','9'=>'9 months','10'=>'10 months','11'=>'11 months','12'=>'12 months'); @endphp {!! Form::select('repaymentFrequency', $monthArray,null, ['class'=>'form-control', 'id' => 'repaymentFrequency']) !!}

--}} {{--
{!! Form::label('loanDuration', 'Loan Duration (Month):', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('loanDuration', null, ['class'=>'form-control', 'id' => 'loanDuration']) !!}

--}} {{--
{!! Form::label('gracePeriod', 'Grace Period (Month):', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('gracePeriod', null, ['class'=>'form-control', 'id' => 'gracePeriod']) !!}

--}} {{--
{!! Form::label('status', 'Status:', ['class' => 'col-sm-4 control-label']) !!}
@php $statusArray = array(''=>'Select Status','1'=>'Activate','0'=>'Deactivate'); @endphp {!! Form::select('status', $statusArray,1, ['class'=>'form-control', 'id' => 'status']) !!}

--}}
{{-- End of 2nd coloum --}}



Inst. No Schedule Payment Due Amount Status
Inst. Date Principal Interest Total Date Principal Interest Total Principal Interest Total


{!! Form::button('Submit', ['id' => 'submitButton', 'class' => 'btn btn-info','type'=>'button']) !!} Close
{!! Form::close() !!} {{-- ////////////////////////////// --}}
@endsection