feat: Categorize the bank synced transactions

This commit is contained in:
Ahmed Bouhuolia
2024-02-29 23:53:26 +02:00
parent 0833baabda
commit ea8c5458ff
31 changed files with 901 additions and 35 deletions

View File

@@ -1,11 +1,10 @@
import { Service, Inject } from 'typedi';
import { isEmpty, pick } from 'lodash';
import { pick } from 'lodash';
import { Knex } from 'knex';
import * as R from 'ramda';
import {
ICashflowNewCommandDTO,
ICashflowTransaction,
ICashflowTransactionLine,
ICommandCashflowCreatedPayload,
ICommandCashflowCreatingPayload,
ICashflowTransactionInput,
@@ -126,7 +125,7 @@ export default class NewCashflowTransactionService {
tenantId: number,
newTransactionDTO: ICashflowNewCommandDTO,
userId?: number
): Promise<{ cashflowTransaction: ICashflowTransaction }> => {
): Promise<ICashflowTransaction> => {
const { CashflowTransaction, Account } = this.tenancy.models(tenantId);
// Retrieves the cashflow account or throw not found error.
@@ -175,7 +174,7 @@ export default class NewCashflowTransactionService {
trx,
} as ICommandCashflowCreatedPayload
);
return { cashflowTransaction };
return cashflowTransaction;
});
};
}