fix: accounts types with new design.

This commit is contained in:
a.bouhuolia
2021-01-26 12:51:13 +02:00
parent a871aea84d
commit d789228038
24 changed files with 101 additions and 100 deletions

View File

@@ -184,7 +184,7 @@ export default class BalanceSheetStatement extends FinancialSheet {
const filteredAccounts = accounts
// Filter accounts that associated to the section accounts types.
.filter(
(account) => sectionAccountsTypes.indexOf(account.type.key) !== -1
(account) => sectionAccountsTypes.indexOf(account.accountType) !== -1
)
.map((account) => this.balanceSheetAccountMapper(account))
// Filter accounts that have no transaction when `noneTransactions` is on.

View File

@@ -70,7 +70,7 @@ export default class BalanceSheetStatementService
this.logger.info('[balance_sheet] trying to calculate the report.', { filter, tenantId });
// Retrieve all accounts on the storage.
const accounts = await accountRepository.all('type');
const accounts = await accountRepository.all();
const accountsGraph = await accountRepository.getDependencyGraph();
// Retrieve all journal transactions based on the given query.