diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js index cf656f6da..22787e730 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js @@ -1,4 +1,3 @@ -/* eslint max-len: ["error", { "code": 150 }]*/ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); @@ -29,7 +28,16 @@ describe('InvoiceOut transferInvoice()', () => { try { const {clientFk: oldClient} = await models.InvoiceOut.findById(id, {fields: ['clientFk']}); const invoicesBefore = await models.InvoiceOut.find({}, options); - const result = await models.InvoiceOut.transferInvoice(ctx, id, 'T4444444', newClient, 1, 1, 1, true, options); + const result = await models.InvoiceOut.transferInvoice( + ctx, + id, + 'T4444444', + newClient, + 1, + 1, + 1, + true, + options); const invoicesAfter = await models.InvoiceOut.find({}, options); const rectificativeInvoice = invoicesAfter[invoicesAfter.length - 2]; const newInvoice = invoicesAfter[invoicesAfter.length - 1]; diff --git a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js index 72e647efe..f5530d772 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js @@ -1,4 +1,3 @@ -/* eslint max-len: ["error", { "code": 160 }]*/ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { @@ -53,7 +52,17 @@ module.exports = Self => { } }); - Self.transferInvoice = async(ctx, id, refFk, newClientFk, cplusRectificationTypeFk, siiTypeInvoiceOutFk, invoiceCorrectionTypeFk, makeInvoice, options) => { + Self.transferInvoice = async( + ctx, + id, + refFk, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice, + options + ) => { const models = Self.app.models; const myOptions = {userId: ctx.req.accessToken.userId}; let invoiceId;