From 931c2c4f5ebd7f740d1d23387a4d03cc7a7ae1a3 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 25 Apr 2024 13:12:06 +0200 Subject: [PATCH] feat: refs #7211 error & locale --- loopback/locale/es.json | 3 ++- .../invoiceOut/back/methods/invoiceOut/createManualInvoice.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index ea9e0b8ef..61b2d1425 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -354,5 +354,6 @@ "They're not your subordinate": "No es tu subordinado/a.", "No results found": "No se han encontrado resultados", "InvoiceIn is already booked": "La factura recibida está contabilizada", - "Select ticket or client": "Elija un ticket o un client" + "Select ticket or client": "Elija un ticket o un client", + "It was not able to create the invoice": "No se pudo crear la factura" } diff --git a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js index 9803f20f7..0259ff40b 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js @@ -142,7 +142,7 @@ module.exports = Self => { throw e; } - if (!newInvoice.id) throw new UserError(`...`); + if (!newInvoice.id) throw new UserError('It was not able to create the invoice:'); await Self.createPdf(ctx, newInvoice.id);