diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index 89487d440..4b79885db 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -41,6 +41,7 @@ class Controller extends Section { restartValues() { this.$.invoiceButton.disabled = false; + this.packageInvoicing = false; } cancelRequest() { @@ -96,6 +97,9 @@ class Controller extends Section { if (!this.invoice.fromClientId || !this.invoice.toClientId) throw new Error('Choose a valid clients range'); + if (!this.invoice.companyFk) + throw new Error('Choose a valid company'); + this.$.invoiceButton.disabled = true; this.$.data = []; this.packageInvoicing = true; diff --git a/modules/invoiceOut/front/global-invoicing/locale/es.yml b/modules/invoiceOut/front/global-invoicing/locale/es.yml index ac1092e9c..55215f370 100644 --- a/modules/invoiceOut/front/global-invoicing/locale/es.yml +++ b/modules/invoiceOut/front/global-invoicing/locale/es.yml @@ -3,6 +3,7 @@ Max date: Fecha límite Invoice date: Fecha de factura Invoice date and the max date should be filled: La fecha de factura y la fecha límite deben rellenarse Choose a valid clients range: Selecciona un rango válido de clientes +Choose a valid company: Selecciona un empresa válida Clients range: Rango de clientes All clients: Todos los clientes Calculating packages to invoice...: Calculando paquetes a facturar...