diff --git a/barker/views/product.py b/barker/views/product.py index 4b9959e..100560b 100644 --- a/barker/views/product.py +++ b/barker/views/product.py @@ -216,8 +216,7 @@ def show_list_sale(request): products.append( { "id": item.id, - "name": "H H " + item.name, - "units": item.units, + "name": "H H " + item.full_name, "saleCategory": { "id": item.sale_category_id, "name": item.sale_category.name, diff --git a/barker/views/voucher/show.py b/barker/views/voucher/show.py index 66351a0..f62bb3e 100644 --- a/barker/views/voucher/show.py +++ b/barker/views/voucher/show.py @@ -113,8 +113,7 @@ def voucher_info(item): "sortOrder": i.sort_order, "product": { "id": i.product_id, - "name": i.product.name, - "units": i.product.units, + "name": i.product.full_name, "menuCategory": { "id": i.product.menu_category_id, "name": i.product.menu_category.name, diff --git a/bookie/src/app/sales/bill.service.ts b/bookie/src/app/sales/bill.service.ts index dca7c85..3f6f2e1 100644 --- a/bookie/src/app/sales/bill.service.ts +++ b/bookie/src/app/sales/bill.service.ts @@ -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);