SAL and Rental changes done
This commit is contained in:
parent
4c75468288
commit
6d31845961
@ -227,22 +227,22 @@
|
||||
<!-- <input matInput placeholder="Net Take Home"
|
||||
formControlName="net_take_home"> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'bank_transfer' || employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<input matInput placeholder="Amount paid through Bank"
|
||||
formControlName="amount_paid_through_bank" OnlyNumber type="text" autocomplete="off" (change)="ValidateNetSalary()">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_through_bank'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_through_bank.hasError('max')">Given Value is More than Net Salary</mat-error>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_through_bank.hasError('min')">Given Value is Less than Net Salary</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'paid_in_cash' || employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<input matInput placeholder="Amount paid in Cash"
|
||||
formControlName="amount_paid_in_cash" OnlyNumber type="text" autocomplete="off" (change)="ValidateNetSalary()">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('max')">Given Value is More than Net Salary</mat-error>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('min')">Given Value is Less than Net Salary</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 38%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0">
|
||||
<mat-select placeholder="Is the Amount is Validated or Not" formControlName="check_validated">
|
||||
<mat-form-field style="width: 38%">
|
||||
<mat-select placeholder="Is the Amount Validated or Not" formControlName="check_validated">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="validated">Validated</mat-option>
|
||||
<mat-option value="not validated">Not Validated</mat-option>
|
||||
|
||||
@ -35,7 +35,7 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
|
||||
pageTitle: string = "Employement Information";
|
||||
pageTitle: string = "Employment Information";
|
||||
parent_pdid: number;
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
@ -165,12 +165,16 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
|
||||
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary);
|
||||
this.employmentForm.controls['mode_of_getting_salary'].setValue(value.records.mode_of_getting_salary);
|
||||
if(value.records.mode_of_getting_salary == 'paid_in_cash' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
|
||||
this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
|
||||
}
|
||||
if(value.records.mode_of_getting_salary == 'bank_transfer' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
|
||||
this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
|
||||
}
|
||||
if(value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
|
||||
this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
|
||||
this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
|
||||
}
|
||||
// if(value.records.mode_of_getting_salary == 'paid_in_cash' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
|
||||
// this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
|
||||
// }
|
||||
// if(value.records.mode_of_getting_salary == 'bank_transfer' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
|
||||
// this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
|
||||
// }
|
||||
|
||||
this.employmentForm.controls['check_validated'].setValue(value.records.check_validated);
|
||||
this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated);
|
||||
@ -512,12 +516,13 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
|
||||
if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
|
||||
records.confirm_salary_amount = this.employmentForm.controls['confirm_salary_amount'].value;
|
||||
records.total_business_experience = this.employmentForm.controls['total_business_experience'].value;
|
||||
records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value;
|
||||
|
||||
}else if(this.employmentForm.controls['confirm_salary'].value == 'no'){
|
||||
records.sal_amount_was_not_confirmed = this.employmentForm.controls['sal_amount_was_not_confirmed'].value;
|
||||
|
||||
}
|
||||
records.total_business_experience = this.employmentForm.controls['total_business_experience'].value;
|
||||
records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value;
|
||||
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
|
||||
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
|
||||
records.from_date_the_salary_is_rcv = this.employmentForm.controls['from_date_the_salary_is_rcv'].value;
|
||||
@ -526,12 +531,16 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
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(this.employmentForm.controls['mode_of_getting_salary'].value == 'paid_in_cash' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
|
||||
if(this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
|
||||
records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value;
|
||||
}
|
||||
if(this.employmentForm.controls['mode_of_getting_salary'].value == 'bank_transfer' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
|
||||
records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
|
||||
}
|
||||
// if(this.employmentForm.controls['mode_of_getting_salary'].value == 'paid_in_cash' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
|
||||
// records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value;
|
||||
// }
|
||||
// if(this.employmentForm.controls['mode_of_getting_salary'].value == 'bank_transfer' || this.employmentForm.controls['mode_of_getting_salary'].value == '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;
|
||||
records.how_was_it_validated = this.employmentForm.controls['how_was_it_validated'].value;
|
||||
records.why_was_it_not_validated = this.employmentForm.controls['why_was_it_not_validated'].value;
|
||||
|
||||
@ -342,6 +342,8 @@
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
<!-- start tenant/lessees -->
|
||||
<div fxFlex="100" class="p-1">
|
||||
<h6 style="margin-top: 0px;color:#e00201;" class="pb-1">As per Applicant Questions</h6>
|
||||
<mat-form-field style="width:46%" appearance="outline">
|
||||
<mat-label>Is Name of the Tenant(s)/Lessees(s) of the Let out Property Provided ?</mat-label>
|
||||
<mat-select placeholder="" formControlName="tenant_lessees_options" (selectionChange)="generateTenantOptions(units.value,u)" required>
|
||||
@ -435,8 +437,10 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- end -->
|
||||
|
||||
</div>
|
||||
<!-- start rent agreement -->
|
||||
<div class="p-1" fxFlex="100" *ngIf="units.controls['rent_agreement_seen']">
|
||||
<h6 style="margin-top: 0px;color:#e00201;" class="pb-1">As per rent agreement Questions</h6>
|
||||
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['rent_agreement_seen']">
|
||||
<mat-label>Rent Agreement Seen</mat-label>
|
||||
<mat-select placeholder="" formControlName="rent_agreement_seen" (selectionChange)="generateRegisterOptions(units.value,u)" required>
|
||||
@ -542,8 +546,11 @@
|
||||
</mat-form-field>
|
||||
<!-- end -->
|
||||
<!-- end -->
|
||||
</div>
|
||||
|
||||
<!-- start met tenant/lessees-->
|
||||
<!-- start met tenant/lessees-->
|
||||
<div class="p-1" fxFlex="100">
|
||||
<h6 style="margin-top: 0px;color:#e00201;" class="pb-1">As per Tenant(s)/Lessee Met Questions </h6>
|
||||
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['met_tenant_lessees_options']">
|
||||
<mat-label>Tenant(s) / Lessee(s) Met During Visit of the Rented Property</mat-label>
|
||||
<mat-select placeholder="" formControlName="met_tenant_lessees_options" (selectionChange)="generateTenantMetDetails(units.value,u)" required>
|
||||
@ -641,15 +648,16 @@
|
||||
</mat-form-field>
|
||||
|
||||
<!-- start validate appplicant/agreement payment options -->
|
||||
<span *ngIf="units.controls['paid_monthly_rent_per_met'] && units.controls['payment_mode'] && units.controls['monthly_rent_amount'] && units.controls['payment_mode_per_met']">
|
||||
<mat-form-field style="width: 28.2rem !important;" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 "><!-- || units.value.payment_mode.id!=units.value.payment_mode_per_met.id -->
|
||||
<mat-label>What is the Reason for Difference in Rent Amount</mat-label><!-- or Mode of Payment -->
|
||||
<!-- <span *ngIf="units.controls['paid_monthly_rent_per_met'] && units.controls['payment_mode'] && units.controls['monthly_rent_amount'] && units.controls['payment_mode_per_met']">
|
||||
<mat-form-field style="width: 28.2rem !important;" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 ">
|
||||
<mat-label>What is the Reason for Difference in Rent Amount</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="" formControlName="payment_difference_per_met">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<!-- end -->
|
||||
</span> -->
|
||||
<!-- end -->
|
||||
|
||||
<!-- end met payment -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
@ -376,25 +376,29 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
element.amount_received_cash_per_met ? control.controls[index].addControl('amount_received_cash_per_met', new FormControl('')) : 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('')) : 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');
|
||||
(element.met_tenant_lessees_options=="1") ? control.controls[index].addControl('payment_difference_per_met', new FormControl('')) : control.controls[index].removeControl('payment_difference_per_met');
|
||||
// (element.met_tenant_lessees_options=="1") ? control.controls[index].addControl('payment_difference_per_met', new FormControl('')) : control.controls[index].removeControl('payment_difference_per_met');
|
||||
|
||||
if(element.payment_mode_per_met){
|
||||
|
||||
if(element.payment_mode_per_met.id == 3){
|
||||
this.ValidatedRentAmount(element,index,2);
|
||||
}
|
||||
|
||||
let ChildCtrl : any = control.controls[index];
|
||||
if(element.payment_mode_per_met.id == 1){
|
||||
// let ChildCtrl : any = control.controls[index];
|
||||
// if(element.payment_mode_per_met.id == 1){
|
||||
|
||||
ChildCtrl.controls['amount_received_cash_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]);
|
||||
ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity();
|
||||
}
|
||||
else if(element.payment_mode_per_met.id == 2){
|
||||
// ChildCtrl.controls['amount_received_cash_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]);
|
||||
// ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity();
|
||||
// }
|
||||
// else if(element.payment_mode_per_met.id == 2){
|
||||
|
||||
ChildCtrl.controls['amount_received_bank_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]);
|
||||
ChildCtrl.controls['amount_received_bank_per_met'].updateValueAndValidity();
|
||||
}
|
||||
else if(element.payment_mode_per_met.id == 3){
|
||||
// ChildCtrl.controls['amount_received_bank_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]);
|
||||
// ChildCtrl.controls['amount_received_bank_per_met'].updateValueAndValidity();
|
||||
// }
|
||||
// else if(element.payment_mode_per_met.id == 3){
|
||||
|
||||
this.ValidatedRentAmount(element,index,2);
|
||||
}
|
||||
// this.ValidatedRentAmount(element,index,2);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -449,12 +453,14 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
let monthlyrentamt : number = value.monthly_rent_amount ;
|
||||
|
||||
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,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)]));
|
||||
// control.controls[index].addControl('amount_received_cash', new FormControl(value.amount_received_cash ? value.amount_received_cash : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)]));
|
||||
control.controls[index].removeControl('amount_received_bank');
|
||||
control.controls[index].removeControl('amount_received_cash');
|
||||
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,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)]));
|
||||
// control.controls[index].addControl('amount_received_bank', new FormControl(value.amount_received_bank ? value.amount_received_bank : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)]));
|
||||
control.controls[index].removeControl('amount_received_bank');
|
||||
control.controls[index].removeControl('amount_received_cash');
|
||||
control.controls[index].removeControl('payment_received_reason');
|
||||
}
|
||||
@ -473,12 +479,14 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
let control: any = <FormArray>this._rentalForm.controls['property_unit_details'];
|
||||
let paidmonthlyrentamt : any = value.paid_monthly_rent_per_met ;
|
||||
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,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)]));
|
||||
// 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,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)]));
|
||||
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,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)]));
|
||||
// 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,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)]));
|
||||
control.controls[index].removeControl('amount_received_bank_per_met');
|
||||
control.controls[index].removeControl('amount_received_cash_per_met');
|
||||
control.controls[index].removeControl('payment_received_reason_per_met');
|
||||
}
|
||||
@ -492,15 +500,15 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
control.controls[index].removeControl('amount_received_bank_per_met');
|
||||
control.controls[index].removeControl('payment_received_reason_per_met');
|
||||
}
|
||||
let child = control.controls[index] as FormGroup;
|
||||
// let child = control.controls[index] as FormGroup;
|
||||
|
||||
if(child.controls.payment_difference_per_met){
|
||||
child.controls.payment_difference_per_met.setValue('');
|
||||
child.controls.payment_difference_per_met.updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
console.log('There is NO Control');
|
||||
}
|
||||
// if(child.controls.payment_difference_per_met){
|
||||
// child.controls.payment_difference_per_met.setValue('');
|
||||
// child.controls.payment_difference_per_met.updateValueAndValidity();
|
||||
// }
|
||||
// else{
|
||||
// console.log('There is NO Control');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -772,7 +780,7 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
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(''));
|
||||
|
||||
}
|
||||
else{
|
||||
@ -781,7 +789,7 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user