feat(server): styling financial reports pdf

This commit is contained in:
Ahmed Bouhuolia
2024-02-19 21:41:15 +02:00
parent 3509026ad8
commit c06a8d9ca3
33 changed files with 210 additions and 56 deletions

View File

@@ -2,6 +2,7 @@ import { Inject } from 'typedi';
import { CashflowTableInjectable } from './CashflowTableInjectable';
import { TableSheetPdf } from '../TableSheetPdf';
import { ICashFlowStatementQuery } from '@/interfaces';
import { HtmlTableCustomCss } from './constants';
export class CashflowTablePdfInjectable {
@Inject()
@@ -21,13 +22,13 @@ export class CashflowTablePdfInjectable {
query: ICashFlowStatementQuery
): Promise<Buffer> {
const table = await this.cashflowTable.table(tenantId, query);
const sheetName = 'Cashflow Sheet';
return this.tableSheetPdf.convertToPdf(
tenantId,
table.table,
sheetName,
table.meta.formattedDateRange
table.meta.sheetName,
table.meta.formattedDateRange,
HtmlTableCustomCss
);
}
}