merge :kms

This commit is contained in:
gandhimathi 2019-02-11 19:27:11 +05:30
parent 908609dd8a
commit 183db51da2
12 changed files with 74 additions and 12 deletions

View File

@ -25,7 +25,8 @@
</div>
<div class="item-margin" fxFlex="100">
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="businessCalculation(s,item.value)" formControlName="expense_value" required>
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="businessCalculation(s,item.value);inWords($event.target.value,s,1)" formControlName="expense_value" required>
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('expense_value').value != ''">{{"&#8377;"}} {{Amount[s]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 25%">
<mat-select placeholder="Frequency" formControlName="fk_frequency_id" (selectionChange)="businessCalculation(s,item.value)" required>

View File

@ -10,7 +10,8 @@ import { NotifierService } from 'angular-notifier';
styleUrls: ['./manage-busines-expense.component.scss']
})
export class ManageBusinesExpenseComponent implements OnInit {
Amount: any = [];
pageTitle:string;
businessItemForm:FormGroup;
frequencyData: any[]=[];
@ -124,4 +125,15 @@ submitDetails(records) {
});
}
/** Amount InWords */
inWords(e,i,flag){
switch(flag){
case 1 :
this.Amount[i] = this._pd.convertNumberToWords(e);
break;
default:
break;
}
}
}

View File

@ -35,8 +35,9 @@
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Value" (keyup)="salesCalculation(s,sales.value,sales.value.child)" formControlName="sales_value" required>
</mat-form-field>
<input OnlyNumber type="text" matInput placeholder="Value" (keyup)="salesCalculation(s,sales.value,sales.value.child);inWords($event.target.value,c,1)" formControlName="sales_value" required>
<mat-hint align="start" style="font-size:90%" *ngIf="childItem.get('sales_value').value != ''">{{"&#8377;"}} {{Value[c]}} Only</mat-hint>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeDailyItems(s,c,childItem.value)" *ngIf="(sales.value.child | deleteRecordsCount)>1"
matTooltip="Remove" matTooltipPosition="above">
<mat-icon>delete</mat-icon>

View File

@ -13,6 +13,7 @@ import { DeleteRecordsCountPipe } from './../../../../../../../pd-pipes/delete-r
providers: [DeleteRecordsCountPipe],
})
export class ManageDailySalesComponent implements OnInit {
Value: any []=[];
pipe = new DatePipe('en-US');
pageTitle:string;
salesItemForm:FormGroup;
@ -213,5 +214,12 @@ submitDetails(records) {
}
});
}
inWords(e,c,flag){
switch(flag){
case 1 :
this.Value[c] = this._pd.convertNumberToWords(e);
break;
}
}
}

View File

@ -23,7 +23,8 @@
</div>
<div class="item-margin" fxFlex="100">
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="houseCalculation(s,item.value)" formControlName="expense_value" required>
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="houseCalculation(s,item.value);inWords($event.target.value,s,1)" formControlName="expense_value" required>
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('expense_value').value != ''">{{"&#8377;"}} {{Amount[s]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 25%">
<mat-select placeholder="Frequency" formControlName="fk_frequency_id" (selectionChange)="houseCalculation(s,item.value)" required>

View File

@ -10,7 +10,8 @@ import { NotifierService } from 'angular-notifier';
styleUrls: ['./manage-house-hold.component.scss']
})
export class ManageHouseHoldComponent implements OnInit {
pageTitle:string;
Amount: any[]=[];
pageTitle: string;
houseItemForm:FormGroup;
frequencyData: any[]=[];
private notifier: NotifierService;
@ -120,5 +121,12 @@ submitDetails(records) {
}
});
}
inWords(e,s,flag){
switch(flag){
case 1 :
this.Amount[s] = this._pd.convertNumberToWords(e);
break;
}
}
}

View File

@ -25,7 +25,8 @@
</div>
<div class="item-margin" fxFlex="100">
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="businessCalculation(s,item.value)" formControlName="income_value" required>
<input OnlyNumber type="text" matInput placeholder="Amount (Rs)" (keyup)="businessCalculation(s,item.value);inWords($event.target.value,s,1)" formControlName="income_value" required>
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('income_value').value != ''">{{"&#8377;"}} {{Amount[s]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 25%">
<mat-select placeholder="Frequency" formControlName="fk_frequency_id" (selectionChange)="businessCalculation(s,item.value)" required>

View File

@ -10,6 +10,7 @@ import { NotifierService } from 'angular-notifier';
styleUrls: ['./manage-other-business-income.component.scss']
})
export class ManageOtherBusinessIncomeComponent implements OnInit {
Amount: any[]=[];
pageTitle:string;
businessIncomeItemForm:FormGroup;
@ -124,4 +125,13 @@ submitDetails(records) {
});
}
inWords(e,s,flag){
switch(flag){
case 1 :
this.Amount[s] = this._pd.convertNumberToWords(e);
break;
}
}
}

View File

@ -31,7 +31,8 @@
</mat-select>
</mat-form-field>
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Rate/Unit of Purchase" formControlName="rate_per_unit" (keyup)="purchaseCalculation(s,item.value)" required>
<input OnlyNumber type="text" matInput placeholder="Rate/Unit of Purchase" formControlName="rate_per_unit" (keyup)="purchaseCalculation(s,item.value);inWords($event.target.value,s,1)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('rate_per_unit').value != ''">{{"&#8377;"}} {{RateUnitofPurchase[s]}} Only</mat-hint>
</mat-form-field>
</div>

View File

@ -10,8 +10,8 @@ import { NotifierService } from 'angular-notifier';
styleUrls: ['./manage-purchase.component.scss']
})
export class ManagePurchaseComponent implements OnInit {
pageTitle:string;
RateUnitofPurchase: any[]=[];
pageTitle: string;
purchaseItemForm:FormGroup;
UOMData: any[]=[];
frequencyData: any[]=[];
@ -128,4 +128,13 @@ submitDetails(records) {
});
}
inWords(e,s,flag){
switch(flag){
case 1 :
this.RateUnitofPurchase[s] = this._pd.convertNumberToWords(e);
break;
}
}
}

View File

@ -23,7 +23,8 @@
</div>
<div class="item-margin" fxFlex="100">
<mat-form-field style="width: 25%">
<input OnlyNumber type="text" matInput placeholder="Sale Quantity" (keyup)="salesCalculation(s,sales.value)" formControlName="sales_qty" required>
<input OnlyNumber type="text" matInput placeholder="Sale Quantity" (keyup)="salesCalculation(s,sales.value);inWords($event.target.value,s,1)" formControlName="sales_qty" required>
<mat-hint align="start" style="font-size:90%" *ngIf="sales.get('sales_qty').value != ''">{{"&#8377;"}} {{Sale_Quantity[s]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 25%">
<mat-select placeholder="UOM" formControlName="fk_uom_id" required>

View File

@ -10,7 +10,8 @@ import { NotifierService } from 'angular-notifier';
styleUrls: ['./manage-sales.component.scss']
})
export class ManageSalesComponent implements OnInit {
pageTitle:string;
Sale_Quantity: any[]=[];
pageTitle: string;
salesItemForm:FormGroup;
UOMData: any[]=[];
frequencyData: any[]=[];
@ -156,4 +157,12 @@ submitDetails(records) {
});
}
inWords(e,s,flag){
switch(flag){
case 1 :
this.Sale_Quantity[s] = this._pd.convertNumberToWords(e);
break;
}
}
}