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; }); }