Changes : ps
This commit is contained in:
parent
abafc5ad3d
commit
7906b237c1
Binary file not shown.
@ -161,7 +161,11 @@
|
|||||||
<mat-form-field style="width:40%" *ngIf="detail.get('investments_type').value == 1">
|
<mat-form-field style="width:40%" *ngIf="detail.get('investments_type').value == 1">
|
||||||
<input matInput placeholder="Specify Type" formControlName="other_investments_type" autocomplete="off">
|
<input matInput placeholder="Specify Type" formControlName="other_investments_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:54%" *ngIf="detail.get('investments_type').value == 6 || detail.get('investments_type').value == 5 || detail.get('investments_type').value == 4">
|
||||||
|
<input matInput autocomplete="off" placeholder="Name of organisation in which investment done" formControlName="in_which_organisation">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:40%">
|
||||||
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||||
|
|
||||||
@ -227,7 +231,7 @@
|
|||||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5 || sup.get('assets_mode').value == 6" style="width:45%">
|
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:45%"><!-- 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5 || sup.get('assets_mode').value == 6" style="width:45%"> -->
|
||||||
<!-- <mat-select placeholder="Name of the Owner" formControlName="name_of_the_owner" >
|
<!-- <mat-select placeholder="Name of the Owner" formControlName="name_of_the_owner" >
|
||||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name | titlecase}}</mat-option>
|
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name | titlecase}}</mat-option>
|
||||||
</mat-select> -->
|
</mat-select> -->
|
||||||
|
|||||||
@ -44,19 +44,19 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
public m_any_asset_loan_type = [{'value': "yes",'viewValue': "Yes"},
|
public m_any_asset_loan_type = [{'value': "yes",'viewValue': "Yes"},
|
||||||
{'value': "no",'viewValue': "No"},
|
{'value': "no",'viewValue': "No"},
|
||||||
{'value': "nan",'viewValue': "NA"}]
|
{'value': "nan",'viewValue': "NA"}]
|
||||||
appxMarketAmtInwords : any = [];
|
// appxMarketAmtInwords : any = [];
|
||||||
OtherAppxMarketAmtInwords : any = [];
|
OtherAppxMarketAmtInwords : any = [];
|
||||||
emiAmtInwords : any = [];
|
// emiAmtInwords : any = [];
|
||||||
OtherEmiAmtInwords : any = [];
|
OtherEmiAmtInwords : any = [];
|
||||||
PremiumPaidInwords : any = [];
|
// PremiumPaidInwords : any = [];
|
||||||
OtherPremiumPaidInwords: any = [];
|
OtherPremiumPaidInwords: any = [];
|
||||||
SumAssuredInwords: any = [];
|
// SumAssuredInwords: any = [];
|
||||||
OtherSumAssuredInwords: any = [];
|
OtherSumAssuredInwords: any = [];
|
||||||
AmtInvestInwords: any = [];
|
// AmtInvestInwords: any = [];
|
||||||
OtherAmtInvestInwords: any = [];
|
OtherAmtInvestInwords: any = [];
|
||||||
AssetValueInwords: any = [];
|
// AssetValueInwords: any = [];
|
||||||
OtherAssetValueInwords: any = [];
|
OtherAssetValueInwords: any = [];
|
||||||
B_emiAmtInwords: any = [];
|
// B_emiAmtInwords: any = [];
|
||||||
O_emiAmtInwords: any = [];
|
O_emiAmtInwords: any = [];
|
||||||
|
|
||||||
public m_propertyType = [];
|
public m_propertyType = [];
|
||||||
@ -146,7 +146,8 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
getM_Assets_Type() {
|
getM_Assets_Type() {
|
||||||
this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe(
|
this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.m_assets_type = data.records.filter(data => data.isactive == 1 && data.id != 4);
|
this.m_assets_type = data.records.filter(data => data.isactive == 1 && data.id != 5
|
||||||
|
);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||||
@ -387,13 +388,13 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
otherBusinessAssetsDescription() {
|
// otherBusinessAssetsDescription() {
|
||||||
return this._formBuilder.group({
|
// return this._formBuilder.group({
|
||||||
any_other_assets: [''],
|
// any_other_assets: [''],
|
||||||
any_other_asset_value : [''],
|
// any_other_asset_value : [''],
|
||||||
any_other_asset_loan : [''],
|
// any_other_asset_loan : [''],
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
loadInsuranceDescription() {
|
loadInsuranceDescription() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
@ -411,7 +412,8 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
investments_type: [''],
|
investments_type: [''],
|
||||||
other_investments_type:[''],
|
other_investments_type:[''],
|
||||||
amount_of_invest: [''],
|
amount_of_invest: [''],
|
||||||
bank_name: ['']
|
bank_name: [''],
|
||||||
|
in_which_organisation:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,6 +491,7 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
investments_type: [data.investments_type],
|
investments_type: [data.investments_type],
|
||||||
other_investments_type : [data.other_investments_type],
|
other_investments_type : [data.other_investments_type],
|
||||||
amount_of_invest: [data.amount_of_invest],
|
amount_of_invest: [data.amount_of_invest],
|
||||||
|
in_which_organisation:[data.in_which_organisation],
|
||||||
bank_name: [data.bank_name]
|
bank_name: [data.bank_name]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -522,22 +525,22 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initBusinessDetailsWithdata(data) {
|
// initBusinessDetailsWithdata(data) {
|
||||||
|
|
||||||
let formGroup= this._formBuilder.group({
|
// let formGroup= this._formBuilder.group({
|
||||||
business_assets_mode: [data.business_assets_mode],
|
// business_assets_mode: [data.business_assets_mode],
|
||||||
business_details: this._formBuilder.array([]),
|
// business_details: this._formBuilder.array([]),
|
||||||
business_approximate_market_value: [data.business_approximate_market_value],
|
// business_approximate_market_value: [data.business_approximate_market_value],
|
||||||
business_name_of_the_owner: [data.business_name_of_the_owner],
|
// business_name_of_the_owner: [data.business_name_of_the_owner],
|
||||||
business_name_of_the_other_owner:[data.business_name_of_the_other_owner || ''],
|
// business_name_of_the_other_owner:[data.business_name_of_the_other_owner || ''],
|
||||||
// relation: [data.relation || ''],
|
// // relation: [data.relation || ''],
|
||||||
business_vintage: [data. business_vintage],
|
// business_vintage: [data. business_vintage],
|
||||||
business_purchase_year: [data. business_purchase_year,Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
// business_purchase_year: [data. business_purchase_year,Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||||
// purchase_month: [data.purchase_month],
|
// // purchase_month: [data.purchase_month],
|
||||||
business_emi: [data.business_emi || 0],
|
// business_emi: [data.business_emi || 0],
|
||||||
});
|
// });
|
||||||
return formGroup;
|
// return formGroup;
|
||||||
}
|
// }
|
||||||
|
|
||||||
loadDetails: boolean;
|
loadDetails: boolean;
|
||||||
addAssetsDetailsWithData(supp_data) {
|
addAssetsDetailsWithData(supp_data) {
|
||||||
@ -654,6 +657,7 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
|
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
|
||||||
array_data = { 'investments_type': datas.investments_type,
|
array_data = { 'investments_type': datas.investments_type,
|
||||||
'other_investments_type' : datas.other_investments_type,
|
'other_investments_type' : datas.other_investments_type,
|
||||||
|
'in_which_organisation' : datas.in_which_organisation,
|
||||||
'amount_of_invest': datas.amount_of_invest,
|
'amount_of_invest': datas.amount_of_invest,
|
||||||
'bank_name': datas.bank_name };
|
'bank_name': datas.bank_name };
|
||||||
});
|
});
|
||||||
@ -715,24 +719,17 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
// calculate vintage and purchase {}
|
// calculate vintage and purchase {}
|
||||||
calculateVintagePurchase(value: any, controlKey: any,type: number){
|
calculateVintagePurchase(value: any, controlKey: any,type: number){
|
||||||
if(type==1){
|
if(type==1){}
|
||||||
let control: any = <FormArray>this._assetsQuesFrom.controls['business_assets_details'];
|
else if(type==2) {}
|
||||||
control.controls[controlKey].controls['business_purchase_year'].setValue(value!='' ? parseInt(this.currentYear)-parseInt(value) : '');
|
else if(type==3){
|
||||||
}
|
|
||||||
else if(type==2) {
|
|
||||||
let control: any = <FormArray>this._assetsQuesFrom.controls['business_assets_details'];
|
|
||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
|
|
||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
|
|
||||||
}
|
|
||||||
else if(type==3){
|
|
||||||
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||||
control.controls[controlKey].controls['purchase_year'].setValue(value!='' ? parseInt(this.currentYear)-parseInt(value) : '');
|
control.controls[controlKey].controls['purchase_year'].setValue(value!='' ? parseInt(this.currentYear)-parseInt(value) : '');
|
||||||
}
|
}
|
||||||
else if(type==4) {
|
else if(type==4) {
|
||||||
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['purchase_year'].setValue(value) : control.controls[controlKey].controls['purchase_year'].setValue('');
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['purchase_year'].setValue(value) : control.controls[controlKey].controls['purchase_year'].setValue('');
|
||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['vintage_personal'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['vintage_personal'].setValue('')
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['vintage_personal'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['vintage_personal'].setValue('')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -798,14 +795,14 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(flag == 2){
|
// else if(flag == 2){
|
||||||
let BusinessElapsedValues;
|
// let BusinessElapsedValues;
|
||||||
|
|
||||||
if(details.value.business_original_loan_tenure != null && details.value.business_original_loan_tenure != '' && details.value.business_balance_tenure != null && details.value.business_balance_tenure != ''){
|
// if(details.value.business_original_loan_tenure != null && details.value.business_original_loan_tenure != '' && details.value.business_balance_tenure != null && details.value.business_balance_tenure != ''){
|
||||||
BusinessElapsedValues = details.value.business_original_loan_tenure - details.value.business_balance_tenure ;
|
// BusinessElapsedValues = details.value.business_original_loan_tenure - details.value.business_balance_tenure ;
|
||||||
details.controls['business_elapsed_tenure'].setValue(BusinessElapsedValues);
|
// details.controls['business_elapsed_tenure'].setValue(BusinessElapsedValues);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -813,43 +810,43 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
inWords(e,i,flag){
|
inWords(e,i,flag){
|
||||||
switch(flag){
|
switch(flag){
|
||||||
case 1 :
|
case 1 :
|
||||||
this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 2 :
|
case 2 :
|
||||||
this.OtherAppxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherAppxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 3 :
|
case 3 :
|
||||||
this.emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 4 :
|
case 4 :
|
||||||
this.OtherEmiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherEmiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 5 :
|
case 5 :
|
||||||
this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 6 :
|
case 6 :
|
||||||
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 7 :
|
case 7 :
|
||||||
this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 8 :
|
case 8 :
|
||||||
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 9 :
|
case 9 :
|
||||||
this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 10 :
|
case 10 :
|
||||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 11 :
|
case 11 :
|
||||||
this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 12 :
|
case 12 :
|
||||||
this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
// this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
this.O_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.O_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
@ -858,4 +855,20 @@ inWords(e,i,flag){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// {id: "4", name: "Equipments and machinaries", isactive: "1", flag: "1", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "7", name: "Investments", isactive: "1", flag: "0", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "5", name: "Jewellery", isactive: "1", flag: "0", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "6", name: "Life Insurance Policy", isactive: "1", flag: "0", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "2", name: "Property", isactive: "1", flag: "1", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "3", name: "Vehicle", isactive: "1", flag: "1", is_others: "0"}
|
||||||
|
|
||||||
|
// {id: "1", name: "Others", isactive: "1", flag: "1", is_others: "1"}
|
||||||
@ -49,7 +49,7 @@
|
|||||||
formControlName="shareholding">
|
formControlName="shareholding">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 45%;">
|
<mat-form-field style="width: 45%;">
|
||||||
<mat-select placeholder="Started Business" formControlName="started_business">
|
<mat-select placeholder="Started Business" formControlName="started_business" (selectionChange)="changeOfStartedBusiness(members,i,$event.value);">
|
||||||
<mat-option value="">Select</mat-option>
|
<mat-option value="">Select</mat-option>
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
@ -62,11 +62,12 @@
|
|||||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||||
|
|
||||||
<mat-form-field style="width: 20%;">
|
<mat-form-field style="width: 20%;">
|
||||||
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i,members)" >
|
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i,members)" [readonly]="isreadonlyyear[i]" >
|
||||||
<mat-hint style="color: red;">{{errorMessage[i]}}</mat-hint>
|
<mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 21%;">
|
<mat-form-field style="width: 21%;">
|
||||||
<input matInput placeholder="Month" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(members,$event.target.value)" autocomplete="off">
|
<input matInput placeholder="Month" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(members,$event.target.value,i)" autocomplete="off" [readonly]="isreadonlymonth[i]" >
|
||||||
|
<mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 35%;">
|
<mat-form-field style="width: 35%;">
|
||||||
<input matInput placeholder="Total Work Experience"
|
<input matInput placeholder="Total Work Experience"
|
||||||
@ -273,7 +274,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
|
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
|
||||||
<mat-label>Countries Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
|
<mat-label>Cities Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
|
||||||
<mat-select multiple placeholder="Cities" formControlName="city_name">
|
<mat-select multiple placeholder="Cities" formControlName="city_name">
|
||||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [value]="MCL.city_id">
|
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [value]="MCL.city_id">
|
||||||
{{MCL.city_name}}
|
{{MCL.city_name}}
|
||||||
|
|||||||
@ -67,10 +67,13 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
generalExistEntityType_other:string;
|
generalExistEntityType_other:string;
|
||||||
generalExistBusinessYear:Number;
|
generalExistBusinessYear:Number;
|
||||||
generalExistBusinessMonth:Number;
|
generalExistBusinessMonth:Number;
|
||||||
errorMessage: any = [];
|
yearErrorMessage: any = [];
|
||||||
|
monthErrorMessage: any = [];
|
||||||
errorMessageForExistTotalWorkExperience:any = [];
|
errorMessageForExistTotalWorkExperience:any = [];
|
||||||
ExportFlag: boolean = false;
|
ExportFlag: boolean = false;
|
||||||
appxSalaryAmtInwords: any;
|
appxSalaryAmtInwords: any;
|
||||||
|
isreadonlyyear:any = [];
|
||||||
|
isreadonlymonth:any = [];
|
||||||
|
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
@ -89,7 +92,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
this.generalExistEntityType = this.pd_all_details.business_entity_type;
|
this.generalExistEntityType = this.pd_all_details.business_entity_type;
|
||||||
this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other;
|
this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other;
|
||||||
this.generalExistBusinessYear = this.pd_all_details.business_years;
|
this.generalExistBusinessYear = this.pd_all_details.business_years;
|
||||||
|
this.generalExistBusinessMonth = this.pd_all_details.business_month;
|
||||||
}
|
}
|
||||||
public viewerOptions: any = {
|
public viewerOptions: any = {
|
||||||
navbar: false,
|
navbar: false,
|
||||||
@ -200,6 +203,9 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
businessVal.formid = this.form_id;
|
businessVal.formid = this.form_id;
|
||||||
businessVal.company_id = this.company_id;
|
businessVal.company_id = this.company_id;
|
||||||
businessVal.fk_createdby = this.pdid;
|
businessVal.fk_createdby = this.pdid;
|
||||||
|
if(businessVal.employees_appx_salary){
|
||||||
|
this.appxSalaryAmtInwords = this._pd.convertNumberToWords(businessVal.employees_appx_salary);
|
||||||
|
}
|
||||||
//businessVal.designation = DesgnArray;
|
//businessVal.designation = DesgnArray;
|
||||||
businessVal.partners = PartnrArray;
|
businessVal.partners = PartnrArray;
|
||||||
businessVal.documents = DocArray;
|
businessVal.documents = DocArray;
|
||||||
@ -1282,15 +1288,38 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** To Convert Month into Year */
|
/** To Convert Month into Year */
|
||||||
ConvertMonthintoYear(itemrow,e){
|
ConvertMonthintoYear(itemrow,e,i){
|
||||||
|
|
||||||
let year = itemrow.controls.current_business_experiance_year.value;
|
let year = itemrow.controls.current_business_experiance_year.value;
|
||||||
|
|
||||||
let converted_month : number = e%12;
|
let converted_month : number = e%12;
|
||||||
let converted_year : number = e/12;
|
let converted_year : number = e/12;
|
||||||
|
|
||||||
itemrow.controls.current_business_experiance_year.setValue(+year + +Math.floor(converted_year));
|
let Year = +year + +Math.floor(converted_year);
|
||||||
itemrow.controls.current_business_experiance_month.setValue(Math.floor(converted_month));
|
|
||||||
|
if(Year > this.generalExistBusinessYear){
|
||||||
|
this.yearErrorMessage[i] = "Higher than Business Vintage";
|
||||||
|
itemrow.controls.current_business_experiance_year.setValue('');
|
||||||
|
itemrow.controls.current_business_experiance_month.setValue('');
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(Year == this.generalExistBusinessYear && +converted_month > this.generalExistBusinessMonth)
|
||||||
|
{
|
||||||
|
this.monthErrorMessage[i] = "Higher than Business Vintage";
|
||||||
|
itemrow.controls.current_business_experiance_year.setValue('');
|
||||||
|
itemrow.controls.current_business_experiance_month.setValue('');
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.monthErrorMessage[i] = '';
|
||||||
|
this.yearErrorMessage[i] = '';
|
||||||
|
itemrow.controls.current_business_experiance_year.setValue(Year);
|
||||||
|
itemrow.controls.current_business_experiance_month.setValue(Math.floor(converted_month));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// itemrow.controls.current_business_experiance_year.setValue(+year + +Math.floor(converted_year));
|
||||||
|
// itemrow.controls.current_business_experiance_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1573,14 +1602,29 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
checkTotalEmployee(FormData){
|
checkTotalEmployee(FormData){
|
||||||
this.businessForm.controls['employees_total'].setValue((+FormData.value.employees_permanent ||0)+(+FormData.value.employees_temporary||0));
|
this.businessForm.controls['employees_total'].setValue((+FormData.value.employees_permanent ||0)+(+FormData.value.employees_temporary||0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeOfStartedBusiness(members,i,e){
|
||||||
|
if(e == 'yes'){
|
||||||
|
members.controls.current_business_experiance_year.setValue(this.generalExistBusinessYear);
|
||||||
|
this.isreadonlyyear[i] = this.generalExistBusinessYear != undefined ? true : false;
|
||||||
|
members.controls.current_business_experiance_month.setValue(this.generalExistBusinessMonth);
|
||||||
|
this.isreadonlymonth[i] = this.generalExistBusinessMonth != undefined ? true : false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.isreadonlyyear[i] =false;
|
||||||
|
this.isreadonlymonth[i] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
checkWithExistBusinessYear(e,i,members){
|
checkWithExistBusinessYear(e,i,members){
|
||||||
|
|
||||||
if(+e > this.generalExistBusinessYear){
|
if(+e > this.generalExistBusinessYear){
|
||||||
this.errorMessage[i] = "Higher than Business Vintage";
|
this.yearErrorMessage[i] = "Higher than Business Vintage";
|
||||||
members.controls.current_business_experiance_year.setValue('');
|
members.controls.current_business_experiance_year.setValue('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.errorMessage[i] = '';
|
this.yearErrorMessage[i] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' ? 'hidden':'visible'">
|
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' ? 'hidden':'visible'">
|
||||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
<input matInput placeholder="Qualification Details" formControlName="course_name" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
|
|||||||
@ -290,7 +290,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h5>Residence Details</h5>
|
<h5>Residence Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||||
<mat-form-field style="width:45%;">
|
<mat-form-field style="width:45%;">
|
||||||
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,ix)" >
|
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,ix)" >
|
||||||
<mat-option value="{{s.state_id}}" *ngFor="let s of stateData">
|
<mat-option value="{{s.state_id}}" *ngFor="let s of stateData">
|
||||||
@ -361,6 +361,7 @@
|
|||||||
<div formArrayName="family_members_details">
|
<div formArrayName="family_members_details">
|
||||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last " [formGroupName]="i">
|
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last " [formGroupName]="i">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
|
<h5>Address Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Name" formControlName="family_member_name" required>
|
<input matInput placeholder="Name" formControlName="family_member_name" required>
|
||||||
@ -373,7 +374,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Age" formControlName="family_member_age" required>
|
<input matInput placeholder="Age" formControlName="family_member_age" [readonly]="isReadOnly[i]">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -419,7 +420,7 @@
|
|||||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
|
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
|
||||||
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others">
|
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==2">
|
<mat-form-field *ngIf="item.get('non_earning_occupation').value==2" style="width:30%">
|
||||||
<input matInput placeholder="Specify School/College Name" formControlName="non_earning_if_schoolorcollege">
|
<input matInput placeholder="Specify School/College Name" formControlName="non_earning_if_schoolorcollege">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==3">
|
<mat-form-field *ngIf="item.get('non_earning_occupation').value==3">
|
||||||
@ -429,15 +430,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="removeFamilyMembers(i)"
|
<button type="button" mat-raised-button mat-icon-button (click)="removeFamilyMembers(ix,i)"
|
||||||
matTooltip="Delete Family Members" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
matTooltip="Delete Family Members" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="sup.controls.family_members_details.controls.length>1">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<button type="button" mat-flat-button (click)="addFamilyMembers(i)"
|
<button type="button" mat-flat-button (click)="addFamilyMembers(ix,i)"
|
||||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||||
<strong>Add More Family Members </strong>
|
<strong>Add More Family Members Of {{FamilyMemberAsLabel[ix]}} </strong>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
@ -567,15 +568,23 @@
|
|||||||
|
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
<mat-dialog-actions>
|
<mat-dialog-actions>
|
||||||
|
<!-- <div fxFlex="100" align="center">
|
||||||
|
|
||||||
|
</div> -->
|
||||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
<mat-label>Remarks</mat-label>
|
<mat-label>Remarks</mat-label>
|
||||||
<textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea>
|
<textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="40" align="end">
|
<div fxFlex="40" align="end">
|
||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Applicant Family Details" matTooltipPosition="above"
|
<!-- <button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="" matTooltipPosition="above"
|
||||||
class="mr-1 mb-1 hover-icon" (click)="addMoreApplicantFamilyDetails($event); false"><mat-icon>add</mat-icon></button>
|
class="mr-1 mb-1 hover-icon" ><mat-icon>add</mat-icon></button> -->
|
||||||
|
<button type="button" mat-flat-button (click)="addMoreApplicantFamilyDetails($event); false"
|
||||||
|
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||||
|
<strong>Add Family Details of Other Applicant </strong>
|
||||||
|
</button>
|
||||||
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button>
|
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|||||||
@ -297,10 +297,12 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
export class FamilyDetailsComponent implements OnInit {
|
export class FamilyDetailsComponent implements OnInit {
|
||||||
IncomePerMonth: any =[];
|
IncomePerMonth: any =[];
|
||||||
RentAmount: any = [];
|
RentAmount: any = [];
|
||||||
|
FamilyMemberAsLabel: any = [];
|
||||||
//@Input() pdid: number;
|
//@Input() pdid: number;
|
||||||
pageTitle: string = "Family Details";
|
pageTitle: string = "Family Details";
|
||||||
pdid: string;
|
pdid: string;
|
||||||
form_id: number;
|
form_id: number;
|
||||||
|
isReadOnly:any = [];
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
public familyForm: FormGroup;
|
public familyForm: FormGroup;
|
||||||
@ -377,6 +379,7 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
name:element.applicant_name,
|
name:element.applicant_name,
|
||||||
relationship:element.relationship,
|
relationship:element.relationship,
|
||||||
relation_to:element.relation_to,
|
relation_to:element.relation_to,
|
||||||
|
age:'',
|
||||||
data_gets_from:'GeneralForm'};
|
data_gets_from:'GeneralForm'};
|
||||||
});
|
});
|
||||||
// console.log('familyMembersGeneralForm',familyMembersGeneralForm);
|
// console.log('familyMembersGeneralForm',familyMembersGeneralForm);
|
||||||
@ -393,6 +396,7 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
name:element.family_member_name,
|
name:element.family_member_name,
|
||||||
relationship:element.other_family_relationship_id,
|
relationship:element.other_family_relationship_id,
|
||||||
relation_to:element.relation_to_id,
|
relation_to:element.relation_to_id,
|
||||||
|
age:'',
|
||||||
data_gets_from:'BusinessForm'};
|
data_gets_from:'BusinessForm'};
|
||||||
});
|
});
|
||||||
// console.log('familyMembersGeneralForm',familyMembersBusinessForm);
|
// console.log('familyMembersGeneralForm',familyMembersBusinessForm);
|
||||||
@ -623,24 +627,30 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
addMoreApplicantFamilyDetails(e): void {
|
addMoreApplicantFamilyDetails(e): void {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
this.initFamilyForm('chck');
|
this.initFamilyForm(null);
|
||||||
}
|
}
|
||||||
selectedPerson(e,inx){
|
selectedPerson(e,inx){
|
||||||
// console.log(e);
|
|
||||||
// console.log(this.apiFamilyMembers);
|
|
||||||
// return;
|
this.FamilyMemberAsLabel[inx] = this.selectPerson.filter(item => item.pd_co_applicant_id == e)[0].applicant_name;
|
||||||
|
|
||||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||||
|
|
||||||
if(this.apiFamilyMembers.length>0){
|
if(this.apiFamilyMembers.length>0){
|
||||||
let arraydata : any;
|
let arraydata : any;
|
||||||
let data = this.apiFamilyMembers.filter(item => item.relation_to == e);
|
let data = this.apiFamilyMembers.filter(item => item.relation_to == e);
|
||||||
|
|
||||||
if(data.length > 0){
|
if(data.length > 0){
|
||||||
data.forEach(val => {
|
data.forEach((val,inx) => {
|
||||||
|
if(val.age){
|
||||||
|
this.isReadOnly[inx] = true;
|
||||||
|
}else{
|
||||||
|
this.isReadOnly[inx] = false;
|
||||||
|
}
|
||||||
arraydata = {
|
arraydata = {
|
||||||
'family_member_name' : val.name,
|
'family_member_name' : val.name,
|
||||||
'family_member_relationship' : val.relationship,
|
'family_member_relationship' : val.relationship,
|
||||||
'family_member_age' : '',
|
'family_member_age' : val.age,
|
||||||
'family_member_earning_status': '',
|
'family_member_earning_status': '',
|
||||||
'earning_segment': '',
|
'earning_segment': '',
|
||||||
'earning_gross_income_per_month': '',
|
'earning_gross_income_per_month': '',
|
||||||
@ -654,7 +664,7 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
control.push(this.initgenerateFamilyMembersDetailsGet(arraydata));
|
control.push(this.initgenerateFamilyMembersDetailsGet(arraydata));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
control.push(this.generateFamilyMembersDetailsGet());
|
control.push(this.generateFamilyMembersDetailsGet());
|
||||||
@ -665,15 +675,16 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addFamilyMembers(inx) {
|
addFamilyMembers(inx,i) {
|
||||||
console.log(inx);
|
let mainControl = this.familyForm.get('family_details') as FormArray;
|
||||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
let control = mainControl.controls[inx].get('family_members_details') as FormArray;
|
||||||
control.push(this.generateFamilyMembersDetailsGet());
|
control.push(this.generateFamilyMembersDetailsGet());
|
||||||
}
|
}
|
||||||
|
|
||||||
removeFamilyMembers(index) {
|
removeFamilyMembers(inx,i) {
|
||||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][index].controls.family_members_details;
|
let mainControl = this.familyForm.get('family_details') as FormArray;
|
||||||
control.removeAt(index);
|
let control = mainControl.controls[inx].get('family_members_details') as FormArray;
|
||||||
|
control.removeAt(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -139,8 +139,8 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:45%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 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)">
|
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 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)" readonly>
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" readonly>
|
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}">
|
||||||
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
||||||
No difference in Profit sales % in FY <i> {{details.get('financial_year').value}} </i> over Profit sales % in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
No difference in Profit sales % in FY <i> {{details.get('financial_year').value}} </i> over Profit sales % in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -501,7 +501,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
if (salary != '' && profit != '') {
|
if (salary != '' && profit != '') {
|
||||||
if(+profit>+salary){
|
if(+profit>+salary){
|
||||||
alert("profit is greater than salary");
|
alert("profit is greater than salary");
|
||||||
detail.controls.financial_net_profit.setValue('');
|
detail.controls.financial_net_profit.setValue(0);
|
||||||
detail.controls.financial_margin_of_profit.setValue('');
|
detail.controls.financial_margin_of_profit.setValue('');
|
||||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||||
detail.controls.financial_variation.setValue('');
|
detail.controls.financial_variation.setValue('');
|
||||||
@ -521,7 +521,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
if (salary != '' && loss != '') {
|
if (salary != '' && loss != '') {
|
||||||
if(+loss>+salary){
|
if(+loss>+salary){
|
||||||
alert("Loss is greater than salary");
|
alert("Loss is greater than salary");
|
||||||
detail.controls.financial_net_loss.setValue('');
|
detail.controls.financial_net_loss.setValue(0);
|
||||||
detail.controls.financial_margin_of_loss.setValue('');
|
detail.controls.financial_margin_of_loss.setValue('');
|
||||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||||
detail.controls.financial_variation.setValue('');
|
detail.controls.financial_variation.setValue('');
|
||||||
@ -535,29 +535,28 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (((profit_margin != '' || profit_margin !== undefined) || (loss_margin != '' || loss_margin !== undefined) ) && index != 0) {
|
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
||||||
|
|
||||||
console.log('Current profit_margin',profit_margin);
|
|
||||||
|
|
||||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||||
let prev_profit_margin = array.value[index - 1].financial__margin_of_profit != '' ? array.value[index - 1].financial_margin_of_profit : 0;
|
let prev_profit_margin = array.value[index - 1].financial__margin_of_profit != '' ? array.value[index - 1].financial_margin_of_profit : 0;
|
||||||
let prev_loss_margin = array.value[index - 1].financial__margin_of_loss !='' ? array.value[index - 1].financial_margin_of_loss : 0 ;
|
let prev_loss_margin = array.value[index - 1].financial__margin_of_loss !='' ? array.value[index - 1].financial_margin_of_loss : 0 ;
|
||||||
|
|
||||||
|
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
||||||
|
prev_loss_margin = prev_loss_margin !== undefined ? prev_loss_margin : 0 ;
|
||||||
|
|
||||||
console.log('pre profit_margin',prev_profit_margin);
|
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
||||||
|
prev_profit_margin = prev_profit_margin !== undefined ? prev_profit_margin : 0 ;
|
||||||
|
|
||||||
|
let variation_percent : any ;
|
||||||
|
|
||||||
|
variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100;
|
||||||
|
|
||||||
loss_margin = loss_margin != 0 ? loss_margin : loss_margin;
|
// console.log((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ));
|
||||||
prev_loss_margin = prev_loss_margin != 0 ? prev_loss_margin : prev_loss_margin ;
|
// console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))));
|
||||||
|
// console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100);
|
||||||
|
|
||||||
console.log('Current loss_margin',loss_margin);
|
detail.controls.financial_profit_to_sale_variation.setValue(variation_percent != Infinity ? variation_percent.toFixed(2) : 0);
|
||||||
|
|
||||||
console.log('pre loss_margin',prev_loss_margin);
|
|
||||||
|
|
||||||
let variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100;
|
|
||||||
console.log((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ));
|
|
||||||
console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))));
|
|
||||||
console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100);
|
|
||||||
detail.controls.financial_profit_to_sale_variation.setValue(variation_percent.toFixed(2));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<ng-container matColumnDef="course_name">
|
<ng-container matColumnDef="course_name">
|
||||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' ? 'hidden':'visible'">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' ? 'hidden':'visible'">
|
||||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
<input matInput placeholder="Qualification Details" formControlName="course_name" autocomplete="off">
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="actions">
|
<ng-container matColumnDef="actions">
|
||||||
|
|||||||
@ -55,8 +55,9 @@ export class StockComponent implements OnInit {
|
|||||||
public submitted = false;
|
public submitted = false;
|
||||||
noRecordsFound: Boolean = false;
|
noRecordsFound: Boolean = false;
|
||||||
serviceProviderForm: Boolean = false;
|
serviceProviderForm: Boolean = false;
|
||||||
suppliers_raw_materials : any = [];
|
// suppliers_raw_materials : any = [];
|
||||||
suppliers_trade_details : any = [];
|
suppliers_retail_trade_details : any = [];
|
||||||
|
suppliers_wholesale_trade_details : any = [];
|
||||||
suppliers_finished_goods : any =[];
|
suppliers_finished_goods : any =[];
|
||||||
suppliers_service_product : any = [];
|
suppliers_service_product : any = [];
|
||||||
|
|
||||||
@ -193,19 +194,19 @@ export class StockComponent implements OnInit {
|
|||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
if (val.type_of_activity_id == 2) {
|
if (val.type_of_activity_id == 2) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_raw_materials = val.products;
|
this.suppliers_finished_goods = val.products;
|
||||||
this.initManufacturingDetails(null);
|
this.initManufacturingDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 3) {
|
if (val.type_of_activity_id == 3) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_finished_goods = val.products;
|
this.suppliers_retail_trade_details = val.products;
|
||||||
this.initRetailDetails(null);
|
this.initRetailDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 4) {
|
if (val.type_of_activity_id == 4) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_trade_details = val.products;
|
this.suppliers_wholesale_trade_details =val.products;
|
||||||
this.initTradingDetails(null);
|
this.initTradingDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,19 +237,19 @@ export class StockComponent implements OnInit {
|
|||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
if (val.type_of_activity_id == 2) {
|
if (val.type_of_activity_id == 2) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_raw_materials = val.products;
|
this.suppliers_finished_goods = val.products;
|
||||||
this.initManufacturingDetails(null);
|
this.initManufacturingDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 3) {
|
if (val.type_of_activity_id == 3) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_finished_goods = val.products;
|
this.suppliers_retail_trade_details= val.products;
|
||||||
this.initRetailDetails(null);
|
this.initRetailDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 4) {
|
if (val.type_of_activity_id == 4) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
this.suppliers_trade_details = val.products;
|
this.suppliers_wholesale_trade_details = val.products;
|
||||||
this.initTradingDetails(null);
|
this.initTradingDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,22 +325,22 @@ tradingFormCreation(val) {
|
|||||||
if(datas === null){
|
if(datas === null){
|
||||||
|
|
||||||
|
|
||||||
if(this.suppliers_raw_materials.length > 0){
|
// if(this.suppliers_raw_materials.length > 0){
|
||||||
this.suppliers_raw_materials.forEach(val => {
|
// this.suppliers_raw_materials.forEach(val => {
|
||||||
let Ref_RawMaterials : any = {'raw_name': val,
|
// let Ref_RawMaterials : any = {'raw_name': val,
|
||||||
'stock_observed':'',
|
// 'stock_observed':'',
|
||||||
'raw_quantity': '',
|
// 'raw_quantity': '',
|
||||||
'raw_uom': '',
|
// 'raw_uom': '',
|
||||||
'other_uom': '',
|
// 'other_uom': '',
|
||||||
'raw_value': '',
|
// 'raw_value': '',
|
||||||
'is_sufficiant_raw': '',
|
// 'is_sufficiant_raw': '',
|
||||||
'rawmaterial_remarks':''};
|
// 'rawmaterial_remarks':''};
|
||||||
rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
|
// rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
else{
|
// else{ }
|
||||||
rawMaterial.push(this.createRawmaterial(null));
|
rawMaterial.push(this.createRawmaterial(null));
|
||||||
}
|
|
||||||
if(this.suppliers_finished_goods.length > 0){
|
if(this.suppliers_finished_goods.length > 0){
|
||||||
// for (let val of this.suppliers_finished_goods) {
|
// for (let val of this.suppliers_finished_goods) {
|
||||||
this.suppliers_finished_goods.forEach(val => {
|
this.suppliers_finished_goods.forEach(val => {
|
||||||
@ -428,10 +429,10 @@ tradingFormCreation(val) {
|
|||||||
|
|
||||||
if(datas === null){
|
if(datas === null){
|
||||||
|
|
||||||
if(this.suppliers_trade_details.length > 0){
|
if(this.suppliers_retail_trade_details.length > 0){
|
||||||
this.rawMaterialAccess = true;
|
this.rawMaterialAccess = true;
|
||||||
|
|
||||||
this.suppliers_trade_details.forEach(val => {
|
this.suppliers_retail_trade_details.forEach(val => {
|
||||||
let Ref_Trade_Goods : any = {
|
let Ref_Trade_Goods : any = {
|
||||||
'traded_goods_name': val,
|
'traded_goods_name': val,
|
||||||
'traded_goods_observed': '',
|
'traded_goods_observed': '',
|
||||||
@ -527,9 +528,9 @@ tradingFormCreation(val) {
|
|||||||
if(datas === null){
|
if(datas === null){
|
||||||
|
|
||||||
|
|
||||||
if(this.suppliers_trade_details.length > 0){
|
if(this.suppliers_wholesale_trade_details.length > 0){
|
||||||
// for (let val of this.suppliers_trade_details) {
|
// for (let val of this.suppliers_trade_details) {
|
||||||
this.suppliers_trade_details.forEach(val => {
|
this.suppliers_wholesale_trade_details.forEach(val => {
|
||||||
let Ref_Trade_Goods : any = {
|
let Ref_Trade_Goods : any = {
|
||||||
'traded_goods_name': val,
|
'traded_goods_name': val,
|
||||||
'traded_goods_observed': '',
|
'traded_goods_observed': '',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user