From e56a753053064405325073fdc80568802775eacb Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Sun, 19 Mar 2023 14:43:40 +0530 Subject: [PATCH] Fix: Users without ability of edit printed products where not able to set quantity to zero in the bill --- bookie/src/app/sales/bill.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookie/src/app/sales/bill.service.ts b/bookie/src/app/sales/bill.service.ts index c9bd788..1a2d660 100644 --- a/bookie/src/app/sales/bill.service.ts +++ b/bookie/src/app/sales/bill.service.ts @@ -184,7 +184,7 @@ export class BillService { const old = newKot.inventories.find( (x) => x.product.id === item.productId && x.isHappyHour === item.isHappyHour, ) as Inventory; - if (item.quantity > 1 || (canEdit && this.minimum(item.productId as string, item.isHappyHour) >= 1)) { + if (item.quantity >= 1 || (canEdit && this.minimum(item.productId as string, item.isHappyHour) >= 1)) { old.quantity -= 1; } else if (item.quantity === 0) { newKot.inventories.splice(newKot.inventories.indexOf(old), 1);