diff --git a/server/src/models/ManualJournal.js b/server/src/models/ManualJournal.js index 899e37093..b3d8b4a07 100644 --- a/server/src/models/ManualJournal.js +++ b/server/src/models/ManualJournal.js @@ -16,8 +16,21 @@ export default class ManualJournal extends TenantModel { return ['createdAt', 'updatedAt']; } - static get resourceable() { - return true; + /** + * Virtual attributes. + */ + static get virtualAttributes() { + return [ + 'isPublished', + ]; + } + + /** + * Detarmines whether the invoice is published. + * @return {boolean} + */ + get isPublished() { + return !!this.publishedAt; } /**