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:
@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user