refactor: banking modules to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-01-05 23:06:33 +02:00
parent 1869ba216f
commit ba176394c8
25 changed files with 121 additions and 41 deletions

View File

@@ -9,6 +9,7 @@ import {
} from './constants';
import { ICashflowNewCommandDTO } from './types/BankingTransactions.types';
import { UncategorizedBankTransaction } from './models/UncategorizedBankTransaction';
import { ICategorizeCashflowTransactioDTO } from '../BankingCategorize/types/BankingCategorize.types';
import { ServiceError } from '../Items/ServiceError';
/**
@@ -50,7 +51,7 @@ export const getCashflowAccountTransactionsTypes = () => {
*/
export const transformCategorizeTransToCashflow = (
uncategorizeTransactions: Array<UncategorizedBankTransaction>,
categorizeDTO: ICategorizeBankTransactionDTO,
categorizeDTO: ICategorizeCashflowTransactioDTO,
): ICashflowNewCommandDTO => {
const uncategorizeTransaction = first(uncategorizeTransactions);
const amount = sumBy(uncategorizeTransactions, 'amount');