feat: excluded bank transactions

This commit is contained in:
Ahmed Bouhuolia
2024-06-27 22:14:53 +02:00
parent fab22c9820
commit 978ce6c441
28 changed files with 1301 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ import {
ICashflowAccountsFilter,
ICashflowNewCommandDTO,
ICategorizeCashflowTransactioDTO,
IGetRecognizedTransactionsQuery,
IGetUncategorizedTransactionsQuery,
} from '@/interfaces';
import { CategorizeTransactionAsExpense } from './CategorizeTransactionAsExpense';
@@ -18,6 +19,7 @@ import { GetUncategorizedTransaction } from './GetUncategorizedTransaction';
import NewCashflowTransactionService from './NewCashflowTransactionService';
import GetCashflowAccountsService from './GetCashflowAccountsService';
import { GetCashflowTransactionService } from './GetCashflowTransactionsService';
import { GetRecognizedTransactionsService } from './GetRecongizedTransactions';
@Service()
export class CashflowApplication {
@@ -51,6 +53,9 @@ export class CashflowApplication {
@Inject()
private createUncategorizedTransactionService: CreateUncategorizedTransaction;
@Inject()
private getRecognizedTranasctionsService: GetRecognizedTransactionsService;
/**
* Creates a new cashflow transaction.
* @param {number} tenantId
@@ -213,4 +218,20 @@ export class CashflowApplication {
uncategorizedTransactionId
);
}
/**
* Retrieves the recognized bank transactions.
* @param {number} tenantId
* @param {number} accountId
* @returns
*/
public getRecognizedTransactions(
tenantId: number,
filter?: IGetRecognizedTransactionsQuery
) {
return this.getRecognizedTranasctionsService.getRecognizedTranactions(
tenantId,
filter
);
}
}