refs #5842 feat: comprueba que invoiceDate no sea null
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
14ebcf96c0
commit
a50de4e509
|
@ -42,13 +42,14 @@ class Controller extends Section {
|
|||
this.addresses = null;
|
||||
|
||||
try {
|
||||
console.log(this.invoiceDate, this.minInvoicingDate);
|
||||
if (this.clientsToInvoice == 'one' && !this.clientId)
|
||||
throw new UserError('Choose a valid client');
|
||||
if (!this.invoiceDate || !this.maxShipped)
|
||||
throw new UserError('Invoice date and the max date should be filled');
|
||||
if (this.invoiceDate < this.maxShipped)
|
||||
throw new UserError('Invoice date can\'t be less than max date');
|
||||
if (this.invoiceDate.getTime() < this.minInvoicingDate.getTime())
|
||||
if (this.minInvoicingDate && this.invoiceDate.getTime() < this.minInvoicingDate.getTime())
|
||||
throw new UserError('Exists an invoice with a previous date');
|
||||
if (!this.companyFk)
|
||||
throw new UserError('Choose a valid company');
|
||||
|
|
Loading…
Reference in New Issue