From fef62d59a5f5213cd167a90b01034ecf6fc9a18b Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 21 May 2019 13:08:25 +0200 Subject: [PATCH] removed extraneous code --- modules/client/back/methods/client/canBeInvoiced.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/client/back/methods/client/canBeInvoiced.js b/modules/client/back/methods/client/canBeInvoiced.js index f98c9f1eb..1f695aba8 100644 --- a/modules/client/back/methods/client/canBeInvoiced.js +++ b/modules/client/back/methods/client/canBeInvoiced.js @@ -23,9 +23,7 @@ module.exports = function(Self) { }); Self.canBeInvoiced = async id => { - let $ = Self.app.models; - - let client = await $.Client.findById(id, {fields: ['id', 'isTaxDataChecked', 'hasToInvoice']}); + let client = await Self.app.models.Client.findById(id, {fields: ['id', 'isTaxDataChecked', 'hasToInvoice']}); if (client.isTaxDataChecked && client.hasToInvoice) return true;