From df38f8893d535faddd5061377fabc46e24fbdb42 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Sat, 20 Jan 2024 18:03:43 +0200 Subject: [PATCH] fix(server): get cashflow transaction type --- packages/server/src/models/CashflowTransaction.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/models/CashflowTransaction.ts b/packages/server/src/models/CashflowTransaction.ts index 2184d1434..d4743d4ce 100644 --- a/packages/server/src/models/CashflowTransaction.ts +++ b/packages/server/src/models/CashflowTransaction.ts @@ -7,8 +7,12 @@ import { } from '@/services/Cashflow/utils'; import AccountTransaction from './AccountTransaction'; import { CASHFLOW_DIRECTION } from '@/services/Cashflow/constants'; - +import { getTransactionTypeLabel } from '@/utils/transactions-types'; export default class CashflowTransaction extends TenantModel { + transactionType: string; + amount: number; + exchangeRate: number; + /** * Table name. */ @@ -55,9 +59,10 @@ export default class CashflowTransaction extends TenantModel { /** * Transaction type formatted. + * @returns {string} */ get transactionTypeFormatted() { - return AccountTransaction.getReferenceTypeFormatted(this.transactionType); + return getTransactionTypeLabel(this.transactionType); } get typeMeta() {