feat: add settle cash component (#879)

Fixes: #759
This commit is contained in:
Benura Abeywardena
2020-07-12 11:33:12 +05:30
committed by GitHub
parent ff6ac7028e
commit 5ef7465ce5
8 changed files with 253 additions and 2 deletions
@@ -284,6 +284,27 @@ export class OrganizationService {
return this.http.get(`/tellers/${tellerId}/cashiers/${cashierId}/summaryandtransactions`, { params: httpParams });
}
/** Get Cashier Transaction template.
* @param {string} tellerId Teller Id.
* @param {string} cashierId Cashier Id.
* @returns {Observable<any>} Cashier Transaction data.
*/
getCashierTransactionTemplate(tellerId: string, cashierId: string): Observable<any> {
return this.http.get(`/tellers/${tellerId}/cashiers/${cashierId}/transactions/template`);
}
/**
* Settle Cash.
* @param {string} tellerId Teller Id.
* @param {string} cashierId Cashier Id.
* @param {string} cashData Cash Data.
* @returns {Observable<any>}
*/
settleCash(tellerId: string, cashierId: string, cashData: any): Observable<any> {
const httpParams = new HttpParams().set('command', 'settle');
return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/settle`, cashData, {params: httpParams});
}
/**
* @param {string} tellerId Teller ID of teller to be deleted.
* @returns {Observable<any>}