Fix: Could not print bill if discount permission not allowed

This commit is contained in:
Amritanshu Agrawal 2021-06-13 17:54:04 +05:30
parent a4d389bba5
commit 12a361aff1
1 changed files with 2 additions and 2 deletions

View File

@ -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()),