amount in words : ps
This commit is contained in:
parent
a16432e118
commit
4a6b979d77
@ -173,11 +173,8 @@
|
||||
<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"
|
||||
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> -->
|
||||
<input OnlyNumber type="text" matInput placeholder="Premium Paid" formControlName="premium_paid">
|
||||
<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"
|
||||
@ -195,10 +192,8 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<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>
|
||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('sum_assured').value != ''">{{"₹"}} {{detail.get('sum_assured').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
@ -239,12 +234,8 @@
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<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>-->
|
||||
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('amount_of_invest').value != ''">{{"₹"}}
|
||||
{{OtherAmtInvestInwords[i]}} Only</mat-hint>
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('amount_of_invest').value != ''">{{"₹"}} {{detail.get('amount_of_invest').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
@ -305,9 +296,8 @@
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5"
|
||||
style="width:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value"
|
||||
OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,2)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}}
|
||||
{{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}} {{detail.get('approximate_market_value').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:45%">
|
||||
|
||||
@ -51,21 +51,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
public m_any_asset_loan_type = [{ 'value': "yes", 'viewValue': "Yes" },
|
||||
{ 'value': "no", 'viewValue': "No" },
|
||||
{ 'value': "nan", 'viewValue': "NA" }]
|
||||
// appxMarketAmtInwords : any = [];
|
||||
OtherAppxMarketAmtInwords: any = [];
|
||||
// emiAmtInwords : any = [];
|
||||
OtherEmiAmtInwords: any = [];
|
||||
// PremiumPaidInwords : any = [];
|
||||
OtherPremiumPaidInwords: any = [];
|
||||
// SumAssuredInwords: any = [];
|
||||
OtherSumAssuredInwords: any = [];
|
||||
// AmtInvestInwords: any = [];
|
||||
OtherAmtInvestInwords: any = [];
|
||||
// AssetValueInwords: any = [];
|
||||
OtherAssetValueInwords: any = [];
|
||||
// B_emiAmtInwords: any = [];
|
||||
O_emiAmtInwords: any = [];
|
||||
|
||||
|
||||
public m_propertyType = [];
|
||||
|
||||
public m_investmentType = [];
|
||||
@ -625,7 +611,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// });
|
||||
// }
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
@ -655,7 +641,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// 'any_other_asset_value' : datas.any_other_asset_value,
|
||||
// 'any_other_asset_loan' : datas.any_other_asset_loan,
|
||||
};
|
||||
this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.any_other_asset_value);
|
||||
|
||||
});
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.otherAssetsDescriptionWithData(array_data));
|
||||
@ -706,8 +692,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
case '6': {
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.premium_paid);
|
||||
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.sum_assured);
|
||||
|
||||
array_data = {
|
||||
'premium_paid': datas.premium_paid,
|
||||
'frequency_mode': datas.frequency_mode,
|
||||
@ -723,7 +708,6 @@ export class AssetsInfoComponent implements OnInit {
|
||||
case '7': {
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
|
||||
array_data = {
|
||||
'investments_type': datas.investments_type,
|
||||
'other_investments_type': datas.other_investments_type,
|
||||
@ -944,55 +928,6 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
// this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.OtherAppxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 3:
|
||||
// this.emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 4:
|
||||
this.OtherEmiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5:
|
||||
// this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6:
|
||||
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7:
|
||||
// this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 8:
|
||||
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 9:
|
||||
// this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 10:
|
||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 11:
|
||||
// this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 12:
|
||||
this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 13:
|
||||
// this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 14:
|
||||
this.O_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -155,11 +155,14 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]">
|
||||
<!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||
<!-- *ngIf="itemrow.get('account_type').value != 2">
|
||||
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
|
||||
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>
|
||||
{{amtInwords[i]}} Only</mat-hint>-->
|
||||
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
|
||||
formControlName="limit" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{itemrow.get('limit').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -45,8 +45,6 @@ export class BankingDetailsComponent implements OnInit {
|
||||
salaryField: boolean;
|
||||
OtherFlag: any = [];
|
||||
limitCaseFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
@ -149,7 +147,6 @@ export class BankingDetailsComponent implements OnInit {
|
||||
control.push(this.createBankarray());
|
||||
} else {
|
||||
result.forEach((datas, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
|
||||
@ -342,19 +339,4 @@ export class BankingDetailsComponent implements OnInit {
|
||||
itemrow.controls.vintage_month.setValue(Math.floor(converted_month));
|
||||
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -91,11 +91,9 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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"
|
||||
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>
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{itemrow.get('business_monthly_rented_amt').value | numberToWords}} Only</mat-hint>
|
||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -103,9 +101,8 @@
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value"
|
||||
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>
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"₹"}} {{itemrow.get('business_approximate_market_value').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
@ -289,10 +286,9 @@
|
||||
|
||||
|
||||
<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"
|
||||
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>
|
||||
<input matInput placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{sup.get('business_monthly_rented_amt').value | numberToWords}} Only</mat-hint>
|
||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -300,9 +296,8 @@
|
||||
<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"
|
||||
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>
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"₹"}} {{sup.get('business_approximate_market_value').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
@ -63,12 +63,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
mergeCompanyApplicant: any = [];
|
||||
endUserList = [];
|
||||
|
||||
/**Declaration of amount in words */
|
||||
appxMarketAmtInwords: any = [];
|
||||
appxMarketAmtInwordsForAddress: any = [];
|
||||
RentAmtInwords: any = [];
|
||||
RentAmtInwordsForAddress: any = [];
|
||||
|
||||
/**Constructor of the class */
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
@ -582,8 +576,7 @@ console.clear();
|
||||
});
|
||||
if (result.length > 0) {
|
||||
result.forEach((datas, index) => {
|
||||
this.RentAmtInwordsForAddress[index] = this.pdTrigerService.convertNumberToWords(datas.business_monthly_rented_amt);
|
||||
this.appxMarketAmtInwordsForAddress[index] = this.pdTrigerService.convertNumberToWords(datas.business_approximate_market_value);
|
||||
|
||||
let Avaliablity = 1;
|
||||
|
||||
if (datas.business_name_of_the_owner.length > 0) {
|
||||
@ -639,8 +632,7 @@ console.clear();
|
||||
|
||||
if (result.length > 0) {
|
||||
result.forEach((datas, index) => {
|
||||
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;
|
||||
|
||||
if (datas.business_name_of_the_owner.length > 0) {
|
||||
@ -996,27 +988,7 @@ console.clear();
|
||||
this.placeholderName = 'Was any business activity seen at the ' + e + ' during PD visit?';
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 8:
|
||||
this.RentAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 9:
|
||||
this.RentAmtInwordsForAddress[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 10:
|
||||
this.appxMarketAmtInwordsForAddress[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** For Docs Tab */
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
|
||||
@ -90,9 +90,8 @@
|
||||
<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" 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>
|
||||
formControlName="limit" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{itemrow.get('limit').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -46,8 +46,6 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
salaryField: boolean;
|
||||
OtherFlag: any = [];
|
||||
limitCaseFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
@ -146,11 +144,11 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
control.push(this.createBankarray());
|
||||
} else {
|
||||
result.forEach((datas, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
|
||||
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
|
||||
control.push(this.createBankarray());
|
||||
});
|
||||
this.bankingForm.controls.itemRows.setValue(result);
|
||||
@ -356,20 +354,6 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setRequiredValidation(value, item, flag) {
|
||||
|
||||
if (flag == 1) {
|
||||
|
||||
@ -1510,10 +1510,15 @@
|
||||
</div>
|
||||
<mat-form-field style="width:62%">
|
||||
<input matInput placeholder="Approximate total monthly salary paid to employees"
|
||||
formControlName="employees_appx_salary"
|
||||
required type="number">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="businessForm.controls['employees_appx_salary'].value != ''">{{"₹"}} {{businessForm.controls['employees_appx_salary'].value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput placeholder="Approximate total monthly salary paid to employees"
|
||||
(keyup)="inWords($event,1)" formControlName="employees_appx_salary"
|
||||
required type="number">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="businessForm.controls['employees_appx_salary'].value != ''">{{"₹"}}
|
||||
{{appxSalaryAmtInwords}} Only</mat-hint>
|
||||
{{appxSalaryAmtInwords}} Only</mat-hint> -->
|
||||
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
|
||||
@ -66,7 +66,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//sourceNames: any = {"Private Limited Company": 'Director / Shareholder Details',"Proprietorship": 'Proprietor Details', "Sole Proprietorship": 'Proprietor Details',"Partnership": 'Partner Details',"Limited Liability Partnership (LLP)": 'Partner Details',"One Person Company (OPC)": 'Director Details',"Hindu Undivided Family (HUF)": 'Karta Details',"Society": 'Member Details',"Cooperative": 'Member Details',"Trust": 'Trustee Details',"Public Ltd Company": 'Director / Shareholder Details','Individual':'Self',"Others": 'Other Enitity Details'};
|
||||
sourceNames: { [k: string]: any } = {};
|
||||
maxDate: any;
|
||||
// InvestedAmountInWords:any;
|
||||
|
||||
public relationSource = new MatTableDataSource();
|
||||
displayedColumns = ['title', 'family_member_name', 'relation', 'relation_to', 'relationship_with_company', 'started_business'];
|
||||
generalExistEntityType: string;
|
||||
@ -79,7 +79,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
monthErrorMessage: any = [];
|
||||
errorMessageForExistTotalWorkExperience: any = [];
|
||||
ExportFlag: boolean = false;
|
||||
appxSalaryAmtInwords: any;
|
||||
isreadonlyyear: any = [];
|
||||
isreadonlymonth: any = [];
|
||||
ManufacturingUnChecked: boolean;
|
||||
@ -225,9 +224,9 @@ export class BusinessInfoComponent implements OnInit {
|
||||
businessVal.formid = this.form_id;
|
||||
businessVal.company_id = this.company_id;
|
||||
businessVal.fk_createdby = this.pdid;
|
||||
if (businessVal.employees_appx_salary) {
|
||||
this.appxSalaryAmtInwords = this._pd.convertNumberToWords(businessVal.employees_appx_salary);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//businessVal.designation = DesgnArray;
|
||||
businessVal.partners = PartnrArray;
|
||||
businessVal.documents = DocArray;
|
||||
@ -1669,10 +1668,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
// inWords(e){
|
||||
// this.InvestedAmountInWords = this._pd.convertNumberToWords(e);
|
||||
// }
|
||||
|
||||
checkTotalEmployee(FormData) {
|
||||
this.businessForm.controls['employees_total'].setValue((+FormData.value.employees_permanent || 0) + (+FormData.value.employees_temporary || 0));
|
||||
@ -1841,13 +1836,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
inWords(e, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.appxSalaryAmtInwords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
changePOSMachinesAvailablity(e, flag) {
|
||||
|
||||
|
||||
@ -37,9 +37,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
placeholderName: any = [];
|
||||
IDXval: any;
|
||||
OtherFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
labelArr: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
dataFromAssets: any = [];
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
@ -135,8 +133,6 @@ export class CurrentLoanComponent implements OnInit {
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (result.length > 0) {
|
||||
result.forEach((val, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(val.loan_amount);
|
||||
this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
this.selectedfrequency(val.frequency, index);
|
||||
//this.selectedLoanTakenBy(val.loan_taken_by,index);
|
||||
|
||||
@ -562,19 +558,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
})
|
||||
});
|
||||
}
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setRequiredValidation(value, item, flag) {
|
||||
|
||||
if (flag == 1) {
|
||||
|
||||
@ -102,9 +102,8 @@
|
||||
|
||||
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;">
|
||||
<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>
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}} {{sup.get('rent').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div>
|
||||
@ -167,11 +166,15 @@
|
||||
formControlName="earning_if_others_segment">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Income Per Month"
|
||||
<input placeholder="Income Per Month"
|
||||
formControlName="earning_gross_income_per_month"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"₹"}} {{item.get('earning_gross_income_per_month').value | numberToWords}} Only</mat-hint>
|
||||
<!-- <input matInput placeholder="Income Per Month"
|
||||
formControlName="earning_gross_income_per_month"
|
||||
OnlyNumber type="text" (keyup)="inWords($event,2,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"₹"}}
|
||||
{{IncomePerMonth[i]}} Only</mat-hint>
|
||||
{{IncomePerMonth[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput [placeholder]="item.get('earning_segment').value != 5 ? 'Name of the Employer/Business' : 'Pension Received From'"
|
||||
|
||||
@ -292,10 +292,10 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
} else {
|
||||
records.forEach((val, index) => {
|
||||
|
||||
if (val.rent != null) {
|
||||
// if (val.rent != null) {
|
||||
|
||||
this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
}
|
||||
// this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
// }
|
||||
this.FamilyMemberAsLabel[index] = this.selectPerson.filter(item => item.pd_co_applicant_id == val.selected_person)[0].applicant_name;
|
||||
//for (let val of records)
|
||||
this.getCity(val.residence_state, index);
|
||||
@ -328,9 +328,9 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
val.forEach((vals, index) => {
|
||||
// for (let vals of val) {
|
||||
if (vals.earning_gross_income_per_month != null) {
|
||||
this.IncomePerMonth[index] = this._pd.convertNumberToWords(vals.earning_gross_income_per_month);
|
||||
}
|
||||
// if (vals.earning_gross_income_per_month != null) {
|
||||
// this.IncomePerMonth[index] = this._pd.convertNumberToWords(vals.earning_gross_income_per_month);
|
||||
// }
|
||||
let datas = this.fb.group({
|
||||
family_member_name: [vals.family_member_name || null, Validators.compose([])],
|
||||
family_member_relationship: [vals.family_member_relationship || null, Validators.compose([])],
|
||||
@ -670,19 +670,4 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
// });
|
||||
// }
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e, flag: number, i) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.RentAmount[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.IncomePerMonth[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -56,10 +56,15 @@
|
||||
<br>
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale"
|
||||
formControlName="financial_annual_sale" (change)="calculationForFinanicalStatement()"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('financial_annual_sale').value != ''">{{"₹"}} {{details.get('financial_annual_sale').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Annual Sale"
|
||||
formControlName="financial_annual_sale" (change)="calculationForFinanicalStatement()"
|
||||
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>
|
||||
{{FY_annualSalesInwords[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:60%">
|
||||
@ -109,10 +114,16 @@
|
||||
<span *ngIf="details.get('finanical_profit_or_loss').value == 1 ">
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount"
|
||||
formControlName="financial_net_profit" (change)="calculationForFinanicalStatement()"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('financial_net_profit').value != ''">{{"₹"}} {{details.get('financial_net_profit').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit Amount"
|
||||
formControlName="financial_net_profit" (change)="calculationForFinanicalStatement()"
|
||||
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>
|
||||
{{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 %"
|
||||
@ -122,11 +133,17 @@
|
||||
</span>
|
||||
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount"
|
||||
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount"
|
||||
formControlName="financial_net_loss" (change)="calculationForFinanicalStatement()"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('financial_net_loss').value != ''">{{"₹"}} {{details.get('financial_net_loss').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Loss Amount"
|
||||
formControlName="financial_net_loss" (change)="calculationForFinanicalStatement()"
|
||||
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>
|
||||
{{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 %"
|
||||
@ -239,24 +256,40 @@
|
||||
<mat-card-content class="matcard">
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:25%">
|
||||
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales From"
|
||||
formControlName="estimate_sales_from" (change)="calculateSalesAverage(i, details);"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_sales_from').value != ''">{{"₹"}} {{details.get('estimate_sales_from').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Annual Sales From"
|
||||
formControlName="estimate_sales_from" (change)="calculateSalesAverage(i, details);"
|
||||
(keyup)="inWords($event,i,11)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_from').value != ''">{{"₹"}}
|
||||
{{AV_SalesFrmInwords[i]}} Only</mat-hint>
|
||||
{{AV_SalesFrmInwords[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales To"
|
||||
formControlName="estimate_sales_to" (change)="confirmAlert(i, details);"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_sales_to').value != ''">{{"₹"}} {{details.get('estimate_sales_to').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Annual Sales To"
|
||||
formControlName="estimate_sales_to" (change)="confirmAlert(i, details);"
|
||||
(keyup)="inWords($event,i,12)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_to').value != ''">{{"₹"}}
|
||||
{{AV_SalesToInwords[i]}} Only</mat-hint>
|
||||
{{AV_SalesToInwords[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Sales Average"
|
||||
formControlName="estimate_sales_average" readonly>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_sales_average').value != ''">{{"₹"}} {{details.get('estimate_sales_average').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Considered Sales Average"
|
||||
formControlName="estimate_sales_average" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_average').value != ''">{{"₹"}}
|
||||
{{AV_SalesInwords[i]}} Only</mat-hint>
|
||||
{{AV_SalesInwords[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%">
|
||||
@ -293,37 +326,55 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput placeholder="Net Profit Amount Considered"
|
||||
formControlName="estimate_profit_margin" readonly>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_profit_margin').value != ''">{{"₹"}} {{details.get('estimate_profit_margin').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput placeholder="Net Profit Amount Considered"
|
||||
formControlName="estimate_profit_margin" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''">
|
||||
{{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only
|
||||
</mat-hint>
|
||||
</mat-hint> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount From"
|
||||
formControlName="estimate_net_profit_from" OnlyNumber type="text"
|
||||
(change)="calculateProfitAmount(i, details);">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"₹"}} {{details.get('estimate_net_profit_from').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit Amount From"
|
||||
formControlName="estimate_net_profit_from" OnlyNumber type="text"
|
||||
(change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,7)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"₹"}}
|
||||
{{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint>
|
||||
{{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount To"
|
||||
formControlName="estimate_net_profit_to" OnlyNumber type="text"
|
||||
(change)="calculateProfitAmount(i, details);">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{details.get('estimate_net_profit_to').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit Amount To"
|
||||
formControlName="estimate_net_profit_to" OnlyNumber type="text"
|
||||
(change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,8)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}}
|
||||
{{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
||||
{{AV_netProfitAmtToInwords[i]}} Only </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Net Profit % "
|
||||
formControlName="estimate_net_profit_percent" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount"
|
||||
<input matInput placeholder="Considered Profit Amount"
|
||||
formControlName="estimate_net_profit" readonly>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{details.get('estimate_net_profit').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Considered Profit Amount"
|
||||
formControlName="estimate_net_profit" OnlyNumber type="text"
|
||||
readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}}
|
||||
{{AV_netProfitAmtInwords[i]}} Only </mat-hint>
|
||||
{{AV_netProfitAmtInwords[i]}} Only </mat-hint> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||
@ -344,13 +395,22 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput placeholder="Net Loss Amount Considered"
|
||||
formControlName="estimate_loss_margin" readonly>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{details.get('estimate_loss_margin').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput placeholder="Net Loss Amount Considered"
|
||||
formControlName="estimate_loss_margin" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}}
|
||||
{{AV_marginLossAmtInwords[i]}} Only </mat-hint>
|
||||
{{AV_marginLossAmtInwords[i]}} Only </mat-hint> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount From"
|
||||
formControlName="estimate_net_loss_from" OnlyNumber type="text"
|
||||
(change)="calculateLossAmount(i, details);">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('financial_annual_sale').value != ''">{{"₹"}} {{details.get('financial_annual_sale').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount From"
|
||||
formControlName="estimate_net_loss_from" OnlyNumber type="text"
|
||||
(change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,9)">
|
||||
@ -358,11 +418,16 @@
|
||||
{{AV_netLossAmtFrmInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount To"
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale"
|
||||
formControlName="financial_annual_sale" (change)="calculationForFinanicalStatement()"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{details.get('estimate_net_loss_to').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Loss Amount To"
|
||||
formControlName="estimate_net_loss_to" OnlyNumber type="text"
|
||||
(change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,10)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}}
|
||||
{{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
||||
{{AV_netLossAmtToInwords[i]}} Only </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Net Loss %"
|
||||
@ -370,9 +435,13 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount"
|
||||
formControlName="estimate_net_loss" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}} {{details.get('estimate_net_loss').value | numberToWords}} Only</mat-hint>
|
||||
|
||||
<!-- <input matInput autocomplete="off" placeholder="Considered Loss Amount"
|
||||
formControlName="estimate_net_loss" OnlyNumber type="text" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}}
|
||||
{{AV_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
{{AV_netLossAmtInwords[i]}} Only</mat-hint> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2">
|
||||
|
||||
@ -47,26 +47,26 @@ export class FinancialInfoComponent implements OnInit {
|
||||
customerCommentsFlag :boolean;
|
||||
|
||||
//Array for Amount Inwords
|
||||
FY_annualSalesInwords : any = [];
|
||||
FY_netProfitAmtInwords : any = [];
|
||||
FY_netLossAmtInwords : any = [];
|
||||
AV_SalesInwords : any = [];
|
||||
AV_annualSalesInwords : any = [];
|
||||
AV_marginProfitAmtInwords : any = [];
|
||||
AV_netProfitAmtInwords : any = [];
|
||||
AV_marginLossAmtInwords : any = [];
|
||||
AV_netLossAmtInwords : any = [];
|
||||
// FY_annualSalesInwords : any = [];
|
||||
// FY_netProfitAmtInwords : any = [];
|
||||
// FY_netLossAmtInwords : any = [];
|
||||
// AV_SalesInwords : any = [];
|
||||
// AV_annualSalesInwords : any = [];
|
||||
// AV_marginProfitAmtInwords : any = [];
|
||||
// AV_netProfitAmtInwords : any = [];
|
||||
// AV_marginLossAmtInwords : any = [];
|
||||
// AV_netLossAmtInwords : any = [];
|
||||
|
||||
//isreadonly for edit(no of year Fields and Starting Years )
|
||||
isReadOnly : boolean = false;
|
||||
EditAble: boolean = true;
|
||||
isDisplay : boolean ;
|
||||
AV_netProfitAmtFrmInwords: any = [];
|
||||
AV_netProfitAmtToInwords: any = [];
|
||||
AV_netLossAmtFrmInwords: any = [];
|
||||
AV_netLossAmtToInwords: any = [];
|
||||
AV_SalesFrmInwords: any = [];
|
||||
AV_SalesToInwords: any = [];
|
||||
// AV_netProfitAmtFrmInwords: any = [];
|
||||
// AV_netProfitAmtToInwords: any = [];
|
||||
// AV_netLossAmtFrmInwords: any = [];
|
||||
// AV_netLossAmtToInwords: any = [];
|
||||
// AV_SalesFrmInwords: any = [];
|
||||
// AV_SalesToInwords: any = [];
|
||||
av : any =[{id:6, name:'Letter of Credit'},
|
||||
{id:2, name:'Bank Guarantee'},
|
||||
{id:3, name:'Cash Credit Limit'},
|
||||
@ -145,9 +145,9 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.customerCommentsFlag = result.length == 1 ? false : true;
|
||||
result.forEach((val,index) => {
|
||||
//financial_date.push(this.createDate());
|
||||
this.FY_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);
|
||||
this.FY_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_profit);
|
||||
this.FY_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_loss);
|
||||
// this.FY_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);
|
||||
// this.FY_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_profit);
|
||||
// this.FY_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_loss);
|
||||
financial_date.push(this.createDate(''));
|
||||
});
|
||||
retriveData.date_per_financial = result;
|
||||
@ -166,17 +166,17 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if (result_val.length > 0) {
|
||||
result_val.forEach((val,index) => {
|
||||
this.AV_SalesInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_average));
|
||||
this.AV_SalesFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_from));
|
||||
this.AV_SalesToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_to));
|
||||
this.AV_marginProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_profit));
|
||||
this.AV_marginLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_loss_margin));
|
||||
this.AV_netLossAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netLossAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_loss));
|
||||
// this.AV_SalesInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_average));
|
||||
// this.AV_SalesFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_from));
|
||||
// this.AV_SalesToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_to));
|
||||
// this.AV_marginProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
// this.AV_netProfitAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
// this.AV_netProfitAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
// this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_profit));
|
||||
// this.AV_marginLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_loss_margin));
|
||||
// this.AV_netLossAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
// this.AV_netLossAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
// this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_loss));
|
||||
estimated_val.push(this.createValue(''));
|
||||
});
|
||||
retriveData.estimated_value = result_val;
|
||||
@ -1091,11 +1091,11 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if(lower > higer){
|
||||
details.controls.estimate_sales_average.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_sales_average.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1162,7 +1162,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
if (r == true) {
|
||||
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
|
||||
details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2));
|
||||
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||
// this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||
}else{
|
||||
details.controls.estimate_profit_range_to.setValue('');
|
||||
details.controls.estimate_profit_margin.setValue('');
|
||||
@ -1173,7 +1173,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
|
||||
details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2));
|
||||
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||
// this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||
// details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
||||
// details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
||||
|
||||
@ -1246,13 +1246,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let Profit_percent = (higer/+sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let Profit_percent = (lower/+sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
}
|
||||
else if(estimate_net_profit_from > 5000000 || estimate_net_profit_from <= 10000000){
|
||||
@ -1276,13 +1276,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let Profit_percent = (higer/+sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let Profit_percent = (lower/+sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1306,13 +1306,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let Profit_percent = (higer/sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let Profit_percent = (lower/sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
}
|
||||
else{
|
||||
@ -1321,13 +1321,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let Profit_percent = (higer/sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let Profit_percent = (lower/sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1395,7 +1395,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
|
||||
details.controls.estimate_loss_margin_percent.setValue(consi_loss_percent.toFixed(2));
|
||||
|
||||
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
// this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
}else{
|
||||
details.controls.estimate_loss_range_to.setValue('');
|
||||
details.controls.estimate_loss_margin.setValue('');
|
||||
@ -1406,7 +1406,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
|
||||
details.controls.estimate_loss_margin_percent.setValue(+consi_loss_percent.toFixed(2));
|
||||
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
// this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1487,13 +1487,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let loss_percent = (higer/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let loss_percent = (lower/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1517,13 +1517,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let loss_percent = (+higer/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let loss_percent = (+lower/+sales_average)*100;
|
||||
details.controls.estimate_net_profit_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
}
|
||||
else if(estimate_net_loss_from > 10000000){
|
||||
@ -1546,13 +1546,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let loss_percent = (higer/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let loss_percent = (+lower/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1562,13 +1562,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||
let loss_percent = (+higer/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||
let loss_percent = (+lower/+sales_average)*100;
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1702,51 +1702,51 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,i,flag:number){
|
||||
// inWords(e,i,flag:number){
|
||||
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.FY_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||
break;
|
||||
case 2 :
|
||||
this.FY_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
//alert('Fin net Profit'+this.FY_netProfitAmtInwords[i]);
|
||||
break;
|
||||
case 3 :
|
||||
this.FY_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// alert('Fin net Loss'+this.FY_netLossAmtInwords[i]);
|
||||
break;
|
||||
case 4 :
|
||||
this.AV_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5 :
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7 :
|
||||
this.AV_netProfitAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 8 :
|
||||
this.AV_netProfitAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 9 :
|
||||
this.AV_netLossAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 10 :
|
||||
this.AV_netLossAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 11 :
|
||||
this.AV_SalesFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 12 :
|
||||
this.AV_SalesToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// switch(flag){
|
||||
// case 1 :
|
||||
// this.FY_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// // this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||
// break;
|
||||
// case 2 :
|
||||
// this.FY_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// //alert('Fin net Profit'+this.FY_netProfitAmtInwords[i]);
|
||||
// break;
|
||||
// case 3 :
|
||||
// this.FY_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// // alert('Fin net Loss'+this.FY_netLossAmtInwords[i]);
|
||||
// break;
|
||||
// case 4 :
|
||||
// this.AV_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 5 :
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 6 :
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 7 :
|
||||
// this.AV_netProfitAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 8 :
|
||||
// this.AV_netProfitAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 9 :
|
||||
// this.AV_netLossAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 10 :
|
||||
// this.AV_netLossAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 11 :
|
||||
// this.AV_SalesFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// case 12 :
|
||||
// this.AV_SalesToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -24,10 +24,12 @@
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount"
|
||||
OnlyNumber type="text" (keyup)="inWords($event,1)" (change)="loanCalc()"
|
||||
OnlyNumber type="text" (change)="loanCalc()"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{loanAmtInWords}} Only</mat-hint>
|
||||
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['loan_amount'].value | numberToWords }} Only</mat-hint>
|
||||
<!-- <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>
|
||||
@ -68,9 +70,9 @@
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="What is the amount for Balance Transfer ? "
|
||||
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>
|
||||
(change)="loanCalc()" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['balance_transfer_amount'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['balance_transfer_amount'].value | numberToWords }} Only</mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
@ -89,10 +91,9 @@
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Top Up Amount" OnlyNumber type="text"
|
||||
formControlName="topup_amount" (keyup)="inWords($event,5)"
|
||||
formControlName="topup_amount"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}}
|
||||
{{topUpAmtInWords}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['topup_amount'].value | numberToWords }} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -114,10 +115,10 @@
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Amount of Own Contribution"
|
||||
formControlName="own_contribution" OnlyNumber type="text" (keyup)="inWords($event,4)"
|
||||
formControlName="own_contribution" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}}
|
||||
{{ownContributionInWords}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['own_contribution'].value | numberToWords }} Only</mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
@ -142,9 +143,8 @@
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level"
|
||||
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>
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@ -212,10 +212,9 @@
|
||||
|
||||
<mat-form-field style="width:46%">
|
||||
<input matInput placeholder="Estimate Market Value as Per Customer"
|
||||
formControlName="emv_per_customer" OnlyNumber type="text" (keyup)="inWords($event,7)"
|
||||
formControlName="emv_per_customer" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}}
|
||||
{{emvAmtInWords}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
@ -76,13 +76,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
companies: any = [];
|
||||
|
||||
/* Declaration of Variables For Amount IN words */
|
||||
loanAmtInWords: any;
|
||||
balTxrfAmtInWords: any;
|
||||
valAsPerAgmtInWords: any;
|
||||
ownContributionInWords: any;
|
||||
topUpAmtInWords: any;
|
||||
emiAmtInWords: any;
|
||||
emvAmtInWords: any;
|
||||
z
|
||||
|
||||
|
||||
/** Constructor Of the Class */
|
||||
@ -102,7 +96,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
|
||||
this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name;
|
||||
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount : '';
|
||||
this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
|
||||
// this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
|
||||
this.form_id = 10;
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.notifier = notifier;
|
||||
@ -192,7 +186,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
|
||||
this.loanDetailsForm.controls['loan_amount'].setValue(value.records.loan_amount);
|
||||
if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
|
||||
// if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
|
||||
|
||||
this.loanDetailsForm.controls['loan_tenure'].setValue(value.records.loan_tenure);
|
||||
this.loanDetailsForm.controls['sub_product'].setValue(value.records.sub_product || null);
|
||||
@ -204,11 +198,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
if (value.records.balance_transfer_amount) {
|
||||
this.loanDetailsForm.controls['balance_transfer_amount'].setValue(value.records.balance_transfer_amount);
|
||||
this.balTxrfAmtInWords = this._pd.convertNumberToWords(value.records.balance_transfer_amount);
|
||||
// this.balTxrfAmtInWords = this._pd.convertNumberToWords(value.records.balance_transfer_amount);
|
||||
}
|
||||
if (value.records.topup_amount) {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
// this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
if (value.records.topup_amount > 0) {
|
||||
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
if (value.records.end_use_topup == 1) {
|
||||
@ -243,7 +237,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
||||
if (value.records.own_contribution) { this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
// if (value.records.own_contribution) { this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
|
||||
this.loanDetailsForm.controls['source'].setValue(dbsourcelist);
|
||||
this.sourceChange(dbsourcelist);
|
||||
@ -257,7 +251,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
if (value.records.emi_level) {
|
||||
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
|
||||
// this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
|
||||
}
|
||||
|
||||
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
|
||||
@ -275,7 +269,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
if (value.records.emv_per_customer != '') {
|
||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||
// this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -541,25 +535,25 @@ export class LoanDetailsComponent implements OnInit {
|
||||
inWords(e, flag: number) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.loanAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.loanAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2:
|
||||
this.balTxrfAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.balTxrfAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 3:
|
||||
this.valAsPerAgmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.valAsPerAgmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 4:
|
||||
this.ownContributionInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.ownContributionInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5:
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6:
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7:
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.emvAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -593,14 +587,14 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if (loanAmount >= BtAmount) {
|
||||
topupAmt = loanAmount - BtAmount;
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(topupAmt);
|
||||
// this.topUpAmtInWords = this._pd.convertNumberToWords(topupAmt);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Balances Transfer Amount is greater than Loan Amount Please check.!');
|
||||
this.loanDetailsForm.controls['balance_transfer_amount'].setValue('');
|
||||
this.balTxrfAmtInWords = '';
|
||||
// this.balTxrfAmtInWords = '';
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue('');
|
||||
this.topUpAmtInWords = '';
|
||||
// this.topUpAmtInWords = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,9 +168,8 @@
|
||||
</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" OnlyNumber type="text" (keyup)="inWords($event.target.value,r)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="reference.controls.business_volume_amount.value != ''">{{"₹"}}
|
||||
{{amtInwords[r]}} Only</mat-hint>
|
||||
formControlName="business_volume_amount" type="text" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="reference.controls.business_volume_amount.value != ''">{{"₹"}} {{ reference.controls.business_volume_amount.value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 22%">
|
||||
<mat-select placeholder="Unit" formControlName="business_volume_unit">
|
||||
|
||||
@ -38,7 +38,7 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
isOrganisationOwner: any=[];
|
||||
amtInwords : any = [];
|
||||
// amtInwords : any = [];
|
||||
|
||||
// isOtherApplicant: any = [];
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef<NeighbourHoodComponent>) {
|
||||
@ -148,7 +148,7 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
if(exist_ref_details.length>0){ /**&& data.records.check_type==1 */
|
||||
exist_ref_details.forEach((element,index) => {
|
||||
if(element.business_volume_amount != null){
|
||||
this.inWords(element.business_volume_amount,index);
|
||||
// this.inWords(element.business_volume_amount,index);
|
||||
}
|
||||
// this.amtInwords[index] = this._pd.convertNumberToWords(element.business_volume_amount);
|
||||
referencecheckControl.push(this.createReerenceCheck(element));
|
||||
@ -477,9 +477,9 @@ checkOthers(values){
|
||||
// }
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i){
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e);
|
||||
}
|
||||
// inWords(e,i){
|
||||
// this.amtInwords[i] = this._pd.convertNumberToWords(e);
|
||||
// }
|
||||
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
|
||||
@ -97,8 +97,7 @@
|
||||
<mat-form-field style="width:45%">
|
||||
<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-hint align="start" style="font-size:90%" *ngIf="details.get('amount').value != ''">{{"₹"}} {{ details.get('amount').value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
@ -50,7 +50,7 @@ export class OtherIncomeComponent implements OnInit {
|
||||
private notifier: NotifierService;
|
||||
frequencyData: any = [];
|
||||
sourceData: any = [];
|
||||
amtInwords: any = [];
|
||||
|
||||
applicants: any = [];
|
||||
incomeEarnedBy: any = [];
|
||||
existCompanyList: any = [];
|
||||
@ -150,7 +150,7 @@ export class OtherIncomeComponent implements OnInit {
|
||||
});
|
||||
if (result.length > 0) {
|
||||
result.forEach((val, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(val.amount);
|
||||
|
||||
// this.getOtherIncomeEarnedBy(val.income_earned_by,index);
|
||||
control.push(this.createDetail());
|
||||
this.getOtherIncomeEarnedBy(val.income_earned_by, index);
|
||||
@ -275,10 +275,6 @@ export class OtherIncomeComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e, i) {
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
}
|
||||
|
||||
Toview() {
|
||||
// alert('Rental Info ');
|
||||
|
||||
@ -755,8 +755,6 @@ export class StockComponent implements OnInit {
|
||||
|
||||
checkComments(value, flag, index) {
|
||||
|
||||
|
||||
|
||||
if (flag == 1) {
|
||||
this.ManufacturingCounterArray[index] = value == "yes" ? 1 : 0;
|
||||
this.not_stock_of_rm[index] = value == "stock not required to be maintained" ? 1 : 0;
|
||||
|
||||
@ -4,68 +4,130 @@ import { Pipe, PipeTransform } from '@angular/core';
|
||||
name: 'numberToWords'
|
||||
})
|
||||
export class NumberToWordsPipe implements PipeTransform {
|
||||
transform(amount: any): any{
|
||||
var sglDigit = ["Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"],
|
||||
dblDigit = ["Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"],
|
||||
tensPlace = ["", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"],
|
||||
|
||||
handle_tens = function(dgt, prevDgt) {
|
||||
return 0 == dgt ? "" : " " + (1 == dgt ? dblDigit[prevDgt] : tensPlace[dgt])
|
||||
},
|
||||
handle_utlc = function(dgt, nxtDgt, denom) {
|
||||
return (0 != dgt && 1 != nxtDgt ? " " + sglDigit[dgt] : "") + (0 != nxtDgt || dgt > 0 ? " " + denom : "")
|
||||
};
|
||||
|
||||
transform(amount: any): any {
|
||||
let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||
words[30] = 'Thirty';
|
||||
words[40] = 'Forty';
|
||||
words[50] = 'Fifty';
|
||||
words[60] = 'Sixty';
|
||||
words[70] = 'Seventy';
|
||||
words[80] = 'Eighty';
|
||||
words[90] = 'Ninety';
|
||||
amount = amount.toString();
|
||||
let atemp = amount.split(".");
|
||||
let number = atemp[0].split(",").join("");
|
||||
let n_length = number.length;
|
||||
let words_string = "";
|
||||
let value: any;
|
||||
if (n_length <= 9) {
|
||||
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
var received_n_array = new Array();
|
||||
for (var i = 0; i < n_length; i++) {
|
||||
received_n_array[i] = number.substr(i, 1);
|
||||
}
|
||||
for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||
n_array[i] = received_n_array[j];
|
||||
}
|
||||
for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
if (n_array[i] == 1) {
|
||||
n_array[j] = 10 + (+n_array[j]);
|
||||
n_array[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = "";
|
||||
for (var i = 0; i < 9; i++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
value = n_array[i] * 10;
|
||||
} else {
|
||||
value = n_array[i];
|
||||
}
|
||||
if (value != 0) {
|
||||
words_string += words[value] + " ";
|
||||
}
|
||||
if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Crores, ";
|
||||
}
|
||||
if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Lakhs, ";
|
||||
}
|
||||
if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Thousand, ";
|
||||
}
|
||||
if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||
words_string += "Hundred and ";
|
||||
} else if (i == 6 && value != 0) {
|
||||
words_string += "Hundred ";
|
||||
}
|
||||
}
|
||||
words_string = words_string.split(" ").join(" ");
|
||||
words_string=(words_string.length > 2 && words_string.charAt(words_string.length-2)==',') ? words_string.slice(0, -2) : words_string;
|
||||
}
|
||||
return words_string;
|
||||
}
|
||||
var str = "",
|
||||
digitIdx = 0,
|
||||
digit = 0,
|
||||
nxtDigit = 0,
|
||||
words = [];
|
||||
if (amount += "", isNaN(parseInt(amount))) str = "";
|
||||
else if (parseInt(amount) > 0 && amount.length <= 10) {
|
||||
for (digitIdx = amount.length - 1; digitIdx >= 0; digitIdx--)
|
||||
switch (digit = amount[digitIdx] - 0, nxtDigit = digitIdx > 0 ? amount[digitIdx - 1] - 0 : 0, amount.length - digitIdx - 1) {
|
||||
case 0:
|
||||
words.push(handle_utlc(digit, nxtDigit, ""));
|
||||
break;
|
||||
case 1:
|
||||
words.push(handle_tens(digit, amount[digitIdx + 1]));
|
||||
break;
|
||||
case 2:
|
||||
words.push(0 != digit ? " " + sglDigit[digit] + " Hundred" + (0 != amount[digitIdx + 1] && 0 != amount[digitIdx + 2] ? " and" : "") : "");
|
||||
break;
|
||||
case 3:
|
||||
words.push(handle_utlc(digit, nxtDigit, "Thousand"));
|
||||
break;
|
||||
case 4:
|
||||
words.push(handle_tens(digit, amount[digitIdx + 1]));
|
||||
break;
|
||||
case 5:
|
||||
words.push(handle_utlc(digit, nxtDigit, "Lakh"));
|
||||
break;
|
||||
case 6:
|
||||
words.push(handle_tens(digit, amount[digitIdx + 1]));
|
||||
break;
|
||||
case 7:
|
||||
words.push(handle_utlc(digit, nxtDigit, "Crore"));
|
||||
break;
|
||||
case 8:
|
||||
words.push(handle_tens(digit, amount[digitIdx + 1]));
|
||||
break;
|
||||
case 9:
|
||||
words.push(0 != digit ? " " + sglDigit[digit] + " Hundred" + (0 != amount[digitIdx + 1] || 0 != amount[digitIdx + 2] ? " and" : " Crore") : "")
|
||||
// break;
|
||||
// case 10:
|
||||
// words.push(0 != digit ? " " + sglDigit[digit] + " Lakh" + (0 != price[digitIdx + 1] || 0 != price[digitIdx + 2] ? " and" : " Hundred" + (0 != price[digitIdx + 1] || 0 != price[digitIdx + 2] || 0 != price[digitIdx + 3] ? " and" : " Crore"))
|
||||
// : "")
|
||||
// break;
|
||||
}
|
||||
str = words.reverse().join("")
|
||||
} else str = "";
|
||||
return str
|
||||
|
||||
}
|
||||
|
||||
//References
|
||||
// transform(amount: any): any {
|
||||
// let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||
// words[30] = 'Thirty';
|
||||
// words[40] = 'Forty';
|
||||
// words[50] = 'Fifty';
|
||||
// words[60] = 'Sixty';
|
||||
// words[70] = 'Seventy';
|
||||
// words[80] = 'Eighty';
|
||||
// words[90] = 'Ninety';
|
||||
// amount = amount.toString();
|
||||
// let atemp = amount.split(".");
|
||||
// let number = atemp[0].split(",").join("");
|
||||
// let n_length = number.length;
|
||||
// let words_string = "";
|
||||
// let value: any;
|
||||
// if (n_length <= 9) {
|
||||
// var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
// var received_n_array = new Array();
|
||||
// for (var i = 0; i < n_length; i++) {
|
||||
// received_n_array[i] = number.substr(i, 1);
|
||||
// }
|
||||
// for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||
// n_array[i] = received_n_array[j];
|
||||
// }
|
||||
// for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||
// if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
// if (n_array[i] == 1) {
|
||||
// n_array[j] = 10 + (+n_array[j]);
|
||||
// n_array[i] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// value = "";
|
||||
// for (var i = 0; i < 9; i++) {
|
||||
// if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
// value = n_array[i] * 10;
|
||||
// } else {
|
||||
// value = n_array[i];
|
||||
// }
|
||||
// if (value != 0) {
|
||||
// words_string += words[value] + " ";
|
||||
// }
|
||||
// if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Crores, ";
|
||||
// }
|
||||
// if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Lakhs, ";
|
||||
// }
|
||||
// if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Thousand, ";
|
||||
// }
|
||||
// if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||
// words_string += "Hundred and ";
|
||||
// } else if (i == 6 && value != 0) {
|
||||
// words_string += "Hundred ";
|
||||
// }
|
||||
// }
|
||||
// words_string = words_string.split(" ").join(" ");
|
||||
// words_string=(words_string.length > 2 && words_string.charAt(words_string.length-2)==',') ? words_string.slice(0, -2) : words_string;
|
||||
// }
|
||||
// return words_string;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -412,69 +412,69 @@ export class PdTrigerService {
|
||||
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
||||
// return str;
|
||||
// }
|
||||
|
||||
convertNumberToWords(amount) {
|
||||
//let words : any = new Array();
|
||||
let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||
words[30] = 'Thirty';
|
||||
words[40] = 'Forty';
|
||||
words[50] = 'Fifty';
|
||||
words[60] = 'Sixty';
|
||||
words[70] = 'Seventy';
|
||||
words[80] = 'Eighty';
|
||||
words[90] = 'Ninety';
|
||||
amount = amount.toString();
|
||||
let atemp = amount.split(".");
|
||||
let number = atemp[0].split(",").join("");
|
||||
let n_length = number.length;
|
||||
let words_string = "";
|
||||
let value: any;
|
||||
if (n_length <= 9) {
|
||||
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
var received_n_array = new Array();
|
||||
for (var i = 0; i < n_length; i++) {
|
||||
received_n_array[i] = number.substr(i, 1);
|
||||
}
|
||||
for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||
n_array[i] = received_n_array[j];
|
||||
}
|
||||
for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
if (n_array[i] == 1) {
|
||||
n_array[j] = 10 + (+n_array[j]);
|
||||
n_array[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = "";
|
||||
for (var i = 0; i < 9; i++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
value = n_array[i] * 10;
|
||||
} else {
|
||||
value = n_array[i];
|
||||
}
|
||||
if (value != 0) {
|
||||
words_string += words[value] + " ";
|
||||
}
|
||||
if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Crores ";
|
||||
}
|
||||
if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Lakhs ";
|
||||
}
|
||||
if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Thousand ";
|
||||
}
|
||||
if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||
words_string += "Hundred and ";
|
||||
} else if (i == 6 && value != 0) {
|
||||
words_string += "Hundred ";
|
||||
}
|
||||
}
|
||||
words_string = words_string.split(" ").join(" ");
|
||||
}
|
||||
return words_string;
|
||||
}
|
||||
|
||||
// convertNumberToWords(amount) {
|
||||
// //let words : any = new Array();
|
||||
// let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||
// words[30] = 'Thirty';
|
||||
// words[40] = 'Forty';
|
||||
// words[50] = 'Fifty';
|
||||
// words[60] = 'Sixty';
|
||||
// words[70] = 'Seventy';
|
||||
// words[80] = 'Eighty';
|
||||
// words[90] = 'Ninety';
|
||||
// amount = amount.toString();
|
||||
// let atemp = amount.split(".");
|
||||
// let number = atemp[0].split(",").join("");
|
||||
// let n_length = number.length;
|
||||
// let words_string = "";
|
||||
// let value: any;
|
||||
// if (n_length <= 9) {
|
||||
// var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
// var received_n_array = new Array();
|
||||
// for (var i = 0; i < n_length; i++) {
|
||||
// received_n_array[i] = number.substr(i, 1);
|
||||
// }
|
||||
// for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||
// n_array[i] = received_n_array[j];
|
||||
// }
|
||||
// for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||
// if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
// if (n_array[i] == 1) {
|
||||
// n_array[j] = 10 + (+n_array[j]);
|
||||
// n_array[i] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// value = "";
|
||||
// for (var i = 0; i < 9; i++) {
|
||||
// if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
// value = n_array[i] * 10;
|
||||
// } else {
|
||||
// value = n_array[i];
|
||||
// }
|
||||
// if (value != 0) {
|
||||
// words_string += words[value] + " ";
|
||||
// }
|
||||
// if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Crores ";
|
||||
// }
|
||||
// if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Lakhs ";
|
||||
// }
|
||||
// if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||
// words_string += "Thousand ";
|
||||
// }
|
||||
// if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||
// words_string += "Hundred and ";
|
||||
// } else if (i == 6 && value != 0) {
|
||||
// words_string += "Hundred ";
|
||||
// }
|
||||
// }
|
||||
// words_string = words_string.split(" ").join(" ");
|
||||
// }
|
||||
// return words_string;
|
||||
// }
|
||||
|
||||
// save additional requirements
|
||||
saveAdditionalRequirements(saveData: any): Observable<any> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user