merge: kms

This commit is contained in:
gandhimathi 2019-03-20 19:32:55 +05:30
parent 87acb19edf
commit 9ce8a35dd7
15 changed files with 454 additions and 179 deletions

View File

@ -18,8 +18,8 @@ export class PdStatusChangeDialogueComponent implements OnInit {
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{
this.notifier = notifier;
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions';
this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions';
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion';
this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion';
}
ngOnInit() {

View File

@ -302,7 +302,7 @@
</div>
<!--Desction Dynamic details : END -->
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5"
<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"
style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value"
OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,2)">

View File

@ -53,7 +53,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
public m_propertyType = [];
public m_address_type = [];
public m_vehicle_type = [];
public m_state_for_address = [];
public m_city_for_address = [];
public m_pincode_for_address = [];
public cityArr: any = [];
public pinArr: any = [];
PropertyOwnedType: any = [];
existCompanyList: any = [];
mergeCompanyApplicant: any = [];
@ -89,7 +93,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
/** init Function */
ngOnInit() {
console.clear();
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
// });
@ -115,12 +119,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
})
this.getM_State_For_Address();
this.getPdSupplierFormDetails();
this.getM_Assets_Type();
this.getM_PropertyType();
this.getM_Address_Type();
this.getM_Vehicle_Type();
this.getM_Address_Type();
}
getM_State_For_Address(){
this.pdTrigerService.getAllMasterDatas('STATE').subscribe(
data => {
this.m_state_for_address = data.records.filter(data => data.isactive == 1);
})
}
/** Assets Type For Dropdown List */
@ -164,7 +178,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.m_vehicle_type = data.records.filter(data => data.is_active == 1);
})
}
//Get Data Based on PDID and FORMID
apiLoadFinish: boolean = false;
getPdSupplierFormDetails() {
@ -197,39 +211,54 @@ export class BusinessAssetsInfoComponent implements OnInit {
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
if (data.records.addresses.length > 0) {
data.records.addresses.forEach((data, inx) => {
data.records.addresses.forEach((dataValue, inx) => {
this.addressLabel[inx] = '';
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.address_type)[0];
let address = data.address;
let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
let addressLabel = address + ' / ' + addressType;
let vals = {
address_label: addressLabel,
business_years: '',
business_month: '',
business_address_availability: '',
business_is_pd_visited: '',
business_pd_visited_remark: '',
business_approximate_market_value: '',
business_ownership_type: '',
business_monthly_rented_amt: '',
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
business_purchase_year: '',
business_emi: ''
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
this.pdTrigerService.getStateWiseCities(dataValue.state).subscribe(data => {
if (data.status == 200) {
// console.log(data.records);
this.cityArr = data.records.cities;
this.pinArr = data.records.pincode;
// console.log('cityArr',this.cityArr);
// console.log('pinArr',this.pinArr);
// console.log('flag',flag);
console.log('this.m_state_for_address',this.m_state_for_address);
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == dataValue.address_type)[0];
let selectedState = this.m_state_for_address.filter(element => element.state_id == dataValue.state)[0];
let selectedCity = this.cityArr.filter(element => element.city_id == dataValue.city)[0];
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
// console.log(selectedCity);
// console.log(selectedPincode);
// console.log(selectedCity[0].city_name);
// console.log(selectedPincode[0].pincode);
console.log('selectedState',selectedState);
let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others;
let address = dataValue.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode);
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
let addressLabel = address + ' / ' + addressType;
let vals = {
address_label: addressLabel,
business_years: '',
business_month: '',
business_address_availability: '',
business_is_pd_visited: '',
business_pd_visited_remark: '',
business_approximate_market_value: '',
business_ownership_type: '',
business_monthly_rented_amt: '',
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
business_purchase_year: '',
business_emi: ''
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
}
});
});
}
else {
@ -568,7 +597,14 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
for (let val of result) {
// for (let val of result) {
result.forEach((val, index) => {
var splitted_label = val.address_label.split("/", 2);
// console.log(splitted_label)
// console.log(splitted_label[0],splitted_label[1]);
let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type';
this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
let vals = {
address_label: val.address_label,
business_years: val.business_years,
@ -584,11 +620,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_vintage: val.business_vintage,
business_purchase_year: val.business_purchase_year,
business_emi: val.business_emi
};
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
// this.initBusinessDetailsWithdata(vals)
}
});
} else {
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetails());

View File

@ -96,7 +96,8 @@
</mat-form-field>
</div>
<div>
<label>Number of Years / Months since account was started</label>
<!-- <label>Number of Years / Months since account was started</label> -->
<label>Approximate Vintage of the Account</label>
<br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>

View File

@ -121,6 +121,34 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.getM_BTLenderList();
this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true;
this._pd.retriveForm({'pd_id':this.pdid,'pd_form_id':13,'company_id':this.company_id}).subscribe(data => {
// let businessVal = data.records;
// console.log('businessVal',businessVal,data.records.partners);
if (data.status == 200) {
let PartnrArray = Object.keys(data.records.partners).map(function (key) {
return data.records.partners[key];
});
console.log(PartnrArray);
console.log(data.records.partners);
PartnrArray.forEach((datas,index) => {
let sum1 = PartnrArray.map(officer => officer.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0);
// console.log('SumOfYear',SumOfYear);
// console.log('SumOfMonth',SumOfMonth);
});
// let SumOfYear = PartnrArray[index].Current_business_experiance_month.reduce((sum, val) => sum + +val, 0);
// let SumOfMonth = PartnrArray[index].Current_business_experiance_year.reduce((sum, val) => sum + +val, 0);
// let SumOfYear = month.reduce((sum, val) => sum + +val, 0);
// let SumOfMonth = year.reduce((sum, val) => sum + +val, 0);
let sum1 = PartnrArray.map(arr => arr.map(data => data.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0))
console.log('sum1',sum1);
}
});
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = '21';

View File

@ -126,18 +126,17 @@
</mat-form-field> -->
<div style="width:100%">
<mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Original Tenure in Months"
<input matInput autocomplete="off" placeholder="Original Tenture in Months" OnlyNumber type="text"
formControlName="original_tenure" (change)="checkTenure(details);calculateTenure(details)">
</mat-form-field>
<mat-form-field style="width:35%">
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months"
<input matInput autocomplete="off" placeholder="Current Balance Tenture in Months" OnlyNumber type="text"
formControlName="current_balance_tenure" (change)="calculateTenure(details)">
<mat-error>Invalid Balance Tenure.</mat-error>
<mat-error>Invalid Balance Tenture.</mat-error>
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
</mat-form-field>
<mat-form-field style="width:25%">
<input matInput placeholder="Elapsed Tenure in Months" readonly
formControlName="elapsed_tenure" autocomplete="off">
<input matInput placeholder="Elapsed Tenture in Months" readonly formControlName="elapsed_tenure">
</mat-form-field>
</div>

View File

@ -20,7 +20,7 @@
<div fxFlex="100">
<mat-card>
<mat-form-field style="width:17%">
<mat-form-field style="width:22%">
<!-- <input matInput> -->
<mat-select placeholder="Name of Employer" formControlName="employer_name" required>
<mat-option>Select</mat-option>
@ -28,6 +28,11 @@
cl.company_name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 90%" *ngIf="employmentForm.controls['employer_name'].value != ''" required>
<textarea matInput placeholder="Company Profile in brief" formControlName="employer_in_brief"></textarea>
</mat-form-field>
<div>
<label>Since how long working with this employer?</label>
<br>
@ -40,6 +45,17 @@
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month"
formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
</mat-form-field>
<mat-form-field style="width: 22%">
<input matInput placeholder="Total Work Experience" formControlName="total_business_experience"
OnlyNumber autocomplete="off" (change)="checkWorkingExperiences()">
<mat-hint style="color: red;" *ngIf="employmentForm.controls['total_business_experience'].value !=undefined && this.workExperienceErrorFlag">
Total working Experience is Lower
</mat-hint>
</mat-form-field>
<mat-form-field style="width: 34%" *ngIf="workExperienceFlag">
<input matInput placeholder="Previous Work Experience Details" formControlName="total_business_previous_experience">
</mat-form-field>
</div>
</div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
@ -49,8 +65,8 @@
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
<mat-form-field fxFlex="50">
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
<mat-form-field style="width: 45%">
<!-- <input matInput placeholder="Name of Person Met" formControlName="name_person_met" required> -->
<mat-select placeholder="Name of Person Met" formControlName="name_person_met"
required (selectionChange)="filtercompanyrelationship(employmentForm.controls['employer_name'].value,$event.value)">
@ -60,7 +76,7 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="50">
<mat-form-field style="width: 45%">
<input matInput placeholder="Designation of Person Met" formControlName="designation_person_met"
required>
<!-- <mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
@ -80,25 +96,16 @@
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
<mat-form-field fxFlex="50">
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
<mat-form-field style="width: 45%">
<input matInput placeholder="What is the salary amount confirmed?"
formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
formControlName="confirm_salary_amount" OnlyNumber type="text" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"&#8377;"}}
{{employmentForm.controls['confirm_salary_amount'].value | numberToWords}}
Only</mat-hint>
</mat-form-field>
<mat-form-field fxFlex="25">
<input matInput placeholder="Total Work Experience" formControlName="total_business_experience"
OnlyNumber autocomplete="off">
<mat-error *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">Higher</mat-error>
</mat-form-field>
<!-- *ngIf="employmentForm.controls['how_long_year'].value > employmentForm.controls['total_business_experience'].value" -->
<mat-form-field fxFlex="25" *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">
<input matInput placeholder="Previous Work Experience Details" formControlName="total_business_previous_experience">
</mat-form-field>
</div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Attendance register seen ?" formControlName="attendance_seen"
@ -123,71 +130,85 @@
<mat-card-content>
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-form-field style="width: 33%">
<input matInput placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv"
OnlyNumber type="number" min='1' max='31'>
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv"
OnlyNumber type="number" min='1' max='31'>
<div fxLayout="nowrap" style="padding-left: 2%; width: 100%">
<p>Date of Salary</p>
<mat-form-field style="width: 8%;">
<mat-select placeholder="From" formControlName="from_date_the_salary_is_rcv" (selectionChange)="formDate($event.value)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let date of dateonly" [value]="date.date" [disabled]="date.isdisabled">
{{date.date}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 8%">
<mat-select placeholder="To" formControlName="to_date_the_salary_is_rcv">
<mat-option>Select</mat-option>
<mat-option *ngFor="let date of todate" [value]="date.date" [disabled]="date.isdisabled">
{{date.date}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<!-- <mat-form-field style="width: 33%">
<mat-select placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv" (selectionChange)="formDate($event.value)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let date of dateonly" [value]="date.date" [disabled]="date.isdisabled">
{{date.date}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%"> -->
<!-- <input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv"
OnlyNumber min="1" maxlength="3" pattern="^$|^([0-3]|[0-9]|[3][1])?" >
<div *ngIf="employmentForm.controls['to_date_the_salary_is_rcv'].errors && (employmentForm.controls['to_date_the_salary_is_rcv'].dirty || employmentForm.controls['to_date_the_salary_is_rcv'].touched)">
Date should be between 1 to 31
</div> -->
<!-- <mat-select placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv">
<mat-option>Select</mat-option>
<mat-option *ngFor="let date of todate" [value]="date.date" [disabled]="date.isdisabled">
{{date.date}}
</mat-option>
</mat-select>
</mat-form-field> -->
<mat-form-field style="width: 33%">
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary"
(keypress)="keyPress($event)" required>
OnlyNumber type="text" autocomplete="off" required>
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['gross_monthly_salary'].value != ''">{{"&#8377;"}} {{employmentForm.controls['gross_monthly_salary'].value | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:33%">
<input matInput placeholder="Net Monthly Salary" formControlName="net_monthly_salary"
(keypress)="keyPress($event)" required>
OnlyNumber type="text" autocomplete="off" required>
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['net_monthly_salary'].value != ''">{{"&#8377;"}} {{employmentForm.controls['net_monthly_salary'].value | numberToWords}} Only</mat-hint>
<!-- <input matInput placeholder="Net Take Home"
formControlName="net_take_home"> -->
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"
(keypress)="keyPress($event)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['bonus_incentive'].value != ''">{{"&#8377;"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only</mat-hint>
<input matInput placeholder="Amount paid in Cash"
formControlName="amount_paid_in_cash" OnlyNumber type="text" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != ''">{{"&#8377;"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 33%">
<mat-select placeholder="Amount paid in Cash ?" formControlName="amount_paid_in_cash">
<input matInput placeholder="Amount paid through Bank"
formControlName="amount_paid_through_bank" OnlyNumber type="text" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_through_bank'].value != ''">{{"&#8377;"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 33%" *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-option>Select</mat-option>
<mat-option value="validated">Validated</mat-option>
<mat-option value="not validated">Not Validated</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'validated'">
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0 && employmentForm.controls['check_validated'].value == 'validated'">
<input matInput placeholder="How was it Validated" formControlName="how_was_it_validated">
</mat-form-field>
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'not validated'">
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0 && employmentForm.controls['check_validated'].value == 'not validated'">
<input matInput placeholder="Why was it not Validated"
formControlName="why_was_it_not_validated">
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="Amount paid through Bank"
formControlName="amount_paid_through_bank">
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
<mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
<mat-option>Select</mat-option>
<mat-option *ngFor="let fd of frequency_data" [value]="fd.frequency_id">{{
fd.name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
<mat-select placeholder="Type of Bonus" formControlName="bonus_type">
<mat-option>Select</mat-option>
<mat-option value="fixed">Fixed</mat-option>
<mat-option value="variable depending on performance">Variable
depending on performance</mat-option>
<mat-option value="others">Others</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_type'].value == 'others'">
<input matInput placeholder="Bonus Type Others" formControlName="bonus_type_other">
</mat-form-field>
<mat-form-field style="width: 33%">
<mat-select placeholder="Any Delays" formControlName="any_delays">
<mat-option>Select</mat-option>
@ -197,6 +218,35 @@
<!-- <input matInput placeholder="Any Delays"
formControlName="any_delays"> -->
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"
OnlyNumber type="text" autocomplete="off" required>
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['bonus_incentive'].value != ''">{{"&#8377;"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
<mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
<mat-option>Select</mat-option>
<mat-option *ngFor="let fd of frequency_data" [value]="fd.frequency_id">{{
fd.name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
<mat-select placeholder="Type of Bonus" formControlName="bonus_type">
<mat-option>Select</mat-option>
<mat-option value="fixed">Fixed</mat-option>
<mat-option value="variable depending on performance">Variable
depending on performance</mat-option>
<mat-option value="others">Others</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_type'].value == 'others'">
<input matInput placeholder="Bonus Type Others" formControlName="bonus_type_other">
</mat-form-field>
</div>
</div>
</mat-card-content>

View File

@ -38,6 +38,8 @@ export class EmploymentInfoComponent implements OnInit {
pdid: number;
form_id: number;
//pd_all_details:any;
workExperienceFlag: boolean = false;
workExperienceErrorFlag:boolean = false;
public employmentForm: FormGroup;
private notifier: NotifierService;
@ -48,6 +50,10 @@ export class EmploymentInfoComponent implements OnInit {
public company_related_applicants_list: any[];
public company_relationship_list: any[];
public filtered_company_relationship_list: any[];
public dateonly: any = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}];
public todate: any[] = this.dateonly;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -62,6 +68,7 @@ export class EmploymentInfoComponent implements OnInit {
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
}
public viewerOptions: any = {
navbar: false,
@ -106,8 +113,11 @@ export class EmploymentInfoComponent implements OnInit {
this._pd.retriveForm(params).subscribe(value => {
if (value.status == 200) {
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
this.employmentForm.controls['employer_in_brief'].setValue(value.records.employer_in_brief);
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
this.employmentForm.controls['how_long_month'].setValue(value.records.how_long_month);
this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience);
this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience);
this.employmentForm.controls['was_met'].setValue(value.records.was_met);
if (value.records.name_person_met) {
this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met);
@ -117,28 +127,34 @@ export class EmploymentInfoComponent implements OnInit {
}
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
if (value.records.confirm_salary_amount) {
this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount);
// this.employmentForm.controls['salary_from_date'].setValue(value.records.salary_from_date);
// this.employmentForm.controls['salary_to_date'].setValue(value.records.salary_to_date);
this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience);
this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience);
this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount);
}
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen);
this.employmentForm.controls['from_date_the_salary_is_rcv'].setValue(value.records.from_date_the_salary_is_rcv);
if(value.records.from_date_the_salary_is_rcv){
this.formDate(value.records.from_date_the_salary_is_rcv);
}
this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue(value.records.to_date_the_salary_is_rcv);
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['bonus_incentive'].setValue(value.records.bonus_incentive);
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);
this.employmentForm.controls['check_validated'].setValue(value.records.check_validated);
this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated);
this.employmentForm.controls['why_was_it_not_validated'].setValue(value.records.why_was_it_not_validated);
this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive);
this.employmentForm.controls['bonus_frequency'].setValue(value.records.bonus_frequency);
this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type);
this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other);
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
if(value.records.total_business_experience != ''){
this.checkWorkingExperiences();
// this.workExperienceFlag = (+value.records.total_business_previous_experience) < (+value.records.how_long_year) ? true : false;
}
}
})
/** For Bonus Frequency Dropdown */
@ -163,30 +179,32 @@ export class EmploymentInfoComponent implements OnInit {
public initemploymentForm(): void {
this.employmentForm = this.fb.group({
employer_name: ['', Validators.compose([Validators.required])],
employer_in_brief: ['', Validators.compose([Validators.required])],
how_long_year: ['', Validators.compose([Validators.required])],
how_long_month: [''],
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
name_person_met: [''],
designation_person_met: [''],
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
confirm_salary_amount: [''],
total_business_experience: [''],
total_business_previous_experience: [''],
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
from_date_the_salary_is_rcv: [''],
to_date_the_salary_is_rcv: [''],
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
name_person_met: [''],
designation_person_met: [''],
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
confirm_salary_amount: [''],
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
from_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])],
to_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])],
gross_monthly_salary: ['', Validators.compose([Validators.required])],
net_monthly_salary: ['', Validators.compose([Validators.required])],
bonus_incentive: ['', Validators.compose([Validators.required])],
amount_paid_in_cash: [''],
amount_paid_through_bank: [''],
check_validated:[''],
how_was_it_validated: [''],
why_was_it_not_validated: [''],
amount_paid_through_bank: [''],
any_delays: ['', Validators.compose([Validators.required])],
bonus_incentive: ['', Validators.compose([Validators.required])],
bonus_frequency: [''],
bonus_type: [''],
bonus_type_other: [''],
any_delays: ['', Validators.compose([Validators.required])],
// employment_details: this.fb.array([]),
employment_remarks: [''],
});
@ -217,15 +235,112 @@ export class EmploymentInfoComponent implements OnInit {
}
submitDetails() {
if(this.pd_cus_segment != 'SAL-CHQ'){
if(this.employmentForm.controls.was_met.value == 'no'){
this.employmentForm.controls.name_person_met.setValue('');
this.employmentForm.controls.name_person_met.clearValidators();
this.employmentForm.controls.name_person_met.updateValueAndValidity();
this.employmentForm.controls.designation_person_met.setValue('');
this.employmentForm.controls.designation_person_met.clearValidators();
this.employmentForm.controls.designation_person_met.updateValueAndValidity();
}
if(this.employmentForm.controls.confirm_salary.value == 'no'){
this.employmentForm.controls.confirm_salary_amount.setValue('');
this.employmentForm.controls.confirm_salary_amount.clearValidators();
this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity();
}
}
else if(this.pd_cus_segment == 'SAL-CHQ'){
this.employmentForm.controls.was_met.clearValidators();
this.employmentForm.controls.was_met.updateValueAndValidity();
this.employmentForm.controls.name_person_met.clearValidators();
this.employmentForm.controls.name_person_met.updateValueAndValidity();
this.employmentForm.controls.designation_person_met.clearValidators();
this.employmentForm.controls.designation_person_met.updateValueAndValidity();
this.employmentForm.controls.confirm_salary.clearValidators();
this.employmentForm.controls.confirm_salary.updateValueAndValidity();
this.employmentForm.controls.confirm_salary.clearValidators();
this.employmentForm.controls.confirm_salary.updateValueAndValidity();
this.employmentForm.controls.confirm_salary_amount.clearValidators();
this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity();
this.employmentForm.controls.attendance_seen.clearValidators();
this.employmentForm.controls.attendance_seen.updateValueAndValidity();
this.employmentForm.controls.sal_reg_seen.clearValidators();
this.employmentForm.controls.sal_reg_seen.updateValueAndValidity();
}
if(this.employmentForm.controls.amount_paid_in_cash.value != 0 && this.employmentForm.controls.amount_paid_in_cash.value != '' ){
if(this.employmentForm.controls.check_validated.value == 'validated'){
this.employmentForm.controls.why_was_it_not_validated.setValue('');
}
else if(this.employmentForm.controls.check_validated.value != 'validated'){
this.employmentForm.controls.how_was_it_validated.setValue('');
}
}
else{
this.employmentForm.controls.check_validated.setValue('')
this.employmentForm.controls.how_was_it_validated.setValue('')
this.employmentForm.controls.why_was_it_not_validated.setValue('')
}
this.employmentForm.controls.check_validated.updateValueAndValidity();
this.employmentForm.controls.how_was_it_validated.updateValueAndValidity();
this.employmentForm.controls.why_was_it_not_validated.updateValueAndValidity();
if(this.employmentForm.controls.bonus_incentive.value == 0){
this.employmentForm.controls.bonus_frequency.setValue('');
this.employmentForm.controls.bonus_frequency.updateValueAndValidity();
this.employmentForm.controls.bonus_type.setValue('');
this.employmentForm.controls.bonus_type.updateValueAndValidity();
this.employmentForm.controls.bonus_type_other.setValue('');
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
}
else{
if(this.employmentForm.controls.bonus_type.value == 'others'){
this.employmentForm.controls.bonus_type_other.setValidators([Validators.required]);
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
}
else if(this.employmentForm.controls.bonus_type.value != 'others'){
this.employmentForm.controls.bonus_type_other.setValue('');
this.employmentForm.controls.bonus_type_other.clearValidators();
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
}
}
if (!this.employmentForm.valid) {
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
return;
}
if(+this.employmentForm.controls.total_business_experience.value < +this.employmentForm.controls.how_long_year.value){
this.notifier.notify('warning', 'Total working Experience is Lower.!');
return;
}
let records: any = {};
records.pdid = this.pdid;
records.formid = this.form_id;
records.fk_createdby = this.pdid;
records.employer_name = this.employmentForm.controls['employer_name'].value;
records.employer_in_brief = this.employmentForm.controls['employer_in_brief'].value;
records.how_long_year = this.employmentForm.controls['how_long_year'].value;
records.how_long_month = this.employmentForm.controls['how_long_month'].value;
records.was_met = this.employmentForm.controls['was_met'].value;
@ -245,15 +360,20 @@ export class EmploymentInfoComponent implements OnInit {
records.to_date_the_salary_is_rcv = this.employmentForm.controls['to_date_the_salary_is_rcv'].value;
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
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;
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;
records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
records.any_delays = this.employmentForm.controls['any_delays'].value;
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
records.bonus_frequency = this.employmentForm.controls['bonus_frequency'].value;
records.bonus_type = this.employmentForm.controls['bonus_type'].value;
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;
records.any_delays = this.employmentForm.controls['any_delays'].value;
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
this._pd.saveForm(records).subscribe(data => {
@ -274,13 +394,48 @@ export class EmploymentInfoComponent implements OnInit {
})
}
/** On Key Press Event For Numbers */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
checkWorkingExperiences(){
// this.workExperienceErrorFlag = (+this.employmentForm.controls.total_business_experience.value ) <= (+this.employmentForm.controls.how_long_year.value) ? true : false;
// this.workExperienceFlag = (+this.employmentForm.controls.total_business_experience.value ) < (+this.employmentForm.controls.how_long_year.value) ? false : true;
if((+this.employmentForm.controls.total_business_experience.value ) < (+this.employmentForm.controls.how_long_year.value)){
console.log(+this.employmentForm.controls.total_business_experience.value , +this.employmentForm.controls.how_long_year.value);
this.workExperienceFlag = false;
this.workExperienceErrorFlag = true;
}
else{
this.workExperienceFlag = true;
this.workExperienceErrorFlag = false;
}
}
// keyPress(event: any) {
// const pattern = /[0-9]/;
// let inputChar = String.fromCharCode(event.charCode);
// if (event.keyCode != 8 && !pattern.test(inputChar)) {
// event.preventDefault();
// }
// }
formDate(value){
// console.log('to',this.todate)
// console.log(value);
// console.log('to length',this.todate.length);
// console.log('index',value-1);
// console.log('this.todate',this.todate[11]);
// console.log('this.todate',this.todate[11].isdisabled);
this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue('');
this.todate = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}];
var i ;
if(value != 0 && value != '')
for(i=0;i<=value-1;i++){
this.todate[i].isdisabled = true;
if(value == 31){
this.todate[30].isdisabled = false;
}
}
}
}

View File

@ -17,8 +17,7 @@
<mat-form-field style="width:50%;">
<mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type">
<mat-option>Select</mat-option>
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{
pm.description }}</mat-option>
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{pm.customer_behaviour_id == 1 ? 'Other Negative Behaviour': pm.description }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].value == 1">
@ -31,7 +30,7 @@
<mat-select placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option>Select</mat-option>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="well_suited">Well Suited</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>

View File

@ -177,17 +177,17 @@
OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' ">
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
No difference in Profit sales % in FY <i>
No difference in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i>
</span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value > 0"
class="greenhighlight">
Increase in Profit sales % in FY <i>
Increase in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b>
{{details.get('financial_profit_to_sale_variation').value}}
@ -195,9 +195,9 @@
</span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value < 0"
class="highlight">
Decrease in Profit sales % in FY <i>
Decrease in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b>
{{(details.get('financial_profit_to_sale_variation').value).replace('-',

View File

@ -1146,17 +1146,22 @@ export class FinancialInfoComponent implements OnInit {
details.controls.estimate_profit_margin_percent.setValue('');
return;
}
let profit_percent = (estimate_profit_range_to + estimate_profit_range_from)/2;
let Profit_Average = (profit_percent*sales_average)/100;
let difference = (estimate_profit_range_to - estimate_profit_range_from);
// console.log((+estimate_profit_range_to + estimate_profit_range_from));
// console.log((estimate_profit_range_to + estimate_profit_range_from)/2);
// let a = estimate_profit_range_from+estimate_profit_range_to ;
// let b = a/2;
// console.log(a,b);
let consi_profit_percent = (+estimate_profit_range_to + +estimate_profit_range_from)/2;
let Profit_Average = ((+consi_profit_percent)*(+sales_average))/100;
let difference = ((+estimate_profit_range_to) - (+estimate_profit_range_from));
if(difference > 3){
var r = confirm("Given Profit Percent Range is greater than 3");
if (r == true) {
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0);
details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2));
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
}else{
details.controls.estimate_profit_range_to.setValue('');
@ -1167,7 +1172,7 @@ export class FinancialInfoComponent implements OnInit {
}
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0);
details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2));
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
// details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
// details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
@ -1213,8 +1218,8 @@ export class FinancialInfoComponent implements OnInit {
return;
}
let C = (estimate_net_profit_to - estimate_net_profit_from)
let D = (C / estimate_net_profit_from) * 100;
let C = (+estimate_net_profit_to - +estimate_net_profit_from)
let D = (C / +estimate_net_profit_from) * 100;
let range1 = +estimate_net_profit_from/10;
@ -1225,7 +1230,7 @@ export class FinancialInfoComponent implements OnInit {
if(D >= 20){
var r = confirm("Given Profit Range is greater than 20%");
if (r == true) {
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0);
}else{
details.controls.estimate_net_profit_to.setValue('');
details.controls.estimate_net_profit.setValue('');
@ -1234,18 +1239,18 @@ export class FinancialInfoComponent implements OnInit {
}
}
else{
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0);
}
if(lower > higer){
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
let Profit_percent = (higer/sales_average)*100;
let Profit_percent = (higer/+sales_average)*100;
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
let Profit_percent = (lower/sales_average)*100;
let Profit_percent = (lower/+sales_average)*100;
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}
@ -1264,18 +1269,18 @@ export class FinancialInfoComponent implements OnInit {
}
}
else{
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0);
}
if(lower > higer){
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
let Profit_percent = (higer/sales_average)*100;
let Profit_percent = (higer/+sales_average)*100;
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
let Profit_percent = (lower/sales_average)*100;
let Profit_percent = (lower/+sales_average)*100;
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}
@ -1375,9 +1380,9 @@ export class FinancialInfoComponent implements OnInit {
return;
}
let loss_percent = (estimate_loss_range_to + estimate_loss_range_from)/2;
let loss_Average = (loss_percent*sales_average)/100;
let difference = (estimate_loss_range_to - estimate_loss_range_from)
let consi_loss_percent = (+estimate_loss_range_to + +estimate_loss_range_from)/2;
let loss_Average = (+consi_loss_percent*+sales_average)/100;
let difference = (+estimate_loss_range_to - +estimate_loss_range_from)
// details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
// details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
@ -1388,7 +1393,7 @@ export class FinancialInfoComponent implements OnInit {
var r = confirm("Given Loss Percent Range is greater than 3");
if (r == true) {
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
details.controls.estimate_loss_margin_percent.setValue(consi_loss_percent.toFixed(2));
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
}else{
@ -1400,7 +1405,7 @@ export class FinancialInfoComponent implements OnInit {
}
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
details.controls.estimate_loss_margin_percent.setValue(+consi_loss_percent.toFixed(2));
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
}
@ -1453,8 +1458,8 @@ export class FinancialInfoComponent implements OnInit {
// }
let C = (estimate_net_loss_to - estimate_net_loss_from)
let D = (C / estimate_net_loss_from) * 100;
let C = (+estimate_net_loss_to - +estimate_net_loss_from)
let D = (C / +estimate_net_loss_from) * 100;
let range1 = +estimate_net_loss_from/10;
@ -1465,7 +1470,7 @@ export class FinancialInfoComponent implements OnInit {
if(D >= 20){
var r = confirm("Given Profit Range is greater than 20%");
if (r == true) {
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? +estimate_net_loss_to:0);
}else{
details.controls.estimate_net_loss_to.setValue('');
@ -1475,18 +1480,18 @@ export class FinancialInfoComponent implements OnInit {
}
}
else{
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? +estimate_net_loss_to:0);
}
if(lower > higer){
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
let loss_percent = (higer/sales_average)*100;
let loss_percent = (higer/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
let loss_percent = (lower/sales_average)*100;
let loss_percent = (lower/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}
@ -1510,13 +1515,13 @@ export class FinancialInfoComponent implements OnInit {
if(lower > higer){
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
let loss_percent = (higer/sales_average)*100;
let loss_percent = (+higer/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
let loss_percent = (lower/sales_average)*100;
let loss_percent = (+lower/+sales_average)*100;
details.controls.estimate_net_profit_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}
@ -1539,13 +1544,13 @@ export class FinancialInfoComponent implements OnInit {
}
if(lower > higer){
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
let loss_percent = (higer/sales_average)*100;
let loss_percent = (higer/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
let loss_percent = (lower/sales_average)*100;
let loss_percent = (+lower/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}
@ -1555,13 +1560,13 @@ export class FinancialInfoComponent implements OnInit {
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
if(lower > higer){
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
let loss_percent = (higer/sales_average)*100;
let loss_percent = (+higer/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
}
else{
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
let loss_percent = (lower/sales_average)*100;
let loss_percent = (+lower/+sales_average)*100;
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
}

View File

@ -30,7 +30,7 @@
{{loanAmtInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-label>Loan Tenure applied for?</mat-label>
<mat-label>Loan Tenture applied for?</mat-label>
<input matInput placeholder="No of months" formControlName="loan_tenure"
OnlyNumber type="text" autocomplete="off">
</mat-form-field>

View File

@ -111,6 +111,7 @@
<mat-option>Select</mat-option>
<mat-option value="Positive">Positive</mat-option>
<mat-option value="Negative">Negative</mat-option>
<mat-option value="Could not verify">Could not verify</mat-option>
</mat-select>
</mat-form-field>
</div>

View File

@ -34,7 +34,7 @@ export class NeighbourHoodComponent implements OnInit {
errorMessage:any;
finalRemarksList : any = [{'id': 1,'name': "Positive"},
{'id': 2,'name': "Negative"},
{'id': 3,'name': "Insufficient information provided"}];
{'id': 3,'name': "Could not verify"}];
existCompanyList: any =[];
mergeCompanyApplicant: any=[];
isOrganisationOwner: any=[];
@ -281,15 +281,15 @@ export class NeighbourHoodComponent implements OnInit {
if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == '' || nbhdChildCtrl.controls.did_not_know_the_business_operation.value == false){
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]);
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
// nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]);
// nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
nbhdChildCtrl.controls['how_long_do_know_in_year'].setValidators([Validators.required]);
nbhdChildCtrl.controls['how_long_do_know_in_year'].updateValueAndValidity();
}
else if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == true){
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValue('');
nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators();
// nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators();
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
nbhdChildCtrl.controls['how_long_do_know_in_year'].setValue('');
nbhdChildCtrl.controls['how_long_do_know_in_year'].clearValidators();
@ -387,7 +387,7 @@ export class NeighbourHoodComponent implements OnInit {
// saveRecords.check_type=formData.check_type;
saveRecords.pdid=formData.pdid;
saveRecords.formid=formData.formid;
saveRecords.neighbourhood_status = formData.check_type == 0 ? formData.neighbourhood_status : '';
saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : '';
saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark;
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
dataresult => {

View File

@ -134,7 +134,8 @@ export class StockComponent implements OnInit {
let type4 = record.from_business.filter(data => data.type_of_activity_id == 4);
let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0;
let rm_api = record.from_supplier;
let rm_api = record.from_supplier.hasOwnProperty("raw_material") ? record.from_supplier.raw_material : [];
console.log(rm_api);
let params: any = {};
params.pd_id = this.pdid;