sheet changes : ps
This commit is contained in:
parent
509eea8b68
commit
6987831e17
@ -61,7 +61,7 @@
|
||||
|
||||
<mat-form-field style="width: 24%" *ngIf="item.get('pincode').value == 1">
|
||||
<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
|
||||
Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
@ -139,7 +139,7 @@
|
||||
<div fxFlex="100" fxLayout="nowrap">
|
||||
<mat-form-field style="width: 46%;">
|
||||
<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 style="width: 46%;">
|
||||
|
||||
@ -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 */
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
|
||||
@ -158,8 +158,9 @@
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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 != ''">{{"₹"}} {{OtherPremiumPaidInwords[s]}} Only</mat-hint>
|
||||
<!-- <mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{ "₹" + detail.get('premium_paid').value | numberToWords + 'Only'}} </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<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">
|
||||
<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 != ''">{{"₹"}} {{OtherSumAssuredInwords[s]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -210,7 +211,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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 != ''">{{"₹"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>-->
|
||||
|
||||
@ -254,7 +255,7 @@
|
||||
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<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 != ''">{{"₹"}} {{OtherAssetValueInwords[s]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -271,7 +272,7 @@
|
||||
<!--Desction Dynamic details : END -->
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5" 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 != ''">{{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -279,14 +280,22 @@
|
||||
<!-- <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-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)">
|
||||
<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-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-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isOtherOwner[i]" style="width:45%">
|
||||
@ -309,14 +318,14 @@
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
<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-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
<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-form-field>
|
||||
|
||||
@ -279,7 +279,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// this.initDetails(),
|
||||
]),
|
||||
// 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.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||
@ -611,17 +611,20 @@ export class AssetsInfoComponent implements OnInit {
|
||||
};
|
||||
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));
|
||||
this.setAssetsDetailsWithData(vals.assets_mode, val.details, control.length - 1)
|
||||
}
|
||||
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.setRequiredValidation(datas.name_of_the_owner,index,'',4);
|
||||
});
|
||||
@ -840,16 +843,6 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// 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 */
|
||||
loanTenureCalc(details ,flag)
|
||||
{
|
||||
@ -872,7 +865,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
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;
|
||||
// console.log('ParCtrls',ParCtrls);
|
||||
let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx];
|
||||
@ -905,19 +898,21 @@ export class AssetsInfoComponent implements OnInit {
|
||||
if (flag == 4) {
|
||||
let Avaliablity = 1;
|
||||
// console.log('val',value);
|
||||
if(value.length>0){
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Avaliablity == 0){
|
||||
// console.log('if Avaliablity',Avaliablity);
|
||||
console.log('if Avaliablity',Avaliablity);
|
||||
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
ChdCtrls.controls.other_owner.setValidators([Validators.required]);
|
||||
this.isOtherOwner[ParInx] = true;
|
||||
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
}else if(Avaliablity == 1){
|
||||
// console.log('else Avaliablity',Avaliablity);
|
||||
console.log('else Avaliablity',Avaliablity);
|
||||
// console.log('esle this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
ChdCtrls.controls.other_owner.setValue('');
|
||||
ChdCtrls.controls.other_owner.clearValidators();
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<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"
|
||||
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 != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -156,10 +156,10 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,14 +44,14 @@
|
||||
<label style="padding-left:2%">How long has business been operated from this premise?</label>
|
||||
<mat-form-field>
|
||||
<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-error *ngIf="!_businessAssetsQuesFrom.controls['business_years'].value.valid">Year's
|
||||
Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<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-error *ngIf="!_businessAssetsQuesFrom.controls['business_month'].value.valid">Month's
|
||||
Required</mat-error> -->
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
<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"
|
||||
(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 != ''">{{"₹"}}
|
||||
{{RentAmtInwordsForAddress[i]}} Only</mat-hint>
|
||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||
@ -101,7 +101,7 @@
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<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 != ''">{{"₹"}}
|
||||
{{appxMarketAmtInwordsForAddress[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -126,14 +126,14 @@
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<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-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Purchase Year</mat-label>
|
||||
<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-form-field>
|
||||
</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')">
|
||||
<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 != ''">{{"₹"}}
|
||||
{{RentAmtInwords[i]}} Only</mat-hint>
|
||||
<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'">
|
||||
<mat-form-field style="width:45%">
|
||||
<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 != ''">{{"₹"}}
|
||||
{{appxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -323,14 +323,14 @@
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<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-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Purchase Year</mat-label>
|
||||
<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-form-field>
|
||||
</div>
|
||||
|
||||
@ -608,12 +608,14 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_approximate_market_value);
|
||||
this.RentAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_monthly_rented_amt);
|
||||
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 => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
}
|
||||
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 */
|
||||
ConvertMonthintoYear(e,i) {
|
||||
// const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
|
||||
<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"
|
||||
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 != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -91,10 +91,10 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -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) {
|
||||
|
||||
if(flag == 1){
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
<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">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;">
|
||||
@ -69,16 +69,16 @@
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
|
||||
<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-form-field>
|
||||
<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-form-field>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput placeholder="Total Work Experience"
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required (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-form-field>
|
||||
</div>
|
||||
|
||||
@ -1658,16 +1658,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/** 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 */
|
||||
// inWords(e){
|
||||
|
||||
@ -65,11 +65,11 @@
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<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-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<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-form-field>
|
||||
</div>
|
||||
@ -177,15 +177,15 @@
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)">
|
||||
<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-form-field>
|
||||
<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-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<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-form-field>
|
||||
</div>
|
||||
@ -299,11 +299,11 @@
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<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-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<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-form-field>
|
||||
</div>
|
||||
|
||||
@ -676,16 +676,6 @@ export class ClientInfoComponent implements OnInit {
|
||||
// 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){
|
||||
if(flag == 1){
|
||||
e==1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type">
|
||||
</mat-form-field>
|
||||
<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 != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
@ -96,8 +96,8 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency">
|
||||
</mat-form-field>
|
||||
<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="details.get('loan_type').value + 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" OnlyNumber type="text" (keyup)="inWords($event,i,2)"> -->
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('emi').value != ''">{{"₹"}} {{emiAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field>
|
||||
@ -303,7 +303,7 @@
|
||||
<!-- {{frequencyData | json}} -->
|
||||
<!-- <mat-card-content class="matcard">
|
||||
<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-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
|
||||
@ -312,7 +312,7 @@
|
||||
</mat-select>
|
||||
</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>
|
||||
<input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" >
|
||||
|
||||
@ -244,25 +244,23 @@ export class CurrentLoanComponent implements OnInit {
|
||||
|
||||
if(val.mode == 1){
|
||||
let data;
|
||||
let owner
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.any_other_assets;
|
||||
});
|
||||
if(val.form_type == 'Data From Business Assets'){
|
||||
owner = val.owner_name.map((e => {
|
||||
if(val.owner_name.length>0){
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 2){
|
||||
|
||||
let data;
|
||||
let owner;
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.property_type;
|
||||
if(v.property_type != 1){
|
||||
@ -278,79 +276,65 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}else{
|
||||
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 => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
|
||||
});
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 3){
|
||||
let data;let owner;
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
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 => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 4){
|
||||
let data;let owner;
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
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 => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 6){
|
||||
let owner
|
||||
if(val.form_type == 'Data From Business Assets'){
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
if(val.owner_name.length>0){
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
|
||||
labelarray[index] = ' : '+owner+' - '+ val.mode_name;
|
||||
}
|
||||
if(val.mode == 7){
|
||||
let data;let owner;
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.investments_type != 1
|
||||
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
|
||||
: v.other_investments_type ;
|
||||
|
||||
});
|
||||
if(val.form_type == 'Data From Business Assets'){
|
||||
if(val.owner_name.length>0){
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
else {
|
||||
owner = val.owner_name;
|
||||
}
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
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 */
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<input matInput placeholder="Name" formControlName="applicant_name" type="text" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)"
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%">
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</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>
|
||||
@ -91,7 +91,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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 != ''">{{"₹"}} {{RentAmount[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -146,7 +146,7 @@
|
||||
<input matInput placeholder="Specify Others" formControlName="earning_if_others_segment">
|
||||
</mat-form-field>
|
||||
<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 != ''">{{"₹"}} {{IncomePerMonth[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
|
||||
@ -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 */
|
||||
inWords(e,flag:number,i){
|
||||
switch(flag){
|
||||
|
||||
@ -36,13 +36,13 @@
|
||||
<mat-form-field style="width:37%">
|
||||
<mat-label>Enter year from which financials provided</mat-label>
|
||||
<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-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Number of Financial Years"
|
||||
formControlName="financial_no_of_year" (change)="dynamicalFinYear($event)"
|
||||
(keypress)="keyPress($event)" [readonly]="isReadOnly">
|
||||
OnlyNumber type="text" [readonly]="isReadOnly">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="financial_no_of_year != ''" formArrayName="date_per_financial">
|
||||
@ -57,7 +57,7 @@
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale"
|
||||
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 != ''">{{"₹"}}
|
||||
{{FY_annualSalesInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -65,7 +65,7 @@
|
||||
<mat-form-field style="width:60%">
|
||||
<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'"
|
||||
(keypress)="keyPress($event)" readonly>
|
||||
OnlyNumber type="text" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' ">
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value == 0">
|
||||
No difference in Sales in FY <i>
|
||||
@ -110,13 +110,13 @@
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount"
|
||||
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 != ''">{{"₹"}}
|
||||
{{FY_netProfitAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %"
|
||||
formControlName="financial_margin_of_profit" (keypress)="keyPress($event)"
|
||||
formControlName="financial_margin_of_profit" OnlyNumber type="text"
|
||||
readonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
@ -124,13 +124,13 @@
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount"
|
||||
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 != ''">{{"₹"}}
|
||||
{{FY_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %"
|
||||
formControlName="financial_margin_of_loss" (keypress)="keyPress($event)"
|
||||
formControlName="financial_margin_of_loss" OnlyNumber type="text"
|
||||
reaonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
@ -139,7 +139,7 @@
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="details.controls['financial_variation'].value > 0 ? 'greenhighlight' : 'highlight'"
|
||||
placeholder="Profit Variation from Previous Year in %"
|
||||
formControlName="financial_variation" (keypress)="keyPress($event)"
|
||||
formControlName="financial_variation" OnlyNumber type="text"
|
||||
readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' ">
|
||||
<span *ngIf="details.get('financial_variation').value == 0">
|
||||
@ -174,7 +174,7 @@
|
||||
<mat-form-field style="width:45%">
|
||||
<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"
|
||||
(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 != '' ">
|
||||
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
||||
No difference in Profit sales % in FY <i>
|
||||
|
||||
@ -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 */
|
||||
inWords(e,i,flag:number){
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<mat-header-cell *matHeaderCellDef> Age </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3"
|
||||
(keypress)="keyPress($event)" autocomplete="off">
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="qualification">
|
||||
@ -126,12 +126,12 @@
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<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-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<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 style="width: 40%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object"
|
||||
|
||||
@ -634,16 +634,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
/**************************** 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
|
||||
ConvertMonthintoYearforBusiness(e, controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
|
||||
@ -24,14 +24,14 @@
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 64%">
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{loanAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<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">
|
||||
</mat-form-field>
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
|
||||
<mat-form-field style="width: 64%">
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{balTxrfAmtInWords}} Only</mat-hint>
|
||||
@ -80,7 +80,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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)"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}}
|
||||
@ -106,7 +106,7 @@
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}}
|
||||
{{ownContributionInWords}} Only</mat-hint>
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<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 != ''">{{"₹"}}
|
||||
{{emiAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -204,7 +204,7 @@
|
||||
|
||||
<mat-form-field style="width:46%">
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}}
|
||||
{{emvAmtInWords}} Only</mat-hint>
|
||||
|
||||
@ -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 */
|
||||
inWords(e, flag: number) {
|
||||
switch (flag) {
|
||||
|
||||
@ -43,17 +43,17 @@
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <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> -->
|
||||
|
||||
<div fxLayout="row wrap" *ngIf="neighbourhood.controls.do_know.value!=''">
|
||||
<div fxFlex="80">
|
||||
<label>As per you how long has this business been in operation?</label>
|
||||
<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 *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>
|
||||
</div>
|
||||
<div fxFlex="10" style="text-align: center;">
|
||||
@ -134,15 +134,15 @@
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="reference_name" type="text">
|
||||
</mat-form-field>
|
||||
<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-form-field>
|
||||
<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-form-field> <span>-</span>
|
||||
<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-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
@ -162,13 +162,13 @@
|
||||
</mat-form-field>
|
||||
<p #period_paragraph>Period of Relationship</p>
|
||||
<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 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 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 != ''">{{"₹"}} {{amtInwords[r]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 22%">
|
||||
|
||||
@ -222,16 +222,6 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
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
|
||||
saveNeighbourhood(formData:any){
|
||||
let resultMessage:string='';
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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 != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -333,7 +333,7 @@
|
||||
</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-select placeholder="Frequency" formControlName="frequency" required>
|
||||
|
||||
@ -237,15 +237,6 @@ 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 */
|
||||
inWords(e,i){
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
<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-form-field>
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<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-form-field>
|
||||
@ -155,7 +155,7 @@
|
||||
</mat-form-field>
|
||||
<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-form-field>
|
||||
|
||||
@ -193,17 +193,6 @@ public viewerOptions: any = {
|
||||
}, 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
|
||||
public initFormDetails(): void {
|
||||
this._personalForm = this._fb.group({
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
</h2>
|
||||
|
||||
<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;">
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
@ -18,9 +17,6 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<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>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<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" >
|
||||
</mat-form-field>
|
||||
<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)="selectedValueofStockObserved($event.value,a,1)">
|
||||
<mat-select placeholder="Stock" formControlName="stock_observed" (selectionChange)="checkComments($event.value,1,a)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -42,7 +37,7 @@
|
||||
</mat-form-field>
|
||||
<span *ngIf="mrm.get('stock_observed').value == 'yes'" >
|
||||
<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 style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
@ -55,12 +50,9 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="other_uom" >
|
||||
</mat-form-field>
|
||||
<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)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"₹"}} {{M_rawValueInWords[a]}} Only</mat-hint>
|
||||
<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 != ''">{{"₹"}} {{mrm.get('raw_value').value | numberToWords}} Only</mat-hint>
|
||||
</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>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
@ -81,18 +73,19 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</span>
|
||||
<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-option>Select</mat-option>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" style="width: 90%" *ngIf="md.get('is_sufficiant_raw').value == 'no'">
|
||||
<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>
|
||||
</mat-form-field>
|
||||
|
||||
<span *ngIf="RMCommentCard">
|
||||
<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-option>Select</mat-option>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" style="width: 90%" *ngIf="md.get('is_sufficiant_raw').value == 'no'">
|
||||
<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>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
|
||||
<div formArrayName="manufacturing_finished_goods">
|
||||
@ -104,8 +97,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
</mat-form-field>
|
||||
<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)="selectedValueofStockObserved($event.value,b,2)">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed" (selectionChange)="checkComments($event.value,2,b)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -113,7 +105,7 @@
|
||||
</mat-form-field>
|
||||
<span *ngIf="mfg.get('goods_observed').value == 'yes'" >
|
||||
<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 style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
@ -126,20 +118,10 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<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)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"₹"}} {{M_goodsValueInWords[b]}} Only</mat-hint>
|
||||
<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 != ''">{{"₹"}} {{mfg.get('goods_value').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</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-actions>
|
||||
<div align="right">
|
||||
@ -154,10 +136,6 @@
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</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>
|
||||
</div>
|
||||
@ -167,10 +145,6 @@
|
||||
</mat-card>
|
||||
|
||||
<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>
|
||||
<div formArrayName="retail_details">
|
||||
<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" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="selectedValueofStockObserved($event.value,e,3)">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,3,e)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -191,7 +165,7 @@
|
||||
</mat-form-field>
|
||||
<span *ngIf="item.get('traded_goods_observed').value == 'yes'" >
|
||||
<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 style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
@ -204,34 +178,10 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<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)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{R_tradedGoodsValueInWords[e]}} Only</mat-hint>
|
||||
<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 != ''">{{"₹"}} {{item.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</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-actions>
|
||||
<div align="right">
|
||||
@ -256,11 +206,6 @@
|
||||
</mat-card>
|
||||
|
||||
<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>
|
||||
<div formArrayName="trade_details">
|
||||
<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" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="selectedValueofStockObserved($event.value,g,4)">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,4,g)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No stock observed</mat-option>
|
||||
@ -282,7 +227,7 @@
|
||||
</mat-form-field>
|
||||
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'" >
|
||||
<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 style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
@ -290,40 +235,15 @@
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tradetg.get('traded_goods_uom').value == 1" style="width:28%">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tradetg.get('traded_goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<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)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{T_tradedGoodsValueInWords[g]}} Only</mat-hint>
|
||||
<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 != ''">{{"₹"}} {{tradetg.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
|
||||
</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>
|
||||
|
||||
<!-- <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-actions>
|
||||
<div align="center">
|
||||
@ -347,7 +267,7 @@
|
||||
|
||||
</mat-card>
|
||||
|
||||
<div *ngIf="finishedAndTradedGoodsCommentCard">
|
||||
<div *ngIf="TGCommentCard">
|
||||
<br>
|
||||
<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">
|
||||
@ -494,12 +414,4 @@
|
||||
{{ errorMessage }}
|
||||
<!-- <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>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
<!-- <mat-card style="padding: 12px;">
|
||||
<p>Stock Details</p>
|
||||
<form [formGroup]="stockForms" class="address"> -->
|
||||
<!-- {{uomData | json}} -->
|
||||
<!-- <mat-card>
|
||||
=======
|
||||
<!-- {{uomData | json}} -->
|
||||
<notifier-container></notifier-container>
|
||||
@ -41,25 +41,9 @@ export class StockComponent implements OnInit {
|
||||
form_id: number;
|
||||
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;
|
||||
suppliers_raw_materials : any = [];
|
||||
suppliers_retail_trade_details : any = [];
|
||||
@ -189,7 +173,6 @@ export class StockComponent implements OnInit {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
|
||||
if(dataForm.manufacturing_details[0].manufacturing_finished_goods ){this.finishedAndTradedGoodsCommentCard = true;}
|
||||
let manufacturing_temparr = [];
|
||||
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),
|
||||
@ -201,7 +184,6 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
let retail_temparr = [];
|
||||
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
||||
this.initRetailDetails(retail_temparr);
|
||||
@ -209,7 +191,6 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
let trading_temparr = [];
|
||||
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
||||
this.initTradingDetails(trading_temparr);
|
||||
@ -243,7 +224,6 @@ export class StockComponent implements OnInit {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
if(val.products){this.finishedAndTradedGoodsCommentCard = true;}
|
||||
this.suppliers_raw_materials = rm_api;
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.initManufacturingDetails(null);
|
||||
@ -253,14 +233,12 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
this.suppliers_retail_trade_details = val.products;
|
||||
this.initRetailDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
this.suppliers_wholesale_trade_details =val.products;
|
||||
this.initTradingDetails(null);
|
||||
}
|
||||
@ -294,7 +272,6 @@ export class StockComponent implements OnInit {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
if(val.products){this.finishedAndTradedGoodsCommentCard = true;}
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.suppliers_raw_materials = rm_api;
|
||||
this.initManufacturingDetails(null);
|
||||
@ -305,13 +282,11 @@ export class StockComponent implements OnInit {
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.suppliers_retail_trade_details= val.products;
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
this.initRetailDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.finishedAndTradedGoodsCommentCard = true;
|
||||
this.suppliers_wholesale_trade_details = val.products;
|
||||
this.initTradingDetails(null);
|
||||
}
|
||||
@ -428,9 +403,7 @@ tradingFormCreation(val) {
|
||||
if(datas.manufacturing_raw_materials != undefined){
|
||||
// for (let val of datas.manufacturing_raw_materials) {
|
||||
datas.manufacturing_raw_materials.forEach((val,index) => {
|
||||
if(val.raw_value){
|
||||
this.inWords(val.raw_value,1,index);
|
||||
}
|
||||
this.checkComments(val.stock_observed,1,index);
|
||||
// this.checkComments(val.is_sufficiant_raw,1,index);
|
||||
rawMaterial.push(this.createRawmaterial(val));
|
||||
});
|
||||
@ -441,13 +414,8 @@ tradingFormCreation(val) {
|
||||
if(datas.manufacturing_finished_goods != undefined){
|
||||
// for (let val of datas.manufacturing_finished_goods) {
|
||||
datas.manufacturing_finished_goods.forEach((val,index) => {
|
||||
|
||||
if(val.goods_value){
|
||||
this.inWords(val.goods_value,2,index);
|
||||
}
|
||||
|
||||
this.checkComments(val.goods_observed,2,index);
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
});
|
||||
}
|
||||
else{
|
||||
@ -484,12 +452,6 @@ tradingFormCreation(val) {
|
||||
}
|
||||
}
|
||||
|
||||
selectedValueofStockObserved(selectedvalue : any,index : number,flag : number){
|
||||
console.log('selectedvalue',selectedvalue);
|
||||
console.log('index',index);
|
||||
console.log('flag',flag);
|
||||
}
|
||||
|
||||
initRetailDetails(datas) {
|
||||
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
@ -518,13 +480,8 @@ tradingFormCreation(val) {
|
||||
if(datas.retail_traded_goods !== undefined){
|
||||
// for (let val of datas.retail_traded_goods) {
|
||||
datas.retail_traded_goods.forEach((val,index) => {
|
||||
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.inWords(val.estimated_traded_goods_value,3,index);
|
||||
}
|
||||
|
||||
this.checkComments(val.traded_goods_observed,3,index);
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
|
||||
});
|
||||
}
|
||||
else{
|
||||
@ -613,10 +570,7 @@ tradingFormCreation(val) {
|
||||
{
|
||||
// for (let val of datas.trading_traded_goods) {
|
||||
datas.trading_traded_goods.forEach((val,index) => {
|
||||
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.inWords(val.estimated_traded_goods_value,4,index);
|
||||
}
|
||||
this.checkComments(val.traded_goods_observed,4,index);
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
});
|
||||
}
|
||||
@ -800,53 +754,58 @@ tradingFormCreation(val) {
|
||||
}
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,flag:number,i){
|
||||
ManufacturingCounterArray: any = [];
|
||||
FinishedCounterArray: any = [];
|
||||
RetailCounterArray: any = [];
|
||||
WholeSaleCounterArray: any = [];
|
||||
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.M_rawValueInWords[i] = this._pd.convertNumberToWords(e);
|
||||
break;
|
||||
case 2 :
|
||||
this.M_goodsValueInWords[i] = this._pd.convertNumberToWords(e);
|
||||
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;
|
||||
}
|
||||
}
|
||||
checkComments(value,flag,index){
|
||||
// console.log(value,flag,index);
|
||||
if(flag == 1){
|
||||
this.ManufacturingCounterArray[index] = value == "yes" ? 1 : 0
|
||||
let RMOverallCount = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
this.RMCommentCard = RMOverallCount > 0 ? true : false ;
|
||||
}
|
||||
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){
|
||||
|
||||
if(flag == 1 && e=='no'){
|
||||
this.mrmCommentFlag = true;
|
||||
}
|
||||
else if(flag == 1 && e!='no'){
|
||||
this.mrmCommentFlag = false;
|
||||
}
|
||||
if(flag == 2 && e=='no'){
|
||||
this.mfgCommentFlag[index] = true;
|
||||
}
|
||||
else if(flag == 2 && e!='no'){
|
||||
this.mfgCommentFlag[index] = false;
|
||||
}
|
||||
if(flag == 3 && e=='no'){
|
||||
this.rtrdCommentFlag[index] = true;
|
||||
}
|
||||
else if(flag == 3 && e!='no'){
|
||||
this.rtrdCommentFlag[index] = false;
|
||||
}
|
||||
if(flag == 4 && e=='no'){
|
||||
this.wtrdCommentFlag[index] = true;
|
||||
}
|
||||
else if(flag == 4 && e!='no'){
|
||||
this.wtrdCommentFlag[index] = false;
|
||||
}
|
||||
}
|
||||
// checkComments(e,flag,index){
|
||||
// if(flag == 1 && e=='no'){
|
||||
// this.mrmCommentFlag = true;
|
||||
// }
|
||||
// else if(flag == 1 && e!='no'){
|
||||
// this.mrmCommentFlag = false;
|
||||
// }
|
||||
// if(flag == 2 && e=='no'){
|
||||
// this.mfgCommentFlag[index] = true;
|
||||
// }
|
||||
// else if(flag == 2 && e!='no'){
|
||||
// this.mfgCommentFlag[index] = false;
|
||||
// }
|
||||
// if(flag == 3 && e=='no'){
|
||||
// this.rtrdCommentFlag[index] = true;
|
||||
// }
|
||||
// else if(flag == 3 && e!='no'){
|
||||
// this.rtrdCommentFlag[index] = false;
|
||||
// }
|
||||
// if(flag == 4 && e=='no'){
|
||||
// this.wtrdCommentFlag[index] = true;
|
||||
// }
|
||||
// else if(flag == 4 && e!='no'){
|
||||
// this.wtrdCommentFlag[index] = false;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@ -55,15 +55,15 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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-form-field>
|
||||
<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-form-field> -
|
||||
<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-form-field>
|
||||
</div>
|
||||
@ -117,7 +117,7 @@
|
||||
<div fxLayout="row" *ngIf="mfgCreditCardFlag">
|
||||
<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"
|
||||
type="number" autocomplete="off" (keypress)="keyPress($event)" maxlength="3">
|
||||
type="number" autocomplete="off" OnlyNumber type="text" maxlength="3">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -172,16 +172,16 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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-form-field>
|
||||
<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-form-field> -
|
||||
<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-form-field>
|
||||
</div>
|
||||
@ -205,7 +205,7 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <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> -->
|
||||
<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>
|
||||
|
||||
@ -516,17 +516,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
/** To Reset Popup Data */
|
||||
onReset() {
|
||||
// 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){
|
||||
if(flag == 1){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user