feat(server): wip priting financial reports

This commit is contained in:
Ahmed Bouhuolia
2024-02-11 01:14:31 +02:00
parent 9395ef094a
commit b11c531cf5
23 changed files with 438 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import {
import { GeneralLedgerTableInjectable } from './GeneralLedgerTableInjectable';
import { GeneralLedgerExportInjectable } from './GeneralLedgerExport';
import { GeneralLedgerService } from './GeneralLedgerService';
import { GeneralLedgerPdf } from './GeneralLedgerPdf';
export class GeneralLedgerApplication {
@Inject()
@@ -17,6 +18,9 @@ export class GeneralLedgerApplication {
@Inject()
private GLSheet: GeneralLedgerService;
@Inject()
private GLPdf: GeneralLedgerPdf;
/**
* Retrieves the G/L sheet in json format.
* @param {number} tenantId
@@ -63,4 +67,17 @@ export class GeneralLedgerApplication {
): Promise<string> {
return this.GLExport.csv(tenantId, query);
}
/**
* Retrieves the G/L sheet in pdf format.
* @param {number} tenantId
* @param {IGeneralLedgerSheetQuery} query
* @returns {Promise<Buffer>}
*/
public pdf(
tenantId: number,
query: IGeneralLedgerSheetQuery
): Promise<Buffer> {
return this.GLPdf.pdf(tenantId, query);
}
}