loan details : ps
This commit is contained in:
parent
ccb5ead9d6
commit
fcbdc8db99
@ -17,11 +17,11 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required >
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" required>
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width: 25%">
|
||||
<mat-select multiple (selectionChange)="endUserChange($event)" placeholder="What is the end use" formControlName="end_use" required>
|
||||
<mat-option *ngFor="let enduse of m_endUseofLoad" [value]="enduse.id">{{ enduse.name }}</mat-option>
|
||||
</mat-select>
|
||||
@ -37,66 +37,74 @@
|
||||
<mat-option value="other">Other purpose</mat-option>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="isOtherPurpose">
|
||||
<mat-form-field *ngIf="isOtherPurpose" style="width: 25%">
|
||||
<input matInput placeholder="Specify End Use" formControlName="end_use_other">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width: 30%">
|
||||
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
|
||||
formControlName="is_transfer" required>
|
||||
formControlName="is_transfer" required >
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<input matInput placeholder="What is the amount required for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)">
|
||||
<div *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="What is the amount required for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)" (change)="loanCalc()">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{balTxrfAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<mat-form-field style="width:20%">
|
||||
<mat-select placeholder="Is there a Top Up"
|
||||
formControlName="is_topup" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<mat-form-field style="width: 50%">
|
||||
<mat-select placeholder="Lender from where balance transfer done"
|
||||
formControlName="lender">
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 3">
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 3" style="width: 25%">
|
||||
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_topup'].value == 'yes'">
|
||||
<input matInput placeholder="Top Up Amt" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)">
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 20%">
|
||||
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes'">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ownContributionInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes'">
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Source" formControlName="source" required>
|
||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<!--<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||
<mat-option value="own_money">Own money</mat-option>
|
||||
<mat-option value="other">Loan from another lender</mat-option>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'">
|
||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
<!--<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||
<mat-option value="own_money">Own money</mat-option>
|
||||
<mat-option value="other">Loan from another lender</mat-option>
|
||||
</mat-select>-->
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
|
||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
<mat-card-header><p>Mortgage</p></mat-card-header>
|
||||
|
||||
@ -491,4 +491,21 @@ getM_sourceofamount() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* LoanCalculation
|
||||
*/
|
||||
loanCalc()
|
||||
{
|
||||
let BtAmount = this.loanDetailsForm.value.balance_transfer_amount;
|
||||
let loanAmount = this.loanDetailsForm.value.loan_amount;
|
||||
let topupAmt ;
|
||||
if(BtAmount !=null && BtAmount !='' && loanAmount !=null && loanAmount!='')
|
||||
{
|
||||
topupAmt = loanAmount - BtAmount;
|
||||
//topUpAmtInWords
|
||||
}
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(topupAmt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user