{{
@@ -78,7 +77,7 @@
-
+
Select
@@ -341,11 +340,11 @@
Applicant's association vintage with the Anchor
+ OnlyNumber type="text" >
+ OnlyNumber type="text" (change)="ConvertMonthintoYear(loanDetailsForm,$event.target.value)">
@@ -461,11 +460,34 @@
autocomplete="off">
{{"₹"}} {{ loanDetailsForm.controls['stock_related_anchor'].value | numberToWords }} Only
-
Observations on Sample Invoices Required
+ -->
+
+
+ Select
+ Yes
+ No
+
+ Observations on Sample Invoices Required
+
+
+
+
+
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
index 5860ca434..0473dd950 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
@@ -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() {