feat(server): wip printing financial reports

This commit is contained in:
Ahmed Bouhuolia
2024-02-10 22:20:54 +02:00
parent ecaf8c99bb
commit 9395ef094a
36 changed files with 738 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ import { IARAgingSummaryQuery } from '@/interfaces';
import { ARAgingSummaryTableInjectable } from './ARAgingSummaryTableInjectable';
import { ARAgingSummaryExportInjectable } from './ARAgingSummaryExportInjectable';
import ARAgingSummaryService from './ARAgingSummaryService';
import { ARAgingSummaryPdfInjectable } from './ARAgingSummaryPdfInjectable';
@Service()
export class ARAgingSummaryApplication {
@@ -15,6 +16,9 @@ export class ARAgingSummaryApplication {
@Inject()
private ARAgingSummarySheet: ARAgingSummaryService;
@Inject()
private ARAgingSummaryPdf: ARAgingSummaryPdfInjectable;
/**
* Retrieve the A/R aging summary sheet.
* @param {number} tenantId
@@ -50,4 +54,14 @@ export class ARAgingSummaryApplication {
public csv(tenantId: number, query: IARAgingSummaryQuery) {
return this.ARAgingSummaryExport.csv(tenantId, query);
}
/**
* Retrieves the A/R aging summary in pdf format.
* @param {number} tenantId
* @param {IARAgingSummaryQuery} query
* @returns {Promise<Buffer>}
*/
public pdf(tenantId: number, query: IARAgingSummaryQuery) {
return this.ARAgingSummaryPdf.pdf(tenantId, query);
}
}