Added session support, but right now it is defaulting to 2 week long session
Reports working: Ledger Balance Sheet Profit & Loss Closing Stock
This commit is contained in:
@ -21,14 +21,9 @@ export class ProfitLossService {
|
||||
}
|
||||
|
||||
list(startDate: string, finishDate): Observable<ProfitLoss> {
|
||||
const options = {params: new HttpParams()};
|
||||
if (startDate !== null) {
|
||||
options.params = options.params.set('s', startDate);
|
||||
}
|
||||
if (finishDate !== null) {
|
||||
options.params = options.params.set('f', finishDate);
|
||||
}
|
||||
return <Observable<ProfitLoss>>this.http.get<ProfitLoss>(url, options)
|
||||
startDate = startDate ? `/${startDate}` : '';
|
||||
finishDate = finishDate ? `/${finishDate}` : '';
|
||||
return <Observable<ProfitLoss>>this.http.get<ProfitLoss>(`${url}${startDate}${finishDate}`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user