Skip to content

Commit

Permalink
fix(server): get cashflow transaction type
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Jan 20, 2024
1 parent 8882bc6 commit df38f88
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/server/src/models/CashflowTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit df38f88

Please sign in to comment.