mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat(server): wip printing financial reports
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
import { SalesByItemsReportService } from './SalesByItemsService';
|
||||
import { SalesByItemsTableInjectable } from './SalesByItemsTableInjectable';
|
||||
import { SalesByItemsExport } from './SalesByItemsExport';
|
||||
import { SalesByItemsPdfInjectable } from './SalesByItemsPdfInjectable';
|
||||
|
||||
@Service()
|
||||
export class SalesByItemsApplication {
|
||||
@@ -20,6 +21,9 @@ export class SalesByItemsApplication {
|
||||
@Inject()
|
||||
private salesByItemsExport: SalesByItemsExport;
|
||||
|
||||
@Inject()
|
||||
private salesByItemsPdf: SalesByItemsPdfInjectable;
|
||||
|
||||
/**
|
||||
* Retrieves the sales by items report in json format.
|
||||
* @param {number} tenantId
|
||||
@@ -71,4 +75,17 @@ export class SalesByItemsApplication {
|
||||
): Promise<Buffer> {
|
||||
return this.salesByItemsExport.xlsx(tenantId, filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the sales by items in pdf format.
|
||||
* @param {number} tenantId
|
||||
* @param {ISalesByItemsReportQuery} query
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
public pdf(
|
||||
tenantId: number,
|
||||
query: ISalesByItemsReportQuery
|
||||
): Promise<Buffer> {
|
||||
return this.salesByItemsPdf.pdf(tenantId, query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user