Fix: Cancel bill printing if discount dialog is cancelled.

This commit is contained in:
Amritanshu Agrawal 2020-12-24 09:26:34 +05:30
parent 7b327b4fda
commit 98c75f66c9
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,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');
}
}),
switchMap(() => this.billTypeDialog()),