From a23b2fab49e031e3f1c96494063203789ff483cc Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Sat, 4 Jan 2020 13:15:35 +0530 Subject: [PATCH] SAL and Rental changes done --- .../pd-question-emp-info.html | 8 ++--- .../pd-question-emp-info.ts | 32 ++++++++++++------- .../pd-question-rental-info.html | 15 ++++++--- .../pd-question-rental-info.ts | 26 ++++++++------- 4 files changed, 49 insertions(+), 32 deletions(-) diff --git a/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.html b/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.html index 0244e884..aad2881a 100755 --- a/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.html +++ b/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.html @@ -306,7 +306,7 @@ -
+
@@ -316,7 +316,7 @@
-
+
@@ -326,9 +326,9 @@
-
+
- + Select Validated Not Validated diff --git a/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.ts b/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.ts index a97ea6ba..cbbe264d 100755 --- a/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.ts +++ b/src/pages/pd-question/pd-question-emp-info/pd-question-emp-info.ts @@ -347,12 +347,16 @@ this.pd_value_params={pd_id:this.pdDetails.pd_id,form_id:this.FormId.form_id,com records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.mode_of_getting_salary = this.employmentForm.controls['mode_of_getting_salary'].value; - if(records.mode_of_getting_salary == 'paid_in_cash' || records.mode_of_getting_salary == 'both_bank_transfer_cash'){ - records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value; - } - if(records.mode_of_getting_salary == 'bank_transfer' || records.mode_of_getting_salary == 'both_bank_transfer_cash'){ - records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; - } + if(records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value; + records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; + } + // if(records.mode_of_getting_salary == 'paid_in_cash' || records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value; + // } + // if(records.mode_of_getting_salary == 'bank_transfer' || records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; + // } records.check_validated = this.employmentForm.controls['check_validated'].value; @@ -599,12 +603,16 @@ inWords(val,flag:number){ this.employmentForm.controls['gross_monthly_salary'].setValue(Emp.gross_monthly_salary); this.employmentForm.controls['net_monthly_salary'].setValue(Emp.net_monthly_salary); this.employmentForm.controls['mode_of_getting_salary'].setValue(Emp.mode_of_getting_salary); - if(Emp.mode_of_getting_salary == 'paid_in_cash' || Emp.mode_of_getting_salary == 'both_bank_transfer_cash'){ - this.employmentForm.controls['amount_paid_in_cash'].setValue(Emp.amount_paid_in_cash); - } - if(Emp.mode_of_getting_salary == 'bank_transfer' || Emp.mode_of_getting_salary == 'both_bank_transfer_cash'){ - this.employmentForm.controls['amount_paid_through_bank'].setValue(Emp.amount_paid_through_bank); - } + if(Emp.mode_of_getting_salary == 'both_bank_transfer_cash'){ + this.employmentForm.controls['amount_paid_in_cash'].setValue(Emp.amount_paid_in_cash); + this.employmentForm.controls['amount_paid_through_bank'].setValue(Emp.amount_paid_through_bank); + } + // if(Emp.mode_of_getting_salary == 'paid_in_cash' || Emp.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // this.employmentForm.controls['amount_paid_in_cash'].setValue(Emp.amount_paid_in_cash); + // } + // if(Emp.mode_of_getting_salary == 'bank_transfer' || Emp.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // this.employmentForm.controls['amount_paid_through_bank'].setValue(Emp.amount_paid_through_bank); + // } this.employmentForm.controls['check_validated'].setValue(Emp.check_validated); this.employmentForm.controls['how_was_it_validated'].setValue(Emp.how_was_it_validated); diff --git a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.html b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.html index dda31e6e..2de3660d 100755 --- a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.html +++ b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.html @@ -416,7 +416,7 @@ - +
@@ -430,6 +430,7 @@
+ As per Applicant Questions Name of the Tenant(s)/Lessees(s) of the Let out Property - +
+
+ As per rent agreement Questions Rent Agreement Seen Name of Tenants / Lessees as per Rent Agreement +
- +
+ As per Tenant(s)/Lessee Met Questions Tenant(s) / Lessee(s) Met During Visit of the Rented Property - + diff --git a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.ts b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.ts index 12fc3379..602f025e 100755 --- a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.ts +++ b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-info.ts @@ -411,13 +411,15 @@ addMoreUnitDetails(){ if(type==1){ let control: any = this.rentalForms.controls['property_unit_details']; if(value && value.payment_mode.id==1){ - control.controls[index].addControl('amount_received_cash', new FormControl(value.amount_received_cash ? value.amount_received_cash : '', Validators.required)); + // control.controls[index].addControl('amount_received_cash', new FormControl(value.amount_received_cash ? value.amount_received_cash : '', Validators.required)); + control.controls[index].removeControl('amount_received_cash'); control.controls[index].removeControl('amount_received_bank'); control.controls[index].removeControl('payment_received_reason'); } else if(value && value.payment_mode.id==2){ - control.controls[index].addControl('amount_received_bank', new FormControl(value.amount_received_bank ? value.amount_received_bank : '', Validators.required)); + // control.controls[index].addControl('amount_received_bank', new FormControl(value.amount_received_bank ? value.amount_received_bank : '', Validators.required)); control.controls[index].removeControl('amount_received_cash'); + control.controls[index].removeControl('amount_received_bank'); control.controls[index].removeControl('payment_received_reason'); } else if(value && value.payment_mode.id==3){ @@ -435,19 +437,21 @@ addMoreUnitDetails(){ else if(type==2){ let control: any = this.rentalForms.controls['property_unit_details']; console.log("controls",control.controls['index']) - if( control.controls[index].controls['payment_difference_per_met']){ - console.log("pay"); - control.controls[index].controls['payment_difference_per_met'].setValue('') - } + // if( control.controls[index].controls['payment_difference_per_met']){ + // console.log("pay"); + // control.controls[index].controls['payment_difference_per_met'].setValue('') + // } if(value && value.payment_mode_per_met.id==1){ - control.controls[index].addControl('amount_received_cash_per_met', new FormControl(value.amount_received_cash_per_met ? value.amount_received_cash_per_met : '', Validators.required)); + // control.controls[index].addControl('amount_received_cash_per_met', new FormControl(value.amount_received_cash_per_met ? value.amount_received_cash_per_met : '', Validators.required)); + control.controls[index].removeControl('amount_received_cash_per_met'); control.controls[index].removeControl('amount_received_bank_per_met'); control.controls[index].removeControl('payment_received_reason_per_met'); } else if(value && value.payment_mode_per_met.id==2){ - control.controls[index].addControl('amount_received_bank_per_met', new FormControl(value.amount_received_bank_per_met ? value.amount_received_bank_per_met : '', Validators.required)); + // control.controls[index].addControl('amount_received_bank_per_met', new FormControl(value.amount_received_bank_per_met ? value.amount_received_bank_per_met : '', Validators.required)); control.controls[index].removeControl('amount_received_cash_per_met'); + control.controls[index].removeControl('amount_received_bank_per_met'); control.controls[index].removeControl('payment_received_reason_per_met'); } else if(value && value.payment_mode_per_met.id==3){ @@ -701,7 +705,7 @@ generateTenantMetDetails(value: any, index: number){ control.controls[index].addControl('paid_monthly_rent_per_met', new FormControl('', Validators.required)); control.controls[index].addControl('period_of_stay_per_met', new FormControl('', Validators.required)); control.controls[index].addControl('payment_mode_per_met', new FormControl('', Validators.required)); - control.controls[index].addControl('payment_difference_per_met', new FormControl('')); + // control.controls[index].addControl('payment_difference_per_met', new FormControl('')); } @@ -711,7 +715,7 @@ generateTenantMetDetails(value: any, index: number){ control.controls[index].removeControl('paid_monthly_rent_per_met'); control.controls[index].removeControl('period_of_stay_per_met'); control.controls[index].removeControl('payment_mode_per_met'); - control.controls[index].removeControl('payment_difference_per_met'); + // control.controls[index].removeControl('payment_difference_per_met'); // remove other owner details @@ -1197,7 +1201,7 @@ this.spinner_access=true; element.amount_received_cash_per_met ? control.controls[index].addControl('amount_received_cash_per_met', new FormControl('', Validators.required)) : control.controls[index].removeControl('amount_received_cash_per_met'); element.amount_received_bank_per_met ? control.controls[index].addControl('amount_received_bank_per_met', new FormControl('', Validators.required)) : control.controls[index].removeControl('amount_received_bank_per_met'); element.payment_received_reason_per_met ? control.controls[index].addControl('payment_received_reason_per_met', new FormControl('', Validators.required)) : control.controls[index].removeControl('payment_received_reason_per_met'); - if( element.payment_difference_per_met =='' || element.payment_difference_per_met !='') { control.controls[index].addControl('payment_difference_per_met', new FormControl('')) } + // if( element.payment_difference_per_met =='' || element.payment_difference_per_met !='') { control.controls[index].addControl('payment_difference_per_met', new FormControl('')) } // control.controls[index].removeControl('payment_difference_per_met'); this.inWords(element.monthly_rent_amount != '' ? +element.monthly_rent_amount : '',index,5); this.inWords(element.amount_received_cash != '' ? +element.amount_received_cash : '',index,6);