Fix: Could not print bill if discount permission not allowed
This commit is contained in:
parent
a4d389bba5
commit
12a361aff1
@ -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()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user