update accounting journal entry UI and API response

This commit is contained in:
Nitesh Yadav
2026-05-19 10:45:37 +05:30
parent 6753ab1d56
commit 7c910da0b4
9 changed files with 3477 additions and 630 deletions
+34
View File
@@ -106,6 +106,40 @@ export class AccountingService {
return this.http.get('/journalentries', { params: httpParams });
}
/**
* CBS GL Account Ledger Report: returns opening balance, day-wise summary, totals, and paginated entries.
*/
getGLAccountLedger(params: {
glAccountId?: number;
officeId?: number;
fromDate?: string;
toDate?: string;
dateFormat?: string;
locale?: string;
manualEntriesOnly?: boolean;
transactionId?: string;
offset?: number;
limit?: number;
orderBy?: string;
sortOrder?: string;
}): Observable<any> {
let httpParams = new HttpParams();
if (params.glAccountId) httpParams = httpParams.set('glAccountId', params.glAccountId.toString());
if (params.officeId) httpParams = httpParams.set('officeId', params.officeId.toString());
if (params.fromDate) httpParams = httpParams.set('fromDate', params.fromDate);
if (params.toDate) httpParams = httpParams.set('toDate', params.toDate);
if (params.dateFormat) httpParams = httpParams.set('dateFormat', params.dateFormat);
if (params.locale) httpParams = httpParams.set('locale', params.locale);
if (params.manualEntriesOnly != null)
httpParams = httpParams.set('manualEntriesOnly', params.manualEntriesOnly.toString());
if (params.transactionId) httpParams = httpParams.set('transactionId', params.transactionId);
if (params.offset != null) httpParams = httpParams.set('offset', params.offset.toString());
if (params.limit != null) httpParams = httpParams.set('limit', params.limit.toString());
if (params.orderBy) httpParams = httpParams.set('orderBy', params.orderBy);
if (params.sortOrder) httpParams = httpParams.set('sortOrder', params.sortOrder);
return this.http.get('/journalentries/ledger', { params: httpParams });
}
/**
* @param {string} transactionId Transaction ID to be reverted.
* @param {string} comments Any comments.