feat(FinancialReports): compute journal cost is running state.

This commit is contained in:
a.bouhuolia
2021-03-13 19:49:15 +02:00
parent 828f4bb32e
commit 88eaaa3968
27 changed files with 411 additions and 106 deletions

View File

@@ -54,22 +54,19 @@ export default class ProfitLossSheetController extends BaseFinancialReportContro
const { tenantId, settings } = req;
const filter = this.matchedQueryData(req);
const organizationName = settings.get({ group: 'organization', key: 'name' });
const baseCurrency = settings.get({ group: 'organization', key: 'base_currency' });
try {
const {
data,
columns,
query,
meta
} = await this.profitLossSheetService.profitLossSheet(tenantId, filter);
return res.status(200).send({
organization_name: organizationName,
base_currency: baseCurrency,
data: this.transfromToResponse(data),
columns: this.transfromToResponse(columns),
query: this.transfromToResponse(query),
meta: this.transfromToResponse(meta)
});
} catch (error) {
next(error);