From 8c0e8e9e1223acc2ee55401fb2b986b4e07bbfe4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 23 Jun 2023 11:50:40 +0200 Subject: [PATCH] refs #5772 Fixes fetching parallelism from front --- modules/invoiceOut/front/global-invoicing/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index 283e84a6c..9a936611a 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -9,7 +9,8 @@ class Controller extends Section { Object.assign(this, { maxShipped: new Date(date.getFullYear(), date.getMonth(), 0), clientsToInvoice: 'all', - companyFk: this.vnConfig.companyFk + companyFk: this.vnConfig.companyFk, + parallelism: 1 }); const params = {companyFk: this.companyFk}; @@ -22,7 +23,12 @@ class Controller extends Section { const filter = {fields: ['parallelism']}; this.$http.get('InvoiceOutConfigs/findOne', {filter}) .then(res => { - this.parallelism = res.data.parallelism || 1; + if (res.data.parallelism) + this.parallelism = res.data.parallelism; + }) + .catch(res => { + if (res.status == 404) return; + throw res; }); }