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:
1 parent
6dbab6442f
commit
85d05392b8
8 files changed
+181
-108
No files matched your search
@@ -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