removed extraneous code

This commit is contained in:
Carlos Jimenez Ruiz 2019-05-21 13:08:25 +02:00
parent 32555c47d0
commit fef62d59a5
1 changed files with 1 additions and 3 deletions

View File

@ -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;