label changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-03-26 14:38:33 +05:30
parent b59f1f02e3
commit 460e5d1cb3
4 changed files with 14 additions and 8 deletions

View File

@ -96,12 +96,12 @@
<app-house-hold-details [masterData]="getCustomValues" [parentData]="houseHoldExpenses" (loadAssessedForms)="loadAIDetails()"></app-house-hold-details>
</ng-template>
</mat-tab>
<mat-tab label="Other Business Income">
<!--<mat-tab label="Other Business Income">
<ng-template matTabContent>
<app-other-business-income-details [masterData]="getCustomValues" [parentData]="otherBusinessIncome" (loadAssessedForms)="loadAIDetails()"></app-other-business-income-details>
</ng-template>
</mat-tab>
</mat-tab>-->
<mat-tab label="Docs">
<ng-template matTabContent>
<div ngxViewer>

View File

@ -22,7 +22,7 @@
<mat-card-header>
<mat-card-title>
<small class="expan_table_header">{{expandDetails.salesItem}}</small>
<small class="expan_table_header" *ngIf="activateMariginCalculation===true">&nbsp;( Margin Percentage : {{expandDetails.margin_per}} % &nbsp;&nbsp;Margin Value : {{expandDetails.margin_value}} )</small>
<small class="expan_table_header" *ngIf="activateMariginCalculation===true">&nbsp;( Gross Margin : {{expandDetails.margin_per}} % &nbsp;&nbsp;Gross Profit : {{expandDetails.margin_value}} )</small>
</mat-card-title>
<mat-card-subtitle *ngFor="let footer of expandDetails.footerMessage">
@ -63,7 +63,7 @@
<mat-card-header>
<mat-card-title>
<small class="expan_table_header">{{expandDetails.salesItem}}</small>
<small class="expan_table_header" *ngIf="activateMariginCalculation===true">&nbsp;( Margin Percentage : {{expandDetails.margin_per}} % &nbsp;&nbsp;Margin Value : {{expandDetails.margin_value}} )</small>
<small class="expan_table_header" *ngIf="activateMariginCalculation===true">&nbsp;( Gross Margin : {{expandDetails.margin_per}} % &nbsp;&nbsp;Gross Profit : {{expandDetails.margin_value}} )</small>
</mat-card-title>
<!-- <mat-card-subtitle *ngFor="let footer of expandDetails.footerMessage">
@ -83,7 +83,7 @@
<ng-container matColumnDef="Date">
<th mat-header-cell *matHeaderCellDef>Frequency</th>
<td mat-cell *matCellDef="let itemValue">{{itemValue.frequency_name ? itemValue.frequency_name : '' }} </td>
<td mat-footer-cell *matFooterCellDef> Total </td>
<td mat-footer-cell *matFooterCellDef> Annual Sales </td>
</ng-container>
<ng-container matColumnDef="Amount">
<th mat-header-cell *matHeaderCellDef>Amount</th>

View File

@ -59,7 +59,7 @@
</ng-container>
<ng-container matColumnDef="margin_percentage" *ngIf="activateMariginCalculation===true">
<th mat-header-cell *matHeaderCellDef> Margin Percentage % </th>
<th mat-header-cell *matHeaderCellDef> Gross Margin % </th>
<td mat-cell *matCellDef="let element">{{element.margin_per}}
</td>
<td mat-footer-cell *matFooterCellDef> </td>
@ -73,7 +73,7 @@
</ng-container>
<ng-container matColumnDef="final_value" *ngIf="activateMariginCalculation===true">
<th mat-header-cell *matHeaderCellDef> Final Value </th>
<th mat-header-cell *matHeaderCellDef> Gross Profit </th>
<td mat-cell *matCellDef="let element">{{element.margin_final_value}}
</td>
<td mat-footer-cell *matFooterCellDef> </td>

View File

@ -4,7 +4,12 @@ import { Pipe, PipeTransform } from '@angular/core';
name: 'numberToWords'
})
export class NumberToWordsPipe implements PipeTransform {
transform(amount: any): any{
transform(price: any): any{
price = price.toString();
let atemp = price.split(".");
let amount = atemp[0];
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"],
@ -61,6 +66,7 @@ export class NumberToWordsPipe implements PipeTransform {
// break;
}
str = words.reverse().join("")
// str =(str.length > 2 && str.charAt(str.length-2)==',') ? str.slice(0, -2) : str;
} else str = "";
return str