Fix: Product units
This commit is contained in:
parent
fd1111f378
commit
5603c5d8fb
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue