From 23b8703afc86aba1dfb89a59d70b491a0eac28d8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 17 Jan 2024 15:00:31 +0100 Subject: [PATCH 01/38] refs #6397 emailValidation --- .../back/methods/client/createWithUser.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/client/back/methods/client/createWithUser.js b/modules/client/back/methods/client/createWithUser.js index 8e0d56f49..381723348 100644 --- a/modules/client/back/methods/client/createWithUser.js +++ b/modules/client/back/methods/client/createWithUser.js @@ -1,3 +1,5 @@ +const {error} = require('fancy-log'); + module.exports = function(Self) { Self.remoteMethod('createWithUser', { description: 'Creates both client and its web account', @@ -29,12 +31,15 @@ module.exports = function(Self) { myOptions.transaction = tx; } - const firstEmail = data.email ? data.email.split(',')[0] : null; - const user = { - name: data.userName, - email: firstEmail, - password: String(Math.random() * 100000000000000) - }; + if (data.email) { + const firstEmail = data.email ? data.email.split(',')[0] : null; + const user = { + name: data.userName, + email: firstEmail, + password: String(Math.random() * 100000000000000) + }; + } else + throw error; try { const account = await models.VnUser.create(user, myOptions); From 7cb7c7dace0dce41cca69d8caa0085c553821b03 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 18 Jan 2024 10:57:17 +0100 Subject: [PATCH 02/38] refs #6397 back validation --- loopback/locale/es.json | 7 ++++--- modules/client/back/methods/client/createWithUser.js | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 5555ef8b0..8af8f092c 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -72,7 +72,7 @@ "The secret can't be blank": "La contraseña no puede estar en blanco", "We weren't able to send this SMS": "No hemos podido enviar el SMS", "This client can't be invoiced": "Este cliente no puede ser facturado", - "You must provide the correction information to generate a corrective invoice": "Debes informar la información de corrección para generar una factura rectificativa", + "You must provide the correction information to generate a corrective invoice": "Debes informar la información de corrección para generar una factura rectificativa", "This ticket can't be invoiced": "Este ticket no puede ser facturado", "You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado", "This ticket can not be modified": "Este ticket no puede ser modificado", @@ -336,5 +336,6 @@ "Incorrect pin": "Pin incorrecto.", "You already have the mailAlias": "Ya tienes este alias de correo", "The alias cant be modified": "Este alias de correo no puede ser modificado", - "No tickets to invoice": "No hay tickets para facturar" -} + "No tickets to invoice": "No hay tickets para facturar", + "An email is necessary": "An email is necessary" +} \ No newline at end of file diff --git a/modules/client/back/methods/client/createWithUser.js b/modules/client/back/methods/client/createWithUser.js index 381723348..5d27b6b7f 100644 --- a/modules/client/back/methods/client/createWithUser.js +++ b/modules/client/back/methods/client/createWithUser.js @@ -1,4 +1,4 @@ -const {error} = require('fancy-log'); +const UserError = require('vn-loopback/util/user-error'); module.exports = function(Self) { Self.remoteMethod('createWithUser', { @@ -31,15 +31,16 @@ module.exports = function(Self) { myOptions.transaction = tx; } + let user; if (data.email) { const firstEmail = data.email ? data.email.split(',')[0] : null; - const user = { + user = { name: data.userName, email: firstEmail, password: String(Math.random() * 100000000000000) }; } else - throw error; + throw new UserError(`An email is necessary`); try { const account = await models.VnUser.create(user, myOptions); From e9c1f125a545317c0ad3e0b67e9b0ba964e65333 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 18 Jan 2024 11:43:05 +0100 Subject: [PATCH 03/38] refs #6397 test back --- .../client/specs/createWithUser.spec.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/modules/client/back/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js index 03106acc1..4191400e3 100644 --- a/modules/client/back/methods/client/specs/createWithUser.spec.js +++ b/modules/client/back/methods/client/specs/createWithUser.spec.js @@ -14,6 +14,8 @@ describe('Client Create', () => { provinceFk: 1 }; + const errorMail = `An email is necessary`; + beforeAll(async() => { const activeCtx = { accessToken: {userId: 9}, @@ -48,6 +50,31 @@ describe('Client Create', () => { } }); + it('should not create a new account', async() => { + const tx = await models.Client.beginTransaction({}); + + try { + const options = {transaction: tx}; + + const client = await models.Client.createWithUser(newAccount, options); + const account = await models.VnUser.findOne({where: {name: newAccount.userName}}, options); + + expect(account.name).toEqual(newAccount.userName); + expect(client.id).toEqual(account.id); + expect(client.name).toEqual(newAccount.name); + expect(client.fi).toEqual(newAccount.fi); + expect(client.socialName).toEqual(newAccount.socialName); + expect(client.businessTypeFk).toEqual(newAccount.businessTypeFk); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + + expect(errorMail).toEqual(`An email is necessary`); + }); + it('should create a new account', async() => { const tx = await models.Client.beginTransaction({}); From 391f41888333a0c6af0595c4e101f56502c581e5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 19 Jan 2024 14:18:17 +0100 Subject: [PATCH 04/38] refs #6397 fix test back --- .../client/specs/createWithUser.spec.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/client/back/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js index 4191400e3..af9b0aa03 100644 --- a/modules/client/back/methods/client/specs/createWithUser.spec.js +++ b/modules/client/back/methods/client/specs/createWithUser.spec.js @@ -13,8 +13,16 @@ describe('Client Create', () => { businessTypeFk: 'florist', provinceFk: 1 }; - - const errorMail = `An email is necessary`; + const newAccount2 = { + userName: 'Deadpool', + fi: '16195279J', + name: 'Wade', + socialName: 'DEADPOOL MARVEL', + street: 'WALL STREET', + city: 'New York', + businessTypeFk: 'florist', + provinceFk: 1 + }; beforeAll(async() => { const activeCtx = { @@ -53,26 +61,18 @@ describe('Client Create', () => { it('should not create a new account', async() => { const tx = await models.Client.beginTransaction({}); + let error; try { const options = {transaction: tx}; - - const client = await models.Client.createWithUser(newAccount, options); - const account = await models.VnUser.findOne({where: {name: newAccount.userName}}, options); - - expect(account.name).toEqual(newAccount.userName); - expect(client.id).toEqual(account.id); - expect(client.name).toEqual(newAccount.name); - expect(client.fi).toEqual(newAccount.fi); - expect(client.socialName).toEqual(newAccount.socialName); - expect(client.businessTypeFk).toEqual(newAccount.businessTypeFk); + await models.Client.createWithUser(newAccount2, options); await tx.rollback(); } catch (e) { - await tx.rollback(); - throw e; - } + error = e.message; - expect(errorMail).toEqual(`An email is necessary`); + expect(error).toEqual(`An email is necessary`); + await tx.rollback(); + } }); it('should create a new account', async() => { From 73e1b5234856c855a7e537dffab5df2cb7ca0df8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 19 Jan 2024 14:53:56 +0100 Subject: [PATCH 05/38] refs #6397 refactor --- .../back/methods/client/createWithUser.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/client/back/methods/client/createWithUser.js b/modules/client/back/methods/client/createWithUser.js index 5d27b6b7f..06b885ab8 100644 --- a/modules/client/back/methods/client/createWithUser.js +++ b/modules/client/back/methods/client/createWithUser.js @@ -31,16 +31,16 @@ module.exports = function(Self) { myOptions.transaction = tx; } - let user; - if (data.email) { - const firstEmail = data.email ? data.email.split(',')[0] : null; - user = { - name: data.userName, - email: firstEmail, - password: String(Math.random() * 100000000000000) - }; - } else - throw new UserError(`An email is necessary`); + if (!data.email) + throw new UserError('An email is necessary'); + + const firstEmail = data.email.split(',')[0]; + + const user = { + name: data.userName, + email: firstEmail, + password: String(Math.random() * 100000000000000) + }; try { const account = await models.VnUser.create(user, myOptions); From cf03982d0cbbc62b86777302563e86fd511b5d1b Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 22 Jan 2024 10:20:10 +0100 Subject: [PATCH 06/38] refs #6397 trad tback --- loopback/locale/es.json | 4 ++-- .../client/back/methods/client/specs/createWithUser.spec.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 8af8f092c..0c401c814 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -337,5 +337,5 @@ "You already have the mailAlias": "Ya tienes este alias de correo", "The alias cant be modified": "Este alias de correo no puede ser modificado", "No tickets to invoice": "No hay tickets para facturar", - "An email is necessary": "An email is necessary" -} \ No newline at end of file + "An email is necessary": "Es necesario un email" +} diff --git a/modules/client/back/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js index af9b0aa03..cab354ede 100644 --- a/modules/client/back/methods/client/specs/createWithUser.spec.js +++ b/modules/client/back/methods/client/specs/createWithUser.spec.js @@ -70,9 +70,10 @@ describe('Client Create', () => { } catch (e) { error = e.message; - expect(error).toEqual(`An email is necessary`); await tx.rollback(); } + + expect(error).toEqual(`An email is necessary`); }); it('should create a new account', async() => { From 04f1a03d4dd10f327365991c04701461a4bbac93 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 29 Jan 2024 14:08:43 +0100 Subject: [PATCH 07/38] refs #6397 fix back --- .../methods/client/specs/createWithUser.spec.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/client/back/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js index cab354ede..074cb289a 100644 --- a/modules/client/back/methods/client/specs/createWithUser.spec.js +++ b/modules/client/back/methods/client/specs/createWithUser.spec.js @@ -13,16 +13,8 @@ describe('Client Create', () => { businessTypeFk: 'florist', provinceFk: 1 }; - const newAccount2 = { - userName: 'Deadpool', - fi: '16195279J', - name: 'Wade', - socialName: 'DEADPOOL MARVEL', - street: 'WALL STREET', - city: 'New York', - businessTypeFk: 'florist', - provinceFk: 1 - }; + const newAccountWithoutEmail = JSON.parse(JSON.stringify(newAccount)); + delete newAccountWithoutEmail.email; beforeAll(async() => { const activeCtx = { @@ -64,7 +56,7 @@ describe('Client Create', () => { let error; try { const options = {transaction: tx}; - await models.Client.createWithUser(newAccount2, options); + await models.Client.createWithUser(newAccountWithoutEmail, options); await tx.rollback(); } catch (e) { From f0d4ae604b0d9048974b22f84ac5720e41a96bd1 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 30 Jan 2024 10:03:21 +0100 Subject: [PATCH 08/38] feat: #6567 sale_replaceItem adaptado a code --- db/routines/vn/procedures/sale_replaceItem.sql | 12 +++--------- db/versions/10820-limeAspidistra/00-grants.sql | 11 +---------- db/versions/10850-whiteChico/00-firstScript.sql | 2 ++ 3 files changed, 6 insertions(+), 19 deletions(-) create mode 100644 db/versions/10850-whiteChico/00-firstScript.sql diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 1edad1983..1415f188f 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -23,9 +23,6 @@ BEGIN DECLARE vOldPrice DECIMAL(10,2); DECLARE vOption INT DEFAULT NULL; DECLARE vNewSaleFk INT; - DECLARE vChangePrice INT DEFAULT 1; - DECLARE vBuyerDiscount INT DEFAULT 4; - DECLARE vManaDiscount INT DEFAULT 3; DECLARE vForceToGrouping INT DEFAULT 1; DECLARE vForceToPacking INT DEFAULT 2; DECLARE vFinalPrice DECIMAL(10,2); @@ -85,16 +82,13 @@ BEGIN IF vNewPrice IS NULL THEN CALL util.throw('price retrieval failed'); END IF; + IF vNewPrice > vOldPrice THEN SET vFinalPrice = vOldPrice; - IF worker_isInDepartment('vt') THEN - SET vOption = vManaDiscount; - ELSE - SET vOption = vBuyerDiscount; - END IF; + SET vOption = 'substitution'; ELSE SET vFinalPrice = vNewPrice; - SET vOption = vChangePrice; + SET vOption = 'renewPrices'; END IF; START TRANSACTION; diff --git a/db/versions/10820-limeAspidistra/00-grants.sql b/db/versions/10820-limeAspidistra/00-grants.sql index 5e85236d4..cd9aa341b 100644 --- a/db/versions/10820-limeAspidistra/00-grants.sql +++ b/db/versions/10820-limeAspidistra/00-grants.sql @@ -1,14 +1,5 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_replaceItem`() BEGIN END; -GRANT EXECUTE ON PROCEDURE `vn`.`sale_replaceItem` TO `employee`; -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isInDepartment`() - RETURNS int(11) - DETERMINISTIC -BEGIN - RETURN 1; -END$$ -DELIMITER ; +GRANT EXECUTE ON PROCEDURE `vn`.`sale_replaceItem` TO `employee`; GRANT EXECUTE ON FUNCTION `vn`.`worker_isInDepartment` TO `employee`; FLUSH PRIVILEGES; diff --git a/db/versions/10850-whiteChico/00-firstScript.sql b/db/versions/10850-whiteChico/00-firstScript.sql new file mode 100644 index 000000000..077190831 --- /dev/null +++ b/db/versions/10850-whiteChico/00-firstScript.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO vn.component (id, name, typeFk, classRate, tax, isRenewable, code, isRequired) +VALUES(49, 'sustitución', 4, NULL, NULL, 1, 'substitution', FALSE); From 7cf46fc6cd3cd0e0e7d218c64bba6d2cd40aaadb Mon Sep 17 00:00:00 2001 From: pako Date: Tue, 30 Jan 2024 10:12:27 +0100 Subject: [PATCH 09/38] incluye fecha de ayer --- db/routines/edi/procedures/ekt_scan.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/edi/procedures/ekt_scan.sql b/db/routines/edi/procedures/ekt_scan.sql index 456e329e0..b8817906c 100644 --- a/db/routines/edi/procedures/ekt_scan.sql +++ b/db/routines/edi/procedures/ekt_scan.sql @@ -73,7 +73,7 @@ BEGIN INSERT INTO tmp.ekt SELECT id FROM ekt - WHERE fec = vFec + WHERE fec >= vFec - INTERVAL 1 DAY AND (( vKlo = vDefaultKlo AND (klo = vKlo OR klo IS NULL OR klo = 0) @@ -82,7 +82,7 @@ BEGIN AND auction = vAuction AND agj = vShortAgj) ) - ORDER BY agj DESC + ORDER BY agj DESC, fec DESC LIMIT 1; SELECT COUNT(*) FROM tmp.ekt INTO vIsFound; From 4eb5efa2c981c1e70be9846ea70b3611fe2d34a3 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 30 Jan 2024 10:52:33 +0100 Subject: [PATCH 10/38] feat: #6567 con varchar --- db/routines/vn/procedures/sale_replaceItem.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 1415f188f..aff34d5e9 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -21,7 +21,7 @@ BEGIN DECLARE vAgencyModeFk INT; DECLARE vNewPrice DECIMAL(10,2); DECLARE vOldPrice DECIMAL(10,2); - DECLARE vOption INT DEFAULT NULL; + DECLARE vOption VARCHAR(255); DECLARE vNewSaleFk INT; DECLARE vForceToGrouping INT DEFAULT 1; DECLARE vForceToPacking INT DEFAULT 2; From 582359f058487be31ff0ba1e9291bf5e7e1322ff Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 30 Jan 2024 11:04:51 +0100 Subject: [PATCH 11/38] feat: #6567 restaura permisos --- db/versions/10820-limeAspidistra/00-grants.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/db/versions/10820-limeAspidistra/00-grants.sql b/db/versions/10820-limeAspidistra/00-grants.sql index cd9aa341b..5e85236d4 100644 --- a/db/versions/10820-limeAspidistra/00-grants.sql +++ b/db/versions/10820-limeAspidistra/00-grants.sql @@ -1,5 +1,14 @@ - +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_replaceItem`() BEGIN END; GRANT EXECUTE ON PROCEDURE `vn`.`sale_replaceItem` TO `employee`; +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isInDepartment`() + RETURNS int(11) + DETERMINISTIC +BEGIN + RETURN 1; +END$$ +DELIMITER ; + GRANT EXECUTE ON FUNCTION `vn`.`worker_isInDepartment` TO `employee`; FLUSH PRIVILEGES; From 3d6797d3ba334cf63d2af38fbc22944c522a4a55 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 30 Jan 2024 11:06:14 +0100 Subject: [PATCH 12/38] feat: #6567 sin fixtures --- db/versions/10850-whiteChico/00-firstScript.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 db/versions/10850-whiteChico/00-firstScript.sql diff --git a/db/versions/10850-whiteChico/00-firstScript.sql b/db/versions/10850-whiteChico/00-firstScript.sql deleted file mode 100644 index 077190831..000000000 --- a/db/versions/10850-whiteChico/00-firstScript.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT IGNORE INTO vn.component (id, name, typeFk, classRate, tax, isRenewable, code, isRequired) -VALUES(49, 'sustitución', 4, NULL, NULL, 1, 'substitution', FALSE); From 1124722b25bf182a335b20029c732b175a436891 Mon Sep 17 00:00:00 2001 From: pako Date: Tue, 30 Jan 2024 12:45:17 +0100 Subject: [PATCH 13/38] nuevo commit de prueba --- db/routines/edi/procedures/ekt_scan.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/edi/procedures/ekt_scan.sql b/db/routines/edi/procedures/ekt_scan.sql index b8817906c..b0b75a6a7 100644 --- a/db/routines/edi/procedures/ekt_scan.sql +++ b/db/routines/edi/procedures/ekt_scan.sql @@ -2,7 +2,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) BEGIN /** - * Busca transaciones a partir de un código de barras, las marca como escaneadas + * Busca transaciones a partir de un codigo de barras, las marca como escaneadas * y las devuelve. * Ver https://wiki.verdnatura.es/index.php/Ekt#Algoritmos_de_lectura * From 27f66214477570dbce66507b1a5050fe997eb013 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 30 Jan 2024 13:29:49 +0100 Subject: [PATCH 14/38] refs #5802 feat:ticket_setState --- db/routines/vn/procedures/ticket_setState.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/ticket_setState.sql b/db/routines/vn/procedures/ticket_setState.sql index 13a93380d..bd7027553 100644 --- a/db/routines/vn/procedures/ticket_setState.sql +++ b/db/routines/vn/procedures/ticket_setState.sql @@ -31,8 +31,8 @@ BEGIN CALL util.throw('ASSIGN_ZONE_FIRST'); END IF; - SET vCanChangeState = ( - vStateCode <> 'ON_CHECKING' OR + SET vCanChangeState = (( + vStateCode <> 'ON_CHECKING' AND vStateCode <> 'CHECKED') OR vticketAlertLevel < vPackedAlertLevel )AND NOT ( vTicketStateCode IN ('CHECKED', 'CHECKING') From a46c3c4d9572ad54417ecea2f2e54cf5b85fe25f Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 30 Jan 2024 13:31:17 +0100 Subject: [PATCH 15/38] refs #5802 feat:ticket_setState --- db/routines/vn/procedures/ticket_setState.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_setState.sql b/db/routines/vn/procedures/ticket_setState.sql index bd7027553..af471b154 100644 --- a/db/routines/vn/procedures/ticket_setState.sql +++ b/db/routines/vn/procedures/ticket_setState.sql @@ -32,7 +32,7 @@ BEGIN END IF; SET vCanChangeState = (( - vStateCode <> 'ON_CHECKING' AND vStateCode <> 'CHECKED') OR + vStateCode <> 'ON_CHECKING' AND vStateCode <> 'CHECKED') OR vticketAlertLevel < vPackedAlertLevel )AND NOT ( vTicketStateCode IN ('CHECKED', 'CHECKING') From 7e7ab3e8b6baedcbddcce0916fb8af6d6ff1edaa Mon Sep 17 00:00:00 2001 From: pablone Date: Tue, 30 Jan 2024 15:07:13 +0100 Subject: [PATCH 16/38] fix(triggers): refs #4515 fix error --- db/routines/vn/procedures/buy_afterUpsert.sql | 4 ++- db/routines/vn/procedures/buy_chekItem.sql | 27 +++++++++++++++++++ db/routines/vn/triggers/buy_beforeUpdate.sql | 11 ++++++-- db/routines/vn/triggers/entry_afterUpdate.sql | 10 +++++++ .../vn/triggers/travel_afterUpdate.sql | 13 +++++++++ .../vn/triggers/travel_beforeUpdate.sql | 10 +------ 6 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 db/routines/vn/procedures/buy_chekItem.sql diff --git a/db/routines/vn/procedures/buy_afterUpsert.sql b/db/routines/vn/procedures/buy_afterUpsert.sql index ed98cb595..17e84177c 100644 --- a/db/routines/vn/procedures/buy_afterUpsert.sql +++ b/db/routines/vn/procedures/buy_afterUpsert.sql @@ -74,6 +74,8 @@ BEGIN WHERE b.id = vSelf; END IF; - + CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck + SELECT vSelf id; + CALL buy_checkItem(); END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/buy_chekItem.sql b/db/routines/vn/procedures/buy_chekItem.sql new file mode 100644 index 000000000..743f969a7 --- /dev/null +++ b/db/routines/vn/procedures/buy_chekItem.sql @@ -0,0 +1,27 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_checkItem`() +BEGIN +/** + * Checks if the item has weightByPiece or size null on any buy. + * + * @param tmp.buysToCheck(id as INT). + */ + DECLARE hasVolumetricAgency INT; + + SELECT a.hasWeightVolumetric INTO hasVolumetricAgency + FROM entry e + JOIN travel t ON t.id = e.travelFk + JOIN agencyMode a ON a.id = t.agencyModeFk + JOIN buy b ON b.entryFk = e.id + JOIN item i ON i.id = b.itemFk + JOIN tmp.buysToCheck bt ON bt.id = b.id + WHERE (i.weightByPiece IS NULL OR i.`size` IS NULL) + LIMIT 1; + + DROP TEMPORARY TABLE IF EXISTS tmp.buysToCheck; + + IF hasVolumetricAgency THEN + CALL util.throw('Some purchase line has an item without size or weight per stem in the volumetric agency.'); + END IF; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/triggers/buy_beforeUpdate.sql b/db/routines/vn/triggers/buy_beforeUpdate.sql index 4468d3f3a..fc03c456f 100644 --- a/db/routines/vn/triggers/buy_beforeUpdate.sql +++ b/db/routines/vn/triggers/buy_beforeUpdate.sql @@ -41,8 +41,8 @@ trig:BEGIN FROM genericAllocation ga JOIN entry e ON e.id = NEW.entryFk JOIN travel tr on tr.id = e.travelFk - WHERE ga.itemFk = vGenericFk - AND tr.landed BETWEEN ga.startDated AND ga.endDated; + WHERE ga.itemFk = vGenericFk + AND tr.landed BETWEEN ga.startDated AND ga.endDated; IF vGenericInDate THEN SET NEW.itemOriginalFk = NEW.itemFk; SET NEW.itemFk = vGenericFk; @@ -64,5 +64,12 @@ trig:BEGIN IF NEW.quantity < 0 THEN SET NEW.isIgnored = TRUE; END IF; + + IF NOT (NEW.itemFk <=> OLD.itemFk) OR + NOT (OLD.entryFk <=> NEW.entryFk) THEN + CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck + SELECT NEW.id; + CALL buy_checkItem(); + END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/entry_afterUpdate.sql b/db/routines/vn/triggers/entry_afterUpdate.sql index 6d1ad0720..60adc0003 100644 --- a/db/routines/vn/triggers/entry_afterUpdate.sql +++ b/db/routines/vn/triggers/entry_afterUpdate.sql @@ -13,5 +13,15 @@ BEGIN CALL travel_requestRecalc(OLD.travelFk); CALL travel_requestRecalc(NEW.travelFk); END IF; + + + IF NOT (NEW.travelFk <=> OLD.travelFk) THEN + CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck + SELECT b.id + FROM buy b + WHERE b.entryFk = NEW.id; + + CALL buy_checkItem(); + END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/travel_afterUpdate.sql b/db/routines/vn/triggers/travel_afterUpdate.sql index 8c639cca7..b4e40ae41 100644 --- a/db/routines/vn/triggers/travel_afterUpdate.sql +++ b/db/routines/vn/triggers/travel_afterUpdate.sql @@ -10,5 +10,18 @@ BEGIN SET commission = entry_getCommission(travelFk, currencyFk,supplierFk) WHERE travelFk = NEW.id; END IF; + + IF NOT (NEW.agencyModeFk <=> OLD.agencyModeFk) THEN + IF (SELECT hasWeightVolumetric FROM agencyMode WHERE id = NEW.agencyModeFk) THEN + CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck + SELECT b.id + FROM entry e + JOIN buy b ON b.entryFk = e.id + JOIN item i ON i.id = b.itemFk + WHERE e.travelFk = NEW.id; + + CALL buy_checkItem(); + END IF; + END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/travel_beforeUpdate.sql b/db/routines/vn/triggers/travel_beforeUpdate.sql index 440b21c04..2079cd21e 100644 --- a/db/routines/vn/triggers/travel_beforeUpdate.sql +++ b/db/routines/vn/triggers/travel_beforeUpdate.sql @@ -4,15 +4,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_beforeUpdate` FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); -/* - IF ((NOT NEW.shipped <=> OLD.shipped ) - OR (NOT NEW.landed <=> OLD.landed ) - OR (NOT NEW.warehouseInFk <=> OLD.warehouseInFk ) - OR (NOT NEW.warehouseOutFk <=> OLD.warehouseOutFk )) - AND (OLD.totalEntries AND OLD.landed < CURDATE()) THEN - CALL util.throw("Cannot past travels with entries"); - END IF; -*/ + IF NOT (NEW.landed <=> OLD.landed) OR NOT (NEW.shipped <=> OLD.shipped) THEN CALL travel_checkDates(NEW.shipped, NEW.landed); From f6607f65339c0ed0c4b53bc3da4ca6f4f138acd8 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 30 Jan 2024 22:37:43 +0100 Subject: [PATCH 17/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2b9e169b2..8f1ada293 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } - tools { - nodejs 'node-v20' - } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } + tools { + nodejs 'node-v20' + } stages { stage('Checkout') { steps { From 825ee767971db03ac8a1d5c601a7bf9459071e87 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 30 Jan 2024 23:08:00 +0100 Subject: [PATCH 18/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f1ada293..2b9e169b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } + tools { + nodejs 'node-v20' + } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } - tools { - nodejs 'node-v20' - } stages { stage('Checkout') { steps { From 222292648885b850689f8810720ab7195f4759f7 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 30 Jan 2024 23:13:40 +0100 Subject: [PATCH 19/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2b9e169b2..8f1ada293 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } - tools { - nodejs 'node-v20' - } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } + tools { + nodejs 'node-v20' + } stages { stage('Checkout') { steps { From bd1ac5f41e30ac718961711b24a780ed1f94f836 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 30 Jan 2024 23:25:42 +0100 Subject: [PATCH 20/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f1ada293..2b9e169b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } + tools { + nodejs 'node-v20' + } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } - tools { - nodejs 'node-v20' - } stages { stage('Checkout') { steps { From 4bf08ea1473b8348281c78d039cae85f65d5dba0 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 31 Jan 2024 07:23:46 +0100 Subject: [PATCH 21/38] refs #5890 feat:reserves --- db/routines/vn/procedures/ticket_setState.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/routines/vn/procedures/ticket_setState.sql b/db/routines/vn/procedures/ticket_setState.sql index af471b154..bde8e0692 100644 --- a/db/routines/vn/procedures/ticket_setState.sql +++ b/db/routines/vn/procedures/ticket_setState.sql @@ -51,5 +51,6 @@ BEGIN ELSE CALL util.throw('INCORRECT_TICKET_STATE'); END IF; + END$$ DELIMITER ; From 3182bfa46c01ef79a322277b58e402b7296f5bf1 Mon Sep 17 00:00:00 2001 From: pablone Date: Wed, 31 Jan 2024 14:58:08 +0100 Subject: [PATCH 22/38] refs #4515 --- db/routines/vn/procedures/buy_chekItem.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/routines/vn/procedures/buy_chekItem.sql b/db/routines/vn/procedures/buy_chekItem.sql index 743f969a7..0a0f00345 100644 --- a/db/routines/vn/procedures/buy_chekItem.sql +++ b/db/routines/vn/procedures/buy_chekItem.sql @@ -16,6 +16,7 @@ BEGIN JOIN item i ON i.id = b.itemFk JOIN tmp.buysToCheck bt ON bt.id = b.id WHERE (i.weightByPiece IS NULL OR i.`size` IS NULL) + AND a.hasWeightVolumetric LIMIT 1; DROP TEMPORARY TABLE IF EXISTS tmp.buysToCheck; From b091e2467c4a2873ef191219edbddda4b0bb2f49 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 09:36:22 +0100 Subject: [PATCH 23/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2b9e169b2..8f1ada293 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } - tools { - nodejs 'node-v20' - } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } + tools { + nodejs 'node-v20' + } stages { stage('Checkout') { steps { From 2ec7a43292f23b77bf60c021d1f2115d92b58165 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 1 Feb 2024 09:49:44 +0100 Subject: [PATCH 24/38] refactor: refs #6780 Changed dependences from vn2008 to vn --- .../bi/procedures/analisis_ventas_update.sql | 2 +- db/routines/vn/procedures/clean.sql | 1 + .../vn/procedures/duaInvoiceInBooking.sql | 2 +- .../vn2008/procedures/XDiario_Quadrator.sql | 8 +- db/routines/vn2008/procedures/clean.sql | 1 - db/routines/vn2008/procedures/cobro.sql | 2 +- .../procedures/confection_control_source.sql | 6 +- db/routines/vn2008/views/Vehiculos.sql | 14 -- db/routines/vn2008/views/XDiario.sql | 56 ----- db/routines/vn2008/views/v_compres.sql | 8 +- db/routines/vn2008/views/v_ventes.sql | 68 ------ db/routines/vn2008/views/v_xsubcuentas.sql | 207 ------------------ db/routines/vn2008/views/versiones.sql | 8 - db/routines/vn2008/views/warehouse.sql | 21 -- db/routines/vn2008/views/workerDocument.sql | 8 - db/routines/vn2008/views/workerTeam.sql | 7 - .../10865-goldenGalax/00-firstScript.sql | 9 + 17 files changed, 24 insertions(+), 404 deletions(-) delete mode 100644 db/routines/vn2008/views/Vehiculos.sql delete mode 100644 db/routines/vn2008/views/XDiario.sql delete mode 100644 db/routines/vn2008/views/v_ventes.sql delete mode 100644 db/routines/vn2008/views/v_xsubcuentas.sql delete mode 100644 db/routines/vn2008/views/versiones.sql delete mode 100644 db/routines/vn2008/views/warehouse.sql delete mode 100644 db/routines/vn2008/views/workerDocument.sql delete mode 100644 db/routines/vn2008/views/workerTeam.sql create mode 100644 db/versions/10865-goldenGalax/00-firstScript.sql diff --git a/db/routines/bi/procedures/analisis_ventas_update.sql b/db/routines/bi/procedures/analisis_ventas_update.sql index 04f9b6483..4f6a448ed 100644 --- a/db/routines/bi/procedures/analisis_ventas_update.sql +++ b/db/routines/bi/procedures/analisis_ventas_update.sql @@ -47,7 +47,7 @@ BEGIN LEFT JOIN vn.deliveryMethod dm ON dm.id = a.Vista LEFT JOIN vn2008.Consignatarios cs ON cs.Id_Consigna = t.Id_Consigna LEFT JOIN vn2008.province p ON p.province_id = cs.province_id - LEFT JOIN vn2008.warehouse w ON w.id = t.warehouse_id + LEFT JOIN vn.warehouse w ON w.id = t.warehouse_id WHERE bt.fecha >= vLastMonth AND r.mercancia; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index 1734bea98..0e60fad1d 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -88,6 +88,7 @@ BEGIN FROM vn.expeditionTruck WHERE eta < v3Month; + DELETE FROM XDiario WHERE FECHA < v3Month OR FECHA IS NULL; -- borrar travels sin entradas DROP TEMPORARY TABLE IF EXISTS tmp.thermographToDelete; CREATE TEMPORARY TABLE tmp.thermographToDelete diff --git a/db/routines/vn/procedures/duaInvoiceInBooking.sql b/db/routines/vn/procedures/duaInvoiceInBooking.sql index 9e794f0ed..77924938b 100644 --- a/db/routines/vn/procedures/duaInvoiceInBooking.sql +++ b/db/routines/vn/procedures/duaInvoiceInBooking.sql @@ -44,7 +44,7 @@ BEGIN IF vCounter > 0 OR vASIEN > 0 THEN - UPDATE vn2008.XDiario x + UPDATE vn.XDiario x JOIN vn.ledgerConfig lc ON lc.lastBookEntry = x.ASIEN SET x.ASIEN = vASIEN; diff --git a/db/routines/vn2008/procedures/XDiario_Quadrator.sql b/db/routines/vn2008/procedures/XDiario_Quadrator.sql index c95a3a892..93ddc231d 100644 --- a/db/routines/vn2008/procedures/XDiario_Quadrator.sql +++ b/db/routines/vn2008/procedures/XDiario_Quadrator.sql @@ -7,19 +7,19 @@ BEGIN group_concat(CONCAT(' Asiento: ', ASIEN, '- importe:', quadre) SEPARATOR ' \r\n ') FROM ( SELECT ASIEN, SUM(IFNULL(ROUND(Eurodebe,2),0))- SUM(IFNULL(ROUND(EUROHABER,2),0)) quadre - FROM XDiario + FROM vn.XDiario WHERE enlazado = FALSE GROUP BY ASIEN HAVING ABS(SUM(IFNULL(ROUND(Eurodebe,2),0))- SUM(IFNULL(ROUND(EUROHABER,2),0))) > 0.01 ) t HAVING count(*) > 0; - UPDATE XDiario XD + UPDATE vn.XDiario XD INNER JOIN( - SELECT XD.id, SUBCTA, Quadre FROM XDiario XD + SELECT XD.id, SUBCTA, Quadre FROM vn.XDiario XD INNER JOIN ( SELECT ASIEN, SUM(IFNULL(ROUND(Eurodebe,2),0))- SUM(IFNULL(ROUND(EUROHABER,2),0)) as Quadre - FROM XDiario + FROM vn.XDiario WHERE enlazado = FALSE GROUP BY ASIEN HAVING Quadre != 0 diff --git a/db/routines/vn2008/procedures/clean.sql b/db/routines/vn2008/procedures/clean.sql index f63edc80a..bd8a324c6 100644 --- a/db/routines/vn2008/procedures/clean.sql +++ b/db/routines/vn2008/procedures/clean.sql @@ -23,7 +23,6 @@ proc: BEGIN DELETE FROM cdr WHERE calldate < vDate18; DELETE FROM Monitoring WHERE ODBC_TIME < vDate; DELETE FROM Conteo WHERE Fecha < vDate; - DELETE FROM XDiario WHERE FECHA < vDate3 OR FECHA IS NULL; DELETE FROM mail WHERE DATE_ODBC < vDate; DELETE FROM expeditions_deleted WHERE odbc_date < vDate26; DELETE FROM Movimientos_mark WHERE odbc_date < vDate; diff --git a/db/routines/vn2008/procedures/cobro.sql b/db/routines/vn2008/procedures/cobro.sql index fb6010f38..26d906813 100644 --- a/db/routines/vn2008/procedures/cobro.sql +++ b/db/routines/vn2008/procedures/cobro.sql @@ -25,7 +25,7 @@ BEGIN FROM Clientes WHERE Id_Cliente = idCLI; CALL vn.ledger_next(max_asien); - INSERT INTO XDiario (ASIEN,FECHA,SUBCTA,CONTRA,CONCEPTO,EURODEBE,EUROHABER,empresa_id) + INSERT INTO vn.XDiario (ASIEN,FECHA,SUBCTA,CONTRA,CONCEPTO,EURODEBE,EUROHABER,empresa_id) SELECT max_asien,datFEC,SUBCTA,CONTRA,strCONCEPTO,EURODEBE,EUROHABER,idEMP FROM(SELECT cuenta_banco SUBCTA, cuenta_cliente CONTRA, 0 EURODEBE, dblIMPORTE EUROHABER UNION ALL diff --git a/db/routines/vn2008/procedures/confection_control_source.sql b/db/routines/vn2008/procedures/confection_control_source.sql index f439e80f7..77b4df5f3 100644 --- a/db/routines/vn2008/procedures/confection_control_source.sql +++ b/db/routines/vn2008/procedures/confection_control_source.sql @@ -31,7 +31,7 @@ BEGIN stock.available FROM vn2008.Tickets t JOIN vn2008.Agencias a ON a.Id_Agencia = t.Id_Agencia - JOIN vn2008.warehouse wh ON wh.id = t.warehouse_id + JOIN vn.warehouse wh ON wh.id = t.warehouse_id JOIN vn2008.Movimientos m ON m.Id_Ticket = t.Id_Ticket JOIN vn2008.Articles i ON i.Id_Article = m.Id_Article JOIN vn2008.Tipos tp ON tp.tipo_id = i.tipo_id @@ -88,8 +88,8 @@ BEGIN FROM vn2008.Compres c JOIN vn2008.Entradas e ON e.Id_Entrada = c.Id_Entrada JOIN vn2008.travel tr ON tr.id = e.travel_id - JOIN vn2008.warehouse whi ON whi.id = tr.warehouse_id - JOIN vn2008.warehouse who ON who.id = tr.warehouse_id_out + JOIN vn.warehouse whi ON whi.id = tr.warehouse_id + JOIN vn.warehouse who ON who.id = tr.warehouse_id_out JOIN vn2008.Articles a ON a.Id_Article = c.Id_Article JOIN vn2008.Tipos tp ON tp.tipo_id = a.tipo_id JOIN vn.confectionType ct ON ct.id = tp.confeccion diff --git a/db/routines/vn2008/views/Vehiculos.sql b/db/routines/vn2008/views/Vehiculos.sql deleted file mode 100644 index 477ff657c..000000000 --- a/db/routines/vn2008/views/Vehiculos.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`Vehiculos` -AS SELECT `v`.`id` AS `Id_Vehiculo`, - `v`.`numberPlate` AS `Matricula`, - `v`.`tradeMark` AS `Marca`, - `v`.`model` AS `Modelo`, - `v`.`companyFk` AS `empresa_id`, - `v`.`warehouseFk` AS `warehouseFk`, - `v`.`description` AS `description`, - `v`.`m3` AS `m3`, - `v`.`isActive` AS `active`, - `v`.`deliveryPointFk` AS `deliveryPointFk` -FROM `vn`.`vehicle` `v` diff --git a/db/routines/vn2008/views/XDiario.sql b/db/routines/vn2008/views/XDiario.sql deleted file mode 100644 index 0a9672d2e..000000000 --- a/db/routines/vn2008/views/XDiario.sql +++ /dev/null @@ -1,56 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`XDiario` -AS SELECT `d`.`id` AS `id`, - `d`.`ASIEN` AS `ASIEN`, - `d`.`FECHA` AS `FECHA`, - `d`.`SUBCTA` AS `SUBCTA`, - `d`.`CONTRA` AS `CONTRA`, - `d`.`CONCEPTO` AS `CONCEPTO`, - `d`.`EURODEBE` AS `EURODEBE`, - `d`.`EUROHABER` AS `EUROHABER`, - `d`.`BASEEURO` AS `BASEEURO`, - `d`.`SERIE` AS `SERIE`, - `d`.`FACTURA` AS `FACTURA`, - `d`.`IVA` AS `IVA`, - `d`.`RECEQUIV` AS `RECEQUIV`, - `d`.`CLAVE` AS `CLAVE`, - `d`.`CAMBIO` AS `CAMBIO`, - `d`.`DEBEME` AS `DEBEME`, - `d`.`HABERME` AS `HABERME`, - `d`.`AUXILIAR` AS `AUXILIAR`, - `d`.`MONEDAUSO` AS `MONEDAUSO`, - `d`.`TIPOOPE` AS `TIPOOPE`, - `d`.`NFACTICK` AS `NFACTICK`, - `d`.`TERIDNIF` AS `TERIDNIF`, - `d`.`TERNIF` AS `TERNIF`, - `d`.`TERNOM` AS `TERNOM`, - `d`.`OPBIENES` AS `OPBIENES`, - `d`.`L340` AS `L340`, - `d`.`enlazado` AS `enlazado`, - `d`.`FECHA_EX` AS `FECHA_EX`, - `d`.`LRECT349` AS `LRECT349`, - `d`.`empresa_id` AS `empresa_id`, - `d`.`LDIFADUAN` AS `LDIFADUAN`, - `d`.`METAL` AS `METAL`, - `d`.`METALIMP` AS `METALIMP`, - `d`.`CLIENTE` AS `CLIENTE`, - `d`.`METALEJE` AS `METALEJE`, - `d`.`FECHA_OP` AS `FECHA_OP`, - `d`.`FACTURAEX` AS `FACTURAEX`, - `d`.`TIPOCLAVE` AS `TIPOCLAVE`, - `d`.`TIPOEXENCI` AS `TIPOEXENCI`, - `d`.`TIPONOSUJE` AS `TIPONOSUJE`, - `d`.`TIPOFACT` AS `TIPOFACT`, - `d`.`TIPORECTIF` AS `TIPORECTIF`, - `d`.`SERIE_RT` AS `SERIE_RT`, - `d`.`FACTU_RT` AS `FACTU_RT`, - `d`.`BASEIMP_RT` AS `BASEIMP_RT`, - `d`.`BASEIMP_RF` AS `BASEIMP_RF`, - `d`.`RECTIFICA` AS `RECTIFICA`, - `d`.`FECHA_RT` AS `FECHA_RT`, - `d`.`created` AS `created`, - `d`.`updated` AS `updated`, - `d`.`FECREGCON` AS `FECREGCON`, - `d`.`enlazadoSage` AS `enlazadoSage` -FROM `vn`.`XDiario` `d` diff --git a/db/routines/vn2008/views/v_compres.sql b/db/routines/vn2008/views/v_compres.sql index 8c52e2a72..8bd6a4a64 100644 --- a/db/routines/vn2008/views/v_compres.sql +++ b/db/routines/vn2008/views/v_compres.sql @@ -53,7 +53,7 @@ AS SELECT `TP`.`Id_Tipo` AS `Familia`, `A`.`Color` AS `Color`, `A`.`Min` AS `Min`, `C`.`Costefijo` + `C`.`Embalajefijo` + `C`.`Comisionfija` + `C`.`Portefijo` AS `Coste`, - `W_OUT`.`fuente` AS `fuente`, + `W_OUT`.`isFeedStock` AS `fuente`, IF( `cb`.`Volumen` > 0, `cb`.`Volumen`, @@ -73,9 +73,9 @@ FROM ( ) JOIN `vn2008`.`travel` `TR` ON(`TR`.`id` = `E`.`travel_id`) ) - JOIN `vn2008`.`warehouse` `W_IN` ON(`W_IN`.`id` = `TR`.`warehouse_id`) + JOIN `vn`.`warehouse` `W_IN` ON(`W_IN`.`id` = `TR`.`warehouse_id`) ) - JOIN `vn2008`.`warehouse` `W_OUT` ON(`W_OUT`.`id` = `TR`.`warehouse_id_out`) + JOIN `vn`.`warehouse` `W_OUT` ON(`W_OUT`.`id` = `TR`.`warehouse_id_out`) ) JOIN `vn2008`.`Articles` `A` ON(`C`.`Id_Article` = `A`.`Id_Article`) ) @@ -85,6 +85,6 @@ FROM ( ) JOIN `vn2008`.`Cubos` `cb` ON(`cb`.`Id_Cubo` = `C`.`Id_Cubo`) ) -WHERE `W_IN`.`fuente` = 0 +WHERE `W_IN`.`isFeedStock` = 0 AND `E`.`Inventario` = 0 AND `E`.`Redada` = 0 diff --git a/db/routines/vn2008/views/v_ventes.sql b/db/routines/vn2008/views/v_ventes.sql deleted file mode 100644 index 9fd87a002..000000000 --- a/db/routines/vn2008/views/v_ventes.sql +++ /dev/null @@ -1,68 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`v_ventes` -AS SELECT `Agencias`.`Agencia` AS `Agencia`, - `A`.`Categoria` AS `Categoria`, - `A`.`tipo_id` AS `tipo_id`, - `A`.`Medida` AS `Medida`, - `A`.`Article` AS `Article`, - `A`.`Color` AS `Color`, - `CS`.`Id_cliente` AS `Id_Cliente`, - `TP`.`Id_Tipo` AS `Tipo`, - `T`.`Factura` AS `Factura`, - `T`.`warehouse_id` AS `warehouse_id`, - `M`.`Id_Movimiento` AS `Id_Movimiento`, - `M`.`Id_Article` AS `Id_Article`, - `TP`.`Id_Tipo` AS `Familia`, - `M`.`Id_Ticket` AS `Id_Ticket`, - `M`.`Concepte` AS `Concepte`, - `M`.`Cantidad` AS `Cantidad`, - `M`.`quantity` AS `quantity`, - `M`.`Preu` AS `Preu`, - `M`.`Descuento` AS `Descuento`, - IF( - `T`.`Fecha` >= '2015-10-01', - `M`.`CostFixat`, - `M`.`Preu` * (100 - `M`.`Descuento`) / 100 - ) AS `CostFixat`, - `M`.`Reservado` AS `Reservado`, - `M`.`OK` AS `OK`, - `M`.`PrecioFijado` AS `PrecioFijado`, - `M`.`odbc_date` AS `odbc_date`, - cast(`T`.`Fecha` AS date) AS `Fecha`, - `T`.`Fecha` AS `FechaCompleta`, - `CS`.`consignatario` AS `Alias`, - `T`.`Id_Consigna` AS `Id_Consigna`, - `M`.`Cantidad` * `M`.`Preu` * (100 - `M`.`Descuento`) / 100 AS `Importe`, - `O`.`Origen` AS `Origen`, - `TP`.`reino_id` AS `reino_id`, - `C`.`invoice` AS `invoice`, - `A`.`producer_id` AS `producer_id` -FROM ( - ( - ( - ( - ( - ( - ( - ( - `vn2008`.`Movimientos` `M` - JOIN `vn2008`.`Tickets` `T` ON(`M`.`Id_Ticket` = `T`.`Id_Ticket`) - ) - JOIN `vn2008`.`Consignatarios` `CS` ON(`CS`.`id_consigna` = `T`.`Id_Consigna`) - ) - JOIN `vn2008`.`Clientes` `C` ON(`CS`.`Id_cliente` = `C`.`id_cliente`) - ) - JOIN `vn2008`.`Articles` `A` ON(`M`.`Id_Article` = `A`.`Id_Article`) - ) - JOIN `vn2008`.`Origen` `O` ON(`O`.`id` = `A`.`id_origen`) - ) - JOIN `vn2008`.`Tipos` `TP` ON(`A`.`tipo_id` = `TP`.`tipo_id`) - ) - JOIN `vn2008`.`reinos` `r` ON(`TP`.`reino_id` = `r`.`id`) - ) - JOIN `vn2008`.`Agencias` ON(`Agencias`.`Id_Agencia` = `T`.`Id_Agencia`) - ) -WHERE `T`.`Fecha` >= '2013-01-01' - AND `C`.`real` > 0 - AND `r`.`id` <> 6 diff --git a/db/routines/vn2008/views/v_xsubcuentas.sql b/db/routines/vn2008/views/v_xsubcuentas.sql deleted file mode 100644 index a200e4ad9..000000000 --- a/db/routines/vn2008/views/v_xsubcuentas.sql +++ /dev/null @@ -1,207 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`v_xsubcuentas` -AS SELECT `Clientes`.`Cuenta` AS `COD`, - `Clientes`.`razonSocial` AS `TITULO`, - concat( - IF( - `p`.`CEE` = 1 - AND ascii(left(`Clientes`.`if`, 1)) < 58, - `p`.`Codigo`, - '' - ), - `Clientes`.`if` - ) AS `NIF`, - `Clientes`.`domicilio` AS `DOMICILIO`, - `Clientes`.`poblacion` AS `POBLACION`, - `province`.`name` AS `PROVINCIA`, - `Clientes`.`codPostal` AS `CODPOSTAL`, - `p`.`Codigo` AS `country_code`, - sub.`empresa_id` AS `empresa_id`, - substr( - `Clientes`.`e-mail`, - 1, - coalesce(nullif(locate(',', `Clientes`.`e-mail`), 0), 99) - 1 - ) AS `EMAIL`, - IF( - `p`.`CEE` = 0 - OR `p`.`CEE` = 1 - AND `Clientes`.`vies` = 0, - 1, - IF( - `p`.`CEE` = 1 - AND `Clientes`.`vies` <> 0, - 2, - 4 - ) - ) AS `IDNIF` -FROM ( - ( - ( - `vn2008`.`Clientes` - JOIN ( - SELECT DISTINCT `Facturas`.`Id_Cliente` AS `Id_Cliente`, - `Facturas`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`Facturas` - WHERE `Facturas`.`Fecha` > `util`.`VN_CURDATE`() + INTERVAL -2 MONTH - UNION - SELECT `Recibos`.`Id_Cliente` AS `Id_Cliente`, - `Recibos`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`Recibos` - WHERE `Recibos`.`Fechacobro` > `util`.`VN_CURDATE`() + INTERVAL -2 MONTH - ) sub ON( - `Clientes`.`id_cliente` = sub.`Id_Cliente` - ) - ) - LEFT JOIN `vn2008`.`Paises` `p` ON(`p`.`Id` = `Clientes`.`Id_Pais`) - ) - JOIN `vn2008`.`province` ON( - `Clientes`.`province_id` = `province`.`province_id` - ) - ) -GROUP BY `Clientes`.`id_cliente`, - sub.`empresa_id` -UNION ALL -SELECT `Proveedores`.`cuenta` AS `Cuenta`, - `Proveedores`.`Proveedor` AS `Proveedor`, - concat( - IF( - `p`.`CEE` = 1 - AND ascii(left(`Proveedores`.`NIF`, 1)) < 58, - `p`.`Codigo`, - '' - ), - `Proveedores`.`NIF` - ) AS `NIF`, - `Proveedores`.`Domicilio` AS `Domicilio`, - `Proveedores`.`Localidad` AS `Localidad`, - `prov`.`name` AS `Provincia`, - `Proveedores`.`codpos` AS `CP`, - `p`.`Codigo` AS `country_code`, - sub.`empresa_id` AS `empresa_id`, - substr( - `c`.`email`, - 1, - coalesce(nullif(locate(',', `c`.`email`), 0), 99) - 1 - ) AS `EMAIL`, - IF(`p`.`CEE` = 0, 1, IF(`p`.`CEE` = 1, 2, 4)) AS `IDNIF` -FROM ( - ( - ( - ( - `vn2008`.`Proveedores` - JOIN ( - SELECT `recibida`.`proveedor_id` AS `proveedor_id`, - `recibida`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`recibida` - WHERE `recibida`.`fecha` > `util`.`VN_CURDATE`() + INTERVAL -3 MONTH - GROUP BY `recibida`.`proveedor_id`, - `recibida`.`empresa_id` - UNION ALL - SELECT `pago`.`id_proveedor` AS `id_proveedor`, - `pago`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`pago` - WHERE `pago`.`fecha` > `util`.`VN_CURDATE`() + INTERVAL -3 MONTH - GROUP BY `pago`.`id_proveedor`, - `pago`.`empresa_id` - ) sub ON( - `Proveedores`.`Id_Proveedor` = sub.`proveedor_id` - ) - ) - LEFT JOIN `vn2008`.`Paises` `p` ON(`p`.`Id` = `Proveedores`.`pais_id`) - ) - LEFT JOIN `vn2008`.`province` `prov` ON( - `prov`.`province_id` = `Proveedores`.`province_id` - ) - ) - LEFT JOIN `vn`.`supplierContact` `c` ON(`c`.`supplierFk` = `Proveedores`.`Id_Proveedor`) - ) -WHERE `Proveedores`.`oficial` <> 0 -GROUP BY sub.`proveedor_id`, - sub.`empresa_id` -UNION ALL -SELECT `Gastos`.`Id_Gasto` COLLATE utf8mb3_unicode_ci AS `Id_Gasto`, - `Gastos`.`Gasto` COLLATE utf8mb3_unicode_ci AS `Gasto`, - NULL AS `NULL`, - NULL AS `My_exp_NULL`, - NULL AS `My_exp_1_NULL`, - NULL AS `My_exp_2_NULL`, - NULL AS `My_exp_3_NULL`, - NULL AS `country_code`, - `e`.`id` AS `id`, - NULL AS `EMAIL`, - 1 AS `IDNIF` -FROM ( - `vn2008`.`Gastos` - JOIN `vn2008`.`empresa` `e` ON(`e`.`id` = 442) - ) -UNION ALL -SELECT `Bancos`.`Cuenta` AS `Cuenta`, - `Bancos`.`Banco` AS `Banco`, - NULL AS `NULL`, - NULL AS `My_exp_NULL`, - NULL AS `My_exp_1_NULL`, - NULL AS `My_exp_2_NULL`, - NULL AS `My_exp_3_NULL`, - NULL AS `country_code`, - `e`.`id` AS `id`, - NULL AS `EMAIL`, - 1 AS `IDNIF` -FROM ( - `vn2008`.`Bancos` - JOIN `vn2008`.`empresa` `e` ON(`e`.`id` = 442) - ) -UNION ALL -SELECT lpad(right(`Proveedores`.`cuenta`, 5), 10, '47510000') AS `Cuenta`, - `Proveedores`.`Proveedor` AS `Proveedor`, - `Proveedores`.`NIF` AS `NIF`, - `Proveedores`.`Domicilio` AS `Domicilio`, - `Proveedores`.`Localidad` AS `Localidad`, - `prov`.`name` AS `Provincia`, - `Proveedores`.`codpos` AS `CP`, - `p`.`Codigo` AS `country_code`, - sub.`empresa_id` AS `empresa_id`, - substr( - `c`.`email`, - 1, - coalesce(nullif(locate(',', `c`.`email`), 0), 99) - 1 - ) AS `EMAIL`, - IF(`p`.`CEE` = 0, 1, IF(`p`.`CEE` = 1, 2, 4)) AS `IDNIF` -FROM ( - ( - ( - ( - `vn2008`.`Proveedores` - JOIN ( - SELECT `recibida`.`proveedor_id` AS `proveedor_id`, - `recibida`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`recibida` - WHERE `recibida`.`fecha` > `util`.`VN_CURDATE`() + INTERVAL -3 MONTH - GROUP BY `recibida`.`proveedor_id`, - `recibida`.`empresa_id` - UNION ALL - SELECT `pago`.`id_proveedor` AS `id_proveedor`, - `pago`.`empresa_id` AS `empresa_id` - FROM `vn2008`.`pago` - WHERE `pago`.`fecha` > `util`.`VN_CURDATE`() + INTERVAL -3 MONTH - GROUP BY `pago`.`id_proveedor`, - `pago`.`empresa_id` - ) sub ON( - `Proveedores`.`Id_Proveedor` = sub.`proveedor_id` - ) - ) - LEFT JOIN `vn2008`.`Paises` `p` ON(`p`.`Id` = `Proveedores`.`pais_id`) - ) - LEFT JOIN `vn2008`.`province` `prov` ON( - `prov`.`province_id` = `Proveedores`.`province_id` - ) - ) - LEFT JOIN `vn`.`supplierContact` `c` ON(`c`.`supplierFk` = `Proveedores`.`Id_Proveedor`) - ) -WHERE ( - `Proveedores`.`cuenta` LIKE '_____3____' - OR `Proveedores`.`cuenta` LIKE '_____2____' - ) - AND `Proveedores`.`oficial` = 1 -GROUP BY sub.`proveedor_id`, - sub.`empresa_id` diff --git a/db/routines/vn2008/views/versiones.sql b/db/routines/vn2008/views/versiones.sql deleted file mode 100644 index 04e63dbb4..000000000 --- a/db/routines/vn2008/views/versiones.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`versiones` -AS SELECT `m`.`app` AS `programa`, - `m`.`version` AS `version`, - 0 AS `critical` -FROM `vn`.`mdbVersion` `m` -WHERE `m`.`branchFk` = 'master' diff --git a/db/routines/vn2008/views/warehouse.sql b/db/routines/vn2008/views/warehouse.sql deleted file mode 100644 index 5199d5c8e..000000000 --- a/db/routines/vn2008/views/warehouse.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`warehouse` -AS SELECT `w`.`id` AS `id`, - `w`.`name` AS `name`, - `w`.`isInventory` AS `inventario`, - `w`.`isFeedStock` AS `fuente`, - `w`.`isComparative` AS `is_comparative`, - `w`.`hasComission` AS `comisionantes`, - `w`.`hasAvailable` AS `reserve`, - `w`.`isManaged` AS `isManaged`, - `w`.`isForTicket` AS `tpv`, - `w`.`hasStowaway` AS `hasStowaway`, - `w`.`hasDms` AS `hasDms`, - `w`.`addressName` AS `address_name`, - `w`.`delay` AS `delay`, - `w`.`countryFk` AS `Id_Paises`, - `w`.`labelZone` AS `zone_label`, - `w`.`valuatedInventory` AS `valuatedInventory`, - `w`.`hasConfectionTeam` AS `hasConfectionTeam` -FROM `vn`.`warehouse` `w` diff --git a/db/routines/vn2008/views/workerDocument.sql b/db/routines/vn2008/views/workerDocument.sql deleted file mode 100644 index 7aca7497f..000000000 --- a/db/routines/vn2008/views/workerDocument.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`workerDocument` -AS SELECT `vn`.`workerDocument`.`id` AS `id`, - `vn`.`workerDocument`.`worker` AS `worker`, - `vn`.`workerDocument`.`document` AS `document`, - `vn`.`workerDocument`.`isReadableByWorker` AS `isReadableByWorker` -FROM `vn`.`workerDocument` diff --git a/db/routines/vn2008/views/workerTeam.sql b/db/routines/vn2008/views/workerTeam.sql deleted file mode 100644 index 6db6c094a..000000000 --- a/db/routines/vn2008/views/workerTeam.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`workerTeam` -AS SELECT `wt`.`team` AS `team`, - `wt`.`id` AS `id`, - `wt`.`workerFk` AS `user` -FROM `vn`.`workerTeam` `wt` diff --git a/db/versions/10865-goldenGalax/00-firstScript.sql b/db/versions/10865-goldenGalax/00-firstScript.sql new file mode 100644 index 000000000..3b00b10e6 --- /dev/null +++ b/db/versions/10865-goldenGalax/00-firstScript.sql @@ -0,0 +1,9 @@ +REVOKE UPDATE ON TABLE vn2008.Vehiculos FROM officeBoss; +REVOKE SELECT ON TABLE vn2008.Vehiculos FROM claimManager; +REVOKE SELECT, INSERT, UPDATE ON TABLE vn2008.Vehiculos FROM deliveryAssistant; +REVOKE SELECT ON TABLE vn2008.versiones FROM employee; +REVOKE INSERT ON TABLE vn2008.XDiario FROM financial; +REVOKE SELECT, INSERT, UPDATE ON TABLE vn2008.XDiario FROM buyer; +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM administrative; +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM hr; +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM buyerBoss; \ No newline at end of file From 603d8e3d9218470d0eea899280f8afca28694e92 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 14:07:42 +0100 Subject: [PATCH 25/38] build: refs #6706 hook test --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3123de092..e6235f0eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,13 @@ pipeline { options { disableConcurrentBuilds() } + tools { + nodejs 'node-v20' + } environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } - tools { - nodejs 'node-v20' - } stages { stage('Checkout') { steps { From 39f0e8b4317fd09f77d11b3adad1344591287b3d Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 1 Feb 2024 14:22:22 +0100 Subject: [PATCH 26/38] refs #6783 deploy: init version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 46706cafd..17c483619 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "salix-back", - "version": "24.6.0", + "version": "24.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "salix-back", - "version": "24.6.0", + "version": "24.8.0", "license": "GPL-3.0", "dependencies": { "axios": "^1.2.2", diff --git a/package.json b/package.json index 09274bb53..39f99225a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "24.6.0", + "version": "24.8.0", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From 0852d21ee6961cac86ed7906b3e330fbdd12628f Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 1 Feb 2024 14:23:51 +0100 Subject: [PATCH 27/38] refs #6783 deploy: init version --- CHANGELOG.md | 290 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 170 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29df75827..f48811338 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,299 +5,349 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2408.01] - 2024-02-22 + +### Added + +### Changed + +### Fixed + ## [2406.01] - 2024-02-08 ### Added -### Changed -### Fixed +### Changed + +### Fixed ## [2404.01] - 2024-01-25 ### Added -### Changed -### Fixed +### Changed + +### Fixed ## [2402.01] - 2024-01-11 ### Added + ### Changed + ### Fixed ## [2400.01] - 2024-01-04 ### Added + ### Changed + ### Fixed ## [2350.01] - 2023-12-14 ### Características Añadidas 🆕 -- **Tickets → Expediciones:** Añadido soporte para Viaexpress +- **Tickets → Expediciones:** Añadido soporte para Viaexpress ## [2348.01] - 2023-11-30 ### Características Añadidas 🆕 -- **Tickets → Adelantar:** Permite mover lineas sin generar negativos -- **Tickets → Adelantar:** Permite modificar la fecha de los tickets -- **Trabajadores → Notificaciones:** Nueva sección (lilium) + +- **Tickets → Adelantar:** Permite mover lineas sin generar negativos +- **Tickets → Adelantar:** Permite modificar la fecha de los tickets +- **Trabajadores → Notificaciones:** Nueva sección (lilium) ### Correcciones 🛠️ -- **Tickets → RocketChat:** Arreglada detección de cambios +- **Tickets → RocketChat:** Arreglada detección de cambios ## [2346.01] - 2023-11-16 ### Added -### Changed -### Fixed +### Changed + +### Fixed ## [2342.01] - 2023-11-02 ### Added -- (Usuarios -> Foto) Se muestra la foto del trabajador -### Fixed -- (Usuarios -> Historial) Abre el descriptor del usuario correctamente +- (Usuarios -> Foto) Se muestra la foto del trabajador + +### Fixed + +- (Usuarios -> Historial) Abre el descriptor del usuario correctamente ## [2340.01] - 2023-10-05 ## [2338.01] - 2023-09-21 ### Added -- (Ticket -> Servicios) Se pueden abonar servicios -- (Facturas -> Datos básicos) Muestra valores por defecto -- (Facturas -> Borrado) Notificación al borrar un asiento ya enlazado en Sage + +- (Ticket -> Servicios) Se pueden abonar servicios +- (Facturas -> Datos básicos) Muestra valores por defecto +- (Facturas -> Borrado) Notificación al borrar un asiento ya enlazado en Sage + ### Changed -- (Trabajadores -> Calendario) Icono de check arreglado cuando pulsas un tipo de dia + +- (Trabajadores -> Calendario) Icono de check arreglado cuando pulsas un tipo de dia ## [2336.01] - 2023-09-07 ## [2334.01] - 2023-08-24 ### Added -- (General -> Errores) Botón para enviar cau con los datos del error +- (General -> Errores) Botón para enviar cau con los datos del error ## [2332.01] - 2023-08-10 ### Added -- (Trabajadores -> Gestión documental) Soporte para Docuware -- (General -> Agencia) Soporte para Viaexpress -- (Tickets -> SMS) Nueva sección en Lilium + +- (Trabajadores -> Gestión documental) Soporte para Docuware +- (General -> Agencia) Soporte para Viaexpress +- (Tickets -> SMS) Nueva sección en Lilium ### Changed -- (General -> Tickets) Devuelve el motivo por el cual no es editable -- (Desplegables -> Trabajadores) Mejorados -- (General -> Clientes) Razón social y dirección en mayúsculas + +- (General -> Tickets) Devuelve el motivo por el cual no es editable +- (Desplegables -> Trabajadores) Mejorados +- (General -> Clientes) Razón social y dirección en mayúsculas ### Fixed -- (Clientes -> SMS) Al pasar el ratón por encima muestra el mensaje completo +- (Clientes -> SMS) Al pasar el ratón por encima muestra el mensaje completo ## [2330.01] - 2023-07-27 ### Added -- (Artículos -> Vista Previa) Añadido campo "Plástico reciclado" -- (Rutas -> Troncales) Nueva sección -- (Tickets -> Opciones) Opción establecer peso -- (Clientes -> SMS) Nueva sección + +- (Artículos -> Vista Previa) Añadido campo "Plástico reciclado" +- (Rutas -> Troncales) Nueva sección +- (Tickets -> Opciones) Opción establecer peso +- (Clientes -> SMS) Nueva sección ### Changed -- (General -> Iconos) Añadidos nuevos iconos -- (Clientes -> Razón social) Permite crear clientes con la misma razón social según el país +- (General -> Iconos) Añadidos nuevos iconos +- (Clientes -> Razón social) Permite crear clientes con la misma razón social según el país ## [2328.01] - 2023-07-13 ### Added -- (Clientes -> Morosos) Añadida columna "es trabajador" -- (Trabajadores -> Departamentos) Nueva sección -- (Trabajadores -> Departamentos) Añadido listado de Trabajadores por departamento -- (Trabajadores -> Departamentos) Añadido características de departamento e información + +- (Clientes -> Morosos) Añadida columna "es trabajador" +- (Trabajadores -> Departamentos) Nueva sección +- (Trabajadores -> Departamentos) Añadido listado de Trabajadores por departamento +- (Trabajadores -> Departamentos) Añadido características de departamento e información ### Changed ### Fixed -- (Trabajadores -> Departamentos) Arreglado búscador +- (Trabajadores -> Departamentos) Arreglado búscador ## [2326.01] - 2023-06-29 ### Added -- (Entradas -> Correo) Al cambiar el tipo de cambio enviará un correo a las personas designadas -- (General -> Históricos) Botón para ver el estado del registro en cada punto -- (General -> Históricos) Al filtar por registro se muestra todo el histórial desde que fue creado -- (Tickets -> Índice) Permite enviar varios albaranes a Docuware + +- (Entradas -> Correo) Al cambiar el tipo de cambio enviará un correo a las personas designadas +- (General -> Históricos) Botón para ver el estado del registro en cada punto +- (General -> Históricos) Al filtar por registro se muestra todo el histórial desde que fue creado +- (Tickets -> Índice) Permite enviar varios albaranes a Docuware ### Changed -- (General -> Históricos) Los registros se muestran agrupados por usuario y entidad -- (Facturas -> Facturación global) Optimizada, generación de PDFs y notificaciones en paralelo + +- (General -> Históricos) Los registros se muestran agrupados por usuario y entidad +- (Facturas -> Facturación global) Optimizada, generación de PDFs y notificaciones en paralelo ### Fixed -- (General -> Históricos) Duplicidades eliminadas -- (Facturas -> Facturación global) Solucionados fallos que paran el proceso + +- (General -> Históricos) Duplicidades eliminadas +- (Facturas -> Facturación global) Solucionados fallos que paran el proceso ## [2324.01] - 2023-06-15 ### Added -- (Tickets -> Abono) Al abonar permite crear el ticket abono con almacén o sin almmacén -- (General -> Desplegables) Mejorada eficiencia de carga de datos -- (General -> Históricos) Ahora, ademas de los ids, se muestra la descripión de los atributos -- (General -> Históricos) Botón para hacer más ágil mostrar sólo los cambios en un registro -- (General -> Históricos) Filtro por cambios + +- (Tickets -> Abono) Al abonar permite crear el ticket abono con almacén o sin almmacén +- (General -> Desplegables) Mejorada eficiencia de carga de datos +- (General -> Históricos) Ahora, ademas de los ids, se muestra la descripión de los atributos +- (General -> Históricos) Botón para hacer más ágil mostrar sólo los cambios en un registro +- (General -> Históricos) Filtro por cambios ### Changed -- (General -> Permisos) Mejorada seguridad -- (General -> Históricos) Elementos de la interfaz reorganizados para hacerla más ágil e intuitiva + +- (General -> Permisos) Mejorada seguridad +- (General -> Históricos) Elementos de la interfaz reorganizados para hacerla más ágil e intuitiva ### Fixed + - - - ## [2322.01] - 2023-06-01 ### Added -- (Tickets -> Crear Factura) Al facturar se envia automáticamente el pdf al cliente -- (Artículos -> Histórico) Filtro para mostrar lo anterior al inventario -- (Trabajadores -> Nuevo trabajador) Permite elegir el método de pago + +- (Tickets -> Crear Factura) Al facturar se envia automáticamente el pdf al cliente +- (Artículos -> Histórico) Filtro para mostrar lo anterior al inventario +- (Trabajadores -> Nuevo trabajador) Permite elegir el método de pago ### Changed -- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador' -- (Tickets -> Expediciones) Interfaz mejorada y contador añadido + +- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador' +- (Tickets -> Expediciones) Interfaz mejorada y contador añadido + ### Fixed -- (Tickets -> Líneas) Se permite hacer split de líneas al mismo ticket -- (Tickets -> Cambiar estado) Ahora muestra la lista completa de todos los estados - +- (Tickets -> Líneas) Se permite hacer split de líneas al mismo ticket +- (Tickets -> Cambiar estado) Ahora muestra la lista completa de todos los estados ## [2320.01] - 2023-05-25 ### Added -- (Tickets -> Crear Factura) Al facturar se envia automáticamente el pdf al cliente +- (Tickets -> Crear Factura) Al facturar se envia automáticamente el pdf al cliente ### Changed -- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador' + +- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador' ### Fixed + - - - ## [2318.01] - 2023-05-08 ### Added -- (Usuarios -> Histórico) Nueva sección -- (Roles -> Histórico) Nueva sección -- (Trabajadores -> Dar de alta) Permite elegir el método de pago + +- (Usuarios -> Histórico) Nueva sección +- (Roles -> Histórico) Nueva sección +- (Trabajadores -> Dar de alta) Permite elegir el método de pago ### Changed -- (Artículo -> Precio fijado) Modificado el buscador superior por uno lateral -- (Trabajadores -> Dar de alta) Quitada obligatoriedad del iban + +- (Artículo -> Precio fijado) Modificado el buscador superior por uno lateral +- (Trabajadores -> Dar de alta) Quitada obligatoriedad del iban ### Fixed -- (Ticket -> Boxing) Arreglado selección de horas -- (Cesta -> Índice) Optimizada búsqueda - +- (Ticket -> Boxing) Arreglado selección de horas +- (Cesta -> Índice) Optimizada búsqueda ## [2314.01] - 2023-04-20 ### Added -- (Clientes -> Morosos) Ahora se puede filtrar por las columnas "Desde" y "Fecha Ú. O.". También se envia un email al comercial cuando se añade una nota. -- (Monitor tickets) Muestra un icono al lado de la zona, si el ticket es frágil y se envía por agencia -- (Facturas recibidas -> Bases negativas) Nueva sección + +- (Clientes -> Morosos) Ahora se puede filtrar por las columnas "Desde" y "Fecha Ú. O.". También se envia un email al comercial cuando se añade una nota. +- (Monitor tickets) Muestra un icono al lado de la zona, si el ticket es frágil y se envía por agencia +- (Facturas recibidas -> Bases negativas) Nueva sección ### Fixed -- (Clientes -> Morosos) Ahora se mantienen los elementos seleccionados al hacer sroll. + +- (Clientes -> Morosos) Ahora se mantienen los elementos seleccionados al hacer sroll. ## [2312.01] - 2023-04-06 ### Added -- (Monitor tickets) Muestra un icono al lado de la zona, si el ticket es frágil y se envía por agencia + +- (Monitor tickets) Muestra un icono al lado de la zona, si el ticket es frágil y se envía por agencia ### Changed -- (Monitor tickets) Cuando se filtra por 'Pendiente' ya no muestra los estados de 'Previa' -- (Envíos -> Extra comunitarios) Se agrupan las entradas del mismo travel. Añadidos campos Referencia y Importe. -- (Envíos -> Índice) Cambiado el buscador superior por uno lateral + +- (Monitor tickets) Cuando se filtra por 'Pendiente' ya no muestra los estados de 'Previa' +- (Envíos -> Extra comunitarios) Se agrupan las entradas del mismo travel. Añadidos campos Referencia y Importe. +- (Envíos -> Índice) Cambiado el buscador superior por uno lateral ## [2310.01] - 2023-03-23 ### Added -- (Trabajadores -> Control de horario) Ahora se puede confirmar/no confirmar el registro horario de cada semana desde esta sección + +- (Trabajadores -> Control de horario) Ahora se puede confirmar/no confirmar el registro horario de cada semana desde esta sección ### Fixed -- (Clientes -> Listado extendido) Resuelto error al filtrar por clientes inactivos desde la columna "Activo" -- (General) Al pasar el ratón por encima del icono de "Borrar" en un campo, se hacía más grande afectando a la interfaz + +- (Clientes -> Listado extendido) Resuelto error al filtrar por clientes inactivos desde la columna "Activo" +- (General) Al pasar el ratón por encima del icono de "Borrar" en un campo, se hacía más grande afectando a la interfaz ## [2308.01] - 2023-03-09 ### Added -- (Proveedores -> Datos fiscales) Añadido checkbox 'Vies' -- (Client -> Descriptor) Nuevo icono $ con barrotes para los clientes con impago -- (Trabajador -> Datos Básicos) Añadido nuevo campo Taquilla -- (Trabajador -> PDA) Nueva sección + +- (Proveedores -> Datos fiscales) Añadido checkbox 'Vies' +- (Client -> Descriptor) Nuevo icono $ con barrotes para los clientes con impago +- (Trabajador -> Datos Básicos) Añadido nuevo campo Taquilla +- (Trabajador -> PDA) Nueva sección ### Changed -- (Ticket -> Borrar ticket) Restringido el borrado de tickets con abono + +- (Ticket -> Borrar ticket) Restringido el borrado de tickets con abono ## [2306.01] - 2023-02-23 ### Added -- (Tickets -> Datos Básicos) Mensaje de confirmación al intentar generar tickets con negativos -- (Artículos) El visible y disponible se calcula a partir de un almacén diferente dependiendo de la sección en la que te encuentres. Se ha añadido un icono que informa sobre a partir de que almacén se esta calculando. + +- (Tickets -> Datos Básicos) Mensaje de confirmación al intentar generar tickets con negativos +- (Artículos) El visible y disponible se calcula a partir de un almacén diferente dependiendo de la sección en la que te encuentres. Se ha añadido un icono que informa sobre a partir de que almacén se esta calculando. ### Changed -- (General -> Inicio) Ahora permite recuperar la contraseña tanto con el correo de recuperación como el usuario + +- (General -> Inicio) Ahora permite recuperar la contraseña tanto con el correo de recuperación como el usuario ### Fixed -- (Monitor de tickets) Cuando ordenas por columna, ya no se queda deshabilitado el botón de 'Actualizar' -- (Zone -> Días de entrega) Al hacer click en un día, muestra correctamente las zonas -- (Artículos) El disponible en la vista previa se muestra correctamente + +- (Monitor de tickets) Cuando ordenas por columna, ya no se queda deshabilitado el botón de 'Actualizar' +- (Zone -> Días de entrega) Al hacer click en un día, muestra correctamente las zonas +- (Artículos) El disponible en la vista previa se muestra correctamente ## [2304.01] - 2023-02-09 ### Added -- (Rutas) Al descargar varias facturas se comprime en un zip -- (Trabajadores -> Nuevo trabajador) Nueva sección -- (Tickets -> Adelantar tickets) Añadidos campos "líneas" y "litros" al ticket origen -- (Tickets -> Adelantar tickets) Nuevo icono muestra cuando las agencias de los tickets origen/destino son distintas + +- (Rutas) Al descargar varias facturas se comprime en un zip +- (Trabajadores -> Nuevo trabajador) Nueva sección +- (Tickets -> Adelantar tickets) Añadidos campos "líneas" y "litros" al ticket origen +- (Tickets -> Adelantar tickets) Nuevo icono muestra cuando las agencias de los tickets origen/destino son distintas ### Changed -- (Entradas -> Compras) Cambiados los campos "Precio Grouping/Packing" por "PVP" y "Precio" por "Coste" -- (Artículos -> Últimas entradas) Cambiados los campos "P.P.U." y "P.P.P." por "PVP" -- (Rutas -> Sumario/Tickets) Actualizados campos de los tickets -- (Proveedores -> Crear/Editar) Permite añadir Proveedores con la misma razón social pero con países distintos -- (Tickets -> Adelantar tickets) Cambiados selectores de estado por checks "Pendiente origen/destino" -- (Tickets -> Adelantar tickets) Cambiado stock de destino a origen. + +- (Entradas -> Compras) Cambiados los campos "Precio Grouping/Packing" por "PVP" y "Precio" por "Coste" +- (Artículos -> Últimas entradas) Cambiados los campos "P.P.U." y "P.P.P." por "PVP" +- (Rutas -> Sumario/Tickets) Actualizados campos de los tickets +- (Proveedores -> Crear/Editar) Permite añadir Proveedores con la misma razón social pero con países distintos +- (Tickets -> Adelantar tickets) Cambiados selectores de estado por checks "Pendiente origen/destino" +- (Tickets -> Adelantar tickets) Cambiado stock de destino a origen. ### Fixed -- (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas. -- (Cliente -> Datos Fiscales) No se permite seleccionar 'Notificar vía e-mail' a los clientes sin e-mail -- (Tickets -> Datos básicos) Permite guardar la hora de envío -- (Tickets -> Añadir pago) Eliminado "null" en las referencias -- (Tickets -> Adelantar tickets) Permite ordenar por importe -- (Tickets -> Adelantar tickets) El filtrado por encajado muestra también los tickets sin tipo de encajado + +- (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas. +- (Cliente -> Datos Fiscales) No se permite seleccionar 'Notificar vía e-mail' a los clientes sin e-mail +- (Tickets -> Datos básicos) Permite guardar la hora de envío +- (Tickets -> Añadir pago) Eliminado "null" en las referencias +- (Tickets -> Adelantar tickets) Permite ordenar por importe +- (Tickets -> Adelantar tickets) El filtrado por encajado muestra también los tickets sin tipo de encajado ## [2302.01] - 2023-01-26 ### Added -- (General -> Inicio) Permite recuperar la contraseña -- (Tickets -> Opciones) Subir albarán a Docuware -- (Tickets -> Opciones) Enviar correo con PDF de Docuware -- (Artículos -> Datos Básicos) Añadido campo Unidades/Caja + +- (General -> Inicio) Permite recuperar la contraseña +- (Tickets -> Opciones) Subir albarán a Docuware +- (Tickets -> Opciones) Enviar correo con PDF de Docuware +- (Artículos -> Datos Básicos) Añadido campo Unidades/Caja ### Changed -- (Reclamaciones -> Descriptor) Cambiado el campo Agencia por Zona -- (Tickets -> Líneas preparadas) Actualizada sección para que sea más visual + +- (Reclamaciones -> Descriptor) Cambiado el campo Agencia por Zona +- (Tickets -> Líneas preparadas) Actualizada sección para que sea más visual ### Fixed -- (General) Al utilizar el traductor de Google se descuadraban los iconos + +- (General) Al utilizar el traductor de Google se descuadraban los iconos ### Removed -- (Tickets -> Control clientes) Eliminada sección + +- (Tickets -> Control clientes) Eliminada sección From aba88c812e7b4c70e7c41396ebe9a17ad445584b Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 21:35:28 +0100 Subject: [PATCH 28/38] build: refs #6706 Jenkinsfile globals --- Jenkinsfile | 53 +++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e6235f0eb..74fd68f09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,28 @@ #!/usr/bin/env groovy -def PROTECTED_BRANCH -def FROM_GIT -def RUN_TESTS +switch (env.BRANCH_NAME) { + case 'dev': + env.NODE_ENV = 'dev' + env.BACK_REPLICAS = 1 + break + case 'test': + env.NODE_ENV = 'test' + env.BACK_REPLICAS = 2 + break + case 'master': + env.NODE_ENV = 'production' + env.BACK_REPLICAS = 4 + break +} + +def PROTECTED_BRANCH = [ + 'dev', + 'test', + 'master' +].contains(env.BRANCH_NAME) + +def FROM_GIT = env.JOB_NAME.startsWith('gitea/') +def RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT pipeline { agent any @@ -21,22 +41,8 @@ pipeline { steps { script { // Uncomment to enable debugging - //env.DEBUG = 'strong-remoting:http-context,strong-remoting:shared-method' - - switch (env.BRANCH_NAME) { - case 'dev': - env.NODE_ENV = 'dev' - env.BACK_REPLICAS = 1 - break - case 'test': - env.NODE_ENV = 'test' - env.BACK_REPLICAS = 2 - break - case 'master': - env.NODE_ENV = 'production' - env.BACK_REPLICAS = 4 - break - } + // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference + //env.DEBUG = 'strong-remoting:shared-method' def packageJson = readJSON file: 'package.json' env.VERSION = packageJson.version @@ -45,15 +51,6 @@ pipeline { script: 'git log -1 --pretty=%B ${GIT_COMMIT}', returnStdout: true ).trim() - - PROTECTED_BRANCH = [ - 'dev', - 'test', - 'master' - ].contains(env.BRANCH_NAME) - - FROM_GIT = JOB_NAME.startsWith('gitea/') - RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT } setEnv() } From 056ddbd9aeae536e234abc747d93057f3c58a185 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 21:49:42 +0100 Subject: [PATCH 29/38] build: refs #6706 Jenkinsfile test --- Jenkinsfile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 74fd68f09..7e10b96a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,6 @@ #!/usr/bin/env groovy switch (env.BRANCH_NAME) { - case 'dev': - env.NODE_ENV = 'dev' - env.BACK_REPLICAS = 1 - break case 'test': env.NODE_ENV = 'test' env.BACK_REPLICAS = 2 @@ -13,6 +9,9 @@ switch (env.BRANCH_NAME) { env.NODE_ENV = 'production' env.BACK_REPLICAS = 4 break + default: + env.NODE_ENV = 'dev' + env.BACK_REPLICAS = 1 } def PROTECTED_BRANCH = [ @@ -67,7 +66,7 @@ pipeline { } stage('Frontend') { when { - expression { return FROM_GIT } + expression { FROM_GIT } } steps { sh 'npm install --no-audit --prefer-offline --prefix=front' @@ -75,7 +74,7 @@ pipeline { } stage('Print') { when { - expression { return FROM_GIT } + expression { FROM_GIT } } steps { sh 'npm install --no-audit --prefer-offline --prefix=print' @@ -85,7 +84,7 @@ pipeline { } stage('Test') { when { - expression { return RUN_TESTS } + expression { RUN_TESTS } } environment { NODE_ENV = "" @@ -106,7 +105,7 @@ pipeline { } stage('Build') { when { - expression { return PROTECTED_BRANCH && FROM_GIT } + expression { PROTECTED_BRANCH && FROM_GIT } } environment { CREDENTIALS = credentials('docker-registry') @@ -116,9 +115,14 @@ pipeline { dockerBuild() } } + stage('Output') { + steps { + echo "${env.NODE_ENV}" + } + } stage('Deploy') { when { - expression { return PROTECTED_BRANCH } + expression { PROTECTED_BRANCH } } parallel { stage('Database') { @@ -136,7 +140,7 @@ pipeline { } stage('Docker') { when { - expression { return FROM_GIT } + expression { FROM_GIT } } environment { DOCKER_HOST = "${env.SWARM_HOST}" From 2180045848436528968082660570ebc5a457aac4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:04:49 +0100 Subject: [PATCH 30/38] build: refs #6706 Jenkinsfile test --- Jenkinsfile | 77 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7e10b96a9..c9444537c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,28 +1,45 @@ #!/usr/bin/env groovy -switch (env.BRANCH_NAME) { - case 'test': - env.NODE_ENV = 'test' - env.BACK_REPLICAS = 2 - break - case 'master': - env.NODE_ENV = 'production' - env.BACK_REPLICAS = 4 - break - default: - env.NODE_ENV = 'dev' - env.BACK_REPLICAS = 1 +{ + switch (env.BRANCH_NAME) { + case 'test': + env.NODE_ENV = 'test' + env.BACK_REPLICAS = 2 + break + case 'master': + env.NODE_ENV = 'production' + env.BACK_REPLICAS = 4 + break + default: + env.NODE_ENV = 'dev' + env.BACK_REPLICAS = 1 + } + + def PROTECTED_BRANCH = [ + 'dev', + 'test', + 'master' + ].contains(env.BRANCH_NAME) + + def FROM_GIT = env.JOB_NAME.startsWith('gitea/') + def RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT + + + // Uncomment to enable debugging + // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference + //env.DEBUG = 'strong-remoting:shared-method' + + def packageJson = readJSON file: 'package.json' + env.VERSION = packageJson.version + + env.GIT_COMMIT_MSG = sh( + script: 'git log -1 --pretty=%B ${GIT_COMMIT}', + returnStdout: true + ).trim() + + setEnv() } -def PROTECTED_BRANCH = [ - 'dev', - 'test', - 'master' -].contains(env.BRANCH_NAME) - -def FROM_GIT = env.JOB_NAME.startsWith('gitea/') -def RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT - pipeline { agent any options { @@ -36,24 +53,6 @@ pipeline { STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { - stage('Checkout') { - steps { - script { - // Uncomment to enable debugging - // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference - //env.DEBUG = 'strong-remoting:shared-method' - - def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version - - env.GIT_COMMIT_MSG = sh( - script: 'git log -1 --pretty=%B ${GIT_COMMIT}', - returnStdout: true - ).trim() - } - setEnv() - } - } stage('Install') { environment { NODE_ENV = "" From 76785b99b16bc686a83d2cc0476c48280213cf2c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:06:30 +0100 Subject: [PATCH 31/38] build: refs #6706 Jenkinsfile test --- Jenkinsfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c9444537c..d2fb6cbaa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,10 @@ #!/usr/bin/env groovy -{ +def PROTECTED_BRANCH +def FROM_GIT +def RUN_TESTS + +before: { switch (env.BRANCH_NAME) { case 'test': env.NODE_ENV = 'test' @@ -15,15 +19,14 @@ env.BACK_REPLICAS = 1 } - def PROTECTED_BRANCH = [ + PROTECTED_BRANCH = [ 'dev', 'test', 'master' ].contains(env.BRANCH_NAME) - def FROM_GIT = env.JOB_NAME.startsWith('gitea/') - def RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT - + FROM_GIT = env.JOB_NAME.startsWith('gitea/') + RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT // Uncomment to enable debugging // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference From 3356691124a1878199bae163626d75b340932f04 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:12:01 +0100 Subject: [PATCH 32/38] build: refs #6706 Jenkinsfile test --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2fb6cbaa..2aba146de 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,8 +32,6 @@ before: { // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference //env.DEBUG = 'strong-remoting:shared-method' - def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version env.GIT_COMMIT_MSG = sh( script: 'git log -1 --pretty=%B ${GIT_COMMIT}', @@ -56,6 +54,14 @@ pipeline { STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { + stage('Checkout') { + steps { + script { + def packageJson = readJSON file: 'package.json' + env.VERSION = packageJson.version + } + } + } stage('Install') { environment { NODE_ENV = "" From 6a27b752e22693c2a496841ec77c1b83d6808449 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:13:36 +0100 Subject: [PATCH 33/38] build: refs #6706 Jenkinsfile test --- Jenkinsfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2aba146de..af616498b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ def PROTECTED_BRANCH def FROM_GIT def RUN_TESTS -before: { +pre: { switch (env.BRANCH_NAME) { case 'test': env.NODE_ENV = 'test' @@ -31,14 +31,17 @@ before: { // Uncomment to enable debugging // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference //env.DEBUG = 'strong-remoting:shared-method' +} +pipeline { + stage('Setup') { + env.GIT_COMMIT_MSG = sh( + script: 'git log -1 --pretty=%B ${GIT_COMMIT}', + returnStdout: true + ).trim() - env.GIT_COMMIT_MSG = sh( - script: 'git log -1 --pretty=%B ${GIT_COMMIT}', - returnStdout: true - ).trim() - - setEnv() + setEnv() + } } pipeline { From eb32b6daa2c1d4b3b587d64daeebbd3d6d636f4f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:19:00 +0100 Subject: [PATCH 34/38] build: refs #6706 Jenkinsfile fixes --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index af616498b..1a0505246 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pre: { //env.DEBUG = 'strong-remoting:shared-method' } -pipeline { +node { stage('Setup') { env.GIT_COMMIT_MSG = sh( script: 'git log -1 --pretty=%B ${GIT_COMMIT}', From d7b15d32215d5d3dd5f8ffa1e00b002c07498a68 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 22:23:58 +0100 Subject: [PATCH 35/38] build: refs #6706 Jenkinsfile fixes --- Jenkinsfile | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1a0505246..252b1a1f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,9 +32,11 @@ pre: { // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference //env.DEBUG = 'strong-remoting:shared-method' } - node { stage('Setup') { + def packageJson = readJSON file: 'package.json' + env.VERSION = packageJson.version + env.GIT_COMMIT_MSG = sh( script: 'git log -1 --pretty=%B ${GIT_COMMIT}', returnStdout: true @@ -43,7 +45,6 @@ node { setEnv() } } - pipeline { agent any options { @@ -57,14 +58,6 @@ pipeline { STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { - stage('Checkout') { - steps { - script { - def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version - } - } - } stage('Install') { environment { NODE_ENV = "" @@ -128,7 +121,7 @@ pipeline { } stage('Output') { steps { - echo "${env.NODE_ENV}" + echo "${env.VERSION}" } } stage('Deploy') { From c35bbc3c9daea37b0569527cd9915c893608b4e0 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 1 Feb 2024 23:19:06 +0100 Subject: [PATCH 36/38] build: refs #6706 Jenkinsfile fixes --- Jenkinsfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 252b1a1f3..4914f8f1c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -119,11 +119,6 @@ pipeline { dockerBuild() } } - stage('Output') { - steps { - echo "${env.VERSION}" - } - } stage('Deploy') { when { expression { PROTECTED_BRANCH } From 11b0d787e56f1d17c7abf5c52eaa68e12ab80b28 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 2 Feb 2024 11:57:58 +0100 Subject: [PATCH 37/38] refactor: refs #6780 Revoke grants --- db/versions/10865-goldenGalax/00-firstScript.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/db/versions/10865-goldenGalax/00-firstScript.sql b/db/versions/10865-goldenGalax/00-firstScript.sql index 3b00b10e6..889477b5c 100644 --- a/db/versions/10865-goldenGalax/00-firstScript.sql +++ b/db/versions/10865-goldenGalax/00-firstScript.sql @@ -6,4 +6,10 @@ REVOKE INSERT ON TABLE vn2008.XDiario FROM financial; REVOKE SELECT, INSERT, UPDATE ON TABLE vn2008.XDiario FROM buyer; REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM administrative; REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM hr; -REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM buyerBoss; \ No newline at end of file +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE vn2008.XDiario FROM buyerBoss; +REVOKE SELECT, INSERT ON TABLE vn2008.workerDocument FROM hr; +REVOKE SELECT ON TABLE vn2008.warehouse FROM guest; +REVOKE SELECT ON TABLE vn2008.warehouse FROM employee; +REVOKE SELECT, INSERT, UPDATE ON TABLE vn2008.workerTeam FROM salesAssistant; +REVOKE DELETE ON TABLE vn2008.workerTeam FROM salesBoss; +REVOKE SELECT ON TABLE vn2008.v_compres FROM administrative; \ No newline at end of file From bca15cc796d582f27f58542249de30f5f39e9f10 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 2 Feb 2024 13:03:59 +0100 Subject: [PATCH 38/38] fix: refs #5483 Fix version --- db/routines/vn/views/itemShelvingAvailable.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/views/itemShelvingAvailable.sql b/db/routines/vn/views/itemShelvingAvailable.sql index 868d6a963..e9599a1db 100644 --- a/db/routines/vn/views/itemShelvingAvailable.sql +++ b/db/routines/vn/views/itemShelvingAvailable.sql @@ -38,7 +38,7 @@ FROM ( ) JOIN `vn`.`agencyMode` `am` ON(`am`.`id` = `t`.`agencyModeFk`) ) - JOIN `vn`.`ticketStateToday` `tst` ON(`tst`.`ticketFk` = `t`.`id`) + JOIN `vn`.`ticketStateToday` `tst` ON(`tst`.`ticket` = `t`.`id`) ) JOIN `vn`.`state` `st` ON(`st`.`id` = `tst`.`state`) )