Renamed void_reason to reason so that we can store the employee name in case of Staff and NC reason in case of NC bills.

Settling NC and Staff bills now asks for Staff name / NC reason
This commit is contained in:
Amritanshu
2019-08-25 23:22:50 +05:30
parent 6d0f30503a
commit a12f093828
18 changed files with 171 additions and 97 deletions

View File

@ -79,10 +79,10 @@ export class VoucherService {
}
}
receivePayment(id: string, amounts: { id: string; name: string; amount: number }[], updateTable: boolean): Observable<boolean> {
receivePayment(id: string, amounts: { id: number; name: string; amount: number }[], name: string, updateTable: boolean): Observable<boolean> {
const options = {params: new HttpParams().set('receive-payment', '').set('u', updateTable.toString())};
return <Observable<boolean>>this.http.post<boolean>(
`${url}/${id}`, amounts, options
`${url}/${id}`, {name: name, amounts: amounts}, options
).pipe(
catchError(this.log.handleError(serviceName, 'receivePayment'))
);