fix(Currency Code): add the missing the currency codes.

This commit is contained in:
a.bouhuolia
2021-04-06 18:57:34 +02:00
parent 86a36f4044
commit 51940818c4
8 changed files with 72 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
import { Model } from 'objection';
import TenantModel from 'models/TenantModel';
import { query } from 'winston';
import { formatNumber } from 'utils';
export default class ManualJournal extends TenantModel {
/**
@@ -21,7 +21,14 @@ export default class ManualJournal extends TenantModel {
* Virtual attributes.
*/
static get virtualAttributes() {
return ['isPublished'];
return ['isPublished', 'amountFormatted'];
}
/**
* Retrieve the amount formatted value.
*/
get amountFormatted() {
return formatNumber(this.amount, { currencyCode: this.currencyCode });
}
/**