fix: manejado error si no se selecciona una empresa
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-01-11 11:57:52 +01:00
parent 3e920e6a2f
commit 020068006c
2 changed files with 5 additions and 0 deletions

View File

@ -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;

View File

@ -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...