diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index 6667b5f0e..b04747d16 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -137,7 +137,9 @@ module.exports = Self => { recipientId: invoiceOut.clientFk, recipient: invoiceOut.client().email }; - await models.InvoiceOut.invoiceEmail(ctx); + try { + await models.InvoiceOut.invoiceEmail(ctx); + } catch (err) {} return invoiceId; }; diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js index f1f9b7037..fdf50cbd4 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js @@ -12,6 +12,9 @@ describe('InvoiceOut invoiceClient()', () => { minShipped.setHours(0, 0, 0, 0); const invoiceSerial = 'A'; const activeCtx = { + getLocale: () => { + return 'en'; + }, accessToken: {userId: userId}, __: value => { return value;