Feature: Cancelled bills are now separate from void bills.

Void bills are automatically generated when printed bills are changed.
Manually cancelled bills are called cancelled bills.
This commit is contained in:
2023-03-17 08:27:30 +05:30
parent a62018ad1f
commit 1a08066c2d
15 changed files with 170 additions and 39 deletions

View File

@ -123,13 +123,13 @@ export class VoucherService {
.pipe(catchError(this.log.handleError(serviceName, 'receivePayment'))) as Observable<boolean>;
}
voidBill(id: string, reason: string, updateTable: boolean): Observable<boolean> {
cancelBill(id: string, reason: string, updateTable: boolean): Observable<boolean> {
const options = {
params: new HttpParams().set('reason', reason).set('u', updateTable.toString()),
};
return this.http
.post<boolean>(`${url}/void-bill/${id}`, {}, options)
.pipe(catchError(this.log.handleError(serviceName, 'voidBill'))) as Observable<boolean>;
.post<boolean>(`${url}/cancel-bill/${id}`, {}, options)
.pipe(catchError(this.log.handleError(serviceName, 'cancelBill'))) as Observable<boolean>;
}
moveTable(id: string, table: Table): Observable<boolean> {