diff --git a/bookie/src/app/sales/home/sales-home.component.ts b/bookie/src/app/sales/home/sales-home.component.ts index 2b572df..5971ad9 100644 --- a/bookie/src/app/sales/home/sales-home.component.ts +++ b/bookie/src/app/sales/home/sales-home.component.ts @@ -153,8 +153,8 @@ export class SalesHomeComponent { tap((result: boolean | { id: string; name: string; discount: number }[]) => { if (result) { this.bs.discount(result as { id: string; name: string; discount: number }[]); - } else { - throw new Error('Cancelled'); + } else if (this.discountAllowed()) { + throw new Error('Discount Selection Cancelled'); } }), switchMap(() => this.billTypeDialog()),