fix(server): get cashflow transaction type

This commit is contained in:
Ahmed Bouhuolia
2024-01-20 18:03:43 +02:00
parent 8882bc677e
commit df38f8893d

View File

@@ -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() {