Feature: Open bill using bill number

This commit is contained in:
2020-12-24 12:58:46 +05:30
parent 98c75f66c9
commit 161896154d
17 changed files with 234 additions and 29 deletions

View File

@ -50,6 +50,14 @@ export class VoucherService {
) as Observable<Bill>;
}
getFromBill(billId: string): Observable<Bill> {
return this.http
.get<Bill>(`${url}/from-bill/${billId}`)
.pipe(
catchError(this.log.handleError(serviceName, `getFromBill billId=${billId}`)),
) as Observable<Bill>;
}
save(
voucher: Bill,
voucherType: VoucherType,
@ -179,8 +187,8 @@ export class VoucherService {
) as Observable<boolean>;
}
splitBill(id: string, inventoriesToMove: string[], table: Table) {
const options = { params: new HttpParams().set('u', 'true') };
splitBill(id: string, inventoriesToMove: string[], table: Table, updateTable: boolean) {
const options = { params: new HttpParams().set('u', updateTable.toString()) };
return this.http
.post<boolean>(
`${urlSplitBill}/${id}`,