From 774e92e6398fa0f96584ea9be70a482c6351939b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Wed, 22 May 2024 16:43:45 +0200 Subject: [PATCH 1/5] hotfix: Eliminar restricciones ticketRefund Ticket #187137 --- .../procedures/ticketRefund_beforeUpsert.sql | 18 ------------------ .../vn/triggers/ticketRefund_beforeInsert.sql | 1 - .../vn/triggers/ticketRefund_beforeUpdate.sql | 1 - 3 files changed, 20 deletions(-) delete mode 100644 db/routines/vn/procedures/ticketRefund_beforeUpsert.sql diff --git a/db/routines/vn/procedures/ticketRefund_beforeUpsert.sql b/db/routines/vn/procedures/ticketRefund_beforeUpsert.sql deleted file mode 100644 index 5a0e99318..000000000 --- a/db/routines/vn/procedures/ticketRefund_beforeUpsert.sql +++ /dev/null @@ -1,18 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketRefund_beforeUpsert`(vRefundTicketFk INT, vOriginalTicketFk INT) -BEGIN - DECLARE vAlreadyExists BOOLEAN DEFAULT FALSE; - - IF vRefundTicketFk = vOriginalTicketFk THEN - CALL util.throw('Original ticket and refund ticket has same id'); - END IF; - - SELECT COUNT(*) INTO vAlreadyExists - FROM ticketRefund - WHERE refundTicketFk = vOriginalTicketFk; - - IF vAlreadyExists > 0 THEN - CALL util.throw('This ticket is already a refund'); - END IF; -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql index 7893f6c51..ff8ce634a 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql @@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeIn FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); - CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql index 51c7db8f2..d809b5d99 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql @@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUp FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); - CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk); END$$ DELIMITER ; From 1cbcc7714e5b49de6b91c8250600c9abc8ed2b1f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 27 May 2024 13:24:07 +0200 Subject: [PATCH 2/5] ci: refs #7442 Version increased --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6cec44ab..e0afe3d13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "24.20.0", + "version": "24.20.1", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From 2498849ed08a9a7f56bb60857c8d265e7bc4dead Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 27 May 2024 13:43:55 +0200 Subject: [PATCH 3/5] hotfix: refs #7486 Added tmp debug insert --- db/routines/vn/procedures/collection_assign.sql | 1 + db/routines/vn/procedures/collection_new.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index c2b6e538e..c1a4087ff 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -22,6 +22,7 @@ BEGIN BEGIN IF vLockName IS NOT NULL THEN DO RELEASE_LOCK(vLockName); + CALL util.debugAdd('releaseLock', vLockName); -- Tmp END IF; RESIGNAL; diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 8a1eff4a1..370b59ae5 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -49,6 +49,7 @@ BEGIN BEGIN IF vLockName IS NOT NULL THEN DO RELEASE_LOCK(vLockName); + CALL util.debugAdd('releaseLock', vLockName); -- Tmp END IF; RESIGNAL; From d384c5624fd3a9d0d55a7f7bcd2ac537fac892b3 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 27 May 2024 13:57:27 +0200 Subject: [PATCH 4/5] refactor: refs #7486 Deleted unused debugAll --- modules/ticket/back/methods/ticket/closure.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/ticket/back/methods/ticket/closure.js b/modules/ticket/back/methods/ticket/closure.js index 8c59dc3b0..fba39f18f 100644 --- a/modules/ticket/back/methods/ticket/closure.js +++ b/modules/ticket/back/methods/ticket/closure.js @@ -13,8 +13,6 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { const failedtickets = []; for (const ticket of tickets) { try { - await Self.rawSql(`CALL util.debugAdd('invoicingTicket', ?)`, [ticket.id], {userId}); - await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'M'); await Self.rawSql( `CALL vn.ticket_closeByTicket(?)`, From df5f4a5a428cbc3d7306fe747d8302c07fba0087 Mon Sep 17 00:00:00 2001 From: robert Date: Mon, 27 May 2024 14:05:31 +0200 Subject: [PATCH 5/5] feat: refs #7296 fixAPPWarehouse --- db/versions/11071-turquoiseMoss/00-firstScript.sql | 5 +++++ modules/route/back/model-config.json | 3 +++ modules/route/back/models/expedition-truck.json | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100644 db/versions/11071-turquoiseMoss/00-firstScript.sql create mode 100644 modules/route/back/models/expedition-truck.json diff --git a/db/versions/11071-turquoiseMoss/00-firstScript.sql b/db/versions/11071-turquoiseMoss/00-firstScript.sql new file mode 100644 index 000000000..f1de5987f --- /dev/null +++ b/db/versions/11071-turquoiseMoss/00-firstScript.sql @@ -0,0 +1,5 @@ +-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values. +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('RoadmapStop','*','*','ALLOW','ROLE','production'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('RoadmapStop','*','*','ALLOW','ROLE','productionBoss'); diff --git a/modules/route/back/model-config.json b/modules/route/back/model-config.json index 09cda6b2d..0cb48852f 100644 --- a/modules/route/back/model-config.json +++ b/modules/route/back/model-config.json @@ -25,5 +25,8 @@ }, "RoutesMonitor": { "dataSource": "vn" + }, + "ExpeditionTruck": { + "dataSource": "vn" } } diff --git a/modules/route/back/models/expedition-truck.json b/modules/route/back/models/expedition-truck.json new file mode 100644 index 000000000..fc9cd90f0 --- /dev/null +++ b/modules/route/back/models/expedition-truck.json @@ -0,0 +1,9 @@ +{ + "name": "ExpeditionTruck", + "base": "RoadmapStop", + "options": { + "mysql": { + "table": "expeditionTruck" + } + } +}