@extends('layouts/acc_layout') @section('title', '| Loan Register') @section('content')
Opening Loan Register

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

{!! Form::label('projectType', 'Project Type:', ['class' => 'col-sm-5 control-label']) !!}
@php $projectTypes = DB::table('gnr_project_type')->select('id','name','projectTypeCode')->get(); @endphp

{!! Form::label('branch', 'Branch:', ['class' => 'col-sm-5 control-label']) !!}
@php $branchList = DB::table('gnr_branch')->select('name','id','branchCode')->get(); @endphp

{{--
{!! Form::label('Opening balance Date', 'Opening balance Date:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('open_bal_date', null, ['class'=>'form-control', 'id' => 'open_bal_date', 'readonly']) !!}

--}}
{!! Form::button('Add', ['id' => 'add_donar', 'class' => 'btn btn-info','type'=>'button']) !!}


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

{!! Form::label('branch', 'Bank Branch:', ['class' => 'col-sm-5 control-label']) !!}
@php /*$donorBranchList = array(''=>'Select Branch') + DB::table('gnr_bank_branch')->pluck('name','id')->toArray();*/ $donorBranchList = DB::table('gnr_bank_branch')->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-5 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('accountNo', 'Account No: ', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('accountNo', null, ['class'=>'form-control', 'id' => 'accountNo']) !!}

{!! Form::label('Opening balance Date', 'Opening balance Date:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('open_bal_date', null, ['class'=>'form-control', 'id' => 'open_bal_date', 'readonly']) !!}

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

{!! Form::label('Payable Principal', 'Payable Principal:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('payablePrincipal', null, ['class'=>'form-control', 'id' => 'payablePrincipal']) !!}

{!! Form::label('Payable Interest', 'Payable Interest:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('payableInterest', null, ['class'=>'form-control', 'id' => 'payableInterest']) !!}

{!! Form::label('principal', 'Paid Principal:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('principal', null, ['class'=>'form-control', 'id' => 'principal']) !!}

{!! Form::label('Interest', 'Paid Interest:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('interest', null, ['class'=>'form-control', 'id' => 'interest']) !!}

{!! Form::label('Outstanding', 'Outstanding:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('outstanding', null, ['class'=>'form-control', 'id' => 'outstanding','readonly']) !!}

{!! Form::button('Add', ['id' => 'add_balnce', 'class' => 'btn btn-info','type'=>'button']) !!}
{!! Form::close() !!}


Donar Name Loan Product Account No Opening Balance Date Loan Amount (Tk) Payable Principal (Tk) Payable Interest (Tk) Principal Amount (Tk) Interest Amount (Tk) Outstandig Amount (Tk) Action


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