From be311c0557c5e9c198dcf8a786c95815d031d701 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 20 Nov 2024 11:09:15 +0100 Subject: [PATCH 1/3] fix: fix deleteZone --- modules/zone/back/methods/zone/deleteZone.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/zone/back/methods/zone/deleteZone.js b/modules/zone/back/methods/zone/deleteZone.js index ffe23c9b9..7432475b3 100644 --- a/modules/zone/back/methods/zone/deleteZone.js +++ b/modules/zone/back/methods/zone/deleteZone.js @@ -40,8 +40,7 @@ module.exports = Self => { try { const filter = { where: { - zoneFk: id, - shipped: {gte: today} + zoneFk: id }, include: { relation: 'ticketState', From a4b568e9b8e758a5ef88029cc565f40ae1f232d5 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 20 Nov 2024 12:03:30 +0100 Subject: [PATCH 2/3] fix: refs #8191 Deleted msg send rocket in getSales.js --- back/methods/collection/getSales.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/back/methods/collection/getSales.js b/back/methods/collection/getSales.js index a9e5f2e60..f3575672f 100644 --- a/back/methods/collection/getSales.js +++ b/back/methods/collection/getSales.js @@ -29,10 +29,8 @@ module.exports = Self => { }); Self.getSales = async(ctx, collectionOrTicketFk, print, source, options) => { - const models = Self.app.models; const userId = ctx.req.accessToken.userId; const myOptions = {userId}; - const $t = ctx.req.__; if (typeof options == 'object') Object.assign(myOptions, options); @@ -59,22 +57,6 @@ module.exports = Self => { if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions); - for (let ticket of tickets) { - if (ticket.observaciones) { - let observations = ticket.observaciones.split(' '); - - for (let observation of observations) { - const salesPerson = ticket.salesPersonFk; - if (observation.startsWith('#') || observation.startsWith('@')) { - await models.Chat.send(ctx, - observation, - $t('ticketCommercial', {ticket: ticket.ticketFk, salesPerson}) - ); - } - } - } - } - return getCollection(id, tickets, sales, placements, myOptions); }; From 22ce7a4dd4fd1b6aa8527cb808342488596e3d93 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 20 Nov 2024 12:07:10 +0100 Subject: [PATCH 3/3] fix: refs #8191 Deleted unused traductions --- loopback/locale/en.json | 1 - loopback/locale/es.json | 1 - 2 files changed, 2 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index a7e21960b..4b62be2be 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -223,7 +223,6 @@ "Shelving not valid": "Shelving not valid", "printerNotExists": "The printer does not exist", "There are not picking tickets": "There are not picking tickets", - "ticketCommercial": "The ticket {{ ticket }} for the salesperson {{ salesMan }} is in preparation. (automatically generated message)", "This password can only be changed by the user themselves": "This password can only be changed by the user themselves", "They're not your subordinate": "They're not your subordinate", "InvoiceIn is already booked": "InvoiceIn is already booked", diff --git a/loopback/locale/es.json b/loopback/locale/es.json index a97da3194..987935c7c 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -359,7 +359,6 @@ "This workCenter is already assigned to this agency": "Este centro de trabajo ya está asignado a esta agencia", "Select ticket or client": "Elija un ticket o un client", "It was not able to create the invoice": "No se pudo crear la factura", - "ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)", "Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE", "You can not use the same password": "No puedes usar la misma contraseña", "This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",