Receive payment working.
TODO: Nested subscribe in Receive Payment in sales-home-component.ts should be refactored into something more readable.
This commit is contained in:
@ -75,4 +75,12 @@ export class VoucherService {
|
||||
return this.update(voucher, printType, guest_book_id, updateTable);
|
||||
}
|
||||
}
|
||||
|
||||
receivePayment(id: string, amounts: { id: string; name: string; amount: number }[], updateTable: boolean): Observable<Bill> {
|
||||
const options = {params: new HttpParams().set('r', "").set('u', updateTable.toString())};
|
||||
return <Observable<Bill>>this.http.post<Bill>(`${url}/${id}`, amounts, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'receivePayment'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user