diff --git a/ng6-seed/sineedge_prod_020219.zip b/ng6-seed/sineedge_prod_020219.zip
new file mode 100644
index 000000000..063398a44
Binary files /dev/null and b/ng6-seed/sineedge_prod_020219.zip differ
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
index 9931ba2db..076ad7106 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
@@ -57,7 +57,8 @@
-
No of Years since formation of {{pageTitle}}
+ No of Years in Current Business
+
@@ -69,8 +70,8 @@
- members.value.total_business_experiance"> Total Experience is Lower Than The Current Company
+ formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required (change)="checkWithExistTotalWorkExperience($event.target.value,i,members)">
+ {{errorMessageForExistTotalWorkExperience[i]}}
-
-
+
+
Within India
@@ -412,7 +413,7 @@
-
+
@@ -448,7 +449,7 @@
-
+
Within India
Export
Both
@@ -687,7 +688,7 @@
-
+
Within India
Export
Both
@@ -924,7 +925,7 @@
-
+
Within India
Export
Both
@@ -1172,8 +1173,8 @@
-
-
+
+
Export Sale As a % Total Sales
@@ -1255,6 +1256,7 @@
+
@@ -1267,6 +1269,13 @@
+
+
+
+ {{"₹"}} {{appxSalaryAmtInwords}} Only
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
index 118d9dffa..b435db587 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
@@ -68,6 +68,9 @@ export class BusinessInfoComponent implements OnInit {
generalExistBusinessYear:Number;
generalExistBusinessMonth:Number;
errorMessage: any = [];
+ errorMessageForExistTotalWorkExperience:any = [];
+ ExportFlag: boolean = false;
+ appxSalaryAmtInwords: any;
constructor(notifier: NotifierService,
private fb: FormBuilder,
@@ -568,7 +571,7 @@ export class BusinessInfoComponent implements OnInit {
}
- public initBusinessForm(): void {
+ public initBusinessForm(): void {
this.businessForm = this.fb.group({
pdid: this.pdid,
formid: this.form_id,
@@ -576,7 +579,7 @@ export class BusinessInfoComponent implements OnInit {
fk_createdby: this.pdid,
//industry: [''],
seasonality: ['', Validators.compose([Validators.required])],
- export_sale_of_total_sales:[],
+ export_sale_of_total_sales:[''],
//month_of_business_run : [''],
// peak_period_of_business : [''],
//designation: this.fb.array([]),
@@ -584,6 +587,7 @@ export class BusinessInfoComponent implements OnInit {
employees_total: ['', Validators.compose([Validators.required])],
employees_permanent: ['', Validators.compose([Validators.required])],
employees_temporary: ['', Validators.compose([Validators.required])],
+ employees_appx_salary:['', Validators.compose([Validators.required])],
officer_total: ['', Validators.compose([Validators.required])],
// officer_permanent: ['', Validators.compose([Validators.required])],
// officer_temporary: ['', Validators.compose([Validators.required])],
@@ -687,14 +691,12 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
-
}
else if(getDetails.value.area_of_sale=="Export"){
control.controls[getIndex].removeControl('countries_where_export_done');
control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('max_sale_state_name');
-
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
}
else if(getDetails.value.area_of_sale=="Both") {
@@ -789,7 +791,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
-
}
else if(getDetails.value.area_of_sale=="Export"){
control.controls[getIndex].removeControl('countries_where_export_done');
@@ -1337,12 +1338,11 @@ export class BusinessInfoComponent implements OnInit {
control2.controls['total_business_experiance'].clearValidators();
control2.controls['total_business_experiance'].updateValueAndValidity();
control2.controls['total_business_experiance'].setValue('');
-
- control2.controls['total_business_previous_experience'].clearValidators();
- control2.controls['total_business_previous_experience'].updateValueAndValidity();
- control2.controls['total_business_previous_experience'].setValue('0');
-
-
+ // if(control2.controls['total_business_previous_experience'].value !=undefined){
+ // control2.controls['total_business_previous_experience'].clearValidators();
+ // control2.controls['total_business_previous_experience'].updateValueAndValidity();
+ // control2.controls['total_business_previous_experience'].setValue('0');
+ // }
}
@@ -1575,7 +1575,7 @@ export class BusinessInfoComponent implements OnInit {
}
checkWithExistBusinessYear(e,i,members){
- if(e > this.generalExistBusinessYear){
+ if(+e > this.generalExistBusinessYear){
this.errorMessage[i] = "Higher than Business Vintage";
members.controls.current_business_experiance_year.setValue('');
}
@@ -1584,4 +1584,76 @@ export class BusinessInfoComponent implements OnInit {
}
}
+ checkWithExistTotalWorkExperience(e,i,members){
+
+ if(+members.value.current_business_experiance_year > +e){
+ this.errorMessageForExistTotalWorkExperience[i] = "Total Experience is Lower Than Experience in The Current Company";
+ members.controls.total_business_experiance.setValue('');
+ }
+ else{
+ this.errorMessageForExistTotalWorkExperience[i] = '';
+ }
+ }
+// flag: number = 0;
+// CheckExport(e,val){
+// console.log(e);
+// console.log(val);
+// console.log(this.)
+// if(val == 1){
+// e != "Within India" ?
+// this.flag++ :this.flag--;
+// }
+// if(val == 2){
+// e != "Within India" ?
+// this.flag++ :this.flag--;
+// }
+// if(val == 3){
+// e != "Within India" ?
+// this.flag++ :this.flag--;
+// }
+// if(val == 4){
+// e != "Within India" ?
+// this.flag++ :this.flag--;
+// }
+// if(this.flag > 0){
+// this.ExportFlag = true;
+// }
+
+// }
+
+ CheckExport(e,val){
+ console.log(e);
+ console.log(val);
+ let flag: number = 0;
+ if(val == 1){
+ e != "Within India" ?
+ flag++ :flag--;
+ }
+ if(val == 2){
+ e != "Within India" ?
+ flag++ :flag--;
+ }
+ if(val == 3){
+ e != "Within India" ?
+ flag++ :flag--;
+ }
+ if(val == 4){
+ e != "Within India" ?
+ flag++ :flag--;
+ }
+ if(flag > 0){
+ this.ExportFlag = true;
+ }
+
+ }
+
+ inWords(e,flag){
+ switch(flag){
+ case 1 :
+ this.appxSalaryAmtInwords = this._pd.convertNumberToWords(e.target.value);
+ break;
+ }
+ }
+
+
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
index ee4708563..92808407e 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
@@ -47,19 +47,25 @@
{{comrelShip.name}}
- Not Applicable
+
+
+
+
+ Enter Valid Mobile Number.
+ Enter Valid STD Code Number.
-
+ Enter Valid LandLine Number.
@@ -68,9 +74,18 @@
{{ pm.name }}
-
+
+
+
+ No. of Days of Credit Given for Payment Receipt
+
+
+
+
+
+
1" (click)="removeRawMaterials(l)">
@@ -134,19 +149,25 @@
{{comrelShip.name}}
- Not Applicable
+
+
+
+
+ Enter Valid Mobile Number.
+ Enter Valid STD Code Number.
-
+ Enter Valid LandLine Number.
@@ -156,9 +177,18 @@
{{ pm.name }}
-
+
+
+
+ No. of Days of Credit Given for Payment Receipt
+
+
+
+
+
+
1" (click)="removeTradingProduct(l)">
@@ -222,19 +252,25 @@
{{comrelShip.name}}
- Not Applicable
+
+
+
+
+ Enter Valid Mobile Number.
+ Enter Valid STD Code Number.
-
+ Enter Valid LandLine Number.
@@ -243,14 +279,23 @@
{{ pm.name }}
-
+
+
+
+ No. of Days of Credit Given for Payment Receipt
+
+
+
+
+
+
1" (click)="removeServiceProduct(l)">
delete
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
index 44cddd076..e3b5abf35 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
@@ -357,6 +357,7 @@ export class ClientInfoComponent implements OnInit {
person_designation:[''],
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[''],
})
} else {
return this._formBuilder.group({
@@ -370,6 +371,7 @@ export class ClientInfoComponent implements OnInit {
person_designation:[records.person_designation || null],
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[records.other_person_designation || null],
})
}
}
@@ -394,11 +396,13 @@ export class ClientInfoComponent implements OnInit {
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
trade_product_payment_type: [''],
trade_product_frequency_of_purchase: [''],
- trade_product_credit_days: [''],
+ trade_product_credit_days_from: [''],
+ trade_product_credit_days_to: [''],
person_title_name:[''],
person_designation:[''],
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[''],
})
} else {
return this._formBuilder.group({
@@ -408,11 +412,13 @@ export class ClientInfoComponent implements OnInit {
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
trade_product_payment_type: [records.trade_product_payment_type],
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
- trade_product_credit_days: [records.trade_product_credit_days],
+ trade_product_credit_days_from: [records.trade_product_credit_days_from],
+ trade_product_credit_days_to: [records.trade_product_credit_days_to],
person_title_name:[records.person_title_name || null],
person_designation:[records.person_designation || null],
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[records.other_person_designation || null],
})
}
}
@@ -437,11 +443,13 @@ export class ClientInfoComponent implements OnInit {
service_provider_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
service_provider_product_payment_type: [''],
service_provider_product_frequency_of_purchase: [''],
- service_provider_product_credit_days: [''],
+ service_provider_product_credit_days_from: [''],
+ service_provider_product_credit_days_to: [''],
person_title_name:[''],
person_designation:[''],
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[''],
})
} else {
return this._formBuilder.group({
@@ -451,11 +459,13 @@ export class ClientInfoComponent implements OnInit {
service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
service_provider_product_payment_type: [records.service_provider_product_payment_type],
service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase],
- service_provider_product_credit_days: [records.service_provider_product_credit_days],
+ service_provider_product_credit_days_from: [records.service_provider_product_credit_days_from],
+ service_provider_product_credit_days_to: [records.service_provider_product_credit_days_to],
person_title_name:[records.person_title_name || null],
person_designation:[records.person_designation || null],
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
+ other_person_designation:[records.other_person_designation || null],
})
}
}
@@ -529,8 +539,7 @@ export class ClientInfoComponent implements OnInit {
data => {
if (data.dataStatus) {
if(type==1){
- this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
-
+ this.companyRelationShipList=data.records;// .filter(item => item.name != 'Others');
}
if(type==2){
this.titleList=data.records.filter(val=>val.isactive==1);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html
index 4949b63ea..128a726a5 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html
@@ -22,13 +22,16 @@
-
+
{{qual.qualification_name}}
+
+
+
@@ -50,7 +53,7 @@
- add
+ add
save
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
index 21d668228..a6951b0ba 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, Output, Inject } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
import { PdTrigerService } from './../../../../../../pd-service/pd-triger.service';
+import { bool } from 'aws-sdk/clients/signer';
@Component({
selector: 'app-other-applicant-details',
@@ -11,14 +12,33 @@ import { PdTrigerService } from './../../../../../../pd-service/pd-triger.servic
export class OtherApplicantDetailsComponent implements OnInit {
pageTitle: string ="Add Name of Person(s) Met and Individual Loan Applicant(s) ";
public _OtherForm: FormGroup;
- applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:''};
+ applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
titleList: any=[];
qualificationList: any=[];
+ EditGeneralFormData: any=[];
+ EditFlag: boolean = false;
- constructor(private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef) { }
+ constructor(private _fb: FormBuilder,
+ private _pd: PdTrigerService,
+ @Inject(MAT_DIALOG_DATA) public generalFormData : any,
+ private dialogRef: MatDialogRef) {
+ if(generalFormData != ''){
+ this.EditGeneralFormData = generalFormData.value;
+ this.EditFlag = true;
+ }
+ console.log(this.EditGeneralFormData);
+ }
ngOnInit() {
- this.initFormDetails();
+
+ if(!this.EditFlag){
+ console.log('init if',this.EditGeneralFormData);
+ this.initFormDetails(null);
+ }
+ else{
+ console.log('init else',this.EditGeneralFormData);
+ this.initFormDetails(this.EditGeneralFormData);
+ }
this.getMasterDetails('TITLES',1);
this.getMasterDetails('EDUQUALIFICATION',2);
}
@@ -39,14 +59,25 @@ export class OtherApplicantDetailsComponent implements OnInit {
}
// init form
- initFormDetails() {
- this._OtherForm = this._fb.group({
- applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
- });
-}
+ initFormDetails(data : any) {
+ console.log('data',data);
+ if(data == null){
+ console.log('if data',data);
+ this._OtherForm = this._fb.group({
+ applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
+ });
+ }
+ else{
+ console.log('else data',data);
+ this._OtherForm = this._fb.group({
+ applicant_list: this._fb.array([this.updateApplicant(this.EditGeneralFormData)]),
+ });
+ }
+ }
// create applicant form array
createApplicant(elementValue:any){
+ console.log("create applicants",elementValue);
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
@@ -54,7 +85,22 @@ createApplicant(elementValue:any){
is_applicant:[false],
is_person_met:[false],
age:[''],
- qualification: ['']
+ qualification: [''],
+ course_name:['']
+});
+}
+
+updateApplicant(elementValue:any){
+ console.log("update applicants",elementValue);
+ return this._fb.group({
+ pd_co_applicant_id: [elementValue.pd_co_applicant_id],
+ applicant_title_name: [elementValue.applicant_title_name, Validators.required],
+ applicant_name:[elementValue.applicant_name,Validators.required],
+ is_applicant:[elementValue.is_applicant ? true : false],
+ is_person_met:[elementValue.is_person_met ? true : false],
+ age:[elementValue.age || ''],
+ qualification: [elementValue.qualification || ''],
+ course_name:[elementValue.course_name || '']
});
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
index fb9ea3aee..8cf81bdfd 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
@@ -73,7 +73,7 @@
-
+
No difference in Sales in FY {{details.get('financial_year').value}} over Sales in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
@@ -105,7 +105,7 @@
{{"₹"}} {{FY_netProfitAmtInwords[i]}} Only
-
+
@@ -115,14 +115,14 @@
{{"₹"}} {{FY_netLossAmtInwords[i]}} Only
-
+
- 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)">
+ 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)" readonly>
40) || (details.controls['financial_variation'].value < -40)}" >
No difference in Profit in FY {{details.get('financial_year').value}} over Profit in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
@@ -140,7 +140,7 @@
40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation" (keypress)="keyPress($event)">
- 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" >
+ 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" readonly>
No difference in Profit sales % in FY {{details.get('financial_year').value}} over Profit sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
@@ -206,7 +206,7 @@
-
+
{{"₹"}} {{AV_SalesInwords[i]}} Only
@@ -241,13 +241,13 @@
-->
-
+
-
+
-
+
{{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} )
@@ -261,7 +261,7 @@
{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only
-
+
{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only ( {{details.get('estimate_net_profit_percent').value }} % )
@@ -278,7 +278,7 @@
-
+
{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_loss_margin').value}} )
@@ -293,7 +293,7 @@
{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only
-
+
{{"₹"}} {{AV_netLossAmtInwords[i]}} Only ( {{details.get('estimate_net_loss_percent').value }} % )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
index 04a89acd0..561c98fe8 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
@@ -205,6 +205,9 @@ export class FinancialInfoComponent implements OnInit {
// }
+
+
+
/** CREATING financial Statement ( financial_year AutoGenerate ) */
createDate(date) {
return this.fb.group({
@@ -436,10 +439,16 @@ export class FinancialInfoComponent implements OnInit {
let profit = detail.value.financial_net_profit;
let loss = detail.value.financial_net_loss;
+ let salary = detail.value.financial_annual_sale;
console.log('current profit',profit);
console.log('current loss',loss);
if ( (profit != '' || loss != '') && index != 0) {
-
+ if(+profit > +salary){
+
+ detail.controls.financial_margin_of_profit.setValue('');
+ }
+ else{
+
let array = this.financialForm.controls['date_per_financial'];
let prev_profit = array.value[index - 1].financial_net_profit != '' ? array.value[index - 1].financial_net_profit : 0;
@@ -456,7 +465,7 @@ export class FinancialInfoComponent implements OnInit {
let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
detail.controls.financial_variation.setValue(variation.toFixed(2));
-
+ }
}
}
@@ -477,7 +486,7 @@ export class FinancialInfoComponent implements OnInit {
* And calculating Variation over sales
*/
calMargin(index, detail) {
-
+// In financial details section please add the following validation: Net profit/loss can not be > sales.
let salary = detail.value.financial_annual_sale;
let profit_margin;
let loss_margin;
@@ -490,13 +499,17 @@ export class FinancialInfoComponent implements OnInit {
let profit = detail.value.financial_net_profit;
if (salary != '' && profit != '') {
- // if(salary < profit){
- // detail.controls.financial_margin_of_profit.setValue('');
- // }
- // else{
+ if(+profit>+salary){
+ alert("profit is greater than salary");
+ detail.controls.financial_net_profit.setValue('');
+ detail.controls.financial_margin_of_profit.setValue('');
+ detail.controls.financial_profit_to_sale_variation.setValue('');
+ detail.controls.financial_variation.setValue('');
+ }
+ else{
profit_margin = (profit / salary) * 100;
detail.controls.financial_margin_of_profit.setValue(profit_margin.toFixed(2));
- // }
+ }
}
}
@@ -506,16 +519,23 @@ export class FinancialInfoComponent implements OnInit {
let loss = detail.value.financial_net_loss;
if (salary != '' && loss != '') {
-
+ if(+loss>+salary){
+ alert("Loss is greater than salary");
+ detail.controls.financial_net_loss.setValue('');
+ detail.controls.financial_margin_of_loss.setValue('');
+ detail.controls.financial_profit_to_sale_variation.setValue('');
+ detail.controls.financial_variation.setValue('');
+ }
+ else{
loss_margin = (loss / salary) * 100 * (-1);
detail.controls.financial_margin_of_loss.setValue(loss_margin.toFixed(2));
// detail.controls.financial_margin.disable()
-
+ }
}
}
- if ((profit_margin != '' || loss_margin != '') && index != 0) {
+ if (((profit_margin != '' || profit_margin !== undefined) || (loss_margin != '' || loss_margin !== undefined) ) && index != 0) {
console.log('Current profit_margin',profit_margin);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
index ed0dd4176..1e9f55740 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
@@ -52,12 +52,25 @@
-
+
-
+
+
+
+
+
+ edit
+
+
+ delete
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
index 7dda0a3e2..2bd7823f3 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
@@ -24,7 +24,7 @@ export class GeneralInfoComponent implements OnInit {
count : number = 1;
private notifier: NotifierService;
public _generalForm: FormGroup;
- displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','qualification_reason'];
+ displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','course_name','actions'];
public individualsSource= new MatTableDataSource();
public relationSource= new MatTableDataSource();
public CompanySource = new MatTableDataSource();
@@ -231,7 +231,7 @@ export class GeneralInfoComponent implements OnInit {
element.individuals_order_id = key+1;
element.age = '',
element.qualification = '',
- element.qualification_reason = '',
+ element.course_name = '',
individualsControl.push(this.createIndividulas(element));
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
//let relationControl = this._generalForm.controls['applicant_relation'];
@@ -270,7 +270,7 @@ export class GeneralInfoComponent implements OnInit {
individuals_order_id: [elementValue.individuals_order_id],
age: [elementValue.age],
qualification: [elementValue.qualification],
- qualification_reason:[elementValue.qualification_reason]
+ course_name:[elementValue.course_name]
});
}
createPersonsWithRelationships(elementValue:any){
@@ -349,7 +349,6 @@ export class GeneralInfoComponent implements OnInit {
// remove companies
removeCompanies(indexValues) {
this.count = this.count-1;
- // console.log('removed Count',this.count);
let control: any = this._generalForm.get('companies') as FormArray;
control.controls[indexValues].controls.is_active.setValue(false);
control.controls[indexValues].controls.company_name.clearValidators();
@@ -449,13 +448,6 @@ export class GeneralInfoComponent implements OnInit {
let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'relationship':'','relation_to':'','individuals_order_id':element.individuals_order_id};
relationControl.push(this.createPersonsWithRelationships(applicant_details));
- // let relationControl2 = this._generalForm.controls['applicant_relation'];
- // let applicant_details2: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'applicant_relation_to':'','relation':'','other_relation':'','company_name':'','company_relation':'','company_other_relation':'','individuals_order_id':element.individuals_order_id};
- // relationControl2.push(this.createApplicantRelation(applicant_details2));
- // let mulRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
- // mulRelationControl.push(this.createMultipleRelation(applicant_details))
- // let mulCmyRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_company_relation');
- // mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
});
}
@@ -463,11 +455,27 @@ export class GeneralInfoComponent implements OnInit {
}
+ /** Popup for EDIT Individuals */
+ editIndividuals(arr) {
+
+ console.log(arr);
+
+ const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
+ data: arr,
+ width:'40%',
+ disableClose: true
+ });
+
+ dialogRef.afterClosed()
+ .subscribe(dataresult => {
+ });
+ }
+
// remove individuals
- removeIndividuals(findex,order_id){
- let control = this._generalForm.controls['individuals'];
- control.removeAt(findex);
- }
+ removeIndividuals(findex){
+ let control = this._generalForm.controls['individuals'];
+ control.removeAt(findex);
+ }
// update personal relation
updatePersonalRelation(indexVal) {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
index 2d387e374..acf0e70e2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
@@ -67,9 +67,22 @@
{{"₹"}} {{topUpAmtInWords}} Only
-
+
+ 0 " >
+
+ Business Use.
+ Child’s Marriage.
+ Furniture & Finishing of House Property.
+ Medical Expenses.
+ Paying Off Existing Loans.
+ Others.
+
+
+
+
+
+
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 dfc8bb27e..02bbdf249 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
@@ -138,13 +138,16 @@ export class LoanDetailsComponent implements OnInit {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
+ this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
}
+
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
+
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
}
})
@@ -204,9 +207,14 @@ export class LoanDetailsComponent implements OnInit {
if (value.records.topup_amount) {
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
+ if(value.records.topup_amount > 0){
+ this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
+ if (value.records.end_use_topup == 1) {
+ this.loanDetailsForm.controls['other_end_use_topup'].setValue(value.records.other_end_use_topup);
+ }
+ }
}
-
- // this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
+
if (value.records.lender) {
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
@@ -359,7 +367,8 @@ getM_sourceofamount() {
}
}
});
-
+ this.m_mortageTypeProperty
+ // mortage_property_id">{{ typeprop.property_name
console.log(this.m_mortageTypeProperty);
}
},
@@ -429,7 +438,8 @@ getM_sourceofamount() {
//is_topup: [''],
balance_transfer_amount: [''],
topup_amount: [''],
- // end_use_topup:[''],
+ end_use_topup:[''],
+ other_end_use_topup:[''],
lender: [''],
other_bt_lender : [''],
own_contribution: [''],
@@ -565,7 +575,15 @@ getM_sourceofamount() {
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
// }
- // records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
+
+ if(records.topup_amount > 0){
+ records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
+ if(records.end_use_topup == 1){
+ records.other_end_use_topup = this.loanDetailsForm.controls['other_end_use_topup'].value;
+ }
+ }
+
+
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
records.lender = this.loanDetailsForm.controls['lender'].value;