cfpl changes
This commit is contained in:
parent
c37a036e50
commit
c18a422877
@ -797,21 +797,24 @@
|
||||
formControlName="turnover_lastcomplete_year" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="YTD turnover"
|
||||
<input matInput autocomplete="off" placeholder="YTD turnover (till last month)"
|
||||
formControlName="ytd_turnover" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="financialForm.controls('ytd_turnover').value != ''">{{"₹"}}
|
||||
{{financialForm.controls('ytd_turnover').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
|
||||
<!--<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall debtor collection period"
|
||||
formControlName="deptor_collection_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
</mat-form-field>-->
|
||||
<!--<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall Inventory holding period"
|
||||
formControlName="inventory_holding_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
</mat-form-field>-->
|
||||
<!--<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall creditor payment period"
|
||||
formControlName="creditor_payment_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
</mat-form-field>-->
|
||||
|
||||
</div>
|
||||
<div fxLayout="row wrap">
|
||||
|
||||
@ -176,7 +176,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.av.push({id:12,name:'Loan start date'});
|
||||
this.av.push({id:13,name:'Monthly obligation-Interest/EMI'});
|
||||
/*--------------------------*/
|
||||
|
||||
|
||||
/*for financial data */
|
||||
this.financialForm.addControl('turnover_lastcomplete_year',new FormControl())
|
||||
this.financialForm.addControl('ytd_turnover',new FormControl())
|
||||
|
||||
@ -22,22 +22,21 @@
|
||||
<mat-card>
|
||||
<mat-card>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 64%">
|
||||
<!--<mat-form-field style="width: 64%">
|
||||
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Amount Applied for ?</mat-label>
|
||||
<input matInput placeholder="Enter the amount" formControlName="loan_amount"
|
||||
OnlyNumber type="text" (change)="loanCalc()"
|
||||
autocomplete="off">
|
||||
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['loan_amount'].value | numberToWords }} Only</mat-hint>
|
||||
<!-- <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{loanAmtInWords}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
|
||||
</mat-form-field>-->
|
||||
<mat-form-field style="width: 28%" *ngIf="lenderShortName != 'CFPL'">
|
||||
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Tenure applied for?</mat-label>
|
||||
<input matInput placeholder="No of months (Eg. 6)" formControlName="loan_tenure"
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:64%" >
|
||||
<mat-form-field style="width:64%" *ngIf="lenderShortName != 'CFPL'">
|
||||
<mat-select placeholder="Sub Product" formControlName="sub_product"
|
||||
(selectionChange)="onChangeSubProduct($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -46,7 +45,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-form-field style="width: 64%" *ngIf="lenderShortName != 'CFPL'">
|
||||
<mat-select multiple (selectionChange)="endUserChange($event.value)"
|
||||
placeholder="What is the end use" formControlName="end_use">
|
||||
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{
|
||||
@ -78,7 +77,7 @@
|
||||
</span>
|
||||
|
||||
<div *ngIf="lenderShortName != 'CLIX' && lenderShortName != 'MWISE' || prod_catagory == 'LFMP'">
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-form-field style="width: 64%" *ngIf="lenderShortName != 'CFPL'">
|
||||
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event.value)"
|
||||
formControlName="is_transfer">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -341,11 +340,11 @@
|
||||
<h6>Applicant's association vintage with the Anchor</h6>
|
||||
<mat-form-field >
|
||||
<input matInput placeholder="Year" formControlName="vintage_anchor_year"
|
||||
OnlyNumber type="text" required>
|
||||
OnlyNumber type="text" >
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput placeholder="Month" formControlName="vintage_anchor_month"
|
||||
OnlyNumber type="text" >
|
||||
OnlyNumber type="text" (change)="ConvertMonthintoYear(loanDetailsForm,$event.target.value)">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -461,11 +460,34 @@
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['stock_related_anchor'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['stock_related_anchor'].value | numberToWords }} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field
|
||||
<!--<mat-form-field
|
||||
style="width: 28%">
|
||||
<input matInput placeholder="Observations on Sample Invoices"
|
||||
formControlName="sample_invoices" autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['sample_invoices'].hasError('required')">Observations on Sample Invoices Required</mat-error>
|
||||
</mat-form-field>-->
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-select placeholder="Observations on Sample Invoices" (selectionChange)="selectedobservationChanges($event.value)"
|
||||
formControlName="sample_invoices">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['sample_invoices'].hasError('required')">Observations on Sample Invoices Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%" *ngIf="sampleinvoices_yes == 'yes'">
|
||||
<input matInput placeholder="sample invoice notes"
|
||||
type="text" formControlName="sampleinvoices_yes"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['debitcredit_notes'].value != ''"></mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%" *ngIf="sampleinvoices_no == 'no'">
|
||||
<input matInput placeholder="sample invoice notes"
|
||||
type="text" formControlName="sampleinvoices_no"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['debitcredit_notes'].value != ''"></mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
|
||||
@ -96,7 +96,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
addressList: any = [];
|
||||
prod_catagory: any;
|
||||
debitcredit_notes: string;
|
||||
freetext1: string;
|
||||
freetext2: string;
|
||||
peakseasons: string;
|
||||
sampleinvoices_yes: string;
|
||||
sampleinvoices_no: string;
|
||||
|
||||
|
||||
|
||||
@ -229,6 +233,16 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.debitcredit_notes='yes';
|
||||
this.loanDetailsForm.controls['debitcredit_notes'].setValue(value.records.debitcredit_notes);
|
||||
}
|
||||
if(value.records.sample_invoices=='yes')
|
||||
{
|
||||
this.sampleinvoices_yes='yes';
|
||||
this.loanDetailsForm.controls['sampleinvoices_yes'].setValue(value.records.sampleinvoices_yes);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.sampleinvoices_no='no';
|
||||
this.loanDetailsForm.controls['sampleinvoices_no'].setValue(value.records.sampleinvoices_no);
|
||||
}
|
||||
if(value.records.peakseasons_anchor=='yes')
|
||||
{
|
||||
this.peakseasons='yes';
|
||||
@ -546,8 +560,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
{
|
||||
this.loanDetailsForm.addControl('facility_amount', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('anchor_name', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('vintage_anchor_year', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('vintage_anchor_month', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('vintage_anchor_year', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('vintage_anchor_month', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('monthly_business_anchor', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('business_concentration', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('credit_period_days', new FormControl('', Validators.required));
|
||||
@ -558,6 +572,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
// if(this.debitcredit_notes=='yes')
|
||||
// {
|
||||
this.loanDetailsForm.addControl('debitcredit_notes', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('sampleinvoices_yes', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('sampleinvoices_no', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('sales_low_months', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('peak_season_comment', new FormControl(''));
|
||||
// }
|
||||
@ -578,6 +594,23 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.addControl('debitcredit_notes', new FormControl(''));
|
||||
this.debitcredit_notes='yes';
|
||||
}
|
||||
}
|
||||
selectedobservationChanges(event: any) {
|
||||
// console.log(this.lenderShortName);
|
||||
|
||||
|
||||
if (event == 'no') {
|
||||
this.loanDetailsForm.addControl('sampleinvoices_no', new FormControl(''));
|
||||
this.loanDetailsForm.removeControl('sampleinvoices_yes');
|
||||
this.sampleinvoices_no='no';
|
||||
this.sampleinvoices_yes='no';
|
||||
}
|
||||
else if (event == 'yes') {
|
||||
this.loanDetailsForm.addControl('sampleinvoices_yes', new FormControl(''));
|
||||
this.loanDetailsForm.removeControl('sampleinvoices_no');
|
||||
this.sampleinvoices_yes='yes';
|
||||
this.sampleinvoices_no='yes';
|
||||
}
|
||||
}
|
||||
peakseasonsChanges(event: any) {
|
||||
// console.log(this.lenderShortName);
|
||||
@ -997,6 +1030,16 @@ export class LoanDetailsComponent implements OnInit {
|
||||
records.average_invoicevalue = this.loanDetailsForm.controls['average_invoicevalue'].value;
|
||||
records.peakseasons_anchor = this.loanDetailsForm.controls['peakseasons_anchor'].value;
|
||||
records.anchor_notes = this.loanDetailsForm.controls['anchor_notes'].value;
|
||||
if(this.loanDetailsForm.controls['sample_invoices'].value=='yes')
|
||||
{
|
||||
records.sampleinvoices_yes = this.loanDetailsForm.controls['sampleinvoices_yes'].value;
|
||||
this.sampleinvoices_yes='yes';
|
||||
}
|
||||
else
|
||||
{
|
||||
records.sampleinvoices_no = this.loanDetailsForm.controls['sampleinvoices_no'].value;
|
||||
this.sampleinvoices_no='yes';
|
||||
}
|
||||
if(this.loanDetailsForm.controls['anchor_notes'].value=='yes')
|
||||
{
|
||||
records.debitcredit_notes = this.loanDetailsForm.controls['debitcredit_notes'].value;
|
||||
@ -1277,6 +1320,19 @@ export class LoanDetailsComponent implements OnInit {
|
||||
// this.m_stateList.filter(res => res.state_name.toLowerCase().indexOf(searchVal) > -1)
|
||||
// )
|
||||
}
|
||||
/** To Convert Month into Year */
|
||||
ConvertMonthintoYear(itemrow, e) {
|
||||
|
||||
let year = itemrow.controls.vintage_anchor_year.value;
|
||||
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
//loanDetailsForm.controls['vintage_anchor_year']
|
||||
this.loanDetailsForm.controls.vintage_anchor_year.setValue(+year + +Math.floor(converted_year));
|
||||
this.loanDetailsForm.controls.vintage_anchor_month.setValue(Math.floor(converted_month));
|
||||
|
||||
}
|
||||
|
||||
|
||||
addressSuggestion() {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user