merge : kms

This commit is contained in:
gandhimathi 2019-03-07 15:46:45 +05:30
parent 3e721b512c
commit eda5ed0846
47 changed files with 427 additions and 634 deletions

View File

@ -75,16 +75,13 @@
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 28%">
<mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id"> <mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id">
<mat-option> <mat-option>Select</mat-option>
Select
</mat-option>
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" > <mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
{{SPL.subproduct_name}} {{SPL.subproduct_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> -->

View File

@ -32,6 +32,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
subProductList: any; subProductList: any;
lenderList: any; lenderList: any;
lenderBranchList: any; lenderBranchList: any;
customerSegmentAllList: any;
customerSegmentList: any; customerSegmentList: any;
stateList: any = []; stateList: any = [];
cityList: any = []; cityList: any = [];
@ -136,7 +137,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._pd.getCustomersDetails().subscribe( this._pd.getCustomersDetails().subscribe(
data => { data => {
if (data.status == 200) { if (data.status == 200) {
this.customerSegmentList = data.records this.customerSegmentAllList = data.records
} }
}, error => this.errorMessage = <any>error); }, error => this.errorMessage = <any>error);
} }
@ -164,9 +165,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
//get sub product list based on prokduct id //get sub product list based on prokduct id
getSubproductList(productID: string) { getSubproductList(productID: string) {
console.log('productID',productID);
this.subProductList = this.productList.filter(item => item.product_id == productID); this.subProductList = this.productList.filter(item => item.product_id == productID);
this.subProductList = this.subProductList[0].subproducts; this.subProductList = this.subProductList[0].subproducts;
this.subProductList = this.subProductList.filter(item => item.is_others == 0); this.subProductList = this.subProductList.filter(item => item.is_others == 0);
this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
if(productID != '4'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue('')}
} }
@ -253,7 +257,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
coapplicant_name: [null, Validators.compose([Validators.required])], coapplicant_name: [null, Validators.compose([Validators.required])],
coapplicant_mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], coapplicant_mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
coapplicant_stdcode:[null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], coapplicant_stdcode:[null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
coapplicant_landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])], coapplicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
company_name:[null], company_name:[null],
relationship: [null], relationship: [null],
}); });
@ -341,8 +345,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]); this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
if(formValue.fk_product_id != '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]); this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
}
else{
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
}
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]); this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
@ -386,8 +395,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_product_id'].clearValidators(); this._PDtriggerForm.controls['fk_product_id'].clearValidators();
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
if(this._PDtriggerForm.controls.fk_product_id.value != '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators(); this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators();
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
}
else{
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
}
this._PDtriggerForm.controls['fk_pd_type'].clearValidators(); this._PDtriggerForm.controls['fk_pd_type'].clearValidators();
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
@ -473,7 +487,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"pd_contact_mobileno": formValue.lender_contact_mobile, "pd_contact_mobileno": formValue.lender_contact_mobile,
"pd_contact_landline": lender_landline_no, "pd_contact_landline": lender_landline_no,
"fk_product_id": formValue.fk_product_id, "fk_product_id": formValue.fk_product_id,
"fk_subproduct_id": formValue.fk_subproduct_id, "fk_subproduct_id": formValue.fk_product_id != 4 ? formValue.fk_subproduct_id : '',
"fk_pd_type": formValue.fk_pd_type, "fk_pd_type": formValue.fk_pd_type,
"fk_customer_segment": formValue.fk_customer_segment, "fk_customer_segment": formValue.fk_customer_segment,
"loan_amount": formValue.loan_amount, "loan_amount": formValue.loan_amount,
@ -489,6 +503,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
var pd_applicant_details: any = []; var pd_applicant_details: any = [];
var addresses_details: any = [];
if (formValue.applicant_name) { if (formValue.applicant_name) {
pd_applicant_details.push({ pd_applicant_details.push({
"applicant_name": formValue.applicant_name, "applicant_name": formValue.applicant_name,
@ -529,6 +544,20 @@ export class AddPdComponent implements OnInit, OnDestroy {
pd_applicant_details.push(obj1) pd_applicant_details.push(obj1)
}); });
if (formValue.addresses.length > 0) {
formValue.addresses.forEach((addressElement, itemIndex) => {
let addressobj = {
"addressline1": addressElement.addressline1.toUpperCase(),
"fk_city": addressElement.fk_city,
"fk_state": addressElement.fk_state,
"pincode": addressElement.pincode,
"other_pincode": addressElement.other_pincode,
}
addresses_details.push(addressobj);
});
}
// docs details // docs details
let pd_form: FormData = new FormData(); let pd_form: FormData = new FormData();
@ -544,31 +573,21 @@ export class AddPdComponent implements OnInit, OnDestroy {
AllFilesObj.push(element.doc_name); AllFilesObj.push(element.doc_name);
}); });
pd_form.append("pd_details", JSON.stringify(pd_details)) pd_form.append("pd_details", JSON.stringify(pd_details))
if (pd_applicant_details.length > 0) { if (pd_applicant_details.length > 0) {
pd_form.append("pd_applicant_details", JSON.stringify(pd_applicant_details)) pd_form.append("pd_applicant_details", JSON.stringify(pd_applicant_details))
} }
if(addresses_details.length>0){
pd_form.append("addresses", JSON.stringify(addresses_details));
}
pd_form.append("pd_document_titles", JSON.stringify(AllFilesObj)) pd_form.append("pd_document_titles", JSON.stringify(AllFilesObj))
if (formValue.addtional_requirements.length > 0) { if (formValue.addtional_requirements.length > 0) {
pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements)) pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements))
} }
// formValue.addresses.forEach((addressElement, itemIndex) => {
// let addressobj = {
// "addressline": addressElement.addressline.toUpperCase(),
// "fk_city": addressElement.fk_city,
// "fk_state": addressElement.fk_state,
// "pincode": addressElement.pincode,
// "other_pincode": addressElement.other_pincode,
// }
// });
if (formValue.addresses.length > 0) {
pd_form.append("addresses", JSON.stringify(formValue.addresses))
}
this._pd.addPdDetails(pd_form).subscribe(result => { this._pd.addPdDetails(pd_form).subscribe(result => {
if (result.status == 200) { if (result.status == 200) {
this.disableAfterSubmit = false; this.disableAfterSubmit = false;

View File

@ -82,9 +82,9 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Lenderid"> <ng-container matColumnDef="Lenderid">
<mat-cell class="cell" *matCellDef="let details"> <mat-cell class="cell" *matCellDef="let details">
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span> <span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span>
<br> <br>
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span>
<br> <br>
<span *ngIf="details.loan_amount" class="fontsize"> <span *ngIf="details.loan_amount" class="fontsize">
<i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span> <i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>

View File

@ -78,8 +78,8 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Lenderid"> <ng-container matColumnDef="Lenderid">
<mat-cell class="cell" *matCellDef="let details"> <mat-cell class="cell" *matCellDef="let details">
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br> <span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br> <span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span> <span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -86,7 +86,8 @@
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 29%"> <!-- <mat-form-field style="width: 29%"> -->
<mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 29%">
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id"> <mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>

View File

@ -17,6 +17,7 @@ export class EditPdMasterComponent implements OnInit {
productList:any; productList:any;
subProductList:any; subProductList:any;
lenderList:any; lenderList:any;
customerSegmentAllList:any;
customerSegmentList:any; customerSegmentList:any;
stateList:any; stateList:any;
cityList:any = []; cityList:any = [];
@ -100,7 +101,6 @@ export class EditPdMasterComponent implements OnInit {
if(this.data.records.fk_product_id){ if(this.data.records.fk_product_id){
this.getSubproductList(this.data.records.fk_product_id); this.getSubproductList(this.data.records.fk_product_id);
} }
} }
}, error => this.errorMessage = <any> error); }, error => this.errorMessage = <any> error);
} }
@ -108,7 +108,7 @@ export class EditPdMasterComponent implements OnInit {
this._pd.getCustomersDetails().subscribe( this._pd.getCustomersDetails().subscribe(
data => { data => {
if (data.status == 200) { if (data.status == 200) {
this.customerSegmentList=data.records this.customerSegmentAllList=data.records
} }
}, error => this.errorMessage = <any> error); }, error => this.errorMessage = <any> error);
} }
@ -158,7 +158,6 @@ export class EditPdMasterComponent implements OnInit {
} }
} }
// let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id) // let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id)
// : this.data.records.pincode // : this.data.records.pincode
// : this.data.records.pincode; // : this.data.records.pincode;
@ -205,14 +204,19 @@ export class EditPdMasterComponent implements OnInit {
} }
this.getCityList(val.fk_state,index); this.getCityList(val.fk_state,index);
this.getPincode(val.pincode_id,index); this.getPincode(val.pincode_id,index);
console.log('this.addressesList.length',this.addressesList.length);
this.addressesDeactivited[this.addressesList.length] = true;
addressesArray.push(this.createAddresses(obj)); addressesArray.push(this.createAddresses(obj));
}); });
} }
else{ else{
this.addressesDeactivited[0] = true;
addressesArray.push(this.createAddresses(null)); addressesArray.push(this.createAddresses(null));
} }
} }
else{ else{
this.addressesDeactivited[0] = true;
addressesArray.push(this.createAddresses(null)); addressesArray.push(this.createAddresses(null));
} }
}); });
@ -225,6 +229,10 @@ export class EditPdMasterComponent implements OnInit {
this.subProductList= this.productList.filter(item => item.product_id == productID); this.subProductList= this.productList.filter(item => item.product_id == productID);
this.subProductList=this.subProductList[0].subproducts; this.subProductList=this.subProductList[0].subproducts;
this.customerSegmentList=(productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
// this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:(this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')),this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(''));
} }
// //get city list details based on state id // //get city list details based on state id
@ -272,12 +280,8 @@ export class EditPdMasterComponent implements OnInit {
} }
}; };
addAddresses(index) { addAddresses(index) {
console.log(index);
this.addressesDeactivited[index] = true;
console.log('this.addressesDeactivited[index]',this.addressesDeactivited[index]);
this.addresses = this._EditPDtriggerForm.get('addresses') as FormArray; this.addresses = this._EditPDtriggerForm.get('addresses') as FormArray;
this.addresses.push(this.createAddresses(null)); this.addresses.push(this.createAddresses(null));
} }
removeAddresses(index: number,strflag : any) { removeAddresses(index: number,strflag : any) {
@ -439,7 +443,7 @@ export class EditPdMasterComponent implements OnInit {
"pd_contact_mobileno": my_array.pd_contact_mobileno, "pd_contact_mobileno": my_array.pd_contact_mobileno,
"pd_contact_landline": concat_landline, "pd_contact_landline": concat_landline,
"fk_product_id": my_array.fk_product_id, "fk_product_id": my_array.fk_product_id,
"fk_subproduct_id": my_array.fk_subproduct_id, "fk_subproduct_id": my_array.fk_product_id != '4' ? my_array.fk_subproduct_id : '',
"fk_pd_type": my_array.fk_pd_type, "fk_pd_type": my_array.fk_pd_type,
"fk_customer_segment": my_array.fk_customer_segment, "fk_customer_segment": my_array.fk_customer_segment,
"loan_amount": my_array.loan_amount, "loan_amount": my_array.loan_amount,

View File

@ -75,8 +75,8 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Lenderid"> <ng-container matColumnDef="Lenderid">
<mat-cell class="cell" *matCellDef="let details"> <mat-cell class="cell" *matCellDef="let details">
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br> <span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br> <span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span> <span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -77,8 +77,8 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Lenderid"> <ng-container matColumnDef="Lenderid">
<mat-cell class="cell" *matCellDef="let details"> <mat-cell class="cell" *matCellDef="let details">
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br> <span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br> <span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span> <span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -76,8 +76,8 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Lenderid"> <ng-container matColumnDef="Lenderid">
<mat-cell class="cell" *matCellDef="let details"> <mat-cell class="cell" *matCellDef="let details">
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br> <span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br> <span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span> <span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -61,7 +61,7 @@
<mat-form-field style="width: 24%" *ngIf="item.get('pincode').value == 1"> <mat-form-field style="width: 24%" *ngIf="item.get('pincode').value == 1">
<input matInput autocomplete="off" placeholder="Specify Pincode *" <input matInput autocomplete="off" placeholder="Specify Pincode *"
formControlName="pincode_others" (keypress)="keyPress($event)"> formControlName="pincode_others" OnlyNumber type="text">
<!-- <mat-error *ngIf="!addressForm.controls['pincode_others'].valid">Pincode <!-- <mat-error *ngIf="!addressForm.controls['pincode_others'].valid">Pincode
Required</mat-error> --> Required</mat-error> -->
</mat-form-field> </mat-form-field>
@ -139,7 +139,7 @@
<div fxFlex="100" fxLayout="nowrap"> <div fxFlex="100" fxLayout="nowrap">
<mat-form-field style="width: 46%;"> <mat-form-field style="width: 46%;">
<input matInput [placeholder]="placeholderName[i] ? placeholderName[i] : 'Estimated area of the (Address Type)'" formControlName="estimated_area" <input matInput [placeholder]="placeholderName[i] ? placeholderName[i] : 'Estimated area of the (Address Type)'" formControlName="estimated_area"
(keypress)="keyPress($event)"> OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 46%;"> <mat-form-field style="width: 46%;">

View File

@ -518,16 +518,6 @@ createAddresses(AddressDetails): FormGroup {
}); });
} }
/** 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();
}
}
/** For DOCS Tab */ /** For DOCS Tab */
public viewerOptions: any = { public viewerOptions: any = {
navbar: false, navbar: false,

View File

@ -158,8 +158,9 @@
<div [formGroupName]="s"> <div [formGroupName]="s">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,6)"> <input matInput placeholder="Premium Paid" formControlName="premium_paid" OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,s,6)">
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{"&#8377;"}} {{OtherPremiumPaidInwords[s]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{"&#8377;"}} {{OtherPremiumPaidInwords[s]}} Only</mat-hint>
<!-- <mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{ "&#8377;" + detail.get('premium_paid').value | numberToWords + 'Only'}} </mat-hint> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-select placeholder="Frequency" formControlName="frequency_mode" (selectionChange)="setRequiredValidation($event.value,detail,2)"> <mat-select placeholder="Frequency" formControlName="frequency_mode" (selectionChange)="setRequiredValidation($event.value,detail,2)">
@ -174,7 +175,7 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,8)"> <input matInput placeholder="Sum Assured" formControlName="sum_assured" OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,s,8)">
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('sum_assured').value != ''">{{"&#8377;"}} {{OtherSumAssuredInwords[s]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="detail.get('sum_assured').value != ''">{{"&#8377;"}} {{OtherSumAssuredInwords[s]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -210,7 +211,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)"> <input matInput placeholder="Current Market Value" formControlName="amount_of_invest" OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,10)">
<!--<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('amount_of_invest').value != ''">{{"&#8377;"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>--> <!--<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('amount_of_invest').value != ''">{{"&#8377;"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>-->
@ -254,7 +255,7 @@
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,12)" (keypress)="keyPress($event)"> <input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,12)" OnlyNumber type="text">
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"&#8377;"}} {{OtherAssetValueInwords[s]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"&#8377;"}} {{OtherAssetValueInwords[s]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -271,7 +272,7 @@
<!--Desction Dynamic details : END --> <!--Desction Dynamic details : END -->
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <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" style="width:45%"> <mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5" style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,2)"> <input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,2)">
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"&#8377;"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"&#8377;"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -279,13 +280,21 @@
<!-- <mat-select placeholder="Name of the Owner" formControlName="name_of_the_owner" > <!-- <mat-select placeholder="Name of the Owner" formControlName="name_of_the_owner" >
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name | titlecase}}</mat-option> <mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name | titlecase}}</mat-option>
</mat-select> --> </mat-select> -->
<mat-select multiple placeholder="Name of the Owner" <!-- <mat-select multiple placeholder="Name of the Owner"
formControlName="name_of_the_owner" [compareWith]="compareObjects" required (selectionChange)="setRequiredValidation($event.value,i,'',4)"> formControlName="name_of_the_owner" [compareWith]="compareObjects" required (selectionChange)="setRequiredValidation($event.value,i,'',4)">
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName"> <mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val"> <mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}} {{val.name}}
</mat-option> </mat-option>
</mat-optgroup> </mat-optgroup>
</mat-select> -->
<mat-select multiple placeholder="Name of the Owner" formControlName="name_of_the_owner"
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,i,'',4)">
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@ -309,14 +318,14 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Age of Asset in Years</mat-label> <mat-label>Age of Asset in Years</mat-label>
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)"> <input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
<!-- <mat-error> Invalid format</mat-error> --> <!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Purchase Year</mat-label> <mat-label>Purchase Year</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)"> <input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="purchase_year" minlength="4" maxlength="4" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
<!-- <mat-error> Invalid year format</mat-error> --> <!-- <mat-error> Invalid year format</mat-error> -->
</mat-form-field> </mat-form-field>

View File

@ -279,7 +279,7 @@ export class AssetsInfoComponent implements OnInit {
// this.initDetails(), // this.initDetails(),
]), ]),
// business_assets_details : this._formBuilder.array([]), // business_assets_details : this._formBuilder.array([]),
assets_form_remark:[value.assets_form_remark || 'check'] assets_form_remark:[value.assets_form_remark]
}); });
this.addAssetsDetailsWithData(value.assets_details); this.addAssetsDetailsWithData(value.assets_details);
// this.addBusinessAssetsDetailsWithData(value.business_assets_details); // this.addBusinessAssetsDetailsWithData(value.business_assets_details);
@ -611,17 +611,20 @@ export class AssetsInfoComponent implements OnInit {
}; };
const control = <FormArray>this._assetsQuesFrom.controls['assets_details']; const control = <FormArray>this._assetsQuesFrom.controls['assets_details'];
// let Avaliablity = 1;
// val.name_of_the_owner.forEach(option => {
// if(option.id == 0 && option.group_id == 2){
// Avaliablity = option.id;
// }
// });
// this.isOtherOwner = Avaliablity == 0 ? true : false;
control.push(this.initDetailsWithdata(vals)); control.push(this.initDetailsWithdata(vals));
this.setAssetsDetailsWithData(vals.assets_mode, val.details, control.length - 1) this.setAssetsDetailsWithData(vals.assets_mode, val.details, control.length - 1)
} }
result.forEach((datas,index) => { result.forEach((datas,index) => {
// let Avaliablity = 1;
// if(datas.name_of_the_owner.length>0){
// datas.name_of_the_owner.forEach(option => {
// if(option.id == 0 && option.group_id == 2){
// Avaliablity = option.id;
// }
// });
// }
// this.isOtherOwner[index] = Avaliablity == 0 ? true : false;
this.OtherAppxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.approximate_market_value); this.OtherAppxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.approximate_market_value);
this.setRequiredValidation(datas.name_of_the_owner,index,'',4); this.setRequiredValidation(datas.name_of_the_owner,index,'',4);
}); });
@ -840,16 +843,6 @@ export class AssetsInfoComponent implements OnInit {
// this.getPdSupplierFormDetails(); // this.getPdSupplierFormDetails();
// } // }
/** On Key Press Event For Number only Accepting */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To calculating Loan Elapsed Tenure both "Other Asset" And "Business Asset" using Flag */ /** To calculating Loan Elapsed Tenure both "Other Asset" And "Business Asset" using Flag */
loanTenureCalc(details ,flag) loanTenureCalc(details ,flag)
{ {
@ -872,7 +865,7 @@ export class AssetsInfoComponent implements OnInit {
} }
setRequiredValidation(value,ParInx,ChdInx,flag) { setRequiredValidation(value,ParInx,ChdInx,flag) {
// console.log('value',value,'ParInx',ParInx,'ChdInx',ChdInx,'flag',flag); console.log('value',value,'ParInx',ParInx,'ChdInx',ChdInx,'flag',flag);
let ParCtrls = <FormArray>this._assetsQuesFrom.controls.assets_details; let ParCtrls = <FormArray>this._assetsQuesFrom.controls.assets_details;
// console.log('ParCtrls',ParCtrls); // console.log('ParCtrls',ParCtrls);
let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx]; let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx];
@ -905,19 +898,21 @@ export class AssetsInfoComponent implements OnInit {
if (flag == 4) { if (flag == 4) {
let Avaliablity = 1; let Avaliablity = 1;
// console.log('val',value); // console.log('val',value);
if(value.length>0){
value.forEach(option => { value.forEach(option => {
if(option.id == 0 && option.group_id == 2){ if(option.id == 0 && option.group_id == 2){
Avaliablity = option.id; Avaliablity = option.id;
} }
}); });
}
if(Avaliablity == 0){ if(Avaliablity == 0){
// console.log('if Avaliablity',Avaliablity); console.log('if Avaliablity',Avaliablity);
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]); // console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
ChdCtrls.controls.other_owner.setValidators([Validators.required]); ChdCtrls.controls.other_owner.setValidators([Validators.required]);
this.isOtherOwner[ParInx] = true; this.isOtherOwner[ParInx] = true;
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]); // console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
}else if(Avaliablity == 1){ }else if(Avaliablity == 1){
// console.log('else Avaliablity',Avaliablity); console.log('else Avaliablity',Avaliablity);
// console.log('esle this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]); // console.log('esle this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
ChdCtrls.controls.other_owner.setValue(''); ChdCtrls.controls.other_owner.setValue('');
ChdCtrls.controls.other_owner.clearValidators(); ChdCtrls.controls.other_owner.clearValidators();

View File

@ -147,7 +147,7 @@
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> --> <mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account" <input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
formControlName="limit" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)"> formControlName="limit" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
@ -156,10 +156,10 @@
<br> <br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(itemrow,$event.target.value)"> <input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>

View File

@ -357,13 +357,4 @@ export class BankingDetailsComponent 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();
}
}
} }

View File

@ -44,14 +44,14 @@
<label style="padding-left:2%">How long has business been operated from this premise?</label> <label style="padding-left:2%">How long has business been operated from this premise?</label>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years" <input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years"
(change)="checkWithExistBusinessYear($event.target.value,i)" (keypress)="keyPress($event)"> (change)="checkWithExistBusinessYear($event.target.value,i)" OnlyNumber type="text">
<mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint> <mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint>
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_years'].value.valid">Year's <!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_years'].value.valid">Year's
Required</mat-error> --> Required</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" <input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month"
(keypress)="keyPress($event)" (change)="ConvertMonthintoYear($event.target.value,i)"> OnlyNumber type="text" (change)="ConvertMonthintoYear($event.target.value,i)">
<mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint> <mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint>
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_month'].value.valid">Month's <!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_month'].value.valid">Month's
Required</mat-error> --> Required</mat-error> -->
@ -90,7 +90,7 @@
<mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')"> <mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" <input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt"
(keypress)="keyPress($event)" (keyup)="inWords($event,i,9)"> OnlyNumber type="text" (keyup)="inWords($event,i,9)">
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"&#8377;"}}
{{RentAmtInwordsForAddress[i]}} Only</mat-hint> {{RentAmtInwordsForAddress[i]}} Only</mat-hint>
<mat-error>Monthly Rent Amount Required</mat-error> <mat-error>Monthly Rent Amount Required</mat-error>
@ -101,7 +101,7 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" <input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value"
(keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)"> OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,10)">
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"&#8377;"}}
{{appxMarketAmtInwordsForAddress[i]}} Only</mat-hint> {{appxMarketAmtInwordsForAddress[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -126,14 +126,14 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Approx Vintage</mat-label> <mat-label>Approx Vintage</mat-label>
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" <input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage"
minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)"> minlength="1" maxlength="3" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
<!-- <mat-error> Invalid format</mat-error> --> <!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Purchase Year</mat-label> <mat-label>Purchase Year</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year" <input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year"
minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)"> minlength="4" maxlength="4" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
<!-- <mat-error> Invalid year format</mat-error> --> <!-- <mat-error> Invalid year format</mat-error> -->
</mat-form-field> </mat-form-field>
</div> </div>
@ -288,7 +288,7 @@
<mat-form-field style="width:45%" *ngIf="(sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'rented')"> <mat-form-field style="width:45%" *ngIf="(sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'rented')">
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" <input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt"
(keypress)="keyPress($event)" (keyup)="inWords($event,i,8)"> OnlyNumber type="text" (keyup)="inWords($event,i,8)">
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_monthly_rented_amt').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_monthly_rented_amt').value != ''">{{"&#8377;"}}
{{RentAmtInwords[i]}} Only</mat-hint> {{RentAmtInwords[i]}} Only</mat-hint>
<mat-error>Monthly Rent Amount Required</mat-error> <mat-error>Monthly Rent Amount Required</mat-error>
@ -298,7 +298,7 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'owned'"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'owned'">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" <input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value"
(keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,1)"> OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,1)">
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"&#8377;"}}
{{appxMarketAmtInwords[i]}} Only</mat-hint> {{appxMarketAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -323,14 +323,14 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Approx Vintage</mat-label> <mat-label>Approx Vintage</mat-label>
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" <input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage"
minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)"> minlength="1" maxlength="3" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
<!-- <mat-error> Invalid format</mat-error> --> <!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Purchase Year</mat-label> <mat-label>Purchase Year</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year" <input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year"
minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,2)"> minlength="4" maxlength="4" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,2)">
<!-- <mat-error> Invalid year format</mat-error> --> <!-- <mat-error> Invalid year format</mat-error> -->
</mat-form-field> </mat-form-field>
</div> </div>

View File

@ -608,12 +608,14 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_approximate_market_value); this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_approximate_market_value);
this.RentAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_monthly_rented_amt); this.RentAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_monthly_rented_amt);
let Avaliablity = 1; let Avaliablity = 1;
console.log('datas.business_name_of_the_owner.length',datas.business_name_of_the_owner.length);
if(datas.business_name_of_the_owner.length > 0){
datas.business_name_of_the_owner.forEach(option => { datas.business_name_of_the_owner.forEach(option => {
if(option.id == 0 && option.group_id == 2){ if(option.id == 0 && option.group_id == 2){
Avaliablity = option.id; Avaliablity = option.id;
} }
}); });
}
this.isOtherOwner[index] = Avaliablity == 0 ? true : false; this.isOtherOwner[index] = Avaliablity == 0 ? true : false;
}); });
@ -777,17 +779,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
} }
} }
/** On Key Press Event For Number only Accepting */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To Convert Month into Year */ /** To Convert Month into Year */
ConvertMonthintoYear(e,i) { ConvertMonthintoYear(e,i) {
// const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses']; // const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];

View File

@ -82,7 +82,7 @@
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> --> <mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account" <input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
formControlName="limit" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)"> formControlName="limit" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
@ -91,10 +91,10 @@
<br> <br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(itemrow,$event.target.value)"> <input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>

View File

@ -330,16 +330,6 @@ export class BusinessBankingDetailsComponent 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();
}
}
setRequiredValidation(value,item,flag) { setRequiredValidation(value,item,flag) {
if(flag == 1){ if(flag == 1){

View File

@ -52,7 +52,7 @@
</div> </div>
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'> <div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
<mat-form-field style="width: 45%;" *ngIf="generalExistEntityType!='4' && generalExistEntityType!='9' && generalExistEntityType.value!=''"> <mat-form-field style="width: 45%;" *ngIf="generalExistEntityType!='4' && generalExistEntityType!='9' && generalExistEntityType.value!=''">
<input matInput placeholder="Share of Profit / Shareholding (%)" (keypress)="keyPress($event)" <input matInput placeholder="Share of Profit / Shareholding (%)" OnlyNumber type="text"
formControlName="shareholding"> formControlName="shareholding">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 45%;">
@ -69,16 +69,16 @@
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'> <div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
<mat-form-field style="width: 20%;"> <mat-form-field style="width: 20%;">
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i,members)" [readonly]="isreadonlyyear[i]" > <input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" OnlyNumber type="text" (change)="checkWithExistBusinessYear($event.target.value,i,members)" [readonly]="isreadonlyyear[i]" >
<mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint> <mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 21%;"> <mat-form-field style="width: 21%;">
<input matInput placeholder="Month" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(members,$event.target.value,i)" autocomplete="off" [readonly]="isreadonlymonth[i]" > <input matInput placeholder="Month" formControlName="current_business_experiance_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(members,$event.target.value,i)" autocomplete="off" [readonly]="isreadonlymonth[i]" >
<mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint> <mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 35%;"> <mat-form-field style="width: 35%;">
<input matInput placeholder="Total Work Experience" <input matInput placeholder="Total Work Experience"
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required (change)="checkWithExistTotalWorkExperience($event.target.value,i,members)"> formControlName="total_business_experiance" OnlyNumber type="text" (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-hint style="color: red;">{{errorMessageForExistTotalWorkExperience[i]}}</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
@ -1158,7 +1158,7 @@
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0"> <!--<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0">
<mat-card-header> <mat-card-header>
<mat-card-title>Other Details</mat-card-title> <mat-card-title>Other Details</mat-card-title>
</mat-card-header> </mat-card-header>
@ -1185,7 +1185,7 @@
Add More Products Add More Products
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>-->
<mat-card *ngIf="ExportFlag"> <mat-card *ngIf="ExportFlag">
<mat-card-header> <mat-card-header>
<mat-card-title>Export Sale As a % Total Sales</mat-card-title> <mat-card-title>Export Sale As a % Total Sales</mat-card-title>

View File

@ -166,7 +166,7 @@ export class BusinessInfoComponent implements OnInit {
const retailControl: any = <FormArray>this.businessForm.controls['retail_trading_activity_details']; const retailControl: any = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
const wholesaleControl: any = <FormArray>this.businessForm.controls['wholesale_trading_activity_details']; const wholesaleControl: any = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
const serviceProviderControl: any = <FormArray>this.businessForm.controls['service_provider_activity_details']; const serviceProviderControl: any = <FormArray>this.businessForm.controls['service_provider_activity_details'];
const othersControl: any = <FormArray>this.businessForm.controls['others_activity_details']; // const othersControl: any = <FormArray>this.businessForm.controls['others_activity_details'];
if (data.status == 200) { if (data.status == 200) {
let DocArray: any; let DocArray: any;
@ -553,25 +553,26 @@ export class BusinessInfoComponent implements OnInit {
businessVal.service_provider_activity_details=[]; businessVal.service_provider_activity_details=[];
} }
if(data.records.others_activity_details){ //others type of Activity_details comment
// if(data.records.others_activity_details){
// update others activity details // // update others activity details
let selectedOthers = Object.keys(data.records.others_activity_details).map(function (key) { // let selectedOthers = Object.keys(data.records.others_activity_details).map(function (key) {
return data.records.others_activity_details[key]; // return data.records.others_activity_details[key];
}); // });
if(selectedOthers.length > 0) { // if(selectedOthers.length > 0) {
selectedOthers.forEach((element,index)=>{ // selectedOthers.forEach((element,index)=>{
othersControl.push(this.createOthersActivity()); // othersControl.push(this.createOthersActivity());
}); // });
businessVal.others_activity_details=selectedOthers; // businessVal.others_activity_details=selectedOthers;
} // }
else{ // else{
businessVal.others_activity_details=[]; // businessVal.others_activity_details=[];
} // }
} // }
else { // else {
businessVal.others_activity_details=[]; // businessVal.others_activity_details=[];
} // }
if(businessVal.applicant_use_pos_machines == 'yes'){ if(businessVal.applicant_use_pos_machines == 'yes'){
this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines); this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines);
const posControl: any = <FormArray>this.businessForm.controls['pos_machines_details']; const posControl: any = <FormArray>this.businessForm.controls['pos_machines_details'];
@ -660,7 +661,7 @@ export class BusinessInfoComponent implements OnInit {
retail_trading_activity_details: this.fb.array([]), retail_trading_activity_details: this.fb.array([]),
wholesale_trading_activity_details: this.fb.array([]), wholesale_trading_activity_details: this.fb.array([]),
service_provider_activity_details: this.fb.array([]), service_provider_activity_details: this.fb.array([]),
others_activity_details: this.fb.array([]), // others_activity_details: this.fb.array([]),
}); });
} }
@ -724,15 +725,15 @@ export class BusinessInfoComponent implements OnInit {
serviceControl.push(this.createServiceActivity()); serviceControl.push(this.createServiceActivity());
} }
if(event.value.exist_status==true && event.value.type_of_activity_id==1){ // if(event.value.exist_status==true && event.value.type_of_activity_id==1){
let othersControl = <FormArray>this.businessForm.controls['others_activity_details']; // let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.controls = []; // othersControl.controls = [];
othersControl.setValue([]); // othersControl.setValue([]);
} // }
else if(event.value.exist_status==false && event.value.type_of_activity_id==1){ // else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
let othersControl = <FormArray>this.businessForm.controls['others_activity_details']; // let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.push(this.createOthersActivity()); // othersControl.push(this.createOthersActivity());
} // }
// check activity type for make dosument sighted filed dynamically // check activity type for make dosument sighted filed dynamically
this.businessForm.value.manufacturing_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert'); this.businessForm.value.manufacturing_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert');
this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert'); this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert');
@ -1208,7 +1209,7 @@ export class BusinessInfoComponent implements OnInit {
this._pd.getAllMasterDatas(master_name).subscribe(data => { this._pd.getAllMasterDatas(master_name).subscribe(data => {
data.records.forEach(val => { data.records.forEach(val => {
let entityTypeControl = <FormArray>this.businessForm.controls['select_business_activity_type']; let entityTypeControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
if (val.isactive == 1) { if (val.isactive == 1 && val.type_of_activity_id != 1) {
this.activityData.push(val); this.activityData.push(val);
} }
}) })
@ -1325,15 +1326,15 @@ export class BusinessInfoComponent implements OnInit {
} }
// add more others details // add more others details
addMoreOthersActivity() { // addMoreOthersActivity() {
let othersControl = <FormArray>this.businessForm.controls['others_activity_details']; // let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.push(this.createOthersActivity()); // othersControl.push(this.createOthersActivity());
} // }
deleteOthersActivity(index) { // deleteOthersActivity(index) {
let othersControl = <FormArray>this.businessForm.controls['others_activity_details']; // let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.removeAt(index); // othersControl.removeAt(index);
} // }
// update partner group other form control // update partner group other form control
changePartnerGroup(value,key) { changePartnerGroup(value,key) {
@ -1658,16 +1659,6 @@ export class BusinessInfoComponent implements OnInit {
} }
} }
/** On Key Press Event For Amount */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To Convert Amount into Words */ /** To Convert Amount into Words */
// inWords(e){ // inWords(e){
// this.InvestedAmountInWords = this._pd.convertNumberToWords(e); // this.InvestedAmountInWords = this._pd.convertNumberToWords(e);

View File

@ -65,11 +65,11 @@
<mat-error>Enter Valid Mobile Number.</mat-error> <mat-error>Enter Valid Mobile Number.</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
<mat-error>Enter Valid STD Code Number.</mat-error> <mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
<mat-error>Enter Valid LandLine Number.</mat-error> <mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -177,15 +177,15 @@
</div> </div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)"> <input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" OnlyNumber type="text">
<mat-error>Enter Valid Mobile Number.</mat-error> <mat-error>Enter Valid Mobile Number.</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
<mat-error>Enter Valid STD Code Number.</mat-error> <mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
<mat-error>Enter Valid LandLine Number.</mat-error> <mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -299,11 +299,11 @@
<mat-error>Enter Valid Mobile Number.</mat-error> <mat-error>Enter Valid Mobile Number.</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
<mat-error>Enter Valid STD Code Number.</mat-error> <mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
<mat-error>Enter Valid LandLine Number.</mat-error> <mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>

View File

@ -676,16 +676,6 @@ export class ClientInfoComponent implements OnInit {
// this._addQuesFrom.reset(); // this._addQuesFrom.reset();
} }
/** On Key Press Event For Mobile Number */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
selectedPersonDesignation(items,e,flag){ selectedPersonDesignation(items,e,flag){
if(flag == 1){ if(flag == 1){
e==1 ? items.controls['other_person_designation'].setValidators([Validators.required]) e==1 ? items.controls['other_person_designation'].setValidators([Validators.required])

View File

@ -54,7 +54,7 @@
<input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type"> <input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:45%;">
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)"> <input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('loan_amount').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint> <mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('loan_amount').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:45%;">
@ -96,8 +96,8 @@
<input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency"> <input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency">
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="details.get('frequency').value != ''" style="width:45%"> <mat-form-field *ngIf="details.get('frequency').value != ''" style="width:45%">
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)"> <input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" OnlyNumber type="text" (keyup)="inWords($event,i,2)">
<!-- <input matInput autocomplete="off" placeholder="details.get('loan_type').value + Instalment Amount " formControlName="emi" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)"> --> <!-- <input matInput autocomplete="off" placeholder="details.get('loan_type').value + Instalment Amount " formControlName="emi" OnlyNumber type="text" (keyup)="inWords($event,i,2)"> -->
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('emi').value != ''">{{"&#8377;"}} {{emiAmtInwords[i]}} Only</mat-hint> <mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('emi').value != ''">{{"&#8377;"}} {{emiAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field> <!-- <mat-form-field>
@ -303,7 +303,7 @@
<!-- {{frequencyData | json}} --> <!-- {{frequencyData | json}} -->
<!-- <mat-card-content class="matcard"> <!-- <mat-card-content class="matcard">
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber type="text" >
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency" <mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
@ -312,7 +312,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" > <input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" OnlyNumber type="text" >
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" > <input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" >

View File

@ -244,25 +244,23 @@ export class CurrentLoanComponent implements OnInit {
if(val.mode == 1){ if(val.mode == 1){
let data; let data;
let owner let owner : any = "Owner Not Mentioned";
val.details.forEach((v,index) => { val.details.forEach((v,index) => {
data = v.any_other_assets; data = v.any_other_assets;
}); });
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
let description = data != '' ? ' ( '+ data +' )' : ''; let description = data != '' ? ' ( '+ data +' )' : '';
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description; labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
} }
if(val.mode == 2){ if(val.mode == 2){
let data; let data;
let owner; let owner : any = "Owner Not Mentioned";
val.details.forEach((v,index) => { val.details.forEach((v,index) => {
data = v.property_type; data = v.property_type;
if(v.property_type != 1){ if(v.property_type != 1){
@ -278,79 +276,65 @@ export class CurrentLoanComponent implements OnInit {
}else{ }else{
data=v.other_property_type; data=v.other_property_type;
} }
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
}); });
let description = data != '' ? ' ( '+ data +' )' : ''; let description = data != '' ? ' ( '+ data +' )' : '';
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description; labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
} }
if(val.mode == 3){ if(val.mode == 3){
let data;let owner; let data;let owner : any = "Owner Not Mentioned";
val.details.forEach((v,index) => { val.details.forEach((v,index) => {
data = v.manufacturer_model_vehicle; data = v.manufacturer_model_vehicle;
}); });
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
let description = data != '' ? ' ( '+ data +' )' : ''; let description = data != '' ? ' ( '+ data +' )' : '';
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description; labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
} }
if(val.mode == 4){ if(val.mode == 4){
let data;let owner; let data;let owner : any = "Owner Not Mentioned";
val.details.forEach((v,index) => { val.details.forEach((v,index) => {
data = v.equipment_manufacturing_description; data = v.equipment_manufacturing_description;
}); });
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
let description = data != '' ? ' ( '+ data +' )' : ''; let description = data != '' ? ' ( '+ data +' )' : '';
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description; labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
} }
if(val.mode == 6){ if(val.mode == 6){
let owner let owner : any = "Owner Not Mentioned";
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
labelarray[index] = ' : '+owner+' - '+ val.mode_name; labelarray[index] = ' : '+owner+' - '+ val.mode_name;
} }
if(val.mode == 7){ if(val.mode == 7){
let data;let owner; let data;let owner : any = "Owner Not Mentioned";
val.details.forEach((v,index) => { val.details.forEach((v,index) => {
data = v.investments_type != 1 data = v.investments_type != 1
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name ? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
: v.other_investments_type ; : v.other_investments_type ;
}); });
if(val.form_type == 'Data From Business Assets'){ if(val.owner_name.length>0){
owner = val.owner_name.map((e => { owner = val.owner_name.map((e => {
return e.name.split(',') return e.name.split(',')
})); }));
} }
else {
owner = val.owner_name;
}
let description = data != '' ? '( '+ data +' )' : ''; let description = data != '' ? '( '+ data +' )' : '';
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description; labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
} }
@ -583,16 +567,6 @@ export class CurrentLoanComponent implements OnInit {
}) })
}); });
} }
/** On Key Press Event For Amount */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** Amount InWords */ /** Amount InWords */
inWords(e,i,flag){ inWords(e,i,flag){
switch(flag){ switch(flag){

View File

@ -26,7 +26,7 @@
<input matInput placeholder="Name" formControlName="applicant_name" type="text" required> <input matInput placeholder="Name" formControlName="applicant_name" type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 30%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" <input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" OnlyNumber type="text"
autocomplete="off"> autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 60%"> <mat-form-field style="width: 60%">

View File

@ -126,14 +126,4 @@ export class OtherApplicantDetailsComponent implements OnInit {
} }
}); });
} }
/** On Key Press Event For Amount */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
} }

View File

@ -18,17 +18,21 @@
<mat-card> <mat-card>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Name of Employer" formControlName="employer_name" required> <!-- <input matInput> -->
<mat-select placeholder="Name of Employer" formControlName="employer_name" required>
<mat-option>Select</mat-option>
<mat-option *ngFor="let cl of company_list" [value]="cl.company_order_id+'-'+cl.company_name">{{ cl.company_name }}</mat-option>
</mat-select>
</mat-form-field> </mat-form-field>
<div> <div>
<label>Since how long working with this employer?</label> <label>Since how long working with this employer?</label>
<br> <br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>
<input matInput type="number" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'> <input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput type="number" autocomplete="off" placeholder="Month" formControlName="how_long_month" required min='0' (change)="ConvertMonthintoYear($event.target.value)"> <input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month" formControlName="how_long_month" required min='0' (change)="ConvertMonthintoYear($event.target.value)">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -42,10 +46,23 @@
</mat-form-field> </mat-form-field>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
<mat-form-field fxFlex="50"> <mat-form-field fxFlex="50">
<input matInput placeholder="Name of Person Met" formControlName="name_person_met" required> <!-- <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)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of person_met_list" [value]="person.pd_co_applicant_id">
{{person.applicant_name | titlecase}}
</mat-option>
</mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex="50"> <mat-form-field fxFlex="50">
<input matInput placeholder="Designation of Person Met" formControlName="designation_person_met" required> <input matInput placeholder="Designation of Person Met" formControlName="designation_person_met" required>
<!-- <mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
<mat-option>Select</mat-option>
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
{{comrelShip.name | titlecase}}
</mat-option>
<mat-option value="0"> Not Applicable </mat-option>
</mat-select> -->
</mat-form-field> </mat-form-field>
</div> </div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'"> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
@ -83,7 +100,7 @@
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex="100"> <div fxFlex="100">
<mat-form-field style="width: 33%"> <mat-form-field style="width: 33%">
<input matInput placeholder="Date of Salary" formControlName="which_date_the_salary_is_rcv" type="number" min='1' max='31'> <input matInput placeholder="Date of Salary" formControlName="which_date_the_salary_is_rcv" OnlyNumber type="text" min='1' max='31'>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 33%"> <mat-form-field style="width: 33%">
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required> <input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required>

View File

@ -43,6 +43,11 @@ export class EmploymentInfoComponent implements OnInit {
private notifier: NotifierService; private notifier: NotifierService;
public pd_cus_segment:string; public pd_cus_segment:string;
public frequency_data:any[]; public frequency_data:any[];
public company_list:any[];
public person_met_list:any[];
public company_related_applicants_list:any[];
public company_relationship_list:any[];
public filtered_company_relationship_list:any[];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private router: Router,
@ -78,11 +83,26 @@ export class EmploymentInfoComponent implements OnInit {
} }
}; };
ngOnInit() { ngOnInit() {
console.log('clear');
console.clear();
this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
this.initemploymentForm(); this.initemploymentForm();
let params: any = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
params.pd_form_id = this.form_id; params.pd_form_id = this.form_id;
console.log('abcd');
let param: any = {};
param.pd_id = this.pdid;
param.pd_form_id = '18';
this._pd.retriveForm(param).subscribe(data => {
if(data.dataStatus) {
console.log(data.records);
this.company_list = data.records.companies.filter(com=>com.is_active == true );
this.person_met_list = data.records.individuals.filter(app=>app.is_person_met == true && app.is_active == true);
this.company_related_applicants_list = data.records.company_with_relationships;
}
});
this._pd.retriveForm(params).subscribe(value => { this._pd.retriveForm(params).subscribe(value => {
if (value.status == 200) { if (value.status == 200) {
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name); this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
@ -120,7 +140,17 @@ export class EmploymentInfoComponent implements OnInit {
this.frequency_data = this.frequency_data.filter(freq=>freq.isactive == 1 ); this.frequency_data = this.frequency_data.filter(freq=>freq.isactive == 1 );
} }
}); });
this._pd.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(
data => {
if (data.status == 200) {
this.company_relationship_list = data.records.filter(item => item.isactive == 1);
this.company_relationship_list = data.records.filter(item => item.name != 'Others');
this.company_relationship_list.push({'company_relationship_id':0,'name':'Not Applicable'});
} }
});
}
public initemploymentForm(): void { public initemploymentForm(): void {
this.employmentForm = this.fb.group({ this.employmentForm = this.fb.group({
employer_name: ['', Validators.compose([Validators.required])], employer_name: ['', Validators.compose([Validators.required])],
@ -141,10 +171,28 @@ export class EmploymentInfoComponent implements OnInit {
bonus_type: [''], bonus_type: [''],
bonus_type_other: [''], bonus_type_other: [''],
any_delays: ['', Validators.compose([Validators.required])], any_delays: ['', Validators.compose([Validators.required])],
// employment_details: this.fb.array([]),
employment_remarks: ['', Validators.compose([Validators.required])], employment_remarks: ['', Validators.compose([Validators.required])],
}); });
} }
filtercompanyrelationship(companyid,applicantid){
var array = companyid.split("-");
// console.log(array[0]);
// console.log('companyid',companyid);
// console.log('applicantid',applicantid);
let data = this.company_related_applicants_list.filter(freq=>freq.relation_to_company == array[0] &&freq.applicant_name == applicantid);
if(data.length>0){
this.filtered_company_relationship_list = this.company_relationship_list.filter(freq=>freq.company_relationship_id == data[0].company_relationship );
this.employmentForm.controls['designation_person_met'].setValue(this.filtered_company_relationship_list[0]['name'] +' '+array[1]);
}
else{
this.employmentForm.controls['designation_person_met'].setValue('');
}
}
ConvertMonthintoYear(e){ ConvertMonthintoYear(e){
let how_long_year = this.employmentForm.controls.how_long_year.value; let how_long_year = this.employmentForm.controls.how_long_year.value;

View File

@ -74,7 +74,7 @@
</mat-form-field> --> </mat-form-field> -->
<mat-form-field> <mat-form-field>
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" (keypress)="keyPress($event)" required> <input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" OnlyNumber type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
@ -91,7 +91,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;"> <mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;">
<input matInput placeholder="Rent Amount" formControlName="rent" (keypress)="keyPress($event)" (keyup)="inWords($event,1,i)"> <input matInput placeholder="Rent Amount" formControlName="rent" OnlyNumber type="text" (keyup)="inWords($event,1,i)">
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"&#8377;"}} {{RentAmount[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"&#8377;"}} {{RentAmount[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
@ -146,7 +146,7 @@
<input matInput placeholder="Specify Others" formControlName="earning_if_others_segment"> <input matInput placeholder="Specify Others" formControlName="earning_if_others_segment">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:45%;">
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" (keypress)="keyPress($event)" (keyup)="inWords($event,2,i)" required> <input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" OnlyNumber type="text" (keyup)="inWords($event,2,i)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"&#8377;"}} {{IncomePerMonth[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"&#8377;"}} {{IncomePerMonth[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:45%;">

View File

@ -568,16 +568,6 @@ removeFamilyMembers(inx,i) {
// }); // });
// } // }
/** On Key Press Event For Age */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To Convert Amount into Words */ /** To Convert Amount into Words */
inWords(e,flag:number,i){ inWords(e,flag:number,i){
switch(flag){ switch(flag){

View File

@ -36,13 +36,13 @@
<mat-form-field style="width:37%"> <mat-form-field style="width:37%">
<mat-label>Enter year from which financials provided</mat-label> <mat-label>Enter year from which financials provided</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="financial_starting_year" <input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="financial_starting_year"
(keypress)="keyPress($event)" [readonly]="isReadOnly"> OnlyNumber type="text" [readonly]="isReadOnly">
<mat-error> Invalid year format</mat-error> <mat-error> Invalid year format</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Number of Financial Years" <input matInput autocomplete="off" placeholder="Number of Financial Years"
formControlName="financial_no_of_year" (change)="dynamicalFinYear($event)" formControlName="financial_no_of_year" (change)="dynamicalFinYear($event)"
(keypress)="keyPress($event)" [readonly]="isReadOnly"> OnlyNumber type="text" [readonly]="isReadOnly">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="financial_no_of_year != ''" formArrayName="date_per_financial"> <div *ngIf="financial_no_of_year != ''" formArrayName="date_per_financial">
@ -57,7 +57,7 @@
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Annual Sale" <input matInput autocomplete="off" placeholder="Annual Sale"
formControlName="financial_annual_sale" (change)="calculationForFinanicalStatement()" formControlName="financial_annual_sale" (change)="calculationForFinanicalStatement()"
(keypress)="keyPress($event)" (keyup)="inWords($event,i,1)"> OnlyNumber type="text" (keyup)="inWords($event,i,1)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annual_sale').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annual_sale').value != ''">{{"&#8377;"}}
{{FY_annualSalesInwords[i]}} Only</mat-hint> {{FY_annualSalesInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -65,7 +65,7 @@
<mat-form-field style="width:60%"> <mat-form-field style="width:60%">
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" <input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %"
formControlName="financial_annualsales_variation" [ngClass]="details.get('financial_annualsales_variation').value > 0 ? 'greenhighlight' : 'highlight'" formControlName="financial_annualsales_variation" [ngClass]="details.get('financial_annualsales_variation').value > 0 ? 'greenhighlight' : 'highlight'"
(keypress)="keyPress($event)" readonly> OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' "> <mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' ">
<span *ngIf="details.get('financial_annualsales_variation').value == 0"> <span *ngIf="details.get('financial_annualsales_variation').value == 0">
No difference in Sales in FY <i> No difference in Sales in FY <i>
@ -99,7 +99,7 @@
</div> </div>
<div style="width:100%"> <div style="width:100%">
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" > --> <!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" OnlyNumber type="text" > -->
<mat-select placeholder="Is there Net Profit or Net Loss?" <mat-select placeholder="Is there Net Profit or Net Loss?"
formControlName="finanical_profit_or_loss" (selectionChange)="selectedProfitOrLossType($event,details)"> formControlName="finanical_profit_or_loss" (selectionChange)="selectedProfitOrLossType($event,details)">
<mat-option value="1">Net Profit</mat-option> <mat-option value="1">Net Profit</mat-option>
@ -110,13 +110,13 @@
<mat-form-field style="width:28%"> <mat-form-field style="width:28%">
<input matInput autocomplete="off" placeholder="Net Profit Amount" <input matInput autocomplete="off" placeholder="Net Profit Amount"
formControlName="financial_net_profit" (change)="calculationForFinanicalStatement()" formControlName="financial_net_profit" (change)="calculationForFinanicalStatement()"
(keypress)="keyPress($event)" (keyup)="inWords($event,i,2)"> OnlyNumber type="text" (keyup)="inWords($event,i,2)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_profit').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_profit').value != ''">{{"&#8377;"}}
{{FY_netProfitAmtInwords[i]}} Only</mat-hint> {{FY_netProfitAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:28%"> <mat-form-field style="width:28%">
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" <input matInput autocomplete="off" placeholder="Net Profit to Sales in %"
formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" formControlName="financial_margin_of_profit" OnlyNumber type="text"
readonly> readonly>
</mat-form-field> </mat-form-field>
</span> </span>
@ -124,13 +124,13 @@
<mat-form-field style="width:28%"> <mat-form-field style="width:28%">
<input matInput autocomplete="off" placeholder="Net Loss Amount" <input matInput autocomplete="off" placeholder="Net Loss Amount"
formControlName="financial_net_loss" (change)="calculationForFinanicalStatement()" formControlName="financial_net_loss" (change)="calculationForFinanicalStatement()"
(keypress)="keyPress($event)" (keyup)="inWords($event,i,3)"> OnlyNumber type="text" (keyup)="inWords($event,i,3)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_loss').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_loss').value != ''">{{"&#8377;"}}
{{FY_netLossAmtInwords[i]}} Only</mat-hint> {{FY_netLossAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:28%"> <mat-form-field style="width:28%">
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %" <input matInput autocomplete="off" placeholder="Net Loss to Sales in %"
formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" formControlName="financial_margin_of_loss" OnlyNumber type="text"
reaonly> reaonly>
</mat-form-field> </mat-form-field>
</span> </span>
@ -139,7 +139,7 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput autocomplete="off" [ngClass]="details.controls['financial_variation'].value > 0 ? 'greenhighlight' : 'highlight'" <input matInput autocomplete="off" [ngClass]="details.controls['financial_variation'].value > 0 ? 'greenhighlight' : 'highlight'"
placeholder="Profit Variation from Previous Year in %" placeholder="Profit Variation from Previous Year in %"
formControlName="financial_variation" (keypress)="keyPress($event)" formControlName="financial_variation" OnlyNumber type="text"
readonly> readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' "> <mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' ">
<span *ngIf="details.get('financial_variation').value == 0"> <span *ngIf="details.get('financial_variation').value == 0">
@ -174,7 +174,7 @@
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput autocomplete="off" [ngClass]="details.get('financial_profit_to_sale_variation').value > 0 ? 'greenhighlight' : 'highlight'" <input matInput autocomplete="off" [ngClass]="details.get('financial_profit_to_sale_variation').value > 0 ? 'greenhighlight' : 'highlight'"
placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation" placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation"
(keypress)="keyPress($event)" readonly> OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' "> <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"> <span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
No difference in Profit sales % in FY <i> No difference in Profit sales % in FY <i>
@ -277,17 +277,17 @@
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' "> <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%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Profit % From" <input matInput autocomplete="off" placeholder="Net Profit % From"
formControlName="estimate_profit_range_from" type="number" formControlName="estimate_profit_range_from" OnlyNumber type="text"
min='0' max='100' (change)="calculateMarginProfit( i, details);"> min='0' max='100' (change)="calculateMarginProfit( i, details);">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Profit % To" <input matInput autocomplete="off" placeholder="Net Profit % To"
formControlName="estimate_profit_range_to" type="number" formControlName="estimate_profit_range_to" OnlyNumber type="text"
min='0' max='100' (change)="calculateMarginProfit( i, details);"> min='0' max='100' (change)="calculateMarginProfit( i, details);">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Profit % Considered" <input matInput autocomplete="off" placeholder="Net Profit % Considered"
formControlName="estimate_profit_margin_percent" type="number" formControlName="estimate_profit_margin_percent" OnlyNumber type="text"
readonly> readonly>
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"&#8377;"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"&#8377;"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> --> <!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"&#8377;"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"&#8377;"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> -->
</mat-form-field> </mat-form-field>
@ -302,14 +302,14 @@
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'no' "> <div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'no' ">
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Profit Amount From" <input matInput autocomplete="off" placeholder="Net Profit Amount From"
formControlName="estimate_net_profit_from" type="number" formControlName="estimate_net_profit_from" OnlyNumber type="text"
(change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,7)"> (change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,7)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"&#8377;"}}
{{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint> {{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Profit Amount To" <input matInput autocomplete="off" placeholder="Net Profit Amount To"
formControlName="estimate_net_profit_to" type="number" formControlName="estimate_net_profit_to" OnlyNumber type="text"
(change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,8)"> (change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,8)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"&#8377;"}}
{{AV_netProfitAmtToInwords[i]}} Only </mat-hint> {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
@ -320,7 +320,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Considered Profit Amount" <input matInput autocomplete="off" placeholder="Considered Profit Amount"
formControlName="estimate_net_profit" type="number" formControlName="estimate_net_profit" OnlyNumber type="text"
readonly> readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"&#8377;"}}
{{AV_netProfitAmtInwords[i]}} Only </mat-hint> {{AV_netProfitAmtInwords[i]}} Only </mat-hint>
@ -330,16 +330,16 @@
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss % From" <input matInput autocomplete="off" placeholder="Net Loss % From"
formControlName="estimate_loss_range_from" min='0' max='100' formControlName="estimate_loss_range_from" min='0' max='100'
type="number" (change)="calculateMarginLoss( i, details);"> OnlyNumber type="text" (change)="calculateMarginLoss( i, details);">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss % To" <input matInput autocomplete="off" placeholder="Net Loss % To"
formControlName="estimate_loss_range_to" min='0' max='100' formControlName="estimate_loss_range_to" min='0' max='100'
type="number" (change)="calculateMarginLoss( i, details);"> OnlyNumber type="text" (change)="calculateMarginLoss( i, details);">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss % Considered" <input matInput autocomplete="off" placeholder="Net Loss % Considered"
formControlName="estimate_loss_margin_percent" type="number" formControlName="estimate_loss_margin_percent" OnlyNumber type="text"
readonly> readonly>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
@ -352,14 +352,14 @@
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'no' "> <div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'no' ">
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss Amount From" <input matInput autocomplete="off" placeholder="Net Loss Amount From"
formControlName="estimate_net_loss_from" type="number" formControlName="estimate_net_loss_from" OnlyNumber type="text"
(change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,9)"> (change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,9)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_from').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_from').value != ''">{{"&#8377;"}}
{{AV_netLossAmtFrmInwords[i]}} Only </mat-hint> {{AV_netLossAmtFrmInwords[i]}} Only </mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss Amount To" <input matInput autocomplete="off" placeholder="Net Loss Amount To"
formControlName="estimate_net_loss_to" type="number" formControlName="estimate_net_loss_to" OnlyNumber type="text"
(change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,10)"> (change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,10)">
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"&#8377;"}}
{{AV_netLossAmtToInwords[i]}} Only </mat-hint> {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
@ -370,7 +370,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Considered Loss Amount" <input matInput autocomplete="off" placeholder="Considered Loss Amount"
formControlName="estimate_net_loss" type="number" readonly> formControlName="estimate_net_loss" OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"&#8377;"}}
{{AV_netLossAmtInwords[i]}} Only</mat-hint> {{AV_netLossAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -400,15 +400,15 @@
<!-- <mat-card-subtitle> Working Capital Details </mat-card-subtitle> --> <!-- <mat-card-subtitle> Working Capital Details </mat-card-subtitle> -->
<mat-form-field style="width:92%"> <mat-form-field style="width:92%">
<input matInput autocomplete="off" placeholder="In case of Credit Sales, what is the average no of days taken to receive the money?" <input matInput autocomplete="off" placeholder="In case of Credit Sales, what is the average no of days taken to receive the money?"
formControlName="receive_the_money_in_days" type="number"> formControlName="receive_the_money_in_days" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:92%"> <mat-form-field style="width:92%">
<input matInput autocomplete="off" placeholder="In case of Credit Purchase, what is the average no of days taken to pay the money?" <input matInput autocomplete="off" placeholder="In case of Credit Purchase, what is the average no of days taken to pay the money?"
formControlName="pay_the_money_in_days" type="number"> formControlName="pay_the_money_in_days" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:92%"> <mat-form-field style="width:92%">
<input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?" <input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?"
formControlName="unsold_stock_lies_in_days" type="number"> formControlName="unsold_stock_lies_in_days" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:92%"> <mat-form-field style="width:92%">
<mat-select placeholder="Is there Working Capital Facilities?" formControlName="is_there_working_capital_available"> <mat-select placeholder="Is there Working Capital Facilities?" formControlName="is_there_working_capital_available">

View File

@ -1693,17 +1693,6 @@ export class FinancialInfoComponent implements OnInit {
}); });
} }
/** On Key Press Event For Input Field */
keyPress(event: any) {
//const pattern = /[0-9\-\.\ ]/;
const pattern = /[0-9\.]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To Convert Amount into Words */ /** To Convert Amount into Words */
inWords(e,i,flag:number){ inWords(e,i,flag:number){

View File

@ -49,7 +49,7 @@
<mat-header-cell *matHeaderCellDef> Age </mat-header-cell> <mat-header-cell *matHeaderCellDef> Age </mat-header-cell>
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i"> <mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" <input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3"
(keypress)="keyPress($event)" autocomplete="off"> OnlyNumber type="text" autocomplete="off">
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="qualification"> <ng-container matColumnDef="qualification">
@ -126,12 +126,12 @@
<p>Number of Years For Which The Business Has Been Running</p> <p>Number of Years For Which The Business Has Been Running</p>
<mat-form-field style="width: 20%;"> <mat-form-field style="width: 20%;">
<input matInput placeholder="Year" formControlName="business_years" required <input matInput placeholder="Year" formControlName="business_years" required
autocomplete="off" (keypress)="keyPress($event)"> autocomplete="off" OnlyNumber type="text">
<mat-error>Please Enter Correct Year</mat-error> <mat-error>Please Enter Correct Year</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 20%;"> <mat-form-field style="width: 20%;">
<input matInput type="text" placeholder="Month" formControlName="business_month" <input matInput type="text" placeholder="Month" formControlName="business_month"
autocomplete="off" (keypress)="keyPress($event)" (change)="ConvertMonthintoYearforBusiness($event.target.value,c)"> autocomplete="off" OnlyNumber type="text" (change)="ConvertMonthintoYearforBusiness($event.target.value,c)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 40%;"> <mat-form-field style="width: 40%;">
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object" <input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object"

View File

@ -634,16 +634,6 @@ export class GeneralInfoComponent implements OnInit {
} }
/**************************** submit form details Ends Here ***********************/ /**************************** submit form details Ends Here ***********************/
/** On Key Press Event For Amount and Number Fields */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
// convert month to year business has been running // convert month to year business has been running
ConvertMonthintoYearforBusiness(e, controlIndex) { ConvertMonthintoYearforBusiness(e, controlIndex) {
let control: any = this._generalForm.get('companies') as FormArray; let control: any = this._generalForm.get('companies') as FormArray;

View File

@ -24,14 +24,14 @@
<mat-card-content class="matcard"> <mat-card-content class="matcard">
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" <input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount"
(keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" OnlyNumber type="text" (keyup)="inWords($event,1)" (change)="loanCalc()"
autocomplete="off"> autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}}
{{loanAmtInWords}} Only</mat-hint> {{loanAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field style="width: 28%">
<mat-label>Loan Tenure applied for?</mat-label> <mat-label>Loan Tenure applied for?</mat-label>
<input matInput placeholder="No of months" formControlName="loan_tenure" (keypress)="keyPress($event)" <input matInput placeholder="No of months" formControlName="loan_tenure" OnlyNumber type="text"
autocomplete="off"> autocomplete="off">
</mat-form-field> </mat-form-field>
@ -59,7 +59,7 @@
<span *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''"> <span *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="What is the amount for Balance Transfer ? " <input matInput placeholder="What is the amount for Balance Transfer ? "
(keypress)="keyPress($event)" formControlName="balance_transfer_amount" OnlyNumber type="text" formControlName="balance_transfer_amount"
(keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off"> (keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}}
{{balTxrfAmtInWords}} Only</mat-hint> {{balTxrfAmtInWords}} Only</mat-hint>
@ -80,7 +80,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" <input matInput placeholder="Top Up Amount" OnlyNumber type="text"
formControlName="topup_amount" (keyup)="inWords($event,5)" formControlName="topup_amount" (keyup)="inWords($event,5)"
autocomplete="off"> autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}}
@ -106,7 +106,7 @@
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="Amount of Own Contribution" <input matInput placeholder="Amount of Own Contribution"
formControlName="own_contribution" (keypress)="keyPress($event)" formControlName="own_contribution" OnlyNumber type="text"
(keyup)="inWords($event,4)" autocomplete="off"> (keyup)="inWords($event,4)" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}}
{{ownContributionInWords}} Only</mat-hint> {{ownContributionInWords}} Only</mat-hint>
@ -134,7 +134,7 @@
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" <input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level"
(keypress)="keyPress($event)" (keyup)="inWords($event,6)" autocomplete="off"> OnlyNumber type="text" (keyup)="inWords($event,6)" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"&#8377;"}}
{{emiAmtInWords}} Only</mat-hint> {{emiAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -204,7 +204,7 @@
<mat-form-field style="width:46%"> <mat-form-field style="width:46%">
<input matInput placeholder="Estimate Market Value as Per Customer" <input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" formControlName="emv_per_customer" OnlyNumber type="text"
(keyup)="inWords($event,7)" autocomplete="off"> (keyup)="inWords($event,7)" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}}
{{emvAmtInWords}} Only</mat-hint> {{emvAmtInWords}} Only</mat-hint>

View File

@ -524,16 +524,6 @@ export class LoanDetailsComponent implements OnInit {
} }
/** On Key Press Event For Amount */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** To Convert Amount into Words */ /** To Convert Amount into Words */
inWords(e, flag: number) { inWords(e, flag: number) {
switch (flag) { switch (flag) {

View File

@ -43,17 +43,17 @@
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width: 42%" *ngIf="neighbourhood.controls.do_know.value=='Yes'"> --> <!-- <mat-form-field style="width: 42%" *ngIf="neighbourhood.controls.do_know.value=='Yes'"> -->
<!-- <input matInput autocomplete="off" placeholder="How Long to Know the Applicant " formControlName="how_long_do_know" type="text" (keypress)="keyPress($event)"> --> <!-- <input matInput autocomplete="off" placeholder="How Long to Know the Applicant " formControlName="how_long_do_know" type="text" OnlyNumber type="text"> -->
<!-- </mat-form-field> --> <!-- </mat-form-field> -->
<div fxLayout="row wrap" *ngIf="neighbourhood.controls.do_know.value!=''"> <div fxLayout="row wrap" *ngIf="neighbourhood.controls.do_know.value!=''">
<div fxFlex="80"> <div fxFlex="80">
<label>As per you how long has this business been in operation?</label> <label>As per you how long has this business been in operation?</label>
<mat-form-field *ngIf="!this.isDisplay[n]"> <mat-form-field *ngIf="!this.isDisplay[n]">
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="how_long_do_know_in_year" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Year(s)" formControlName="how_long_do_know_in_year" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="!this.isDisplay[n]"> <mat-form-field *ngIf="!this.isDisplay[n]">
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="how_long_do_know_in_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(neighbourhood,$event.target.value,1)"> <input matInput autocomplete="off" placeholder="Month(s)" formControlName="how_long_do_know_in_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(neighbourhood,$event.target.value,1)">
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="10" style="text-align: center;"> <div fxFlex="10" style="text-align: center;">
@ -134,15 +134,15 @@
<input matInput autocomplete="off" placeholder="Name" formControlName="reference_name" type="text"> <input matInput autocomplete="off" placeholder="Name" formControlName="reference_name" type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 24%"> <mat-form-field style="width: 24%">
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile" type="text" OnlyNumber type="text">
<mat-error *ngIf="reference['controls'].mobile.hasError('maxlength') || reference['controls'].mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="reference['controls'].mobile.hasError('maxlength') || reference['controls'].mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 12%"> <mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder=" STD " formControlName="std_code" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder=" STD " formControlName="std_code" type="text" OnlyNumber type="text">
<mat-error *ngIf="reference['controls'].std_code.hasError('maxlength') || reference['controls'].std_code.hasError('minlength')">Enter Valid STD Code. </mat-error> <mat-error *ngIf="reference['controls'].std_code.hasError('maxlength') || reference['controls'].std_code.hasError('minlength')">Enter Valid STD Code. </mat-error>
</mat-form-field> <span>-</span> </mat-form-field> <span>-</span>
<mat-form-field style="width: 20%"> <mat-form-field style="width: 20%">
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Landline Number" formControlName="landline" type="text" OnlyNumber type="text">
<mat-error *ngIf="reference['controls'].landline.hasError('maxlength') || reference['controls'].landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="reference['controls'].landline.hasError('maxlength') || reference['controls'].landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field style="width: 28%">
@ -162,13 +162,13 @@
</mat-form-field> </mat-form-field>
<p #period_paragraph>Period of Relationship</p> <p #period_paragraph>Period of Relationship</p>
<mat-form-field style="width: 12%"> <mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="year_relation_applicant" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Year(s)" formControlName="year_relation_applicant" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 12%"> <mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="months_relation_applicant" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(reference,$event.target.value,2)"> <input matInput autocomplete="off" placeholder="Month(s)" formControlName="months_relation_applicant" OnlyNumber type="text" (change)="ConvertMonthintoYear(reference,$event.target.value,2)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field style="width: 28%">
<input matInput autocomplete="off" [placeholder]="reference.controls.relationship_with.value ==4 ? 'Rent Amount' : 'Volume of Business'" formControlName="business_volume_amount" type="text" (keypress)="keyPress($event)" (keyup)="inWords($event,r)"> <input matInput autocomplete="off" [placeholder]="reference.controls.relationship_with.value ==4 ? 'Rent Amount' : 'Volume of Business'" formControlName="business_volume_amount" type="text" OnlyNumber type="text" (keyup)="inWords($event,r)">
<mat-hint align="start" style="font-size:70%" *ngIf="reference.controls.business_volume_amount.value != ''">{{"&#8377;"}} {{amtInwords[r]}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="reference.controls.business_volume_amount.value != ''">{{"&#8377;"}} {{amtInwords[r]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 22%"> <mat-form-field style="width: 22%">

View File

@ -222,16 +222,6 @@ export class NeighbourHoodComponent implements OnInit {
remove_control.removeAt(renoveIndex) remove_control.removeAt(renoveIndex)
} }
/** On Key Press Event For Mobile Number */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
//save heighbourhood forms //save heighbourhood forms
saveNeighbourhood(formData:any){ saveNeighbourhood(formData:any){
let resultMessage:string=''; let resultMessage:string='';

View File

@ -59,7 +59,7 @@
<mat-form-field style="width:45%" *ngIf="details.get('source').value == 5"> <mat-form-field style="width:45%" *ngIf="details.get('source').value == 5">
<input matInput autocomplete="off" placeholder="Address" <input matInput autocomplete="off" placeholder="Address"
formControlName="address"> formControlName="address">
<!-- <mat-hint align="end"><i (click)="Toview()">Click Here To view Rental Info Form</i></mat-hint> --> <mat-hint align="end"><i (click)="Toview()">Rental Info Details</i></mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
@ -78,7 +78,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<input matInput autocomplete="off" placeholder="Amount" formControlName="amount" (keypress)="keyPress($event)" (keyup)="inWords($event,i)"> <input matInput autocomplete="off" placeholder="Amount" formControlName="amount" OnlyNumber type="text" (keyup)="inWords($event,i)">
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('amount').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="details.get('amount').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
@ -333,7 +333,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput autocomplete="off" placeholder="Amount" formControlName="amount" (keypress)="keyPress($event)" required> <input matInput autocomplete="off" placeholder="Amount" formControlName="amount" OnlyNumber type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select placeholder="Frequency" formControlName="frequency" required> <mat-select placeholder="Frequency" formControlName="frequency" required>

View File

@ -237,22 +237,13 @@ public viewerOptions: any = {
}); });
} }
/** On Key Press Event For Amount */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
/** Amount InWords */ /** Amount InWords */
inWords(e,i){ inWords(e,i){
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value); this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
} }
Toview(){ Toview(){
alert('Rental Info '); // alert('Rental Info ');
// const dialogRef = this.dialog.open(RentalInfoComponent, { // const dialogRef = this.dialog.open(RentalInfoComponent, {
// data: {} // data: {}
// }); // });

View File

@ -39,7 +39,7 @@
<mat-form-field *ngIf="mainDetails['controls'].entity_ans.value=='individual'" style="width: 20%"> <mat-form-field *ngIf="mainDetails['controls'].entity_ans.value=='individual'" style="width: 20%">
<input matInput placeholder="Age" formControlName="age_ans" type="text" required (keypress)="keyPress($event)"> <input matInput placeholder="Age" formControlName="age_ans" type="text" required OnlyNumber type="text">
<mat-error *ngIf="mainDetails['controls'].age_ans.hasError('pattern') || mainDetails['controls'].age_ans.hasError('maxlength') || mainDetails['controls'].age_ans.hasError('minlength')">Enter Valid Age. </mat-error> <mat-error *ngIf="mainDetails['controls'].age_ans.hasError('pattern') || mainDetails['controls'].age_ans.hasError('maxlength') || mainDetails['controls'].age_ans.hasError('minlength')">Enter Valid Age. </mat-error>
</mat-form-field> </mat-form-field>
@ -69,7 +69,7 @@
<mat-form-field *ngIf="mainDetails['controls'].entity_ans.value=='non-individual'" style="width: 20%"> <mat-form-field *ngIf="mainDetails['controls'].entity_ans.value=='non-individual'" style="width: 20%">
<input matInput placeholder="Vintage" formControlName="vintage_ans" type="text" required (keypress)="keyPress($event)"> <input matInput placeholder="Vintage" formControlName="vintage_ans" type="text" required OnlyNumber type="text">
<mat-error *ngIf="mainDetails['controls'].vintage_ans.hasError('pattern') || mainDetails['controls'].vintage_ans.hasError('maxlength') || mainDetails['controls'].vintage_ans.hasError('minlength')">Enter Valid Vintage. </mat-error> <mat-error *ngIf="mainDetails['controls'].vintage_ans.hasError('pattern') || mainDetails['controls'].vintage_ans.hasError('maxlength') || mainDetails['controls'].vintage_ans.hasError('minlength')">Enter Valid Vintage. </mat-error>
</mat-form-field> </mat-form-field>
@ -155,7 +155,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="coDetails['controls'].entity_ans.value=='non-individual'" style="width: 20%"> <mat-form-field *ngIf="coDetails['controls'].entity_ans.value=='non-individual'" style="width: 20%">
<input matInput placeholder="Vintage" formControlName="vintage_ans" type="text" required (keypress)="keyPress($event)"> <input matInput placeholder="Vintage" formControlName="vintage_ans" type="text" required OnlyNumber type="text">
<mat-error *ngIf="coDetails['controls'].vintage_ans.hasError('pattern') || coDetails['controls'].vintage_ans.hasError('maxlength') || coDetails['controls'].vintage_ans.hasError('minlength')">Enter Valid Vintage.</mat-error> <mat-error *ngIf="coDetails['controls'].vintage_ans.hasError('pattern') || coDetails['controls'].vintage_ans.hasError('maxlength') || coDetails['controls'].vintage_ans.hasError('minlength')">Enter Valid Vintage.</mat-error>
</mat-form-field> </mat-form-field>

View File

@ -193,17 +193,6 @@ public viewerOptions: any = {
}, error => this.errorMessage = <any> error); }, error => this.errorMessage = <any> error);
} }
/** On Key Press Event For Mobile Number */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
// init form details // init form details
public initFormDetails(): void { public initFormDetails(): void {
this._personalForm = this._fb.group({ this._personalForm = this._fb.group({

View File

@ -9,7 +9,6 @@
</h2> </h2>
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;"> <div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
<!-- <form [formGroup]="" class="address"> -->
<form [formGroup]="stockForms" (submit)="submitDetails($event); false;"> <form [formGroup]="stockForms" (submit)="submitDetails($event); false;">
<mat-dialog-content> <mat-dialog-content>
<mat-tab-group> <mat-tab-group>
@ -18,9 +17,6 @@
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex="100"> <div fxFlex="100">
<mat-card *ngIf="manufacturingForm"> <mat-card *ngIf="manufacturingForm">
<!-- <mat-card-header>
<mat-card-title class="highlight"> Manufacturing Details </mat-card-title>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Manufacturing Stock Details</h5> <h5 class="highlight" style="margin: 12px;">Manufacturing Stock Details</h5>
<div formArrayName="manufacturing_details"> <div formArrayName="manufacturing_details">
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i"> <div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
@ -33,8 +29,7 @@
<input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" > <input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<!-- <mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" > --> <mat-select placeholder="Stock" formControlName="stock_observed" (selectionChange)="checkComments($event.value,1,a)">
<mat-select placeholder="Stock" formControlName="stock_observed">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option value="yes">Add Stock Details</mat-option> <mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option> <mat-option value="no">No Stock Observed</mat-option>
@ -42,7 +37,7 @@
</mat-form-field> </mat-form-field>
<span *ngIf="mrm.get('stock_observed').value == 'yes'" > <span *ngIf="mrm.get('stock_observed').value == 'yes'" >
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Unit of Measurement" <mat-select placeholder="Unit of Measurement"
@ -55,12 +50,9 @@
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="other_uom" > <input matInput autocomplete="off" placeholder="Specify UOM" formControlName="other_uom" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event.target.value,1,a)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" OnlyNumber type="text">
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords[a]}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{mrm.get('raw_value').value | numberToWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)">
</mat-form-field> -->
</span> </span>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
@ -81,6 +73,7 @@
</mat-card> </mat-card>
</div> </div>
</span> </span>
<span *ngIf="RMCommentCard">
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw"> <mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -92,7 +85,7 @@
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label> <mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span>
<div formArrayName="manufacturing_finished_goods"> <div formArrayName="manufacturing_finished_goods">
@ -104,8 +97,7 @@
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" > <input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<!-- <mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" > --> <mat-select placeholder="Stock" formControlName="goods_observed" (selectionChange)="checkComments($event.value,2,b)">
<mat-select placeholder="Stock" formControlName="goods_observed">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option value="yes">Add Stock Details</mat-option> <mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option> <mat-option value="no">No Stock Observed</mat-option>
@ -113,7 +105,7 @@
</mat-form-field> </mat-form-field>
<span *ngIf="mfg.get('goods_observed').value == 'yes'" > <span *ngIf="mfg.get('goods_observed').value == 'yes'" >
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Unit of Measurement" <mat-select placeholder="Unit of Measurement"
@ -126,20 +118,10 @@
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" > <input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event.target.value,2,b)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" OnlyNumber type="text">
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords[b]}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{mfg.get('goods_value').value | numberToWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</span> </span>
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods(1)"
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="b==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(b,1)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="b>0">
<mat-icon>delete</mat-icon>
</button> -->
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<div align="right"> <div align="right">
@ -154,10 +136,6 @@
<strong>Add More Finished Goods </strong> <strong>Add More Finished Goods </strong>
</button> </button>
</div> </div>
<!-- <button type="button" mat-flat-button (click)="deleteGoods(b,1)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last" align="center">
<strong>Delete Finished Goods </strong>
</button> -->
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>
@ -167,10 +145,6 @@
</mat-card> </mat-card>
<mat-card *ngIf="retailForm"> <mat-card *ngIf="retailForm">
<!-- <mat-card-header>
<mat-card-title class="highlight"><p>Retail Details</p></mat-card-title>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Retail Trading Details</h5> <h5 class="highlight" style="margin: 12px;">Retail Trading Details</h5>
<div formArrayName="retail_details"> <div formArrayName="retail_details">
<div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index" [formGroupName]="j"> <div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index" [formGroupName]="j">
@ -183,7 +157,7 @@
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" > <input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Stock" formControlName="traded_goods_observed"> <mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,3,e)">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option value="yes">Add Stock Details</mat-option> <mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option> <mat-option value="no">No Stock Observed</mat-option>
@ -191,7 +165,7 @@
</mat-form-field> </mat-form-field>
<span *ngIf="item.get('traded_goods_observed').value == 'yes'" > <span *ngIf="item.get('traded_goods_observed').value == 'yes'" >
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Unit of Measurement" <mat-select placeholder="Unit of Measurement"
@ -204,34 +178,10 @@
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" > <input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event.target.value,3,e)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" OnlyNumber type="text">
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords[e]}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{item.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</span> </span>
<!-- <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,3,e)">
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="rtrdCommentFlag[e]" appearance="outline" style="width: 90%">
<!-- *ngIf="item.get('is_sufficiant_traded_goods').value == 'no'"
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>-->
<!-- <button type="button" mat-raised-button mat-icon-button (click)=""
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="e==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)=""
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="e>0">
<mat-icon>delete</mat-icon>
</button> -->
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<div align="right"> <div align="right">
@ -256,11 +206,6 @@
</mat-card> </mat-card>
<mat-card *ngIf="tradingForm"> <mat-card *ngIf="tradingForm">
<!-- <mat-card-header>
<mat-card-title class="highlight"><p>Trading Details</p></mat-card-title>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Wholesale Trading Details</h5> <h5 class="highlight" style="margin: 12px;">Wholesale Trading Details</h5>
<div formArrayName="trade_details"> <div formArrayName="trade_details">
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k"> <div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k">
@ -274,7 +219,7 @@
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" > <input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Stock" formControlName="traded_goods_observed" > <mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,4,g)">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option value="yes">Add Stock Details</mat-option> <mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No stock observed</mat-option> <mat-option value="no">No stock observed</mat-option>
@ -282,7 +227,7 @@
</mat-form-field> </mat-form-field>
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'" > <span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'" >
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" OnlyNumber type="text">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Unit of Measurement" <mat-select placeholder="Unit of Measurement"
@ -295,35 +240,10 @@
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" > <input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event.target.value,4,g)"> <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" OnlyNumber type="text">
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords[g]}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradetg.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)">
</mat-form-field> -->
<!-- <mat-form-field style="width:90%">
<input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" >
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,4,g)">
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="wtrdCommentFlag[g]" appearance="outline" style="width: 90%">
<!-- //*ngIf="tradetg.get('is_sufficiant_traded_goods').value == 'no'"
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>-->
</span> </span>
<!-- <button type="button" mat-raised-button mat-icon-button (click)=""
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="g==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)=""
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="g>0">
<mat-icon>delete</mat-icon>
</button> -->
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<div align="center"> <div align="center">
@ -347,7 +267,7 @@
</mat-card> </mat-card>
<div *ngIf="finishedAndTradedGoodsCommentCard"> <div *ngIf="TGCommentCard">
<br> <br>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of finished / traded goods observed, sufficient considering the size of operations" formControlName="is_sufficiant_finished_and_traded_goods"> <mat-select placeholder="Is the stock of finished / traded goods observed, sufficient considering the size of operations" formControlName="is_sufficiant_finished_and_traded_goods">
@ -495,11 +415,3 @@
<!-- <div *ngIf="!noRecordsFound"> <i> {{ errorMessage }} </i> </div> --> <!-- <div *ngIf="!noRecordsFound"> <i> {{ errorMessage }} </i> </div> -->
<div *ngIf="!noRecordsFound" align="center"> <i> Fill Business Form First! / No Company Found at this ID {{company_id}}! .... </i> </div> <div *ngIf="!noRecordsFound" align="center"> <i> Fill Business Form First! / No Company Found at this ID {{company_id}}! .... </i> </div>
<notifier-container></notifier-container> <notifier-container></notifier-container>
<!-- <mat-card style="padding: 12px;">
<p>Stock Details</p>
<form [formGroup]="stockForms" class="address"> -->
<!-- {{uomData | json}} -->
<!-- <mat-card>
=======
<!-- {{uomData | json}} -->

View File

@ -41,24 +41,8 @@ export class StockComponent implements OnInit {
form_id: number; form_id: number;
company_id: string; company_id: string;
// rawmaterial : any; RMCommentCard: boolean = false;
TGCommentCard: boolean = false
M_rawValueInWords : any = [];
M_goodsValueInWords : any = [];
R_tradedGoodsValueInWords : any = [];
T_tradedGoodsValueInWords : any = [];
// rawMaterialAccess: Boolean = false;
// finishedGoodsAccess: Boolean = false;
// tradeConcernAccess: Boolean = false;
// serviceAccess: Boolean = false;
mrmCommentFlag: boolean = false;
finishedAndTradedGoodsCommentCard : boolean;
mfgCommentFlag:any=[];
rtrdCommentFlag:any=[];
wtrdCommentFlag:any=[];
serviceProviderForm: Boolean = false; serviceProviderForm: Boolean = false;
suppliers_raw_materials : any = []; suppliers_raw_materials : any = [];
@ -189,7 +173,6 @@ export class StockComponent implements OnInit {
if (val.type_of_activity_id == 2) { if (val.type_of_activity_id == 2) {
if(val.products){ if(val.products){
if(dataForm.manufacturing_details[0].manufacturing_finished_goods ){this.finishedAndTradedGoodsCommentCard = true;}
let manufacturing_temparr = []; let manufacturing_temparr = [];
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials; manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
this.stockForms.controls['manufacturing_details']['controls'][0].controls['is_sufficiant_raw'].setValue(dataForm.manufacturing_details[0].is_sufficiant_raw), this.stockForms.controls['manufacturing_details']['controls'][0].controls['is_sufficiant_raw'].setValue(dataForm.manufacturing_details[0].is_sufficiant_raw),
@ -201,7 +184,6 @@ export class StockComponent implements OnInit {
} }
if (val.type_of_activity_id == 3) { if (val.type_of_activity_id == 3) {
if(val.products){ if(val.products){
this.finishedAndTradedGoodsCommentCard = true;
let retail_temparr = []; let retail_temparr = [];
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods; retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
this.initRetailDetails(retail_temparr); this.initRetailDetails(retail_temparr);
@ -209,7 +191,6 @@ export class StockComponent implements OnInit {
} }
if (val.type_of_activity_id == 4) { if (val.type_of_activity_id == 4) {
if(val.products){ if(val.products){
this.finishedAndTradedGoodsCommentCard = true;
let trading_temparr = []; let trading_temparr = [];
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods; trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
this.initTradingDetails(trading_temparr); this.initTradingDetails(trading_temparr);
@ -243,7 +224,6 @@ export class StockComponent implements OnInit {
api.forEach(val => { api.forEach(val => {
if (val.type_of_activity_id == 2) { if (val.type_of_activity_id == 2) {
if(val.products){ if(val.products){
if(val.products){this.finishedAndTradedGoodsCommentCard = true;}
this.suppliers_raw_materials = rm_api; this.suppliers_raw_materials = rm_api;
this.suppliers_finished_goods = val.products; this.suppliers_finished_goods = val.products;
this.initManufacturingDetails(null); this.initManufacturingDetails(null);
@ -253,14 +233,12 @@ export class StockComponent implements OnInit {
} }
if (val.type_of_activity_id == 3) { if (val.type_of_activity_id == 3) {
if(val.products){ if(val.products){
this.finishedAndTradedGoodsCommentCard = true;
this.suppliers_retail_trade_details = val.products; this.suppliers_retail_trade_details = val.products;
this.initRetailDetails(null); this.initRetailDetails(null);
} }
} }
if (val.type_of_activity_id == 4) { if (val.type_of_activity_id == 4) {
if(val.products){ if(val.products){
this.finishedAndTradedGoodsCommentCard = true;
this.suppliers_wholesale_trade_details =val.products; this.suppliers_wholesale_trade_details =val.products;
this.initTradingDetails(null); this.initTradingDetails(null);
} }
@ -294,7 +272,6 @@ export class StockComponent implements OnInit {
api.forEach(val => { api.forEach(val => {
if (val.type_of_activity_id == 2) { if (val.type_of_activity_id == 2) {
if(val.products){ if(val.products){
if(val.products){this.finishedAndTradedGoodsCommentCard = true;}
this.suppliers_finished_goods = val.products; this.suppliers_finished_goods = val.products;
this.suppliers_raw_materials = rm_api; this.suppliers_raw_materials = rm_api;
this.initManufacturingDetails(null); this.initManufacturingDetails(null);
@ -305,13 +282,11 @@ export class StockComponent implements OnInit {
if (val.type_of_activity_id == 3) { if (val.type_of_activity_id == 3) {
if(val.products){ if(val.products){
this.suppliers_retail_trade_details= val.products; this.suppliers_retail_trade_details= val.products;
this.finishedAndTradedGoodsCommentCard = true;
this.initRetailDetails(null); this.initRetailDetails(null);
} }
} }
if (val.type_of_activity_id == 4) { if (val.type_of_activity_id == 4) {
if(val.products){ if(val.products){
this.finishedAndTradedGoodsCommentCard = true;
this.suppliers_wholesale_trade_details = val.products; this.suppliers_wholesale_trade_details = val.products;
this.initTradingDetails(null); this.initTradingDetails(null);
} }
@ -428,9 +403,7 @@ tradingFormCreation(val) {
if(datas.manufacturing_raw_materials != undefined){ if(datas.manufacturing_raw_materials != undefined){
// for (let val of datas.manufacturing_raw_materials) { // for (let val of datas.manufacturing_raw_materials) {
datas.manufacturing_raw_materials.forEach((val,index) => { datas.manufacturing_raw_materials.forEach((val,index) => {
if(val.raw_value){ this.checkComments(val.stock_observed,1,index);
this.inWords(val.raw_value,1,index);
}
// this.checkComments(val.is_sufficiant_raw,1,index); // this.checkComments(val.is_sufficiant_raw,1,index);
rawMaterial.push(this.createRawmaterial(val)); rawMaterial.push(this.createRawmaterial(val));
}); });
@ -441,13 +414,8 @@ tradingFormCreation(val) {
if(datas.manufacturing_finished_goods != undefined){ if(datas.manufacturing_finished_goods != undefined){
// for (let val of datas.manufacturing_finished_goods) { // for (let val of datas.manufacturing_finished_goods) {
datas.manufacturing_finished_goods.forEach((val,index) => { datas.manufacturing_finished_goods.forEach((val,index) => {
this.checkComments(val.goods_observed,2,index);
if(val.goods_value){
this.inWords(val.goods_value,2,index);
}
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
}); });
} }
else{ else{
@ -512,13 +480,8 @@ tradingFormCreation(val) {
if(datas.retail_traded_goods !== undefined){ if(datas.retail_traded_goods !== undefined){
// for (let val of datas.retail_traded_goods) { // for (let val of datas.retail_traded_goods) {
datas.retail_traded_goods.forEach((val,index) => { datas.retail_traded_goods.forEach((val,index) => {
this.checkComments(val.traded_goods_observed,3,index);
if(val.estimated_traded_goods_value){
this.inWords(val.estimated_traded_goods_value,3,index);
}
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
}); });
} }
else{ else{
@ -607,10 +570,7 @@ tradingFormCreation(val) {
{ {
// for (let val of datas.trading_traded_goods) { // for (let val of datas.trading_traded_goods) {
datas.trading_traded_goods.forEach((val,index) => { datas.trading_traded_goods.forEach((val,index) => {
this.checkComments(val.traded_goods_observed,4,index);
if(val.estimated_traded_goods_value){
this.inWords(val.estimated_traded_goods_value,4,index);
}
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
}); });
} }
@ -777,7 +737,7 @@ tradingFormCreation(val) {
this._pd.getAllMasterDatas('UOM').subscribe(data => { this._pd.getAllMasterDatas('UOM').subscribe(data => {
data.records.forEach(val => { data.records.forEach(val => {
if (val.isactive == 1) { if (val.isactive == 1 && val.is_land_uom == 0 || val.is_land_uom == 2) {
this.uomData.push(val); this.uomData.push(val);
} }
}) })
@ -794,53 +754,58 @@ tradingFormCreation(val) {
} }
} }
/** To Convert Amount into Words */ ManufacturingCounterArray: any = [];
inWords(e,flag:number,i){ FinishedCounterArray: any = [];
RetailCounterArray: any = [];
WholeSaleCounterArray: any = [];
switch(flag){ checkComments(value,flag,index){
case 1 : // console.log(value,flag,index);
this.M_rawValueInWords[i] = this._pd.convertNumberToWords(e); if(flag == 1){
break; this.ManufacturingCounterArray[index] = value == "yes" ? 1 : 0
case 2 : let RMOverallCount = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
this.M_goodsValueInWords[i] = this._pd.convertNumberToWords(e); this.RMCommentCard = RMOverallCount > 0 ? true : false ;
break;
case 3 :
this.R_tradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e);
break;
case 4 :
this.T_tradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e);
break;
default:
break;
} }
if(flag == 2){
this.FinishedCounterArray[index] = value == "yes" ? 1 : 0
}
if(flag == 3){
this.RetailCounterArray[index] = value == "yes" ? 1 : 0
}
if(flag == 4){
this.WholeSaleCounterArray[index] = value == "yes" ? 1 : 0
}
let FGOverallCount = this.FinishedCounterArray.reduce((sum, val) => sum + +val, 0);
let RTGOverallCount = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
let WTGOverallCount = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
let TGOverallCount = FGOverallCount + RTGOverallCount + WTGOverallCount;
this.TGCommentCard = TGOverallCount > 0 ? true : false ;
} }
// checkComments(e,flag,index){
checkComments(e,flag,index){ // if(flag == 1 && e=='no'){
// this.mrmCommentFlag = true;
if(flag == 1 && e=='no'){ // }
this.mrmCommentFlag = true; // else if(flag == 1 && e!='no'){
} // this.mrmCommentFlag = false;
else if(flag == 1 && e!='no'){ // }
this.mrmCommentFlag = false; // if(flag == 2 && e=='no'){
} // this.mfgCommentFlag[index] = true;
if(flag == 2 && e=='no'){ // }
this.mfgCommentFlag[index] = true; // else if(flag == 2 && e!='no'){
} // this.mfgCommentFlag[index] = false;
else if(flag == 2 && e!='no'){ // }
this.mfgCommentFlag[index] = false; // if(flag == 3 && e=='no'){
} // this.rtrdCommentFlag[index] = true;
if(flag == 3 && e=='no'){ // }
this.rtrdCommentFlag[index] = true; // else if(flag == 3 && e!='no'){
} // this.rtrdCommentFlag[index] = false;
else if(flag == 3 && e!='no'){ // }
this.rtrdCommentFlag[index] = false; // if(flag == 4 && e=='no'){
} // this.wtrdCommentFlag[index] = true;
if(flag == 4 && e=='no'){ // }
this.wtrdCommentFlag[index] = true; // else if(flag == 4 && e!='no'){
} // this.wtrdCommentFlag[index] = false;
else if(flag == 4 && e!='no'){ // }
this.wtrdCommentFlag[index] = false; // }
}
}
} }

View File

@ -55,15 +55,15 @@
</div> </div>
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="manufacturing_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10"> <input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="manufacturing_contact_person_mobile_number" OnlyNumber type="text" maxlength="10">
<mat-error>Enter Valid Mobile Number.</mat-error> <mat-error>Enter Valid Mobile Number.</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
<mat-error>Enter Valid STD Code Number.</mat-error> <mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
<mat-error>Enter Valid LandLine Number.</mat-error> <mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -117,7 +117,7 @@
<div fxLayout="row" *ngIf="mfgCreditCardFlag"> <div fxLayout="row" *ngIf="mfgCreditCardFlag">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="What % of Total Purchase is Done on Credit?" formControlName="main_raw_materials_total_payments_percent_on_credit" <input matInput placeholder="What % of Total Purchase is Done on Credit?" formControlName="main_raw_materials_total_payments_percent_on_credit"
type="number" autocomplete="off" (keypress)="keyPress($event)" maxlength="3"> type="number" autocomplete="off" OnlyNumber type="text" maxlength="3">
</mat-form-field> </mat-form-field>
</div> </div>
@ -172,16 +172,16 @@
</div> </div>
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10"> <input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="trade_product_contact_person_mobile_number" OnlyNumber type="text" maxlength="10">
<mat-error>Enter Valid Mobile Number.</mat-error> <mat-error>Enter Valid Mobile Number.</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
<mat-error>Enter Valid STD Code Number.</mat-error> <mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%"> <mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
<mat-error>Enter Valid LandLine Number.</mat-error> <mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -205,7 +205,7 @@
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <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 Provided by Supplier" autocomplete="off" formControlName="trade_product_credit_days" (keypress)="keyPress($event)"> <input matInput placeholder="No.of Days of Credit Provided by Supplier" autocomplete="off" formControlName="trade_product_credit_days" OnlyNumber type="text">
</mat-form-field> --> </mat-form-field> -->
<div fxLayout="row nowrap" style="padding-left: 2%;display: none !important;" *ngIf="items.get('trade_product_payment_type').value == 3"> <div fxLayout="row nowrap" style="padding-left: 2%;display: none !important;" *ngIf="items.get('trade_product_payment_type').value == 3">
<mat-label>No.of days of Credit Provided by Supplier </mat-label> <mat-label>No.of days of Credit Provided by Supplier </mat-label>
@ -233,7 +233,7 @@
</div> </div>
<div fxlayout="row" *ngIf="trdCreditCardFlag"> <div fxlayout="row" *ngIf="trdCreditCardFlag">
<mat-form-field style="width: 90%"> <mat-form-field style="width: 90%">
<input matInput placeholder="What % of Total Trade is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit" <input matInput placeholder="What % of Total Purchase is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
type="number" autocomplete="off"> type="number" autocomplete="off">
</mat-form-field> </mat-form-field>
</div> </div>

View File

@ -518,16 +518,6 @@ export class SupplierInfoComponent implements OnInit {
// this._addQuesFrom.reset(); // this._addQuesFrom.reset();
} }
/** On Key Press Event For Mobile Number */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
selectedPersonDesignation(items,e,flag){ selectedPersonDesignation(items,e,flag){
if(flag == 1){ if(flag == 1){
e==1 ? items.controls['other_person_designation'].setValidators([Validators.required]) e==1 ? items.controls['other_person_designation'].setValidators([Validators.required])