feat(server): financial reports meta

This commit is contained in:
Ahmed Bouhuolia
2024-02-13 19:42:11 +02:00
parent d229378957
commit d67189587e
10 changed files with 24 additions and 6 deletions

View File

@@ -104,6 +104,16 @@ export default class TransactionsByCustomersReportController extends BaseFinanci
);
return res.send(buffer);
// Retrieve the json format.
} else if (ACCEPT_TYPE.APPLICATION_PDF === acceptType) {
const pdfContent = await this.transactionsByCustomersApp.pdf(
tenantId,
filter
);
res.set({
'Content-Type': 'application/pdf',
'Content-Length': pdfContent.length,
});
return res.send(pdfContent);
} else {
const sheet = await this.transactionsByCustomersApp.sheet(
tenantId,