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 }[]) => {
|
tap((result: boolean | { id: string; name: string; discount: number }[]) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.bs.discount(result as { id: string; name: string; discount: number }[]);
|
this.bs.discount(result as { id: string; name: string; discount: number }[]);
|
||||||
} else {
|
} else if (this.discountAllowed()) {
|
||||||
throw new Error('Cancelled');
|
throw new Error('Discount Selection Cancelled');
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
switchMap(() => this.billTypeDialog()),
|
switchMap(() => this.billTypeDialog()),
|
||||||
|
|
Loading…
Reference in New Issue