changes:ps
This commit is contained in:
parent
6e377c6d3b
commit
12cfe21f25
BIN
ng6-seed/sineedge_prod_020219.zip
Normal file
BIN
ng6-seed/sineedge_prod_020219.zip
Normal file
Binary file not shown.
@ -57,7 +57,8 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<p style="margin-left: 2% !important" *ngIf='!EntityTypeFlag'>No of Years since formation of {{pageTitle}} </p>
|
||||
<p style="margin-left: 2% !important" *ngIf='!EntityTypeFlag'>No of Years in Current Business </p>
|
||||
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
|
||||
<mat-form-field style="width: 20%;">
|
||||
@ -69,8 +70,8 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput placeholder="Total Work Experience"
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required>
|
||||
<mat-hint style="color: red;" *ngIf="members.value.total_business_experiance != '' && members.value.current_business_experiance_year > members.value.total_business_experiance"> Total Experience is Lower Than The Current Company </mat-hint>
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required (change)="checkWithExistTotalWorkExperience($event.target.value,i,members)">
|
||||
<mat-hint style="color: red;">{{errorMessageForExistTotalWorkExperience[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined && !EntityTypeFlag">
|
||||
@ -207,11 +208,11 @@
|
||||
<mat-card-content formArrayName="manufacturing_activity_details">
|
||||
<mat-card *ngFor="let manufacturing of businessForm.controls.manufacturing_activity_details['controls']; let m=index;let mlast = last" [formGroupName]="m">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m)" required>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m);CheckExport($event.value,1);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -224,8 +225,8 @@
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="manufacturing.value.india_where_sale_done !=undefined && manufacturing.value.countries_where_export_done ==undefined">
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="manufacturing.value.india_where_sale_done !=undefined && manufacturing.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of manufacturing.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<!-- this is for other than pan india -->
|
||||
@ -317,8 +318,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined">
|
||||
</ng-container>
|
||||
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined">
|
||||
|
||||
<p>Within India </p>
|
||||
<div fxLayout="row nowrap" class="tab_class state-margin">
|
||||
@ -412,7 +413,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
@ -448,7 +449,7 @@
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r);CheckExport($event.value,2);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -687,7 +688,7 @@
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w);CheckExport($event.value,3);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -924,7 +925,7 @@
|
||||
<input matInput type="text" placeholder="Services Provided" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp);CheckExport($event.value,4);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -1172,8 +1173,8 @@
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card *ngIf="ExportFlag">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Export Sale As a % Total Sales</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
@ -1255,6 +1256,7 @@
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<div fxLayout="row nowrap">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Total"
|
||||
formControlName="employees_total" required>
|
||||
@ -1267,6 +1269,13 @@
|
||||
<input matInput placeholder="Temporary" (change)="checkTotalEmployee(businessForm)"
|
||||
formControlName="employees_temporary" required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:62%">
|
||||
<input matInput placeholder="Approximate total monthly salary paid to employees" (keyup)="inWords($event,1)"
|
||||
formControlName="employees_appx_salary" required type="number">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="businessForm.controls['employees_appx_salary'].value != ''">{{"₹"}} {{appxSalaryAmtInwords}} Only</mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
|
||||
@ -68,6 +68,9 @@ export class BusinessInfoComponent implements OnInit {
|
||||
generalExistBusinessYear:Number;
|
||||
generalExistBusinessMonth:Number;
|
||||
errorMessage: any = [];
|
||||
errorMessageForExistTotalWorkExperience:any = [];
|
||||
ExportFlag: boolean = false;
|
||||
appxSalaryAmtInwords: any;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
@ -568,7 +571,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
public initBusinessForm(): void {
|
||||
public initBusinessForm(): void {
|
||||
this.businessForm = this.fb.group({
|
||||
pdid: this.pdid,
|
||||
formid: this.form_id,
|
||||
@ -576,7 +579,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
fk_createdby: this.pdid,
|
||||
//industry: [''],
|
||||
seasonality: ['', Validators.compose([Validators.required])],
|
||||
export_sale_of_total_sales:[],
|
||||
export_sale_of_total_sales:[''],
|
||||
//month_of_business_run : [''],
|
||||
// peak_period_of_business : [''],
|
||||
//designation: this.fb.array([]),
|
||||
@ -584,6 +587,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
employees_total: ['', Validators.compose([Validators.required])],
|
||||
employees_permanent: ['', Validators.compose([Validators.required])],
|
||||
employees_temporary: ['', Validators.compose([Validators.required])],
|
||||
employees_appx_salary:['', Validators.compose([Validators.required])],
|
||||
officer_total: ['', Validators.compose([Validators.required])],
|
||||
// officer_permanent: ['', Validators.compose([Validators.required])],
|
||||
// officer_temporary: ['', Validators.compose([Validators.required])],
|
||||
@ -687,14 +691,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Export"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Both") {
|
||||
@ -789,7 +791,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Export"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
@ -1337,12 +1338,11 @@ export class BusinessInfoComponent implements OnInit {
|
||||
control2.controls['total_business_experiance'].clearValidators();
|
||||
control2.controls['total_business_experiance'].updateValueAndValidity();
|
||||
control2.controls['total_business_experiance'].setValue('');
|
||||
|
||||
control2.controls['total_business_previous_experience'].clearValidators();
|
||||
control2.controls['total_business_previous_experience'].updateValueAndValidity();
|
||||
control2.controls['total_business_previous_experience'].setValue('0');
|
||||
|
||||
|
||||
// if(control2.controls['total_business_previous_experience'].value !=undefined){
|
||||
// control2.controls['total_business_previous_experience'].clearValidators();
|
||||
// control2.controls['total_business_previous_experience'].updateValueAndValidity();
|
||||
// control2.controls['total_business_previous_experience'].setValue('0');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -1575,7 +1575,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
checkWithExistBusinessYear(e,i,members){
|
||||
|
||||
if(e > this.generalExistBusinessYear){
|
||||
if(+e > this.generalExistBusinessYear){
|
||||
this.errorMessage[i] = "Higher than Business Vintage";
|
||||
members.controls.current_business_experiance_year.setValue('');
|
||||
}
|
||||
@ -1584,4 +1584,76 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
checkWithExistTotalWorkExperience(e,i,members){
|
||||
|
||||
if(+members.value.current_business_experiance_year > +e){
|
||||
this.errorMessageForExistTotalWorkExperience[i] = "Total Experience is Lower Than Experience in The Current Company";
|
||||
members.controls.total_business_experiance.setValue('');
|
||||
}
|
||||
else{
|
||||
this.errorMessageForExistTotalWorkExperience[i] = '';
|
||||
}
|
||||
}
|
||||
// flag: number = 0;
|
||||
// CheckExport(e,val){
|
||||
// console.log(e);
|
||||
// console.log(val);
|
||||
// console.log(this.)
|
||||
// if(val == 1){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 2){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 3){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 4){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(this.flag > 0){
|
||||
// this.ExportFlag = true;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
CheckExport(e,val){
|
||||
console.log(e);
|
||||
console.log(val);
|
||||
let flag: number = 0;
|
||||
if(val == 1){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 2){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 3){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 4){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(flag > 0){
|
||||
this.ExportFlag = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inWords(e,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.appxSalaryAmtInwords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -47,19 +47,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="manufacturing_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -68,9 +74,18 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="manufacturing_credit_days">
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt</mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
@ -134,19 +149,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -156,9 +177,18 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="trade_product_credit_days">
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
@ -222,19 +252,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="service_provider_product_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -243,14 +279,23 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="service_provider_product_credit_days">
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="service_provider_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="service_provider_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.service_products.controls.length > 1" (click)="removeServiceProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@ -357,6 +357,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -370,6 +371,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -394,11 +396,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [''],
|
||||
trade_product_frequency_of_purchase: [''],
|
||||
trade_product_credit_days: [''],
|
||||
trade_product_credit_days_from: [''],
|
||||
trade_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -408,11 +412,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [records.trade_product_payment_type],
|
||||
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
|
||||
trade_product_credit_days: [records.trade_product_credit_days],
|
||||
trade_product_credit_days_from: [records.trade_product_credit_days_from],
|
||||
trade_product_credit_days_to: [records.trade_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -437,11 +443,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
service_provider_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [''],
|
||||
service_provider_product_frequency_of_purchase: [''],
|
||||
service_provider_product_credit_days: [''],
|
||||
service_provider_product_credit_days_from: [''],
|
||||
service_provider_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -451,11 +459,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [records.service_provider_product_payment_type],
|
||||
service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase],
|
||||
service_provider_product_credit_days: [records.service_provider_product_credit_days],
|
||||
service_provider_product_credit_days_from: [records.service_provider_product_credit_days_from],
|
||||
service_provider_product_credit_days_to: [records.service_provider_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -529,8 +539,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
data => {
|
||||
if (data.dataStatus) {
|
||||
if(type==1){
|
||||
this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
|
||||
|
||||
this.companyRelationShipList=data.records;// .filter(item => item.name != 'Others');
|
||||
}
|
||||
if(type==2){
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
|
||||
@ -22,13 +22,16 @@
|
||||
<input matInput placeholder="Name" formControlName="applicant_name" type="text" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%">
|
||||
<mat-select placeholder="Qualification" formControlName="qualification" style="width: 75%;">
|
||||
<mat-option *ngFor="let qual of qualificationList" [value]="qual.qualification_id">{{qual.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100%" fxFlex.sm="100%" fxFlex="45%">
|
||||
@ -50,7 +53,7 @@
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()"><mat-icon>add</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()" *ngIf="!EditFlag" ><mat-icon>add</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, OnInit, Input, Output, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
|
||||
import { PdTrigerService } from './../../../../../../pd-service/pd-triger.service';
|
||||
import { bool } from 'aws-sdk/clients/signer';
|
||||
|
||||
@Component({
|
||||
selector: 'app-other-applicant-details',
|
||||
@ -11,14 +12,33 @@ import { PdTrigerService } from './../../../../../../pd-service/pd-triger.servic
|
||||
export class OtherApplicantDetailsComponent implements OnInit {
|
||||
pageTitle: string ="Add Name of Person(s) Met and Individual Loan Applicant(s) ";
|
||||
public _OtherForm: FormGroup;
|
||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:''};
|
||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
|
||||
titleList: any=[];
|
||||
qualificationList: any=[];
|
||||
EditGeneralFormData: any=[];
|
||||
EditFlag: boolean = false;
|
||||
|
||||
constructor(private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) { }
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService,
|
||||
@Inject(MAT_DIALOG_DATA) public generalFormData : any,
|
||||
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
|
||||
if(generalFormData != ''){
|
||||
this.EditGeneralFormData = generalFormData.value;
|
||||
this.EditFlag = true;
|
||||
}
|
||||
console.log(this.EditGeneralFormData);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initFormDetails();
|
||||
|
||||
if(!this.EditFlag){
|
||||
console.log('init if',this.EditGeneralFormData);
|
||||
this.initFormDetails(null);
|
||||
}
|
||||
else{
|
||||
console.log('init else',this.EditGeneralFormData);
|
||||
this.initFormDetails(this.EditGeneralFormData);
|
||||
}
|
||||
this.getMasterDetails('TITLES',1);
|
||||
this.getMasterDetails('EDUQUALIFICATION',2);
|
||||
}
|
||||
@ -39,14 +59,25 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
// init form
|
||||
initFormDetails() {
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
||||
});
|
||||
}
|
||||
initFormDetails(data : any) {
|
||||
console.log('data',data);
|
||||
if(data == null){
|
||||
console.log('if data',data);
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
||||
});
|
||||
}
|
||||
else{
|
||||
console.log('else data',data);
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.updateApplicant(this.EditGeneralFormData)]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// create applicant form array
|
||||
createApplicant(elementValue:any){
|
||||
console.log("create applicants",elementValue);
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||
@ -54,7 +85,22 @@ createApplicant(elementValue:any){
|
||||
is_applicant:[false],
|
||||
is_person_met:[false],
|
||||
age:[''],
|
||||
qualification: ['']
|
||||
qualification: [''],
|
||||
course_name:['']
|
||||
});
|
||||
}
|
||||
|
||||
updateApplicant(elementValue:any){
|
||||
console.log("update applicants",elementValue);
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||
applicant_name:[elementValue.applicant_name,Validators.required],
|
||||
is_applicant:[elementValue.is_applicant ? true : false],
|
||||
is_person_met:[elementValue.is_person_met ? true : false],
|
||||
age:[elementValue.age || ''],
|
||||
qualification: [elementValue.qualification || ''],
|
||||
course_name:[elementValue.course_name || '']
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:60%">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' " >
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value == 0">
|
||||
No difference in Sales in FY <i> {{details.get('financial_year').value}} </i> over Sales in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
@ -105,7 +105,7 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_profit').value != ''">{{"₹"}} {{FY_netProfitAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" readonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
@ -115,14 +115,14 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_loss').value != ''">{{"₹"}} {{FY_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" reaonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >
|
||||
<span *ngIf="details.get('financial_variation').value == 0">
|
||||
No difference in Profit in FY <i> {{details.get('financial_year').value}} </i> over Profit in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
@ -140,7 +140,7 @@
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" readonly>
|
||||
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
||||
No difference in Profit sales % in FY <i> {{details.get('financial_year').value}} </i> over Profit sales % in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
</span>
|
||||
@ -206,7 +206,7 @@
|
||||
</mat-form-field>
|
||||
<!-- <span style="width:10%;padding-left:2%"><p>Average</p></span> -->
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Sales Average" formControlName="estimate_sales_average">
|
||||
<input matInput autocomplete="off" placeholder="Considered Sales Average" formControlName="estimate_sales_average" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_average').value != ''">{{"₹"}} {{AV_SalesInwords[i]}} Only</mat-hint>
|
||||
<!-- //{{"₹"}} {{AV_SalesInwords[i]}} Only -->
|
||||
</mat-form-field>
|
||||
@ -241,13 +241,13 @@
|
||||
</mat-form-field> -->
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit From" formControlName="estimate_profit_range_from" type="number" (change)="calculateMarginProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit From" formControlName="estimate_profit_range_from" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit To" formControlName="estimate_profit_range_to" type="number" (change)="calculateMarginProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit To" formControlName="estimate_profit_range_to" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -261,7 +261,7 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number">
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only ( {{details.get('estimate_net_profit_percent').value }} % )</mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
@ -278,7 +278,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Net Loss To" formControlName="estimate_loss_range_to" type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_loss_margin').value}} ) </mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
@ -293,7 +293,7 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number">
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}} {{AV_netLossAmtInwords[i]}} Only ( {{details.get('estimate_net_loss_percent').value }} % )</mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -205,6 +205,9 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** CREATING financial Statement ( financial_year AutoGenerate ) */
|
||||
createDate(date) {
|
||||
return this.fb.group({
|
||||
@ -436,10 +439,16 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
let profit = detail.value.financial_net_profit;
|
||||
let loss = detail.value.financial_net_loss;
|
||||
let salary = detail.value.financial_annual_sale;
|
||||
console.log('current profit',profit);
|
||||
console.log('current loss',loss);
|
||||
if ( (profit != '' || loss != '') && index != 0) {
|
||||
|
||||
if(+profit > +salary){
|
||||
|
||||
detail.controls.financial_margin_of_profit.setValue('');
|
||||
}
|
||||
else{
|
||||
|
||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
let prev_profit = array.value[index - 1].financial_net_profit != '' ? array.value[index - 1].financial_net_profit : 0;
|
||||
@ -456,7 +465,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||
|
||||
detail.controls.financial_variation.setValue(variation.toFixed(2));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -477,7 +486,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
* And calculating Variation over sales
|
||||
*/
|
||||
calMargin(index, detail) {
|
||||
|
||||
// In financial details section please add the following validation: Net profit/loss can not be > sales.
|
||||
let salary = detail.value.financial_annual_sale;
|
||||
let profit_margin;
|
||||
let loss_margin;
|
||||
@ -490,13 +499,17 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let profit = detail.value.financial_net_profit;
|
||||
|
||||
if (salary != '' && profit != '') {
|
||||
// if(salary < profit){
|
||||
// detail.controls.financial_margin_of_profit.setValue('');
|
||||
// }
|
||||
// else{
|
||||
if(+profit>+salary){
|
||||
alert("profit is greater than salary");
|
||||
detail.controls.financial_net_profit.setValue('');
|
||||
detail.controls.financial_margin_of_profit.setValue('');
|
||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||
detail.controls.financial_variation.setValue('');
|
||||
}
|
||||
else{
|
||||
profit_margin = (profit / salary) * 100;
|
||||
detail.controls.financial_margin_of_profit.setValue(profit_margin.toFixed(2));
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -506,16 +519,23 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let loss = detail.value.financial_net_loss;
|
||||
|
||||
if (salary != '' && loss != '') {
|
||||
|
||||
if(+loss>+salary){
|
||||
alert("Loss is greater than salary");
|
||||
detail.controls.financial_net_loss.setValue('');
|
||||
detail.controls.financial_margin_of_loss.setValue('');
|
||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||
detail.controls.financial_variation.setValue('');
|
||||
}
|
||||
else{
|
||||
loss_margin = (loss / salary) * 100 * (-1);
|
||||
detail.controls.financial_margin_of_loss.setValue(loss_margin.toFixed(2));
|
||||
// detail.controls.financial_margin.disable()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
||||
if (((profit_margin != '' || profit_margin !== undefined) || (loss_margin != '' || loss_margin !== undefined) ) && index != 0) {
|
||||
|
||||
console.log('Current profit_margin',profit_margin);
|
||||
|
||||
|
||||
@ -52,12 +52,25 @@
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="qualification_reason">
|
||||
<ng-container matColumnDef="course_name">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' ? 'hidden':'visible'">
|
||||
<input matInput [placeholder]="_generalForm.controls.individuals.value[i].qualification == 1 ? 'Specify Qualification ': 'Qualification Reason'" formControlName="qualification_reason" autocomplete="off">
|
||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||
matTooltip="Edit " matTooltipPosition="below">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i)"
|
||||
matTooltip="Remove Individuals" matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
|
||||
@ -24,7 +24,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
count : number = 1;
|
||||
private notifier: NotifierService;
|
||||
public _generalForm: FormGroup;
|
||||
displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','qualification_reason'];
|
||||
displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','course_name','actions'];
|
||||
public individualsSource= new MatTableDataSource();
|
||||
public relationSource= new MatTableDataSource();
|
||||
public CompanySource = new MatTableDataSource();
|
||||
@ -231,7 +231,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
element.individuals_order_id = key+1;
|
||||
element.age = '',
|
||||
element.qualification = '',
|
||||
element.qualification_reason = '',
|
||||
element.course_name = '',
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
//let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
@ -270,7 +270,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
age: [elementValue.age],
|
||||
qualification: [elementValue.qualification],
|
||||
qualification_reason:[elementValue.qualification_reason]
|
||||
course_name:[elementValue.course_name]
|
||||
});
|
||||
}
|
||||
createPersonsWithRelationships(elementValue:any){
|
||||
@ -349,7 +349,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// remove companies
|
||||
removeCompanies(indexValues) {
|
||||
this.count = this.count-1;
|
||||
// console.log('removed Count',this.count);
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control.controls[indexValues].controls.is_active.setValue(false);
|
||||
control.controls[indexValues].controls.company_name.clearValidators();
|
||||
@ -449,13 +448,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'relationship':'','relation_to':'','individuals_order_id':element.individuals_order_id};
|
||||
relationControl.push(this.createPersonsWithRelationships(applicant_details));
|
||||
|
||||
// let relationControl2 = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
// let applicant_details2: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'applicant_relation_to':'','relation':'','other_relation':'','company_name':'','company_relation':'','company_other_relation':'','individuals_order_id':element.individuals_order_id};
|
||||
// relationControl2.push(this.createApplicantRelation(applicant_details2));
|
||||
// let mulRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
|
||||
// mulRelationControl.push(this.createMultipleRelation(applicant_details))
|
||||
// let mulCmyRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_company_relation');
|
||||
// mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
|
||||
});
|
||||
|
||||
}
|
||||
@ -463,11 +455,27 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/** Popup for EDIT Individuals */
|
||||
editIndividuals(arr) {
|
||||
|
||||
console.log(arr);
|
||||
|
||||
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
|
||||
data: arr,
|
||||
width:'40%',
|
||||
disableClose: true
|
||||
});
|
||||
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
});
|
||||
}
|
||||
|
||||
// remove individuals
|
||||
removeIndividuals(findex,order_id){
|
||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
control.removeAt(findex);
|
||||
}
|
||||
removeIndividuals(findex){
|
||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
control.removeAt(findex);
|
||||
}
|
||||
|
||||
// update personal relation
|
||||
updatePersonalRelation(indexVal) {
|
||||
|
||||
@ -67,9 +67,22 @@
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 28%">
|
||||
<input matInput placeholder="End Use of Top Up" formControlName="end_use_topup" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 " >
|
||||
<mat-select placeholder="What is the End Use of the Top Up?"
|
||||
formControlName="end_use_topup" >
|
||||
<mat-option value=2>Business Use.</mat-option>
|
||||
<mat-option value=3>Child’s Marriage.</mat-option>
|
||||
<mat-option value=4>Furniture & Finishing of House Property.</mat-option>
|
||||
<mat-option value=5>Medical Expenses.</mat-option>
|
||||
<mat-option value=6>Paying Off Existing Loans.</mat-option>
|
||||
<mat-option value=1>Others.</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['end_use_topup'].value == 1" style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use of Top Up" formControlName="other_end_use_topup" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||
|
||||
|
||||
@ -138,13 +138,16 @@ export class LoanDetailsComponent implements OnInit {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
}
|
||||
})
|
||||
@ -204,9 +207,14 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if (value.records.topup_amount) {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
if(value.records.topup_amount > 0){
|
||||
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
if (value.records.end_use_topup == 1) {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].setValue(value.records.other_end_use_topup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
|
||||
|
||||
if (value.records.lender) {
|
||||
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
|
||||
@ -359,7 +367,8 @@ getM_sourceofamount() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.m_mortageTypeProperty
|
||||
// mortage_property_id">{{ typeprop.property_name
|
||||
console.log(this.m_mortageTypeProperty);
|
||||
}
|
||||
},
|
||||
@ -429,7 +438,8 @@ getM_sourceofamount() {
|
||||
//is_topup: [''],
|
||||
balance_transfer_amount: [''],
|
||||
topup_amount: [''],
|
||||
// end_use_topup:[''],
|
||||
end_use_topup:[''],
|
||||
other_end_use_topup:[''],
|
||||
lender: [''],
|
||||
other_bt_lender : [''],
|
||||
own_contribution: [''],
|
||||
@ -565,7 +575,15 @@ getM_sourceofamount() {
|
||||
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
||||
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
||||
// }
|
||||
// records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||
|
||||
if(records.topup_amount > 0){
|
||||
records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||
if(records.end_use_topup == 1){
|
||||
records.other_end_use_topup = this.loanDetailsForm.controls['other_end_use_topup'].value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
|
||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user