mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat(server): wip printing financial reports
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { TableSheet } from '@/lib/Xlsx/TableSheet';
|
||||
import { ITrialBalanceSheetQuery } from '@/interfaces';
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { TrialBalanceSheetTableInjectable } from './TrialBalanceSheetTableInjectable';
|
||||
import { TrialBalanceSheetPdfInjectable } from './TrialBalanceSheetPdfInjectsable';
|
||||
|
||||
@Service()
|
||||
export class TrialBalanceExportInjectable {
|
||||
@Inject()
|
||||
private trialBalanceSheetTable: TrialBalanceSheetTableInjectable;
|
||||
|
||||
@Inject()
|
||||
private trialBalanceSheetPdf: TrialBalanceSheetPdfInjectable;
|
||||
|
||||
/**
|
||||
* Retrieves the trial balance sheet in XLSX format.
|
||||
* @param {number} tenantId
|
||||
@@ -40,4 +44,17 @@ export class TrialBalanceExportInjectable {
|
||||
|
||||
return tableCsv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the trial balance sheet in PDF format.
|
||||
* @param {number} tenantId
|
||||
* @param {ITrialBalanceSheetQuery} query
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
public async pdf(
|
||||
tenantId: number,
|
||||
query: ITrialBalanceSheetQuery
|
||||
): Promise<Buffer> {
|
||||
return this.trialBalanceSheetPdf.pdf(tenantId, query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user