Fix: Product units

This commit is contained in:
Amritanshu
2019-08-21 14:27:11 +05:30
parent fd1111f378
commit 5603c5d8fb
3 changed files with 5 additions and 7 deletions

View File

@ -55,7 +55,7 @@ export class BillService {
productId: i.product.id,
isHappyHour: i.isHappyHour,
isPrinted: true,
info: `${i.product.name} (${i.product.units}) @ ${i.price} - ${math.round(i.discount * 100, 2)}%`,
info: `${i.product.name} @ ${i.price} - ${math.round(i.discount * 100, 2)}%`,
price: i.price,
quantity: i.quantity,
discount: i.discount,
@ -83,7 +83,7 @@ export class BillService {
product: product,
productId: product.id,
isHappyHour: product.hasHappyHour,
info: `${product.name} (${product.units}) @ ${product.price} - ${0}%`,
info: `${product.name} @ ${product.price} - ${0}%`,
price: product.price,
quantity: 1,
discount: 0,
@ -159,7 +159,7 @@ export class BillService {
this.data.forEach(x => {
if (!x.isKot) {
x.discount = discounts.find(d => d.id === x.product.saleCategory.id).discount / 100;
x.info = `${x.product.name} (${x.product.units}) @ ${x.price} - ${math.round(x.discount * 100, 2)}%`;
x.info = `${x.product.name} @ ${x.price} - ${math.round(x.discount * 100, 2)}%`;
}
});
this.dataObs.next(this.data);