From d4b1105cdaab3332388008aa31a036598704714b Mon Sep 17 00:00:00 2001 From: joan Date: Thu, 5 Aug 2021 13:39:11 +0200 Subject: [PATCH] Ammends --- .../back/methods/invoiceOut/createManualInvoice.js | 8 +------- modules/invoiceOut/front/index/index.html | 2 +- modules/invoiceOut/front/index/locale/es.yml | 3 ++- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js index 44d52b38f..854c1e2f9 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js @@ -80,14 +80,11 @@ module.exports = Self => { throw new UserError('This ticket is already invoiced'); // Validates ticket amount - if (ticket.totalWithVat == 0) { - // Change state to delivered + if (ticket.totalWithVat == 0) throw new UserError(`A ticket with an amount of zero can't be invoiced`); - } // Validates ticket nagative base const hasNegativeBase = await getNegativeBase(ticketId, myOptions); - if (hasNegativeBase && company.code == 'VNL') throw new UserError(`A ticket with a negative base can't be invoiced`); } else { @@ -104,9 +101,6 @@ module.exports = Self => { companyId = company.companyFk; } - // Set shipped at night - maxShipped.setHours(23, 59, 59, 59); - // Validate invoiceable client const isClientInvoiceable = await isInvoiceable(clientId, myOptions); if (!isClientInvoiceable) diff --git a/modules/invoiceOut/front/index/index.html b/modules/invoiceOut/front/index/index.html index 9d0cc4337..2ebd7b421 100644 --- a/modules/invoiceOut/front/index/index.html +++ b/modules/invoiceOut/front/index/index.html @@ -60,7 +60,7 @@