Fix: Cancel bill printing if discount dialog is cancelled.
This commit is contained in:
parent
7b327b4fda
commit
98c75f66c9
|
@ -149,6 +149,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 {
|
||||||
|
throw new Error('Cancelled');
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
switchMap(() => this.billTypeDialog()),
|
switchMap(() => this.billTypeDialog()),
|
||||||
|
|
Loading…
Reference in New Issue