diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
index 38fabb3d4..2c5988782 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
@@ -35,7 +35,9 @@ export class AssetsInfoComponent implements OnInit {
public _assetsQuesFrom: FormGroup;
public submitted = false;
public m_assets_type = [];
-
+ public m_relation = [];
+ public applicants: any;
+
// public m_assets_type = [
// {
// 'id': "1",
@@ -168,6 +170,8 @@ public m_investmentType = [];
private pdTrigerService: PdTrigerService,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
+ this.applicants = this.pd_all_details.pdapplicants_detials;
+ this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.notifier = notifier;
}
@@ -181,6 +185,7 @@ public m_investmentType = [];
this.getM_PropertyType();
this.getM_InvestmentType();
this.getM_FreqOfPurchase();
+ this.getM_Relation();
//this.getM_InsuranceType();
}
@@ -222,7 +227,18 @@ public m_investmentType = [];
)
}
- getM_FreqOfPurchase() {
+ getM_Relation() {
+ this.pdTrigerService.getAllMasterDatas('RELATIONSHIPS').subscribe(
+ data => {
+ this.m_relation = data.records.filter(data => data.isactive == 1);
+ },
+ error => {
+ this.notifier.notify('warning', 'No Category Records Found.!');
+ }
+ )
+ }
+
+ getM_FreqOfPurchase() {
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
data => {
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
@@ -279,7 +295,7 @@ public m_investmentType = [];
assets_form_remark:[value.assets_form_remark || 'check']
});
this.addAssetsDetailsWithData(value.assets_details);
- this.addAssetsDetailsWithData2(value.business_assets_details);
+ this.addBusinessAssetsDetailsWithData(value.business_assets_details);
} else {
this._assetsQuesFrom = this._formBuilder.group({
pdid: [this.pdid],
@@ -288,7 +304,7 @@ public m_investmentType = [];
this.initDetails(),
]),
business_assets_details : this._formBuilder.array([
- this.initnewDetails(),
+ this.initBusinessDetails(),
]),
assets_form_remark:['']
});
@@ -310,6 +326,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]),
approximate_market_value: ['', Validators.compose([])],
name_of_the_owner: ['', Validators.compose([])],
+ other_owner:[''],
+ relation: [''],
// purchase_year: ['', Validators.compose([])],
//purchase_month: ['', Validators.compose([])],
emi: [''],
@@ -320,12 +338,14 @@ public m_investmentType = [];
});
}
- initnewDetails() {
+ initBusinessDetails() {
return this._formBuilder.group({
business_assets_mode: ['', Validators.compose([Validators.required])],
business_details: this._formBuilder.array([]),
business_approximate_market_value: ['', Validators.compose([])],
business_name_of_the_owner: ['', Validators.compose([])],
+ // other_owner:[''],
+ // relation:[''],
// purchase_year: ['', Validators.compose([])],
//purchase_month: ['', Validators.compose([])],
business_emi: [''],
@@ -544,6 +564,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]),
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
+ other_owner:[data.other_owner || ''],
+ relation: [data.relation || ''],
// purchase_year: [data.purchase_year, Validators.compose([])],
// purchase_month: [data.purchase_month, Validators.compose([])],
emi: [data.emi || 0],
@@ -553,12 +575,14 @@ public m_investmentType = [];
elapsed_tenure: [data.elapsed_tenure || '']
});
}
- initnewDetailsWithdata(data) {
+ initBusinessDetailsWithdata(data) {
return this._formBuilder.group({
business_assets_mode: [data.business_assets_mode, Validators.compose([Validators.required])],
business_details: this._formBuilder.array([]),
business_approximate_market_value: [data.business_approximate_market_value, Validators.compose([])],
business_name_of_the_owner: [data.business_name_of_the_owner, Validators.compose([])],
+ // other_owner:[data.other_owner || ''],
+ // relation: [data.relation || ''],
// purchase_year: [data.purchase_year, Validators.compose([])],
// purchase_month: [data.purchase_month, Validators.compose([])],
business_emi: [data.business_emi || 0],
@@ -580,6 +604,8 @@ public m_investmentType = [];
assets_mode: val.assets_mode,
approximate_market_value: val.approximate_market_value,
name_of_the_owner: val.name_of_the_owner,
+ other_owner:val.other_owner,
+ relation: val.relation,
// purchase_year: val.purchase_year,
// purchase_month: val.purchase_month,
emi: val.emi,
@@ -596,7 +622,7 @@ public m_investmentType = [];
this.loadDetails = true;
}
- addAssetsDetailsWithData2(supp_data) {
+ addBusinessAssetsDetailsWithData(supp_data) {
console.log(supp_data);
@@ -609,6 +635,8 @@ public m_investmentType = [];
business_assets_mode: val.business_assets_mode,
business_approximate_market_value: val.business_approximate_market_value,
business_name_of_the_owner: val.business_name_of_the_owner,
+ // other_owner: val.other_owner,
+ // relation : val.relation,
// purchase_year: val.purchase_year,
// purchase_month: val.purchase_month,
business_emi: val.business_emi,
@@ -622,7 +650,7 @@ public m_investmentType = [];
// this.setAssetsDetailsWithData(vals.business_assets_mode, val.details, control.length - 1)
const control =
this._assetsQuesFrom.controls['business_assets_details'];
- control.push(this.initnewDetailsWithdata(vals));
+ control.push(this.initBusinessDetailsWithdata(vals));
this.setAssetsDetailsWithData2(vals.business_assets_mode, val.business_details, control.length - 1)
}
}
@@ -745,7 +773,7 @@ public m_investmentType = [];
control.push(this.initDetails());
}else if(flag == 2){
const control = this._assetsQuesFrom.controls['business_assets_details'];
- control.push(this.initnewDetails());
+ control.push(this.initBusinessDetails());
}
}
removeLanguage(i: number,flag) {
@@ -839,8 +867,9 @@ public m_investmentType = [];
}
}
- loanCalc(details)
+ loanCalc(details ,flag)
{
+ if(flag == 1){
//console.log(details.value);
let ElapsedValues;
@@ -848,6 +877,15 @@ public m_investmentType = [];
ElapsedValues = details.value.original_loan_tenure - details.value.balance_tenure ;
details.controls['elapsed_tenure'].setValue(ElapsedValues);
}
+ }
+ else if(flag == 2){
+ 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 != ''){
+ BusinessElapsedValues = details.value.business_original_loan_tenure - details.value.business_balance_tenure ;
+ details.controls['business_elapsed_tenure'].setValue(BusinessElapsedValues);
+ }
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
index 1df3ba854..23fa1c544 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
@@ -18,7 +18,7 @@
-
+
Raw Materials
@@ -26,39 +26,50 @@
-
+
-
+
+ formControlName="stock_observed" required
+ (selectionChange)="RawMaterialValidation($event)">
Yes
No
-
-
+
+
-
+
{{uom.name}}
-
+
-
-
+
+
+ {{"₹"}} {{rawValueInWords}} Only
-
-
+
+
+
+ Yes
+ No
+
-
+
+ Please comment on the stock level observed?
+
+
+
+