mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat(server): wip priting financial reports
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
} from '@/interfaces/PurchasesByItemsSheet';
|
||||
import { PurchasesByItemsTableInjectable } from './PurchasesByItemsTableInjectable';
|
||||
import { PurchasesByItemsService } from './PurchasesByItemsService';
|
||||
import { PurchasesByItemsPdf } from './PurchasesByItemsPdf';
|
||||
|
||||
@Service()
|
||||
export class PurcahsesByItemsApplication {
|
||||
@@ -19,6 +20,9 @@ export class PurcahsesByItemsApplication {
|
||||
@Inject()
|
||||
private purchasesByItemsExport: PurchasesByItemsExport;
|
||||
|
||||
@Inject()
|
||||
private purchasesByItemsPdf: PurchasesByItemsPdf;
|
||||
|
||||
/**
|
||||
* Retrieves the purchases by items in json format.
|
||||
* @param {number} tenantId
|
||||
@@ -70,4 +74,17 @@ export class PurcahsesByItemsApplication {
|
||||
): Promise<Buffer> {
|
||||
return this.purchasesByItemsExport.xlsx(tenantId, query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the purchases by items in pdf format.
|
||||
* @param {number} tenantId
|
||||
* @param {IPurchasesByItemsReportQuery} filter
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
public pdf(
|
||||
tenantId: number,
|
||||
filter: IPurchasesByItemsReportQuery
|
||||
): Promise<Buffer> {
|
||||
return this.purchasesByItemsPdf.pdf(tenantId, filter);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user