From 4d7ac901c6f46fe798b71ba67e7e1008c0636771 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 14 May 2024 07:52:21 +0200 Subject: [PATCH 001/250] feat: refs #3199 Added more scopes ticket_recalcByScope --- .../vn/procedures/ticket_recalcByScope.sql | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 41105fe23..833ce712d 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -14,10 +14,19 @@ BEGIN DECLARE vTicketFk INT; DECLARE cTickets CURSOR FOR - SELECT id FROM ticket - WHERE refFk IS NULL - AND ((vScope = 'client' AND clientFk = vId) - OR (vScope = 'address' AND addressFk = vId)); + SELECT DISTINCT t.id + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk + WHERE t.refFk IS NULL + DATE(t.shipped) > util.VN_CURDATE() + AND ( + (vScope = 'client' AND t.clientFk = vId) + OR (vScope = 'address' AND t.addressFk = vId) + OR (vScope = 'item' AND itc.itemFk = vId) + OR (vScope = 'country' AND itc.countryFk = vId) + OR (vScope = 'taxClass' AND itc.taxClassFk = vId) + ); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; From 1ba6bf9a9c728c052d0fba75f5ab4505c431d85a Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 14 May 2024 07:54:52 +0200 Subject: [PATCH 002/250] feat: refs #3199 Added more scopes ticket_recalcByScope --- db/routines/vn/procedures/ticket_recalcByScope.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 833ce712d..e484c2890 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -19,7 +19,7 @@ BEGIN JOIN sale s ON s.ticketFk = t.id JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk WHERE t.refFk IS NULL - DATE(t.shipped) > util.VN_CURDATE() + AND DATE(t.shipped) > util.VN_CURDATE() AND ( (vScope = 'client' AND t.clientFk = vId) OR (vScope = 'address' AND t.addressFk = vId) From 7d47a986bf9797764a12c0cc5e3c16024b04b5e5 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 14 May 2024 08:24:11 +0200 Subject: [PATCH 003/250] feat: refs #3199 Created ticket_recalcItemTaxCountryByScope --- .../vn/procedures/ticket_recalcByScope.sql | 17 ++----- .../ticket_recalcItemTaxCountryByScope.sql | 47 +++++++++++++++++++ 2 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index e484c2890..41105fe23 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -14,19 +14,10 @@ BEGIN DECLARE vTicketFk INT; DECLARE cTickets CURSOR FOR - SELECT DISTINCT t.id - FROM ticket t - JOIN sale s ON s.ticketFk = t.id - JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk - WHERE t.refFk IS NULL - AND DATE(t.shipped) > util.VN_CURDATE() - AND ( - (vScope = 'client' AND t.clientFk = vId) - OR (vScope = 'address' AND t.addressFk = vId) - OR (vScope = 'item' AND itc.itemFk = vId) - OR (vScope = 'country' AND itc.countryFk = vId) - OR (vScope = 'taxClass' AND itc.taxClassFk = vId) - ); + SELECT id FROM ticket + WHERE refFk IS NULL + AND ((vScope = 'client' AND clientFk = vId) + OR (vScope = 'address' AND addressFk = vId)); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; diff --git a/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql b/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql new file mode 100644 index 000000000..82b2a4a48 --- /dev/null +++ b/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql @@ -0,0 +1,47 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_recalcItemTaxCountryByScope`( + vScope VARCHAR(255), + vId INT +) +BEGIN +/** + * Recalculates tickets in an scope. + * + * @param vScope The scope name + * @param vId The scope id + */ + DECLARE vDone BOOL; + DECLARE vTicketFk INT; + + DECLARE cTickets CURSOR FOR + SELECT DISTINCT t.id + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk + WHERE t.refFk IS NULL + AND DATE(t.shipped) > util.VN_CURDATE() + AND ( + (vScope = 'item' AND itc.itemFk = vId) + OR (vScope = 'country' AND itc.countryFk = vId) + OR (vScope = 'taxClass' AND itc.taxClassFk = vId) + ); + + DECLARE CONTINUE HANDLER FOR NOT FOUND + SET vDone = TRUE; + + OPEN cTickets; + + myLoop: LOOP + SET vDone = FALSE; + FETCH cTickets INTO vTicketFk; + + IF vDone THEN + LEAVE myLoop; + END IF; + + CALL ticket_recalc(vTicketFk, NULL); + END LOOP; + + CLOSE cTickets; +END$$ +DELIMITER ; From 2cee9c9c01799d53f0a784133735b838b6844b2f Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 14 May 2024 08:58:44 +0200 Subject: [PATCH 004/250] feat: refs #3199 Added one more scope ticket_recalcByScope --- .../vn/procedures/ticket_recalcByScope.sql | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 41105fe23..c5df8f82d 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -14,10 +14,17 @@ BEGIN DECLARE vTicketFk INT; DECLARE cTickets CURSOR FOR - SELECT id FROM ticket - WHERE refFk IS NULL - AND ((vScope = 'client' AND clientFk = vId) - OR (vScope = 'address' AND addressFk = vId)); + SELECT DISTINCT t.id + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk + WHERE t.refFk IS NULL + AND DATE(t.shipped) > util.VN_CURDATE() + AND ( + (vScope = 'client' AND t.clientFk = vId) + OR (vScope = 'address' AND t.addressFk = vId) + OR (vScope = 'item' AND itc.itemFk = vId) + ); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; From 9b09bc4efb2ffec0312bccba4b6831ddca660c87 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 14 May 2024 08:59:11 +0200 Subject: [PATCH 005/250] feat: refs #3199 Added one more scope ticket_recalcByScope --- .../ticket_recalcItemTaxCountryByScope.sql | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql diff --git a/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql b/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql deleted file mode 100644 index 82b2a4a48..000000000 --- a/db/routines/vn/procedures/ticket_recalcItemTaxCountryByScope.sql +++ /dev/null @@ -1,47 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_recalcItemTaxCountryByScope`( - vScope VARCHAR(255), - vId INT -) -BEGIN -/** - * Recalculates tickets in an scope. - * - * @param vScope The scope name - * @param vId The scope id - */ - DECLARE vDone BOOL; - DECLARE vTicketFk INT; - - DECLARE cTickets CURSOR FOR - SELECT DISTINCT t.id - FROM ticket t - JOIN sale s ON s.ticketFk = t.id - JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk - WHERE t.refFk IS NULL - AND DATE(t.shipped) > util.VN_CURDATE() - AND ( - (vScope = 'item' AND itc.itemFk = vId) - OR (vScope = 'country' AND itc.countryFk = vId) - OR (vScope = 'taxClass' AND itc.taxClassFk = vId) - ); - - DECLARE CONTINUE HANDLER FOR NOT FOUND - SET vDone = TRUE; - - OPEN cTickets; - - myLoop: LOOP - SET vDone = FALSE; - FETCH cTickets INTO vTicketFk; - - IF vDone THEN - LEAVE myLoop; - END IF; - - CALL ticket_recalc(vTicketFk, NULL); - END LOOP; - - CLOSE cTickets; -END$$ -DELIMITER ; From e4046880428b204f3ab9b2e3d50c59c22ff2dbb6 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 18 Jun 2024 10:12:22 +0200 Subject: [PATCH 006/250] refs #7407 create models --- modules/worker/back/model-config.json | 6 +++ .../worker/back/models/medical-center.json | 19 +++++++ .../worker/back/models/medical-review.json | 52 +++++++++++++++++++ modules/worker/back/models/worker.json | 7 ++- 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 modules/worker/back/models/medical-center.json create mode 100644 modules/worker/back/models/medical-review.json diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index b7c355511..7090cfce6 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -124,6 +124,12 @@ }, "Locker": { "dataSource": "vn" + }, + "MedicalReview": { + "dataSource": "vn" + }, + "MedicalCenter": { + "dataSource": "vn" } } diff --git a/modules/worker/back/models/medical-center.json b/modules/worker/back/models/medical-center.json new file mode 100644 index 000000000..5f0a3bbd7 --- /dev/null +++ b/modules/worker/back/models/medical-center.json @@ -0,0 +1,19 @@ +{ + "name": "MedicalCenter", + "base": "VnModel", + "options": { + "mysql": { + "table": "medicalCenter" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "name": { + "type": "string" + } + } +} diff --git a/modules/worker/back/models/medical-review.json b/modules/worker/back/models/medical-review.json new file mode 100644 index 000000000..6fe7d7a01 --- /dev/null +++ b/modules/worker/back/models/medical-review.json @@ -0,0 +1,52 @@ +{ + "name": "MedicalReview", + "base": "VnModel", + "options": { + "mysql": { + "table": "medicalReview" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "workerFk": { + "type": "number" + }, + "centerFk": { + "type": "number" + }, + "date": { + "type": "date" + }, + "time": { + "type": "string" + }, + "isFit": { + "type": "boolean" + }, + "amount": { + "type": "number" + }, + "invoice": { + "type": "string" + }, + "remark": { + "type": "string" + } + }, + "relations": { + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + }, + "center": { + "type": "belongsTo", + "model": "MedicalCenter", + "foreignKey": "centerFk" + } + } +} diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 4796c6373..cd7a55223 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -115,6 +115,11 @@ "type": "hasMany", "model": "Locker", "foreignKey": "workerFk" + }, + "medicalReview": { + "type": "hasMany", + "model": "MedicalReview", + "foreignKey": "workerFk" } }, "acls": [ @@ -126,4 +131,4 @@ "principalId": "$owner" } ] -} \ No newline at end of file +} From 774d55d4ae2407a12f477648bad634607b67b2fb Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 18 Jun 2024 13:28:21 +0200 Subject: [PATCH 007/250] refs #7407 fix acls fixtures --- db/dump/fixtures.before.sql | 9 +++++++++ db/versions/11108-redRose/00-firstScript.sql | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 db/versions/11108-redRose/00-firstScript.sql diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 058c5cd2a..ad4bf086e 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3882,3 +3882,12 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli (1, '2001-05-17', 1, 5), (1, '2001-05-18', 1, 5); +INSERT INTO vn.medicalReview +(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark) +VALUES(1, 1106, 1, '2000-01-01', '08:10', 1, 200.0, NULL, ''); +INSERT INTO vn.medicalReview +(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark) +VALUES(2, 1106, 2, '2001-01-01', '09:10', 0, 10.0, NULL, NULL); +INSERT INTO vn.medicalReview +(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark) +VALUES(3, 9, 2, '2000-01-01', '8:00', 1, 150.0, NULL, NULL); diff --git a/db/versions/11108-redRose/00-firstScript.sql b/db/versions/11108-redRose/00-firstScript.sql new file mode 100644 index 000000000..e70291e8f --- /dev/null +++ b/db/versions/11108-redRose/00-firstScript.sql @@ -0,0 +1,6 @@ +-- Place your SQL code here +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) + VALUES + ('MedicalReview', '*', '*', 'ALLOW', 'ROLE', 'hr'), + ('MedicalCenter', '*', '*', 'ALLOW', 'ROLE', 'hr'), + ('Worker', '__get__medicalReview', '*', 'ALLOW', 'ROLE', 'hr'); From ebdd6bd08c443e6e6a837d197f11ef1b1b4138e9 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 1 Jul 2024 11:50:20 +0200 Subject: [PATCH 008/250] fix merge dev --- modules/worker/back/models/worker.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 1d0b390e9..855d77e39 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -118,7 +118,8 @@ }, "medicalReview": { "type": "hasMany", - "model": "MedicalReview" + "model": "MedicalReview", + "foreignKey": "workerFk" }, "incomes": { "type": "hasMany", From 2a203926b967715a184dce7fc08fac389d4b024f Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 2 Jul 2024 09:02:24 +0200 Subject: [PATCH 009/250] feat: refs #7564 Added volume column --- db/versions/11124-greenBamboo/00-firstScript.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/versions/11124-greenBamboo/00-firstScript.sql diff --git a/db/versions/11124-greenBamboo/00-firstScript.sql b/db/versions/11124-greenBamboo/00-firstScript.sql new file mode 100644 index 000000000..6f47cbc21 --- /dev/null +++ b/db/versions/11124-greenBamboo/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.ticket ADD volume decimal(10,6) DEFAULT NULL NULL COMMENT 'Unidad en m3'; From 1e5fd8002cc925b8f7f90fd768328e0e7816103b Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 2 Jul 2024 09:36:23 +0200 Subject: [PATCH 010/250] feat: refs #7564 Added proc --- .../vn/procedures/ticket_setVolume.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 db/routines/vn/procedures/ticket_setVolume.sql diff --git a/db/routines/vn/procedures/ticket_setVolume.sql b/db/routines/vn/procedures/ticket_setVolume.sql new file mode 100644 index 000000000..060a6fa57 --- /dev/null +++ b/db/routines/vn/procedures/ticket_setVolume.sql @@ -0,0 +1,24 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolume`( + vSelf INT +) +BEGIN +/** + * Update the volume ticket + * + * @param vSelf Ticket id + */ + DECLARE vVolume DECIMAL(10,6); + + SELECT SUM(s.quantity * ic.cm3delivery / 1000000) INTO vVolume + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN itemCost ic ON ic.itemFk = s.itemFk + AND ic.warehouseFk = t.warehouseFk + WHERE t.id = vSelf; + + UPDATE ticket + SET volume = vVolume + WHERE id = vSelf; +END$$ +DELIMITER ; From 2f8df96ba7d0e8cd4d82d50a18a131fe2a10fa98 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 3 Jul 2024 09:29:12 +0200 Subject: [PATCH 011/250] feat: refs #7564 Added ticket_setVolumeItemCost --- .../procedures/ticket_setVolumeItemCost.sql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 db/routines/vn/procedures/ticket_setVolumeItemCost.sql diff --git a/db/routines/vn/procedures/ticket_setVolumeItemCost.sql b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql new file mode 100644 index 000000000..c00fc63dc --- /dev/null +++ b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql @@ -0,0 +1,32 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolumeItemCost`( + vItemFk INT +) +BEGIN +/** + * Update the volume tickets of item + * + * @param vSelf Ticket id + */ + CREATE OR REPLACE TEMPORARY TABLE tTicket + (PRIMARY KEY (id)) + ENGINE = MEMORY + SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN itemCost ic ON ic.itemFk = s.itemFk + AND ic.warehouseFk = t.warehouseFk + WHERE t.id IN ( + SELECT DISTINCT ticketFk + FROM sale + WHERE itemFk = vItemFk + ) + GROUP BY t.id; + + UPDATE ticket t + JOIN tTicket tt ON tt.id = t.id + SET t.volume = tt.volume; + + DROP TEMPORARY TABLE tTicket; +END$$ +DELIMITER ; From 4757ce11a34bfc5064a6a38db41283f7da55986d Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 8 Jul 2024 12:35:29 +0200 Subject: [PATCH 012/250] refactor: refs #7567 Fix and improvement --- db/routines/srt/events/moving_clean.sql | 6 +- db/routines/srt/procedures/moving_clean.sql | 84 ++++++++++--------- .../11141-azureRoebelini/00-firstScript.sql | 1 + 3 files changed, 48 insertions(+), 43 deletions(-) create mode 100644 db/versions/11141-azureRoebelini/00-firstScript.sql diff --git a/db/routines/srt/events/moving_clean.sql b/db/routines/srt/events/moving_clean.sql index a6f7792a2..650c15c62 100644 --- a/db/routines/srt/events/moving_clean.sql +++ b/db/routines/srt/events/moving_clean.sql @@ -5,9 +5,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `srt`.`moving_clean` ON COMPLETION PRESERVE ENABLE COMMENT 'Llama a srt.moving_clean para que elimine y notifique de registr' -DO BEGIN - - CALL srt.moving_clean(); - -END$$ +DO CALL srt.moving_clean()$$ DELIMITER ; diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index b8fae7ff4..446ad3588 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -3,61 +3,69 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_clean`() BEGIN /** * Elimina movimientos por inactividad - * */ DECLARE vExpeditionFk INT; DECLARE vBufferToFk INT; DECLARE vBufferFromFk INT; - DECLARE done BOOL DEFAULT FALSE; - - DECLARE cur CURSOR FOR + DECLARE vDone BOOL DEFAULT FALSE; + DECLARE vSorter CURSOR FOR SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk - FROM srt.moving m - JOIN srt.config c - JOIN (SELECT bufferFk, SUM(isActive) hasBox - FROM srt.photocell - GROUP BY bufferFk) sub ON sub.bufferFk = m.bufferFromFk - WHERE m.created < TIMESTAMPADD(MINUTE, - c.movingMaxLife , util.VN_NOW()) + FROM moving m + JOIN ( + SELECT bufferFk, SUM(isActive) hasBox + FROM photocell + GROUP BY bufferFk + ) sub ON sub.bufferFk = m.bufferFromFk + WHERE m.created < (util.VN_NOW() - INTERVAL (SELECT movingMaxLife FROM config) MINUTE) AND NOT sub.hasBox; - DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - OPEN cur; + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; - bucle: LOOP + OPEN vSorter; + l: LOOP + SET vDone = FALSE; + FETCH vSorter INTO vExpeditionFk, vBufferToFk, vBufferFromFk; - FETCH cur INTO vExpeditionFk, vBufferToFk, vBufferFromFk; - - IF done THEN - LEAVE bucle; + IF vDone THEN + LEAVE l; END IF; - DELETE FROM srt.moving + START TRANSACTION; + + SELECT id + FROM moving + WHERE expeditionFk = vExpeditionFk + FOR UPDATE; + + DELETE FROM moving WHERE expeditionFk = vExpeditionFk; - UPDATE srt.expedition e - JOIN srt.expeditionState es ON es.description = 'OUT' - SET - bufferFk = NULL, + SELECT id + FROM expedition + WHERE id = vExpeditionFk + OR (bufferFk = vBufferFromFk AND `position` > 0) + FOR UPDATE; + + UPDATE expedition + SET bufferFk = NULL, `position` = NULL, - stateFk = es.id - WHERE e.id = vExpeditionFk; + stateFk = (SELECT id FROM expeditionState WHERE `description` = 'OUT') + WHERE id = vExpeditionFk; - UPDATE srt.expedition e - SET e.`position` = e.`position` - 1 - WHERE e.bufferFk = vBufferFromFk - AND e.`position` > 0; + UPDATE expedition + SET `position` = `position` - 1 + WHERE bufferFk = vBufferFromFk + AND `position` > 0; - CALL vn.mail_insert( - 'pako@verdnatura.es, carles@verdnatura.es', - NULL, - CONCAT('Moving_clean. Expedition: ', vExpeditionFk, ' estaba parada'), - CONCAT('Expedition: ', vExpeditionFk,' vBufferToFk: ', vBufferToFk) - ); - - END LOOP bucle; - - CLOSE cur; + COMMIT; + END LOOP l; + CLOSE vSorter; END$$ DELIMITER ; diff --git a/db/versions/11141-azureRoebelini/00-firstScript.sql b/db/versions/11141-azureRoebelini/00-firstScript.sql new file mode 100644 index 000000000..fd6d79cfb --- /dev/null +++ b/db/versions/11141-azureRoebelini/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE srt.moving DROP INDEX moving_fk1_idx; From 618baaf6040b40a45beabaf86a7aada1778b2a78 Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 11 Jul 2024 08:37:08 +0200 Subject: [PATCH 013/250] usa campo factura multipe --- db/routines/vn/procedures/invoiceOut_new.sql | 2 +- .../11142-aquaGerbera/00-invoiceOutSerialColumn.sql | 2 ++ .../11142-aquaGerbera/01-invoiceOutSerialUpdate.sql | 3 +++ .../back/methods/invoiceOut/clientsToInvoice.js | 2 +- .../invoiceOut/back/methods/invoiceOut/invoiceClient.js | 8 ++++++-- modules/invoiceOut/back/models/invoice-out-serial.json | 5 ++++- 6 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql create mode 100644 db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql diff --git a/db/routines/vn/procedures/invoiceOut_new.sql b/db/routines/vn/procedures/invoiceOut_new.sql index 42c3f99da..610e05cb4 100644 --- a/db/routines/vn/procedures/invoiceOut_new.sql +++ b/db/routines/vn/procedures/invoiceOut_new.sql @@ -97,7 +97,7 @@ BEGIN AND (vCorrectingSerial = vSerial OR NOT hasAnyNegativeBase()) THEN - -- el trigger añade el siguiente Id_Factura correspondiente a la vSerial + -- el trigger añade el siguiente ref correspondiente a la vSerial INSERT INTO invoiceOut( ref, serial, diff --git a/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql b/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql new file mode 100644 index 000000000..db476c4a5 --- /dev/null +++ b/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.invoiceOutSerial + MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL; diff --git a/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql b/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql new file mode 100644 index 000000000..581a6f5f3 --- /dev/null +++ b/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql @@ -0,0 +1,3 @@ +UPDATE vn.invoiceOutSerial + SET `type`='multiple' + WHERE `description` LIKE '%multiple%'; diff --git a/modules/invoiceOut/back/methods/invoiceOut/clientsToInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/clientsToInvoice.js index 63b00fe38..5526d214a 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/clientsToInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/clientsToInvoice.js @@ -75,7 +75,7 @@ module.exports = Self => { AND c.isTaxDataChecked AND c.isActive AND NOT t.isDeleted - GROUP BY c.id, IF(c.hasToInvoiceByAddress, a.id, TRUE) + GROUP BY IF(c.hasToInvoiceByAddress, a.id, c.id) HAVING SUM(t.totalWithVat) > 0;`; const addresses = await Self.rawSql(query, [ diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index 530b02353..ef8a26efc 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -28,6 +28,11 @@ module.exports = Self => { type: 'number', description: 'The company id to invoice', required: true + }, { + arg: 'serialType', + type: 'string', + description: 'Type of serial', + required: true } ], returns: { @@ -74,10 +79,9 @@ module.exports = Self => { ], options); } - const invoiceType = 'G'; const invoiceId = await models.Ticket.makeInvoice( ctx, - invoiceType, + serialType, args.companyFk, args.invoiceDate, null, diff --git a/modules/invoiceOut/back/models/invoice-out-serial.json b/modules/invoiceOut/back/models/invoice-out-serial.json index 912269fd7..30e1f1b39 100644 --- a/modules/invoiceOut/back/models/invoice-out-serial.json +++ b/modules/invoiceOut/back/models/invoice-out-serial.json @@ -20,6 +20,9 @@ }, "isCEE": { "type": "boolean" + }, + "type": { + "type": "string" } }, "relations": { @@ -35,4 +38,4 @@ "principalId": "$everyone", "permission": "ALLOW" }] -} \ No newline at end of file +} From 39b52e706aa7288ca9f0c8494e2146184184dfcc Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 11 Jul 2024 14:51:34 +0200 Subject: [PATCH 014/250] feat: refs #7615 setDeleted --- loopback/locale/en.json | 2 +- loopback/locale/es.json | 2 +- loopback/locale/fr.json | 2 +- .../ticket/back/methods/ticket/setDeleted.js | 21 ++++++++++++++----- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 382a2824c..8c4e338da 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -150,7 +150,7 @@ "Receipt's bank was not found": "Receipt's bank was not found", "This receipt was not compensated": "This receipt was not compensated", "Client's email was not found": "Client's email was not found", - "Tickets with associated refunds": "Tickets with associated refunds can't be deleted. This ticket is associated with refund Nº %d", + "Tickets with associated refunds": "Tickets with associated refunds can't be deleted. This ticket is associated with refund Nº %s", "It is not possible to modify tracked sales": "It is not possible to modify tracked sales", "It is not possible to modify sales that their articles are from Floramondo": "It is not possible to modify sales that their articles are from Floramondo", "It is not possible to modify cloned sales": "It is not possible to modify cloned sales", diff --git a/loopback/locale/es.json b/loopback/locale/es.json index e2be5d013..f0f0b1677 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -272,7 +272,7 @@ "Invoice date can't be less than max date": "La fecha de factura no puede ser inferior a la fecha límite", "Warehouse inventory not set": "El almacén inventario no está establecido", "This locker has already been assigned": "Esta taquilla ya ha sido asignada", - "Tickets with associated refunds": "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº %d", + "Tickets with associated refunds": "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº %s", "Not exist this branch": "La rama no existe", "This ticket cannot be signed because it has not been boxed": "Este ticket no puede firmarse porque no ha sido encajado", "Collection does not exist": "La colección no existe", diff --git a/loopback/locale/fr.json b/loopback/locale/fr.json index 49584ef0e..107e669f3 100644 --- a/loopback/locale/fr.json +++ b/loopback/locale/fr.json @@ -272,7 +272,7 @@ "Invoice date can't be less than max date": "La date de la facture ne peut pas être inférieure à la date limite", "Warehouse inventory not set": "L'inventaire de l'entrepôt n'est pas établi", "This locker has already been assigned": "Ce casier a déjà été assigné", - "Tickets with associated refunds": "Vous ne pouvez pas supprimer des tickets avec des remboursements associés. Ce ticket est associé au remboursement Nº %d", + "Tickets with associated refunds": "Vous ne pouvez pas supprimer des tickets avec des remboursements associés. Ce ticket est associé au remboursement Nº %s", "Not exist this branch": "La branche n'existe pas", "This ticket cannot be signed because it has not been boxed": "Ce ticket ne peut pas être signé car il n'a pas été emballé", "Collection does not exist": "La collection n'existe pas", diff --git a/modules/ticket/back/methods/ticket/setDeleted.js b/modules/ticket/back/methods/ticket/setDeleted.js index 2afdf44ac..125827c5e 100644 --- a/modules/ticket/back/methods/ticket/setDeleted.js +++ b/modules/ticket/back/methods/ticket/setDeleted.js @@ -43,11 +43,22 @@ module.exports = Self => { // Check if ticket has refunds const ticketRefunds = await models.TicketRefund.find({ - where: {originalTicketFk: id}, - fields: ['id']} - , myOptions); - if (ticketRefunds.length > 0) - throw new UserError('Tickets with associated refunds', 'TICKET_REFUND', ticketRefunds[0].id); + include: [ + {relation: 'refundTicket'} + ], + where: {originalTicketFk: id} + }, myOptions); + + const allDeleted = ticketRefunds.every(refund => refund.refundTicket().isDeleted); + + if (ticketRefunds?.length && !allDeleted) { + const notDeleted = []; + for (const refund of ticketRefunds) + if (!refund.refundTicket().isDeleted) notDeleted.push(refund.refundTicket().id); + + throw new UserError('Tickets with associated refunds', 'TICKET_REFUND', + notDeleted.join(', ')); + } // Check if has sales with shelving const canDeleteTicketWithPartPrepared = From 625b3a5608b03537bc1eec42bcfccfea857abd14 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 18 Jul 2024 14:12:37 +0200 Subject: [PATCH 015/250] refactor: refs #7567 Minor change --- db/routines/srt/procedures/moving_clean.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index 446ad3588..ab16aac99 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -7,6 +7,8 @@ BEGIN DECLARE vExpeditionFk INT; DECLARE vBufferToFk INT; DECLARE vBufferFromFk INT; + DECLARE vStateOutFk INT + DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT'); DECLARE vDone BOOL DEFAULT FALSE; DECLARE vSorter CURSOR FOR SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk @@ -52,10 +54,10 @@ BEGIN OR (bufferFk = vBufferFromFk AND `position` > 0) FOR UPDATE; - UPDATE expedition + UPDATE expedition SET bufferFk = NULL, `position` = NULL, - stateFk = (SELECT id FROM expeditionState WHERE `description` = 'OUT') + stateFk = vStateOutFk WHERE id = vExpeditionFk; UPDATE expedition @@ -64,7 +66,6 @@ BEGIN AND `position` > 0; COMMIT; - END LOOP l; CLOSE vSorter; END$$ From e61210fd17e52951a5f010d73bdb8b043129e2cb Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 19 Jul 2024 09:09:45 +0200 Subject: [PATCH 016/250] feat: #3199 Requested changes --- db/routines/vn/procedures/ticket_recalcByScope.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index c5df8f82d..1541b532e 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -19,7 +19,6 @@ BEGIN JOIN sale s ON s.ticketFk = t.id JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk WHERE t.refFk IS NULL - AND DATE(t.shipped) > util.VN_CURDATE() AND ( (vScope = 'client' AND t.clientFk = vId) OR (vScope = 'address' AND t.addressFk = vId) From 15e1f9763a8ce938f9b924f7a5c2d06590238bdc Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Jul 2024 12:58:34 +0200 Subject: [PATCH 017/250] BREACKING CHANGE: claim redirect to lilium --- e2e/helpers/selectors.js | 63 ---- e2e/paths/06-claim/01_basic_data.spec.js | 61 ---- e2e/paths/06-claim/03_claim_action.spec.js | 54 ---- e2e/paths/06-claim/04_summary.spec.js | 96 ------ e2e/paths/06-claim/05_descriptor.spec.js | 58 ---- e2e/paths/06-claim/06_note.spec.js | 46 --- e2e/tests.js | 1 - modules/claim/front/action/index.html | 188 ------------ modules/claim/front/action/index.js | 233 --------------- modules/claim/front/action/index.spec.js | 167 ----------- modules/claim/front/action/locale/en.yml | 1 - modules/claim/front/action/locale/es.yml | 13 - modules/claim/front/action/style.scss | 46 --- modules/claim/front/basic-data/index.html | 66 ----- modules/claim/front/basic-data/index.js | 20 -- modules/claim/front/basic-data/index.spec.js | 28 -- modules/claim/front/basic-data/locale/es.yml | 9 - modules/claim/front/basic-data/style.scss | 3 - modules/claim/front/card/index.html | 5 - modules/claim/front/card/index.js | 68 ----- modules/claim/front/card/index.spec.js | 29 -- modules/claim/front/descriptor/index.js | 4 +- modules/claim/front/detail/index.html | 178 ------------ modules/claim/front/detail/index.js | 203 ------------- modules/claim/front/detail/index.spec.js | 150 ---------- modules/claim/front/detail/locale/es.yml | 11 - modules/claim/front/detail/style.scss | 30 -- modules/claim/front/development/index.html | 2 - modules/claim/front/development/index.js | 21 -- modules/claim/front/index.js | 12 - modules/claim/front/index/index.html | 83 ------ modules/claim/front/index/index.js | 82 ------ modules/claim/front/log/index.html | 4 - modules/claim/front/log/index.js | 7 - modules/claim/front/main/index.html | 19 -- modules/claim/front/main/index.js | 13 +- modules/claim/front/note/create/index.html | 30 -- modules/claim/front/note/create/index.js | 22 -- modules/claim/front/note/index/index.html | 32 -- modules/claim/front/note/index/index.js | 25 -- modules/claim/front/note/index/style.scss | 5 - modules/claim/front/photos/index.html | 1 - modules/claim/front/photos/index.js | 21 -- modules/claim/front/search-panel/index.html | 84 ------ modules/claim/front/search-panel/index.js | 14 - .../claim/front/search-panel/locale/es.yml | 7 - modules/claim/front/summary/index.html | 273 ------------------ modules/claim/front/summary/index.js | 103 ------- modules/claim/front/summary/index.spec.js | 55 ---- modules/claim/front/summary/style.scss | 28 -- modules/item/front/diary/index.html | 2 +- modules/item/front/diary/index.js | 4 + modules/ticket/front/sale/index.html | 2 +- modules/ticket/front/sale/index.js | 6 +- modules/ticket/front/summary/index.html | 4 +- modules/ticket/front/summary/index.js | 4 + 56 files changed, 31 insertions(+), 2765 deletions(-) delete mode 100644 e2e/paths/06-claim/01_basic_data.spec.js delete mode 100644 e2e/paths/06-claim/03_claim_action.spec.js delete mode 100644 e2e/paths/06-claim/04_summary.spec.js delete mode 100644 e2e/paths/06-claim/05_descriptor.spec.js delete mode 100644 e2e/paths/06-claim/06_note.spec.js delete mode 100644 modules/claim/front/action/index.html delete mode 100644 modules/claim/front/action/index.js delete mode 100644 modules/claim/front/action/index.spec.js delete mode 100644 modules/claim/front/action/locale/en.yml delete mode 100644 modules/claim/front/action/locale/es.yml delete mode 100644 modules/claim/front/action/style.scss delete mode 100644 modules/claim/front/basic-data/index.html delete mode 100644 modules/claim/front/basic-data/index.js delete mode 100644 modules/claim/front/basic-data/index.spec.js delete mode 100644 modules/claim/front/basic-data/locale/es.yml delete mode 100644 modules/claim/front/basic-data/style.scss delete mode 100644 modules/claim/front/card/index.html delete mode 100644 modules/claim/front/card/index.js delete mode 100644 modules/claim/front/card/index.spec.js delete mode 100644 modules/claim/front/detail/index.html delete mode 100644 modules/claim/front/detail/index.js delete mode 100644 modules/claim/front/detail/index.spec.js delete mode 100644 modules/claim/front/detail/locale/es.yml delete mode 100644 modules/claim/front/detail/style.scss delete mode 100644 modules/claim/front/development/index.html delete mode 100644 modules/claim/front/development/index.js delete mode 100644 modules/claim/front/index/index.html delete mode 100644 modules/claim/front/index/index.js delete mode 100644 modules/claim/front/log/index.html delete mode 100644 modules/claim/front/log/index.js delete mode 100644 modules/claim/front/note/create/index.html delete mode 100644 modules/claim/front/note/create/index.js delete mode 100644 modules/claim/front/note/index/index.html delete mode 100644 modules/claim/front/note/index/index.js delete mode 100644 modules/claim/front/note/index/style.scss delete mode 100644 modules/claim/front/photos/index.html delete mode 100644 modules/claim/front/photos/index.js delete mode 100644 modules/claim/front/search-panel/index.html delete mode 100644 modules/claim/front/search-panel/index.js delete mode 100644 modules/claim/front/search-panel/locale/es.yml delete mode 100644 modules/claim/front/summary/index.html delete mode 100644 modules/claim/front/summary/index.js delete mode 100644 modules/claim/front/summary/index.spec.js delete mode 100644 modules/claim/front/summary/style.scss diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 685345273..097c6e1ab 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -738,69 +738,6 @@ export default { worker: 'vn-worker-autocomplete[ng-model="$ctrl.userFk"]', saveStateButton: `button[type=submit]` }, - claimsIndex: { - searchResult: 'vn-claim-index vn-card > vn-table > div > vn-tbody > a' - }, - claimDescriptor: { - moreMenu: 'vn-claim-descriptor vn-icon-button[icon=more_vert]', - moreMenuDeleteClaim: '.vn-menu [name="deleteClaim"]', - acceptDeleteClaim: '.vn-confirm.shown button[response="accept"]' - }, - claimSummary: { - header: 'vn-claim-summary > vn-card > h5', - state: 'vn-claim-summary vn-label-value[label="State"] > section > span', - observation: 'vn-claim-summary vn-horizontal.text', - firstSaleItemId: 'vn-claim-summary vn-horizontal > vn-auto:nth-child(5) vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(1) > span', - firstSaleDescriptorImage: '.vn-popover.shown vn-item-descriptor img', - itemDescriptorPopover: '.vn-popover.shown vn-item-descriptor', - itemDescriptorPopoverItemDiaryButton: '.vn-popover vn-item-descriptor vn-quick-link[icon="icon-transaction"] > a', - firstDevelopmentWorker: 'vn-claim-summary vn-horizontal > vn-auto:nth-child(4) vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(4) > span', - firstDevelopmentWorkerGoToClientButton: '.vn-popover vn-worker-descriptor vn-quick-link[icon="person"] > a', - firstActionTicketId: 'vn-claim-summary > vn-card > vn-horizontal > vn-auto:nth-child(5) vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > span', - firstActionTicketDescriptor: '.vn-popover.shown vn-ticket-descriptor' - }, - claimBasicData: { - claimState: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]', - packages: 'vn-input-number[ng-model="$ctrl.claim.packages"]', - saveButton: `button[type=submit]` - }, - claimDetail: { - secondItemDiscount: 'vn-claim-detail > vn-vertical > vn-card > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(6) > span', - discount: '.vn-popover.shown vn-input-number[ng-model="$ctrl.newDiscount"]', - discoutPopoverMana: '.vn-popover.shown .content > div > vn-horizontal > h5', - addItemButton: 'vn-claim-detail a vn-float-button', - firstClaimableSaleFromTicket: '.vn-dialog.shown vn-tbody > vn-tr', - claimDetailLine: 'vn-claim-detail > vn-vertical > vn-card > vn-vertical > vn-table > div > vn-tbody > vn-tr', - totalClaimed: 'vn-claim-detail > vn-vertical > vn-card > vn-vertical > vn-horizontal > div > vn-label-value:nth-child(2) > section > span', - secondItemDeleteButton: 'vn-claim-detail > vn-vertical > vn-card > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(8) > vn-icon-button > button > vn-icon > i' - }, - claimDevelopment: { - addDevelopmentButton: 'vn-claim-development > vn-vertical > vn-card > vn-vertical > vn-one > vn-icon-button > button > vn-icon', - firstDeleteDevelopmentButton: 'vn-claim-development > vn-vertical > vn-card > vn-vertical > form > vn-horizontal:nth-child(2) > vn-icon-button > button > vn-icon', - firstClaimReason: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimReasonFk"]', - firstClaimResult: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimResultFk"]', - firstClaimResponsible: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimResponsibleFk"]', - firstClaimWorker: 'vn-claim-development vn-horizontal:nth-child(1) vn-worker-autocomplete[ng-model="claimDevelopment.workerFk"]', - firstClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]', - secondClaimReason: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimReasonFk"]', - secondClaimResult: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimResultFk"]', - secondClaimResponsible: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimResponsibleFk"]', - secondClaimWorker: 'vn-claim-development vn-horizontal:nth-child(2) vn-worker-autocomplete[ng-model="claimDevelopment.workerFk"]', - secondClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]', - saveDevelopmentButton: 'button[type=submit]' - }, - claimNote: { - addNoteFloatButton: 'vn-float-button', - note: 'vn-textarea[ng-model="$ctrl.note.text"]', - saveButton: 'button[type=submit]', - firstNoteText: 'vn-claim-note .text' - }, - claimAction: { - importClaimButton: 'vn-claim-action vn-button[label="Import claim"]', - anyLine: 'vn-claim-action vn-tbody > vn-tr', - firstDeleteLine: 'vn-claim-action tr:nth-child(2) vn-icon-button[icon="delete"]', - isPaidWithManaCheckbox: 'vn-claim-action vn-check[ng-model="$ctrl.claim.isChargedToMana"]' - }, ordersIndex: { secondSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody .vn-tr:nth-child(2) vn-td:nth-child(9)', advancedSearchButton: 'vn-order-search-panel vn-submit[label="Search"]', diff --git a/e2e/paths/06-claim/01_basic_data.spec.js b/e2e/paths/06-claim/01_basic_data.spec.js deleted file mode 100644 index 33c68183f..000000000 --- a/e2e/paths/06-claim/01_basic_data.spec.js +++ /dev/null @@ -1,61 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Claim edit basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should log in as claimManager then reach basic data of the target claim`, async() => { - await page.loginAndModule('claimManager', 'claim'); - await page.accessToSearchResult('1'); - await page.accessToSection('claim.card.basicData'); - }); - - it(`should edit claim state and observation fields`, async() => { - await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Resuelto'); - await page.clearInput(selectors.claimBasicData.packages); - await page.write(selectors.claimBasicData.packages, '2'); - await page.waitToClick(selectors.claimBasicData.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should have been redirected to the next section of claims as the role is claimManager`, async() => { - await page.waitForState('claim.card.detail'); - }); - - it('should confirm the claim state was edited', async() => { - await page.reloadSection('claim.card.basicData'); - await page.waitForSelector(selectors.claimBasicData.claimState); - const result = await page.waitToGetProperty(selectors.claimBasicData.claimState, 'value'); - - expect(result).toEqual('Resuelto'); - }); - - it('should confirm the claim packages was edited', async() => { - const result = await page - .waitToGetProperty(selectors.claimBasicData.packages, 'value'); - - expect(result).toEqual('2'); - }); - - it(`should edit the claim to leave it untainted`, async() => { - await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Pendiente'); - await page.clearInput(selectors.claimBasicData.packages); - await page.write(selectors.claimBasicData.packages, '0'); - await page.waitToClick(selectors.claimBasicData.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/06-claim/03_claim_action.spec.js b/e2e/paths/06-claim/03_claim_action.spec.js deleted file mode 100644 index ac6f72e37..000000000 --- a/e2e/paths/06-claim/03_claim_action.spec.js +++ /dev/null @@ -1,54 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer.js'; - -describe('Claim action path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('claimManager', 'claim'); - await page.accessToSearchResult('2'); - await page.accessToSection('claim.card.action'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should import the claim', async() => { - await page.waitToClick(selectors.claimAction.importClaimButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should delete the first line', async() => { - await page.waitToClick(selectors.claimAction.firstDeleteLine); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should refresh the view to check not have lines', async() => { - await page.reloadSection('claim.card.action'); - const result = await page.countElement(selectors.claimAction.anyLine); - - expect(result).toEqual(0); - }); - - it('should check the "is paid with mana" checkbox', async() => { - await page.waitToClick(selectors.claimAction.isPaidWithManaCheckbox); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should confirm the "is paid with mana" is checked', async() => { - await page.reloadSection('claim.card.action'); - const isPaidWithManaCheckbox = await page.checkboxState(selectors.claimAction.isPaidWithManaCheckbox); - - expect(isPaidWithManaCheckbox).toBe('checked'); - }); -}); diff --git a/e2e/paths/06-claim/04_summary.spec.js b/e2e/paths/06-claim/04_summary.spec.js deleted file mode 100644 index dda8484a6..000000000 --- a/e2e/paths/06-claim/04_summary.spec.js +++ /dev/null @@ -1,96 +0,0 @@ - -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer.js'; - -describe('Claim summary path', () => { - let browser; - let page; - const claimId = '4'; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should navigate to the target claim summary section', async() => { - await page.loginAndModule('salesPerson', 'claim'); - await page.accessToSearchResult(claimId); - await page.waitForState('claim.card.summary'); - }); - - it(`should display details from the claim and it's client on the top of the header`, async() => { - await page.waitForTextInElement(selectors.claimSummary.header, 'Tony Stark'); - const result = await page.waitToGetProperty(selectors.claimSummary.header, 'innerText'); - - expect(result).toContain('4 -'); - expect(result).toContain('Tony Stark'); - }); - - it('should display the claim state', async() => { - const result = await page.waitToGetProperty(selectors.claimSummary.state, 'innerText'); - - expect(result).toContain('Resuelto'); - }); - - it('should display the observation', async() => { - const result = await page.waitToGetProperty(selectors.claimSummary.observation, 'innerText'); - - expect(result).toContain('Wisi forensibus mnesarchum in cum. Per id impetus abhorreant'); - }); - - it('should display the claimed line(s)', async() => { - const result = await page.waitToGetProperty(selectors.claimSummary.firstSaleItemId, 'innerText'); - - expect(result).toContain('2'); - }); - - it(`should click on the first sale ID making the item descriptor visible`, async() => { - const firstItem = selectors.claimSummary.firstSaleItemId; - await page.evaluate(selectors => { - document.querySelector(selectors).scrollIntoView(); - }, firstItem); - await page.click(firstItem); - await page.waitImgLoad(selectors.claimSummary.firstSaleDescriptorImage); - const visible = await page.isVisible(selectors.claimSummary.itemDescriptorPopover); - - expect(visible).toBeTruthy(); - }); - - it(`should check the url for the item diary link of the descriptor is for the right item id`, async() => { - await page.waitForSelector(selectors.claimSummary.itemDescriptorPopoverItemDiaryButton, {visible: true}); - - await page.closePopup(); - }); - - it('should display the claim development details', async() => { - const result = await page.waitToGetProperty(selectors.claimSummary.firstDevelopmentWorker, 'innerText'); - - expect(result).toContain('salesAssistantNick'); - }); - - it(`should click on the first development worker making the worker descriptor visible`, async() => { - await page.waitToClick(selectors.claimSummary.firstDevelopmentWorker); - - const visible = await page.isVisible(selectors.claimSummary.firstDevelopmentWorkerGoToClientButton); - - expect(visible).toBeTruthy(); - }); - - it(`should check the url for the go to clientlink of the descriptor is for the right client id`, async() => { - await page.waitForSelector(selectors.claimSummary.firstDevelopmentWorkerGoToClientButton, {visible: true}); - - await page.closePopup(); - }); - - it(`should click on the first action ticket ID making the ticket descriptor visible`, async() => { - await page.waitToClick(selectors.claimSummary.firstActionTicketId); - await page.waitForSelector(selectors.claimSummary.firstActionTicketDescriptor); - const visible = await page.isVisible(selectors.claimSummary.firstActionTicketDescriptor); - - expect(visible).toBeTruthy(); - }); -}); diff --git a/e2e/paths/06-claim/05_descriptor.spec.js b/e2e/paths/06-claim/05_descriptor.spec.js deleted file mode 100644 index 49912b26a..000000000 --- a/e2e/paths/06-claim/05_descriptor.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer.js'; - -describe('Claim descriptor path', () => { - let browser; - let page; - const claimId = '1'; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should now navigate to the target claim summary section', async() => { - await page.loginAndModule('salesPerson', 'claim'); - await page.accessToSearchResult(claimId); - await page.waitForState('claim.card.summary'); - }); - - it(`should not be able to see the delete claim button of the descriptor more menu`, async() => { - await page.waitToClick(selectors.claimDescriptor.moreMenu); - await page.waitForSelector(selectors.claimDescriptor.moreMenuDeleteClaim, {hidden: true}); - }); - - it(`should log in as claimManager and navigate to the target claim`, async() => { - await page.loginAndModule('claimManager', 'claim'); - await page.accessToSearchResult(claimId); - await page.waitForState('claim.card.summary'); - }); - - it(`should be able to see the delete claim button of the descriptor more menu`, async() => { - await page.waitToClick(selectors.claimDescriptor.moreMenu); - await page.waitForSelector(selectors.claimDescriptor.moreMenuDeleteClaim, {visible: true}); - }); - - it(`should delete the claim`, async() => { - await page.waitToClick(selectors.claimDescriptor.moreMenuDeleteClaim); - await page.waitToClick(selectors.claimDescriptor.acceptDeleteClaim); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Claim deleted!'); - }); - - it(`should have been relocated to the claim index`, async() => { - await page.waitForState('claim.index'); - }); - - it(`should search for the deleted claim to find no results`, async() => { - await page.doSearch(claimId); - const nResults = await page.countElement(selectors.claimsIndex.searchResult); - - expect(nResults).toEqual(0); - }); -}); diff --git a/e2e/paths/06-claim/06_note.spec.js b/e2e/paths/06-claim/06_note.spec.js deleted file mode 100644 index 830f77cbe..000000000 --- a/e2e/paths/06-claim/06_note.spec.js +++ /dev/null @@ -1,46 +0,0 @@ -import selectors from '../../helpers/selectors'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Claim Add note path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('salesPerson', 'claim'); - await page.accessToSearchResult('2'); - await page.accessToSection('claim.card.note.index'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should reach the claim note index`, async() => { - await page.waitForState('claim.card.note.index'); - }); - - it(`should click on the add new note button`, async() => { - await page.waitToClick(selectors.claimNote.addNoteFloatButton); - await page.waitForState('claim.card.note.create'); - }); - - it(`should create a new note`, async() => { - await page.waitForSelector(selectors.claimNote.note); - await page.type(`${selectors.claimNote.note} textarea`, 'The delivery was unsuccessful'); - await page.waitToClick(selectors.claimNote.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should redirect back to the claim notes page`, async() => { - await page.waitForState('claim.card.note.index'); - }); - - it('should confirm the note was created', async() => { - const result = await page.waitToGetProperty(selectors.claimNote.firstNoteText, 'innerText'); - - expect(result).toEqual('The delivery was unsuccessful'); - }); -}); diff --git a/e2e/tests.js b/e2e/tests.js index 829056f4c..a9c662dc4 100644 --- a/e2e/tests.js +++ b/e2e/tests.js @@ -41,7 +41,6 @@ async function test() { `./e2e/paths/03*/*[sS]pec.js`, `./e2e/paths/04*/*[sS]pec.js`, `./e2e/paths/05*/*[sS]pec.js`, - `./e2e/paths/06*/*[sS]pec.js`, `./e2e/paths/07*/*[sS]pec.js`, `./e2e/paths/08*/*[sS]pec.js`, `./e2e/paths/09*/*[sS]pec.js`, diff --git a/modules/claim/front/action/index.html b/modules/claim/front/action/index.html deleted file mode 100644 index 9da51b8de..000000000 --- a/modules/claim/front/action/index.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - -
- - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - IdTicket - Destination - - Landed - - Quantity - - Description - - Price - - Disc. - Total
- - - - - {{::saleClaimed.itemFk}} - - - - {{::saleClaimed.ticketFk}} - - - - - {{::saleClaimed.landed | date: 'dd/MM/yyyy'}}{{::saleClaimed.quantity}}{{::saleClaimed.concept}}{{::saleClaimed.price | currency: 'EUR':2}}{{::saleClaimed.discount}} %{{saleClaimed.total | currency: 'EUR':2}} - - -
-
-
- - - - -
- - - - - - - - - - -
-
{{$ctrl.$t('Change destination to all selected rows', {total: $ctrl.checked.length})}}
- - - - -
-
- - - - -
diff --git a/modules/claim/front/action/index.js b/modules/claim/front/action/index.js deleted file mode 100644 index 10b629f27..000000000 --- a/modules/claim/front/action/index.js +++ /dev/null @@ -1,233 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.newDestination; - this.filter = { - include: [ - {relation: 'sale', - scope: { - fields: ['concept', 'ticketFk', 'price', 'quantity', 'discount', 'itemFk'], - include: { - relation: 'ticket' - } - } - }, - {relation: 'claimBeggining'}, - {relation: 'claimDestination'} - ] - }; - this.getResolvedState(); - this.maxResponsibility = 5; - this.smartTableOptions = { - activeButtons: { - search: true - }, - columns: [ - { - field: 'claimDestinationFk', - autocomplete: { - url: 'ClaimDestinations', - showField: 'description', - valueField: 'id' - } - }, - { - field: 'landed', - searchable: false - } - ] - }; - } - - exprBuilder(param, value) { - switch (param) { - case 'itemFk': - case 'ticketFk': - case 'claimDestinationFk': - case 'quantity': - case 'price': - case 'discount': - case 'total': - return {[param]: value}; - case 'concept': - return {[param]: {like: `%${value}%`}}; - case 'landed': - return {[param]: {between: this.dateRange(value)}}; - } - } - - dateRange(value) { - const minHour = new Date(value); - minHour.setHours(0, 0, 0, 0); - const maxHour = new Date(value); - maxHour.setHours(23, 59, 59, 59); - - return [minHour, maxHour]; - } - - get checked() { - const salesClaimed = this.$.model.data || []; - - const checkedSalesClaimed = []; - for (let saleClaimed of salesClaimed) { - if (saleClaimed.$checked) - checkedSalesClaimed.push(saleClaimed); - } - - return checkedSalesClaimed; - } - - updateDestination(saleClaimed, claimDestinationFk) { - const data = {rows: [saleClaimed], claimDestinationFk: claimDestinationFk}; - this.$http.post(`Claims/updateClaimDestination`, data).then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - }).catch(e => { - this.$.model.refresh(); - throw e; - }); - } - - removeSales(saleClaimed) { - const params = {sales: [saleClaimed]}; - this.$http.post(`ClaimEnds/deleteClamedSales`, params).then(() => { - this.$.model.refresh(); - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } - - getResolvedState() { - const query = `ClaimStates/findOne`; - const params = { - filter: { - where: { - code: 'resolved' - } - } - }; - this.$http.get(query, params).then(res => - this.resolvedStateId = res.data.id - ); - } - - importToNewRefundTicket() { - let query = `ClaimBeginnings/${this.$params.id}/importToNewRefundTicket`; - return this.$http.post(query).then(() => { - this.$.model.refresh(); - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } - - focusLastInput() { - let inputs = document.querySelectorAll('#claimDestinationFk'); - inputs[inputs.length - 1].querySelector('input').focus(); - this.calculateTotals(); - } - - calculateTotals() { - this.claimedTotal = 0; - this.salesClaimed.forEach(sale => { - const price = sale.quantity * sale.price; - const discount = (sale.discount * (sale.quantity * sale.price)) / 100; - this.claimedTotal += price - discount; - }); - } - - regularize() { - const query = `Claims/${this.$params.id}/regularizeClaim`; - return this.$http.post(query).then(() => { - if (this.claim.responsibility >= Math.ceil(this.maxResponsibility) / 2) - this.$.updateGreuge.show(); - else - this.vnApp.showSuccess(this.$t('Data saved!')); - - this.card.reload(); - }); - } - - getGreugeTypeId() { - const params = {filter: {where: {code: 'freightPickUp'}}}; - const query = `GreugeTypes/findOne`; - return this.$http.get(query, {params}).then(res => { - this.greugeTypeFreightId = res.data.id; - - return res; - }); - } - - getGreugeConfig() { - const query = `GreugeConfigs/findOne`; - return this.$http.get(query).then(res => { - this.freightPickUpPrice = res.data.freightPickUpPrice; - - return res; - }); - } - - onUpdateGreugeAccept() { - const promises = []; - promises.push(this.getGreugeTypeId()); - promises.push(this.getGreugeConfig()); - - return Promise.all(promises).then(() => { - return this.updateGreuge({ - clientFk: this.claim.clientFk, - description: this.$t('ClaimGreugeDescription', { - claimId: this.claim.id - }).toUpperCase(), - amount: this.freightPickUpPrice, - greugeTypeFk: this.greugeTypeFreightId, - ticketFk: this.claim.ticketFk - }); - }); - } - - updateGreuge(data) { - return this.$http.post(`Greuges`, data).then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.vnApp.showMessage(this.$t('Greuge added')); - }); - } - - save(data) { - const query = `Claims/${this.$params.id}/updateClaimAction`; - this.$http.patch(query, data) - .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); - } - - onSave() { - this.vnApp.showSuccess(this.$t('Data saved!')); - } - - onResponse() { - const rowsToEdit = []; - for (let row of this.checked) - rowsToEdit.push({id: row.id}); - - const data = { - rows: rowsToEdit, - claimDestinationFk: this.newDestination - }; - - const query = `Claims/updateClaimDestination`; - this.$http.post(query, data) - .then(() => { - this.$.model.refresh(); - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } -} - -ngModule.vnComponent('vnClaimAction', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<' - }, - require: { - card: '^vnClaimCard' - } -}); diff --git a/modules/claim/front/action/index.spec.js b/modules/claim/front/action/index.spec.js deleted file mode 100644 index e773511bf..000000000 --- a/modules/claim/front/action/index.spec.js +++ /dev/null @@ -1,167 +0,0 @@ -import './index.js'; -import crudModel from 'core/mocks/crud-model'; - -describe('claim', () => { - describe('Component vnClaimAction', () => { - let controller; - let $httpBackend; - let $state; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, _$state_, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $state = _$state_; - $state.params.id = 1; - - controller = $componentController('vnClaimAction', {$element: null}); - controller.claim = {ticketFk: 1}; - controller.$.model = {refresh: () => {}}; - controller.$.addSales = { - hide: () => {}, - show: () => {} - }; - controller.$.lastTicketsModel = crudModel; - controller.$.lastTicketsPopover = { - hide: () => {}, - show: () => {} - }; - controller.card = {reload: () => {}}; - $httpBackend.expectGET(`ClaimStates/findOne`).respond({}); - })); - - describe('getResolvedState()', () => { - it('should return the resolved state id', () => { - $httpBackend.expectGET(`ClaimStates/findOne`).respond({id: 1}); - controller.getResolvedState(); - $httpBackend.flush(); - - expect(controller.resolvedStateId).toEqual(1); - }); - }); - - describe('calculateTotals()', () => { - it('should calculate the total price of the items claimed', () => { - controller.salesClaimed = [ - {quantity: 5, price: 2, discount: 0}, - {quantity: 10, price: 2, discount: 0}, - {quantity: 10, price: 2, discount: 0} - ]; - controller.calculateTotals(); - - expect(controller.claimedTotal).toEqual(50); - }); - }); - - describe('importToNewRefundTicket()', () => { - it('should perform a post query and add lines from a new ticket', () => { - jest.spyOn(controller.$.model, 'refresh'); - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.expect('POST', `ClaimBeginnings/1/importToNewRefundTicket`).respond({}); - controller.importToNewRefundTicket(); - $httpBackend.flush(); - - expect(controller.$.model.refresh).toHaveBeenCalled(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('regularize()', () => { - it('should perform a post query and reload the claim card', () => { - jest.spyOn(controller.card, 'reload'); - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.expect('POST', `Claims/1/regularizeClaim`).respond({}); - controller.regularize(); - $httpBackend.flush(); - - expect(controller.card.reload).toHaveBeenCalledWith(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('save()', () => { - it('should perform a patch query and show a success message', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - const data = {pickup: 'agency'}; - $httpBackend.expect('PATCH', `Claims/1/updateClaimAction`, data).respond({}); - controller.save(data); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('onUpdateGreugeAccept()', () => { - const greugeTypeId = 7; - const freightPickUpPrice = 11; - - it('should make a query and get the greugeTypeId and greuge config', () => { - $httpBackend.expectRoute('GET', `GreugeTypes/findOne`).respond({id: greugeTypeId}); - $httpBackend.expectGET(`GreugeConfigs/findOne`).respond({freightPickUpPrice}); - controller.onUpdateGreugeAccept(); - $httpBackend.flush(); - - expect(controller.greugeTypeFreightId).toEqual(greugeTypeId); - expect(controller.freightPickUpPrice).toEqual(freightPickUpPrice); - }); - - it('should perform a insert into greuges', done => { - jest.spyOn(controller, 'getGreugeTypeId').mockReturnValue(new Promise(resolve => { - return resolve({id: greugeTypeId}); - })); - jest.spyOn(controller, 'getGreugeConfig').mockReturnValue(new Promise(resolve => { - return resolve({freightPickUpPrice}); - })); - jest.spyOn(controller, 'updateGreuge').mockReturnValue(new Promise(resolve => { - return resolve(true); - })); - - controller.claim.clientFk = 1101; - controller.claim.id = 11; - - controller.onUpdateGreugeAccept().then(() => { - expect(controller.updateGreuge).toHaveBeenCalledWith(jasmine.any(Object)); - done(); - }).catch(done.fail); - }); - }); - - describe('updateGreuge()', () => { - it('should make a query and then call to showSuccess() and showMessage() methods', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller.vnApp, 'showMessage'); - - const freightPickUpPrice = 11; - const greugeTypeId = 7; - const expectedData = { - clientFk: 1101, - description: `claim: ${controller.claim.id}`, - amount: freightPickUpPrice, - greugeTypeFk: greugeTypeId, - ticketFk: controller.claim.ticketFk - }; - $httpBackend.expect('POST', `Greuges`, expectedData).respond(200); - controller.updateGreuge(expectedData); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!'); - expect(controller.vnApp.showMessage).toHaveBeenCalledWith('Greuge added'); - }); - }); - - describe('onResponse()', () => { - it('should perform a post query and show a success message', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.expect('POST', `Claims/updateClaimDestination`).respond({}); - controller.onResponse(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/modules/claim/front/action/locale/en.yml b/modules/claim/front/action/locale/en.yml deleted file mode 100644 index faab67c06..000000000 --- a/modules/claim/front/action/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -ClaimGreugeDescription: Claim id {{claimId}} \ No newline at end of file diff --git a/modules/claim/front/action/locale/es.yml b/modules/claim/front/action/locale/es.yml deleted file mode 100644 index 97640d9dc..000000000 --- a/modules/claim/front/action/locale/es.yml +++ /dev/null @@ -1,13 +0,0 @@ -Destination: Destino -Action: Actuaciones -Total claimed: Total Reclamado -Import claim: Importar reclamacion -Imports claim details: Importa detalles de la reclamacion -Regularize: Regularizar -Do you want to insert greuges?: Desea insertar greuges? -Insert greuges on client card: Insertar greuges en la ficha del cliente -Greuge added: Greuge añadido -ClaimGreugeDescription: Reclamación id {{claimId}} -Change destination: Cambiar destino -Change destination to all selected rows: Cambiar destino a {{total}} fila(s) seleccionada(s) -Add observation to all selected clients: Añadir observación a {{total}} cliente(s) seleccionado(s) diff --git a/modules/claim/front/action/style.scss b/modules/claim/front/action/style.scss deleted file mode 100644 index cda6779c8..000000000 --- a/modules/claim/front/action/style.scss +++ /dev/null @@ -1,46 +0,0 @@ -vn-claim-action { - .header { - display: flex; - justify-content: space-between; - align-items: center; - align-content: center; - - vn-tool-bar { - flex: none - } - - .vn-check { - flex: none; - } - } - - vn-dialog[vn-id=addSales] { - tpl-body { - width: 950px; - div { - div.buttons { - display: none; - } - vn-table{ - min-width: 950px; - } - } - } - } - - vn-popover.lastTicketsPopover { - vn-table { - min-width: 650px; - overflow: auto - } - - div.ticketList { - overflow: auto; - max-height: 350px; - } - } - - .right { - margin-left: 370px; - } -} \ No newline at end of file diff --git a/modules/claim/front/basic-data/index.html b/modules/claim/front/basic-data/index.html deleted file mode 100644 index 45bc1823d..000000000 --- a/modules/claim/front/basic-data/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/claim/front/basic-data/index.js b/modules/claim/front/basic-data/index.js deleted file mode 100644 index 818012bb9..000000000 --- a/modules/claim/front/basic-data/index.js +++ /dev/null @@ -1,20 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - onSubmit() { - this.$.watcher.submit().then(() => { - if (this.aclService.hasAny(['claimManager'])) - this.$state.go('claim.card.detail'); - }); - } -} - -ngModule.vnComponent('vnClaimBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<' - } -}); diff --git a/modules/claim/front/basic-data/index.spec.js b/modules/claim/front/basic-data/index.spec.js deleted file mode 100644 index 638f88418..000000000 --- a/modules/claim/front/basic-data/index.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import './index.js'; -import watcher from 'core/mocks/watcher'; - -describe('Claim', () => { - describe('Component vnClaimBasicData', () => { - let controller; - let $scope; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, $rootScope) => { - $scope = $rootScope.$new(); - $scope.watcher = watcher; - const $element = angular.element(''); - controller = $componentController('vnClaimBasicData', {$element, $scope}); - })); - - describe('onSubmit()', () => { - it(`should redirect to 'claim.card.detail' state`, () => { - jest.spyOn(controller.aclService, 'hasAny').mockReturnValue(true); - jest.spyOn(controller.$state, 'go'); - controller.onSubmit(); - - expect(controller.$state.go).toHaveBeenCalledWith('claim.card.detail'); - }); - }); - }); -}); diff --git a/modules/claim/front/basic-data/locale/es.yml b/modules/claim/front/basic-data/locale/es.yml deleted file mode 100644 index 5250d266c..000000000 --- a/modules/claim/front/basic-data/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Contact: Contacto -Claim state: Estado de la reclamación -Is paid with mana: Cargado al maná -Responsability: Responsabilidad -Company: Empresa -Sales/Client: Comercial/Cliente -Pick up: Recoger -When checked will notify to the salesPerson: Cuando se marque enviará una notificación de recogida al comercial -Packages received: Bultos recibidos diff --git a/modules/claim/front/basic-data/style.scss b/modules/claim/front/basic-data/style.scss deleted file mode 100644 index e80361ca8..000000000 --- a/modules/claim/front/basic-data/style.scss +++ /dev/null @@ -1,3 +0,0 @@ -vn-claim-basic-data vn-date-picker { - padding-left: 80px; -} diff --git a/modules/claim/front/card/index.html b/modules/claim/front/card/index.html deleted file mode 100644 index 1db6b38db..000000000 --- a/modules/claim/front/card/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/claim/front/card/index.js b/modules/claim/front/card/index.js deleted file mode 100644 index 5dad0dfc2..000000000 --- a/modules/claim/front/card/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import ngModule from '../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - let filter = { - include: [ - { - relation: 'worker', - scope: { - fields: ['id'], - include: { - relation: 'user', - scope: { - fields: ['name'] - } - } - } - }, { - relation: 'ticket', - scope: { - fields: ['zoneFk', 'addressFk'], - include: [ - { - relation: 'zone', - scope: { - fields: ['name'] - } - }, - { - relation: 'address', - scope: { - fields: ['provinceFk'], - include: { - relation: 'province', - scope: { - fields: ['name'] - } - } - } - }] - } - }, { - relation: 'claimState', - scope: { - fields: ['id', 'description'] - } - }, { - relation: 'client', - scope: { - fields: ['salesPersonFk', 'name', 'email'], - include: { - relation: 'salesPersonUser' - } - } - } - ] - }; - - this.$http.get(`Claims/${this.$params.id}`, {filter}) - .then(res => this.claim = res.data); - } -} - -ngModule.vnComponent('vnClaimCard', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/claim/front/card/index.spec.js b/modules/claim/front/card/index.spec.js deleted file mode 100644 index aa796c1e3..000000000 --- a/modules/claim/front/card/index.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import './index.js'; - -describe('Claim', () => { - describe('Component vnClaimCard', () => { - let controller; - let $httpBackend; - let data = {id: 1, name: 'fooName'}; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => { - $httpBackend = _$httpBackend_; - - let $element = angular.element('
'); - controller = $componentController('vnClaimCard', {$element}); - - $stateParams.id = data.id; - $httpBackend.whenRoute('GET', 'Claims/:id').respond(data); - })); - - it('should request data and set it on the controller', () => { - controller.reload(); - $httpBackend.flush(); - - expect(controller.claim).toEqual(data); - }); - }); -}); - diff --git a/modules/claim/front/descriptor/index.js b/modules/claim/front/descriptor/index.js index 5e9ea5140..337233059 100644 --- a/modules/claim/front/descriptor/index.js +++ b/modules/claim/front/descriptor/index.js @@ -29,9 +29,9 @@ class Controller extends Descriptor { deleteClaim() { return this.$http.delete(`Claims/${this.claim.id}`) - .then(() => { + .then(async() => { this.vnApp.showSuccess(this.$t('Claim deleted!')); - this.$state.go('claim.index'); + window.location.href = await this.vnApp.getUrl(`claim/`); }); } } diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html deleted file mode 100644 index a2a08a5db..000000000 --- a/modules/claim/front/detail/index.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - Landed - Quantity - Claimed - Description - Price - Disc. - Total - - - - - - {{::saleClaimed.sale.ticket.landed | date:'dd/MM/yyyy'}} - {{::saleClaimed.sale.quantity}} - - - - - - - {{::saleClaimed.sale.concept}} - - - {{::saleClaimed.sale.price | currency: 'EUR':2}} - - - {{saleClaimed.sale.discount}} % - - - - {{$ctrl.getSaleTotal(saleClaimed.sale) | currency: 'EUR':2}} - - - - - - - - - - - - - - - - - - Claimable sales from ticket {{$ctrl.claim.ticketFk}} - - - - - - - Landed - Quantity - Description - Price - Disc. - Total - - - - - {{sale.landed | date: 'dd/MM/yyyy'}} - {{sale.quantity}} - - - {{sale.itemFk}} - {{sale.concept}} - - - {{sale.price | currency: 'EUR':2}} - {{sale.discount}} % - - {{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency: 'EUR':2}} - - - - - - - - - - -
- - -
- -
MANÁ: {{$ctrl.mana | currency: 'EUR':0}}
-
-
- - -
-

Total claimed price

-

{{$ctrl.newPrice | currency: 'EUR':2}} -

-
-
-
-
-
- - \ No newline at end of file diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js deleted file mode 100644 index 56f39e074..000000000 --- a/modules/claim/front/detail/index.js +++ /dev/null @@ -1,203 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - this.edit = {}; - this.filter = { - where: {claimFk: this.$params.id}, - include: [ - { - relation: 'sale', - scope: { - fields: ['concept', 'ticketFk', 'price', 'quantity', 'discount', 'itemFk'], - include: { - relation: 'ticket' - } - } - } - ] - }; - } - - get claim() { - return this._claim; - } - - set claim(value) { - this._claim = value; - - if (value) { - this.isClaimEditable(); - this.isTicketEditable(); - } - } - - set salesClaimed(value) { - this._salesClaimed = value; - - if (value) this.calculateTotals(); - } - - get salesClaimed() { - return this._salesClaimed; - } - - get newDiscount() { - return this._newDiscount; - } - - set newDiscount(value) { - this._newDiscount = value; - this.updateNewPrice(); - } - - get isClaimManager() { - return this.aclService.hasAny(['claimManager']); - } - - openAddSalesDialog() { - this.getClaimableFromTicket(); - this.$.addSales.show(); - } - - getClaimableFromTicket() { - let config = {params: {ticketFk: this.claim.ticketFk}}; - let query = `Sales/getClaimableFromTicket`; - this.$http.get(query, config).then(res => { - if (res.data) - this.salesToClaim = res.data; - }); - } - - addClaimedSale(index) { - let sale = this.salesToClaim[index]; - let saleToAdd = {saleFk: sale.saleFk, claimFk: this.claim.id, quantity: sale.quantity}; - let query = `ClaimBeginnings/`; - this.$http.post(query, saleToAdd).then(() => { - this.$.addSales.hide(); - this.$.model.refresh(); - this.vnApp.showSuccess(this.$t('Data saved!')); - - if (this.aclService.hasAny(['claimManager'])) - this.$state.go('claim.card.development'); - }); - } - - showDeleteConfirm($index) { - this.claimedIndex = $index; - this.$.confirm.show(); - } - - deleteClaimedSale() { - this.$.model.remove(this.claimedIndex); - this.$.model.save().then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.calculateTotals(); - }); - } - - setClaimedQuantity(id, claimedQuantity) { - let params = {quantity: claimedQuantity}; - let query = `ClaimBeginnings/${id}`; - this.$http.patch(query, params).then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.calculateTotals(); - }); - } - - calculateTotals() { - this.paidTotal = 0.0; - this.claimedTotal = 0.0; - if (!this._salesClaimed) return; - - this._salesClaimed.forEach(sale => { - let orgSale = sale.sale; - this.paidTotal += this.getSaleTotal(orgSale); - - const price = sale.quantity * orgSale.price; - const discount = ((orgSale.discount * price) / 100); - - this.claimedTotal += price - discount; - }); - } - - getSaleTotal(sale) { - let total = 0.0; - - const price = sale.quantity * sale.price; - const discount = ((sale.discount * price) / 100); - - total += price - discount; - return total; - } - - getSalespersonMana() { - this.$http.get(`Tickets/${this.claim.ticketFk}/getSalesPersonMana`).then(res => { - this.mana = res.data; - }); - } - - isTicketEditable() { - if (!this.claim) return; - - this.$http.get(`Tickets/${this.claim.ticketFk}/isEditable`).then(res => { - this.isEditable = res.data; - }); - } - - isClaimEditable() { - if (!this.claim) return; - - this.$http.get(`ClaimStates/${this.claim.claimStateFk}/isEditable`).then(res => { - this.isRewritable = res.data; - }); - } - - showEditPopover(event, saleClaimed) { - if (this.aclService.hasAny(['claimManager'])) { - this.saleClaimed = saleClaimed; - this.$.editPopover.parent = event.target; - this.$.editPopover.show(); - } - } - - updateDiscount() { - const claimedSale = this.saleClaimed.sale; - if (this.newDiscount != claimedSale.discount) { - const params = {salesIds: [claimedSale.id], newDiscount: this.newDiscount}; - const query = `Tickets/${claimedSale.ticketFk}/updateDiscount`; - - this.$http.post(query, params).then(() => { - claimedSale.discount = this.newDiscount; - this.calculateTotals(); - this.clearDiscount(); - - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } - - this.$.editPopover.hide(); - } - - updateNewPrice() { - this.newPrice = (this.saleClaimed.quantity * this.saleClaimed.sale.price) - - ((this.newDiscount * (this.saleClaimed.quantity * this.saleClaimed.sale.price)) / 100); - } - - clearDiscount() { - this.newDiscount = null; - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnClaimDetail', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<' - } -}); diff --git a/modules/claim/front/detail/index.spec.js b/modules/claim/front/detail/index.spec.js deleted file mode 100644 index 1ef779fd7..000000000 --- a/modules/claim/front/detail/index.spec.js +++ /dev/null @@ -1,150 +0,0 @@ -import './index.js'; -import crudModel from 'core/mocks/crud-model'; - -describe('claim', () => { - describe('Component vnClaimDetail', () => { - let $scope; - let controller; - let $httpBackend; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => { - $scope = $rootScope.$new(); - $scope.descriptor = { - show: () => {} - }; - $httpBackend = _$httpBackend_; - $httpBackend.whenGET('Claims/ClaimBeginnings').respond({}); - $httpBackend.whenGET(`Tickets/1/isEditable`).respond(true); - $httpBackend.whenGET(`ClaimStates/2/isEditable`).respond(true); - const $element = angular.element(''); - controller = $componentController('vnClaimDetail', {$element, $scope}); - controller.claim = { - ticketFk: 1, - id: 2, - claimStateFk: 2} - ; - controller.salesToClaim = [{saleFk: 1}, {saleFk: 2}]; - controller.salesClaimed = [{id: 1, sale: {}}]; - controller.$.model = crudModel; - controller.$.addSales = { - hide: () => {}, - show: () => {} - }; - controller.$.editPopover = { - hide: () => {} - }; - jest.spyOn(controller.aclService, 'hasAny').mockReturnValue(true); - })); - - describe('openAddSalesDialog()', () => { - it('should call getClaimableFromTicket and $.addSales.show', () => { - jest.spyOn(controller, 'getClaimableFromTicket'); - jest.spyOn(controller.$.addSales, 'show'); - controller.openAddSalesDialog(); - - expect(controller.getClaimableFromTicket).toHaveBeenCalledWith(); - expect(controller.$.addSales.show).toHaveBeenCalledWith(); - }); - }); - - describe('getClaimableFromTicket()', () => { - it('should make a query and set salesToClaim', () => { - $httpBackend.expectGET(`Sales/getClaimableFromTicket?ticketFk=1`).respond(200, 1); - controller.getClaimableFromTicket(); - $httpBackend.flush(); - - expect(controller.salesToClaim).toEqual(1); - }); - }); - - describe('addClaimedSale(index)', () => { - it('should make a post and call refresh, hide and showSuccess', () => { - jest.spyOn(controller.$.addSales, 'hide'); - jest.spyOn(controller.$state, 'go'); - $httpBackend.expectPOST(`ClaimBeginnings/`).respond({}); - controller.addClaimedSale(1); - $httpBackend.flush(); - - expect(controller.$.addSales.hide).toHaveBeenCalledWith(); - expect(controller.$state.go).toHaveBeenCalledWith('claim.card.development'); - }); - }); - - describe('deleteClaimedSale()', () => { - it('should make a delete and call refresh and showSuccess', () => { - const claimedIndex = 1; - controller.claimedIndex = claimedIndex; - jest.spyOn(controller.$.model, 'remove'); - jest.spyOn(controller.$.model, 'save'); - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.deleteClaimedSale(); - - expect(controller.$.model.remove).toHaveBeenCalledWith(claimedIndex); - expect(controller.$.model.save).toHaveBeenCalledWith(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('setClaimedQuantity(id, claimedQuantity)', () => { - it('should make a patch and call refresh and showSuccess', () => { - const id = 1; - const claimedQuantity = 1; - - jest.spyOn(controller.vnApp, 'showSuccess'); - $httpBackend.expectPATCH(`ClaimBeginnings/${id}`).respond({}); - controller.setClaimedQuantity(id, claimedQuantity); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('calculateTotals()', () => { - it('should set paidTotal and claimedTotal to 0 if salesClaimed has no data', () => { - controller.salesClaimed = []; - controller.calculateTotals(); - - expect(controller.paidTotal).toEqual(0); - expect(controller.claimedTotal).toEqual(0); - }); - }); - - describe('updateDiscount()', () => { - it('should perform a query if the new discount differs from the claim discount', () => { - controller.saleClaimed = {sale: { - discount: 5, - id: 7, - ticketFk: 1, - price: 2, - quantity: 10}}; - controller.newDiscount = 10; - - jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller, 'calculateTotals'); - jest.spyOn(controller, 'clearDiscount'); - jest.spyOn(controller.$.editPopover, 'hide'); - - $httpBackend.when('POST', 'Tickets/1/updateDiscount').respond({}); - controller.updateDiscount(); - $httpBackend.flush(); - - expect(controller.calculateTotals).toHaveBeenCalledWith(); - expect(controller.clearDiscount).toHaveBeenCalledWith(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.$.editPopover.hide).toHaveBeenCalledWith(); - }); - }); - - describe('isTicketEditable()', () => { - it('should check if the ticket assigned to the claim is editable', () => { - controller.isTicketEditable(); - $httpBackend.flush(); - - expect(controller.isEditable).toBeTruthy(); - }); - }); - }); -}); diff --git a/modules/claim/front/detail/locale/es.yml b/modules/claim/front/detail/locale/es.yml deleted file mode 100644 index 53f9e9b1d..000000000 --- a/modules/claim/front/detail/locale/es.yml +++ /dev/null @@ -1,11 +0,0 @@ -Claimed: Reclamados -Disc.: Dto. -Attended by: Atendida por -Landed: F. entrega -Price: Precio -Claimable sales from ticket: Lineas reclamables del ticket -Detail: Detalles -Add sale item: Añadir artículo -Insuficient permisos: Permisos insuficientes -Total claimed price: Precio total reclamado -Delete sale from claim?: ¿Borrar la linea de la reclamación? \ No newline at end of file diff --git a/modules/claim/front/detail/style.scss b/modules/claim/front/detail/style.scss deleted file mode 100644 index 470c83034..000000000 --- a/modules/claim/front/detail/style.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import "variables"; - -.vn-popover .discount-popover { - width: 256px; - - .header { - background-color: $color-main; - color: $color-font-dark; - - h5 { - color: inherit; - margin: 0 auto; - } - } - .simulatorTitle { - margin-bottom: 0; - font-size: .75rem; - color: $color-main; - } - vn-label-value { - padding-bottom: 20px; - } - .simulator{ - text-align: center; - } -} - -.next{ - float: right; -} diff --git a/modules/claim/front/development/index.html b/modules/claim/front/development/index.html deleted file mode 100644 index 7fb3b870e..000000000 --- a/modules/claim/front/development/index.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/modules/claim/front/development/index.js b/modules/claim/front/development/index.js deleted file mode 100644 index 7b31bd17f..000000000 --- a/modules/claim/front/development/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - async $onInit() { - this.$state.go('claim.card.summary', {id: this.$params.id}); - window.location.href = await this.vnApp.getUrl(`claim/${this.$params.id}/development`); - } -} - -ngModule.vnComponent('vnClaimDevelopment', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<' - } -}); diff --git a/modules/claim/front/index.js b/modules/claim/front/index.js index 473f6a4d3..16397df28 100644 --- a/modules/claim/front/index.js +++ b/modules/claim/front/index.js @@ -1,16 +1,4 @@ export * from './module'; import './main'; -import './index/'; -import './action'; -import './basic-data'; -import './card'; -import './detail'; import './descriptor'; -import './development'; -import './search-panel'; -import './summary'; -import './photos'; -import './log'; -import './note/index'; -import './note/create'; diff --git a/modules/claim/front/index/index.html b/modules/claim/front/index/index.html deleted file mode 100644 index 6b2481429..000000000 --- a/modules/claim/front/index/index.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Id - - Client - - Created - - Worker - - State -
{{::claim.id}} - - {{::claim.clientName}} - - {{::claim.created | date:'dd/MM/yyyy'}} - - {{::claim.workerName}} - - - - {{::claim.stateDescription}} - - - - -
-
-
-
- - - - - - - - diff --git a/modules/claim/front/index/index.js b/modules/claim/front/index/index.js deleted file mode 100644 index e3fdabf79..000000000 --- a/modules/claim/front/index/index.js +++ /dev/null @@ -1,82 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - - this.smartTableOptions = { - activeButtons: { - search: true - }, - columns: [ - { - field: 'clientName', - autocomplete: { - url: 'Clients', - showField: 'name', - valueField: 'name' - } - }, - { - field: 'workerFk', - autocomplete: { - url: 'Workers/activeWithInheritedRole', - where: `{role: 'salesPerson'}`, - searchFunction: '{firstName: $search}', - showField: 'name', - valueField: 'id', - } - }, - { - field: 'claimStateFk', - autocomplete: { - url: 'ClaimStates', - showField: 'description', - valueField: 'id', - } - }, - { - field: 'created', - searchable: false - } - ] - }; - } - - exprBuilder(param, value) { - switch (param) { - case 'clientName': - return {'cl.clientName': {like: `%${value}%`}}; - case 'clientFk': - case 'claimStateFk': - case 'workerFk': - return {[`cl.${param}`]: value}; - } - } - - stateColor(code) { - switch (code) { - case 'pending': - return 'warning'; - case 'managed': - return 'notice'; - case 'resolved': - return 'success'; - } - } - - preview(claim) { - this.claimSelected = claim; - this.$.summary.show(); - } - - reload() { - this.$.model.refresh(); - } -} - -ngModule.vnComponent('vnClaimIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/claim/front/log/index.html b/modules/claim/front/log/index.html deleted file mode 100644 index 500a626d6..000000000 --- a/modules/claim/front/log/index.html +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/modules/claim/front/log/index.js b/modules/claim/front/log/index.js deleted file mode 100644 index 0143a612b..000000000 --- a/modules/claim/front/log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnClaimLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/claim/front/main/index.html b/modules/claim/front/main/index.html index f38cc573f..e69de29bb 100644 --- a/modules/claim/front/main/index.html +++ b/modules/claim/front/main/index.html @@ -1,19 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/claim/front/main/index.js b/modules/claim/front/main/index.js index 0c5c7d728..cbbbe0c7e 100644 --- a/modules/claim/front/main/index.js +++ b/modules/claim/front/main/index.js @@ -1,7 +1,18 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; +export default class Claim extends ModuleMain { + constructor($element, $) { + super($element, $); + } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`Claim/`); + } +} + ngModule.vnComponent('vnClaim', { - controller: ModuleMain, + controller: Claim, template: require('./index.html') }); + diff --git a/modules/claim/front/note/create/index.html b/modules/claim/front/note/create/index.html deleted file mode 100644 index 8a882a4f5..000000000 --- a/modules/claim/front/note/create/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - -
- - - - - - - - - - - - -
diff --git a/modules/claim/front/note/create/index.js b/modules/claim/front/note/create/index.js deleted file mode 100644 index 40ae9309b..000000000 --- a/modules/claim/front/note/create/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.note = { - claimFk: parseInt(this.$params.id), - workerFk: window.localStorage.currentUserWorkerId, - text: null - }; - } - - cancel() { - this.$state.go('claim.card.note.index', {id: this.$params.id}); - } -} - -ngModule.vnComponent('vnClaimNoteCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/claim/front/note/index/index.html b/modules/claim/front/note/index/index.html deleted file mode 100644 index 8ffe19c2b..000000000 --- a/modules/claim/front/note/index/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -
- - {{::note.worker.firstName}} {{::note.worker.lastName}} - {{::note.created | date:'dd/MM/yyyy HH:mm'}} - - - {{::note.text}} - -
-
-
- - - \ No newline at end of file diff --git a/modules/claim/front/note/index/index.js b/modules/claim/front/note/index/index.js deleted file mode 100644 index 5a2fd96d3..000000000 --- a/modules/claim/front/note/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.filter = { - order: 'created DESC', - }; - this.include = { - relation: 'worker', - scope: { - fields: ['id', 'firstName', 'lastName'] - } - }; - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnClaimNote', { - template: require('./index.html'), - controller: Controller, -}); diff --git a/modules/claim/front/note/index/style.scss b/modules/claim/front/note/index/style.scss deleted file mode 100644 index 44ae2cee7..000000000 --- a/modules/claim/front/note/index/style.scss +++ /dev/null @@ -1,5 +0,0 @@ -vn-client-note { - .note:last-child { - margin-bottom: 0; - } -} \ No newline at end of file diff --git a/modules/claim/front/photos/index.html b/modules/claim/front/photos/index.html deleted file mode 100644 index 8b1378917..000000000 --- a/modules/claim/front/photos/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/claim/front/photos/index.js b/modules/claim/front/photos/index.js deleted file mode 100644 index c9fada9a4..000000000 --- a/modules/claim/front/photos/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - async $onInit() { - const url = await this.vnApp.getUrl(`claim/${this.$params.id}/photos`); - window.location.href = url; - } -} - -ngModule.vnComponent('vnClaimPhotos', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<' - } -}); diff --git a/modules/claim/front/search-panel/index.html b/modules/claim/front/search-panel/index.html deleted file mode 100644 index 260f86801..000000000 --- a/modules/claim/front/search-panel/index.html +++ /dev/null @@ -1,84 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - - - {{description}} - - - - - - - {{::id}} - {{::name}} - - - - - - - - - - -
-
diff --git a/modules/claim/front/search-panel/index.js b/modules/claim/front/search-panel/index.js deleted file mode 100644 index 2400b8ede..000000000 --- a/modules/claim/front/search-panel/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -class Controller extends SearchPanel { - itemSearchFunc($search) { - return /^\d+$/.test($search) - ? {id: $search} - : {name: {like: '%' + $search + '%'}}; - } -} -ngModule.vnComponent('vnClaimSearchPanel', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/claim/front/search-panel/locale/es.yml b/modules/claim/front/search-panel/locale/es.yml deleted file mode 100644 index 1f892a742..000000000 --- a/modules/claim/front/search-panel/locale/es.yml +++ /dev/null @@ -1,7 +0,0 @@ -Ticket id: Id ticket -Client id: Id cliente -Nickname: Alias -From: Desde -To: Hasta -Agency: Agencia -Warehouse: Almacén \ No newline at end of file diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html deleted file mode 100644 index b5225e6f4..000000000 --- a/modules/claim/front/summary/index.html +++ /dev/null @@ -1,273 +0,0 @@ - - - -
- - - - {{::$ctrl.summary.claim.id}} - {{::$ctrl.summary.claim.client.name}} - - -
- - -

- - Basic data - -

- - - - - - - - -
- -

- - Observations - -

-

- Observations -

-
- - {{::note.worker.firstName}} {{::note.worker.lastName}} - {{::note.created | date:'dd/MM/yyyy HH:mm'}} - - - {{::note.text}} - -
-
- -

- - Detail - -

-

- Detail -

- - - - - Item - Landed - Quantity - Claimed - Description - Price - Disc. - Total - - - - - - - {{::saleClaimed.sale.itemFk}} - - - {{::saleClaimed.sale.ticket.landed | date: 'dd/MM/yyyy'}} - {{::saleClaimed.sale.quantity}} - {{::saleClaimed.quantity}} - {{::saleClaimed.sale.concept}} - {{::saleClaimed.sale.price | currency: 'EUR':2}} - {{::saleClaimed.sale.discount}} % - - {{saleClaimed.sale.quantity * saleClaimed.sale.price * - ((100 - saleClaimed.sale.discount) / 100) | currency: 'EUR':2}} - - - - - -
- -

Photos

- -
-
-
- -
-
-
- -

- - Development - -

-

- Development -

- - - - - Reason - Result - Responsible - Worker - Redelivery - - - - - {{::development.claimReason.description}} - {{::development.claimResult.description}} - {{::development.claimResponsible.description}} - - - {{::development.worker.user.nickname}} - - - {{::development.claimRedelivery.description}} - - - - -
- -

- - Action - -

-

- Action -

- - - - - - - - - - - Item - Ticket - Destination - Landed - Quantity - Description - Price - Disc. - Total - - - - - - - {{::action.sale.itemFk}} - - - - - {{::action.sale.ticket.id}} - - - {{::action.claimBeggining.description}} - {{::action.sale.ticket.landed | date: 'dd/MM/yyyy'}} - {{::action.sale.quantity}} - {{::action.sale.concept}} - {{::action.sale.price}} - {{::action.sale.discount}} % - - {{action.sale.quantity * action.sale.price * - ((100 - action.sale.discount) / 100) | currency: 'EUR':2}} - - - - - -
-
-
- - - - - - diff --git a/modules/claim/front/summary/index.js b/modules/claim/front/summary/index.js deleted file mode 100644 index 7cd4805e9..000000000 --- a/modules/claim/front/summary/index.js +++ /dev/null @@ -1,103 +0,0 @@ -import ngModule from '../module'; -import Summary from 'salix/components/summary'; -import './style.scss'; - -class Controller extends Summary { - constructor($element, $, vnFile) { - super($element, $); - this.vnFile = vnFile; - this.filter = { - include: [ - { - relation: 'dms' - } - ] - }; - } - - $onChanges() { - if (this.claim && this.claim.id) - this.loadData(); - } - - loadData() { - return this.$http.get(`Claims/${this.claim.id}/getSummary`).then(res => { - if (res && res.data) - this.summary = res.data; - }); - } - - reload() { - this.loadData() - .then(() => { - if (this.card) - this.card.reload(); - - if (this.parentReload) - this.parentReload(); - }); - } - - get isSalesPerson() { - return this.aclService.hasAny(['salesPerson']); - } - - get isClaimManager() { - return this.aclService.hasAny(['claimManager']); - } - - get claim() { - return this._claim; - } - - set claim(value) { - this._claim = value; - - // Get DMS on summary load - if (value) { - this.$.$applyAsync(() => this.loadDms()); - this.loadData(); - } - } - - loadDms() { - this.$.model.where = { - claimFk: this.claim.id - }; - this.$.model.refresh(); - } - - getImagePath(dmsId) { - return this.vnFile.getPath(`/api/dms/${dmsId}/downloadFile`); - } - - changeState(value) { - const params = { - id: this.claim.id, - claimStateFk: value - }; - - this.$http.patch(`Claims/updateClaim/${this.claim.id}`, params) - .then(() => { - this.reload(); - }) - .then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } -} - -Controller.$inject = ['$element', '$scope', 'vnFile']; - -ngModule.vnComponent('vnClaimSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - claim: '<', - model: ' { - describe('Component summary', () => { - let controller; - let $httpBackend; - let $scope; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - const $element = angular.element(''); - controller = $componentController('vnClaimSummary', {$element, $scope}); - controller.claim = {id: 1}; - controller.$.model = crudModel; - })); - - describe('loadData()', () => { - it('should perform a query to set summary', () => { - $httpBackend.when('GET', `Claims/1/getSummary`).respond(200, 24); - controller.loadData(); - $httpBackend.flush(); - - expect(controller.summary).toEqual(24); - }); - }); - - describe('changeState()', () => { - it('should make an HTTP post query, then call the showSuccess()', () => { - jest.spyOn(controller.vnApp, 'showSuccess').mockReturnThis(); - - const expectedParams = {id: 1, claimStateFk: 1}; - $httpBackend.when('GET', `Claims/1/getSummary`).respond(200, 24); - $httpBackend.expect('PATCH', `Claims/updateClaim/1`, expectedParams).respond(200); - controller.changeState(1); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('$onChanges()', () => { - it('should call loadData when $onChanges is called', () => { - jest.spyOn(controller, 'loadData'); - - controller.$onChanges(); - - expect(controller.loadData).toHaveBeenCalledWith(); - }); - }); - }); -}); diff --git a/modules/claim/front/summary/style.scss b/modules/claim/front/summary/style.scss deleted file mode 100644 index 5b4e32f7a..000000000 --- a/modules/claim/front/summary/style.scss +++ /dev/null @@ -1,28 +0,0 @@ -@import "./variables"; - -vn-claim-summary { - section.photo { - height: 248px; - } - .photo .image { - border-radius: 3px; - } - vn-textarea *{ - height: 80px; - } - - .video { - width: 100%; - height: 100%; - object-fit: cover; - cursor: pointer; - box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), - 0 3px 1px -2px rgba(0,0,0,.2), - 0 1px 5px 0 rgba(0,0,0,.12); - border: 2px solid transparent; - - } - .video:hover { - border: 2px solid $color-primary - } -} \ No newline at end of file diff --git a/modules/item/front/diary/index.html b/modules/item/front/diary/index.html index 481cec51a..8eb486385 100644 --- a/modules/item/front/diary/index.html +++ b/modules/item/front/diary/index.html @@ -60,7 +60,7 @@ on-last="$ctrl.scrollToLine(sale.lastPreparedLineFk)" ng-attr-id="vnItemDiary-{{::sale.lineFk}}"> - + diff --git a/modules/item/front/diary/index.js b/modules/item/front/diary/index.js index 1d2e34a66..199682a77 100644 --- a/modules/item/front/diary/index.js +++ b/modules/item/front/diary/index.js @@ -91,6 +91,10 @@ class Controller extends Section { if (this.$state.getCurrentPath()[2].state.name === 'item') this.card.reload(); } + + async goToLilium(section, id) { + window.location.href = await this.vnApp.getUrl(`claim/${id}/${section}`); + } } Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location']; diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 262395d16..dafae8974 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -81,7 +81,7 @@ - + diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 7ff8d89e3..4f8494ed0 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -214,7 +214,7 @@ class Controller extends Section { const params = {ticketId: this.ticket.id, sales: sales}; this.resetChanges(); this.$http.post(`Claims/createFromSales`, params) - .then(res => this.$state.go('claim.card.basicData', {id: res.data.id})); + .then(async res => window.location.href = await this.vnApp.getUrl(`claim/${res.data.id}/basic-data`)); } showTransferPopover(event) { @@ -558,6 +558,10 @@ class Controller extends Section { changedModelId: saleId }); } + + async goToLilium(section, id) { + window.location.href = await this.vnApp.getUrl(`claim/${id}/${section}`); + } } ngModule.vnComponent('vnTicketSale', { diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 025078d36..7ee260f74 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -152,13 +152,13 @@ - + - + Date: Mon, 22 Jul 2024 10:26:40 +0200 Subject: [PATCH 018/250] feat: refs #7346 mas intuitivo --- db/routines/vn/functions/invoiceSerial.sql | 22 +++++++----- .../vn/functions/invoiceSerialArea.sql | 34 ------------------- db/routines/vn/procedures/ticket_close.sql | 26 +++++++------- .../ticket/back/methods/ticket/closeAll.js | 22 ++++++------ .../back/methods/ticket/invoiceTickets.js | 2 +- .../methods/ticket/specs/makeInvoice.spec.js | 2 +- 6 files changed, 40 insertions(+), 68 deletions(-) delete mode 100644 db/routines/vn/functions/invoiceSerialArea.sql diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 66448ac9c..5ce20dc8b 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -1,26 +1,32 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(15)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** - * Obtiene la serie de de una factura + * Obtiene la serie de de una factura * dependiendo del area del cliente. - * + * * @param vClientFk Id del cliente * @param vCompanyFk Id de la empresa - * @param vType Tipo de factura ["R", "M", "G"] - * @return Serie de la factura + * @param vType Tipo de factura ['global','multiple','quick'] + * @return vSerie de la factura */ DECLARE vTaxArea VARCHAR(25); - DECLARE vSerie CHAR(1); + DECLARE vSerie CHAR(2); IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN RETURN 'S'; END IF; - SELECT clientTaxArea(vClientFk, vCompanyFk) INTO vTaxArea; - SELECT invoiceSerialArea(vType,vTaxArea) INTO vSerie; + SELECT addressTaxArea(defaultAddressFk, vCompanyFk) INTO vTaxArea + FROM client + WHERE id = vClientFk; + + SELECT code INTO vSerie + FROM invoiceOutSerial + WHERE `type` = vType AND taxAreaFk = vTaxArea; + RETURN vSerie; END$$ DELIMITER ; diff --git a/db/routines/vn/functions/invoiceSerialArea.sql b/db/routines/vn/functions/invoiceSerialArea.sql deleted file mode 100644 index 02edd83f2..000000000 --- a/db/routines/vn/functions/invoiceSerialArea.sql +++ /dev/null @@ -1,34 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) - RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci - DETERMINISTIC -BEGIN - DECLARE vSerie CHAR(1); - - IF vType = 'R' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'H' - WHEN 'WORLD' THEN 'E' - ELSE 'T' - END INTO vSerie; - -- Factura multiple - ELSEIF vType = 'M' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'H' - WHEN 'WORLD' THEN 'E' - ELSE 'M' - END INTO vSerie; - -- Factura global - ELSEIF vType = 'G' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'V' - WHEN 'WORLD' THEN 'X' - ELSE 'A' - END INTO vSerie; - END IF; - RETURN vSerie; -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 7f52e81a7..97da5057c 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -2,7 +2,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_close`() BEGIN /** - * Realiza el cierre de todos los + * Realiza el cierre de todos los * tickets de la tabla tmp.ticket_close. * * @table tmp.ticket_close(ticketFk) Identificadores de los tickets a cerrar @@ -20,7 +20,7 @@ BEGIN DECLARE cur CURSOR FOR SELECT ticketFk FROM tmp.ticket_close; - + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN RESIGNAL; @@ -30,7 +30,7 @@ BEGIN proc: LOOP SET vDone = FALSE; - + FETCH cur INTO vCurTicketFk; IF vDone THEN @@ -47,12 +47,12 @@ BEGIN c.hasToInvoice INTO vClientFk, vIsTaxDataChecked, - vCompanyFk, + vCompanyFk, vShipped, vHasDailyInvoice, vWithPackage, vHasToInvoice - FROM ticket t + FROM ticket t JOIN `client` c ON c.id = t.clientFk JOIN province p ON p.id = c.provinceFk LEFT JOIN autonomy a ON a.id = p.autonomyFk @@ -62,7 +62,7 @@ BEGIN INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity) (SELECT vCurTicketFk, p.id, COUNT(*) - FROM expedition e + FROM expedition e JOIN packaging p ON p.id = e.packagingFk JOIN ticket t ON t.id = e.ticketFk LEFT JOIN agencyMode am ON am.id = t.agencyModeFk @@ -73,15 +73,15 @@ BEGIN GROUP BY p.itemFk); -- No retornables o no catalogados - INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed) + INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed) (SELECT e.freightItemFk, vCurTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.freightItemFk, vClientFk), 1 - FROM expedition e + FROM expedition e JOIN item i ON i.id = e.freightItemFk LEFT JOIN packaging p ON p.itemFk = i.id WHERE e.ticketFk = vCurTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0 AND getSpecialPrice(e.freightItemFk, vClientFk) > 0 GROUP BY e.freightItemFk); - + IF(vHasDailyInvoice) AND vHasToInvoice THEN -- Facturacion rapida @@ -89,10 +89,10 @@ BEGIN -- Facturar si está contabilizado IF vIsTaxDataChecked THEN CALL invoiceOut_newFromClient( - vClientFk, - (SELECT invoiceSerial(vClientFk, vCompanyFk, 'M')), - vShipped, - vCompanyFk, + vClientFk, + (SELECT invoiceSerial(vClientFk, vCompanyFk, 'multiple')), + vShipped, + vCompanyFk, NULL, NULL, vNewInvoiceId); diff --git a/modules/ticket/back/methods/ticket/closeAll.js b/modules/ticket/back/methods/ticket/closeAll.js index 35b9b1e37..ef38d4255 100644 --- a/modules/ticket/back/methods/ticket/closeAll.js +++ b/modules/ticket/back/methods/ticket/closeAll.js @@ -91,8 +91,8 @@ module.exports = Self => { SUM(t.isDeleted) hasErrorDeleted, SUM(itc.id IS NULL) hasErrorItemTaxCountry, SUM(a.id IS NULL) hasErrorAddress, - SUM(ios.code IS NOT NULL - AND(ad.customsAgentFk IS NULL + SUM(ios.code IS NOT NULL + AND(ad.customsAgentFk IS NULL OR ad.incotermsFk IS NULL)) hasErrorInfoTaxAreaWorld FROM ticket t LEFT JOIN address ad ON ad.id = t.addressFk @@ -110,24 +110,24 @@ module.exports = Self => { LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk LEFT JOIN itemTaxCountry itc ON itc.itemFk = i.id AND itc.countryFk = su.countryFk - LEFT JOIN vn.invoiceOutSerial ios ON ios.taxAreaFk = 'WORLD' - AND ios.code = invoiceSerial(t.clientFk, t.companyFk, 'M') + LEFT JOIN vn.invoiceOutSerial ios ON ios.taxAreaFk = 'WORLD' + AND ios.code = invoiceSerial(t.clientFk, t.companyFk, 'multiple') WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code <> 'delivered')) AND DATE(t.shipped) BETWEEN ? - INTERVAL 2 DAY AND util.dayEnd(?) AND t.refFk IS NULL AND IFNULL(a.hasDailyInvoice, co.hasDailyInvoice) - GROUP BY ticketFk - HAVING hasErrorToInvoice - OR hasErrorTaxDataChecked - OR hasErrorDeleted - OR hasErrorItemTaxCountry - OR hasErrorAddress + GROUP BY ticketFk + HAVING hasErrorToInvoice + OR hasErrorTaxDataChecked + OR hasErrorDeleted + OR hasErrorItemTaxCountry + OR hasErrorAddress OR hasErrorInfoTaxAreaWorld )sub )sub2 ) SELECT IF(errors = '{"tickets": null}', 'No errors', - util.notification_send('invoice-ticket-closure', errors, NULL)) + util.notification_send('invoice-ticket-closure', errors, NULL)) FROM ticketNotInvoiceable`, [toDate, toDate]); await closure(ctx, Self, tickets); diff --git a/modules/ticket/back/methods/ticket/invoiceTickets.js b/modules/ticket/back/methods/ticket/invoiceTickets.js index 53400e724..3c725c4a7 100644 --- a/modules/ticket/back/methods/ticket/invoiceTickets.js +++ b/modules/ticket/back/methods/ticket/invoiceTickets.js @@ -95,7 +95,7 @@ module.exports = function(Self) { FROM vn.ticket WHERE id IN (?) `, [ticketsIds], myOptions); - return models.Ticket.makeInvoice(ctx, 'R', companyId, Date.vnNew(), invoiceCorrection, myOptions); + return models.Ticket.makeInvoice(ctx, 'quick', companyId, Date.vnNew(), invoiceCorrection, myOptions); } }; diff --git a/modules/ticket/back/methods/ticket/specs/makeInvoice.spec.js b/modules/ticket/back/methods/ticket/specs/makeInvoice.spec.js index fea8b2096..88812dc92 100644 --- a/modules/ticket/back/methods/ticket/specs/makeInvoice.spec.js +++ b/modules/ticket/back/methods/ticket/specs/makeInvoice.spec.js @@ -3,7 +3,7 @@ const LoopBackContext = require('loopback-context'); describe('ticket makeInvoice()', () => { const userId = 19; - const invoiceType = 'R'; + const invoiceType = 'quick'; const companyFk = 442; const invoiceDate = Date.vnNew(); const activeCtx = { From 219740f66953da5400ecbe78e3aa692f0d52b8a9 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 22 Jul 2024 11:52:42 +0200 Subject: [PATCH 019/250] feat: refs #7759 Changed definer root to vn-admin --- .../account/functions/myUser_checkLogin.sql | 2 +- db/routines/account/functions/myUser_getId.sql | 2 +- db/routines/account/functions/myUser_getName.sql | 2 +- db/routines/account/functions/myUser_hasPriv.sql | 2 +- db/routines/account/functions/myUser_hasRole.sql | 2 +- db/routines/account/functions/myUser_hasRoleId.sql | 2 +- .../account/functions/myUser_hasRoutinePriv.sql | 2 +- db/routines/account/functions/passwordGenerate.sql | 2 +- db/routines/account/functions/toUnixDays.sql | 2 +- .../account/functions/user_getMysqlRole.sql | 2 +- .../account/functions/user_getNameFromId.sql | 2 +- db/routines/account/functions/user_hasPriv.sql | 2 +- db/routines/account/functions/user_hasRole.sql | 2 +- db/routines/account/functions/user_hasRoleId.sql | 2 +- .../account/functions/user_hasRoutinePriv.sql | 2 +- db/routines/account/procedures/account_enable.sql | 2 +- db/routines/account/procedures/myUser_login.sql | 2 +- .../account/procedures/myUser_loginWithKey.sql | 2 +- .../account/procedures/myUser_loginWithName.sql | 2 +- db/routines/account/procedures/myUser_logout.sql | 2 +- db/routines/account/procedures/role_checkName.sql | 2 +- .../account/procedures/role_getDescendents.sql | 2 +- db/routines/account/procedures/role_sync.sql | 2 +- .../account/procedures/role_syncPrivileges.sql | 2 +- db/routines/account/procedures/user_checkName.sql | 2 +- .../account/procedures/user_checkPassword.sql | 2 +- .../account/triggers/account_afterDelete.sql | 2 +- .../account/triggers/account_afterInsert.sql | 2 +- .../account/triggers/account_beforeInsert.sql | 2 +- .../account/triggers/account_beforeUpdate.sql | 2 +- .../triggers/mailAliasAccount_afterDelete.sql | 2 +- .../triggers/mailAliasAccount_beforeInsert.sql | 2 +- .../triggers/mailAliasAccount_beforeUpdate.sql | 2 +- .../account/triggers/mailAlias_afterDelete.sql | 2 +- .../account/triggers/mailAlias_beforeInsert.sql | 2 +- .../account/triggers/mailAlias_beforeUpdate.sql | 2 +- .../account/triggers/mailForward_afterDelete.sql | 2 +- .../account/triggers/mailForward_beforeInsert.sql | 2 +- .../account/triggers/mailForward_beforeUpdate.sql | 2 +- .../account/triggers/roleInherit_afterDelete.sql | 2 +- .../account/triggers/roleInherit_beforeInsert.sql | 2 +- .../account/triggers/roleInherit_beforeUpdate.sql | 2 +- db/routines/account/triggers/role_afterDelete.sql | 2 +- db/routines/account/triggers/role_beforeInsert.sql | 2 +- db/routines/account/triggers/role_beforeUpdate.sql | 2 +- db/routines/account/triggers/user_afterDelete.sql | 2 +- db/routines/account/triggers/user_afterInsert.sql | 2 +- db/routines/account/triggers/user_afterUpdate.sql | 2 +- db/routines/account/triggers/user_beforeInsert.sql | 2 +- db/routines/account/triggers/user_beforeUpdate.sql | 2 +- db/routines/account/views/accountDovecot.sql | 2 +- db/routines/account/views/emailUser.sql | 2 +- db/routines/account/views/myRole.sql | 2 +- db/routines/account/views/myUser.sql | 2 +- db/routines/bi/procedures/Greuge_Evolution_Add.sql | 2 +- .../procedures/analisis_ventas_evolution_add.sql | 2 +- .../bi/procedures/analisis_ventas_simple.sql | 2 +- .../bi/procedures/analisis_ventas_update.sql | 2 +- db/routines/bi/procedures/clean.sql | 8 ++++---- db/routines/bi/procedures/defaultersFromDate.sql | 2 +- db/routines/bi/procedures/defaulting.sql | 2 +- db/routines/bi/procedures/defaulting_launcher.sql | 2 +- .../procedures/facturacion_media_anual_update.sql | 8 ++++---- db/routines/bi/procedures/greuge_dif_porte_add.sql | 2 +- .../bi/procedures/nigthlyAnalisisVentas.sql | 2 +- db/routines/bi/procedures/rutasAnalyze.sql | 2 +- .../bi/procedures/rutasAnalyze_launcher.sql | 2 +- db/routines/bi/views/analisis_grafico_ventas.sql | 2 +- db/routines/bi/views/analisis_ventas_simple.sql | 2 +- db/routines/bi/views/claims_ratio.sql | 2 +- db/routines/bi/views/customerRiskOverdue.sql | 2 +- db/routines/bi/views/defaulters.sql | 2 +- db/routines/bi/views/facturacion_media_anual.sql | 2 +- db/routines/bi/views/rotacion.sql | 2 +- db/routines/bi/views/tarifa_componentes.sql | 2 +- db/routines/bi/views/tarifa_componentes_series.sql | 2 +- db/routines/bs/events/clientDied_recalc.sql | 2 +- .../bs/events/inventoryDiscrepancy_launch.sql | 2 +- db/routines/bs/events/nightTask_launchAll.sql | 2 +- db/routines/bs/functions/tramo.sql | 2 +- db/routines/bs/procedures/campaignComparative.sql | 2 +- db/routines/bs/procedures/carteras_add.sql | 8 ++++---- db/routines/bs/procedures/clean.sql | 2 +- db/routines/bs/procedures/clientDied_recalc.sql | 2 +- db/routines/bs/procedures/clientNewBorn_recalc.sql | 2 +- .../bs/procedures/compradores_evolution_add.sql | 2 +- db/routines/bs/procedures/fondo_evolution_add.sql | 2 +- db/routines/bs/procedures/fruitsEvolution.sql | 2 +- db/routines/bs/procedures/indicatorsUpdate.sql | 2 +- .../bs/procedures/indicatorsUpdateLauncher.sql | 2 +- .../inventoryDiscrepancyDetail_replace.sql | 2 +- db/routines/bs/procedures/m3Add.sql | 2 +- db/routines/bs/procedures/manaCustomerUpdate.sql | 2 +- .../bs/procedures/manaSpellers_actualize.sql | 2 +- db/routines/bs/procedures/nightTask_launchAll.sql | 8 ++++---- db/routines/bs/procedures/nightTask_launchTask.sql | 2 +- db/routines/bs/procedures/payMethodClientAdd.sql | 2 +- db/routines/bs/procedures/saleGraphic.sql | 2 +- .../bs/procedures/salePersonEvolutionAdd.sql | 2 +- db/routines/bs/procedures/sale_add.sql | 2 +- .../bs/procedures/salesByItemTypeDay_add.sql | 2 +- .../procedures/salesByItemTypeDay_addLauncher.sql | 6 +++--- .../bs/procedures/salesByclientSalesPerson_add.sql | 2 +- .../bs/procedures/salesPersonEvolution_add.sql | 2 +- db/routines/bs/procedures/sales_addLauncher.sql | 2 +- .../bs/procedures/vendedores_add_launcher.sql | 2 +- db/routines/bs/procedures/ventas_contables_add.sql | 2 +- .../procedures/ventas_contables_add_launcher.sql | 2 +- db/routines/bs/procedures/waste_addSales.sql | 2 +- db/routines/bs/procedures/workerLabour_getData.sql | 2 +- .../bs/procedures/workerProductivity_add.sql | 2 +- .../bs/triggers/clientNewBorn_beforeUpdate.sql | 2 +- db/routines/bs/triggers/nightTask_beforeInsert.sql | 2 +- db/routines/bs/triggers/nightTask_beforeUpdate.sql | 2 +- db/routines/bs/views/lastIndicators.sql | 2 +- db/routines/bs/views/packingSpeed.sql | 2 +- db/routines/bs/views/ventas.sql | 2 +- db/routines/cache/events/cacheCalc_clean.sql | 2 +- db/routines/cache/events/cache_clean.sql | 2 +- .../cache/procedures/addressFriendship_Update.sql | 2 +- .../cache/procedures/availableNoRaids_refresh.sql | 2 +- db/routines/cache/procedures/available_clean.sql | 2 +- db/routines/cache/procedures/available_refresh.sql | 2 +- db/routines/cache/procedures/cacheCalc_clean.sql | 2 +- db/routines/cache/procedures/cache_calc_end.sql | 8 ++++---- db/routines/cache/procedures/cache_calc_start.sql | 8 ++++---- db/routines/cache/procedures/cache_calc_unlock.sql | 2 +- db/routines/cache/procedures/cache_clean.sql | 2 +- db/routines/cache/procedures/clean.sql | 2 +- db/routines/cache/procedures/departure_timing.sql | 2 +- db/routines/cache/procedures/last_buy_refresh.sql | 2 +- db/routines/cache/procedures/stock_refresh.sql | 2 +- db/routines/cache/procedures/visible_clean.sql | 2 +- db/routines/cache/procedures/visible_refresh.sql | 2 +- db/routines/dipole/procedures/clean.sql | 2 +- db/routines/dipole/procedures/expedition_add.sql | 2 +- db/routines/dipole/views/expeditionControl.sql | 2 +- db/routines/edi/events/floramondo.sql | 2 +- db/routines/edi/functions/imageName.sql | 2 +- db/routines/edi/procedures/clean.sql | 2 +- .../edi/procedures/deliveryInformation_Delete.sql | 2 +- db/routines/edi/procedures/ekt_add.sql | 2 +- db/routines/edi/procedures/ekt_load.sql | 2 +- db/routines/edi/procedures/ekt_loadNotBuy.sql | 2 +- db/routines/edi/procedures/ekt_refresh.sql | 2 +- db/routines/edi/procedures/ekt_scan.sql | 2 +- .../edi/procedures/floramondo_offerRefresh.sql | 2 +- db/routines/edi/procedures/item_freeAdd.sql | 2 +- db/routines/edi/procedures/item_getNewByEkt.sql | 2 +- db/routines/edi/procedures/mail_new.sql | 2 +- .../edi/triggers/item_feature_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_afterUpdate.sql | 2 +- db/routines/edi/triggers/putOrder_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_beforeUpdate.sql | 2 +- .../edi/triggers/supplyResponse_afterUpdate.sql | 2 +- db/routines/edi/views/ektK2.sql | 2 +- db/routines/edi/views/ektRecent.sql | 2 +- db/routines/edi/views/errorList.sql | 2 +- db/routines/edi/views/supplyOffer.sql | 2 +- .../floranet/procedures/catalogue_findById.sql | 2 +- db/routines/floranet/procedures/catalogue_get.sql | 2 +- .../floranet/procedures/contact_request.sql | 2 +- .../floranet/procedures/deliveryDate_get.sql | 2 +- db/routines/floranet/procedures/order_confirm.sql | 2 +- db/routines/floranet/procedures/order_put.sql | 2 +- db/routines/floranet/procedures/sliders_get.sql | 2 +- db/routines/hedera/functions/myClient_getDebt.sql | 2 +- .../hedera/functions/myUser_checkRestPriv.sql | 2 +- db/routines/hedera/functions/order_getTotal.sql | 2 +- .../procedures/catalog_calcFromMyAddress.sql | 2 +- db/routines/hedera/procedures/image_ref.sql | 2 +- db/routines/hedera/procedures/image_unref.sql | 2 +- db/routines/hedera/procedures/item_calcCatalog.sql | 2 +- db/routines/hedera/procedures/item_getVisible.sql | 2 +- .../hedera/procedures/item_listAllocation.sql | 2 +- db/routines/hedera/procedures/myOrder_addItem.sql | 2 +- .../procedures/myOrder_calcCatalogFromItem.sql | 2 +- .../hedera/procedures/myOrder_calcCatalogFull.sql | 2 +- .../hedera/procedures/myOrder_checkConfig.sql | 2 +- .../hedera/procedures/myOrder_checkMine.sql | 2 +- .../hedera/procedures/myOrder_configure.sql | 2 +- .../procedures/myOrder_configureForGuest.sql | 2 +- db/routines/hedera/procedures/myOrder_confirm.sql | 2 +- db/routines/hedera/procedures/myOrder_create.sql | 2 +- .../hedera/procedures/myOrder_getAvailable.sql | 2 +- db/routines/hedera/procedures/myOrder_getTax.sql | 2 +- .../hedera/procedures/myOrder_newWithAddress.sql | 2 +- .../hedera/procedures/myOrder_newWithDate.sql | 2 +- db/routines/hedera/procedures/myTicket_get.sql | 2 +- .../hedera/procedures/myTicket_getPackages.sql | 2 +- db/routines/hedera/procedures/myTicket_getRows.sql | 2 +- .../hedera/procedures/myTicket_getServices.sql | 2 +- db/routines/hedera/procedures/myTicket_list.sql | 2 +- .../hedera/procedures/myTicket_logAccess.sql | 2 +- .../hedera/procedures/myTpvTransaction_end.sql | 2 +- .../hedera/procedures/myTpvTransaction_start.sql | 2 +- db/routines/hedera/procedures/order_addItem.sql | 2 +- .../hedera/procedures/order_calcCatalog.sql | 2 +- .../procedures/order_calcCatalogFromItem.sql | 2 +- .../hedera/procedures/order_calcCatalogFull.sql | 2 +- .../hedera/procedures/order_checkConfig.sql | 2 +- .../hedera/procedures/order_checkEditable.sql | 2 +- db/routines/hedera/procedures/order_configure.sql | 2 +- db/routines/hedera/procedures/order_confirm.sql | 2 +- .../hedera/procedures/order_confirmWithUser.sql | 2 +- .../hedera/procedures/order_getAvailable.sql | 2 +- db/routines/hedera/procedures/order_getTax.sql | 2 +- db/routines/hedera/procedures/order_getTotal.sql | 2 +- db/routines/hedera/procedures/order_recalc.sql | 2 +- db/routines/hedera/procedures/order_update.sql | 2 +- db/routines/hedera/procedures/survey_vote.sql | 2 +- .../hedera/procedures/tpvTransaction_confirm.sql | 2 +- .../procedures/tpvTransaction_confirmAll.sql | 2 +- .../procedures/tpvTransaction_confirmById.sql | 2 +- .../tpvTransaction_confirmFromExport.sql | 2 +- .../hedera/procedures/tpvTransaction_end.sql | 2 +- .../hedera/procedures/tpvTransaction_start.sql | 2 +- .../hedera/procedures/tpvTransaction_undo.sql | 2 +- db/routines/hedera/procedures/visitUser_new.sql | 2 +- .../hedera/procedures/visit_listByBrowser.sql | 2 +- db/routines/hedera/procedures/visit_register.sql | 2 +- db/routines/hedera/triggers/link_afterDelete.sql | 2 +- db/routines/hedera/triggers/link_afterInsert.sql | 2 +- db/routines/hedera/triggers/link_afterUpdate.sql | 2 +- db/routines/hedera/triggers/news_afterDelete.sql | 2 +- db/routines/hedera/triggers/news_afterInsert.sql | 2 +- db/routines/hedera/triggers/news_afterUpdate.sql | 2 +- .../hedera/triggers/orderRow_beforeInsert.sql | 2 +- db/routines/hedera/triggers/order_afterInsert.sql | 2 +- db/routines/hedera/triggers/order_afterUpdate.sql | 2 +- db/routines/hedera/triggers/order_beforeDelete.sql | 2 +- db/routines/hedera/views/mainAccountBank.sql | 2 +- db/routines/hedera/views/messageL10n.sql | 2 +- db/routines/hedera/views/myAddress.sql | 2 +- db/routines/hedera/views/myBasketDefaults.sql | 2 +- db/routines/hedera/views/myClient.sql | 2 +- db/routines/hedera/views/myInvoice.sql | 2 +- db/routines/hedera/views/myMenu.sql | 2 +- db/routines/hedera/views/myOrder.sql | 2 +- db/routines/hedera/views/myOrderRow.sql | 2 +- db/routines/hedera/views/myOrderTicket.sql | 2 +- db/routines/hedera/views/myTicket.sql | 2 +- db/routines/hedera/views/myTicketRow.sql | 2 +- db/routines/hedera/views/myTicketService.sql | 2 +- db/routines/hedera/views/myTicketState.sql | 2 +- db/routines/hedera/views/myTpvTransaction.sql | 2 +- db/routines/hedera/views/orderTicket.sql | 2 +- db/routines/hedera/views/order_component.sql | 2 +- db/routines/hedera/views/order_row.sql | 2 +- db/routines/pbx/functions/clientFromPhone.sql | 2 +- db/routines/pbx/functions/phone_format.sql | 2 +- db/routines/pbx/procedures/phone_isValid.sql | 2 +- db/routines/pbx/procedures/queue_isValid.sql | 2 +- db/routines/pbx/procedures/sip_getExtension.sql | 2 +- db/routines/pbx/procedures/sip_isValid.sql | 2 +- db/routines/pbx/procedures/sip_setPassword.sql | 2 +- .../pbx/triggers/blacklist_beforeInsert.sql | 2 +- .../pbx/triggers/blacklist_berforeUpdate.sql | 2 +- db/routines/pbx/triggers/followme_beforeInsert.sql | 2 +- db/routines/pbx/triggers/followme_beforeUpdate.sql | 2 +- .../pbx/triggers/queuePhone_beforeInsert.sql | 2 +- .../pbx/triggers/queuePhone_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/queue_beforeInsert.sql | 2 +- db/routines/pbx/triggers/queue_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/sip_afterInsert.sql | 2 +- db/routines/pbx/triggers/sip_afterUpdate.sql | 2 +- db/routines/pbx/triggers/sip_beforeInsert.sql | 2 +- db/routines/pbx/triggers/sip_beforeUpdate.sql | 2 +- db/routines/pbx/views/cdrConf.sql | 2 +- db/routines/pbx/views/followmeConf.sql | 2 +- db/routines/pbx/views/followmeNumberConf.sql | 2 +- db/routines/pbx/views/queueConf.sql | 2 +- db/routines/pbx/views/queueMemberConf.sql | 2 +- db/routines/pbx/views/sipConf.sql | 2 +- db/routines/psico/procedures/answerSort.sql | 2 +- db/routines/psico/procedures/examNew.sql | 2 +- db/routines/psico/procedures/getExamQuestions.sql | 2 +- db/routines/psico/procedures/getExamType.sql | 2 +- db/routines/psico/procedures/questionSort.sql | 2 +- db/routines/psico/views/examView.sql | 2 +- db/routines/psico/views/results.sql | 2 +- db/routines/sage/functions/company_getCode.sql | 2 +- .../sage/procedures/accountingMovements_add.sql | 2 +- db/routines/sage/procedures/clean.sql | 2 +- db/routines/sage/procedures/clientSupplier_add.sql | 2 +- .../sage/procedures/importErrorNotification.sql | 2 +- db/routines/sage/procedures/invoiceIn_add.sql | 2 +- db/routines/sage/procedures/invoiceIn_manager.sql | 2 +- db/routines/sage/procedures/invoiceOut_add.sql | 2 +- db/routines/sage/procedures/invoiceOut_manager.sql | 2 +- db/routines/sage/procedures/pgc_add.sql | 2 +- .../sage/triggers/movConta_beforeUpdate.sql | 2 +- db/routines/sage/views/clientLastTwoMonths.sql | 2 +- db/routines/sage/views/supplierLastThreeMonths.sql | 2 +- db/routines/salix/events/accessToken_prune.sql | 2 +- db/routines/salix/procedures/accessToken_prune.sql | 2 +- db/routines/salix/views/Account.sql | 2 +- db/routines/salix/views/Role.sql | 2 +- db/routines/salix/views/RoleMapping.sql | 2 +- db/routines/salix/views/User.sql | 2 +- db/routines/srt/events/moving_clean.sql | 2 +- db/routines/srt/functions/bid.sql | 2 +- db/routines/srt/functions/bufferPool_get.sql | 2 +- db/routines/srt/functions/buffer_get.sql | 2 +- db/routines/srt/functions/buffer_getRandom.sql | 2 +- db/routines/srt/functions/buffer_getState.sql | 2 +- db/routines/srt/functions/buffer_getType.sql | 2 +- db/routines/srt/functions/buffer_isFull.sql | 2 +- db/routines/srt/functions/dayMinute.sql | 2 +- db/routines/srt/functions/expedition_check.sql | 2 +- .../srt/functions/expedition_getDayMinute.sql | 2 +- db/routines/srt/procedures/buffer_getExpCount.sql | 2 +- db/routines/srt/procedures/buffer_getStateType.sql | 2 +- db/routines/srt/procedures/buffer_giveBack.sql | 2 +- .../srt/procedures/buffer_readPhotocell.sql | 2 +- db/routines/srt/procedures/buffer_setEmpty.sql | 2 +- db/routines/srt/procedures/buffer_setState.sql | 2 +- db/routines/srt/procedures/buffer_setStateType.sql | 2 +- db/routines/srt/procedures/buffer_setType.sql | 2 +- .../srt/procedures/buffer_setTypeByName.sql | 2 +- db/routines/srt/procedures/clean.sql | 2 +- .../srt/procedures/expeditionLoading_add.sql | 2 +- db/routines/srt/procedures/expedition_arrived.sql | 2 +- .../srt/procedures/expedition_bufferOut.sql | 2 +- db/routines/srt/procedures/expedition_entering.sql | 2 +- db/routines/srt/procedures/expedition_get.sql | 2 +- db/routines/srt/procedures/expedition_groupOut.sql | 2 +- db/routines/srt/procedures/expedition_in.sql | 2 +- db/routines/srt/procedures/expedition_moving.sql | 2 +- db/routines/srt/procedures/expedition_out.sql | 2 +- db/routines/srt/procedures/expedition_outAll.sql | 2 +- db/routines/srt/procedures/expedition_relocate.sql | 2 +- db/routines/srt/procedures/expedition_reset.sql | 2 +- db/routines/srt/procedures/expedition_routeOut.sql | 2 +- db/routines/srt/procedures/expedition_scan.sql | 2 +- .../srt/procedures/expedition_setDimensions.sql | 2 +- db/routines/srt/procedures/expedition_weighing.sql | 2 +- db/routines/srt/procedures/failureLog_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add_beta.sql | 2 +- db/routines/srt/procedures/moving_CollidingSet.sql | 2 +- db/routines/srt/procedures/moving_between.sql | 2 +- db/routines/srt/procedures/moving_clean.sql | 2 +- db/routines/srt/procedures/moving_delete.sql | 2 +- db/routines/srt/procedures/moving_groupOut.sql | 2 +- db/routines/srt/procedures/moving_next.sql | 2 +- db/routines/srt/procedures/photocell_setActive.sql | 2 +- db/routines/srt/procedures/randomMoving.sql | 2 +- db/routines/srt/procedures/randomMoving_Launch.sql | 2 +- db/routines/srt/procedures/restart.sql | 2 +- db/routines/srt/procedures/start.sql | 2 +- db/routines/srt/procedures/stop.sql | 2 +- db/routines/srt/procedures/test.sql | 2 +- .../srt/triggers/expedition_beforeUpdate.sql | 2 +- db/routines/srt/triggers/moving_afterInsert.sql | 2 +- db/routines/srt/views/bufferDayMinute.sql | 2 +- db/routines/srt/views/bufferFreeLength.sql | 2 +- db/routines/srt/views/bufferStock.sql | 2 +- db/routines/srt/views/routePalletized.sql | 2 +- db/routines/srt/views/ticketPalletized.sql | 2 +- db/routines/srt/views/upperStickers.sql | 2 +- db/routines/stock/events/log_clean.sql | 2 +- db/routines/stock/events/log_syncNoWait.sql | 2 +- db/routines/stock/procedures/inbound_addPick.sql | 2 +- .../stock/procedures/inbound_removePick.sql | 2 +- .../stock/procedures/inbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/inbound_sync.sql | 2 +- db/routines/stock/procedures/log_clean.sql | 2 +- db/routines/stock/procedures/log_delete.sql | 2 +- db/routines/stock/procedures/log_refreshAll.sql | 2 +- db/routines/stock/procedures/log_refreshBuy.sql | 2 +- db/routines/stock/procedures/log_refreshOrder.sql | 2 +- db/routines/stock/procedures/log_refreshSale.sql | 2 +- db/routines/stock/procedures/log_sync.sql | 2 +- db/routines/stock/procedures/log_syncNoWait.sql | 2 +- .../stock/procedures/outbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/outbound_sync.sql | 2 +- db/routines/stock/procedures/visible_log.sql | 2 +- db/routines/stock/triggers/inbound_afterDelete.sql | 2 +- .../stock/triggers/inbound_beforeInsert.sql | 2 +- .../stock/triggers/outbound_afterDelete.sql | 2 +- .../stock/triggers/outbound_beforeInsert.sql | 2 +- db/routines/tmp/events/clean.sql | 2 +- db/routines/tmp/procedures/clean.sql | 2 +- db/routines/util/events/slowLog_prune.sql | 2 +- db/routines/util/functions/VN_CURDATE.sql | 2 +- db/routines/util/functions/VN_CURTIME.sql | 2 +- db/routines/util/functions/VN_NOW.sql | 2 +- db/routines/util/functions/VN_UNIX_TIMESTAMP.sql | 2 +- db/routines/util/functions/VN_UTC_DATE.sql | 2 +- db/routines/util/functions/VN_UTC_TIME.sql | 2 +- db/routines/util/functions/VN_UTC_TIMESTAMP.sql | 2 +- db/routines/util/functions/accountNumberToIban.sql | 2 +- .../util/functions/accountShortToStandard.sql | 2 +- .../util/functions/binlogQueue_getDelay.sql | 2 +- db/routines/util/functions/capitalizeFirst.sql | 2 +- db/routines/util/functions/checkPrintableChars.sql | 2 +- db/routines/util/functions/crypt.sql | 2 +- db/routines/util/functions/cryptOff.sql | 2 +- db/routines/util/functions/dayEnd.sql | 2 +- db/routines/util/functions/firstDayOfMonth.sql | 2 +- db/routines/util/functions/firstDayOfYear.sql | 2 +- db/routines/util/functions/formatRow.sql | 2 +- db/routines/util/functions/formatTable.sql | 2 +- db/routines/util/functions/hasDateOverlapped.sql | 2 +- db/routines/util/functions/hmacSha2.sql | 2 +- db/routines/util/functions/isLeapYear.sql | 2 +- db/routines/util/functions/json_removeNulls.sql | 2 +- db/routines/util/functions/lang.sql | 2 +- db/routines/util/functions/lastDayOfYear.sql | 2 +- db/routines/util/functions/log_formatDate.sql | 2 +- db/routines/util/functions/midnight.sql | 2 +- db/routines/util/functions/mockTime.sql | 2 +- db/routines/util/functions/mockTimeBase.sql | 2 +- db/routines/util/functions/mockUtcTime.sql | 2 +- db/routines/util/functions/nextWeek.sql | 2 +- db/routines/util/functions/notification_send.sql | 2 +- db/routines/util/functions/quarterFirstDay.sql | 2 +- db/routines/util/functions/quoteIdentifier.sql | 2 +- db/routines/util/functions/stringXor.sql | 2 +- db/routines/util/functions/today.sql | 2 +- db/routines/util/functions/tomorrow.sql | 2 +- db/routines/util/functions/twoDaysAgo.sql | 2 +- .../util/functions/yearRelativePosition.sql | 2 +- db/routines/util/functions/yesterday.sql | 2 +- db/routines/util/procedures/checkHex.sql | 2 +- db/routines/util/procedures/connection_kill.sql | 2 +- db/routines/util/procedures/debugAdd.sql | 2 +- db/routines/util/procedures/exec.sql | 2 +- db/routines/util/procedures/log_add.sql | 2 +- db/routines/util/procedures/log_addWithUser.sql | 2 +- db/routines/util/procedures/log_cleanInstances.sql | 2 +- db/routines/util/procedures/procNoOverlap.sql | 2 +- db/routines/util/procedures/proc_changedPrivs.sql | 2 +- db/routines/util/procedures/proc_restorePrivs.sql | 2 +- db/routines/util/procedures/proc_savePrivs.sql | 2 +- db/routines/util/procedures/slowLog_prune.sql | 2 +- db/routines/util/procedures/throw.sql | 2 +- db/routines/util/procedures/time_generate.sql | 2 +- db/routines/util/procedures/tx_commit.sql | 2 +- db/routines/util/procedures/tx_rollback.sql | 2 +- db/routines/util/procedures/tx_start.sql | 2 +- db/routines/util/procedures/warn.sql | 2 +- db/routines/util/views/eventLogGrouped.sql | 2 +- db/routines/vn/events/claim_changeState.sql | 2 +- .../vn/events/client_unassignSalesPerson.sql | 2 +- db/routines/vn/events/client_userDisable.sql | 2 +- db/routines/vn/events/collection_make.sql | 2 +- db/routines/vn/events/department_doCalc.sql | 2 +- db/routines/vn/events/envialiaThreHoldChecker.sql | 2 +- db/routines/vn/events/greuge_notify.sql | 2 +- db/routines/vn/events/itemImageQueue_check.sql | 8 ++++---- .../vn/events/itemShelvingSale_doReserve.sql | 2 +- .../vn/events/mysqlConnectionsSorter_kill.sql | 2 +- db/routines/vn/events/printQueue_check.sql | 2 +- db/routines/vn/events/raidUpdate.sql | 2 +- db/routines/vn/events/route_doRecalc.sql | 2 +- db/routines/vn/events/vehicle_notify.sql | 2 +- db/routines/vn/events/workerJourney_doRecalc.sql | 2 +- .../vn/events/worker_updateChangedBusiness.sql | 2 +- db/routines/vn/events/zoneGeo_doCalc.sql | 2 +- db/routines/vn/functions/MIDNIGHT.sql | 2 +- db/routines/vn/functions/addressTaxArea.sql | 2 +- db/routines/vn/functions/address_getGeo.sql | 2 +- db/routines/vn/functions/barcodeToItem.sql | 2 +- db/routines/vn/functions/buy_getUnitVolume.sql | 2 +- db/routines/vn/functions/buy_getVolume.sql | 2 +- .../vn/functions/catalog_componentReverse.sql | 2 +- db/routines/vn/functions/clientGetMana.sql | 2 +- db/routines/vn/functions/clientGetSalesPerson.sql | 2 +- db/routines/vn/functions/clientTaxArea.sql | 2 +- db/routines/vn/functions/client_getDebt.sql | 14 +++++++------- db/routines/vn/functions/client_getFromPhone.sql | 2 +- db/routines/vn/functions/client_getSalesPerson.sql | 2 +- .../vn/functions/client_getSalesPersonByTicket.sql | 2 +- .../vn/functions/client_getSalesPersonCode.sql | 2 +- .../client_getSalesPersonCodeByTicket.sql | 2 +- .../vn/functions/client_hasDifferentCountries.sql | 2 +- db/routines/vn/functions/collection_isPacked.sql | 2 +- .../vn/functions/currency_getCommission.sql | 2 +- db/routines/vn/functions/currentRate.sql | 2 +- .../deviceProductionUser_accessGranted.sql | 2 +- db/routines/vn/functions/duaTax_getRate.sql | 2 +- db/routines/vn/functions/ekt_getEntry.sql | 2 +- db/routines/vn/functions/ekt_getTravel.sql | 2 +- db/routines/vn/functions/entry_getCommission.sql | 2 +- db/routines/vn/functions/entry_getCurrency.sql | 2 +- db/routines/vn/functions/entry_getForLogiflora.sql | 2 +- db/routines/vn/functions/entry_isIntrastat.sql | 2 +- .../vn/functions/entry_isInventoryOrPrevious.sql | 2 +- db/routines/vn/functions/expedition_checkRoute.sql | 2 +- db/routines/vn/functions/firstDayOfWeek.sql | 2 +- db/routines/vn/functions/getAlert3State.sql | 2 +- db/routines/vn/functions/getDueDate.sql | 2 +- db/routines/vn/functions/getInventoryDate.sql | 6 +++--- db/routines/vn/functions/getNewItemId.sql | 2 +- db/routines/vn/functions/getNextDueDate.sql | 2 +- db/routines/vn/functions/getShipmentHour.sql | 2 +- db/routines/vn/functions/getSpecialPrice.sql | 2 +- .../vn/functions/getTicketTrolleyLabelCount.sql | 2 +- db/routines/vn/functions/getUser.sql | 2 +- db/routines/vn/functions/getUserId.sql | 2 +- db/routines/vn/functions/hasAnyNegativeBase.sql | 2 +- db/routines/vn/functions/hasAnyPositiveBase.sql | 2 +- db/routines/vn/functions/hasItemsInSector.sql | 2 +- db/routines/vn/functions/hasSomeNegativeBase.sql | 2 +- db/routines/vn/functions/intrastat_estimateNet.sql | 2 +- db/routines/vn/functions/invoiceOutAmount.sql | 2 +- .../vn/functions/invoiceOut_getMaxIssued.sql | 2 +- db/routines/vn/functions/invoiceOut_getPath.sql | 2 +- db/routines/vn/functions/invoiceOut_getWeight.sql | 2 +- db/routines/vn/functions/invoiceSerial.sql | 2 +- db/routines/vn/functions/invoiceSerialArea.sql | 2 +- db/routines/vn/functions/isLogifloraDay.sql | 2 +- db/routines/vn/functions/itemPacking.sql | 2 +- .../itemShelvingPlacementSupply_ClosestGet.sql | 2 +- db/routines/vn/functions/itemTag_getIntValue.sql | 2 +- db/routines/vn/functions/item_getFhImage.sql | 2 +- db/routines/vn/functions/item_getPackage.sql | 2 +- db/routines/vn/functions/item_getVolume.sql | 2 +- db/routines/vn/functions/itemsInSector_get.sql | 2 +- db/routines/vn/functions/lastDayOfWeek.sql | 2 +- db/routines/vn/functions/machine_checkPlate.sql | 2 +- db/routines/vn/functions/messageSend.sql | 2 +- db/routines/vn/functions/messageSendWithUser.sql | 2 +- db/routines/vn/functions/orderTotalVolume.sql | 2 +- db/routines/vn/functions/orderTotalVolumeBoxes.sql | 2 +- db/routines/vn/functions/packaging_calculate.sql | 2 +- db/routines/vn/functions/priceFixed_getRate2.sql | 2 +- db/routines/vn/functions/routeProposal.sql | 2 +- db/routines/vn/functions/routeProposal_.sql | 2 +- db/routines/vn/functions/routeProposal_beta.sql | 2 +- db/routines/vn/functions/sale_hasComponentLack.sql | 2 +- db/routines/vn/functions/specie_IsForbidden.sql | 2 +- db/routines/vn/functions/testCIF.sql | 2 +- db/routines/vn/functions/testNIE.sql | 2 +- db/routines/vn/functions/testNIF.sql | 2 +- .../vn/functions/ticketCollection_getNoPacked.sql | 2 +- db/routines/vn/functions/ticketGetTotal.sql | 2 +- db/routines/vn/functions/ticketPositionInPath.sql | 2 +- db/routines/vn/functions/ticketSplitCounter.sql | 2 +- db/routines/vn/functions/ticketTotalVolume.sql | 2 +- .../vn/functions/ticketTotalVolumeBoxes.sql | 2 +- db/routines/vn/functions/ticketWarehouseGet.sql | 2 +- db/routines/vn/functions/ticket_CC_volume.sql | 2 +- db/routines/vn/functions/ticket_HasUbication.sql | 2 +- db/routines/vn/functions/ticket_get.sql | 2 +- db/routines/vn/functions/ticket_getFreightCost.sql | 2 +- db/routines/vn/functions/ticket_getWeight.sql | 2 +- .../vn/functions/ticket_isOutClosureZone.sql | 2 +- .../vn/functions/ticket_isProblemCalcNeeded.sql | 2 +- db/routines/vn/functions/ticket_isTooLittle.sql | 2 +- db/routines/vn/functions/till_new.sql | 2 +- .../functions/timeWorkerControl_getDirection.sql | 2 +- db/routines/vn/functions/time_getSalesYear.sql | 2 +- .../vn/functions/travel_getForLogiflora.sql | 2 +- db/routines/vn/functions/travel_hasUniqueAwb.sql | 2 +- db/routines/vn/functions/validationCode.sql | 2 +- db/routines/vn/functions/validationCode_beta.sql | 2 +- .../vn/functions/workerMachinery_isRegistered.sql | 2 +- .../vn/functions/workerNigthlyHours_calculate.sql | 2 +- db/routines/vn/functions/worker_getCode.sql | 2 +- db/routines/vn/functions/worker_isBoss.sql | 2 +- db/routines/vn/functions/worker_isInDepartment.sql | 2 +- db/routines/vn/functions/worker_isWorking.sql | 2 +- db/routines/vn/functions/zoneGeo_new.sql | 2 +- db/routines/vn/procedures/XDiario_check.sql | 2 +- db/routines/vn/procedures/XDiario_checkDate.sql | 2 +- .../vn/procedures/absoluteInventoryHistory.sql | 2 +- .../vn/procedures/addAccountReconciliation.sql | 2 +- db/routines/vn/procedures/addNoteFromDelivery.sql | 2 +- db/routines/vn/procedures/addressTaxArea.sql | 2 +- .../vn/procedures/address_updateCoordinates.sql | 2 +- .../vn/procedures/agencyHourGetFirstShipped.sql | 2 +- db/routines/vn/procedures/agencyHourGetLanded.sql | 2 +- .../vn/procedures/agencyHourGetWarehouse.sql | 2 +- .../vn/procedures/agencyHourListGetShipped.sql | 2 +- db/routines/vn/procedures/agencyVolume.sql | 2 +- db/routines/vn/procedures/available_calc.sql | 2 +- db/routines/vn/procedures/available_traslate.sql | 2 +- .../vn/procedures/balanceNestTree_addChild.sql | 2 +- .../vn/procedures/balanceNestTree_delete.sql | 2 +- db/routines/vn/procedures/balanceNestTree_move.sql | 2 +- db/routines/vn/procedures/balance_create.sql | 2 +- db/routines/vn/procedures/bankEntity_checkBic.sql | 2 +- .../vn/procedures/bankPolicy_notifyExpired.sql | 2 +- db/routines/vn/procedures/buyUltimate.sql | 2 +- .../vn/procedures/buyUltimateFromInterval.sql | 2 +- db/routines/vn/procedures/buy_afterUpsert.sql | 2 +- db/routines/vn/procedures/buy_checkGrouping.sql | 2 +- db/routines/vn/procedures/buy_chekItem.sql | 2 +- db/routines/vn/procedures/buy_clone.sql | 2 +- db/routines/vn/procedures/buy_getSplit.sql | 2 +- db/routines/vn/procedures/buy_getVolume.sql | 2 +- .../vn/procedures/buy_getVolumeByAgency.sql | 2 +- db/routines/vn/procedures/buy_getVolumeByEntry.sql | 2 +- db/routines/vn/procedures/buy_recalcPrices.sql | 2 +- .../vn/procedures/buy_recalcPricesByAwb.sql | 2 +- .../vn/procedures/buy_recalcPricesByBuy.sql | 2 +- .../vn/procedures/buy_recalcPricesByEntry.sql | 2 +- db/routines/vn/procedures/buy_scan.sql | 2 +- db/routines/vn/procedures/buy_updateGrouping.sql | 2 +- db/routines/vn/procedures/buy_updatePacking.sql | 2 +- db/routines/vn/procedures/catalog_calcFromItem.sql | 2 +- db/routines/vn/procedures/catalog_calculate.sql | 2 +- .../vn/procedures/catalog_componentCalculate.sql | 2 +- .../vn/procedures/catalog_componentPrepare.sql | 2 +- .../vn/procedures/catalog_componentPurge.sql | 2 +- db/routines/vn/procedures/claimRatio_add.sql | 2 +- db/routines/vn/procedures/clean.sql | 2 +- db/routines/vn/procedures/clean_logiflora.sql | 2 +- db/routines/vn/procedures/clearShelvingList.sql | 2 +- db/routines/vn/procedures/clientDebtSpray.sql | 2 +- db/routines/vn/procedures/clientFreeze.sql | 2 +- db/routines/vn/procedures/clientGetDebtDiary.sql | 2 +- db/routines/vn/procedures/clientGreugeSpray.sql | 2 +- .../vn/procedures/clientPackagingOverstock.sql | 2 +- .../procedures/clientPackagingOverstockReturn.sql | 2 +- db/routines/vn/procedures/clientRemoveWorker.sql | 2 +- db/routines/vn/procedures/clientRisk_update.sql | 2 +- db/routines/vn/procedures/client_RandomList.sql | 2 +- db/routines/vn/procedures/client_checkBalance.sql | 2 +- db/routines/vn/procedures/client_create.sql | 2 +- db/routines/vn/procedures/client_getDebt.sql | 2 +- db/routines/vn/procedures/client_getMana.sql | 2 +- db/routines/vn/procedures/client_getRisk.sql | 2 +- .../vn/procedures/client_unassignSalesPerson.sql | 2 +- db/routines/vn/procedures/client_userDisable.sql | 2 +- db/routines/vn/procedures/cmrPallet_add.sql | 2 +- .../vn/procedures/collectionPlacement_get.sql | 2 +- db/routines/vn/procedures/collection_addItem.sql | 2 +- .../procedures/collection_addWithReservation.sql | 2 +- db/routines/vn/procedures/collection_assign.sql | 2 +- db/routines/vn/procedures/collection_get.sql | 2 +- .../vn/procedures/collection_getAssigned.sql | 2 +- .../vn/procedures/collection_getTickets.sql | 2 +- db/routines/vn/procedures/collection_kill.sql | 2 +- db/routines/vn/procedures/collection_make.sql | 2 +- db/routines/vn/procedures/collection_new.sql | 2 +- .../vn/procedures/collection_printSticker.sql | 2 +- .../vn/procedures/collection_setParking.sql | 2 +- db/routines/vn/procedures/collection_setState.sql | 2 +- .../vn/procedures/company_getFiscaldata.sql | 2 +- .../vn/procedures/company_getSuppliersDebt.sql | 2 +- db/routines/vn/procedures/comparative_add.sql | 2 +- .../vn/procedures/confection_controlSource.sql | 2 +- .../vn/procedures/conveyorExpedition_Add.sql | 2 +- .../vn/procedures/copyComponentsFromSaleList.sql | 2 +- db/routines/vn/procedures/createPedidoInterno.sql | 2 +- .../vn/procedures/creditInsurance_getRisk.sql | 2 +- db/routines/vn/procedures/creditRecovery.sql | 2 +- db/routines/vn/procedures/crypt.sql | 2 +- db/routines/vn/procedures/cryptOff.sql | 2 +- db/routines/vn/procedures/department_calcTree.sql | 2 +- .../vn/procedures/department_calcTreeRec.sql | 2 +- db/routines/vn/procedures/department_doCalc.sql | 2 +- .../vn/procedures/department_getHasMistake.sql | 2 +- db/routines/vn/procedures/department_getLeaves.sql | 2 +- db/routines/vn/procedures/deviceLog_add.sql | 2 +- .../vn/procedures/deviceProductionUser_exists.sql | 2 +- .../procedures/deviceProductionUser_getWorker.sql | 2 +- .../procedures/deviceProduction_getnameDevice.sql | 2 +- db/routines/vn/procedures/device_checkLogin.sql | 2 +- db/routines/vn/procedures/duaEntryValueUpdate.sql | 2 +- db/routines/vn/procedures/duaInvoiceInBooking.sql | 2 +- db/routines/vn/procedures/duaParcialMake.sql | 2 +- db/routines/vn/procedures/duaTaxBooking.sql | 2 +- db/routines/vn/procedures/duaTax_doRecalc.sql | 2 +- db/routines/vn/procedures/ediTables_Update.sql | 2 +- .../vn/procedures/ektEntryAssign_setEntry.sql | 2 +- db/routines/vn/procedures/energyMeter_record.sql | 2 +- db/routines/vn/procedures/entryDelivered.sql | 2 +- db/routines/vn/procedures/entryWithItem.sql | 2 +- db/routines/vn/procedures/entry_checkPackaging.sql | 2 +- db/routines/vn/procedures/entry_clone.sql | 2 +- db/routines/vn/procedures/entry_cloneHeader.sql | 2 +- .../vn/procedures/entry_cloneWithoutBuy.sql | 2 +- db/routines/vn/procedures/entry_copyBuys.sql | 2 +- db/routines/vn/procedures/entry_fixMisfit.sql | 2 +- db/routines/vn/procedures/entry_getRate.sql | 2 +- db/routines/vn/procedures/entry_getTransfer.sql | 2 +- db/routines/vn/procedures/entry_isEditable.sql | 2 +- db/routines/vn/procedures/entry_lock.sql | 2 +- db/routines/vn/procedures/entry_moveNotPrinted.sql | 2 +- db/routines/vn/procedures/entry_notifyChanged.sql | 2 +- db/routines/vn/procedures/entry_recalc.sql | 2 +- .../vn/procedures/entry_splitByShelving.sql | 2 +- db/routines/vn/procedures/entry_splitMisfit.sql | 2 +- db/routines/vn/procedures/entry_unlock.sql | 2 +- .../vn/procedures/entry_updateComission.sql | 2 +- .../vn/procedures/expeditionGetFromRoute.sql | 2 +- db/routines/vn/procedures/expeditionPallet_Del.sql | 2 +- .../vn/procedures/expeditionPallet_List.sql | 2 +- .../vn/procedures/expeditionPallet_View.sql | 2 +- .../vn/procedures/expeditionPallet_build.sql | 2 +- .../vn/procedures/expeditionPallet_printLabel.sql | 2 +- db/routines/vn/procedures/expeditionScan_Add.sql | 2 +- db/routines/vn/procedures/expeditionScan_Del.sql | 2 +- db/routines/vn/procedures/expeditionScan_List.sql | 2 +- db/routines/vn/procedures/expeditionScan_Put.sql | 2 +- db/routines/vn/procedures/expeditionState_add.sql | 2 +- .../vn/procedures/expeditionState_addByAdress.sql | 2 +- .../procedures/expeditionState_addByExpedition.sql | 2 +- .../vn/procedures/expeditionState_addByPallet.sql | 2 +- .../vn/procedures/expeditionState_addByRoute.sql | 2 +- db/routines/vn/procedures/expedition_StateGet.sql | 2 +- .../vn/procedures/expedition_getFromRoute.sql | 2 +- db/routines/vn/procedures/expedition_getState.sql | 2 +- db/routines/vn/procedures/freelance_getInfo.sql | 2 +- db/routines/vn/procedures/getDayExpeditions.sql | 2 +- db/routines/vn/procedures/getInfoDelivery.sql | 2 +- db/routines/vn/procedures/getPedidosInternos.sql | 2 +- db/routines/vn/procedures/getTaxBases.sql | 2 +- db/routines/vn/procedures/greuge_add.sql | 2 +- db/routines/vn/procedures/greuge_notifyEvents.sql | 2 +- db/routines/vn/procedures/inventoryFailureAdd.sql | 2 +- db/routines/vn/procedures/inventoryMake.sql | 2 +- .../vn/procedures/inventoryMakeLauncher.sql | 2 +- db/routines/vn/procedures/inventory_repair.sql | 2 +- db/routines/vn/procedures/invoiceExpenseMake.sql | 2 +- db/routines/vn/procedures/invoiceFromAddress.sql | 2 +- db/routines/vn/procedures/invoiceFromClient.sql | 2 +- db/routines/vn/procedures/invoiceFromTicket.sql | 2 +- .../vn/procedures/invoiceInDueDay_calculate.sql | 2 +- .../vn/procedures/invoiceInDueDay_recalc.sql | 2 +- .../vn/procedures/invoiceInTaxMakeByDua.sql | 2 +- .../vn/procedures/invoiceInTax_afterUpsert.sql | 2 +- .../vn/procedures/invoiceInTax_getFromDua.sql | 2 +- .../vn/procedures/invoiceInTax_getFromEntries.sql | 2 +- db/routines/vn/procedures/invoiceInTax_recalc.sql | 2 +- db/routines/vn/procedures/invoiceIn_booking.sql | 2 +- .../vn/procedures/invoiceIn_checkBooked.sql | 2 +- db/routines/vn/procedures/invoiceOutAgain.sql | 2 +- db/routines/vn/procedures/invoiceOutBooking.sql | 2 +- .../vn/procedures/invoiceOutBookingRange.sql | 2 +- .../vn/procedures/invoiceOutListByCompany.sql | 2 +- .../vn/procedures/invoiceOutTaxAndExpense.sql | 2 +- .../invoiceOut_exportationFromClient.sql | 2 +- db/routines/vn/procedures/invoiceOut_new.sql | 2 +- .../vn/procedures/invoiceOut_newFromClient.sql | 2 +- .../vn/procedures/invoiceOut_newFromTicket.sql | 2 +- db/routines/vn/procedures/invoiceTaxMake.sql | 2 +- db/routines/vn/procedures/itemBarcode_update.sql | 2 +- db/routines/vn/procedures/itemFuentesBalance.sql | 2 +- .../vn/procedures/itemPlacementFromTicket.sql | 2 +- .../vn/procedures/itemPlacementSupplyAiming.sql | 2 +- .../procedures/itemPlacementSupplyCloseOrder.sql | 2 +- .../vn/procedures/itemPlacementSupplyGetOrder.sql | 2 +- .../itemPlacementSupplyStockGetTargetList.sql | 2 +- db/routines/vn/procedures/itemRefreshTags.sql | 2 +- db/routines/vn/procedures/itemSale_byWeek.sql | 2 +- db/routines/vn/procedures/itemSaveMin.sql | 2 +- db/routines/vn/procedures/itemSearchShelving.sql | 2 +- db/routines/vn/procedures/itemShelvingDelete.sql | 2 +- db/routines/vn/procedures/itemShelvingLog_get.sql | 2 +- .../vn/procedures/itemShelvingMakeFromDate.sql | 2 +- db/routines/vn/procedures/itemShelvingMatch.sql | 2 +- .../procedures/itemShelvingPlacementSupplyAdd.sql | 2 +- db/routines/vn/procedures/itemShelvingProblem.sql | 2 +- db/routines/vn/procedures/itemShelvingRadar.sql | 2 +- .../vn/procedures/itemShelvingRadar_Entry.sql | 2 +- .../itemShelvingRadar_Entry_State_beta.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_Add.sql | 2 +- .../itemShelvingSale_addByCollection.sql | 2 +- .../vn/procedures/itemShelvingSale_addBySale.sql | 2 +- .../itemShelvingSale_addBySectorCollection.sql | 2 +- .../vn/procedures/itemShelvingSale_doReserve.sql | 2 +- .../vn/procedures/itemShelvingSale_reallocate.sql | 2 +- .../vn/procedures/itemShelvingSale_setPicked.sql | 2 +- .../vn/procedures/itemShelvingSale_setQuantity.sql | 2 +- .../vn/procedures/itemShelvingSale_unpicked.sql | 2 +- db/routines/vn/procedures/itemShelving_add.sql | 2 +- .../vn/procedures/itemShelving_addByClaim.sql | 2 +- db/routines/vn/procedures/itemShelving_addList.sql | 2 +- .../vn/procedures/itemShelving_filterBuyer.sql | 2 +- db/routines/vn/procedures/itemShelving_get.sql | 2 +- .../vn/procedures/itemShelving_getAlternatives.sql | 2 +- db/routines/vn/procedures/itemShelving_getInfo.sql | 2 +- .../vn/procedures/itemShelving_getItemDetails.sql | 2 +- .../vn/procedures/itemShelving_getSaleDate.sql | 8 ++++---- .../vn/procedures/itemShelving_inventory.sql | 2 +- .../vn/procedures/itemShelving_selfConsumption.sql | 2 +- .../vn/procedures/itemShelving_transfer.sql | 2 +- db/routines/vn/procedures/itemShelving_update.sql | 2 +- db/routines/vn/procedures/itemTagMake.sql | 2 +- db/routines/vn/procedures/itemTagReorder.sql | 2 +- db/routines/vn/procedures/itemTagReorderByName.sql | 2 +- db/routines/vn/procedures/itemTag_replace.sql | 2 +- db/routines/vn/procedures/itemTopSeller.sql | 2 +- db/routines/vn/procedures/itemUpdateTag.sql | 2 +- db/routines/vn/procedures/item_calcVisible.sql | 2 +- db/routines/vn/procedures/item_cleanFloramondo.sql | 2 +- db/routines/vn/procedures/item_comparative.sql | 2 +- .../vn/procedures/item_deactivateUnused.sql | 2 +- db/routines/vn/procedures/item_devalueA2.sql | 2 +- db/routines/vn/procedures/item_getAtp.sql | 2 +- db/routines/vn/procedures/item_getBalance.sql | 2 +- db/routines/vn/procedures/item_getInfo.sql | 2 +- db/routines/vn/procedures/item_getLack.sql | 2 +- db/routines/vn/procedures/item_getMinETD.sql | 2 +- db/routines/vn/procedures/item_getMinacum.sql | 2 +- db/routines/vn/procedures/item_getSimilar.sql | 2 +- db/routines/vn/procedures/item_getStock.sql | 2 +- db/routines/vn/procedures/item_multipleBuy.sql | 2 +- .../vn/procedures/item_multipleBuyByDate.sql | 2 +- db/routines/vn/procedures/item_refreshFromTags.sql | 2 +- db/routines/vn/procedures/item_refreshTags.sql | 2 +- db/routines/vn/procedures/item_saveReference.sql | 2 +- db/routines/vn/procedures/item_setGeneric.sql | 2 +- .../vn/procedures/item_setVisibleDiscard.sql | 2 +- .../vn/procedures/item_updatePackingType.sql | 2 +- .../vn/procedures/item_valuateInventory.sql | 2 +- db/routines/vn/procedures/item_zoneClosure.sql | 2 +- .../vn/procedures/ledger_doCompensation.sql | 2 +- db/routines/vn/procedures/ledger_next.sql | 2 +- db/routines/vn/procedures/ledger_nextTx.sql | 2 +- db/routines/vn/procedures/logShow.sql | 2 +- db/routines/vn/procedures/lungSize_generator.sql | 2 +- db/routines/vn/procedures/machineWorker_add.sql | 2 +- .../vn/procedures/machineWorker_getHistorical.sql | 2 +- db/routines/vn/procedures/machineWorker_update.sql | 2 +- .../vn/procedures/machine_getWorkerPlate.sql | 2 +- db/routines/vn/procedures/mail_insert.sql | 2 +- db/routines/vn/procedures/makeNewItem.sql | 2 +- db/routines/vn/procedures/makePCSGraf.sql | 2 +- db/routines/vn/procedures/manaSpellersRequery.sql | 2 +- db/routines/vn/procedures/multipleInventory.sql | 2 +- .../vn/procedures/mysqlConnectionsSorter_kill.sql | 2 +- .../vn/procedures/mysqlPreparedCount_check.sql | 2 +- db/routines/vn/procedures/nextShelvingCodeMake.sql | 2 +- db/routines/vn/procedures/observationAdd.sql | 2 +- db/routines/vn/procedures/orderCreate.sql | 2 +- db/routines/vn/procedures/orderDelete.sql | 2 +- db/routines/vn/procedures/orderListCreate.sql | 2 +- db/routines/vn/procedures/orderListVolume.sql | 2 +- db/routines/vn/procedures/packingListSwitch.sql | 2 +- .../vn/procedures/packingSite_startCollection.sql | 2 +- db/routines/vn/procedures/parking_add.sql | 2 +- db/routines/vn/procedures/parking_algemesi.sql | 2 +- db/routines/vn/procedures/parking_new.sql | 2 +- db/routines/vn/procedures/parking_setOrder.sql | 2 +- db/routines/vn/procedures/payment_add.sql | 2 +- db/routines/vn/procedures/prepareClientList.sql | 2 +- db/routines/vn/procedures/prepareTicketList.sql | 2 +- db/routines/vn/procedures/previousSticker_get.sql | 2 +- db/routines/vn/procedures/printer_checkSector.sql | 2 +- db/routines/vn/procedures/productionControl.sql | 2 +- db/routines/vn/procedures/productionError_add.sql | 2 +- .../productionError_addCheckerPackager.sql | 2 +- db/routines/vn/procedures/productionSectorList.sql | 2 +- db/routines/vn/procedures/raidUpdate.sql | 2 +- db/routines/vn/procedures/rangeDateInfo.sql | 2 +- db/routines/vn/procedures/rateView.sql | 2 +- db/routines/vn/procedures/rate_getPrices.sql | 2 +- db/routines/vn/procedures/recipe_Plaster.sql | 2 +- db/routines/vn/procedures/remittance_calc.sql | 2 +- .../vn/procedures/reportLabelCollection_get.sql | 2 +- db/routines/vn/procedures/report_print.sql | 2 +- db/routines/vn/procedures/routeGuessPriority.sql | 2 +- db/routines/vn/procedures/routeInfo.sql | 2 +- .../vn/procedures/routeMonitor_calculate.sql | 2 +- db/routines/vn/procedures/routeSetOk.sql | 2 +- db/routines/vn/procedures/routeUpdateM3.sql | 2 +- db/routines/vn/procedures/route_calcCommission.sql | 2 +- db/routines/vn/procedures/route_doRecalc.sql | 2 +- db/routines/vn/procedures/route_getTickets.sql | 2 +- db/routines/vn/procedures/route_updateM3.sql | 2 +- db/routines/vn/procedures/saleBuy_Add.sql | 2 +- db/routines/vn/procedures/saleGroup_add.sql | 2 +- db/routines/vn/procedures/saleGroup_setParking.sql | 2 +- db/routines/vn/procedures/saleMistake_Add.sql | 2 +- db/routines/vn/procedures/salePreparingList.sql | 2 +- db/routines/vn/procedures/saleSplit.sql | 2 +- db/routines/vn/procedures/saleTracking_add.sql | 2 +- .../saleTracking_addPreparedSaleGroup.sql | 2 +- .../vn/procedures/saleTracking_addPrevOK.sql | 2 +- db/routines/vn/procedures/saleTracking_del.sql | 2 +- db/routines/vn/procedures/saleTracking_new.sql | 2 +- .../vn/procedures/saleTracking_updateIsChecked.sql | 2 +- db/routines/vn/procedures/sale_PriceFix.sql | 2 +- db/routines/vn/procedures/sale_boxPickingPrint.sql | 2 +- .../vn/procedures/sale_calculateComponent.sql | 2 +- .../vn/procedures/sale_getBoxPickingList.sql | 2 +- .../procedures/sale_getFromTicketOrCollection.sql | 2 +- db/routines/vn/procedures/sale_getProblems.sql | 2 +- .../vn/procedures/sale_getProblemsByTicket.sql | 2 +- db/routines/vn/procedures/sale_recalcComponent.sql | 2 +- db/routines/vn/procedures/sale_replaceItem.sql | 2 +- db/routines/vn/procedures/sale_setProblem.sql | 2 +- .../vn/procedures/sale_setProblemComponentLack.sql | 2 +- .../sale_setProblemComponentLackByComponent.sql | 2 +- .../vn/procedures/sale_setProblemRounding.sql | 2 +- db/routines/vn/procedures/sales_merge.sql | 2 +- .../vn/procedures/sales_mergeByCollection.sql | 2 +- .../procedures/sectorCollectionSaleGroup_add.sql | 2 +- db/routines/vn/procedures/sectorCollection_get.sql | 2 +- .../procedures/sectorCollection_getMyPartial.sql | 2 +- .../vn/procedures/sectorCollection_getSale.sql | 2 +- .../sectorCollection_hasSalesReserved.sql | 2 +- db/routines/vn/procedures/sectorCollection_new.sql | 8 ++++---- .../vn/procedures/sectorProductivity_add.sql | 2 +- db/routines/vn/procedures/sector_getWarehouse.sql | 2 +- db/routines/vn/procedures/setParking.sql | 2 +- db/routines/vn/procedures/shelvingChange.sql | 2 +- db/routines/vn/procedures/shelvingLog_get.sql | 2 +- db/routines/vn/procedures/shelvingParking_get.sql | 2 +- .../vn/procedures/shelvingPriority_update.sql | 2 +- db/routines/vn/procedures/shelving_clean.sql | 2 +- db/routines/vn/procedures/shelving_getSpam.sql | 2 +- db/routines/vn/procedures/shelving_setParking.sql | 2 +- db/routines/vn/procedures/sleep_X_min.sql | 2 +- db/routines/vn/procedures/stockBuyedByWorker.sql | 2 +- db/routines/vn/procedures/stockBuyed_add.sql | 2 +- db/routines/vn/procedures/stockTraslation.sql | 2 +- db/routines/vn/procedures/subordinateGetList.sql | 2 +- db/routines/vn/procedures/supplierExpenses.sql | 2 +- .../procedures/supplierPackaging_ReportSource.sql | 2 +- .../vn/procedures/supplier_checkBalance.sql | 2 +- .../vn/procedures/supplier_checkIsActive.sql | 2 +- .../supplier_disablePayMethodChecked.sql | 2 +- db/routines/vn/procedures/supplier_statement.sql | 2 +- db/routines/vn/procedures/ticketBoxesView.sql | 2 +- db/routines/vn/procedures/ticketBuiltTime.sql | 2 +- db/routines/vn/procedures/ticketCalculateClon.sql | 2 +- .../vn/procedures/ticketCalculateFromType.sql | 2 +- db/routines/vn/procedures/ticketCalculatePurge.sql | 2 +- db/routines/vn/procedures/ticketClon.sql | 2 +- db/routines/vn/procedures/ticketClon_OneYear.sql | 2 +- db/routines/vn/procedures/ticketCollection_get.sql | 2 +- .../procedures/ticketCollection_setUsedShelves.sql | 2 +- .../vn/procedures/ticketComponentUpdate.sql | 2 +- .../vn/procedures/ticketComponentUpdateSale.sql | 2 +- .../procedures/ticketDown_PrintableSelection.sql | 2 +- db/routines/vn/procedures/ticketGetTaxAdd.sql | 2 +- db/routines/vn/procedures/ticketGetTax_new.sql | 2 +- db/routines/vn/procedures/ticketGetTotal.sql | 2 +- .../vn/procedures/ticketGetVisibleAvailable.sql | 2 +- .../vn/procedures/ticketNotInvoicedByClient.sql | 2 +- .../vn/procedures/ticketObservation_addNewBorn.sql | 2 +- db/routines/vn/procedures/ticketPackaging_add.sql | 2 +- .../vn/procedures/ticketParking_findSkipped.sql | 2 +- .../vn/procedures/ticketStateToday_setState.sql | 2 +- .../vn/procedures/ticketToInvoiceByAddress.sql | 2 +- .../vn/procedures/ticketToInvoiceByDate.sql | 2 +- db/routines/vn/procedures/ticketToInvoiceByRef.sql | 2 +- db/routines/vn/procedures/ticket_Clone.sql | 2 +- db/routines/vn/procedures/ticket_DelayTruck.sql | 2 +- .../vn/procedures/ticket_DelayTruckSplit.sql | 2 +- .../vn/procedures/ticket_WeightDeclaration.sql | 2 +- db/routines/vn/procedures/ticket_add.sql | 2 +- .../vn/procedures/ticket_administrativeCopy.sql | 2 +- db/routines/vn/procedures/ticket_canAdvance.sql | 2 +- db/routines/vn/procedures/ticket_canMerge.sql | 2 +- .../vn/procedures/ticket_canbePostponed.sql | 2 +- .../vn/procedures/ticket_checkNoComponents.sql | 2 +- db/routines/vn/procedures/ticket_cloneAll.sql | 2 +- db/routines/vn/procedures/ticket_cloneWeekly.sql | 2 +- db/routines/vn/procedures/ticket_close.sql | 2 +- db/routines/vn/procedures/ticket_closeByTicket.sql | 2 +- .../vn/procedures/ticket_componentMakeUpdate.sql | 2 +- .../vn/procedures/ticket_componentPreview.sql | 2 +- db/routines/vn/procedures/ticket_doCmr.sql | 2 +- .../vn/procedures/ticket_getFromFloramondo.sql | 2 +- db/routines/vn/procedures/ticket_getMovable.sql | 2 +- db/routines/vn/procedures/ticket_getProblems.sql | 2 +- db/routines/vn/procedures/ticket_getSplitList.sql | 2 +- db/routines/vn/procedures/ticket_getTax.sql | 2 +- db/routines/vn/procedures/ticket_getWarnings.sql | 2 +- .../vn/procedures/ticket_getWithParameters.sql | 2 +- db/routines/vn/procedures/ticket_insertZone.sql | 2 +- .../vn/procedures/ticket_priceDifference.sql | 2 +- .../vn/procedures/ticket_printLabelPrevious.sql | 2 +- db/routines/vn/procedures/ticket_recalc.sql | 2 +- db/routines/vn/procedures/ticket_recalcByScope.sql | 2 +- .../vn/procedures/ticket_recalcComponents.sql | 2 +- db/routines/vn/procedures/ticket_setNextState.sql | 2 +- db/routines/vn/procedures/ticket_setParking.sql | 2 +- .../vn/procedures/ticket_setPreviousState.sql | 2 +- db/routines/vn/procedures/ticket_setProblem.sql | 2 +- .../vn/procedures/ticket_setProblemFreeze.sql | 2 +- .../vn/procedures/ticket_setProblemRequest.sql | 2 +- .../vn/procedures/ticket_setProblemRisk.sql | 2 +- .../vn/procedures/ticket_setProblemRounding.sql | 2 +- .../procedures/ticket_setProblemTaxDataChecked.sql | 2 +- .../vn/procedures/ticket_setProblemTooLittle.sql | 2 +- .../ticket_setProblemTooLittleItemCost.sql | 2 +- db/routines/vn/procedures/ticket_setRisk.sql | 2 +- db/routines/vn/procedures/ticket_setState.sql | 2 +- db/routines/vn/procedures/ticket_split.sql | 2 +- .../vn/procedures/ticket_splitItemPackingType.sql | 2 +- .../vn/procedures/ticket_splitPackingComplete.sql | 2 +- .../vn/procedures/timeBusiness_calculate.sql | 2 +- .../vn/procedures/timeBusiness_calculateAll.sql | 2 +- .../timeBusiness_calculateByDepartment.sql | 2 +- .../vn/procedures/timeBusiness_calculateByUser.sql | 2 +- .../procedures/timeBusiness_calculateByWorker.sql | 2 +- .../vn/procedures/timeControl_calculate.sql | 2 +- .../vn/procedures/timeControl_calculateAll.sql | 2 +- .../timeControl_calculateByDepartment.sql | 2 +- .../vn/procedures/timeControl_calculateByUser.sql | 2 +- .../procedures/timeControl_calculateByWorker.sql | 2 +- db/routines/vn/procedures/timeControl_getError.sql | 2 +- .../vn/procedures/tpvTransaction_checkStatus.sql | 2 +- db/routines/vn/procedures/travelVolume.sql | 2 +- db/routines/vn/procedures/travelVolume_get.sql | 2 +- db/routines/vn/procedures/travel_checkDates.sql | 2 +- .../vn/procedures/travel_checkPackaging.sql | 2 +- .../travel_checkWarehouseIsFeedStock.sql | 2 +- db/routines/vn/procedures/travel_clone.sql | 2 +- .../vn/procedures/travel_cloneWithEntries.sql | 2 +- .../procedures/travel_getDetailFromContinent.sql | 2 +- .../procedures/travel_getEntriesMissingPackage.sql | 2 +- db/routines/vn/procedures/travel_moveRaids.sql | 2 +- db/routines/vn/procedures/travel_recalc.sql | 2 +- db/routines/vn/procedures/travel_throwAwb.sql | 2 +- .../vn/procedures/travel_upcomingArrivals.sql | 2 +- db/routines/vn/procedures/travel_updatePacking.sql | 2 +- db/routines/vn/procedures/travel_weeklyClone.sql | 2 +- db/routines/vn/procedures/typeTagMake.sql | 2 +- .../vn/procedures/updatePedidosInternos.sql | 2 +- .../vn/procedures/vehicle_checkNumberPlate.sql | 2 +- db/routines/vn/procedures/vehicle_notifyEvents.sql | 2 +- db/routines/vn/procedures/visible_getMisfit.sql | 2 +- db/routines/vn/procedures/warehouseFitting.sql | 2 +- .../vn/procedures/warehouseFitting_byTravel.sql | 2 +- db/routines/vn/procedures/workerCalculateBoss.sql | 2 +- .../workerCalendar_calculateBusiness.sql | 2 +- .../vn/procedures/workerCalendar_calculateYear.sql | 2 +- db/routines/vn/procedures/workerCreateExternal.sql | 2 +- .../vn/procedures/workerDepartmentByDate.sql | 2 +- db/routines/vn/procedures/workerDisable.sql | 2 +- db/routines/vn/procedures/workerDisableAll.sql | 2 +- .../vn/procedures/workerForAllCalculateBoss.sql | 2 +- .../vn/procedures/workerJourney_replace.sql | 2 +- .../vn/procedures/workerMistakeType_get.sql | 2 +- db/routines/vn/procedures/workerMistake_add.sql | 2 +- .../vn/procedures/workerTimeControlSOWP.sql | 2 +- .../workerTimeControl_calculateOddDays.sql | 2 +- .../vn/procedures/workerTimeControl_check.sql | 2 +- .../vn/procedures/workerTimeControl_checkBreak.sql | 2 +- .../vn/procedures/workerTimeControl_clockIn.sql | 2 +- .../vn/procedures/workerTimeControl_direction.sql | 2 +- .../vn/procedures/workerTimeControl_getClockIn.sql | 2 +- .../vn/procedures/workerTimeControl_login.sql | 2 +- .../vn/procedures/workerTimeControl_remove.sql | 2 +- .../workerTimeControl_sendMailByDepartment.sql | 2 +- ...kerTimeControl_sendMailByDepartmentLauncher.sql | 2 +- .../workerTimeControl_weekCheckBreak.sql | 2 +- db/routines/vn/procedures/workerWeekControl.sql | 2 +- .../vn/procedures/worker_checkMultipleDevice.sql | 2 +- .../vn/procedures/worker_getFromHasMistake.sql | 2 +- db/routines/vn/procedures/worker_getHierarchy.sql | 2 +- db/routines/vn/procedures/worker_getSector.sql | 2 +- db/routines/vn/procedures/worker_updateBalance.sql | 2 +- .../vn/procedures/worker_updateBusiness.sql | 2 +- .../vn/procedures/worker_updateChangedBusiness.sql | 2 +- db/routines/vn/procedures/workingHours.sql | 2 +- db/routines/vn/procedures/workingHoursTimeIn.sql | 2 +- db/routines/vn/procedures/workingHoursTimeOut.sql | 2 +- .../vn/procedures/wrongEqualizatedClient.sql | 2 +- db/routines/vn/procedures/xdiario_new.sql | 2 +- db/routines/vn/procedures/zoneClosure_recalc.sql | 2 +- db/routines/vn/procedures/zoneGeo_calcTree.sql | 2 +- db/routines/vn/procedures/zoneGeo_calcTreeRec.sql | 2 +- db/routines/vn/procedures/zoneGeo_checkName.sql | 2 +- db/routines/vn/procedures/zoneGeo_delete.sql | 2 +- db/routines/vn/procedures/zoneGeo_doCalc.sql | 2 +- db/routines/vn/procedures/zoneGeo_setParent.sql | 2 +- .../vn/procedures/zoneGeo_throwNotEditable.sql | 2 +- db/routines/vn/procedures/zone_excludeFromGeo.sql | 2 +- db/routines/vn/procedures/zone_getAddresses.sql | 2 +- db/routines/vn/procedures/zone_getAgency.sql | 2 +- db/routines/vn/procedures/zone_getAvailable.sql | 2 +- db/routines/vn/procedures/zone_getClosed.sql | 2 +- db/routines/vn/procedures/zone_getCollisions.sql | 2 +- db/routines/vn/procedures/zone_getEvents.sql | 2 +- db/routines/vn/procedures/zone_getFromGeo.sql | 2 +- db/routines/vn/procedures/zone_getLanded.sql | 2 +- db/routines/vn/procedures/zone_getLeaves.sql | 10 +++++----- .../vn/procedures/zone_getOptionsForLanding.sql | 2 +- .../vn/procedures/zone_getOptionsForShipment.sql | 2 +- db/routines/vn/procedures/zone_getPostalCode.sql | 8 ++++---- db/routines/vn/procedures/zone_getShipped.sql | 2 +- db/routines/vn/procedures/zone_getState.sql | 2 +- db/routines/vn/procedures/zone_getWarehouse.sql | 2 +- .../vn/procedures/zone_upcomingDeliveries.sql | 2 +- db/routines/vn/triggers/XDiario_beforeInsert.sql | 2 +- db/routines/vn/triggers/XDiario_beforeUpdate.sql | 2 +- .../accountReconciliation_beforeInsert.sql | 2 +- db/routines/vn/triggers/address_afterDelete.sql | 2 +- db/routines/vn/triggers/address_afterInsert.sql | 2 +- db/routines/vn/triggers/address_afterUpdate.sql | 2 +- db/routines/vn/triggers/address_beforeInsert.sql | 2 +- db/routines/vn/triggers/address_beforeUpdate.sql | 2 +- db/routines/vn/triggers/agency_afterInsert.sql | 2 +- db/routines/vn/triggers/agency_beforeInsert.sql | 2 +- db/routines/vn/triggers/autonomy_afterDelete.sql | 2 +- db/routines/vn/triggers/autonomy_beforeInsert.sql | 2 +- db/routines/vn/triggers/autonomy_beforeUpdate.sql | 2 +- .../vn/triggers/awbInvoiceIn_afterDelete.sql | 2 +- db/routines/vn/triggers/awb_beforeInsert.sql | 2 +- .../vn/triggers/bankEntity_beforeInsert.sql | 2 +- .../vn/triggers/bankEntity_beforeUpdate.sql | 2 +- .../vn/triggers/budgetNotes_beforeInsert.sql | 2 +- db/routines/vn/triggers/business_afterDelete.sql | 2 +- db/routines/vn/triggers/business_afterInsert.sql | 2 +- db/routines/vn/triggers/business_afterUpdate.sql | 2 +- db/routines/vn/triggers/business_beforeInsert.sql | 2 +- db/routines/vn/triggers/business_beforeUpdate.sql | 2 +- db/routines/vn/triggers/buy_afterDelete.sql | 2 +- db/routines/vn/triggers/buy_afterInsert.sql | 2 +- db/routines/vn/triggers/buy_afterUpdate.sql | 2 +- db/routines/vn/triggers/buy_beforeDelete.sql | 2 +- db/routines/vn/triggers/buy_beforeInsert.sql | 2 +- db/routines/vn/triggers/buy_beforeUpdate.sql | 2 +- db/routines/vn/triggers/calendar_afterDelete.sql | 14 +++++++------- db/routines/vn/triggers/calendar_beforeInsert.sql | 2 +- db/routines/vn/triggers/calendar_beforeUpdate.sql | 6 +++--- .../vn/triggers/claimBeginning_afterDelete.sql | 2 +- .../vn/triggers/claimBeginning_beforeInsert.sql | 2 +- .../vn/triggers/claimBeginning_beforeUpdate.sql | 2 +- .../vn/triggers/claimDevelopment_afterDelete.sql | 2 +- .../vn/triggers/claimDevelopment_beforeInsert.sql | 2 +- .../vn/triggers/claimDevelopment_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimDms_afterDelete.sql | 2 +- db/routines/vn/triggers/claimDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimEnd_afterDelete.sql | 2 +- db/routines/vn/triggers/claimEnd_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimEnd_beforeUpdate.sql | 2 +- .../vn/triggers/claimObservation_afterDelete.sql | 2 +- .../vn/triggers/claimObservation_beforeInsert.sql | 2 +- .../vn/triggers/claimObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimRatio_afterInsert.sql | 2 +- db/routines/vn/triggers/claimRatio_afterUpdate.sql | 2 +- db/routines/vn/triggers/claimState_afterDelete.sql | 2 +- .../vn/triggers/claimState_beforeInsert.sql | 2 +- .../vn/triggers/claimState_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claim_afterDelete.sql | 2 +- db/routines/vn/triggers/claim_beforeInsert.sql | 2 +- db/routines/vn/triggers/claim_beforeUpdate.sql | 2 +- .../vn/triggers/clientContact_afterDelete.sql | 2 +- .../vn/triggers/clientContact_beforeInsert.sql | 2 +- .../vn/triggers/clientCredit_afterInsert.sql | 2 +- db/routines/vn/triggers/clientDms_afterDelete.sql | 2 +- db/routines/vn/triggers/clientDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientDms_beforeUpdate.sql | 2 +- .../vn/triggers/clientObservation_afterDelete.sql | 2 +- .../vn/triggers/clientObservation_beforeInsert.sql | 2 +- .../vn/triggers/clientObservation_beforeUpdate.sql | 2 +- .../vn/triggers/clientSample_afterDelete.sql | 2 +- .../vn/triggers/clientSample_beforeInsert.sql | 2 +- .../vn/triggers/clientSample_beforeUpdate.sql | 2 +- .../vn/triggers/clientUnpaid_beforeInsert.sql | 2 +- .../vn/triggers/clientUnpaid_beforeUpdate.sql | 2 +- db/routines/vn/triggers/client_afterDelete.sql | 2 +- db/routines/vn/triggers/client_afterInsert.sql | 2 +- db/routines/vn/triggers/client_afterUpdate.sql | 2 +- db/routines/vn/triggers/client_beforeInsert.sql | 2 +- db/routines/vn/triggers/client_beforeUpdate.sql | 2 +- db/routines/vn/triggers/cmr_beforeDelete.sql | 2 +- .../vn/triggers/collectionColors_beforeInsert.sql | 2 +- .../vn/triggers/collectionColors_beforeUpdate.sql | 2 +- .../triggers/collectionVolumetry_afterDelete.sql | 2 +- .../triggers/collectionVolumetry_afterInsert.sql | 2 +- .../triggers/collectionVolumetry_afterUpdate.sql | 2 +- .../vn/triggers/collection_beforeUpdate.sql | 2 +- db/routines/vn/triggers/country_afterDelete.sql | 2 +- db/routines/vn/triggers/country_afterInsert.sql | 2 +- db/routines/vn/triggers/country_afterUpdate.sql | 2 +- db/routines/vn/triggers/country_beforeInsert.sql | 2 +- db/routines/vn/triggers/country_beforeUpdate.sql | 2 +- .../triggers/creditClassification_beforeUpdate.sql | 2 +- .../vn/triggers/creditInsurance_afterInsert.sql | 2 +- .../vn/triggers/creditInsurance_beforeInsert.sql | 2 +- db/routines/vn/triggers/delivery_beforeInsert.sql | 2 +- db/routines/vn/triggers/delivery_beforeUpdate.sql | 2 +- db/routines/vn/triggers/department_afterDelete.sql | 2 +- db/routines/vn/triggers/department_afterUpdate.sql | 2 +- .../vn/triggers/department_beforeDelete.sql | 2 +- .../vn/triggers/department_beforeInsert.sql | 2 +- .../deviceProductionModels_beforeInsert.sql | 2 +- .../deviceProductionModels_beforeUpdate.sql | 2 +- .../deviceProductionState_beforeInsert.sql | 2 +- .../deviceProductionState_beforeUpdate.sql | 2 +- .../triggers/deviceProductionUser_afterDelete.sql | 2 +- .../triggers/deviceProductionUser_afterInsert.sql | 2 +- .../triggers/deviceProductionUser_beforeInsert.sql | 2 +- .../triggers/deviceProductionUser_beforeUpdate.sql | 2 +- .../vn/triggers/deviceProduction_afterDelete.sql | 2 +- .../vn/triggers/deviceProduction_beforeInsert.sql | 2 +- .../vn/triggers/deviceProduction_beforeUpdate.sql | 2 +- db/routines/vn/triggers/dms_beforeDelete.sql | 2 +- db/routines/vn/triggers/dms_beforeInsert.sql | 2 +- db/routines/vn/triggers/dms_beforeUpdate.sql | 12 ++++++------ db/routines/vn/triggers/duaTax_beforeInsert.sql | 2 +- db/routines/vn/triggers/duaTax_beforeUpdate.sql | 2 +- .../vn/triggers/ektEntryAssign_afterInsert.sql | 2 +- .../vn/triggers/ektEntryAssign_afterUpdate.sql | 2 +- db/routines/vn/triggers/entryDms_afterDelete.sql | 2 +- db/routines/vn/triggers/entryDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/entryDms_beforeUpdate.sql | 2 +- .../vn/triggers/entryObservation_afterDelete.sql | 2 +- .../vn/triggers/entryObservation_beforeInsert.sql | 2 +- .../vn/triggers/entryObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/entry_afterDelete.sql | 2 +- db/routines/vn/triggers/entry_afterUpdate.sql | 2 +- db/routines/vn/triggers/entry_beforeDelete.sql | 2 +- db/routines/vn/triggers/entry_beforeInsert.sql | 2 +- db/routines/vn/triggers/entry_beforeUpdate.sql | 2 +- .../vn/triggers/expeditionPallet_beforeInsert.sql | 2 +- .../vn/triggers/expeditionScan_beforeInsert.sql | 2 +- .../vn/triggers/expeditionState_afterInsert.sql | 2 +- .../vn/triggers/expeditionState_beforeInsert.sql | 2 +- .../vn/triggers/expeditionTruck_beforeInsert.sql | 10 ---------- .../vn/triggers/expeditionTruck_beforeUpdate.sql | 10 ---------- db/routines/vn/triggers/expedition_afterDelete.sql | 2 +- .../vn/triggers/expedition_beforeDelete.sql | 2 +- .../vn/triggers/expedition_beforeInsert.sql | 2 +- .../vn/triggers/expedition_beforeUpdate.sql | 2 +- .../vn/triggers/floramondoConfig_afterInsert.sql | 2 +- db/routines/vn/triggers/gregue_beforeInsert.sql | 2 +- db/routines/vn/triggers/greuge_afterDelete.sql | 2 +- db/routines/vn/triggers/greuge_beforeInsert.sql | 2 +- db/routines/vn/triggers/greuge_beforeUpdate.sql | 2 +- db/routines/vn/triggers/host_beforeUpdate.sql | 2 +- .../vn/triggers/invoiceInDueDay_afterDelete.sql | 2 +- .../vn/triggers/invoiceInDueDay_beforeInsert.sql | 2 +- .../vn/triggers/invoiceInDueDay_beforeUpdate.sql | 2 +- .../vn/triggers/invoiceInTax_afterDelete.sql | 2 +- .../vn/triggers/invoiceInTax_beforeInsert.sql | 2 +- .../vn/triggers/invoiceInTax_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceIn_afterDelete.sql | 2 +- db/routines/vn/triggers/invoiceIn_afterUpdate.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeDelete.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeInsert.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceOut_afterInsert.sql | 2 +- .../vn/triggers/invoiceOut_beforeDelete.sql | 2 +- .../vn/triggers/invoiceOut_beforeInsert.sql | 2 +- .../vn/triggers/invoiceOut_beforeUpdate.sql | 2 +- .../vn/triggers/itemBarcode_afterDelete.sql | 2 +- .../vn/triggers/itemBarcode_beforeInsert.sql | 2 +- .../vn/triggers/itemBarcode_beforeUpdate.sql | 2 +- .../vn/triggers/itemBotanical_afterDelete.sql | 2 +- .../vn/triggers/itemBotanical_beforeInsert.sql | 2 +- .../vn/triggers/itemBotanical_beforeUpdate.sql | 2 +- .../vn/triggers/itemCategory_afterInsert.sql | 2 +- db/routines/vn/triggers/itemCost_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemCost_beforeUpdate.sql | 2 +- .../triggers/itemMinimumQuantity_afterDelete.sql | 2 +- .../triggers/itemMinimumQuantity_beforeInsert.sql | 2 +- .../triggers/itemMinimumQuantity_beforeUpdate.sql | 2 +- .../vn/triggers/itemShelving _afterDelete.sql | 2 +- .../vn/triggers/itemShelvingSale_afterInsert.sql | 2 +- .../vn/triggers/itemShelving_afterUpdate.sql | 2 +- .../vn/triggers/itemShelving_beforeDelete.sql | 2 +- .../vn/triggers/itemShelving_beforeInsert.sql | 2 +- .../vn/triggers/itemShelving_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemTag_afterDelete.sql | 2 +- db/routines/vn/triggers/itemTag_afterInsert.sql | 2 +- db/routines/vn/triggers/itemTag_afterUpdate.sql | 2 +- db/routines/vn/triggers/itemTag_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemTag_beforeUpdate.sql | 2 +- .../vn/triggers/itemTaxCountry_afterDelete.sql | 2 +- .../vn/triggers/itemTaxCountry_beforeInsert.sql | 2 +- .../vn/triggers/itemTaxCountry_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemType_beforeUpdate.sql | 2 +- db/routines/vn/triggers/item_afterDelete.sql | 2 +- db/routines/vn/triggers/item_afterInsert.sql | 2 +- db/routines/vn/triggers/item_afterUpdate.sql | 2 +- db/routines/vn/triggers/item_beforeInsert.sql | 2 +- db/routines/vn/triggers/item_beforeUpdate.sql | 2 +- db/routines/vn/triggers/machine_beforeInsert.sql | 2 +- db/routines/vn/triggers/mail_beforeInsert.sql | 2 +- db/routines/vn/triggers/mandate_beforeInsert.sql | 2 +- db/routines/vn/triggers/operator_beforeInsert.sql | 2 +- db/routines/vn/triggers/operator_beforeUpdate.sql | 2 +- db/routines/vn/triggers/packaging_beforeInsert.sql | 2 +- db/routines/vn/triggers/packaging_beforeUpdate.sql | 2 +- .../vn/triggers/packingSite_afterDelete.sql | 2 +- .../vn/triggers/packingSite_beforeInsert.sql | 2 +- .../vn/triggers/packingSite_beforeUpdate.sql | 2 +- db/routines/vn/triggers/parking_afterDelete.sql | 2 +- db/routines/vn/triggers/parking_beforeInsert.sql | 2 +- db/routines/vn/triggers/parking_beforeUpdate.sql | 2 +- db/routines/vn/triggers/payment_afterInsert.sql | 2 +- db/routines/vn/triggers/payment_beforeInsert.sql | 2 +- db/routines/vn/triggers/payment_beforeUpdate.sql | 2 +- db/routines/vn/triggers/postCode_afterDelete.sql | 2 +- db/routines/vn/triggers/postCode_afterUpdate.sql | 2 +- db/routines/vn/triggers/postCode_beforeInsert.sql | 2 +- db/routines/vn/triggers/postCode_beforeUpdate.sql | 2 +- .../vn/triggers/priceFixed_beforeInsert.sql | 2 +- .../vn/triggers/priceFixed_beforeUpdate.sql | 2 +- .../vn/triggers/productionConfig_afterDelete.sql | 2 +- .../vn/triggers/productionConfig_beforeInsert.sql | 2 +- .../vn/triggers/productionConfig_beforeUpdate.sql | 2 +- .../vn/triggers/projectNotes_beforeInsert.sql | 2 +- db/routines/vn/triggers/province_afterDelete.sql | 2 +- db/routines/vn/triggers/province_afterUpdate.sql | 12 ++++++------ db/routines/vn/triggers/province_beforeInsert.sql | 2 +- db/routines/vn/triggers/province_beforeUpdate.sql | 2 +- db/routines/vn/triggers/rate_afterDelete.sql | 2 +- db/routines/vn/triggers/rate_beforeInsert.sql | 2 +- db/routines/vn/triggers/rate_beforeUpdate.sql | 2 +- db/routines/vn/triggers/receipt_afterInsert.sql | 2 +- db/routines/vn/triggers/receipt_afterUpdate.sql | 12 ++++++------ db/routines/vn/triggers/receipt_beforeDelete.sql | 2 +- db/routines/vn/triggers/receipt_beforeInsert.sql | 12 ++++++------ db/routines/vn/triggers/receipt_beforeUpdate.sql | 2 +- db/routines/vn/triggers/recovery_afterDelete.sql | 2 +- db/routines/vn/triggers/recovery_beforeInsert.sql | 2 +- db/routines/vn/triggers/recovery_beforeUpdate.sql | 2 +- .../vn/triggers/roadmapStop_beforeInsert.sql | 10 ++++++++++ .../vn/triggers/roadmapStop_beforeUpdate.sql | 10 ++++++++++ db/routines/vn/triggers/route_afterDelete.sql | 2 +- db/routines/vn/triggers/route_afterInsert.sql | 2 +- db/routines/vn/triggers/route_afterUpdate.sql | 2 +- db/routines/vn/triggers/route_beforeInsert.sql | 2 +- db/routines/vn/triggers/route_beforeUpdate.sql | 2 +- .../vn/triggers/routesMonitor_afterDelete.sql | 2 +- .../vn/triggers/routesMonitor_beforeInsert.sql | 2 +- .../vn/triggers/routesMonitor_beforeUpdate.sql | 2 +- db/routines/vn/triggers/saleBuy_beforeInsert.sql | 2 +- db/routines/vn/triggers/saleGroup_afterDelete.sql | 2 +- db/routines/vn/triggers/saleGroup_beforeInsert.sql | 2 +- db/routines/vn/triggers/saleGroup_beforeUpdate.sql | 2 +- db/routines/vn/triggers/saleLabel_afterUpdate.sql | 2 +- .../vn/triggers/saleTracking_afterInsert.sql | 2 +- db/routines/vn/triggers/sale_afterDelete.sql | 2 +- db/routines/vn/triggers/sale_afterInsert.sql | 2 +- db/routines/vn/triggers/sale_afterUpdate.sql | 2 +- db/routines/vn/triggers/sale_beforeDelete.sql | 2 +- db/routines/vn/triggers/sale_beforeInsert.sql | 2 +- db/routines/vn/triggers/sale_beforeUpdate.sql | 2 +- .../vn/triggers/sharingCart_beforeDelete.sql | 2 +- .../vn/triggers/sharingCart_beforeInsert.sql | 2 +- .../vn/triggers/sharingCart_beforeUpdate.sql | 2 +- .../vn/triggers/sharingClient_beforeInsert.sql | 2 +- .../vn/triggers/sharingClient_beforeUpdate.sql | 2 +- db/routines/vn/triggers/shelving_afterDelete.sql | 2 +- db/routines/vn/triggers/shelving_beforeInsert.sql | 2 +- db/routines/vn/triggers/shelving_beforeUpdate.sql | 2 +- .../vn/triggers/solunionCAP_afterInsert.sql | 2 +- .../vn/triggers/solunionCAP_afterUpdate.sql | 2 +- .../vn/triggers/solunionCAP_beforeDelete.sql | 2 +- db/routines/vn/triggers/specie_beforeInsert.sql | 2 +- db/routines/vn/triggers/specie_beforeUpdate.sql | 2 +- .../vn/triggers/supplierAccount_afterDelete.sql | 2 +- .../vn/triggers/supplierAccount_beforeInsert.sql | 2 +- .../vn/triggers/supplierAccount_beforeUpdate.sql | 2 +- .../vn/triggers/supplierAddress_afterDelete.sql | 2 +- .../vn/triggers/supplierAddress_beforeInsert.sql | 2 +- .../vn/triggers/supplierAddress_beforeUpdate.sql | 2 +- .../vn/triggers/supplierContact_afterDelete.sql | 2 +- .../vn/triggers/supplierContact_beforeInsert.sql | 2 +- .../vn/triggers/supplierContact_beforeUpdate.sql | 2 +- .../vn/triggers/supplierDms_afterDelete.sql | 2 +- .../vn/triggers/supplierDms_beforeInsert.sql | 2 +- .../vn/triggers/supplierDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplier_afterDelete.sql | 2 +- db/routines/vn/triggers/supplier_afterUpdate.sql | 2 +- db/routines/vn/triggers/supplier_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplier_beforeUpdate.sql | 2 +- db/routines/vn/triggers/tag_beforeInsert.sql | 2 +- .../vn/triggers/ticketCollection_afterDelete.sql | 12 ++++++------ db/routines/vn/triggers/ticketDms_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeDelete.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeUpdate.sql | 2 +- .../vn/triggers/ticketObservation_afterDelete.sql | 2 +- .../vn/triggers/ticketObservation_beforeInsert.sql | 2 +- .../vn/triggers/ticketObservation_beforeUpdate.sql | 2 +- .../vn/triggers/ticketPackaging_afterDelete.sql | 2 +- .../vn/triggers/ticketPackaging_beforeInsert.sql | 2 +- .../vn/triggers/ticketPackaging_beforeUpdate.sql | 2 +- .../vn/triggers/ticketParking_beforeInsert.sql | 2 +- .../vn/triggers/ticketRefund_afterDelete.sql | 2 +- .../vn/triggers/ticketRefund_beforeInsert.sql | 2 +- .../vn/triggers/ticketRefund_beforeUpdate.sql | 2 +- .../vn/triggers/ticketRequest_afterDelete.sql | 2 +- .../vn/triggers/ticketRequest_beforeInsert.sql | 2 +- .../vn/triggers/ticketRequest_beforeUpdate.sql | 2 +- .../vn/triggers/ticketService_afterDelete.sql | 2 +- .../vn/triggers/ticketService_beforeInsert.sql | 2 +- .../vn/triggers/ticketService_beforeUpdate.sql | 2 +- .../vn/triggers/ticketTracking_afterDelete.sql | 2 +- .../vn/triggers/ticketTracking_afterInsert.sql | 2 +- .../vn/triggers/ticketTracking_afterUpdate.sql | 2 +- .../vn/triggers/ticketTracking_beforeInsert.sql | 2 +- .../vn/triggers/ticketTracking_beforeUpdate.sql | 2 +- .../vn/triggers/ticketWeekly_afterDelete.sql | 2 +- .../vn/triggers/ticketWeekly_beforeInsert.sql | 2 +- .../vn/triggers/ticketWeekly_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticket_afterDelete.sql | 2 +- db/routines/vn/triggers/ticket_afterInsert.sql | 2 +- db/routines/vn/triggers/ticket_afterUpdate.sql | 2 +- db/routines/vn/triggers/ticket_beforeDelete.sql | 2 +- db/routines/vn/triggers/ticket_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticket_beforeUpdate.sql | 2 +- db/routines/vn/triggers/time_afterUpdate.sql | 2 +- db/routines/vn/triggers/town_afterDelete.sql | 2 +- db/routines/vn/triggers/town_afterUpdate.sql | 2 +- db/routines/vn/triggers/town_beforeInsert.sql | 2 +- db/routines/vn/triggers/town_beforeUpdate.sql | 2 +- .../vn/triggers/travelThermograph_afterDelete.sql | 2 +- .../vn/triggers/travelThermograph_beforeInsert.sql | 2 +- .../vn/triggers/travelThermograph_beforeUpdate.sql | 2 +- db/routines/vn/triggers/travel_afterDelete.sql | 2 +- db/routines/vn/triggers/travel_afterUpdate.sql | 2 +- db/routines/vn/triggers/travel_beforeInsert.sql | 2 +- db/routines/vn/triggers/travel_beforeUpdate.sql | 2 +- db/routines/vn/triggers/vehicle_beforeInsert.sql | 2 +- db/routines/vn/triggers/vehicle_beforeUpdate.sql | 2 +- db/routines/vn/triggers/warehouse_afterInsert.sql | 2 +- .../vn/triggers/workerDocument_afterDelete.sql | 2 +- .../vn/triggers/workerDocument_beforeInsert.sql | 2 +- .../vn/triggers/workerDocument_beforeUpdate.sql | 2 +- .../vn/triggers/workerIncome_afterDelete.sql | 2 +- .../vn/triggers/workerIncome_afterInsert.sql | 2 +- .../vn/triggers/workerIncome_afterUpdate.sql | 2 +- .../vn/triggers/workerTimeControl_afterDelete.sql | 14 +++++++------- .../vn/triggers/workerTimeControl_afterInsert.sql | 2 +- .../vn/triggers/workerTimeControl_beforeInsert.sql | 6 +++--- .../vn/triggers/workerTimeControl_beforeUpdate.sql | 6 +++--- db/routines/vn/triggers/worker_afterDelete.sql | 2 +- db/routines/vn/triggers/worker_beforeInsert.sql | 2 +- db/routines/vn/triggers/worker_beforeUpdate.sql | 2 +- .../vn/triggers/workingHours_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneEvent_afterDelete.sql | 2 +- db/routines/vn/triggers/zoneEvent_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneEvent_beforeUpdate.sql | 2 +- .../vn/triggers/zoneExclusion_afterDelete.sql | 2 +- .../vn/triggers/zoneExclusion_beforeInsert.sql | 2 +- .../vn/triggers/zoneExclusion_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zoneGeo_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneGeo_beforeUpdate.sql | 2 +- .../vn/triggers/zoneIncluded_afterDelete.sql | 2 +- .../vn/triggers/zoneIncluded_beforeInsert.sql | 2 +- .../vn/triggers/zoneIncluded_beforeUpdate.sql | 2 +- .../vn/triggers/zoneWarehouse_afterDelete.sql | 2 +- .../vn/triggers/zoneWarehouse_beforeInsert.sql | 2 +- .../vn/triggers/zoneWarehouse_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zone_afterDelete.sql | 2 +- db/routines/vn/triggers/zone_beforeInsert.sql | 2 +- db/routines/vn/triggers/zone_beforeUpdate.sql | 2 +- db/routines/vn/views/NewView.sql | 2 +- db/routines/vn/views/agencyTerm.sql | 2 +- db/routines/vn/views/annualAverageInvoiced.sql | 2 +- db/routines/vn/views/awbVolume.sql | 2 +- db/routines/vn/views/businessCalendar.sql | 2 +- db/routines/vn/views/buyer.sql | 2 +- db/routines/vn/views/buyerSales.sql | 2 +- db/routines/vn/views/clientLost.sql | 2 +- db/routines/vn/views/clientPhoneBook.sql | 2 +- db/routines/vn/views/companyL10n.sql | 2 +- db/routines/vn/views/defaulter.sql | 2 +- db/routines/vn/views/departmentTree.sql | 2 +- db/routines/vn/views/ediGenus.sql | 2 +- db/routines/vn/views/ediSpecie.sql | 2 +- db/routines/vn/views/ektSubAddress.sql | 2 +- db/routines/vn/views/especialPrice.sql | 2 +- db/routines/vn/views/exchangeInsuranceEntry.sql | 2 +- db/routines/vn/views/exchangeInsuranceIn.sql | 2 +- .../vn/views/exchangeInsuranceInPrevious.sql | 2 +- db/routines/vn/views/exchangeInsuranceOut.sql | 2 +- db/routines/vn/views/expeditionCommon.sql | 2 +- db/routines/vn/views/expeditionPallet_Print.sql | 2 +- db/routines/vn/views/expeditionRoute_Monitor.sql | 2 +- .../vn/views/expeditionRoute_freeTickets.sql | 2 +- db/routines/vn/views/expeditionScan_Monitor.sql | 2 +- db/routines/vn/views/expeditionSticker.sql | 2 +- db/routines/vn/views/expeditionTicket_NoBoxes.sql | 2 +- db/routines/vn/views/expeditionTimeExpended.sql | 2 +- db/routines/vn/views/expeditionTruck.sql | 2 +- db/routines/vn/views/firstTicketShipped.sql | 2 +- db/routines/vn/views/floraHollandBuyedItems.sql | 2 +- db/routines/vn/views/inkL10n.sql | 2 +- .../vn/views/invoiceCorrectionDataSource.sql | 2 +- db/routines/vn/views/itemBotanicalWithGenus.sql | 2 +- db/routines/vn/views/itemCategoryL10n.sql | 2 +- db/routines/vn/views/itemColor.sql | 2 +- db/routines/vn/views/itemEntryIn.sql | 2 +- db/routines/vn/views/itemEntryOut.sql | 2 +- db/routines/vn/views/itemInk.sql | 2 +- db/routines/vn/views/itemPlacementSupplyList.sql | 2 +- db/routines/vn/views/itemProductor.sql | 2 +- db/routines/vn/views/itemSearch.sql | 2 +- db/routines/vn/views/itemShelvingAvailable.sql | 2 +- db/routines/vn/views/itemShelvingList.sql | 2 +- .../vn/views/itemShelvingPlacementSupplyStock.sql | 2 +- db/routines/vn/views/itemShelvingSaleSum.sql | 2 +- db/routines/vn/views/itemShelvingStock.sql | 2 +- db/routines/vn/views/itemShelvingStockFull.sql | 2 +- db/routines/vn/views/itemShelvingStockRemoved.sql | 2 +- db/routines/vn/views/itemTagged.sql | 2 +- db/routines/vn/views/itemTaxCountrySpain.sql | 2 +- db/routines/vn/views/itemTicketOut.sql | 2 +- db/routines/vn/views/itemTypeL10n.sql | 2 +- db/routines/vn/views/item_Free_Id.sql | 2 +- db/routines/vn/views/labelInfo.sql | 2 +- db/routines/vn/views/lastHourProduction.sql | 2 +- db/routines/vn/views/lastPurchases.sql | 2 +- db/routines/vn/views/lastTopClaims.sql | 2 +- db/routines/vn/views/mistake.sql | 2 +- db/routines/vn/views/mistakeRatio.sql | 2 +- db/routines/vn/views/newBornSales.sql | 2 +- db/routines/vn/views/operatorWorkerCode.sql | 2 +- db/routines/vn/views/originL10n.sql | 2 +- db/routines/vn/views/packageEquivalentItem.sql | 2 +- db/routines/vn/views/paymentExchangeInsurance.sql | 2 +- db/routines/vn/views/payrollCenter.sql | 2 +- db/routines/vn/views/personMedia.sql | 2 +- db/routines/vn/views/phoneBook.sql | 2 +- db/routines/vn/views/productionVolume.sql | 2 +- db/routines/vn/views/productionVolume_LastHour.sql | 2 +- db/routines/vn/views/role.sql | 2 +- db/routines/vn/views/routesControl.sql | 2 +- db/routines/vn/views/saleCost.sql | 2 +- db/routines/vn/views/saleMistakeList.sql | 2 +- db/routines/vn/views/saleMistake_list__2.sql | 2 +- db/routines/vn/views/saleSaleTracking.sql | 2 +- db/routines/vn/views/saleValue.sql | 2 +- db/routines/vn/views/saleVolume.sql | 2 +- db/routines/vn/views/saleVolume_Today_VNH.sql | 2 +- db/routines/vn/views/sale_freightComponent.sql | 2 +- db/routines/vn/views/salesPersonSince.sql | 2 +- db/routines/vn/views/salesPreparedLastHour.sql | 2 +- db/routines/vn/views/salesPreviousPreparated.sql | 2 +- db/routines/vn/views/supplierPackaging.sql | 2 +- db/routines/vn/views/tagL10n.sql | 2 +- db/routines/vn/views/ticketDownBuffer.sql | 2 +- db/routines/vn/views/ticketLastUpdated.sql | 2 +- db/routines/vn/views/ticketLastUpdatedList.sql | 2 +- db/routines/vn/views/ticketNotInvoiced.sql | 2 +- db/routines/vn/views/ticketPackingList.sql | 2 +- .../vn/views/ticketPreviousPreparingList.sql | 2 +- db/routines/vn/views/ticketState.sql | 2 +- db/routines/vn/views/ticketStateToday.sql | 2 +- db/routines/vn/views/tr2.sql | 2 +- db/routines/vn/views/traceabilityBuy.sql | 2 +- db/routines/vn/views/traceabilitySale.sql | 2 +- db/routines/vn/views/workerBusinessDated.sql | 2 +- db/routines/vn/views/workerDepartment.sql | 2 +- db/routines/vn/views/workerLabour.sql | 2 +- db/routines/vn/views/workerMedia.sql | 2 +- db/routines/vn/views/workerSpeedExpedition.sql | 2 +- db/routines/vn/views/workerSpeedSaleTracking.sql | 2 +- db/routines/vn/views/workerTeamCollegues.sql | 2 +- db/routines/vn/views/workerTimeControlUserInfo.sql | 2 +- db/routines/vn/views/workerTimeJourneyNG.sql | 2 +- db/routines/vn/views/workerWithoutTractor.sql | 2 +- db/routines/vn/views/zoneEstimatedDelivery.sql | 2 +- db/routines/vn2008/views/Agencias.sql | 2 +- db/routines/vn2008/views/Articles.sql | 2 +- db/routines/vn2008/views/Bancos.sql | 2 +- db/routines/vn2008/views/Bancos_poliza.sql | 2 +- db/routines/vn2008/views/Cajas.sql | 2 +- db/routines/vn2008/views/Clientes.sql | 2 +- db/routines/vn2008/views/Comparativa.sql | 2 +- db/routines/vn2008/views/Compres.sql | 2 +- db/routines/vn2008/views/Compres_mark.sql | 2 +- db/routines/vn2008/views/Consignatarios.sql | 2 +- db/routines/vn2008/views/Cubos.sql | 2 +- db/routines/vn2008/views/Cubos_Retorno.sql | 2 +- db/routines/vn2008/views/Entradas.sql | 2 +- db/routines/vn2008/views/Entradas_Auto.sql | 2 +- db/routines/vn2008/views/Entradas_orden.sql | 2 +- db/routines/vn2008/views/Impresoras.sql | 2 +- db/routines/vn2008/views/Monedas.sql | 2 +- db/routines/vn2008/views/Movimientos.sql | 2 +- .../vn2008/views/Movimientos_componentes.sql | 2 +- db/routines/vn2008/views/Movimientos_mark.sql | 2 +- db/routines/vn2008/views/Ordenes.sql | 2 +- db/routines/vn2008/views/Origen.sql | 2 +- db/routines/vn2008/views/Paises.sql | 2 +- db/routines/vn2008/views/PreciosEspeciales.sql | 2 +- db/routines/vn2008/views/Proveedores.sql | 2 +- db/routines/vn2008/views/Proveedores_cargueras.sql | 2 +- db/routines/vn2008/views/Proveedores_gestdoc.sql | 2 +- db/routines/vn2008/views/Recibos.sql | 2 +- db/routines/vn2008/views/Remesas.sql | 2 +- db/routines/vn2008/views/Rutas.sql | 2 +- db/routines/vn2008/views/Split.sql | 2 +- db/routines/vn2008/views/Split_lines.sql | 2 +- db/routines/vn2008/views/Tickets.sql | 2 +- db/routines/vn2008/views/Tickets_state.sql | 2 +- db/routines/vn2008/views/Tickets_turno.sql | 2 +- db/routines/vn2008/views/Tintas.sql | 2 +- db/routines/vn2008/views/Tipos.sql | 2 +- db/routines/vn2008/views/Trabajadores.sql | 2 +- db/routines/vn2008/views/Tramos.sql | 2 +- db/routines/vn2008/views/V_edi_item_track.sql | 2 +- db/routines/vn2008/views/Vehiculos_consumo.sql | 2 +- db/routines/vn2008/views/account_conciliacion.sql | 2 +- db/routines/vn2008/views/account_detail.sql | 2 +- db/routines/vn2008/views/account_detail_type.sql | 2 +- db/routines/vn2008/views/agency.sql | 2 +- db/routines/vn2008/views/airline.sql | 2 +- db/routines/vn2008/views/airport.sql | 2 +- db/routines/vn2008/views/albaran.sql | 2 +- db/routines/vn2008/views/albaran_gestdoc.sql | 2 +- db/routines/vn2008/views/albaran_state.sql | 2 +- db/routines/vn2008/views/awb.sql | 2 +- db/routines/vn2008/views/awb_component.sql | 2 +- .../vn2008/views/awb_component_template.sql | 2 +- db/routines/vn2008/views/awb_component_type.sql | 2 +- db/routines/vn2008/views/awb_gestdoc.sql | 2 +- db/routines/vn2008/views/awb_recibida.sql | 2 +- db/routines/vn2008/views/awb_role.sql | 2 +- db/routines/vn2008/views/awb_unit.sql | 2 +- db/routines/vn2008/views/balance_nest_tree.sql | 2 +- db/routines/vn2008/views/barcodes.sql | 2 +- db/routines/vn2008/views/buySource.sql | 2 +- db/routines/vn2008/views/buy_edi.sql | 2 +- db/routines/vn2008/views/buy_edi_k012.sql | 2 +- db/routines/vn2008/views/buy_edi_k03.sql | 2 +- db/routines/vn2008/views/buy_edi_k04.sql | 2 +- db/routines/vn2008/views/cdr.sql | 2 +- db/routines/vn2008/views/chanel.sql | 2 +- db/routines/vn2008/views/cl_act.sql | 2 +- db/routines/vn2008/views/cl_cau.sql | 2 +- db/routines/vn2008/views/cl_con.sql | 2 +- db/routines/vn2008/views/cl_det.sql | 2 +- db/routines/vn2008/views/cl_main.sql | 2 +- db/routines/vn2008/views/cl_mot.sql | 2 +- db/routines/vn2008/views/cl_res.sql | 2 +- db/routines/vn2008/views/cl_sol.sql | 2 +- db/routines/vn2008/views/config_host.sql | 2 +- .../vn2008/views/consignatarios_observation.sql | 2 +- db/routines/vn2008/views/credit.sql | 2 +- db/routines/vn2008/views/definitivo.sql | 2 +- db/routines/vn2008/views/edi_article.sql | 2 +- db/routines/vn2008/views/edi_bucket.sql | 2 +- db/routines/vn2008/views/edi_bucket_type.sql | 2 +- db/routines/vn2008/views/edi_specie.sql | 2 +- db/routines/vn2008/views/edi_supplier.sql | 2 +- db/routines/vn2008/views/empresa.sql | 2 +- db/routines/vn2008/views/empresa_grupo.sql | 2 +- db/routines/vn2008/views/entrySource.sql | 2 +- db/routines/vn2008/views/financialProductType.sql | 2 +- db/routines/vn2008/views/flight.sql | 2 +- db/routines/vn2008/views/gastos_resumen.sql | 2 +- db/routines/vn2008/views/integra2.sql | 2 +- db/routines/vn2008/views/integra2_province.sql | 2 +- db/routines/vn2008/views/mail.sql | 2 +- db/routines/vn2008/views/mandato.sql | 2 +- db/routines/vn2008/views/mandato_tipo.sql | 2 +- db/routines/vn2008/views/pago.sql | 2 +- db/routines/vn2008/views/pago_sdc.sql | 2 +- db/routines/vn2008/views/pay_dem.sql | 2 +- db/routines/vn2008/views/pay_dem_det.sql | 2 +- db/routines/vn2008/views/pay_met.sql | 2 +- db/routines/vn2008/views/payrollWorker.sql | 2 +- db/routines/vn2008/views/payroll_categorias.sql | 2 +- db/routines/vn2008/views/payroll_centros.sql | 2 +- db/routines/vn2008/views/payroll_conceptos.sql | 2 +- db/routines/vn2008/views/plantpassport.sql | 2 +- .../vn2008/views/plantpassport_authority.sql | 2 +- db/routines/vn2008/views/price_fixed.sql | 2 +- db/routines/vn2008/views/producer.sql | 2 +- db/routines/vn2008/views/promissoryNote.sql | 2 +- db/routines/vn2008/views/proveedores_clientes.sql | 2 +- db/routines/vn2008/views/province.sql | 2 +- db/routines/vn2008/views/recibida.sql | 2 +- db/routines/vn2008/views/recibida_intrastat.sql | 2 +- db/routines/vn2008/views/recibida_iva.sql | 2 +- db/routines/vn2008/views/recibida_vencimiento.sql | 2 +- db/routines/vn2008/views/recovery.sql | 2 +- db/routines/vn2008/views/reference_rate.sql | 2 +- db/routines/vn2008/views/reinos.sql | 2 +- db/routines/vn2008/views/state.sql | 2 +- db/routines/vn2008/views/tag.sql | 2 +- db/routines/vn2008/views/tarifa_componentes.sql | 2 +- .../vn2008/views/tarifa_componentes_series.sql | 2 +- db/routines/vn2008/views/tblContadores.sql | 2 +- db/routines/vn2008/views/thermograph.sql | 2 +- db/routines/vn2008/views/ticket_observation.sql | 2 +- db/routines/vn2008/views/tickets_gestdoc.sql | 2 +- db/routines/vn2008/views/time.sql | 2 +- db/routines/vn2008/views/travel.sql | 2 +- db/routines/vn2008/views/v_Articles_botanical.sql | 2 +- db/routines/vn2008/views/v_compres.sql | 2 +- db/routines/vn2008/views/v_empresa.sql | 2 +- db/routines/vn2008/views/versiones.sql | 2 +- db/routines/vn2008/views/warehouse_pickup.sql | 2 +- .../11163-maroonEucalyptus/00-firstScript.sql | 2 ++ 1688 files changed, 1792 insertions(+), 1790 deletions(-) delete mode 100644 db/routines/vn/triggers/expeditionTruck_beforeInsert.sql delete mode 100644 db/routines/vn/triggers/expeditionTruck_beforeUpdate.sql create mode 100644 db/routines/vn/triggers/roadmapStop_beforeInsert.sql create mode 100644 db/routines/vn/triggers/roadmapStop_beforeUpdate.sql create mode 100644 db/versions/11163-maroonEucalyptus/00-firstScript.sql diff --git a/db/routines/account/functions/myUser_checkLogin.sql b/db/routines/account/functions/myUser_checkLogin.sql index ed55f0d13..4d5db887e 100644 --- a/db/routines/account/functions/myUser_checkLogin.sql +++ b/db/routines/account/functions/myUser_checkLogin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_checkLogin`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_checkLogin`() RETURNS tinyint(1) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getId.sql b/db/routines/account/functions/myUser_getId.sql index bc86c87dc..c8264c253 100644 --- a/db/routines/account/functions/myUser_getId.sql +++ b/db/routines/account/functions/myUser_getId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_getId`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_getId`() RETURNS int(11) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getName.sql b/db/routines/account/functions/myUser_getName.sql index 541f7c086..e4ea660eb 100644 --- a/db/routines/account/functions/myUser_getName.sql +++ b/db/routines/account/functions/myUser_getName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_getName`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_getName`() RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/account/functions/myUser_hasPriv.sql b/db/routines/account/functions/myUser_hasPriv.sql index b53580d74..05da92827 100644 --- a/db/routines/account/functions/myUser_hasPriv.sql +++ b/db/routines/account/functions/myUser_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE') ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/myUser_hasRole.sql b/db/routines/account/functions/myUser_hasRole.sql index 8cc8aafb5..e245cf1ce 100644 --- a/db/routines/account/functions/myUser_hasRole.sql +++ b/db/routines/account/functions/myUser_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoleId.sql b/db/routines/account/functions/myUser_hasRoleId.sql index d059b095d..ade2862a2 100644 --- a/db/routines/account/functions/myUser_hasRoleId.sql +++ b/db/routines/account/functions/myUser_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoutinePriv.sql b/db/routines/account/functions/myUser_hasRoutinePriv.sql index 9e9563a5f..5d5a7fe22 100644 --- a/db/routines/account/functions/myUser_hasRoutinePriv.sql +++ b/db/routines/account/functions/myUser_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100) ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/passwordGenerate.sql b/db/routines/account/functions/passwordGenerate.sql index 952a8912c..6d8427ad2 100644 --- a/db/routines/account/functions/passwordGenerate.sql +++ b/db/routines/account/functions/passwordGenerate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`passwordGenerate`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`passwordGenerate`() RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/toUnixDays.sql b/db/routines/account/functions/toUnixDays.sql index db908060b..ea23297d1 100644 --- a/db/routines/account/functions/toUnixDays.sql +++ b/db/routines/account/functions/toUnixDays.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getMysqlRole.sql b/db/routines/account/functions/user_getMysqlRole.sql index 91540bc6b..f2038de9a 100644 --- a/db/routines/account/functions/user_getMysqlRole.sql +++ b/db/routines/account/functions/user_getMysqlRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getNameFromId.sql b/db/routines/account/functions/user_getNameFromId.sql index b06facd7a..931ba8011 100644 --- a/db/routines/account/functions/user_getNameFromId.sql +++ b/db/routines/account/functions/user_getNameFromId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasPriv.sql b/db/routines/account/functions/user_hasPriv.sql index 83bdfaa19..1ba06c25a 100644 --- a/db/routines/account/functions/user_hasPriv.sql +++ b/db/routines/account/functions/user_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE'), vUserFk INT ) diff --git a/db/routines/account/functions/user_hasRole.sql b/db/routines/account/functions/user_hasRole.sql index fb88efeec..b8512c8d9 100644 --- a/db/routines/account/functions/user_hasRole.sql +++ b/db/routines/account/functions/user_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoleId.sql b/db/routines/account/functions/user_hasRoleId.sql index a35624d3d..f7a265892 100644 --- a/db/routines/account/functions/user_hasRoleId.sql +++ b/db/routines/account/functions/user_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoutinePriv.sql b/db/routines/account/functions/user_hasRoutinePriv.sql index 6f87f160c..151ccb69c 100644 --- a/db/routines/account/functions/user_hasRoutinePriv.sql +++ b/db/routines/account/functions/user_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100), vUserFk INT ) diff --git a/db/routines/account/procedures/account_enable.sql b/db/routines/account/procedures/account_enable.sql index 9f43c97a3..d73c195d7 100644 --- a/db/routines/account/procedures/account_enable.sql +++ b/db/routines/account/procedures/account_enable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) BEGIN /** * Enables an account and sets up email configuration. diff --git a/db/routines/account/procedures/myUser_login.sql b/db/routines/account/procedures/myUser_login.sql index be547292e..82614006b 100644 --- a/db/routines/account/procedures/myUser_login.sql +++ b/db/routines/account/procedures/myUser_login.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithKey.sql b/db/routines/account/procedures/myUser_loginWithKey.sql index 67d8c9923..69874cbc5 100644 --- a/db/routines/account/procedures/myUser_loginWithKey.sql +++ b/db/routines/account/procedures/myUser_loginWithKey.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithName.sql b/db/routines/account/procedures/myUser_loginWithName.sql index 522da77dd..a012d8109 100644 --- a/db/routines/account/procedures/myUser_loginWithName.sql +++ b/db/routines/account/procedures/myUser_loginWithName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_logout.sql b/db/routines/account/procedures/myUser_logout.sql index a1d7db361..5f39b448b 100644 --- a/db/routines/account/procedures/myUser_logout.sql +++ b/db/routines/account/procedures/myUser_logout.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_logout`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_logout`() BEGIN /** * Logouts the user. diff --git a/db/routines/account/procedures/role_checkName.sql b/db/routines/account/procedures/role_checkName.sql index 55d9d80a9..64d783b0d 100644 --- a/db/routines/account/procedures/role_checkName.sql +++ b/db/routines/account/procedures/role_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) BEGIN /** * Checks that role name meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/role_getDescendents.sql b/db/routines/account/procedures/role_getDescendents.sql index ecd4a8790..a0f3acd5f 100644 --- a/db/routines/account/procedures/role_getDescendents.sql +++ b/db/routines/account/procedures/role_getDescendents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) BEGIN /** * Gets the identifiers of all the subroles implemented by a role (Including diff --git a/db/routines/account/procedures/role_sync.sql b/db/routines/account/procedures/role_sync.sql index 139193a31..c1ecfc04a 100644 --- a/db/routines/account/procedures/role_sync.sql +++ b/db/routines/account/procedures/role_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_sync`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_sync`() BEGIN /** * Synchronize the @roleRole table with the current role hierarchy. This diff --git a/db/routines/account/procedures/role_syncPrivileges.sql b/db/routines/account/procedures/role_syncPrivileges.sql index cf265b4bd..0f5f5825e 100644 --- a/db/routines/account/procedures/role_syncPrivileges.sql +++ b/db/routines/account/procedures/role_syncPrivileges.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() BEGIN /** * Synchronizes permissions of MySQL role users based on role hierarchy. diff --git a/db/routines/account/procedures/user_checkName.sql b/db/routines/account/procedures/user_checkName.sql index 6fab17361..cbc358685 100644 --- a/db/routines/account/procedures/user_checkName.sql +++ b/db/routines/account/procedures/user_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) BEGIN /** * Checks that username meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/user_checkPassword.sql b/db/routines/account/procedures/user_checkPassword.sql index eb0990533..e60afd9a5 100644 --- a/db/routines/account/procedures/user_checkPassword.sql +++ b/db/routines/account/procedures/user_checkPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) BEGIN /** * Comprueba si la contraseña cumple los requisitos de seguridad diff --git a/db/routines/account/triggers/account_afterDelete.sql b/db/routines/account/triggers/account_afterDelete.sql index be0e5901f..4f34f84e5 100644 --- a/db/routines/account/triggers/account_afterDelete.sql +++ b/db/routines/account/triggers/account_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_afterDelete` AFTER DELETE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_afterInsert.sql b/db/routines/account/triggers/account_afterInsert.sql index be2959ab6..4a98b4ec4 100644 --- a/db/routines/account/triggers/account_afterInsert.sql +++ b/db/routines/account/triggers/account_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_afterInsert` AFTER INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeInsert.sql b/db/routines/account/triggers/account_beforeInsert.sql index 43b611990..c59fafcc9 100644 --- a/db/routines/account/triggers/account_beforeInsert.sql +++ b/db/routines/account/triggers/account_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_beforeInsert` BEFORE INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeUpdate.sql b/db/routines/account/triggers/account_beforeUpdate.sql index bbcea028d..cdaa8d225 100644 --- a/db/routines/account/triggers/account_beforeUpdate.sql +++ b/db/routines/account/triggers/account_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_beforeUpdate` BEFORE UPDATE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql index 83af7169c..705f2b08d 100644 --- a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql +++ b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` AFTER DELETE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql index a435832f2..eb5322e40 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` BEFORE INSERT ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql index 471a34900..eb6f1baea 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` BEFORE UPDATE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_afterDelete.sql b/db/routines/account/triggers/mailAlias_afterDelete.sql index fe944246d..85c3b0bb2 100644 --- a/db/routines/account/triggers/mailAlias_afterDelete.sql +++ b/db/routines/account/triggers/mailAlias_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` AFTER DELETE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeInsert.sql b/db/routines/account/triggers/mailAlias_beforeInsert.sql index 37a9546ca..c699df647 100644 --- a/db/routines/account/triggers/mailAlias_beforeInsert.sql +++ b/db/routines/account/triggers/mailAlias_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` BEFORE INSERT ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeUpdate.sql b/db/routines/account/triggers/mailAlias_beforeUpdate.sql index e3940cfda..c5656bd2d 100644 --- a/db/routines/account/triggers/mailAlias_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAlias_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` BEFORE UPDATE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_afterDelete.sql b/db/routines/account/triggers/mailForward_afterDelete.sql index cb02b746d..a248f48eb 100644 --- a/db/routines/account/triggers/mailForward_afterDelete.sql +++ b/db/routines/account/triggers/mailForward_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_afterDelete` AFTER DELETE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeInsert.sql b/db/routines/account/triggers/mailForward_beforeInsert.sql index bc4e5ef17..22ec784fd 100644 --- a/db/routines/account/triggers/mailForward_beforeInsert.sql +++ b/db/routines/account/triggers/mailForward_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` BEFORE INSERT ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeUpdate.sql b/db/routines/account/triggers/mailForward_beforeUpdate.sql index 88594979a..4b349d030 100644 --- a/db/routines/account/triggers/mailForward_beforeUpdate.sql +++ b/db/routines/account/triggers/mailForward_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` BEFORE UPDATE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_afterDelete.sql b/db/routines/account/triggers/roleInherit_afterDelete.sql index c7c82eedb..3b4e26c5e 100644 --- a/db/routines/account/triggers/roleInherit_afterDelete.sql +++ b/db/routines/account/triggers/roleInherit_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` AFTER DELETE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeInsert.sql b/db/routines/account/triggers/roleInherit_beforeInsert.sql index 77932c12d..f9dbbc115 100644 --- a/db/routines/account/triggers/roleInherit_beforeInsert.sql +++ b/db/routines/account/triggers/roleInherit_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` BEFORE INSERT ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeUpdate.sql b/db/routines/account/triggers/roleInherit_beforeUpdate.sql index 05aef0b95..9f549740f 100644 --- a/db/routines/account/triggers/roleInherit_beforeUpdate.sql +++ b/db/routines/account/triggers/roleInherit_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` BEFORE UPDATE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_afterDelete.sql b/db/routines/account/triggers/role_afterDelete.sql index be382cba6..d44e66ce1 100644 --- a/db/routines/account/triggers/role_afterDelete.sql +++ b/db/routines/account/triggers/role_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_afterDelete` AFTER DELETE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeInsert.sql b/db/routines/account/triggers/role_beforeInsert.sql index f68a211a7..cbc01ab89 100644 --- a/db/routines/account/triggers/role_beforeInsert.sql +++ b/db/routines/account/triggers/role_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_beforeInsert` BEFORE INSERT ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeUpdate.sql b/db/routines/account/triggers/role_beforeUpdate.sql index a2f471b64..366731b8f 100644 --- a/db/routines/account/triggers/role_beforeUpdate.sql +++ b/db/routines/account/triggers/role_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_beforeUpdate` BEFORE UPDATE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterDelete.sql b/db/routines/account/triggers/user_afterDelete.sql index eabe60d8c..a8e0b01bf 100644 --- a/db/routines/account/triggers/user_afterDelete.sql +++ b/db/routines/account/triggers/user_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterDelete` AFTER DELETE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterInsert.sql b/db/routines/account/triggers/user_afterInsert.sql index 31f992c16..2ff9805d9 100644 --- a/db/routines/account/triggers/user_afterInsert.sql +++ b/db/routines/account/triggers/user_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterInsert` AFTER INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterUpdate.sql b/db/routines/account/triggers/user_afterUpdate.sql index 7fb4e644f..1d6712c99 100644 --- a/db/routines/account/triggers/user_afterUpdate.sql +++ b/db/routines/account/triggers/user_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterUpdate` AFTER UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeInsert.sql b/db/routines/account/triggers/user_beforeInsert.sql index 6cafa8b3f..85b4cbd1f 100644 --- a/db/routines/account/triggers/user_beforeInsert.sql +++ b/db/routines/account/triggers/user_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_beforeInsert` BEFORE INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeUpdate.sql b/db/routines/account/triggers/user_beforeUpdate.sql index 849dfbd91..6405964ff 100644 --- a/db/routines/account/triggers/user_beforeUpdate.sql +++ b/db/routines/account/triggers/user_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_beforeUpdate` BEFORE UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/views/accountDovecot.sql b/db/routines/account/views/accountDovecot.sql index 1e30946f3..61388d5b9 100644 --- a/db/routines/account/views/accountDovecot.sql +++ b/db/routines/account/views/accountDovecot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `account`.`accountDovecot` AS SELECT `u`.`name` AS `name`, diff --git a/db/routines/account/views/emailUser.sql b/db/routines/account/views/emailUser.sql index dcb435454..f48656131 100644 --- a/db/routines/account/views/emailUser.sql +++ b/db/routines/account/views/emailUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `account`.`emailUser` AS SELECT `u`.`id` AS `userFk`, diff --git a/db/routines/account/views/myRole.sql b/db/routines/account/views/myRole.sql index 68364f0bc..3273980a1 100644 --- a/db/routines/account/views/myRole.sql +++ b/db/routines/account/views/myRole.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myRole` AS SELECT `r`.`inheritsFrom` AS `id` diff --git a/db/routines/account/views/myUser.sql b/db/routines/account/views/myUser.sql index f520d893b..5d124a0fa 100644 --- a/db/routines/account/views/myUser.sql +++ b/db/routines/account/views/myUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myUser` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/bi/procedures/Greuge_Evolution_Add.sql b/db/routines/bi/procedures/Greuge_Evolution_Add.sql index 6480155cb..05f34a0bd 100644 --- a/db/routines/bi/procedures/Greuge_Evolution_Add.sql +++ b/db/routines/bi/procedures/Greuge_Evolution_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() BEGIN /* Inserta en la tabla Greuge_Evolution el saldo acumulado de cada cliente, diff --git a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql index 7c2cc5678..ef163e4a3 100644 --- a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql +++ b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() BEGIN DECLARE vPreviousPeriod INT; DECLARE vCurrentPeriod INT; diff --git a/db/routines/bi/procedures/analisis_ventas_simple.sql b/db/routines/bi/procedures/analisis_ventas_simple.sql index 5c67584ee..54f874f14 100644 --- a/db/routines/bi/procedures/analisis_ventas_simple.sql +++ b/db/routines/bi/procedures/analisis_ventas_simple.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() BEGIN /** * Vacia y rellena la tabla 'analisis_grafico_simple' desde 'analisis_grafico_ventas' diff --git a/db/routines/bi/procedures/analisis_ventas_update.sql b/db/routines/bi/procedures/analisis_ventas_update.sql index ef3e165a0..81afb7243 100644 --- a/db/routines/bi/procedures/analisis_ventas_update.sql +++ b/db/routines/bi/procedures/analisis_ventas_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() BEGIN DECLARE vLastMonth DATE; diff --git a/db/routines/bi/procedures/clean.sql b/db/routines/bi/procedures/clean.sql index ba43b609c..9443fe6b8 100644 --- a/db/routines/bi/procedures/clean.sql +++ b/db/routines/bi/procedures/clean.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`clean`() +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`clean`() BEGIN DECLARE vDateShort DATETIME; DECLARE vDateLong DATETIME; @@ -15,5 +15,5 @@ BEGIN DELETE FROM bi.defaulters WHERE `date` < vDateLong; DELETE FROM bi.defaulting WHERE `date` < vDateLong; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/bi/procedures/defaultersFromDate.sql b/db/routines/bi/procedures/defaultersFromDate.sql index bfe133750..a2fcb5cc3 100644 --- a/db/routines/bi/procedures/defaultersFromDate.sql +++ b/db/routines/bi/procedures/defaultersFromDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) BEGIN SELECT t1.*, c.name Cliente, w.code workerCode, c.payMethodFk pay_met_id, c.dueDay Vencimiento diff --git a/db/routines/bi/procedures/defaulting.sql b/db/routines/bi/procedures/defaulting.sql index d20232b8b..ca5d50a53 100644 --- a/db/routines/bi/procedures/defaulting.sql +++ b/db/routines/bi/procedures/defaulting.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) BEGIN DECLARE vDone BOOLEAN; DECLARE vClient INT; diff --git a/db/routines/bi/procedures/defaulting_launcher.sql b/db/routines/bi/procedures/defaulting_launcher.sql index 585abdc09..3565ca368 100644 --- a/db/routines/bi/procedures/defaulting_launcher.sql +++ b/db/routines/bi/procedures/defaulting_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() BEGIN /** * Calcula la morosidad de los clientes. diff --git a/db/routines/bi/procedures/facturacion_media_anual_update.sql b/db/routines/bi/procedures/facturacion_media_anual_update.sql index b956f353a..676bdc53c 100644 --- a/db/routines/bi/procedures/facturacion_media_anual_update.sql +++ b/db/routines/bi/procedures/facturacion_media_anual_update.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() BEGIN TRUNCATE TABLE bs.clientAnnualConsumption; @@ -12,5 +12,5 @@ BEGIN GROUP BY clientFk, year, month ) vol GROUP BY clientFk; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/bi/procedures/greuge_dif_porte_add.sql b/db/routines/bi/procedures/greuge_dif_porte_add.sql index 330ff92b8..d52e825d0 100644 --- a/db/routines/bi/procedures/greuge_dif_porte_add.sql +++ b/db/routines/bi/procedures/greuge_dif_porte_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() BEGIN /** diff --git a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql index c21a3bae5..a2b399e04 100644 --- a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql +++ b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() BEGIN CALL analisis_ventas_update; CALL analisis_ventas_simple; diff --git a/db/routines/bi/procedures/rutasAnalyze.sql b/db/routines/bi/procedures/rutasAnalyze.sql index e277968bf..3f3c17e26 100644 --- a/db/routines/bi/procedures/rutasAnalyze.sql +++ b/db/routines/bi/procedures/rutasAnalyze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( vDatedFrom DATE, vDatedTo DATE ) diff --git a/db/routines/bi/procedures/rutasAnalyze_launcher.sql b/db/routines/bi/procedures/rutasAnalyze_launcher.sql index 02f5e1b9c..e27b62bc4 100644 --- a/db/routines/bi/procedures/rutasAnalyze_launcher.sql +++ b/db/routines/bi/procedures/rutasAnalyze_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() BEGIN /** * Call rutasAnalyze diff --git a/db/routines/bi/views/analisis_grafico_ventas.sql b/db/routines/bi/views/analisis_grafico_ventas.sql index f5956f27a..1993e72e2 100644 --- a/db/routines/bi/views/analisis_grafico_ventas.sql +++ b/db/routines/bi/views/analisis_grafico_ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_grafico_ventas` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/analisis_ventas_simple.sql b/db/routines/bi/views/analisis_ventas_simple.sql index 109378c8a..4834b39d0 100644 --- a/db/routines/bi/views/analisis_ventas_simple.sql +++ b/db/routines/bi/views/analisis_ventas_simple.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_ventas_simple` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/claims_ratio.sql b/db/routines/bi/views/claims_ratio.sql index cfd9b6231..4cd3c0c9d 100644 --- a/db/routines/bi/views/claims_ratio.sql +++ b/db/routines/bi/views/claims_ratio.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`claims_ratio` AS SELECT `cr`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/customerRiskOverdue.sql b/db/routines/bi/views/customerRiskOverdue.sql index 27ef7ca47..0ca26e71f 100644 --- a/db/routines/bi/views/customerRiskOverdue.sql +++ b/db/routines/bi/views/customerRiskOverdue.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`customerRiskOverdue` AS SELECT `cr`.`clientFk` AS `customer_id`, diff --git a/db/routines/bi/views/defaulters.sql b/db/routines/bi/views/defaulters.sql index 927503245..701f1e07a 100644 --- a/db/routines/bi/views/defaulters.sql +++ b/db/routines/bi/views/defaulters.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`defaulters` AS SELECT `d`.`clientFk` AS `client`, diff --git a/db/routines/bi/views/facturacion_media_anual.sql b/db/routines/bi/views/facturacion_media_anual.sql index 2e0c2ca6e..d7521c550 100644 --- a/db/routines/bi/views/facturacion_media_anual.sql +++ b/db/routines/bi/views/facturacion_media_anual.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`facturacion_media_anual` AS SELECT `cac`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/rotacion.sql b/db/routines/bi/views/rotacion.sql index 65a5db923..0fea399e8 100644 --- a/db/routines/bi/views/rotacion.sql +++ b/db/routines/bi/views/rotacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`rotacion` AS SELECT `ic`.`itemFk` AS `Id_Article`, diff --git a/db/routines/bi/views/tarifa_componentes.sql b/db/routines/bi/views/tarifa_componentes.sql index 42ea9fa81..32d8fd895 100644 --- a/db/routines/bi/views/tarifa_componentes.sql +++ b/db/routines/bi/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes` AS SELECT `c`.`id` AS `Id_Componente`, diff --git a/db/routines/bi/views/tarifa_componentes_series.sql b/db/routines/bi/views/tarifa_componentes_series.sql index ed2f8e29a..0cb25bcf7 100644 --- a/db/routines/bi/views/tarifa_componentes_series.sql +++ b/db/routines/bi/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes_series` AS SELECT `ct`.`id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/bs/events/clientDied_recalc.sql b/db/routines/bs/events/clientDied_recalc.sql index db912658a..cc191f65c 100644 --- a/db/routines/bs/events/clientDied_recalc.sql +++ b/db/routines/bs/events/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`clientDied_recalc` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`clientDied_recalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/inventoryDiscrepancy_launch.sql b/db/routines/bs/events/inventoryDiscrepancy_launch.sql index 3ee165846..3b9497779 100644 --- a/db/routines/bs/events/inventoryDiscrepancy_launch.sql +++ b/db/routines/bs/events/inventoryDiscrepancy_launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` ON SCHEDULE EVERY 15 MINUTE STARTS '2023-07-18 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/nightTask_launchAll.sql b/db/routines/bs/events/nightTask_launchAll.sql index 1a55ca1a3..afe04b02e 100644 --- a/db/routines/bs/events/nightTask_launchAll.sql +++ b/db/routines/bs/events/nightTask_launchAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`nightTask_launchAll` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`nightTask_launchAll` ON SCHEDULE EVERY 1 DAY STARTS '2022-02-08 04:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/functions/tramo.sql b/db/routines/bs/functions/tramo.sql index 0415cfc92..48697295c 100644 --- a/db/routines/bs/functions/tramo.sql +++ b/db/routines/bs/functions/tramo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC NO SQL diff --git a/db/routines/bs/procedures/campaignComparative.sql b/db/routines/bs/procedures/campaignComparative.sql index 6b4b983b5..40af23d54 100644 --- a/db/routines/bs/procedures/campaignComparative.sql +++ b/db/routines/bs/procedures/campaignComparative.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) BEGIN SELECT workerName, diff --git a/db/routines/bs/procedures/carteras_add.sql b/db/routines/bs/procedures/carteras_add.sql index 6de377371..ec8803664 100644 --- a/db/routines/bs/procedures/carteras_add.sql +++ b/db/routines/bs/procedures/carteras_add.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`carteras_add`() +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`carteras_add`() BEGIN /** * Inserta en la tabla @bs.carteras las ventas desde el año pasado @@ -23,5 +23,5 @@ BEGIN GROUP BY w.code, t.`year`, t.`month`; DROP TEMPORARY TABLE tmp.time; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/bs/procedures/clean.sql b/db/routines/bs/procedures/clean.sql index eff2faadb..4b4751545 100644 --- a/db/routines/bs/procedures/clean.sql +++ b/db/routines/bs/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clean`() BEGIN DECLARE vOneYearAgo DATE DEFAULT util.VN_CURDATE() - INTERVAL 1 YEAR; diff --git a/db/routines/bs/procedures/clientDied_recalc.sql b/db/routines/bs/procedures/clientDied_recalc.sql index 1b5cb5ac8..f0082433c 100644 --- a/db/routines/bs/procedures/clientDied_recalc.sql +++ b/db/routines/bs/procedures/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( vDays INT, vCountryCode VARCHAR(2) ) diff --git a/db/routines/bs/procedures/clientNewBorn_recalc.sql b/db/routines/bs/procedures/clientNewBorn_recalc.sql index 1c89b5745..c84648c15 100644 --- a/db/routines/bs/procedures/clientNewBorn_recalc.sql +++ b/db/routines/bs/procedures/clientNewBorn_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() BLOCK1: BEGIN DECLARE vClientFk INT; diff --git a/db/routines/bs/procedures/compradores_evolution_add.sql b/db/routines/bs/procedures/compradores_evolution_add.sql index e9b073e28..c0af35f8f 100644 --- a/db/routines/bs/procedures/compradores_evolution_add.sql +++ b/db/routines/bs/procedures/compradores_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() BEGIN /** * Inserta en la tabla compradores_evolution las ventas acumuladas en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fondo_evolution_add.sql b/db/routines/bs/procedures/fondo_evolution_add.sql index 3ca91e647..1afe6897e 100644 --- a/db/routines/bs/procedures/fondo_evolution_add.sql +++ b/db/routines/bs/procedures/fondo_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() BEGIN /** * Inserta en la tabla fondo_maniobra los saldos acumulados en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fruitsEvolution.sql b/db/routines/bs/procedures/fruitsEvolution.sql index c689f4b76..09ef420ce 100644 --- a/db/routines/bs/procedures/fruitsEvolution.sql +++ b/db/routines/bs/procedures/fruitsEvolution.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() BEGIN select Id_Cliente, Cliente, count(semana) as semanas, (w.code IS NOT NULL) isWorker diff --git a/db/routines/bs/procedures/indicatorsUpdate.sql b/db/routines/bs/procedures/indicatorsUpdate.sql index d66e52a61..712441d65 100644 --- a/db/routines/bs/procedures/indicatorsUpdate.sql +++ b/db/routines/bs/procedures/indicatorsUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) BEGIN DECLARE oneYearBefore DATE DEFAULT TIMESTAMPADD(YEAR,-1, vDated); diff --git a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql index 8ede28ec8..1dd24d5ab 100644 --- a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql +++ b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() BEGIN DECLARE vDated DATE; diff --git a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql index 863005373..b1cb77696 100644 --- a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql +++ b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() BEGIN /** * Replace all records in table inventoryDiscrepancyDetail and insert new diff --git a/db/routines/bs/procedures/m3Add.sql b/db/routines/bs/procedures/m3Add.sql index 0ec2c8ce2..ed57362b4 100644 --- a/db/routines/bs/procedures/m3Add.sql +++ b/db/routines/bs/procedures/m3Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`m3Add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`m3Add`() BEGIN DECLARE datSTART DATE; diff --git a/db/routines/bs/procedures/manaCustomerUpdate.sql b/db/routines/bs/procedures/manaCustomerUpdate.sql index e9ba70423..ba5f99f4c 100644 --- a/db/routines/bs/procedures/manaCustomerUpdate.sql +++ b/db/routines/bs/procedures/manaCustomerUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() BEGIN DECLARE vToDated DATE; DECLARE vFromDated DATE; diff --git a/db/routines/bs/procedures/manaSpellers_actualize.sql b/db/routines/bs/procedures/manaSpellers_actualize.sql index 20b0f84f8..045727d15 100644 --- a/db/routines/bs/procedures/manaSpellers_actualize.sql +++ b/db/routines/bs/procedures/manaSpellers_actualize.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() BEGIN /** * Recalcula el valor del campo con el modificador de precio diff --git a/db/routines/bs/procedures/nightTask_launchAll.sql b/db/routines/bs/procedures/nightTask_launchAll.sql index 59899ee03..2e0daeb94 100644 --- a/db/routines/bs/procedures/nightTask_launchAll.sql +++ b/db/routines/bs/procedures/nightTask_launchAll.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() BEGIN /** * Runs all nightly tasks. @@ -76,5 +76,5 @@ BEGIN END IF; END LOOP; CLOSE vQueue; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/bs/procedures/nightTask_launchTask.sql b/db/routines/bs/procedures/nightTask_launchTask.sql index aa4c540e8..dc2ef2a40 100644 --- a/db/routines/bs/procedures/nightTask_launchTask.sql +++ b/db/routines/bs/procedures/nightTask_launchTask.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( vSchema VARCHAR(255), vProcedure VARCHAR(255), OUT vError VARCHAR(255), diff --git a/db/routines/bs/procedures/payMethodClientAdd.sql b/db/routines/bs/procedures/payMethodClientAdd.sql index 0c19f453a..20c738456 100644 --- a/db/routines/bs/procedures/payMethodClientAdd.sql +++ b/db/routines/bs/procedures/payMethodClientAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() BEGIN INSERT IGNORE INTO `bs`.`payMethodClient` (dated, payMethodFk, clientFk) SELECT util.VN_CURDATE(), c.payMethodFk, c.id diff --git a/db/routines/bs/procedures/saleGraphic.sql b/db/routines/bs/procedures/saleGraphic.sql index e1e387980..c647ef2fc 100644 --- a/db/routines/bs/procedures/saleGraphic.sql +++ b/db/routines/bs/procedures/saleGraphic.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, IN vToDate DATE, IN vProducerFk INT) BEGIN diff --git a/db/routines/bs/procedures/salePersonEvolutionAdd.sql b/db/routines/bs/procedures/salePersonEvolutionAdd.sql index 33e31b699..baed201a3 100644 --- a/db/routines/bs/procedures/salePersonEvolutionAdd.sql +++ b/db/routines/bs/procedures/salePersonEvolutionAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) BEGIN DELETE FROM bs.salePersonEvolution WHERE dated <= DATE_SUB(util.VN_CURDATE(), INTERVAL 1 YEAR); diff --git a/db/routines/bs/procedures/sale_add.sql b/db/routines/bs/procedures/sale_add.sql index c50d27b81..f82e2e1f4 100644 --- a/db/routines/bs/procedures/sale_add.sql +++ b/db/routines/bs/procedures/sale_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sale_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`sale_add`( IN vStarted DATE, IN vEnded DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_add.sql b/db/routines/bs/procedures/salesByItemTypeDay_add.sql index 5c12081a0..2cdc443c4 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_add.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( vDateStart DATE, vDateEnd DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql index 3424bac74..b2625a535 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql @@ -1,6 +1,6 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() -BEGIN - CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() +BEGIN + CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); END$$ DELIMITER ; diff --git a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql index eb441c07b..b4b0b2343 100644 --- a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql +++ b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) BEGIN /** * Agrupa las ventas por cliente/comercial/fecha en la tabla bs.salesByclientSalesPerson diff --git a/db/routines/bs/procedures/salesPersonEvolution_add.sql b/db/routines/bs/procedures/salesPersonEvolution_add.sql index ea150e182..578d91494 100644 --- a/db/routines/bs/procedures/salesPersonEvolution_add.sql +++ b/db/routines/bs/procedures/salesPersonEvolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() BEGIN /** * Calcula los datos para los gráficos de evolución agrupado por salesPersonFk y día. diff --git a/db/routines/bs/procedures/sales_addLauncher.sql b/db/routines/bs/procedures/sales_addLauncher.sql index 38cb5e219..7b4fb2e87 100644 --- a/db/routines/bs/procedures/sales_addLauncher.sql +++ b/db/routines/bs/procedures/sales_addLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() BEGIN /** * Añade las ventas a la tabla bs.sale que se realizaron desde hace un mes hasta hoy diff --git a/db/routines/bs/procedures/vendedores_add_launcher.sql b/db/routines/bs/procedures/vendedores_add_launcher.sql index c0718a659..4513ee0a1 100644 --- a/db/routines/bs/procedures/vendedores_add_launcher.sql +++ b/db/routines/bs/procedures/vendedores_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() BEGIN CALL bs.salesByclientSalesPerson_add(util.VN_CURDATE()- INTERVAL 45 DAY); diff --git a/db/routines/bs/procedures/ventas_contables_add.sql b/db/routines/bs/procedures/ventas_contables_add.sql index 72b0c0fee..be7f9d87d 100644 --- a/db/routines/bs/procedures/ventas_contables_add.sql +++ b/db/routines/bs/procedures/ventas_contables_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) BEGIN /** diff --git a/db/routines/bs/procedures/ventas_contables_add_launcher.sql b/db/routines/bs/procedures/ventas_contables_add_launcher.sql index ac74c47bf..adda61240 100644 --- a/db/routines/bs/procedures/ventas_contables_add_launcher.sql +++ b/db/routines/bs/procedures/ventas_contables_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() BEGIN /** diff --git a/db/routines/bs/procedures/waste_addSales.sql b/db/routines/bs/procedures/waste_addSales.sql index 3e189d2e6..eaef9b832 100644 --- a/db/routines/bs/procedures/waste_addSales.sql +++ b/db/routines/bs/procedures/waste_addSales.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSales`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`waste_addSales`() BEGIN DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY; DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; diff --git a/db/routines/bs/procedures/workerLabour_getData.sql b/db/routines/bs/procedures/workerLabour_getData.sql index 1f5a39fe0..71208b32f 100644 --- a/db/routines/bs/procedures/workerLabour_getData.sql +++ b/db/routines/bs/procedures/workerLabour_getData.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() BEGIN /** * Carga los datos de la plantilla de trabajadores, altas y bajas en la tabla workerLabourDataByMonth para facilitar el cálculo del gráfico en grafana. diff --git a/db/routines/bs/procedures/workerProductivity_add.sql b/db/routines/bs/procedures/workerProductivity_add.sql index 3d7dbdca9..9b3d9d2d9 100644 --- a/db/routines/bs/procedures/workerProductivity_add.sql +++ b/db/routines/bs/procedures/workerProductivity_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() BEGIN DECLARE vDateFrom DATE; SELECT DATE_SUB(util.VN_CURDATE(),INTERVAL 30 DAY) INTO vDateFrom; diff --git a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql index a88567a21..6abfbe0f0 100644 --- a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql +++ b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` BEFORE UPDATE ON `clientNewBorn` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeInsert.sql b/db/routines/bs/triggers/nightTask_beforeInsert.sql index 96f2b5291..c9c11b84b 100644 --- a/db/routines/bs/triggers/nightTask_beforeInsert.sql +++ b/db/routines/bs/triggers/nightTask_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` BEFORE INSERT ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeUpdate.sql b/db/routines/bs/triggers/nightTask_beforeUpdate.sql index 1da1da8c3..3828f4c88 100644 --- a/db/routines/bs/triggers/nightTask_beforeUpdate.sql +++ b/db/routines/bs/triggers/nightTask_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` BEFORE UPDATE ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/views/lastIndicators.sql b/db/routines/bs/views/lastIndicators.sql index 3fa04abd3..15329639e 100644 --- a/db/routines/bs/views/lastIndicators.sql +++ b/db/routines/bs/views/lastIndicators.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`lastIndicators` AS SELECT `i`.`updated` AS `updated`, diff --git a/db/routines/bs/views/packingSpeed.sql b/db/routines/bs/views/packingSpeed.sql index 517706b15..272c77303 100644 --- a/db/routines/bs/views/packingSpeed.sql +++ b/db/routines/bs/views/packingSpeed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`packingSpeed` AS SELECT HOUR(`e`.`created`) AS `hora`, diff --git a/db/routines/bs/views/ventas.sql b/db/routines/bs/views/ventas.sql index 1fab2e91b..a320d4287 100644 --- a/db/routines/bs/views/ventas.sql +++ b/db/routines/bs/views/ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`ventas` AS SELECT `s`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/cache/events/cacheCalc_clean.sql b/db/routines/cache/events/cacheCalc_clean.sql index e13bae98b..51be0f04f 100644 --- a/db/routines/cache/events/cacheCalc_clean.sql +++ b/db/routines/cache/events/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `cache`.`cacheCalc_clean` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `cache`.`cacheCalc_clean` ON SCHEDULE EVERY 30 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/events/cache_clean.sql b/db/routines/cache/events/cache_clean.sql index c5e247bd4..0ed956282 100644 --- a/db/routines/cache/events/cache_clean.sql +++ b/db/routines/cache/events/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `cache`.`cache_clean` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `cache`.`cache_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/procedures/addressFriendship_Update.sql b/db/routines/cache/procedures/addressFriendship_Update.sql index f7fab8b9b..92912f1a4 100644 --- a/db/routines/cache/procedures/addressFriendship_Update.sql +++ b/db/routines/cache/procedures/addressFriendship_Update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() BEGIN REPLACE cache.addressFriendship diff --git a/db/routines/cache/procedures/availableNoRaids_refresh.sql b/db/routines/cache/procedures/availableNoRaids_refresh.sql index 37715d270..6ba2dee8a 100644 --- a/db/routines/cache/procedures/availableNoRaids_refresh.sql +++ b/db/routines/cache/procedures/availableNoRaids_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vEndDate DATETIME; diff --git a/db/routines/cache/procedures/available_clean.sql b/db/routines/cache/procedures/available_clean.sql index bb1f7302c..0f12f9126 100644 --- a/db/routines/cache/procedures/available_clean.sql +++ b/db/routines/cache/procedures/available_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`available_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/available_refresh.sql b/db/routines/cache/procedures/available_refresh.sql index abf023a41..d8665122d 100644 --- a/db/routines/cache/procedures/available_refresh.sql +++ b/db/routines/cache/procedures/available_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; diff --git a/db/routines/cache/procedures/cacheCalc_clean.sql b/db/routines/cache/procedures/cacheCalc_clean.sql index 5c588687e..5d0b43c67 100644 --- a/db/routines/cache/procedures/cacheCalc_clean.sql +++ b/db/routines/cache/procedures/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() BEGIN DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW()); DELETE FROM cache_calc WHERE expires < vCleanTime; diff --git a/db/routines/cache/procedures/cache_calc_end.sql b/db/routines/cache/procedures/cache_calc_end.sql index b3a25532b..c5ac91997 100644 --- a/db/routines/cache/procedures/cache_calc_end.sql +++ b/db/routines/cache/procedures/cache_calc_end.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) BEGIN DECLARE v_cache_name VARCHAR(255); DECLARE v_params VARCHAR(255); @@ -21,5 +21,5 @@ BEGIN IF v_cache_name IS NOT NULL THEN DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, ''))); END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/cache/procedures/cache_calc_start.sql b/db/routines/cache/procedures/cache_calc_start.sql index 701bb1a68..229fd6f66 100644 --- a/db/routines/cache/procedures/cache_calc_start.sql +++ b/db/routines/cache/procedures/cache_calc_start.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) proc: BEGIN DECLARE v_valid BOOL; DECLARE v_lock_id VARCHAR(100); @@ -83,5 +83,5 @@ proc: BEGIN -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador. SET v_refresh = TRUE; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/cache/procedures/cache_calc_unlock.sql b/db/routines/cache/procedures/cache_calc_unlock.sql index 5dc46d925..9068f8053 100644 --- a/db/routines/cache/procedures/cache_calc_unlock.sql +++ b/db/routines/cache/procedures/cache_calc_unlock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) proc: BEGIN DECLARE v_cache_name VARCHAR(50); DECLARE v_params VARCHAR(100); diff --git a/db/routines/cache/procedures/cache_clean.sql b/db/routines/cache/procedures/cache_clean.sql index 0fca75e63..f497da3eb 100644 --- a/db/routines/cache/procedures/cache_clean.sql +++ b/db/routines/cache/procedures/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_clean`() NO SQL BEGIN CALL available_clean; diff --git a/db/routines/cache/procedures/clean.sql b/db/routines/cache/procedures/clean.sql index 5e6628689..a306440d3 100644 --- a/db/routines/cache/procedures/clean.sql +++ b/db/routines/cache/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`clean`() BEGIN DELETE FROM cache.departure_limit WHERE Fecha < util.VN_CURDATE() - INTERVAL 1 MONTH; END$$ diff --git a/db/routines/cache/procedures/departure_timing.sql b/db/routines/cache/procedures/departure_timing.sql index 778c2cd74..7ed33b042 100644 --- a/db/routines/cache/procedures/departure_timing.sql +++ b/db/routines/cache/procedures/departure_timing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/cache/procedures/last_buy_refresh.sql b/db/routines/cache/procedures/last_buy_refresh.sql index 49ef4ee5e..41f12b2f7 100644 --- a/db/routines/cache/procedures/last_buy_refresh.sql +++ b/db/routines/cache/procedures/last_buy_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con la última compra y fecha de cada diff --git a/db/routines/cache/procedures/stock_refresh.sql b/db/routines/cache/procedures/stock_refresh.sql index 5ddc6c20e..52a3e0a50 100644 --- a/db/routines/cache/procedures/stock_refresh.sql +++ b/db/routines/cache/procedures/stock_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con el disponible hasta el dí­a de diff --git a/db/routines/cache/procedures/visible_clean.sql b/db/routines/cache/procedures/visible_clean.sql index b6f03c563..3db428c70 100644 --- a/db/routines/cache/procedures/visible_clean.sql +++ b/db/routines/cache/procedures/visible_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`visible_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`visible_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/visible_refresh.sql b/db/routines/cache/procedures/visible_refresh.sql index 78d23dbfb..c1d39f9d9 100644 --- a/db/routines/cache/procedures/visible_refresh.sql +++ b/db/routines/cache/procedures/visible_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) proc:BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/dipole/procedures/clean.sql b/db/routines/dipole/procedures/clean.sql index a9af64e15..ec667bfb1 100644 --- a/db/routines/dipole/procedures/clean.sql +++ b/db/routines/dipole/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `dipole`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `dipole`.`clean`() BEGIN DECLARE vFromDated DATE; diff --git a/db/routines/dipole/procedures/expedition_add.sql b/db/routines/dipole/procedures/expedition_add.sql index 70bc7930e..8337a426f 100644 --- a/db/routines/dipole/procedures/expedition_add.sql +++ b/db/routines/dipole/procedures/expedition_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) BEGIN /** Insert records to print agency stickers and to inform sorter with new box * diff --git a/db/routines/dipole/views/expeditionControl.sql b/db/routines/dipole/views/expeditionControl.sql index e26e83440..63c18781d 100644 --- a/db/routines/dipole/views/expeditionControl.sql +++ b/db/routines/dipole/views/expeditionControl.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `dipole`.`expeditionControl` AS SELECT cast(`epo`.`created` AS date) AS `fecha`, diff --git a/db/routines/edi/events/floramondo.sql b/db/routines/edi/events/floramondo.sql index 0a38f3537..6051b51cd 100644 --- a/db/routines/edi/events/floramondo.sql +++ b/db/routines/edi/events/floramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `edi`.`floramondo` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `edi`.`floramondo` ON SCHEDULE EVERY 6 MINUTE STARTS '2022-01-28 09:52:45.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/edi/functions/imageName.sql b/db/routines/edi/functions/imageName.sql index f2e52558f..37b88c18f 100644 --- a/db/routines/edi/functions/imageName.sql +++ b/db/routines/edi/functions/imageName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/edi/procedures/clean.sql b/db/routines/edi/procedures/clean.sql index 71dd576e9..75f7565fc 100644 --- a/db/routines/edi/procedures/clean.sql +++ b/db/routines/edi/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`clean`() BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/edi/procedures/deliveryInformation_Delete.sql b/db/routines/edi/procedures/deliveryInformation_Delete.sql index b4f51515a..fa50e35c5 100644 --- a/db/routines/edi/procedures/deliveryInformation_Delete.sql +++ b/db/routines/edi/procedures/deliveryInformation_Delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() BEGIN DECLARE vID INT; diff --git a/db/routines/edi/procedures/ekt_add.sql b/db/routines/edi/procedures/ekt_add.sql index 1cc67bb93..2b301e719 100644 --- a/db/routines/edi/procedures/ekt_add.sql +++ b/db/routines/edi/procedures/ekt_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_load.sql b/db/routines/edi/procedures/ekt_load.sql index 190b09a86..c9b8d9245 100644 --- a/db/routines/edi/procedures/ekt_load.sql +++ b/db/routines/edi/procedures/ekt_load.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) proc:BEGIN /** * Carga los datos esenciales para el sistema EKT. diff --git a/db/routines/edi/procedures/ekt_loadNotBuy.sql b/db/routines/edi/procedures/ekt_loadNotBuy.sql index 52697adc0..02b2a29b6 100644 --- a/db/routines/edi/procedures/ekt_loadNotBuy.sql +++ b/db/routines/edi/procedures/ekt_loadNotBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() BEGIN /** * Ejecuta ekt_load para aquellos ekt de hoy que no tienen vn.buy diff --git a/db/routines/edi/procedures/ekt_refresh.sql b/db/routines/edi/procedures/ekt_refresh.sql index 8ba438c0a..0f8c4182b 100644 --- a/db/routines/edi/procedures/ekt_refresh.sql +++ b/db/routines/edi/procedures/ekt_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_refresh`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_refresh`( `vSelf` INT, vMailFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_scan.sql b/db/routines/edi/procedures/ekt_scan.sql index 0cf8bb466..4c4c43ea2 100644 --- a/db/routines/edi/procedures/ekt_scan.sql +++ b/db/routines/edi/procedures/ekt_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca transaciones a partir de un codigo de barras, las marca como escaneadas diff --git a/db/routines/edi/procedures/floramondo_offerRefresh.sql b/db/routines/edi/procedures/floramondo_offerRefresh.sql index 18d3f8b7e..e58a00916 100644 --- a/db/routines/edi/procedures/floramondo_offerRefresh.sql +++ b/db/routines/edi/procedures/floramondo_offerRefresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() proc: BEGIN DECLARE vLanded DATETIME; DECLARE vDone INT DEFAULT FALSE; diff --git a/db/routines/edi/procedures/item_freeAdd.sql b/db/routines/edi/procedures/item_freeAdd.sql index cb572e1b1..e54b593f2 100644 --- a/db/routines/edi/procedures/item_freeAdd.sql +++ b/db/routines/edi/procedures/item_freeAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`item_freeAdd`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`item_freeAdd`() BEGIN /** * Rellena la tabla item_free con los id ausentes en vn.item diff --git a/db/routines/edi/procedures/item_getNewByEkt.sql b/db/routines/edi/procedures/item_getNewByEkt.sql index a80d04817..ab18dcb25 100644 --- a/db/routines/edi/procedures/item_getNewByEkt.sql +++ b/db/routines/edi/procedures/item_getNewByEkt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/mail_new.sql b/db/routines/edi/procedures/mail_new.sql index 7bbf3f5cf..51f48d443 100644 --- a/db/routines/edi/procedures/mail_new.sql +++ b/db/routines/edi/procedures/mail_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`mail_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`mail_new`( vMessageId VARCHAR(100) ,vSender VARCHAR(150) ,OUT vSelf INT diff --git a/db/routines/edi/triggers/item_feature_beforeInsert.sql b/db/routines/edi/triggers/item_feature_beforeInsert.sql index 4e3e9cc0e..b31eb89c5 100644 --- a/db/routines/edi/triggers/item_feature_beforeInsert.sql +++ b/db/routines/edi/triggers/item_feature_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` BEFORE INSERT ON `item_feature` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_afterUpdate.sql b/db/routines/edi/triggers/putOrder_afterUpdate.sql index b56ae4c66..d39eb97c6 100644 --- a/db/routines/edi/triggers/putOrder_afterUpdate.sql +++ b/db/routines/edi/triggers/putOrder_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` AFTER UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeInsert.sql b/db/routines/edi/triggers/putOrder_beforeInsert.sql index beddd191c..c0c122fae 100644 --- a/db/routines/edi/triggers/putOrder_beforeInsert.sql +++ b/db/routines/edi/triggers/putOrder_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` BEFORE INSERT ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeUpdate.sql b/db/routines/edi/triggers/putOrder_beforeUpdate.sql index f18b77a0c..6f769d0ba 100644 --- a/db/routines/edi/triggers/putOrder_beforeUpdate.sql +++ b/db/routines/edi/triggers/putOrder_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` BEFORE UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql index 389ef9f1c..bff8c98eb 100644 --- a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql +++ b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` AFTER UPDATE ON `supplyResponse` FOR EACH ROW BEGIN diff --git a/db/routines/edi/views/ektK2.sql b/db/routines/edi/views/ektK2.sql index 299d26b01..0556a1dc4 100644 --- a/db/routines/edi/views/ektK2.sql +++ b/db/routines/edi/views/ektK2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektK2` AS SELECT `eek`.`id` AS `id`, diff --git a/db/routines/edi/views/ektRecent.sql b/db/routines/edi/views/ektRecent.sql index 66ff7875e..ce30b8ab0 100644 --- a/db/routines/edi/views/ektRecent.sql +++ b/db/routines/edi/views/ektRecent.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektRecent` AS SELECT `e`.`id` AS `id`, diff --git a/db/routines/edi/views/errorList.sql b/db/routines/edi/views/errorList.sql index 4e7cbc840..a4b206ac2 100644 --- a/db/routines/edi/views/errorList.sql +++ b/db/routines/edi/views/errorList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`errorList` AS SELECT `po`.`id` AS `id`, diff --git a/db/routines/edi/views/supplyOffer.sql b/db/routines/edi/views/supplyOffer.sql index c4a8582a1..8cb9c3124 100644 --- a/db/routines/edi/views/supplyOffer.sql +++ b/db/routines/edi/views/supplyOffer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`supplyOffer` AS SELECT `sr`.`vmpID` AS `vmpID`, diff --git a/db/routines/floranet/procedures/catalogue_findById.sql b/db/routines/floranet/procedures/catalogue_findById.sql index aca6ca4d6..53d6ebe6e 100644 --- a/db/routines/floranet/procedures/catalogue_findById.sql +++ b/db/routines/floranet/procedures/catalogue_findById.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/catalogue_get.sql b/db/routines/floranet/procedures/catalogue_get.sql index 1e224c810..5aaffc326 100644 --- a/db/routines/floranet/procedures/catalogue_get.sql +++ b/db/routines/floranet/procedures/catalogue_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) READS SQL DATA proc:BEGIN /** diff --git a/db/routines/floranet/procedures/contact_request.sql b/db/routines/floranet/procedures/contact_request.sql index 2132a86fc..92fbb9cbf 100644 --- a/db/routines/floranet/procedures/contact_request.sql +++ b/db/routines/floranet/procedures/contact_request.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.contact_request; DELIMITER $$ $$ -CREATE DEFINER=`root`@`localhost` +CREATE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.contact_request( vName VARCHAR(100), vPhone VARCHAR(15), diff --git a/db/routines/floranet/procedures/deliveryDate_get.sql b/db/routines/floranet/procedures/deliveryDate_get.sql index 70cb48818..f88f7f6e5 100644 --- a/db/routines/floranet/procedures/deliveryDate_get.sql +++ b/db/routines/floranet/procedures/deliveryDate_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/order_confirm.sql b/db/routines/floranet/procedures/order_confirm.sql index 98e15bbab..2e95ffcd3 100644 --- a/db/routines/floranet/procedures/order_confirm.sql +++ b/db/routines/floranet/procedures/order_confirm.sql @@ -1,7 +1,7 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`root`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) READS SQL DATA proc:BEGIN diff --git a/db/routines/floranet/procedures/order_put.sql b/db/routines/floranet/procedures/order_put.sql index c5eb71472..9a2fe02e1 100644 --- a/db/routines/floranet/procedures/order_put.sql +++ b/db/routines/floranet/procedures/order_put.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/sliders_get.sql b/db/routines/floranet/procedures/sliders_get.sql index bafda4732..9708dd82d 100644 --- a/db/routines/floranet/procedures/sliders_get.sql +++ b/db/routines/floranet/procedures/sliders_get.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.sliders_get; DELIMITER $$ $$ -CREATE DEFINER=`root`@`localhost` PROCEDURE floranet.sliders_get() +CREATE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.sliders_get() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/functions/myClient_getDebt.sql b/db/routines/hedera/functions/myClient_getDebt.sql index 7f981904e..5eb057b11 100644 --- a/db/routines/hedera/functions/myClient_getDebt.sql +++ b/db/routines/hedera/functions/myClient_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/myUser_checkRestPriv.sql b/db/routines/hedera/functions/myUser_checkRestPriv.sql index 874499ce9..032aa0f46 100644 --- a/db/routines/hedera/functions/myUser_checkRestPriv.sql +++ b/db/routines/hedera/functions/myUser_checkRestPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/order_getTotal.sql b/db/routines/hedera/functions/order_getTotal.sql index 2edb6340d..a6b9f1c68 100644 --- a/db/routines/hedera/functions/order_getTotal.sql +++ b/db/routines/hedera/functions/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) RETURNS decimal(10,2) DETERMINISTIC READS SQL DATA diff --git a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql index c9fa54f36..cca806303 100644 --- a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql +++ b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/image_ref.sql b/db/routines/hedera/procedures/image_ref.sql index 4c6e925fe..e60d16679 100644 --- a/db/routines/hedera/procedures/image_ref.sql +++ b/db/routines/hedera/procedures/image_ref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`image_ref`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`image_ref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/image_unref.sql b/db/routines/hedera/procedures/image_unref.sql index 146fc486b..3416b7989 100644 --- a/db/routines/hedera/procedures/image_unref.sql +++ b/db/routines/hedera/procedures/image_unref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`image_unref`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`image_unref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/item_calcCatalog.sql b/db/routines/hedera/procedures/item_calcCatalog.sql index fae89bd5c..128a0cff5 100644 --- a/db/routines/hedera/procedures/item_calcCatalog.sql +++ b/db/routines/hedera/procedures/item_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( vSelf INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/hedera/procedures/item_getVisible.sql b/db/routines/hedera/procedures/item_getVisible.sql index 2f4ef32ab..6a9205f55 100644 --- a/db/routines/hedera/procedures/item_getVisible.sql +++ b/db/routines/hedera/procedures/item_getVisible.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_getVisible`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_getVisible`( vWarehouse TINYINT, vDate DATE, vType INT, diff --git a/db/routines/hedera/procedures/item_listAllocation.sql b/db/routines/hedera/procedures/item_listAllocation.sql index 4a9c723f5..3b9d59498 100644 --- a/db/routines/hedera/procedures/item_listAllocation.sql +++ b/db/routines/hedera/procedures/item_listAllocation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) BEGIN /** * Lists visible items and it's box sizes of the specified diff --git a/db/routines/hedera/procedures/myOrder_addItem.sql b/db/routines/hedera/procedures/myOrder_addItem.sql index b5ea34ea2..e852e1e20 100644 --- a/db/routines/hedera/procedures/myOrder_addItem.sql +++ b/db/routines/hedera/procedures/myOrder_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql index 05c2a41f2..9fea0f500 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql index b83286a2b..92904fbe7 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/myOrder_checkConfig.sql b/db/routines/hedera/procedures/myOrder_checkConfig.sql index ca810805c..d7dfeeb21 100644 --- a/db/routines/hedera/procedures/myOrder_checkConfig.sql +++ b/db/routines/hedera/procedures/myOrder_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) proc: BEGIN /** * Comprueba que la cesta esta creada y que su configuración es diff --git a/db/routines/hedera/procedures/myOrder_checkMine.sql b/db/routines/hedera/procedures/myOrder_checkMine.sql index 7e00b2f7f..95f856245 100644 --- a/db/routines/hedera/procedures/myOrder_checkMine.sql +++ b/db/routines/hedera/procedures/myOrder_checkMine.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) proc: BEGIN /** * Check that order is owned by current user, otherwise throws an error. diff --git a/db/routines/hedera/procedures/myOrder_configure.sql b/db/routines/hedera/procedures/myOrder_configure.sql index 185384fc0..a524cbf18 100644 --- a/db/routines/hedera/procedures/myOrder_configure.sql +++ b/db/routines/hedera/procedures/myOrder_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_configureForGuest.sql b/db/routines/hedera/procedures/myOrder_configureForGuest.sql index 9d4ede5e0..5973b1c24 100644 --- a/db/routines/hedera/procedures/myOrder_configureForGuest.sql +++ b/db/routines/hedera/procedures/myOrder_configureForGuest.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) BEGIN DECLARE vMethod VARCHAR(255); DECLARE vAgency INT; diff --git a/db/routines/hedera/procedures/myOrder_confirm.sql b/db/routines/hedera/procedures/myOrder_confirm.sql index 2117ea448..f54740aed 100644 --- a/db/routines/hedera/procedures/myOrder_confirm.sql +++ b/db/routines/hedera/procedures/myOrder_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) BEGIN CALL myOrder_checkMine(vSelf); CALL order_checkConfig(vSelf); diff --git a/db/routines/hedera/procedures/myOrder_create.sql b/db/routines/hedera/procedures/myOrder_create.sql index 251948bc6..485673249 100644 --- a/db/routines/hedera/procedures/myOrder_create.sql +++ b/db/routines/hedera/procedures/myOrder_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_create`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_create`( OUT vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_getAvailable.sql b/db/routines/hedera/procedures/myOrder_getAvailable.sql index 00ac60563..5ec0bab33 100644 --- a/db/routines/hedera/procedures/myOrder_getAvailable.sql +++ b/db/routines/hedera/procedures/myOrder_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/myOrder_getTax.sql b/db/routines/hedera/procedures/myOrder_getTax.sql index 826a37efd..786cf1db9 100644 --- a/db/routines/hedera/procedures/myOrder_getTax.sql +++ b/db/routines/hedera/procedures/myOrder_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/myOrder_newWithAddress.sql b/db/routines/hedera/procedures/myOrder_newWithAddress.sql index ec3f07d9f..3e9c0f89b 100644 --- a/db/routines/hedera/procedures/myOrder_newWithAddress.sql +++ b/db/routines/hedera/procedures/myOrder_newWithAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( OUT vSelf INT, vLandingDate DATE, vAddressFk INT) diff --git a/db/routines/hedera/procedures/myOrder_newWithDate.sql b/db/routines/hedera/procedures/myOrder_newWithDate.sql index 4d1837e2b..17ca687e1 100644 --- a/db/routines/hedera/procedures/myOrder_newWithDate.sql +++ b/db/routines/hedera/procedures/myOrder_newWithDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( OUT vSelf INT, vLandingDate DATE) BEGIN diff --git a/db/routines/hedera/procedures/myTicket_get.sql b/db/routines/hedera/procedures/myTicket_get.sql index 7d203aca6..c1ec11f73 100644 --- a/db/routines/hedera/procedures/myTicket_get.sql +++ b/db/routines/hedera/procedures/myTicket_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) BEGIN /** * Returns a current user ticket header. diff --git a/db/routines/hedera/procedures/myTicket_getPackages.sql b/db/routines/hedera/procedures/myTicket_getPackages.sql index 8ed486dff..8aa165d9f 100644 --- a/db/routines/hedera/procedures/myTicket_getPackages.sql +++ b/db/routines/hedera/procedures/myTicket_getPackages.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) BEGIN /** * Returns a current user ticket packages. diff --git a/db/routines/hedera/procedures/myTicket_getRows.sql b/db/routines/hedera/procedures/myTicket_getRows.sql index 0a99ce892..c0c1ae18d 100644 --- a/db/routines/hedera/procedures/myTicket_getRows.sql +++ b/db/routines/hedera/procedures/myTicket_getRows.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) BEGIN SELECT r.itemFk, r.quantity, r.concept, r.price, r.discount, i.category, i.size, i.stems, i.inkFk, diff --git a/db/routines/hedera/procedures/myTicket_getServices.sql b/db/routines/hedera/procedures/myTicket_getServices.sql index 56ca52c19..7318d0973 100644 --- a/db/routines/hedera/procedures/myTicket_getServices.sql +++ b/db/routines/hedera/procedures/myTicket_getServices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) BEGIN /** * Returns a current user ticket services. diff --git a/db/routines/hedera/procedures/myTicket_list.sql b/db/routines/hedera/procedures/myTicket_list.sql index b063ce25c..d2e2a5686 100644 --- a/db/routines/hedera/procedures/myTicket_list.sql +++ b/db/routines/hedera/procedures/myTicket_list.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) BEGIN /** * Returns the current user list of tickets between two dates reange. diff --git a/db/routines/hedera/procedures/myTicket_logAccess.sql b/db/routines/hedera/procedures/myTicket_logAccess.sql index 1dcee8dd6..866c33b52 100644 --- a/db/routines/hedera/procedures/myTicket_logAccess.sql +++ b/db/routines/hedera/procedures/myTicket_logAccess.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) BEGIN /** * Logs an access to a ticket. diff --git a/db/routines/hedera/procedures/myTpvTransaction_end.sql b/db/routines/hedera/procedures/myTpvTransaction_end.sql index 3884f0e37..93c55c10a 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_end.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/myTpvTransaction_start.sql b/db/routines/hedera/procedures/myTpvTransaction_start.sql index 71bae97fa..f554b28c4 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_start.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( vAmount INT, vCompany INT) BEGIN diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index f690f9aa6..46cf6848a 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_addItem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/order_calcCatalog.sql b/db/routines/hedera/procedures/order_calcCatalog.sql index 239e01788..16cd03db8 100644 --- a/db/routines/hedera/procedures/order_calcCatalog.sql +++ b/db/routines/hedera/procedures/order_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) BEGIN /** * Gets the availability and prices for order items. diff --git a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql index 517e9dab9..55e2d1416 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/order_calcCatalogFull.sql b/db/routines/hedera/procedures/order_calcCatalogFull.sql index 41408c5e8..3d689e188 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/order_checkConfig.sql b/db/routines/hedera/procedures/order_checkConfig.sql index 9dbea1a76..f570333bb 100644 --- a/db/routines/hedera/procedures/order_checkConfig.sql +++ b/db/routines/hedera/procedures/order_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) BEGIN /** * Comprueba que la configuración del pedido es correcta. diff --git a/db/routines/hedera/procedures/order_checkEditable.sql b/db/routines/hedera/procedures/order_checkEditable.sql index 512e6e6f1..6cf25986a 100644 --- a/db/routines/hedera/procedures/order_checkEditable.sql +++ b/db/routines/hedera/procedures/order_checkEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) BEGIN /** * Cheks if order is editable. diff --git a/db/routines/hedera/procedures/order_configure.sql b/db/routines/hedera/procedures/order_configure.sql index b03acec08..3d4583716 100644 --- a/db/routines/hedera/procedures/order_configure.sql +++ b/db/routines/hedera/procedures/order_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_configure`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/order_confirm.sql b/db/routines/hedera/procedures/order_confirm.sql index 6fd53b4ea..d4f67f0d6 100644 --- a/db/routines/hedera/procedures/order_confirm.sql +++ b/db/routines/hedera/procedures/order_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) BEGIN /** * Confirms an order, creating each of its tickets on diff --git a/db/routines/hedera/procedures/order_confirmWithUser.sql b/db/routines/hedera/procedures/order_confirmWithUser.sql index 9c932aaa1..8a825531d 100644 --- a/db/routines/hedera/procedures/order_confirmWithUser.sql +++ b/db/routines/hedera/procedures/order_confirmWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`(vSelf INT, vUserId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`(vSelf INT, vUserId INT) BEGIN /** * Confirms an order, creating each of its tickets on the corresponding diff --git a/db/routines/hedera/procedures/order_getAvailable.sql b/db/routines/hedera/procedures/order_getAvailable.sql index 2b7d60e33..e5e1c26a1 100644 --- a/db/routines/hedera/procedures/order_getAvailable.sql +++ b/db/routines/hedera/procedures/order_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/order_getTax.sql b/db/routines/hedera/procedures/order_getTax.sql index d24ffe7ef..9331135c5 100644 --- a/db/routines/hedera/procedures/order_getTax.sql +++ b/db/routines/hedera/procedures/order_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getTax`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getTax`() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/order_getTotal.sql b/db/routines/hedera/procedures/order_getTotal.sql index c0b8d40ae..81d8d8f86 100644 --- a/db/routines/hedera/procedures/order_getTotal.sql +++ b/db/routines/hedera/procedures/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getTotal`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getTotal`() BEGIN /** * Calcula el total con IVA para un conjunto de orders. diff --git a/db/routines/hedera/procedures/order_recalc.sql b/db/routines/hedera/procedures/order_recalc.sql index 1398b49f6..88cee3736 100644 --- a/db/routines/hedera/procedures/order_recalc.sql +++ b/db/routines/hedera/procedures/order_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) BEGIN /** * Recalculates the order total. diff --git a/db/routines/hedera/procedures/order_update.sql b/db/routines/hedera/procedures/order_update.sql index 207cad09f..6705cf9c1 100644 --- a/db/routines/hedera/procedures/order_update.sql +++ b/db/routines/hedera/procedures/order_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) proc: BEGIN /** * Actualiza las líneas de un pedido. diff --git a/db/routines/hedera/procedures/survey_vote.sql b/db/routines/hedera/procedures/survey_vote.sql index 46c31393a..3a9c2b9eb 100644 --- a/db/routines/hedera/procedures/survey_vote.sql +++ b/db/routines/hedera/procedures/survey_vote.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) BEGIN DECLARE vSurvey INT; DECLARE vCount TINYINT; diff --git a/db/routines/hedera/procedures/tpvTransaction_confirm.sql b/db/routines/hedera/procedures/tpvTransaction_confirm.sql index 60a6d8452..56ec892b0 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirm.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( vAmount INT ,vOrder INT ,vMerchant INT diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql index b6a71af01..3cf04f695 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) BEGIN /** * Confirma todas las transacciones confirmadas por el cliente pero no diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql index 7cbdb65c6..52419c022 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) BEGIN /** * Confirma manualmente una transacción espedificando su identificador. diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql index 7ca0e44e2..46865caa7 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() BEGIN /** * Confirms multiple transactions comming from Redsys "canales" exported CSV. diff --git a/db/routines/hedera/procedures/tpvTransaction_end.sql b/db/routines/hedera/procedures/tpvTransaction_end.sql index ec0a0224d..20c5fec53 100644 --- a/db/routines/hedera/procedures/tpvTransaction_end.sql +++ b/db/routines/hedera/procedures/tpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/tpvTransaction_start.sql b/db/routines/hedera/procedures/tpvTransaction_start.sql index 55fd922da..9bf119cbc 100644 --- a/db/routines/hedera/procedures/tpvTransaction_start.sql +++ b/db/routines/hedera/procedures/tpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( vAmount INT, vCompany INT, vUser INT) diff --git a/db/routines/hedera/procedures/tpvTransaction_undo.sql b/db/routines/hedera/procedures/tpvTransaction_undo.sql index f31ba6a80..828aa4ed5 100644 --- a/db/routines/hedera/procedures/tpvTransaction_undo.sql +++ b/db/routines/hedera/procedures/tpvTransaction_undo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) p: BEGIN DECLARE vCustomer INT; DECLARE vAmount DOUBLE; diff --git a/db/routines/hedera/procedures/visitUser_new.sql b/db/routines/hedera/procedures/visitUser_new.sql index 3c299f209..033b71db2 100644 --- a/db/routines/hedera/procedures/visitUser_new.sql +++ b/db/routines/hedera/procedures/visitUser_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visitUser_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visitUser_new`( vAccess INT ,vSsid VARCHAR(64) ) diff --git a/db/routines/hedera/procedures/visit_listByBrowser.sql b/db/routines/hedera/procedures/visit_listByBrowser.sql index 2fa45b8f2..9350f0bc0 100644 --- a/db/routines/hedera/procedures/visit_listByBrowser.sql +++ b/db/routines/hedera/procedures/visit_listByBrowser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) BEGIN /** * Lists visits grouped by browser. diff --git a/db/routines/hedera/procedures/visit_register.sql b/db/routines/hedera/procedures/visit_register.sql index 80b6f16a9..32b3fbdc5 100644 --- a/db/routines/hedera/procedures/visit_register.sql +++ b/db/routines/hedera/procedures/visit_register.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visit_register`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visit_register`( vVisit INT ,vPlatform VARCHAR(30) ,vBrowser VARCHAR(30) diff --git a/db/routines/hedera/triggers/link_afterDelete.sql b/db/routines/hedera/triggers/link_afterDelete.sql index 571540cba..aa10f0bb9 100644 --- a/db/routines/hedera/triggers/link_afterDelete.sql +++ b/db/routines/hedera/triggers/link_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterDelete` AFTER DELETE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterInsert.sql b/db/routines/hedera/triggers/link_afterInsert.sql index e3f163a9e..54230ecbd 100644 --- a/db/routines/hedera/triggers/link_afterInsert.sql +++ b/db/routines/hedera/triggers/link_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterInsert` AFTER INSERT ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterUpdate.sql b/db/routines/hedera/triggers/link_afterUpdate.sql index 7ffe2a335..34790cb91 100644 --- a/db/routines/hedera/triggers/link_afterUpdate.sql +++ b/db/routines/hedera/triggers/link_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterUpdate` AFTER UPDATE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterDelete.sql b/db/routines/hedera/triggers/news_afterDelete.sql index 07a0403e0..24a61d99f 100644 --- a/db/routines/hedera/triggers/news_afterDelete.sql +++ b/db/routines/hedera/triggers/news_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterDelete` AFTER DELETE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterInsert.sql b/db/routines/hedera/triggers/news_afterInsert.sql index 61e6078ef..75303340c 100644 --- a/db/routines/hedera/triggers/news_afterInsert.sql +++ b/db/routines/hedera/triggers/news_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterInsert` AFTER INSERT ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterUpdate.sql b/db/routines/hedera/triggers/news_afterUpdate.sql index 15ea32f1d..db4c4aab9 100644 --- a/db/routines/hedera/triggers/news_afterUpdate.sql +++ b/db/routines/hedera/triggers/news_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterUpdate` AFTER UPDATE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/orderRow_beforeInsert.sql b/db/routines/hedera/triggers/orderRow_beforeInsert.sql index 0c9f31bab..2fe73c3ef 100644 --- a/db/routines/hedera/triggers/orderRow_beforeInsert.sql +++ b/db/routines/hedera/triggers/orderRow_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` BEFORE INSERT ON `orderRow` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterInsert.sql b/db/routines/hedera/triggers/order_afterInsert.sql index 2fe83ee8f..fb75c2231 100644 --- a/db/routines/hedera/triggers/order_afterInsert.sql +++ b/db/routines/hedera/triggers/order_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_afterInsert` AFTER INSERT ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterUpdate.sql b/db/routines/hedera/triggers/order_afterUpdate.sql index 25f51b3f0..59ea2bf84 100644 --- a/db/routines/hedera/triggers/order_afterUpdate.sql +++ b/db/routines/hedera/triggers/order_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_afterUpdate` AFTER UPDATE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_beforeDelete.sql b/db/routines/hedera/triggers/order_beforeDelete.sql index eb602be89..63b324bb0 100644 --- a/db/routines/hedera/triggers/order_beforeDelete.sql +++ b/db/routines/hedera/triggers/order_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_beforeDelete` BEFORE DELETE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/views/mainAccountBank.sql b/db/routines/hedera/views/mainAccountBank.sql index 3130a1614..7adc3abfc 100644 --- a/db/routines/hedera/views/mainAccountBank.sql +++ b/db/routines/hedera/views/mainAccountBank.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`mainAccountBank` AS SELECT `e`.`name` AS `name`, diff --git a/db/routines/hedera/views/messageL10n.sql b/db/routines/hedera/views/messageL10n.sql index 6488de6a9..65aea36e4 100644 --- a/db/routines/hedera/views/messageL10n.sql +++ b/db/routines/hedera/views/messageL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`messageL10n` AS SELECT `m`.`code` AS `code`, diff --git a/db/routines/hedera/views/myAddress.sql b/db/routines/hedera/views/myAddress.sql index ee8d87759..f843e2346 100644 --- a/db/routines/hedera/views/myAddress.sql +++ b/db/routines/hedera/views/myAddress.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myAddress` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myBasketDefaults.sql b/db/routines/hedera/views/myBasketDefaults.sql index 475212da1..0db6f83c4 100644 --- a/db/routines/hedera/views/myBasketDefaults.sql +++ b/db/routines/hedera/views/myBasketDefaults.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myBasketDefaults` AS SELECT coalesce(`dm`.`code`, `cm`.`code`) AS `deliveryMethod`, diff --git a/db/routines/hedera/views/myClient.sql b/db/routines/hedera/views/myClient.sql index ef7159549..d7aa1e77c 100644 --- a/db/routines/hedera/views/myClient.sql +++ b/db/routines/hedera/views/myClient.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myClient` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/hedera/views/myInvoice.sql b/db/routines/hedera/views/myInvoice.sql index dd1a917ad..bad224e8f 100644 --- a/db/routines/hedera/views/myInvoice.sql +++ b/db/routines/hedera/views/myInvoice.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myInvoice` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/hedera/views/myMenu.sql b/db/routines/hedera/views/myMenu.sql index 94e58835d..c61a7baa1 100644 --- a/db/routines/hedera/views/myMenu.sql +++ b/db/routines/hedera/views/myMenu.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myMenu` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrder.sql b/db/routines/hedera/views/myOrder.sql index 78becd884..22ddfaf16 100644 --- a/db/routines/hedera/views/myOrder.sql +++ b/db/routines/hedera/views/myOrder.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrder` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderRow.sql b/db/routines/hedera/views/myOrderRow.sql index af42b0745..ed10ea245 100644 --- a/db/routines/hedera/views/myOrderRow.sql +++ b/db/routines/hedera/views/myOrderRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderRow` AS SELECT `orw`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderTicket.sql b/db/routines/hedera/views/myOrderTicket.sql index fa8220b55..2174e7822 100644 --- a/db/routines/hedera/views/myOrderTicket.sql +++ b/db/routines/hedera/views/myOrderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderTicket` AS SELECT `o`.`id` AS `orderFk`, diff --git a/db/routines/hedera/views/myTicket.sql b/db/routines/hedera/views/myTicket.sql index f17cda9a4..05ab55720 100644 --- a/db/routines/hedera/views/myTicket.sql +++ b/db/routines/hedera/views/myTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicket` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketRow.sql b/db/routines/hedera/views/myTicketRow.sql index 5afff812b..19b070aae 100644 --- a/db/routines/hedera/views/myTicketRow.sql +++ b/db/routines/hedera/views/myTicketRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketRow` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketService.sql b/db/routines/hedera/views/myTicketService.sql index feb839873..80b55581b 100644 --- a/db/routines/hedera/views/myTicketService.sql +++ b/db/routines/hedera/views/myTicketService.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketService` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketState.sql b/db/routines/hedera/views/myTicketState.sql index 530441e3b..e09c1b656 100644 --- a/db/routines/hedera/views/myTicketState.sql +++ b/db/routines/hedera/views/myTicketState.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketState` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTpvTransaction.sql b/db/routines/hedera/views/myTpvTransaction.sql index 98694065f..afd157b1d 100644 --- a/db/routines/hedera/views/myTpvTransaction.sql +++ b/db/routines/hedera/views/myTpvTransaction.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTpvTransaction` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/orderTicket.sql b/db/routines/hedera/views/orderTicket.sql index c35077935..ef866356b 100644 --- a/db/routines/hedera/views/orderTicket.sql +++ b/db/routines/hedera/views/orderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`orderTicket` AS SELECT `b`.`orderFk` AS `orderFk`, diff --git a/db/routines/hedera/views/order_component.sql b/db/routines/hedera/views/order_component.sql index b3eb7522b..33800327d 100644 --- a/db/routines/hedera/views/order_component.sql +++ b/db/routines/hedera/views/order_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_component` AS SELECT `t`.`rowFk` AS `order_row_id`, diff --git a/db/routines/hedera/views/order_row.sql b/db/routines/hedera/views/order_row.sql index f69fd98a3..721faafe1 100644 --- a/db/routines/hedera/views/order_row.sql +++ b/db/routines/hedera/views/order_row.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_row` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/pbx/functions/clientFromPhone.sql b/db/routines/pbx/functions/clientFromPhone.sql index dc18810aa..fe7795043 100644 --- a/db/routines/pbx/functions/clientFromPhone.sql +++ b/db/routines/pbx/functions/clientFromPhone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/pbx/functions/phone_format.sql b/db/routines/pbx/functions/phone_format.sql index dc697386a..1f3983ca2 100644 --- a/db/routines/pbx/functions/phone_format.sql +++ b/db/routines/pbx/functions/phone_format.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/pbx/procedures/phone_isValid.sql b/db/routines/pbx/procedures/phone_isValid.sql index 083a3e54b..ea633e2d6 100644 --- a/db/routines/pbx/procedures/phone_isValid.sql +++ b/db/routines/pbx/procedures/phone_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) BEGIN /** * Check if an phone has the correct format and diff --git a/db/routines/pbx/procedures/queue_isValid.sql b/db/routines/pbx/procedures/queue_isValid.sql index 52c752e09..da4b3cf34 100644 --- a/db/routines/pbx/procedures/queue_isValid.sql +++ b/db/routines/pbx/procedures/queue_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) BEGIN /** * Check if an queue has the correct format and diff --git a/db/routines/pbx/procedures/sip_getExtension.sql b/db/routines/pbx/procedures/sip_getExtension.sql index 25047fa1f..31cc361ad 100644 --- a/db/routines/pbx/procedures/sip_getExtension.sql +++ b/db/routines/pbx/procedures/sip_getExtension.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) BEGIN /* diff --git a/db/routines/pbx/procedures/sip_isValid.sql b/db/routines/pbx/procedures/sip_isValid.sql index 4a0182bcc..263842c5e 100644 --- a/db/routines/pbx/procedures/sip_isValid.sql +++ b/db/routines/pbx/procedures/sip_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) BEGIN /** * Check if an extension has the correct format and diff --git a/db/routines/pbx/procedures/sip_setPassword.sql b/db/routines/pbx/procedures/sip_setPassword.sql index 14e0b05c5..a282ad2b7 100644 --- a/db/routines/pbx/procedures/sip_setPassword.sql +++ b/db/routines/pbx/procedures/sip_setPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( vUser VARCHAR(255), vPassword VARCHAR(255) ) diff --git a/db/routines/pbx/triggers/blacklist_beforeInsert.sql b/db/routines/pbx/triggers/blacklist_beforeInsert.sql index ff55c2647..bb5a66f91 100644 --- a/db/routines/pbx/triggers/blacklist_beforeInsert.sql +++ b/db/routines/pbx/triggers/blacklist_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` BEFORE INSERT ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql index 84f2c4bbb..eab203ae4 100644 --- a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql +++ b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` BEFORE UPDATE ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeInsert.sql b/db/routines/pbx/triggers/followme_beforeInsert.sql index 69f11c5e6..ef8fa61de 100644 --- a/db/routines/pbx/triggers/followme_beforeInsert.sql +++ b/db/routines/pbx/triggers/followme_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` BEFORE INSERT ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeUpdate.sql b/db/routines/pbx/triggers/followme_beforeUpdate.sql index 697c18974..ade655f76 100644 --- a/db/routines/pbx/triggers/followme_beforeUpdate.sql +++ b/db/routines/pbx/triggers/followme_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` BEFORE UPDATE ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql index debe9c201..8c7748b5a 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` BEFORE INSERT ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql index 9734cc277..2ac8f7feb 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` BEFORE UPDATE ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeInsert.sql b/db/routines/pbx/triggers/queue_beforeInsert.sql index 4644dea89..53c921203 100644 --- a/db/routines/pbx/triggers/queue_beforeInsert.sql +++ b/db/routines/pbx/triggers/queue_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` BEFORE INSERT ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeUpdate.sql b/db/routines/pbx/triggers/queue_beforeUpdate.sql index a2923045e..cdfab8e8c 100644 --- a/db/routines/pbx/triggers/queue_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queue_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` BEFORE UPDATE ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterInsert.sql b/db/routines/pbx/triggers/sip_afterInsert.sql index 7f0643a98..80be18d48 100644 --- a/db/routines/pbx/triggers/sip_afterInsert.sql +++ b/db/routines/pbx/triggers/sip_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_afterInsert` AFTER INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterUpdate.sql b/db/routines/pbx/triggers/sip_afterUpdate.sql index d14df040c..651c60c49 100644 --- a/db/routines/pbx/triggers/sip_afterUpdate.sql +++ b/db/routines/pbx/triggers/sip_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` AFTER UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeInsert.sql b/db/routines/pbx/triggers/sip_beforeInsert.sql index 832232119..b886b8ed3 100644 --- a/db/routines/pbx/triggers/sip_beforeInsert.sql +++ b/db/routines/pbx/triggers/sip_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` BEFORE INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeUpdate.sql b/db/routines/pbx/triggers/sip_beforeUpdate.sql index e23b8e22e..6dadc25ea 100644 --- a/db/routines/pbx/triggers/sip_beforeUpdate.sql +++ b/db/routines/pbx/triggers/sip_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` BEFORE UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/views/cdrConf.sql b/db/routines/pbx/views/cdrConf.sql index adf24c87d..b70ad6b0d 100644 --- a/db/routines/pbx/views/cdrConf.sql +++ b/db/routines/pbx/views/cdrConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`cdrConf` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/pbx/views/followmeConf.sql b/db/routines/pbx/views/followmeConf.sql index 75eb25ff2..29eb44509 100644 --- a/db/routines/pbx/views/followmeConf.sql +++ b/db/routines/pbx/views/followmeConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/followmeNumberConf.sql b/db/routines/pbx/views/followmeNumberConf.sql index c83b639a8..d391170f7 100644 --- a/db/routines/pbx/views/followmeNumberConf.sql +++ b/db/routines/pbx/views/followmeNumberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeNumberConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/queueConf.sql b/db/routines/pbx/views/queueConf.sql index 107989801..c072f4585 100644 --- a/db/routines/pbx/views/queueConf.sql +++ b/db/routines/pbx/views/queueConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueConf` AS SELECT `q`.`name` AS `name`, diff --git a/db/routines/pbx/views/queueMemberConf.sql b/db/routines/pbx/views/queueMemberConf.sql index 7007daa1e..b56b4c2ef 100644 --- a/db/routines/pbx/views/queueMemberConf.sql +++ b/db/routines/pbx/views/queueMemberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueMemberConf` AS SELECT `m`.`id` AS `uniqueid`, diff --git a/db/routines/pbx/views/sipConf.sql b/db/routines/pbx/views/sipConf.sql index 0765264bc..5f090a025 100644 --- a/db/routines/pbx/views/sipConf.sql +++ b/db/routines/pbx/views/sipConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`sipConf` AS SELECT `s`.`user_id` AS `id`, diff --git a/db/routines/psico/procedures/answerSort.sql b/db/routines/psico/procedures/answerSort.sql index 75a317b37..26a4866f5 100644 --- a/db/routines/psico/procedures/answerSort.sql +++ b/db/routines/psico/procedures/answerSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`answerSort`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`answerSort`() BEGIN UPDATE answer diff --git a/db/routines/psico/procedures/examNew.sql b/db/routines/psico/procedures/examNew.sql index 4f27212f6..a92ea52ee 100644 --- a/db/routines/psico/procedures/examNew.sql +++ b/db/routines/psico/procedures/examNew.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/psico/procedures/getExamQuestions.sql b/db/routines/psico/procedures/getExamQuestions.sql index 9ab1eb6d0..3af82b029 100644 --- a/db/routines/psico/procedures/getExamQuestions.sql +++ b/db/routines/psico/procedures/getExamQuestions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) BEGIN SELECT p.text,p.examFk,p.questionFk,p.answerFk,p.id ,a.text AS answerText,a.correct, a.id AS answerFk diff --git a/db/routines/psico/procedures/getExamType.sql b/db/routines/psico/procedures/getExamType.sql index d829950e6..e22f4058b 100644 --- a/db/routines/psico/procedures/getExamType.sql +++ b/db/routines/psico/procedures/getExamType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`getExamType`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`getExamType`() BEGIN SELECT id,name diff --git a/db/routines/psico/procedures/questionSort.sql b/db/routines/psico/procedures/questionSort.sql index 56c5ef4a9..8ce3fc4ea 100644 --- a/db/routines/psico/procedures/questionSort.sql +++ b/db/routines/psico/procedures/questionSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`questionSort`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`questionSort`() BEGIN UPDATE question diff --git a/db/routines/psico/views/examView.sql b/db/routines/psico/views/examView.sql index 1aa768919..8d5241eee 100644 --- a/db/routines/psico/views/examView.sql +++ b/db/routines/psico/views/examView.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`examView` AS SELECT `q`.`text` AS `text`, diff --git a/db/routines/psico/views/results.sql b/db/routines/psico/views/results.sql index 1d7945d32..161e9869c 100644 --- a/db/routines/psico/views/results.sql +++ b/db/routines/psico/views/results.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`results` AS SELECT `eq`.`examFk` AS `examFk`, diff --git a/db/routines/sage/functions/company_getCode.sql b/db/routines/sage/functions/company_getCode.sql index bdb8c17fb..f857af597 100644 --- a/db/routines/sage/functions/company_getCode.sql +++ b/db/routines/sage/functions/company_getCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) RETURNS int(2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/sage/procedures/accountingMovements_add.sql b/db/routines/sage/procedures/accountingMovements_add.sql index 8c129beb2..f1cfe044b 100644 --- a/db/routines/sage/procedures/accountingMovements_add.sql +++ b/db/routines/sage/procedures/accountingMovements_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( vYear INT, vCompanyFk INT ) diff --git a/db/routines/sage/procedures/clean.sql b/db/routines/sage/procedures/clean.sql index f1175c4dc..19ba354bb 100644 --- a/db/routines/sage/procedures/clean.sql +++ b/db/routines/sage/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`clean`() BEGIN /** * Maintains tables over time by removing unnecessary data diff --git a/db/routines/sage/procedures/clientSupplier_add.sql b/db/routines/sage/procedures/clientSupplier_add.sql index 2d1a51882..dbc761fad 100644 --- a/db/routines/sage/procedures/clientSupplier_add.sql +++ b/db/routines/sage/procedures/clientSupplier_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( vCompanyFk INT ) BEGIN diff --git a/db/routines/sage/procedures/importErrorNotification.sql b/db/routines/sage/procedures/importErrorNotification.sql index 75b0cffc8..1b9f9fd0d 100644 --- a/db/routines/sage/procedures/importErrorNotification.sql +++ b/db/routines/sage/procedures/importErrorNotification.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`importErrorNotification`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`importErrorNotification`() BEGIN /** * Inserta notificaciones con los errores detectados durante la importación diff --git a/db/routines/sage/procedures/invoiceIn_add.sql b/db/routines/sage/procedures/invoiceIn_add.sql index 0898d6810..f65620949 100644 --- a/db/routines/sage/procedures/invoiceIn_add.sql +++ b/db/routines/sage/procedures/invoiceIn_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceIn_manager.sql b/db/routines/sage/procedures/invoiceIn_manager.sql index f9bf0e92f..954193b7b 100644 --- a/db/routines/sage/procedures/invoiceIn_manager.sql +++ b/db/routines/sage/procedures/invoiceIn_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceOut_add.sql b/db/routines/sage/procedures/invoiceOut_add.sql index 95d6a56dd..c0a2adb9b 100644 --- a/db/routines/sage/procedures/invoiceOut_add.sql +++ b/db/routines/sage/procedures/invoiceOut_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/invoiceOut_manager.sql b/db/routines/sage/procedures/invoiceOut_manager.sql index 58c0f2a21..94074d014 100644 --- a/db/routines/sage/procedures/invoiceOut_manager.sql +++ b/db/routines/sage/procedures/invoiceOut_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/pgc_add.sql b/db/routines/sage/procedures/pgc_add.sql index 78d80a9fe..7f83f0a51 100644 --- a/db/routines/sage/procedures/pgc_add.sql +++ b/db/routines/sage/procedures/pgc_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) BEGIN /** * Añade cuentas del plan general contable para exportarlos a Sage diff --git a/db/routines/sage/triggers/movConta_beforeUpdate.sql b/db/routines/sage/triggers/movConta_beforeUpdate.sql index 316b28b7f..578f28d76 100644 --- a/db/routines/sage/triggers/movConta_beforeUpdate.sql +++ b/db/routines/sage/triggers/movConta_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` BEFORE UPDATE ON `movConta` FOR EACH ROW BEGIN diff --git a/db/routines/sage/views/clientLastTwoMonths.sql b/db/routines/sage/views/clientLastTwoMonths.sql index 059cb0780..0c90d54c0 100644 --- a/db/routines/sage/views/clientLastTwoMonths.sql +++ b/db/routines/sage/views/clientLastTwoMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`clientLastTwoMonths` AS SELECT `vn`.`invoiceOut`.`clientFk` AS `clientFk`, diff --git a/db/routines/sage/views/supplierLastThreeMonths.sql b/db/routines/sage/views/supplierLastThreeMonths.sql index f841fd98c..e8acae5cf 100644 --- a/db/routines/sage/views/supplierLastThreeMonths.sql +++ b/db/routines/sage/views/supplierLastThreeMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`supplierLastThreeMonths` AS SELECT `vn`.`invoiceIn`.`supplierFk` AS `supplierFk`, diff --git a/db/routines/salix/events/accessToken_prune.sql b/db/routines/salix/events/accessToken_prune.sql index 28b04699f..7efd7f1ab 100644 --- a/db/routines/salix/events/accessToken_prune.sql +++ b/db/routines/salix/events/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `salix`.`accessToken_prune` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `salix`.`accessToken_prune` ON SCHEDULE EVERY 1 DAY STARTS '2023-03-14 05:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/salix/procedures/accessToken_prune.sql b/db/routines/salix/procedures/accessToken_prune.sql index f1a8a0fe8..3244c7328 100644 --- a/db/routines/salix/procedures/accessToken_prune.sql +++ b/db/routines/salix/procedures/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `salix`.`accessToken_prune`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `salix`.`accessToken_prune`() BEGIN /** * Borra de la tabla salix.AccessToken todos aquellos tokens que hayan caducado diff --git a/db/routines/salix/views/Account.sql b/db/routines/salix/views/Account.sql index 080e3e50b..0be7c53ec 100644 --- a/db/routines/salix/views/Account.sql +++ b/db/routines/salix/views/Account.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Account` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/salix/views/Role.sql b/db/routines/salix/views/Role.sql index b04ad82a6..682258d04 100644 --- a/db/routines/salix/views/Role.sql +++ b/db/routines/salix/views/Role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Role` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/salix/views/RoleMapping.sql b/db/routines/salix/views/RoleMapping.sql index 48500a05e..415d4e668 100644 --- a/db/routines/salix/views/RoleMapping.sql +++ b/db/routines/salix/views/RoleMapping.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`RoleMapping` AS SELECT `u`.`id` * 1000 + `r`.`inheritsFrom` AS `id`, diff --git a/db/routines/salix/views/User.sql b/db/routines/salix/views/User.sql index e03803870..b519af3a2 100644 --- a/db/routines/salix/views/User.sql +++ b/db/routines/salix/views/User.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`User` AS SELECT `account`.`user`.`id` AS `id`, diff --git a/db/routines/srt/events/moving_clean.sql b/db/routines/srt/events/moving_clean.sql index a6f7792a2..aa1bc043d 100644 --- a/db/routines/srt/events/moving_clean.sql +++ b/db/routines/srt/events/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `srt`.`moving_clean` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `srt`.`moving_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-21 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/srt/functions/bid.sql b/db/routines/srt/functions/bid.sql index ee4ffc7d3..48cc0ede4 100644 --- a/db/routines/srt/functions/bid.sql +++ b/db/routines/srt/functions/bid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/srt/functions/bufferPool_get.sql b/db/routines/srt/functions/bufferPool_get.sql index 1576381f5..6d70702dd 100644 --- a/db/routines/srt/functions/bufferPool_get.sql +++ b/db/routines/srt/functions/bufferPool_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`bufferPool_get`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`bufferPool_get`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_get.sql b/db/routines/srt/functions/buffer_get.sql index 55150bd99..d6affd270 100644 --- a/db/routines/srt/functions/buffer_get.sql +++ b/db/routines/srt/functions/buffer_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getRandom.sql b/db/routines/srt/functions/buffer_getRandom.sql index bc7229594..00b51b21d 100644 --- a/db/routines/srt/functions/buffer_getRandom.sql +++ b/db/routines/srt/functions/buffer_getRandom.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getRandom`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getRandom`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getState.sql b/db/routines/srt/functions/buffer_getState.sql index b5c4ac2e4..909de3959 100644 --- a/db/routines/srt/functions/buffer_getState.sql +++ b/db/routines/srt/functions/buffer_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getType.sql b/db/routines/srt/functions/buffer_getType.sql index 4b4194b3c..b9521d42d 100644 --- a/db/routines/srt/functions/buffer_getType.sql +++ b/db/routines/srt/functions/buffer_getType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_isFull.sql b/db/routines/srt/functions/buffer_isFull.sql index a1ae08484..c02e1dd61 100644 --- a/db/routines/srt/functions/buffer_isFull.sql +++ b/db/routines/srt/functions/buffer_isFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/dayMinute.sql b/db/routines/srt/functions/dayMinute.sql index ab66dd7d2..dd59b9a71 100644 --- a/db/routines/srt/functions/dayMinute.sql +++ b/db/routines/srt/functions/dayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_check.sql b/db/routines/srt/functions/expedition_check.sql index 314cafd96..67940eb01 100644 --- a/db/routines/srt/functions/expedition_check.sql +++ b/db/routines/srt/functions/expedition_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_getDayMinute.sql b/db/routines/srt/functions/expedition_getDayMinute.sql index 01ff534f5..395a5a36a 100644 --- a/db/routines/srt/functions/expedition_getDayMinute.sql +++ b/db/routines/srt/functions/expedition_getDayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/procedures/buffer_getExpCount.sql b/db/routines/srt/procedures/buffer_getExpCount.sql index 5ead3d421..5683e1915 100644 --- a/db/routines/srt/procedures/buffer_getExpCount.sql +++ b/db/routines/srt/procedures/buffer_getExpCount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) BEGIN /* Devuelve el número de expediciones de un buffer * diff --git a/db/routines/srt/procedures/buffer_getStateType.sql b/db/routines/srt/procedures/buffer_getStateType.sql index bba8202db..b9a8cd59f 100644 --- a/db/routines/srt/procedures/buffer_getStateType.sql +++ b/db/routines/srt/procedures/buffer_getStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_giveBack.sql b/db/routines/srt/procedures/buffer_giveBack.sql index f8d349914..6066893a4 100644 --- a/db/routines/srt/procedures/buffer_giveBack.sql +++ b/db/routines/srt/procedures/buffer_giveBack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) BEGIN /* Devuelve una caja al celluveyor * diff --git a/db/routines/srt/procedures/buffer_readPhotocell.sql b/db/routines/srt/procedures/buffer_readPhotocell.sql index 2bf2cfa1d..dd06f03cf 100644 --- a/db/routines/srt/procedures/buffer_readPhotocell.sql +++ b/db/routines/srt/procedures/buffer_readPhotocell.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) BEGIN /** * Establece el estado de un buffer en función del número de fotocélulas activas diff --git a/db/routines/srt/procedures/buffer_setEmpty.sql b/db/routines/srt/procedures/buffer_setEmpty.sql index e97d397ed..da495a78e 100644 --- a/db/routines/srt/procedures/buffer_setEmpty.sql +++ b/db/routines/srt/procedures/buffer_setEmpty.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setState.sql b/db/routines/srt/procedures/buffer_setState.sql index f0f136942..2ca06ae44 100644 --- a/db/routines/srt/procedures/buffer_setState.sql +++ b/db/routines/srt/procedures/buffer_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setStateType.sql b/db/routines/srt/procedures/buffer_setStateType.sql index 954a380ac..4e826e5da 100644 --- a/db/routines/srt/procedures/buffer_setStateType.sql +++ b/db/routines/srt/procedures/buffer_setStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setType.sql b/db/routines/srt/procedures/buffer_setType.sql index 7d6c508dc..4e1618dac 100644 --- a/db/routines/srt/procedures/buffer_setType.sql +++ b/db/routines/srt/procedures/buffer_setType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) BEGIN /** * Cambia el tipo de un buffer, si está permitido diff --git a/db/routines/srt/procedures/buffer_setTypeByName.sql b/db/routines/srt/procedures/buffer_setTypeByName.sql index 9365d5399..54eab19d8 100644 --- a/db/routines/srt/procedures/buffer_setTypeByName.sql +++ b/db/routines/srt/procedures/buffer_setTypeByName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) BEGIN /** diff --git a/db/routines/srt/procedures/clean.sql b/db/routines/srt/procedures/clean.sql index 3d02ae0cd..bb8bac021 100644 --- a/db/routines/srt/procedures/clean.sql +++ b/db/routines/srt/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`clean`() BEGIN DECLARE vLastDated DATE DEFAULT TIMESTAMPADD(WEEK,-2,util.VN_CURDATE()); diff --git a/db/routines/srt/procedures/expeditionLoading_add.sql b/db/routines/srt/procedures/expeditionLoading_add.sql index 7fb53c2c6..ed175c13d 100644 --- a/db/routines/srt/procedures/expeditionLoading_add.sql +++ b/db/routines/srt/procedures/expeditionLoading_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) BEGIN DECLARE vMessage VARCHAR(50) DEFAULT ''; diff --git a/db/routines/srt/procedures/expedition_arrived.sql b/db/routines/srt/procedures/expedition_arrived.sql index 2d2c093bc..16b1e55e0 100644 --- a/db/routines/srt/procedures/expedition_arrived.sql +++ b/db/routines/srt/procedures/expedition_arrived.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) BEGIN /** * La expedición ha entrado en un buffer, superando fc2 diff --git a/db/routines/srt/procedures/expedition_bufferOut.sql b/db/routines/srt/procedures/expedition_bufferOut.sql index 69e1fb791..4bf424439 100644 --- a/db/routines/srt/procedures/expedition_bufferOut.sql +++ b/db/routines/srt/procedures/expedition_bufferOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_entering.sql b/db/routines/srt/procedures/expedition_entering.sql index f1b773edb..ee0169c30 100644 --- a/db/routines/srt/procedures/expedition_entering.sql +++ b/db/routines/srt/procedures/expedition_entering.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_get.sql b/db/routines/srt/procedures/expedition_get.sql index 91a0e2ace..da65da800 100644 --- a/db/routines/srt/procedures/expedition_get.sql +++ b/db/routines/srt/procedures/expedition_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) BEGIN DECLARE vId INT; diff --git a/db/routines/srt/procedures/expedition_groupOut.sql b/db/routines/srt/procedures/expedition_groupOut.sql index 5c4540ff6..fc6b50549 100644 --- a/db/routines/srt/procedures/expedition_groupOut.sql +++ b/db/routines/srt/procedures/expedition_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_in.sql b/db/routines/srt/procedures/expedition_in.sql index c6f75876c..73d44b029 100644 --- a/db/routines/srt/procedures/expedition_in.sql +++ b/db/routines/srt/procedures/expedition_in.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_moving.sql b/db/routines/srt/procedures/expedition_moving.sql index 1277ed2bd..16e5fa5f1 100644 --- a/db/routines/srt/procedures/expedition_moving.sql +++ b/db/routines/srt/procedures/expedition_moving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_out.sql b/db/routines/srt/procedures/expedition_out.sql index 5e6608561..c27d79a96 100644 --- a/db/routines/srt/procedures/expedition_out.sql +++ b/db/routines/srt/procedures/expedition_out.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) proc:BEGIN /** * Una expedición ha salido de un buffer por el extremo distal diff --git a/db/routines/srt/procedures/expedition_outAll.sql b/db/routines/srt/procedures/expedition_outAll.sql index ffe925c9d..e5e655abe 100644 --- a/db/routines/srt/procedures/expedition_outAll.sql +++ b/db/routines/srt/procedures/expedition_outAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_relocate.sql b/db/routines/srt/procedures/expedition_relocate.sql index 0f940beff..50422262a 100644 --- a/db/routines/srt/procedures/expedition_relocate.sql +++ b/db/routines/srt/procedures/expedition_relocate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_reset.sql b/db/routines/srt/procedures/expedition_reset.sql index 153edfad2..cd7b89701 100644 --- a/db/routines/srt/procedures/expedition_reset.sql +++ b/db/routines/srt/procedures/expedition_reset.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_reset`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_reset`() BEGIN DELETE FROM srt.moving; diff --git a/db/routines/srt/procedures/expedition_routeOut.sql b/db/routines/srt/procedures/expedition_routeOut.sql index d40384e1f..4473b145b 100644 --- a/db/routines/srt/procedures/expedition_routeOut.sql +++ b/db/routines/srt/procedures/expedition_routeOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_scan.sql b/db/routines/srt/procedures/expedition_scan.sql index e3fcfddef..d33a67434 100644 --- a/db/routines/srt/procedures/expedition_scan.sql +++ b/db/routines/srt/procedures/expedition_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) BEGIN /* Actualiza el estado de una expedicion a OUT, al ser escaneada manualmente diff --git a/db/routines/srt/procedures/expedition_setDimensions.sql b/db/routines/srt/procedures/expedition_setDimensions.sql index 0b4fea28f..b48d0c9fa 100644 --- a/db/routines/srt/procedures/expedition_setDimensions.sql +++ b/db/routines/srt/procedures/expedition_setDimensions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( vExpeditionFk INT, vWeight DECIMAL(10,2), vLength INT, diff --git a/db/routines/srt/procedures/expedition_weighing.sql b/db/routines/srt/procedures/expedition_weighing.sql index bb35edb27..d8f060822 100644 --- a/db/routines/srt/procedures/expedition_weighing.sql +++ b/db/routines/srt/procedures/expedition_weighing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/failureLog_add.sql b/db/routines/srt/procedures/failureLog_add.sql index b572e8503..bb6a86e8e 100644 --- a/db/routines/srt/procedures/failureLog_add.sql +++ b/db/routines/srt/procedures/failureLog_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) BEGIN /* Añade un registro a srt.failureLog diff --git a/db/routines/srt/procedures/lastRFID_add.sql b/db/routines/srt/procedures/lastRFID_add.sql index ec3c83d98..3d5981e50 100644 --- a/db/routines/srt/procedures/lastRFID_add.sql +++ b/db/routines/srt/procedures/lastRFID_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/lastRFID_add_beta.sql b/db/routines/srt/procedures/lastRFID_add_beta.sql index bbeb32410..431937066 100644 --- a/db/routines/srt/procedures/lastRFID_add_beta.sql +++ b/db/routines/srt/procedures/lastRFID_add_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/moving_CollidingSet.sql b/db/routines/srt/procedures/moving_CollidingSet.sql index 69c4f9d9e..654ab165b 100644 --- a/db/routines/srt/procedures/moving_CollidingSet.sql +++ b/db/routines/srt/procedures/moving_CollidingSet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() BEGIN diff --git a/db/routines/srt/procedures/moving_between.sql b/db/routines/srt/procedures/moving_between.sql index 41822d341..6fc15e2d9 100644 --- a/db/routines/srt/procedures/moving_between.sql +++ b/db/routines/srt/procedures/moving_between.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index b8fae7ff4..e5bd27810 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_clean`() BEGIN /** * Elimina movimientos por inactividad diff --git a/db/routines/srt/procedures/moving_delete.sql b/db/routines/srt/procedures/moving_delete.sql index 38491105a..247bb0451 100644 --- a/db/routines/srt/procedures/moving_delete.sql +++ b/db/routines/srt/procedures/moving_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) BEGIN /* Elimina un movimiento diff --git a/db/routines/srt/procedures/moving_groupOut.sql b/db/routines/srt/procedures/moving_groupOut.sql index d901f0ca9..dbc980859 100644 --- a/db/routines/srt/procedures/moving_groupOut.sql +++ b/db/routines/srt/procedures/moving_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_groupOut`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_groupOut`() proc: BEGIN DECLARE vDayMinute INT; diff --git a/db/routines/srt/procedures/moving_next.sql b/db/routines/srt/procedures/moving_next.sql index 6c76b8373..e50bf1424 100644 --- a/db/routines/srt/procedures/moving_next.sql +++ b/db/routines/srt/procedures/moving_next.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_next`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_next`() BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/photocell_setActive.sql b/db/routines/srt/procedures/photocell_setActive.sql index c89e9dc9d..96512a0a8 100644 --- a/db/routines/srt/procedures/photocell_setActive.sql +++ b/db/routines/srt/procedures/photocell_setActive.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) BEGIN REPLACE srt.photocell VALUES (vbufferFk, vPosition, vIsActive); END$$ diff --git a/db/routines/srt/procedures/randomMoving.sql b/db/routines/srt/procedures/randomMoving.sql index b4bdd6591..6ae18140a 100644 --- a/db/routines/srt/procedures/randomMoving.sql +++ b/db/routines/srt/procedures/randomMoving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) BEGIN DECLARE vBufferOld INT DEFAULT 0; DECLARE vBufferFk INT; diff --git a/db/routines/srt/procedures/randomMoving_Launch.sql b/db/routines/srt/procedures/randomMoving_Launch.sql index 031e54873..e9a50d40f 100644 --- a/db/routines/srt/procedures/randomMoving_Launch.sql +++ b/db/routines/srt/procedures/randomMoving_Launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() BEGIN DECLARE i INT DEFAULT 5; diff --git a/db/routines/srt/procedures/restart.sql b/db/routines/srt/procedures/restart.sql index 96adb3bfa..3e2a9257b 100644 --- a/db/routines/srt/procedures/restart.sql +++ b/db/routines/srt/procedures/restart.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`restart`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`restart`() BEGIN /* diff --git a/db/routines/srt/procedures/start.sql b/db/routines/srt/procedures/start.sql index 8e5250796..04b39f59d 100644 --- a/db/routines/srt/procedures/start.sql +++ b/db/routines/srt/procedures/start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`start`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`start`() BEGIN /* diff --git a/db/routines/srt/procedures/stop.sql b/db/routines/srt/procedures/stop.sql index a6fd12bb2..3bef46ae5 100644 --- a/db/routines/srt/procedures/stop.sql +++ b/db/routines/srt/procedures/stop.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`stop`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`stop`() BEGIN /* diff --git a/db/routines/srt/procedures/test.sql b/db/routines/srt/procedures/test.sql index 59a76eb81..8f5a90b1b 100644 --- a/db/routines/srt/procedures/test.sql +++ b/db/routines/srt/procedures/test.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`test`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`test`() BEGIN SELECT 'procedimiento ejecutado con éxito'; diff --git a/db/routines/srt/triggers/expedition_beforeUpdate.sql b/db/routines/srt/triggers/expedition_beforeUpdate.sql index b8933aaf5..3ed1f8df3 100644 --- a/db/routines/srt/triggers/expedition_beforeUpdate.sql +++ b/db/routines/srt/triggers/expedition_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/srt/triggers/moving_afterInsert.sql b/db/routines/srt/triggers/moving_afterInsert.sql index aaa09c99c..ce2ebfdb5 100644 --- a/db/routines/srt/triggers/moving_afterInsert.sql +++ b/db/routines/srt/triggers/moving_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`moving_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `srt`.`moving_afterInsert` AFTER INSERT ON `moving` FOR EACH ROW BEGIN diff --git a/db/routines/srt/views/bufferDayMinute.sql b/db/routines/srt/views/bufferDayMinute.sql index d2108e513..870da7588 100644 --- a/db/routines/srt/views/bufferDayMinute.sql +++ b/db/routines/srt/views/bufferDayMinute.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferDayMinute` AS SELECT `b`.`id` AS `bufferFk`, diff --git a/db/routines/srt/views/bufferFreeLength.sql b/db/routines/srt/views/bufferFreeLength.sql index 4edf1db47..ef3c52eef 100644 --- a/db/routines/srt/views/bufferFreeLength.sql +++ b/db/routines/srt/views/bufferFreeLength.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferFreeLength` AS SELECT cast(`b`.`id` AS decimal(10, 0)) AS `bufferFk`, diff --git a/db/routines/srt/views/bufferStock.sql b/db/routines/srt/views/bufferStock.sql index ca04d3c01..b7c207495 100644 --- a/db/routines/srt/views/bufferStock.sql +++ b/db/routines/srt/views/bufferStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferStock` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/srt/views/routePalletized.sql b/db/routines/srt/views/routePalletized.sql index 15b493c6a..183eff75e 100644 --- a/db/routines/srt/views/routePalletized.sql +++ b/db/routines/srt/views/routePalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`routePalletized` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/srt/views/ticketPalletized.sql b/db/routines/srt/views/ticketPalletized.sql index 04ac24291..f8ac72fcf 100644 --- a/db/routines/srt/views/ticketPalletized.sql +++ b/db/routines/srt/views/ticketPalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`ticketPalletized` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/srt/views/upperStickers.sql b/db/routines/srt/views/upperStickers.sql index 1cd72c12b..b81ef86f5 100644 --- a/db/routines/srt/views/upperStickers.sql +++ b/db/routines/srt/views/upperStickers.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`upperStickers` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/stock/events/log_clean.sql b/db/routines/stock/events/log_clean.sql index 973561a89..fab8888e3 100644 --- a/db/routines/stock/events/log_clean.sql +++ b/db/routines/stock/events/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `stock`.`log_clean` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `stock`.`log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:29:18.000' ON COMPLETION PRESERVE diff --git a/db/routines/stock/events/log_syncNoWait.sql b/db/routines/stock/events/log_syncNoWait.sql index 954d37219..0ac83364b 100644 --- a/db/routines/stock/events/log_syncNoWait.sql +++ b/db/routines/stock/events/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `stock`.`log_syncNoWait` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `stock`.`log_syncNoWait` ON SCHEDULE EVERY 5 SECOND STARTS '2017-06-27 17:15:02.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/stock/procedures/inbound_addPick.sql b/db/routines/stock/procedures/inbound_addPick.sql index 41b93a986..72fd91782 100644 --- a/db/routines/stock/procedures/inbound_addPick.sql +++ b/db/routines/stock/procedures/inbound_addPick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_addPick`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_addPick`( vSelf INT, vOutboundFk INT, vQuantity INT diff --git a/db/routines/stock/procedures/inbound_removePick.sql b/db/routines/stock/procedures/inbound_removePick.sql index e183e1171..9648a92cd 100644 --- a/db/routines/stock/procedures/inbound_removePick.sql +++ b/db/routines/stock/procedures/inbound_removePick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_removePick`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_removePick`( vSelf INT, vOutboundFk INT, vQuantity INT, diff --git a/db/routines/stock/procedures/inbound_requestQuantity.sql b/db/routines/stock/procedures/inbound_requestQuantity.sql index 1cbc1908b..38db462aa 100644 --- a/db/routines/stock/procedures/inbound_requestQuantity.sql +++ b/db/routines/stock/procedures/inbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/inbound_sync.sql b/db/routines/stock/procedures/inbound_sync.sql index 77d3e42f7..be5802e3f 100644 --- a/db/routines/stock/procedures/inbound_sync.sql +++ b/db/routines/stock/procedures/inbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) BEGIN /** * Associates a inbound with their possible outbounds, updating it's available. diff --git a/db/routines/stock/procedures/log_clean.sql b/db/routines/stock/procedures/log_clean.sql index 56634b371..df09166d0 100644 --- a/db/routines/stock/procedures/log_clean.sql +++ b/db/routines/stock/procedures/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_clean`() BEGIN DELETE FROM inbound WHERE dated = vn.getInventoryDate(); DELETE FROM outbound WHERE dated = vn.getInventoryDate(); diff --git a/db/routines/stock/procedures/log_delete.sql b/db/routines/stock/procedures/log_delete.sql index e3b631b4e..4d961be3a 100644 --- a/db/routines/stock/procedures/log_delete.sql +++ b/db/routines/stock/procedures/log_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) proc: BEGIN /** * Processes orphan transactions. diff --git a/db/routines/stock/procedures/log_refreshAll.sql b/db/routines/stock/procedures/log_refreshAll.sql index 3eaad07f2..4f37e5355 100644 --- a/db/routines/stock/procedures/log_refreshAll.sql +++ b/db/routines/stock/procedures/log_refreshAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshAll`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshAll`() BEGIN /** * Recalculates the entire cache. It takes a considerable time, diff --git a/db/routines/stock/procedures/log_refreshBuy.sql b/db/routines/stock/procedures/log_refreshBuy.sql index 488c00a28..0cfc5457b 100644 --- a/db/routines/stock/procedures/log_refreshBuy.sql +++ b/db/routines/stock/procedures/log_refreshBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshOrder.sql b/db/routines/stock/procedures/log_refreshOrder.sql index ce5b31cc8..24f827934 100644 --- a/db/routines/stock/procedures/log_refreshOrder.sql +++ b/db/routines/stock/procedures/log_refreshOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshSale.sql b/db/routines/stock/procedures/log_refreshSale.sql index 3054f8ecb..8ca9a42ad 100644 --- a/db/routines/stock/procedures/log_refreshSale.sql +++ b/db/routines/stock/procedures/log_refreshSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshSale`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshSale`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_sync.sql b/db/routines/stock/procedures/log_sync.sql index 5b03b6ab0..7b56251f5 100644 --- a/db/routines/stock/procedures/log_sync.sql +++ b/db/routines/stock/procedures/log_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) proc: BEGIN DECLARE vDone BOOL; DECLARE vLogId INT; diff --git a/db/routines/stock/procedures/log_syncNoWait.sql b/db/routines/stock/procedures/log_syncNoWait.sql index 00cc215fd..bc5d2e5fa 100644 --- a/db/routines/stock/procedures/log_syncNoWait.sql +++ b/db/routines/stock/procedures/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/stock/procedures/outbound_requestQuantity.sql b/db/routines/stock/procedures/outbound_requestQuantity.sql index 7ddc3545c..57ef3415e 100644 --- a/db/routines/stock/procedures/outbound_requestQuantity.sql +++ b/db/routines/stock/procedures/outbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/outbound_sync.sql b/db/routines/stock/procedures/outbound_sync.sql index 0de352176..abca7ea92 100644 --- a/db/routines/stock/procedures/outbound_sync.sql +++ b/db/routines/stock/procedures/outbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) BEGIN /** * Attaches a outbound with available inbounds. diff --git a/db/routines/stock/procedures/visible_log.sql b/db/routines/stock/procedures/visible_log.sql index cc88d3205..a92a5d03a 100644 --- a/db/routines/stock/procedures/visible_log.sql +++ b/db/routines/stock/procedures/visible_log.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`visible_log`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`visible_log`( vIsPicked BOOL, vWarehouseFk INT, vItemFk INT, diff --git a/db/routines/stock/triggers/inbound_afterDelete.sql b/db/routines/stock/triggers/inbound_afterDelete.sql index 451dcc599..b54370742 100644 --- a/db/routines/stock/triggers/inbound_afterDelete.sql +++ b/db/routines/stock/triggers/inbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`inbound_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`inbound_afterDelete` AFTER DELETE ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/inbound_beforeInsert.sql b/db/routines/stock/triggers/inbound_beforeInsert.sql index 723cb3222..fdaa17714 100644 --- a/db/routines/stock/triggers/inbound_beforeInsert.sql +++ b/db/routines/stock/triggers/inbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` BEFORE INSERT ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_afterDelete.sql b/db/routines/stock/triggers/outbound_afterDelete.sql index e7d756871..4f2ef5a61 100644 --- a/db/routines/stock/triggers/outbound_afterDelete.sql +++ b/db/routines/stock/triggers/outbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`outbound_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`outbound_afterDelete` AFTER DELETE ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_beforeInsert.sql b/db/routines/stock/triggers/outbound_beforeInsert.sql index 86546413e..e98d1ff2d 100644 --- a/db/routines/stock/triggers/outbound_beforeInsert.sql +++ b/db/routines/stock/triggers/outbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` BEFORE INSERT ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/tmp/events/clean.sql b/db/routines/tmp/events/clean.sql index 34b7139cc..b1e3d0f55 100644 --- a/db/routines/tmp/events/clean.sql +++ b/db/routines/tmp/events/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `tmp`.`clean` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `tmp`.`clean` ON SCHEDULE EVERY 1 HOUR STARTS '2022-03-01 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/tmp/procedures/clean.sql b/db/routines/tmp/procedures/clean.sql index a15f98311..72cf38390 100644 --- a/db/routines/tmp/procedures/clean.sql +++ b/db/routines/tmp/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `tmp`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `tmp`.`clean`() BEGIN DECLARE vTableName VARCHAR(255); DECLARE vDone BOOL; diff --git a/db/routines/util/events/slowLog_prune.sql b/db/routines/util/events/slowLog_prune.sql index aa9b0c184..2171ecacf 100644 --- a/db/routines/util/events/slowLog_prune.sql +++ b/db/routines/util/events/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `util`.`slowLog_prune` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `util`.`slowLog_prune` ON SCHEDULE EVERY 1 DAY STARTS '2021-10-08 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/util/functions/VN_CURDATE.sql b/db/routines/util/functions/VN_CURDATE.sql index 692f097a0..fe68671f3 100644 --- a/db/routines/util/functions/VN_CURDATE.sql +++ b/db/routines/util/functions/VN_CURDATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_CURDATE`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_CURDATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_CURTIME.sql b/db/routines/util/functions/VN_CURTIME.sql index ae66ea500..21dbec141 100644 --- a/db/routines/util/functions/VN_CURTIME.sql +++ b/db/routines/util/functions/VN_CURTIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_CURTIME`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_CURTIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_NOW.sql b/db/routines/util/functions/VN_NOW.sql index 47b1bb4fd..f19f8c0d0 100644 --- a/db/routines/util/functions/VN_NOW.sql +++ b/db/routines/util/functions/VN_NOW.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_NOW`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_NOW`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql index 717459862..15177dc4c 100644 --- a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_DATE.sql b/db/routines/util/functions/VN_UTC_DATE.sql index 2b40b7dc2..c89f25230 100644 --- a/db/routines/util/functions/VN_UTC_DATE.sql +++ b/db/routines/util/functions/VN_UTC_DATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIME.sql b/db/routines/util/functions/VN_UTC_TIME.sql index 930333d23..4900ea228 100644 --- a/db/routines/util/functions/VN_UTC_TIME.sql +++ b/db/routines/util/functions/VN_UTC_TIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql index 97d125874..824ae3d3f 100644 --- a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/accountNumberToIban.sql b/db/routines/util/functions/accountNumberToIban.sql index 49d3c917e..9ba98bac2 100644 --- a/db/routines/util/functions/accountNumberToIban.sql +++ b/db/routines/util/functions/accountNumberToIban.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`accountNumberToIban`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`accountNumberToIban`( vAccount VARCHAR(20) ) RETURNS varchar(4) CHARSET utf8mb3 COLLATE utf8mb3_general_ci diff --git a/db/routines/util/functions/accountShortToStandard.sql b/db/routines/util/functions/accountShortToStandard.sql index 71e360bf3..6933d8043 100644 --- a/db/routines/util/functions/accountShortToStandard.sql +++ b/db/routines/util/functions/accountShortToStandard.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/binlogQueue_getDelay.sql b/db/routines/util/functions/binlogQueue_getDelay.sql index d6cf49377..1edb697fc 100644 --- a/db/routines/util/functions/binlogQueue_getDelay.sql +++ b/db/routines/util/functions/binlogQueue_getDelay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) RETURNS BIGINT READS SQL DATA NOT DETERMINISTIC diff --git a/db/routines/util/functions/capitalizeFirst.sql b/db/routines/util/functions/capitalizeFirst.sql index 859777de2..af179b526 100644 --- a/db/routines/util/functions/capitalizeFirst.sql +++ b/db/routines/util/functions/capitalizeFirst.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/checkPrintableChars.sql b/db/routines/util/functions/checkPrintableChars.sql index a4addce24..5da18775a 100644 --- a/db/routines/util/functions/checkPrintableChars.sql +++ b/db/routines/util/functions/checkPrintableChars.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`checkPrintableChars`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`checkPrintableChars`( vString VARCHAR(255) ) RETURNS tinyint(1) DETERMINISTIC diff --git a/db/routines/util/functions/crypt.sql b/db/routines/util/functions/crypt.sql index 664563cd0..de589d8b6 100644 --- a/db/routines/util/functions/crypt.sql +++ b/db/routines/util/functions/crypt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/cryptOff.sql b/db/routines/util/functions/cryptOff.sql index bc281e4ec..40919355b 100644 --- a/db/routines/util/functions/cryptOff.sql +++ b/db/routines/util/functions/cryptOff.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/dayEnd.sql b/db/routines/util/functions/dayEnd.sql index 1da4dcfe6..f37129906 100644 --- a/db/routines/util/functions/dayEnd.sql +++ b/db/routines/util/functions/dayEnd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) RETURNS datetime DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfMonth.sql b/db/routines/util/functions/firstDayOfMonth.sql index 77971c7b8..0e7add4eb 100644 --- a/db/routines/util/functions/firstDayOfMonth.sql +++ b/db/routines/util/functions/firstDayOfMonth.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfYear.sql b/db/routines/util/functions/firstDayOfYear.sql index 710c3a688..7ca8fe3f2 100644 --- a/db/routines/util/functions/firstDayOfYear.sql +++ b/db/routines/util/functions/firstDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/formatRow.sql b/db/routines/util/functions/formatRow.sql index b119df015..a579c752b 100644 --- a/db/routines/util/functions/formatRow.sql +++ b/db/routines/util/functions/formatRow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) RETURNS varchar(512) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/formatTable.sql b/db/routines/util/functions/formatTable.sql index 00a2b50bf..686f8a910 100644 --- a/db/routines/util/functions/formatTable.sql +++ b/db/routines/util/functions/formatTable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hasDateOverlapped.sql b/db/routines/util/functions/hasDateOverlapped.sql index 9441e201c..cba4a5567 100644 --- a/db/routines/util/functions/hasDateOverlapped.sql +++ b/db/routines/util/functions/hasDateOverlapped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hmacSha2.sql b/db/routines/util/functions/hmacSha2.sql index 78611c118..3389356d6 100644 --- a/db/routines/util/functions/hmacSha2.sql +++ b/db/routines/util/functions/hmacSha2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) RETURNS varchar(128) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/isLeapYear.sql b/db/routines/util/functions/isLeapYear.sql index 2c7c96f3d..98054543a 100644 --- a/db/routines/util/functions/isLeapYear.sql +++ b/db/routines/util/functions/isLeapYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/json_removeNulls.sql b/db/routines/util/functions/json_removeNulls.sql index 5fa741380..10f4692be 100644 --- a/db/routines/util/functions/json_removeNulls.sql +++ b/db/routines/util/functions/json_removeNulls.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/lang.sql b/db/routines/util/functions/lang.sql index 3431cdcc7..20c288c54 100644 --- a/db/routines/util/functions/lang.sql +++ b/db/routines/util/functions/lang.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`lang`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`lang`() RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/lastDayOfYear.sql b/db/routines/util/functions/lastDayOfYear.sql index 52607ae21..56ae28e7e 100644 --- a/db/routines/util/functions/lastDayOfYear.sql +++ b/db/routines/util/functions/lastDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/log_formatDate.sql b/db/routines/util/functions/log_formatDate.sql index 84c269027..cf2618119 100644 --- a/db/routines/util/functions/log_formatDate.sql +++ b/db/routines/util/functions/log_formatDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/midnight.sql b/db/routines/util/functions/midnight.sql index b37415682..dcf7a71e7 100644 --- a/db/routines/util/functions/midnight.sql +++ b/db/routines/util/functions/midnight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`midnight`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`midnight`() RETURNS datetime DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/mockTime.sql b/db/routines/util/functions/mockTime.sql index ab7859e7d..681840e63 100644 --- a/db/routines/util/functions/mockTime.sql +++ b/db/routines/util/functions/mockTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockTimeBase.sql b/db/routines/util/functions/mockTimeBase.sql index 7b3ea1a4a..6685abaaa 100644 --- a/db/routines/util/functions/mockTimeBase.sql +++ b/db/routines/util/functions/mockTimeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockUtcTime.sql b/db/routines/util/functions/mockUtcTime.sql index e79c3b241..1c3de9629 100644 --- a/db/routines/util/functions/mockUtcTime.sql +++ b/db/routines/util/functions/mockUtcTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/nextWeek.sql b/db/routines/util/functions/nextWeek.sql index f764201aa..7a496bcf7 100644 --- a/db/routines/util/functions/nextWeek.sql +++ b/db/routines/util/functions/nextWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/notification_send.sql b/db/routines/util/functions/notification_send.sql index 981cde2d6..5fb9efe3d 100644 --- a/db/routines/util/functions/notification_send.sql +++ b/db/routines/util/functions/notification_send.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) RETURNS int(11) NOT DETERMINISTIC MODIFIES SQL DATA diff --git a/db/routines/util/functions/quarterFirstDay.sql b/db/routines/util/functions/quarterFirstDay.sql index b8239ffc8..4c45ef5e9 100644 --- a/db/routines/util/functions/quarterFirstDay.sql +++ b/db/routines/util/functions/quarterFirstDay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/quoteIdentifier.sql b/db/routines/util/functions/quoteIdentifier.sql index 1c0c4c543..fe36a8d98 100644 --- a/db/routines/util/functions/quoteIdentifier.sql +++ b/db/routines/util/functions/quoteIdentifier.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/stringXor.sql b/db/routines/util/functions/stringXor.sql index 252cd0040..5038374dd 100644 --- a/db/routines/util/functions/stringXor.sql +++ b/db/routines/util/functions/stringXor.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) RETURNS mediumblob DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/today.sql b/db/routines/util/functions/today.sql index d57b04071..fcc28d08f 100644 --- a/db/routines/util/functions/today.sql +++ b/db/routines/util/functions/today.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`today`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`today`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/tomorrow.sql b/db/routines/util/functions/tomorrow.sql index 71fbcf8f5..27b5f9779 100644 --- a/db/routines/util/functions/tomorrow.sql +++ b/db/routines/util/functions/tomorrow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`tomorrow`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`tomorrow`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/twoDaysAgo.sql b/db/routines/util/functions/twoDaysAgo.sql index 2612ed689..3049f3bd2 100644 --- a/db/routines/util/functions/twoDaysAgo.sql +++ b/db/routines/util/functions/twoDaysAgo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`twoDaysAgo`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`twoDaysAgo`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yearRelativePosition.sql b/db/routines/util/functions/yearRelativePosition.sql index e62e50eb4..1b11f1b88 100644 --- a/db/routines/util/functions/yearRelativePosition.sql +++ b/db/routines/util/functions/yearRelativePosition.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yesterday.sql b/db/routines/util/functions/yesterday.sql index a1938ab10..59160875b 100644 --- a/db/routines/util/functions/yesterday.sql +++ b/db/routines/util/functions/yesterday.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`yesterday`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`yesterday`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/procedures/checkHex.sql b/db/routines/util/procedures/checkHex.sql index 3cd5452e8..a6785b613 100644 --- a/db/routines/util/procedures/checkHex.sql +++ b/db/routines/util/procedures/checkHex.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) BEGIN /** * Comprueba si vParam es un número hexadecimal que empieza por # y tiene una longitud total de 7 dígitos diff --git a/db/routines/util/procedures/connection_kill.sql b/db/routines/util/procedures/connection_kill.sql index b38509d1b..db8488a15 100644 --- a/db/routines/util/procedures/connection_kill.sql +++ b/db/routines/util/procedures/connection_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`connection_kill`( vConnectionId BIGINT ) BEGIN diff --git a/db/routines/util/procedures/debugAdd.sql b/db/routines/util/procedures/debugAdd.sql index a8f7b3aa2..7bb7e23b2 100644 --- a/db/routines/util/procedures/debugAdd.sql +++ b/db/routines/util/procedures/debugAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`debugAdd`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`debugAdd`( vVariable VARCHAR(255), vValue TEXT ) diff --git a/db/routines/util/procedures/exec.sql b/db/routines/util/procedures/exec.sql index ca66884a5..30b33a5fd 100644 --- a/db/routines/util/procedures/exec.sql +++ b/db/routines/util/procedures/exec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) SQL SECURITY INVOKER BEGIN /** diff --git a/db/routines/util/procedures/log_add.sql b/db/routines/util/procedures/log_add.sql index a5b1519c4..5572e45fd 100644 --- a/db/routines/util/procedures/log_add.sql +++ b/db/routines/util/procedures/log_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_add`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_addWithUser.sql b/db/routines/util/procedures/log_addWithUser.sql index 2e20821a6..b5100e228 100644 --- a/db/routines/util/procedures/log_addWithUser.sql +++ b/db/routines/util/procedures/log_addWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_addWithUser`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_addWithUser`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_cleanInstances.sql b/db/routines/util/procedures/log_cleanInstances.sql index 756a8d1f3..089fd8b6b 100644 --- a/db/routines/util/procedures/log_cleanInstances.sql +++ b/db/routines/util/procedures/log_cleanInstances.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_cleanInstances`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_cleanInstances`( vActionCode VARCHAR(45), INOUT vOldInstance JSON, INOUT vNewInstance JSON) diff --git a/db/routines/util/procedures/procNoOverlap.sql b/db/routines/util/procedures/procNoOverlap.sql index 9bb2f109e..71ec770c5 100644 --- a/db/routines/util/procedures/procNoOverlap.sql +++ b/db/routines/util/procedures/procNoOverlap.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) SQL SECURITY INVOKER proc: BEGIN /** diff --git a/db/routines/util/procedures/proc_changedPrivs.sql b/db/routines/util/procedures/proc_changedPrivs.sql index 220652d1a..74aa94f72 100644 --- a/db/routines/util/procedures/proc_changedPrivs.sql +++ b/db/routines/util/procedures/proc_changedPrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() BEGIN SELECT s.* FROM proc_privs s diff --git a/db/routines/util/procedures/proc_restorePrivs.sql b/db/routines/util/procedures/proc_restorePrivs.sql index 0d502a6db..cd6eb09b4 100644 --- a/db/routines/util/procedures/proc_restorePrivs.sql +++ b/db/routines/util/procedures/proc_restorePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() BEGIN /** * Restores the privileges saved by proc_savePrivs(). diff --git a/db/routines/util/procedures/proc_savePrivs.sql b/db/routines/util/procedures/proc_savePrivs.sql index 75c289f7b..8b77a59b5 100644 --- a/db/routines/util/procedures/proc_savePrivs.sql +++ b/db/routines/util/procedures/proc_savePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_savePrivs`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_savePrivs`() BEGIN /** * Saves routine privileges, used to simplify the task of keeping diff --git a/db/routines/util/procedures/slowLog_prune.sql b/db/routines/util/procedures/slowLog_prune.sql index d676ae3d9..b77b347d4 100644 --- a/db/routines/util/procedures/slowLog_prune.sql +++ b/db/routines/util/procedures/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`slowLog_prune`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`slowLog_prune`() BEGIN /** * Prunes MySQL slow query log table deleting all records older than one week. diff --git a/db/routines/util/procedures/throw.sql b/db/routines/util/procedures/throw.sql index 260915e0d..bc2ba2b34 100644 --- a/db/routines/util/procedures/throw.sql +++ b/db/routines/util/procedures/throw.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) BEGIN /** * Throws a user-defined exception. diff --git a/db/routines/util/procedures/time_generate.sql b/db/routines/util/procedures/time_generate.sql index 14cc1edc5..041806929 100644 --- a/db/routines/util/procedures/time_generate.sql +++ b/db/routines/util/procedures/time_generate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) BEGIN /** * Generate a temporary table between the days passed as parameters diff --git a/db/routines/util/procedures/tx_commit.sql b/db/routines/util/procedures/tx_commit.sql index 35f96df8d..6a85203e5 100644 --- a/db/routines/util/procedures/tx_commit.sql +++ b/db/routines/util/procedures/tx_commit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) BEGIN /** * Confirma los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_rollback.sql b/db/routines/util/procedures/tx_rollback.sql index 4b00f9ec1..526a8a0fb 100644 --- a/db/routines/util/procedures/tx_rollback.sql +++ b/db/routines/util/procedures/tx_rollback.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) BEGIN /** * Deshace los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_start.sql b/db/routines/util/procedures/tx_start.sql index 41f8c94ee..815d901be 100644 --- a/db/routines/util/procedures/tx_start.sql +++ b/db/routines/util/procedures/tx_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) BEGIN /** * Inicia una transacción. diff --git a/db/routines/util/procedures/warn.sql b/db/routines/util/procedures/warn.sql index e1dd33c9c..287c79ccd 100644 --- a/db/routines/util/procedures/warn.sql +++ b/db/routines/util/procedures/warn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) BEGIN DECLARE w VARCHAR(1) DEFAULT '__'; SET @warn = vCode; diff --git a/db/routines/util/views/eventLogGrouped.sql b/db/routines/util/views/eventLogGrouped.sql index 8615458b5..5e417f6a7 100644 --- a/db/routines/util/views/eventLogGrouped.sql +++ b/db/routines/util/views/eventLogGrouped.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `util`.`eventLogGrouped` AS SELECT max(`t`.`date`) AS `lastHappened`, diff --git a/db/routines/vn/events/claim_changeState.sql b/db/routines/vn/events/claim_changeState.sql index 5d94170a0..873401a34 100644 --- a/db/routines/vn/events/claim_changeState.sql +++ b/db/routines/vn/events/claim_changeState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`claim_changeState` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`claim_changeState` ON SCHEDULE EVERY 1 DAY STARTS '2024-06-06 07:52:46.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/client_unassignSalesPerson.sql b/db/routines/vn/events/client_unassignSalesPerson.sql index 46ad414b1..6228809b3 100644 --- a/db/routines/vn/events/client_unassignSalesPerson.sql +++ b/db/routines/vn/events/client_unassignSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`client_unassignSalesPerson` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`client_unassignSalesPerson` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:30:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/client_userDisable.sql b/db/routines/vn/events/client_userDisable.sql index b3354f8fd..33c73fe2c 100644 --- a/db/routines/vn/events/client_userDisable.sql +++ b/db/routines/vn/events/client_userDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`client_userDisable` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`client_userDisable` ON SCHEDULE EVERY 1 MONTH STARTS '2023-06-01 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/collection_make.sql b/db/routines/vn/events/collection_make.sql index 1c6bd0fcb..0e4b4303e 100644 --- a/db/routines/vn/events/collection_make.sql +++ b/db/routines/vn/events/collection_make.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`collection_make` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`collection_make` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-09-15 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/department_doCalc.sql b/db/routines/vn/events/department_doCalc.sql index b3ce49fa5..5ccc8c390 100644 --- a/db/routines/vn/events/department_doCalc.sql +++ b/db/routines/vn/events/department_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`department_doCalc` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`department_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-11-15 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/envialiaThreHoldChecker.sql b/db/routines/vn/events/envialiaThreHoldChecker.sql index a5440ef67..3f2e403c3 100644 --- a/db/routines/vn/events/envialiaThreHoldChecker.sql +++ b/db/routines/vn/events/envialiaThreHoldChecker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`envialiaThreHoldChecker` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`envialiaThreHoldChecker` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:52:46.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/greuge_notify.sql b/db/routines/vn/events/greuge_notify.sql index 8c23dbe36..c80ba144b 100644 --- a/db/routines/vn/events/greuge_notify.sql +++ b/db/routines/vn/events/greuge_notify.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`greuge_notify` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/itemImageQueue_check.sql b/db/routines/vn/events/itemImageQueue_check.sql index 680faa37f..d4c5253e0 100644 --- a/db/routines/vn/events/itemImageQueue_check.sql +++ b/db/routines/vn/events/itemImageQueue_check.sql @@ -1,11 +1,11 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`itemImageQueue_check` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`itemImageQueue_check` ON SCHEDULE EVERY 1 HOUR STARTS '2023-07-28 00:00:00.000' ON COMPLETION PRESERVE ENABLE -DO BEGIN - DELETE FROM itemImageQueue - WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig); +DO BEGIN + DELETE FROM itemImageQueue + WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig); END$$ DELIMITER ; diff --git a/db/routines/vn/events/itemShelvingSale_doReserve.sql b/db/routines/vn/events/itemShelvingSale_doReserve.sql index 228886556..10a281549 100644 --- a/db/routines/vn/events/itemShelvingSale_doReserve.sql +++ b/db/routines/vn/events/itemShelvingSale_doReserve.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve` ON SCHEDULE EVERY 15 SECOND STARTS '2023-10-16 00:00:00' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/mysqlConnectionsSorter_kill.sql b/db/routines/vn/events/mysqlConnectionsSorter_kill.sql index 1f5d46b18..a902aa0e4 100644 --- a/db/routines/vn/events/mysqlConnectionsSorter_kill.sql +++ b/db/routines/vn/events/mysqlConnectionsSorter_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill` ON SCHEDULE EVERY 1 MINUTE STARTS '2021-10-28 09:56:27.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/printQueue_check.sql b/db/routines/vn/events/printQueue_check.sql index 262ddc7c8..d049cacc8 100644 --- a/db/routines/vn/events/printQueue_check.sql +++ b/db/routines/vn/events/printQueue_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`printQueue_check` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2022-01-28 09:52:46.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/raidUpdate.sql b/db/routines/vn/events/raidUpdate.sql index 619dadb48..94a851509 100644 --- a/db/routines/vn/events/raidUpdate.sql +++ b/db/routines/vn/events/raidUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`raidUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`raidUpdate` ON SCHEDULE EVERY 1 DAY STARTS '2017-12-29 00:05:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/route_doRecalc.sql b/db/routines/vn/events/route_doRecalc.sql index 62f75a3bc..424eae3ce 100644 --- a/db/routines/vn/events/route_doRecalc.sql +++ b/db/routines/vn/events/route_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`route_doRecalc` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`route_doRecalc` ON SCHEDULE EVERY 10 SECOND STARTS '2021-07-08 07:32:23.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/vehicle_notify.sql b/db/routines/vn/events/vehicle_notify.sql index d974e1817..1732db4cf 100644 --- a/db/routines/vn/events/vehicle_notify.sql +++ b/db/routines/vn/events/vehicle_notify.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`vehicle_notify` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`vehicle_notify` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-01 00:07:00.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/workerJourney_doRecalc.sql b/db/routines/vn/events/workerJourney_doRecalc.sql index 61077fc5b..8d6b41cd4 100644 --- a/db/routines/vn/events/workerJourney_doRecalc.sql +++ b/db/routines/vn/events/workerJourney_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`workerJourney_doRecalc` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`workerJourney_doRecalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-22 04:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/worker_updateChangedBusiness.sql b/db/routines/vn/events/worker_updateChangedBusiness.sql index 02f7af8aa..18714c3a5 100644 --- a/db/routines/vn/events/worker_updateChangedBusiness.sql +++ b/db/routines/vn/events/worker_updateChangedBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`worker_updateChangedBusiness` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`worker_updateChangedBusiness` ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:05.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/zoneGeo_doCalc.sql b/db/routines/vn/events/zoneGeo_doCalc.sql index 579141e13..82c938de9 100644 --- a/db/routines/vn/events/zoneGeo_doCalc.sql +++ b/db/routines/vn/events/zoneGeo_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`zoneGeo_doCalc` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`zoneGeo_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-09-13 15:30:47.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/functions/MIDNIGHT.sql b/db/routines/vn/functions/MIDNIGHT.sql index c2df0c0c6..7a024dd9c 100644 --- a/db/routines/vn/functions/MIDNIGHT.sql +++ b/db/routines/vn/functions/MIDNIGHT.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE) RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/addressTaxArea.sql b/db/routines/vn/functions/addressTaxArea.sql index 1d4e9e2f0..d297862bd 100644 --- a/db/routines/vn/functions/addressTaxArea.sql +++ b/db/routines/vn/functions/addressTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/address_getGeo.sql b/db/routines/vn/functions/address_getGeo.sql index 1a9f5ddb8..2fbab94e8 100644 --- a/db/routines/vn/functions/address_getGeo.sql +++ b/db/routines/vn/functions/address_getGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/barcodeToItem.sql b/db/routines/vn/functions/barcodeToItem.sql index ee0315118..4f55dcbc2 100644 --- a/db/routines/vn/functions/barcodeToItem.sql +++ b/db/routines/vn/functions/barcodeToItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/buy_getUnitVolume.sql b/db/routines/vn/functions/buy_getUnitVolume.sql index baf300450..fbf754663 100644 --- a/db/routines/vn/functions/buy_getUnitVolume.sql +++ b/db/routines/vn/functions/buy_getUnitVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/buy_getVolume.sql b/db/routines/vn/functions/buy_getVolume.sql index c29c0a57c..3add5dd02 100644 --- a/db/routines/vn/functions/buy_getVolume.sql +++ b/db/routines/vn/functions/buy_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/catalog_componentReverse.sql b/db/routines/vn/functions/catalog_componentReverse.sql index f37b20890..9dde8300f 100644 --- a/db/routines/vn/functions/catalog_componentReverse.sql +++ b/db/routines/vn/functions/catalog_componentReverse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT, vCost DECIMAL(10,3), vM3 DECIMAL(10,3), vAddressFk INT, diff --git a/db/routines/vn/functions/clientGetMana.sql b/db/routines/vn/functions/clientGetMana.sql index fa983c2b2..c2f25adf1 100644 --- a/db/routines/vn/functions/clientGetMana.sql +++ b/db/routines/vn/functions/clientGetMana.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/clientGetSalesPerson.sql b/db/routines/vn/functions/clientGetSalesPerson.sql index 4b8601be3..2db800efc 100644 --- a/db/routines/vn/functions/clientGetSalesPerson.sql +++ b/db/routines/vn/functions/clientGetSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/clientTaxArea.sql b/db/routines/vn/functions/clientTaxArea.sql index f03520b0b..6d16427f7 100644 --- a/db/routines/vn/functions/clientTaxArea.sql +++ b/db/routines/vn/functions/clientTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/client_getDebt.sql b/db/routines/vn/functions/client_getDebt.sql index 8c715d2db..81b380507 100644 --- a/db/routines/vn/functions/client_getDebt.sql +++ b/db/routines/vn/functions/client_getDebt.sql @@ -1,8 +1,8 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE) - RETURNS decimal(10,2) - NOT DETERMINISTIC - READS SQL DATA +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE) + RETURNS decimal(10,2) + NOT DETERMINISTIC + READS SQL DATA BEGIN /** * Returns the risk of a customer. @@ -34,5 +34,5 @@ BEGIN tmp.risk; RETURN vDebt; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/functions/client_getFromPhone.sql b/db/routines/vn/functions/client_getFromPhone.sql index 5e4daa532..4fe290b6c 100644 --- a/db/routines/vn/functions/client_getFromPhone.sql +++ b/db/routines/vn/functions/client_getFromPhone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPerson.sql b/db/routines/vn/functions/client_getSalesPerson.sql index c53816f7f..cff2b81cf 100644 --- a/db/routines/vn/functions/client_getSalesPerson.sql +++ b/db/routines/vn/functions/client_getSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonByTicket.sql b/db/routines/vn/functions/client_getSalesPersonByTicket.sql index 640df11ce..da911a4d3 100644 --- a/db/routines/vn/functions/client_getSalesPersonByTicket.sql +++ b/db/routines/vn/functions/client_getSalesPersonByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonCode.sql b/db/routines/vn/functions/client_getSalesPersonCode.sql index 69b8424d8..39af86e6a 100644 --- a/db/routines/vn/functions/client_getSalesPersonCode.sql +++ b/db/routines/vn/functions/client_getSalesPersonCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql b/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql index 3ec5a8e9d..f752fdf26 100644 --- a/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql +++ b/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_hasDifferentCountries.sql b/db/routines/vn/functions/client_hasDifferentCountries.sql index a90b774c7..d561f10ca 100644 --- a/db/routines/vn/functions/client_hasDifferentCountries.sql +++ b/db/routines/vn/functions/client_hasDifferentCountries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/collection_isPacked.sql b/db/routines/vn/functions/collection_isPacked.sql index 9f148273f..f3da5dd9a 100644 --- a/db/routines/vn/functions/collection_isPacked.sql +++ b/db/routines/vn/functions/collection_isPacked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/currency_getCommission.sql b/db/routines/vn/functions/currency_getCommission.sql index b0a591c23..4053b7794 100644 --- a/db/routines/vn/functions/currency_getCommission.sql +++ b/db/routines/vn/functions/currency_getCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/currentRate.sql b/db/routines/vn/functions/currentRate.sql index 57870fca4..51ef1ee3d 100644 --- a/db/routines/vn/functions/currentRate.sql +++ b/db/routines/vn/functions/currentRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE) RETURNS decimal(10,4) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/deviceProductionUser_accessGranted.sql b/db/routines/vn/functions/deviceProductionUser_accessGranted.sql index a2d39a0ab..5f31e9092 100644 --- a/db/routines/vn/functions/deviceProductionUser_accessGranted.sql +++ b/db/routines/vn/functions/deviceProductionUser_accessGranted.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/duaTax_getRate.sql b/db/routines/vn/functions/duaTax_getRate.sql index a11015066..efc38ba97 100644 --- a/db/routines/vn/functions/duaTax_getRate.sql +++ b/db/routines/vn/functions/duaTax_getRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) RETURNS decimal(5,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ekt_getEntry.sql b/db/routines/vn/functions/ekt_getEntry.sql index c629098a6..37a492195 100644 --- a/db/routines/vn/functions/ekt_getEntry.sql +++ b/db/routines/vn/functions/ekt_getEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ekt_getTravel.sql b/db/routines/vn/functions/ekt_getTravel.sql index 4cf7f5631..2a7a5299f 100644 --- a/db/routines/vn/functions/ekt_getTravel.sql +++ b/db/routines/vn/functions/ekt_getTravel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_getCommission.sql b/db/routines/vn/functions/entry_getCommission.sql index 62946407a..9928aa335 100644 --- a/db/routines/vn/functions/entry_getCommission.sql +++ b/db/routines/vn/functions/entry_getCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT, vCurrencyFk INT, vSupplierFk INT ) diff --git a/db/routines/vn/functions/entry_getCurrency.sql b/db/routines/vn/functions/entry_getCurrency.sql index 4cfce19db..9c663ac69 100644 --- a/db/routines/vn/functions/entry_getCurrency.sql +++ b/db/routines/vn/functions/entry_getCurrency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT, vSupplierFk INT ) RETURNS int(11) diff --git a/db/routines/vn/functions/entry_getForLogiflora.sql b/db/routines/vn/functions/entry_getForLogiflora.sql index 71f0b585c..4c8a33f9f 100644 --- a/db/routines/vn/functions/entry_getForLogiflora.sql +++ b/db/routines/vn/functions/entry_getForLogiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_isIntrastat.sql b/db/routines/vn/functions/entry_isIntrastat.sql index 8d46b4a02..0051e3435 100644 --- a/db/routines/vn/functions/entry_isIntrastat.sql +++ b/db/routines/vn/functions/entry_isIntrastat.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_isInventoryOrPrevious.sql b/db/routines/vn/functions/entry_isInventoryOrPrevious.sql index 4acbf060d..563d50622 100644 --- a/db/routines/vn/functions/entry_isInventoryOrPrevious.sql +++ b/db/routines/vn/functions/entry_isInventoryOrPrevious.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/expedition_checkRoute.sql b/db/routines/vn/functions/expedition_checkRoute.sql index 9b2929797..2874e0c7c 100644 --- a/db/routines/vn/functions/expedition_checkRoute.sql +++ b/db/routines/vn/functions/expedition_checkRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/firstDayOfWeek.sql b/db/routines/vn/functions/firstDayOfWeek.sql index 25ab4480c..82aee70f9 100644 --- a/db/routines/vn/functions/firstDayOfWeek.sql +++ b/db/routines/vn/functions/firstDayOfWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/getAlert3State.sql b/db/routines/vn/functions/getAlert3State.sql index f3a7aae53..4036dd183 100644 --- a/db/routines/vn/functions/getAlert3State.sql +++ b/db/routines/vn/functions/getAlert3State.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT) RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getDueDate.sql b/db/routines/vn/functions/getDueDate.sql index 694117a52..b28beefb0 100644 --- a/db/routines/vn/functions/getDueDate.sql +++ b/db/routines/vn/functions/getDueDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT) RETURNS date NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/functions/getInventoryDate.sql b/db/routines/vn/functions/getInventoryDate.sql index b67f1c384..7c49a6512 100644 --- a/db/routines/vn/functions/getInventoryDate.sql +++ b/db/routines/vn/functions/getInventoryDate.sql @@ -1,8 +1,8 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getInventoryDate`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getInventoryDate`() RETURNS date DETERMINISTIC -BEGIN - RETURN (SELECT inventoried FROM config LIMIT 1); +BEGIN + RETURN (SELECT inventoried FROM config LIMIT 1); END$$ DELIMITER ; diff --git a/db/routines/vn/functions/getNewItemId.sql b/db/routines/vn/functions/getNewItemId.sql index 2cb9b275b..c6e0dbf2e 100644 --- a/db/routines/vn/functions/getNewItemId.sql +++ b/db/routines/vn/functions/getNewItemId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getNewItemId`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getNewItemId`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getNextDueDate.sql b/db/routines/vn/functions/getNextDueDate.sql index 8e8691ec5..811b47931 100644 --- a/db/routines/vn/functions/getNextDueDate.sql +++ b/db/routines/vn/functions/getNextDueDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) RETURNS date NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/functions/getShipmentHour.sql b/db/routines/vn/functions/getShipmentHour.sql index 9eca04ac4..29c4db53d 100644 --- a/db/routines/vn/functions/getShipmentHour.sql +++ b/db/routines/vn/functions/getShipmentHour.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getSpecialPrice.sql b/db/routines/vn/functions/getSpecialPrice.sql index 2cc5f2b99..9136fbeae 100644 --- a/db/routines/vn/functions/getSpecialPrice.sql +++ b/db/routines/vn/functions/getSpecialPrice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11)) RETURNS decimal(10,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getTicketTrolleyLabelCount.sql b/db/routines/vn/functions/getTicketTrolleyLabelCount.sql index b978db73a..25b3e00e4 100644 --- a/db/routines/vn/functions/getTicketTrolleyLabelCount.sql +++ b/db/routines/vn/functions/getTicketTrolleyLabelCount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getUser.sql b/db/routines/vn/functions/getUser.sql index eb85b8346..af59ce823 100644 --- a/db/routines/vn/functions/getUser.sql +++ b/db/routines/vn/functions/getUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getUser`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getUser`() RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/getUserId.sql b/db/routines/vn/functions/getUserId.sql index 9afcb8912..cd85c80a3 100644 --- a/db/routines/vn/functions/getUserId.sql +++ b/db/routines/vn/functions/getUserId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30)) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/hasAnyNegativeBase.sql b/db/routines/vn/functions/hasAnyNegativeBase.sql index 97d1e7328..23a6fe3a4 100644 --- a/db/routines/vn/functions/hasAnyNegativeBase.sql +++ b/db/routines/vn/functions/hasAnyNegativeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasAnyPositiveBase.sql b/db/routines/vn/functions/hasAnyPositiveBase.sql index 7222c3b2a..d8d83cecb 100644 --- a/db/routines/vn/functions/hasAnyPositiveBase.sql +++ b/db/routines/vn/functions/hasAnyPositiveBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasItemsInSector.sql b/db/routines/vn/functions/hasItemsInSector.sql index 4aa4edb9c..a9ed794fd 100644 --- a/db/routines/vn/functions/hasItemsInSector.sql +++ b/db/routines/vn/functions/hasItemsInSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasSomeNegativeBase.sql b/db/routines/vn/functions/hasSomeNegativeBase.sql index ea7efe777..bd3f90f61 100644 --- a/db/routines/vn/functions/hasSomeNegativeBase.sql +++ b/db/routines/vn/functions/hasSomeNegativeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/intrastat_estimateNet.sql b/db/routines/vn/functions/intrastat_estimateNet.sql index 350cb788a..82500d0e0 100644 --- a/db/routines/vn/functions/intrastat_estimateNet.sql +++ b/db/routines/vn/functions/intrastat_estimateNet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`( vSelf INT, vStems INT ) diff --git a/db/routines/vn/functions/invoiceOutAmount.sql b/db/routines/vn/functions/invoiceOutAmount.sql index 6c66a46f3..ed3dabd04 100644 --- a/db/routines/vn/functions/invoiceOutAmount.sql +++ b/db/routines/vn/functions/invoiceOutAmount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15)) RETURNS decimal(10,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/invoiceOut_getMaxIssued.sql b/db/routines/vn/functions/invoiceOut_getMaxIssued.sql index dc1a59eaa..c4f0e740b 100644 --- a/db/routines/vn/functions/invoiceOut_getMaxIssued.sql +++ b/db/routines/vn/functions/invoiceOut_getMaxIssued.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2), vCompanyFk INT, vYear INT ) diff --git a/db/routines/vn/functions/invoiceOut_getPath.sql b/db/routines/vn/functions/invoiceOut_getPath.sql index 1e174a4cf..a145ecc37 100644 --- a/db/routines/vn/functions/invoiceOut_getPath.sql +++ b/db/routines/vn/functions/invoiceOut_getPath.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/invoiceOut_getWeight.sql b/db/routines/vn/functions/invoiceOut_getWeight.sql index 1302c0341..304e33826 100644 --- a/db/routines/vn/functions/invoiceOut_getWeight.sql +++ b/db/routines/vn/functions/invoiceOut_getWeight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) ) RETURNS decimal(10,2) NOT DETERMINISTIC diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 66448ac9c..1e981414d 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/invoiceSerialArea.sql b/db/routines/vn/functions/invoiceSerialArea.sql index 02edd83f2..7ab58a75b 100644 --- a/db/routines/vn/functions/invoiceSerialArea.sql +++ b/db/routines/vn/functions/invoiceSerialArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/isLogifloraDay.sql b/db/routines/vn/functions/isLogifloraDay.sql index 8e9c9b264..fb82e4bd3 100644 --- a/db/routines/vn/functions/isLogifloraDay.sql +++ b/db/routines/vn/functions/isLogifloraDay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemPacking.sql b/db/routines/vn/functions/itemPacking.sql index 6856c12cd..c6a32e2ab 100644 --- a/db/routines/vn/functions/itemPacking.sql +++ b/db/routines/vn/functions/itemPacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql b/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql index 6b5fc3ae3..36017b118 100644 --- a/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql +++ b/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/itemTag_getIntValue.sql b/db/routines/vn/functions/itemTag_getIntValue.sql index fa5a03552..a5aac88bd 100644 --- a/db/routines/vn/functions/itemTag_getIntValue.sql +++ b/db/routines/vn/functions/itemTag_getIntValue.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getFhImage.sql b/db/routines/vn/functions/item_getFhImage.sql index 13e02e8fe..87a092139 100644 --- a/db/routines/vn/functions/item_getFhImage.sql +++ b/db/routines/vn/functions/item_getFhImage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getPackage.sql b/db/routines/vn/functions/item_getPackage.sql index 894abe4cf..2c3574deb 100644 --- a/db/routines/vn/functions/item_getPackage.sql +++ b/db/routines/vn/functions/item_getPackage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT) RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getVolume.sql b/db/routines/vn/functions/item_getVolume.sql index afcb32c93..a4f58f618 100644 --- a/db/routines/vn/functions/item_getVolume.sql +++ b/db/routines/vn/functions/item_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemsInSector_get.sql b/db/routines/vn/functions/itemsInSector_get.sql index 9054087b3..530a32cec 100644 --- a/db/routines/vn/functions/itemsInSector_get.sql +++ b/db/routines/vn/functions/itemsInSector_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/lastDayOfWeek.sql b/db/routines/vn/functions/lastDayOfWeek.sql index 464bf5afe..5cfd32afc 100644 --- a/db/routines/vn/functions/lastDayOfWeek.sql +++ b/db/routines/vn/functions/lastDayOfWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/machine_checkPlate.sql b/db/routines/vn/functions/machine_checkPlate.sql index d08ed97c5..4b83c00dd 100644 --- a/db/routines/vn/functions/machine_checkPlate.sql +++ b/db/routines/vn/functions/machine_checkPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10)) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/messageSend.sql b/db/routines/vn/functions/messageSend.sql index 8a95118e7..f36a6622b 100644 --- a/db/routines/vn/functions/messageSend.sql +++ b/db/routines/vn/functions/messageSend.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/messageSendWithUser.sql b/db/routines/vn/functions/messageSendWithUser.sql index 1d5b730a8..a4ba96909 100644 --- a/db/routines/vn/functions/messageSendWithUser.sql +++ b/db/routines/vn/functions/messageSendWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/orderTotalVolume.sql b/db/routines/vn/functions/orderTotalVolume.sql index 962baa8ec..76c6b5764 100644 --- a/db/routines/vn/functions/orderTotalVolume.sql +++ b/db/routines/vn/functions/orderTotalVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/orderTotalVolumeBoxes.sql b/db/routines/vn/functions/orderTotalVolumeBoxes.sql index cbc0e94ac..935cea615 100644 --- a/db/routines/vn/functions/orderTotalVolumeBoxes.sql +++ b/db/routines/vn/functions/orderTotalVolumeBoxes.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/packaging_calculate.sql b/db/routines/vn/functions/packaging_calculate.sql index c9aaf07b9..ede0e2521 100644 --- a/db/routines/vn/functions/packaging_calculate.sql +++ b/db/routines/vn/functions/packaging_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1), packagingReturnFk INT(11), base DECIMAL(10,2), price DECIMAL(10,2), diff --git a/db/routines/vn/functions/priceFixed_getRate2.sql b/db/routines/vn/functions/priceFixed_getRate2.sql index d97a20e59..748d0ec8d 100644 --- a/db/routines/vn/functions/priceFixed_getRate2.sql +++ b/db/routines/vn/functions/priceFixed_getRate2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) RETURNS double NOT DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/routeProposal.sql b/db/routines/vn/functions/routeProposal.sql index 81b5d9048..ed8f081be 100644 --- a/db/routines/vn/functions/routeProposal.sql +++ b/db/routines/vn/functions/routeProposal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/routeProposal_.sql b/db/routines/vn/functions/routeProposal_.sql index b4559c10c..e06dd617e 100644 --- a/db/routines/vn/functions/routeProposal_.sql +++ b/db/routines/vn/functions/routeProposal_.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/routeProposal_beta.sql b/db/routines/vn/functions/routeProposal_beta.sql index 4ec17d3ed..b25144c46 100644 --- a/db/routines/vn/functions/routeProposal_beta.sql +++ b/db/routines/vn/functions/routeProposal_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/sale_hasComponentLack.sql b/db/routines/vn/functions/sale_hasComponentLack.sql index 912d5f107..7905de674 100644 --- a/db/routines/vn/functions/sale_hasComponentLack.sql +++ b/db/routines/vn/functions/sale_hasComponentLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`( vSelf INT )RETURNS tinyint(1) READS SQL DATA diff --git a/db/routines/vn/functions/specie_IsForbidden.sql b/db/routines/vn/functions/specie_IsForbidden.sql index 5e7275ae7..3ccb22844 100644 --- a/db/routines/vn/functions/specie_IsForbidden.sql +++ b/db/routines/vn/functions/specie_IsForbidden.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/testCIF.sql b/db/routines/vn/functions/testCIF.sql index ba2cc8345..015fce534 100644 --- a/db/routines/vn/functions/testCIF.sql +++ b/db/routines/vn/functions/testCIF.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`testCIF`(vCIF VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testCIF`(vCIF VARCHAR(9)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/testNIE.sql b/db/routines/vn/functions/testNIE.sql index 6843becad..5b80435f5 100644 --- a/db/routines/vn/functions/testNIE.sql +++ b/db/routines/vn/functions/testNIE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`testNIE`(vNIE VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testNIE`(vNIE VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/testNIF.sql b/db/routines/vn/functions/testNIF.sql index 5b6654312..07fa79f37 100644 --- a/db/routines/vn/functions/testNIF.sql +++ b/db/routines/vn/functions/testNIF.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`testNIF`(vNIF VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testNIF`(vNIF VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketCollection_getNoPacked.sql b/db/routines/vn/functions/ticketCollection_getNoPacked.sql index a9f04cc88..71770bbd3 100644 --- a/db/routines/vn/functions/ticketCollection_getNoPacked.sql +++ b/db/routines/vn/functions/ticketCollection_getNoPacked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketCollection_getNoPacked`(vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketCollection_getNoPacked`(vCollectionFk INT) RETURNS varchar(100) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketGetTotal.sql b/db/routines/vn/functions/ticketGetTotal.sql index ced02e3c5..25db7e4f0 100644 --- a/db/routines/vn/functions/ticketGetTotal.sql +++ b/db/routines/vn/functions/ticketGetTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketGetTotal`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketGetTotal`(vTicketId INT) RETURNS decimal(10,2) DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketPositionInPath.sql b/db/routines/vn/functions/ticketPositionInPath.sql index 5e75d868d..f6a3125b2 100644 --- a/db/routines/vn/functions/ticketPositionInPath.sql +++ b/db/routines/vn/functions/ticketPositionInPath.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketPositionInPath`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketPositionInPath`(vTicketId INT) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketSplitCounter.sql b/db/routines/vn/functions/ticketSplitCounter.sql index e82c079ae..1d468ed9e 100644 --- a/db/routines/vn/functions/ticketSplitCounter.sql +++ b/db/routines/vn/functions/ticketSplitCounter.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketSplitCounter`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketSplitCounter`(vTicketFk INT) RETURNS varchar(15) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketTotalVolume.sql b/db/routines/vn/functions/ticketTotalVolume.sql index dc861ab6c..4a1a0e73c 100644 --- a/db/routines/vn/functions/ticketTotalVolume.sql +++ b/db/routines/vn/functions/ticketTotalVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketTotalVolume`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketTotalVolume`(vTicketId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketTotalVolumeBoxes.sql b/db/routines/vn/functions/ticketTotalVolumeBoxes.sql index eb529bab9..81de6f041 100644 --- a/db/routines/vn/functions/ticketTotalVolumeBoxes.sql +++ b/db/routines/vn/functions/ticketTotalVolumeBoxes.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketTotalVolumeBoxes`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketTotalVolumeBoxes`(vTicketId INT) RETURNS decimal(10,1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketWarehouseGet.sql b/db/routines/vn/functions/ticketWarehouseGet.sql index 705949f24..d95e0620b 100644 --- a/db/routines/vn/functions/ticketWarehouseGet.sql +++ b/db/routines/vn/functions/ticketWarehouseGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticketWarehouseGet`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketWarehouseGet`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_CC_volume.sql b/db/routines/vn/functions/ticket_CC_volume.sql index 2572ae12d..515787a7d 100644 --- a/db/routines/vn/functions/ticket_CC_volume.sql +++ b/db/routines/vn/functions/ticket_CC_volume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_CC_volume`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_CC_volume`(vTicketFk INT) RETURNS decimal(10,1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_HasUbication.sql b/db/routines/vn/functions/ticket_HasUbication.sql index 344a34aa9..1d24f01f3 100644 --- a/db/routines/vn/functions/ticket_HasUbication.sql +++ b/db/routines/vn/functions/ticket_HasUbication.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_HasUbication`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_HasUbication`(vTicketFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_get.sql b/db/routines/vn/functions/ticket_get.sql index b55b1297e..3897ed81c 100644 --- a/db/routines/vn/functions/ticket_get.sql +++ b/db/routines/vn/functions/ticket_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_get`(vParamFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_get`(vParamFk INT) RETURNS INT(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_getFreightCost.sql b/db/routines/vn/functions/ticket_getFreightCost.sql index 61905aff2..dd265ee05 100644 --- a/db/routines/vn/functions/ticket_getFreightCost.sql +++ b/db/routines/vn/functions/ticket_getFreightCost.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_getFreightCost`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_getFreightCost`(vTicketFk INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticket_getWeight.sql b/db/routines/vn/functions/ticket_getWeight.sql index 32f84cac7..a83ee372f 100644 --- a/db/routines/vn/functions/ticket_getWeight.sql +++ b/db/routines/vn/functions/ticket_getWeight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_getWeight`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_getWeight`(vTicketFk INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_isOutClosureZone.sql b/db/routines/vn/functions/ticket_isOutClosureZone.sql index ebddcf505..61f617f52 100644 --- a/db/routines/vn/functions/ticket_isOutClosureZone.sql +++ b/db/routines/vn/functions/ticket_isOutClosureZone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_isOutClosureZone`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isOutClosureZone`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql b/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql index 4974a8c76..6c2b75714 100644 --- a/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql +++ b/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_isProblemCalcNeeded`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isProblemCalcNeeded`( vSelf INT ) RETURNS BOOL diff --git a/db/routines/vn/functions/ticket_isTooLittle.sql b/db/routines/vn/functions/ticket_isTooLittle.sql index bcbf09035..86d7606e0 100644 --- a/db/routines/vn/functions/ticket_isTooLittle.sql +++ b/db/routines/vn/functions/ticket_isTooLittle.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`( vSelf INT ) RETURNS tinyint(1) diff --git a/db/routines/vn/functions/till_new.sql b/db/routines/vn/functions/till_new.sql index b93072596..095f2cd8f 100644 --- a/db/routines/vn/functions/till_new.sql +++ b/db/routines/vn/functions/till_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`till_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`till_new`( vClient INT, vBank INT, vAmount DOUBLE, diff --git a/db/routines/vn/functions/timeWorkerControl_getDirection.sql b/db/routines/vn/functions/timeWorkerControl_getDirection.sql index 518e4aeb5..a631636ea 100644 --- a/db/routines/vn/functions/timeWorkerControl_getDirection.sql +++ b/db/routines/vn/functions/timeWorkerControl_getDirection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/time_getSalesYear.sql b/db/routines/vn/functions/time_getSalesYear.sql index 658a1112a..fcef5a1ae 100644 --- a/db/routines/vn/functions/time_getSalesYear.sql +++ b/db/routines/vn/functions/time_getSalesYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`time_getSalesYear`(vMonth INT, vYear INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`time_getSalesYear`(vMonth INT, vYear INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/travel_getForLogiflora.sql b/db/routines/vn/functions/travel_getForLogiflora.sql index cb3f0dac0..0bf6f2425 100644 --- a/db/routines/vn/functions/travel_getForLogiflora.sql +++ b/db/routines/vn/functions/travel_getForLogiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/travel_hasUniqueAwb.sql b/db/routines/vn/functions/travel_hasUniqueAwb.sql index e918f1a26..9fbfcb2d1 100644 --- a/db/routines/vn/functions/travel_hasUniqueAwb.sql +++ b/db/routines/vn/functions/travel_hasUniqueAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`travel_hasUniqueAwb`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`travel_hasUniqueAwb`( vSelf INT ) RETURNS BOOL diff --git a/db/routines/vn/functions/validationCode.sql b/db/routines/vn/functions/validationCode.sql index 75d603d24..1f19af0c1 100644 --- a/db/routines/vn/functions/validationCode.sql +++ b/db/routines/vn/functions/validationCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`validationCode`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`validationCode`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/validationCode_beta.sql b/db/routines/vn/functions/validationCode_beta.sql index 0e27a4722..5f09ea637 100644 --- a/db/routines/vn/functions/validationCode_beta.sql +++ b/db/routines/vn/functions/validationCode_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`validationCode_beta`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`validationCode_beta`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/workerMachinery_isRegistered.sql b/db/routines/vn/functions/workerMachinery_isRegistered.sql index 89a1c44ac..72263ef4e 100644 --- a/db/routines/vn/functions/workerMachinery_isRegistered.sql +++ b/db/routines/vn/functions/workerMachinery_isRegistered.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/workerNigthlyHours_calculate.sql b/db/routines/vn/functions/workerNigthlyHours_calculate.sql index 0828b30f9..a5d990e90 100644 --- a/db/routines/vn/functions/workerNigthlyHours_calculate.sql +++ b/db/routines/vn/functions/workerNigthlyHours_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) RETURNS decimal(5,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/worker_getCode.sql b/db/routines/vn/functions/worker_getCode.sql index d3d63dccc..cc8d1e916 100644 --- a/db/routines/vn/functions/worker_getCode.sql +++ b/db/routines/vn/functions/worker_getCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_getCode`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_getCode`() RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/worker_isBoss.sql b/db/routines/vn/functions/worker_isBoss.sql index 7efada705..9a9e1a091 100644 --- a/db/routines/vn/functions/worker_isBoss.sql +++ b/db/routines/vn/functions/worker_isBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isBoss`(vUserId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isBoss`(vUserId INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/worker_isInDepartment.sql b/db/routines/vn/functions/worker_isInDepartment.sql index 8eee3656e..55802f355 100644 --- a/db/routines/vn/functions/worker_isInDepartment.sql +++ b/db/routines/vn/functions/worker_isInDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isInDepartment`(vDepartmentCode VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isInDepartment`(vDepartmentCode VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/worker_isWorking.sql b/db/routines/vn/functions/worker_isWorking.sql index 3db333bd0..788587d30 100644 --- a/db/routines/vn/functions/worker_isWorking.sql +++ b/db/routines/vn/functions/worker_isWorking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isWorking`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isWorking`(vWorkerFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/zoneGeo_new.sql b/db/routines/vn/functions/zoneGeo_new.sql index 65b045962..5af1e5f55 100644 --- a/db/routines/vn/functions/zoneGeo_new.sql +++ b/db/routines/vn/functions/zoneGeo_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) RETURNS int(11) NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/procedures/XDiario_check.sql b/db/routines/vn/procedures/XDiario_check.sql index ef969924b..00bc9dc58 100644 --- a/db/routines/vn/procedures/XDiario_check.sql +++ b/db/routines/vn/procedures/XDiario_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`XDiario_check`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`XDiario_check`() BEGIN /** * Realiza la revisión diaria de los asientos contables, diff --git a/db/routines/vn/procedures/XDiario_checkDate.sql b/db/routines/vn/procedures/XDiario_checkDate.sql index b481d1f36..f21773a0d 100644 --- a/db/routines/vn/procedures/XDiario_checkDate.sql +++ b/db/routines/vn/procedures/XDiario_checkDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`XDiario_checkDate`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`XDiario_checkDate`(vDate DATE) proc: BEGIN /** * Comprueba si la fecha pasada esta en el rango diff --git a/db/routines/vn/procedures/absoluteInventoryHistory.sql b/db/routines/vn/procedures/absoluteInventoryHistory.sql index 627b7c8be..529bd39b0 100644 --- a/db/routines/vn/procedures/absoluteInventoryHistory.sql +++ b/db/routines/vn/procedures/absoluteInventoryHistory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`absoluteInventoryHistory`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`absoluteInventoryHistory`( vItemFk INT, vWarehouseFk INT, vDate DATETIME diff --git a/db/routines/vn/procedures/addAccountReconciliation.sql b/db/routines/vn/procedures/addAccountReconciliation.sql index 8effbd76c..7ae558462 100644 --- a/db/routines/vn/procedures/addAccountReconciliation.sql +++ b/db/routines/vn/procedures/addAccountReconciliation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addAccountReconciliation`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addAccountReconciliation`() BEGIN /** * Updates duplicate records in the accountReconciliation table, diff --git a/db/routines/vn/procedures/addNoteFromDelivery.sql b/db/routines/vn/procedures/addNoteFromDelivery.sql index 61295b7db..ef8d1c981 100644 --- a/db/routines/vn/procedures/addNoteFromDelivery.sql +++ b/db/routines/vn/procedures/addNoteFromDelivery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT) BEGIN DECLARE observationTypeFk INT DEFAULT 3; /*3 = REPARTIDOR*/ diff --git a/db/routines/vn/procedures/addressTaxArea.sql b/db/routines/vn/procedures/addressTaxArea.sql index 5deb01fa4..fb705f84e 100644 --- a/db/routines/vn/procedures/addressTaxArea.sql +++ b/db/routines/vn/procedures/addressTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addressTaxArea`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addressTaxArea`() READS SQL DATA BEGIN /** diff --git a/db/routines/vn/procedures/address_updateCoordinates.sql b/db/routines/vn/procedures/address_updateCoordinates.sql index bdeb886df..e3455996b 100644 --- a/db/routines/vn/procedures/address_updateCoordinates.sql +++ b/db/routines/vn/procedures/address_updateCoordinates.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`( vTicketFk INT, vLongitude INT, vLatitude INT) diff --git a/db/routines/vn/procedures/agencyHourGetFirstShipped.sql b/db/routines/vn/procedures/agencyHourGetFirstShipped.sql index 4bd1c4222..487e37de0 100644 --- a/db/routines/vn/procedures/agencyHourGetFirstShipped.sql +++ b/db/routines/vn/procedures/agencyHourGetFirstShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetFirstShipped diff --git a/db/routines/vn/procedures/agencyHourGetLanded.sql b/db/routines/vn/procedures/agencyHourGetLanded.sql index ee48388a0..8c1ef1b27 100644 --- a/db/routines/vn/procedures/agencyHourGetLanded.sql +++ b/db/routines/vn/procedures/agencyHourGetLanded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetLanded diff --git a/db/routines/vn/procedures/agencyHourGetWarehouse.sql b/db/routines/vn/procedures/agencyHourGetWarehouse.sql index 7fc524fce..10afec1c7 100644 --- a/db/routines/vn/procedures/agencyHourGetWarehouse.sql +++ b/db/routines/vn/procedures/agencyHourGetWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetWarehouse diff --git a/db/routines/vn/procedures/agencyHourListGetShipped.sql b/db/routines/vn/procedures/agencyHourListGetShipped.sql index b4cf35f77..71ba13945 100644 --- a/db/routines/vn/procedures/agencyHourListGetShipped.sql +++ b/db/routines/vn/procedures/agencyHourListGetShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) BEGIN /* * DEPRECATED usar zoneGetShipped */ diff --git a/db/routines/vn/procedures/agencyVolume.sql b/db/routines/vn/procedures/agencyVolume.sql index ef47834ba..6565428df 100644 --- a/db/routines/vn/procedures/agencyVolume.sql +++ b/db/routines/vn/procedures/agencyVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`agencyVolume`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyVolume`() BEGIN /** * Calculates and presents information on shipment and packaging volumes diff --git a/db/routines/vn/procedures/available_calc.sql b/db/routines/vn/procedures/available_calc.sql index 8c806d41d..41fec27f0 100644 --- a/db/routines/vn/procedures/available_calc.sql +++ b/db/routines/vn/procedures/available_calc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`available_calc`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`available_calc`( vDate DATE, vAddress INT, vAgencyMode INT) diff --git a/db/routines/vn/procedures/available_traslate.sql b/db/routines/vn/procedures/available_traslate.sql index d33a8e10e..e357dcf42 100644 --- a/db/routines/vn/procedures/available_traslate.sql +++ b/db/routines/vn/procedures/available_traslate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`available_traslate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`available_traslate`( vWarehouseLanding INT, vDated DATE, vWarehouseShipment INT) diff --git a/db/routines/vn/procedures/balanceNestTree_addChild.sql b/db/routines/vn/procedures/balanceNestTree_addChild.sql index 5cd1ab470..6911efcec 100644 --- a/db/routines/vn/procedures/balanceNestTree_addChild.sql +++ b/db/routines/vn/procedures/balanceNestTree_addChild.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_addChild`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_addChild`( vSelf INT, vName VARCHAR(45) ) diff --git a/db/routines/vn/procedures/balanceNestTree_delete.sql b/db/routines/vn/procedures/balanceNestTree_delete.sql index 1d6a9efff..6b424b24f 100644 --- a/db/routines/vn/procedures/balanceNestTree_delete.sql +++ b/db/routines/vn/procedures/balanceNestTree_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_delete`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_delete`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/balanceNestTree_move.sql b/db/routines/vn/procedures/balanceNestTree_move.sql index ce29de1d9..060f01c49 100644 --- a/db/routines/vn/procedures/balanceNestTree_move.sql +++ b/db/routines/vn/procedures/balanceNestTree_move.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_move`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_move`( vSelf INT, vFather INT ) diff --git a/db/routines/vn/procedures/balance_create.sql b/db/routines/vn/procedures/balance_create.sql index 366707e58..13bb7d6e1 100644 --- a/db/routines/vn/procedures/balance_create.sql +++ b/db/routines/vn/procedures/balance_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balance_create`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balance_create`( vStartingMonth INT, vEndingMonth INT, vCompany INT, diff --git a/db/routines/vn/procedures/bankEntity_checkBic.sql b/db/routines/vn/procedures/bankEntity_checkBic.sql index 2f05ae654..8752948b1 100644 --- a/db/routines/vn/procedures/bankEntity_checkBic.sql +++ b/db/routines/vn/procedures/bankEntity_checkBic.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`bankEntity_checkBic`(vBic VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`bankEntity_checkBic`(vBic VARCHAR(255)) BEGIN /** * If the bic length is Incorrect throw exception diff --git a/db/routines/vn/procedures/bankPolicy_notifyExpired.sql b/db/routines/vn/procedures/bankPolicy_notifyExpired.sql index 61216938d..405d19a26 100644 --- a/db/routines/vn/procedures/bankPolicy_notifyExpired.sql +++ b/db/routines/vn/procedures/bankPolicy_notifyExpired.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`bankPolicy_notifyExpired`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`bankPolicy_notifyExpired`() BEGIN /** * diff --git a/db/routines/vn/procedures/buyUltimate.sql b/db/routines/vn/procedures/buyUltimate.sql index 98b16cbc0..8a19b5d2d 100644 --- a/db/routines/vn/procedures/buyUltimate.sql +++ b/db/routines/vn/procedures/buyUltimate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buyUltimate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buyUltimate`( vWarehouseFk SMALLINT, vDated DATE ) diff --git a/db/routines/vn/procedures/buyUltimateFromInterval.sql b/db/routines/vn/procedures/buyUltimateFromInterval.sql index 5879b58e1..9685ee28d 100644 --- a/db/routines/vn/procedures/buyUltimateFromInterval.sql +++ b/db/routines/vn/procedures/buyUltimateFromInterval.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buyUltimateFromInterval`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buyUltimateFromInterval`( vWarehouseFk SMALLINT, vStarted DATE, vEnded DATE diff --git a/db/routines/vn/procedures/buy_afterUpsert.sql b/db/routines/vn/procedures/buy_afterUpsert.sql index 76f60d1e5..031e39159 100644 --- a/db/routines/vn/procedures/buy_afterUpsert.sql +++ b/db/routines/vn/procedures/buy_afterUpsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/buy_checkGrouping.sql b/db/routines/vn/procedures/buy_checkGrouping.sql index 11c727fb1..365fb9477 100644 --- a/db/routines/vn/procedures/buy_checkGrouping.sql +++ b/db/routines/vn/procedures/buy_checkGrouping.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT) BEGIN /** * Checks the buy grouping, throws an error if it's invalid. diff --git a/db/routines/vn/procedures/buy_chekItem.sql b/db/routines/vn/procedures/buy_chekItem.sql index e8cf05fed..7777f2fd8 100644 --- a/db/routines/vn/procedures/buy_chekItem.sql +++ b/db/routines/vn/procedures/buy_chekItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_checkItem`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_checkItem`() BEGIN /** * Checks if the item has weightByPiece or size null on any buy. diff --git a/db/routines/vn/procedures/buy_clone.sql b/db/routines/vn/procedures/buy_clone.sql index 7b77204c9..8a309c0cf 100644 --- a/db/routines/vn/procedures/buy_clone.sql +++ b/db/routines/vn/procedures/buy_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_clone`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_clone`(vEntryFk INT) BEGIN /** * Clone buys to an entry diff --git a/db/routines/vn/procedures/buy_getSplit.sql b/db/routines/vn/procedures/buy_getSplit.sql index 73cc1dda7..fbf702357 100644 --- a/db/routines/vn/procedures/buy_getSplit.sql +++ b/db/routines/vn/procedures/buy_getSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getSplit`(vSelf INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getSplit`(vSelf INT, vDated DATE) BEGIN /** * Devuelve tantos registros como etiquetas se necesitan para cada uno de los cubos o cajas de diff --git a/db/routines/vn/procedures/buy_getVolume.sql b/db/routines/vn/procedures/buy_getVolume.sql index 633be7ec0..ff0e9f9a7 100644 --- a/db/routines/vn/procedures/buy_getVolume.sql +++ b/db/routines/vn/procedures/buy_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getVolume`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolume`() BEGIN /** * Cálculo de volumen en líneas de compra diff --git a/db/routines/vn/procedures/buy_getVolumeByAgency.sql b/db/routines/vn/procedures/buy_getVolumeByAgency.sql index 2f63c2bdf..c90962adc 100644 --- a/db/routines/vn/procedures/buy_getVolumeByAgency.sql +++ b/db/routines/vn/procedures/buy_getVolumeByAgency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; diff --git a/db/routines/vn/procedures/buy_getVolumeByEntry.sql b/db/routines/vn/procedures/buy_getVolumeByEntry.sql index e9a2bca2e..b7fb6f59d 100644 --- a/db/routines/vn/procedures/buy_getVolumeByEntry.sql +++ b/db/routines/vn/procedures/buy_getVolumeByEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getVolumeByEntry`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolumeByEntry`(vEntryFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index 35eb00cf1..b43328220 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() BEGIN /** * Recalcula los precios para las compras insertadas en tmp.buyRecalc diff --git a/db/routines/vn/procedures/buy_recalcPricesByAwb.sql b/db/routines/vn/procedures/buy_recalcPricesByAwb.sql index 6f6baf305..05b602840 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByAwb.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByAwb`(IN awbFk varchar(18)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByAwb`(IN awbFk varchar(18)) BEGIN /** * inserta en tmp.buyRecalc las compras de un awb diff --git a/db/routines/vn/procedures/buy_recalcPricesByBuy.sql b/db/routines/vn/procedures/buy_recalcPricesByBuy.sql index b699e42d7..aae7cf37b 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByBuy.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`( vBuyFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/buy_recalcPricesByEntry.sql b/db/routines/vn/procedures/buy_recalcPricesByEntry.sql index 8d70d3626..d0694cf58 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByEntry.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`( vEntryFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/buy_scan.sql b/db/routines/vn/procedures/buy_scan.sql index 0d4e8fcdb..fa6097ff0 100644 --- a/db/routines/vn/procedures/buy_scan.sql +++ b/db/routines/vn/procedures/buy_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_scan`(vBarcode VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca compras a partir de un código de barras de subasta, las marca como diff --git a/db/routines/vn/procedures/buy_updateGrouping.sql b/db/routines/vn/procedures/buy_updateGrouping.sql index fb7adc0a3..c7f7ed9e6 100644 --- a/db/routines/vn/procedures/buy_updateGrouping.sql +++ b/db/routines/vn/procedures/buy_updateGrouping.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT) BEGIN /** * Actualiza el grouping de las últimas compras de un artículo diff --git a/db/routines/vn/procedures/buy_updatePacking.sql b/db/routines/vn/procedures/buy_updatePacking.sql index d86edc98f..2d4bc45e2 100644 --- a/db/routines/vn/procedures/buy_updatePacking.sql +++ b/db/routines/vn/procedures/buy_updatePacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing diff --git a/db/routines/vn/procedures/catalog_calcFromItem.sql b/db/routines/vn/procedures/catalog_calcFromItem.sql index 497fd107c..617a311e2 100644 --- a/db/routines/vn/procedures/catalog_calcFromItem.sql +++ b/db/routines/vn/procedures/catalog_calcFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`catalog_calcFromItem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_calcFromItem`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/catalog_calculate.sql b/db/routines/vn/procedures/catalog_calculate.sql index 963e33507..a99d55671 100644 --- a/db/routines/vn/procedures/catalog_calculate.sql +++ b/db/routines/vn/procedures/catalog_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`catalog_calculate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_calculate`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/catalog_componentCalculate.sql b/db/routines/vn/procedures/catalog_componentCalculate.sql index 92fe233c5..4cc9e9cee 100644 --- a/db/routines/vn/procedures/catalog_componentCalculate.sql +++ b/db/routines/vn/procedures/catalog_componentCalculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`catalog_componentCalculate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentCalculate`( vZoneFk INT, vAddressFk INT, vShipped DATE, diff --git a/db/routines/vn/procedures/catalog_componentPrepare.sql b/db/routines/vn/procedures/catalog_componentPrepare.sql index 2e58a28e2..85fafcdd2 100644 --- a/db/routines/vn/procedures/catalog_componentPrepare.sql +++ b/db/routines/vn/procedures/catalog_componentPrepare.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`catalog_componentPrepare`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentPrepare`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent; diff --git a/db/routines/vn/procedures/catalog_componentPurge.sql b/db/routines/vn/procedures/catalog_componentPurge.sql index c6a19ba62..ea23b38ba 100644 --- a/db/routines/vn/procedures/catalog_componentPurge.sql +++ b/db/routines/vn/procedures/catalog_componentPurge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`catalog_componentPurge`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentPurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketComponentPrice, diff --git a/db/routines/vn/procedures/claimRatio_add.sql b/db/routines/vn/procedures/claimRatio_add.sql index c375f8736..7daf3c8eb 100644 --- a/db/routines/vn/procedures/claimRatio_add.sql +++ b/db/routines/vn/procedures/claimRatio_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`claimRatio_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`claimRatio_add`() BEGIN /* * Añade a la tabla greuges todos los cargos necesario y diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index 6645b9cb2..f22c9c19b 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clean`() BEGIN /** * Purges outdated data to optimize performance. diff --git a/db/routines/vn/procedures/clean_logiflora.sql b/db/routines/vn/procedures/clean_logiflora.sql index dd08410fd..56f0d8317 100644 --- a/db/routines/vn/procedures/clean_logiflora.sql +++ b/db/routines/vn/procedures/clean_logiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clean_logiflora`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clean_logiflora`() BEGIN /** * Elimina las compras y los artículos residuales de logiflora. diff --git a/db/routines/vn/procedures/clearShelvingList.sql b/db/routines/vn/procedures/clearShelvingList.sql index dbaca2747..03c6e3fc2 100644 --- a/db/routines/vn/procedures/clearShelvingList.sql +++ b/db/routines/vn/procedures/clearShelvingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clearShelvingList`(vShelvingFk VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clearShelvingList`(vShelvingFk VARCHAR(8)) BEGIN UPDATE vn.itemShelving SET visible = 0 diff --git a/db/routines/vn/procedures/clientDebtSpray.sql b/db/routines/vn/procedures/clientDebtSpray.sql index 687c08fe2..1fc490cec 100644 --- a/db/routines/vn/procedures/clientDebtSpray.sql +++ b/db/routines/vn/procedures/clientDebtSpray.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientDebtSpray`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientDebtSpray`(vClientFk INT) BEGIN /* Reparte el saldo de un cliente en greuge en la cartera que corresponde, y desasigna el comercial diff --git a/db/routines/vn/procedures/clientFreeze.sql b/db/routines/vn/procedures/clientFreeze.sql index c89db2316..eae5ebe2b 100644 --- a/db/routines/vn/procedures/clientFreeze.sql +++ b/db/routines/vn/procedures/clientFreeze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientFreeze`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientFreeze`() BEGIN /** * Congela diariamente aquellos clientes que son morosos sin recobro, diff --git a/db/routines/vn/procedures/clientGetDebtDiary.sql b/db/routines/vn/procedures/clientGetDebtDiary.sql index bd7a0b292..2a7d29105 100644 --- a/db/routines/vn/procedures/clientGetDebtDiary.sql +++ b/db/routines/vn/procedures/clientGetDebtDiary.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) BEGIN /** * Devuelve el registro de deuda diff --git a/db/routines/vn/procedures/clientGreugeSpray.sql b/db/routines/vn/procedures/clientGreugeSpray.sql index c337e2dd3..581eae9ea 100644 --- a/db/routines/vn/procedures/clientGreugeSpray.sql +++ b/db/routines/vn/procedures/clientGreugeSpray.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) BEGIN DECLARE vGreuge DECIMAL(10,2); diff --git a/db/routines/vn/procedures/clientPackagingOverstock.sql b/db/routines/vn/procedures/clientPackagingOverstock.sql index fcd34c41b..9f4213f2d 100644 --- a/db/routines/vn/procedures/clientPackagingOverstock.sql +++ b/db/routines/vn/procedures/clientPackagingOverstock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientPackagingOverstock`(vClientFk INT, vGraceDays INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientPackagingOverstock`(vClientFk INT, vGraceDays INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.clientPackagingOverstock; CREATE TEMPORARY TABLE tmp.clientPackagingOverstock diff --git a/db/routines/vn/procedures/clientPackagingOverstockReturn.sql b/db/routines/vn/procedures/clientPackagingOverstockReturn.sql index ac37bbc8d..efb3e600f 100644 --- a/db/routines/vn/procedures/clientPackagingOverstockReturn.sql +++ b/db/routines/vn/procedures/clientPackagingOverstockReturn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) BEGIN DECLARE vNewTicket INT DEFAULT 0; DECLARE vWarehouseFk INT; diff --git a/db/routines/vn/procedures/clientRemoveWorker.sql b/db/routines/vn/procedures/clientRemoveWorker.sql index 15d247c67..e4620ecb9 100644 --- a/db/routines/vn/procedures/clientRemoveWorker.sql +++ b/db/routines/vn/procedures/clientRemoveWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientRemoveWorker`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientRemoveWorker`() BEGIN DECLARE vDone BOOL DEFAULT FALSE; DECLARE vClientFk INT; diff --git a/db/routines/vn/procedures/clientRisk_update.sql b/db/routines/vn/procedures/clientRisk_update.sql index 30ab3265f..596dc0794 100644 --- a/db/routines/vn/procedures/clientRisk_update.sql +++ b/db/routines/vn/procedures/clientRisk_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) BEGIN IF vAmount IS NOT NULL THEN diff --git a/db/routines/vn/procedures/client_RandomList.sql b/db/routines/vn/procedures/client_RandomList.sql index 2bd0d609b..83f5967e2 100644 --- a/db/routines/vn/procedures/client_RandomList.sql +++ b/db/routines/vn/procedures/client_RandomList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_RandomList`(vNumber INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_RandomList`(vNumber INT) BEGIN DECLARE i INT DEFAULT 0; diff --git a/db/routines/vn/procedures/client_checkBalance.sql b/db/routines/vn/procedures/client_checkBalance.sql index 210fcc00f..41ecf9605 100644 --- a/db/routines/vn/procedures/client_checkBalance.sql +++ b/db/routines/vn/procedures/client_checkBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros clientes con diff --git a/db/routines/vn/procedures/client_create.sql b/db/routines/vn/procedures/client_create.sql index f2321e129..d99d7847e 100644 --- a/db/routines/vn/procedures/client_create.sql +++ b/db/routines/vn/procedures/client_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_create`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_create`( vFirstname VARCHAR(50), vSurnames VARCHAR(50), vFi VARCHAR(9), diff --git a/db/routines/vn/procedures/client_getDebt.sql b/db/routines/vn/procedures/client_getDebt.sql index 3eaace4e9..37f30f4b2 100644 --- a/db/routines/vn/procedures/client_getDebt.sql +++ b/db/routines/vn/procedures/client_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_getDebt`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getDebt`(vDate DATE) BEGIN /** * Calculates the risk for active clients diff --git a/db/routines/vn/procedures/client_getMana.sql b/db/routines/vn/procedures/client_getMana.sql index f5bb5747d..fc642b140 100644 --- a/db/routines/vn/procedures/client_getMana.sql +++ b/db/routines/vn/procedures/client_getMana.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_getMana`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getMana`() BEGIN /** * Devuelve el mana de los clientes de la tabla tmp.client(id) diff --git a/db/routines/vn/procedures/client_getRisk.sql b/db/routines/vn/procedures/client_getRisk.sql index 106284c2f..3881b74d0 100644 --- a/db/routines/vn/procedures/client_getRisk.sql +++ b/db/routines/vn/procedures/client_getRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_getRisk`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getRisk`( vDate DATE ) BEGIN diff --git a/db/routines/vn/procedures/client_unassignSalesPerson.sql b/db/routines/vn/procedures/client_unassignSalesPerson.sql index 8773104ca..e0119d4d5 100644 --- a/db/routines/vn/procedures/client_unassignSalesPerson.sql +++ b/db/routines/vn/procedures/client_unassignSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_unassignSalesPerson`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_unassignSalesPerson`() BEGIN /** * Elimina la asignación de salesPersonFk de la ficha del clientes diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql index f2ba65c1c..0563d5a18 100644 --- a/db/routines/vn/procedures/client_userDisable.sql +++ b/db/routines/vn/procedures/client_userDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_userDisable`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_userDisable`() BEGIN /** * Desactiva los clientes inactivos en los últimos X meses. diff --git a/db/routines/vn/procedures/cmrPallet_add.sql b/db/routines/vn/procedures/cmrPallet_add.sql index 2267cd312..9f2bac9ec 100644 --- a/db/routines/vn/procedures/cmrPallet_add.sql +++ b/db/routines/vn/procedures/cmrPallet_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) BEGIN /** * Añade registro a tabla cmrPallet. diff --git a/db/routines/vn/procedures/collectionPlacement_get.sql b/db/routines/vn/procedures/collectionPlacement_get.sql index 3fb3339e7..64fdfe4a9 100644 --- a/db/routines/vn/procedures/collectionPlacement_get.sql +++ b/db/routines/vn/procedures/collectionPlacement_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collectionPlacement_get`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collectionPlacement_get`( vParamFk INT(11), vIsPicker bool) BEGIN diff --git a/db/routines/vn/procedures/collection_addItem.sql b/db/routines/vn/procedures/collection_addItem.sql index b5bc91c67..5ea99a866 100644 --- a/db/routines/vn/procedures/collection_addItem.sql +++ b/db/routines/vn/procedures/collection_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_addItem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_addItem`( vBarccodeFk INT, vQuantity INT, vTicketFk INT diff --git a/db/routines/vn/procedures/collection_addWithReservation.sql b/db/routines/vn/procedures/collection_addWithReservation.sql index e3f4eb8d2..6dc088098 100644 --- a/db/routines/vn/procedures/collection_addWithReservation.sql +++ b/db/routines/vn/procedures/collection_addWithReservation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_addWithReservation`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_addWithReservation`( vItemFk INT, vQuantity INT, vTicketFk INT, diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index f9032a91d..24ad6f0ec 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_assign`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_assign`( vUserFk INT, OUT vCollectionFk INT ) diff --git a/db/routines/vn/procedures/collection_get.sql b/db/routines/vn/procedures/collection_get.sql index d29f14ca9..32b866168 100644 --- a/db/routines/vn/procedures/collection_get.sql +++ b/db/routines/vn/procedures/collection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_get`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_get`(vWorkerFk INT) BEGIN /** * Obtiene colección del sacador si tiene líneas pendientes. diff --git a/db/routines/vn/procedures/collection_getAssigned.sql b/db/routines/vn/procedures/collection_getAssigned.sql index 947b53229..60aa27df9 100644 --- a/db/routines/vn/procedures/collection_getAssigned.sql +++ b/db/routines/vn/procedures/collection_getAssigned.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_getAssigned`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_getAssigned`( vUserFk INT, OUT vCollectionFk INT ) diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index 7ecff571a..f6d959e0d 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_getTickets`(vParamFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_getTickets`(vParamFk INT) BEGIN /** * Selecciona los tickets de una colección/ticket/sectorCollection diff --git a/db/routines/vn/procedures/collection_kill.sql b/db/routines/vn/procedures/collection_kill.sql index f80fea512..3289a02b4 100644 --- a/db/routines/vn/procedures/collection_kill.sql +++ b/db/routines/vn/procedures/collection_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_kill`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_kill`(vSelf INT) BEGIN /** * Elimina una coleccion y coloca sus tickets en OK diff --git a/db/routines/vn/procedures/collection_make.sql b/db/routines/vn/procedures/collection_make.sql index b5b728000..2d4bc9c08 100644 --- a/db/routines/vn/procedures/collection_make.sql +++ b/db/routines/vn/procedures/collection_make.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_make`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_make`() proc:BEGIN /** * Genera colecciones de tickets sin asignar trabajador a partir de la tabla diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 0bd6e1b25..8e7d4f093 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_new`(vUserFk INT, OUT vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_new`(vUserFk INT, OUT vCollectionFk INT) BEGIN /** * Genera colecciones de tickets sin asignar trabajador. diff --git a/db/routines/vn/procedures/collection_printSticker.sql b/db/routines/vn/procedures/collection_printSticker.sql index 50259152d..a82e008f1 100644 --- a/db/routines/vn/procedures/collection_printSticker.sql +++ b/db/routines/vn/procedures/collection_printSticker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_printSticker`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_printSticker`( vSelf INT, vLabelCount INT ) diff --git a/db/routines/vn/procedures/collection_setParking.sql b/db/routines/vn/procedures/collection_setParking.sql index 5f6ca75da..b23e8dd97 100644 --- a/db/routines/vn/procedures/collection_setParking.sql +++ b/db/routines/vn/procedures/collection_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_setParking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_setParking`( vSelf INT, vParkingFk INT ) diff --git a/db/routines/vn/procedures/collection_setState.sql b/db/routines/vn/procedures/collection_setState.sql index 2d33c53d6..47d4a6742 100644 --- a/db/routines/vn/procedures/collection_setState.sql +++ b/db/routines/vn/procedures/collection_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) BEGIN /** * Modifica el estado de los tickets de una colección. diff --git a/db/routines/vn/procedures/company_getFiscaldata.sql b/db/routines/vn/procedures/company_getFiscaldata.sql index b59ae38e1..eafeb8e63 100644 --- a/db/routines/vn/procedures/company_getFiscaldata.sql +++ b/db/routines/vn/procedures/company_getFiscaldata.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`company_getFiscaldata`(workerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`company_getFiscaldata`(workerFk INT) BEGIN DECLARE vCompanyFk INT; diff --git a/db/routines/vn/procedures/company_getSuppliersDebt.sql b/db/routines/vn/procedures/company_getSuppliersDebt.sql index 83043f337..052f43ac8 100644 --- a/db/routines/vn/procedures/company_getSuppliersDebt.sql +++ b/db/routines/vn/procedures/company_getSuppliersDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) BEGIN /** * Generates a temporary table containing outstanding payments to suppliers. diff --git a/db/routines/vn/procedures/comparative_add.sql b/db/routines/vn/procedures/comparative_add.sql index 44f9686aa..b4017e6c4 100644 --- a/db/routines/vn/procedures/comparative_add.sql +++ b/db/routines/vn/procedures/comparative_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`comparative_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`comparative_add`() BEGIN /** * Inserts sales records less than one month old in comparative. diff --git a/db/routines/vn/procedures/confection_controlSource.sql b/db/routines/vn/procedures/confection_controlSource.sql index f011a52e9..2db87abc7 100644 --- a/db/routines/vn/procedures/confection_controlSource.sql +++ b/db/routines/vn/procedures/confection_controlSource.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`confection_controlSource`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`confection_controlSource`( vDated DATE, vScopeDays INT, vMaxAlertLevel INT, diff --git a/db/routines/vn/procedures/conveyorExpedition_Add.sql b/db/routines/vn/procedures/conveyorExpedition_Add.sql index 94cbc88e2..97eea2516 100644 --- a/db/routines/vn/procedures/conveyorExpedition_Add.sql +++ b/db/routines/vn/procedures/conveyorExpedition_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) BEGIN diff --git a/db/routines/vn/procedures/copyComponentsFromSaleList.sql b/db/routines/vn/procedures/copyComponentsFromSaleList.sql index 8db8409f1..7fb65e758 100644 --- a/db/routines/vn/procedures/copyComponentsFromSaleList.sql +++ b/db/routines/vn/procedures/copyComponentsFromSaleList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`copyComponentsFromSaleList`(vTargetTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`copyComponentsFromSaleList`(vTargetTicketFk INT) BEGIN /* Copy sales and components to the target ticket diff --git a/db/routines/vn/procedures/createPedidoInterno.sql b/db/routines/vn/procedures/createPedidoInterno.sql index ecc5e57a5..75017c236 100644 --- a/db/routines/vn/procedures/createPedidoInterno.sql +++ b/db/routines/vn/procedures/createPedidoInterno.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`createPedidoInterno`(vItemFk INT,vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`createPedidoInterno`(vItemFk INT,vQuantity INT) BEGIN diff --git a/db/routines/vn/procedures/creditInsurance_getRisk.sql b/db/routines/vn/procedures/creditInsurance_getRisk.sql index eccc37ca1..6bb4bffe5 100644 --- a/db/routines/vn/procedures/creditInsurance_getRisk.sql +++ b/db/routines/vn/procedures/creditInsurance_getRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`creditInsurance_getRisk`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`creditInsurance_getRisk`() BEGIN /** * Devuelve el riesgo de los clientes que estan asegurados diff --git a/db/routines/vn/procedures/creditRecovery.sql b/db/routines/vn/procedures/creditRecovery.sql index 687d652dd..ec5fd366b 100644 --- a/db/routines/vn/procedures/creditRecovery.sql +++ b/db/routines/vn/procedures/creditRecovery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`creditRecovery`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`creditRecovery`() BEGIN /** * Actualiza el crédito de los clientes diff --git a/db/routines/vn/procedures/crypt.sql b/db/routines/vn/procedures/crypt.sql index b3517b1ad..dbff716e3 100644 --- a/db/routines/vn/procedures/crypt.sql +++ b/db/routines/vn/procedures/crypt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) BEGIN DECLARE vEncryptedText VARCHAR(255) DEFAULT ''; diff --git a/db/routines/vn/procedures/cryptOff.sql b/db/routines/vn/procedures/cryptOff.sql index e0677a0e2..6c0a7e33d 100644 --- a/db/routines/vn/procedures/cryptOff.sql +++ b/db/routines/vn/procedures/cryptOff.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) BEGIN DECLARE vUncryptedText VARCHAR(255) DEFAULT ''; diff --git a/db/routines/vn/procedures/department_calcTree.sql b/db/routines/vn/procedures/department_calcTree.sql index 5a265bd41..7a80aaeb8 100644 --- a/db/routines/vn/procedures/department_calcTree.sql +++ b/db/routines/vn/procedures/department_calcTree.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`department_calcTree`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of diff --git a/db/routines/vn/procedures/department_calcTreeRec.sql b/db/routines/vn/procedures/department_calcTreeRec.sql index 77054b17f..d22fcef23 100644 --- a/db/routines/vn/procedures/department_calcTreeRec.sql +++ b/db/routines/vn/procedures/department_calcTreeRec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`department_calcTreeRec`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, diff --git a/db/routines/vn/procedures/department_doCalc.sql b/db/routines/vn/procedures/department_doCalc.sql index 915b9f191..ec25aac1b 100644 --- a/db/routines/vn/procedures/department_doCalc.sql +++ b/db/routines/vn/procedures/department_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`department_doCalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_doCalc`() proc: BEGIN /** * Recalculates the department tree. diff --git a/db/routines/vn/procedures/department_getHasMistake.sql b/db/routines/vn/procedures/department_getHasMistake.sql index 394105a16..7dd71367e 100644 --- a/db/routines/vn/procedures/department_getHasMistake.sql +++ b/db/routines/vn/procedures/department_getHasMistake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`department_getHasMistake`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_getHasMistake`() BEGIN /** diff --git a/db/routines/vn/procedures/department_getLeaves.sql b/db/routines/vn/procedures/department_getLeaves.sql index 7f1e3cc35..f0112f007 100644 --- a/db/routines/vn/procedures/department_getLeaves.sql +++ b/db/routines/vn/procedures/department_getLeaves.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`department_getLeaves`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_getLeaves`( vParentFk INT, vSearch VARCHAR(255) ) diff --git a/db/routines/vn/procedures/deviceLog_add.sql b/db/routines/vn/procedures/deviceLog_add.sql index 8d2310633..2a4614539 100644 --- a/db/routines/vn/procedures/deviceLog_add.sql +++ b/db/routines/vn/procedures/deviceLog_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64)) BEGIN /** * Inserta registro en tabla devicelog el log del usuario conectado. diff --git a/db/routines/vn/procedures/deviceProductionUser_exists.sql b/db/routines/vn/procedures/deviceProductionUser_exists.sql index f5be6e94f..6259a1477 100644 --- a/db/routines/vn/procedures/deviceProductionUser_exists.sql +++ b/db/routines/vn/procedures/deviceProductionUser_exists.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`deviceProductionUser_exists`(vUserFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProductionUser_exists`(vUserFk INT) BEGIN /* SELECT COUNT(*) AS UserExists diff --git a/db/routines/vn/procedures/deviceProductionUser_getWorker.sql b/db/routines/vn/procedures/deviceProductionUser_getWorker.sql index b18339108..dd66299a9 100644 --- a/db/routines/vn/procedures/deviceProductionUser_getWorker.sql +++ b/db/routines/vn/procedures/deviceProductionUser_getWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona si hay registrado un device con un android_id diff --git a/db/routines/vn/procedures/deviceProduction_getnameDevice.sql b/db/routines/vn/procedures/deviceProduction_getnameDevice.sql index c8a5abfaf..8f05dc194 100644 --- a/db/routines/vn/procedures/deviceProduction_getnameDevice.sql +++ b/db/routines/vn/procedures/deviceProduction_getnameDevice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona el id del dispositivo que corresponde al vAndroid_id. diff --git a/db/routines/vn/procedures/device_checkLogin.sql b/db/routines/vn/procedures/device_checkLogin.sql index db566a068..d68fe0072 100644 --- a/db/routines/vn/procedures/device_checkLogin.sql +++ b/db/routines/vn/procedures/device_checkLogin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) BEGIN /* diff --git a/db/routines/vn/procedures/duaEntryValueUpdate.sql b/db/routines/vn/procedures/duaEntryValueUpdate.sql index f688191de..fbb4026b9 100644 --- a/db/routines/vn/procedures/duaEntryValueUpdate.sql +++ b/db/routines/vn/procedures/duaEntryValueUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaEntryValueUpdate`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaEntryValueUpdate`(vDuaFk INT) BEGIN UPDATE duaEntry de diff --git a/db/routines/vn/procedures/duaInvoiceInBooking.sql b/db/routines/vn/procedures/duaInvoiceInBooking.sql index 10c0714e5..0ece5f119 100644 --- a/db/routines/vn/procedures/duaInvoiceInBooking.sql +++ b/db/routines/vn/procedures/duaInvoiceInBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`( vDuaFk INT ) BEGIN diff --git a/db/routines/vn/procedures/duaParcialMake.sql b/db/routines/vn/procedures/duaParcialMake.sql index cbb56e16d..18430a227 100644 --- a/db/routines/vn/procedures/duaParcialMake.sql +++ b/db/routines/vn/procedures/duaParcialMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaParcialMake`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaParcialMake`(vDuaFk INT) BEGIN DECLARE vNewDuaFk INT; diff --git a/db/routines/vn/procedures/duaTaxBooking.sql b/db/routines/vn/procedures/duaTaxBooking.sql index a50a10ca4..2013d5d5d 100644 --- a/db/routines/vn/procedures/duaTaxBooking.sql +++ b/db/routines/vn/procedures/duaTaxBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT) BEGIN DECLARE vBookNumber INT; DECLARE vBookDated DATE; diff --git a/db/routines/vn/procedures/duaTax_doRecalc.sql b/db/routines/vn/procedures/duaTax_doRecalc.sql index e2d2b347f..2b6f95224 100644 --- a/db/routines/vn/procedures/duaTax_doRecalc.sql +++ b/db/routines/vn/procedures/duaTax_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaTax_doRecalc`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaTax_doRecalc`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y los vuelve a crear en base a la tabla duaEntry diff --git a/db/routines/vn/procedures/ediTables_Update.sql b/db/routines/vn/procedures/ediTables_Update.sql index 3f0c6df04..47eefbdeb 100644 --- a/db/routines/vn/procedures/ediTables_Update.sql +++ b/db/routines/vn/procedures/ediTables_Update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ediTables_Update`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ediTables_Update`() BEGIN INSERT IGNORE INTO vn.genus(name) diff --git a/db/routines/vn/procedures/ektEntryAssign_setEntry.sql b/db/routines/vn/procedures/ektEntryAssign_setEntry.sql index d80215e37..0a8cb64fc 100644 --- a/db/routines/vn/procedures/ektEntryAssign_setEntry.sql +++ b/db/routines/vn/procedures/ektEntryAssign_setEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ektEntryAssign_setEntry`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ektEntryAssign_setEntry`() BEGIN DECLARE done INT DEFAULT FALSE; diff --git a/db/routines/vn/procedures/energyMeter_record.sql b/db/routines/vn/procedures/energyMeter_record.sql index 113f73e19..f69f2ca64 100644 --- a/db/routines/vn/procedures/energyMeter_record.sql +++ b/db/routines/vn/procedures/energyMeter_record.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`energyMeter_record`(vInput INT, vActiveTime INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`energyMeter_record`(vInput INT, vActiveTime INT) BEGIN DECLARE vConsumption INT; diff --git a/db/routines/vn/procedures/entryDelivered.sql b/db/routines/vn/procedures/entryDelivered.sql index e948770e8..1d820bfbc 100644 --- a/db/routines/vn/procedures/entryDelivered.sql +++ b/db/routines/vn/procedures/entryDelivered.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entryDelivered`(vDated DATE, vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entryDelivered`(vDated DATE, vEntryFk INT) BEGIN DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/entryWithItem.sql b/db/routines/vn/procedures/entryWithItem.sql index 30dd99fbf..d1600eef6 100644 --- a/db/routines/vn/procedures/entryWithItem.sql +++ b/db/routines/vn/procedures/entryWithItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) BEGIN DECLARE vTravel INT; diff --git a/db/routines/vn/procedures/entry_checkPackaging.sql b/db/routines/vn/procedures/entry_checkPackaging.sql index 7ba47b3d5..f5fa29094 100644 --- a/db/routines/vn/procedures/entry_checkPackaging.sql +++ b/db/routines/vn/procedures/entry_checkPackaging.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_checkPackaging`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_checkPackaging`(vEntryFk INT) BEGIN /** * Comprueba que los campos package y packaging no sean nulos diff --git a/db/routines/vn/procedures/entry_clone.sql b/db/routines/vn/procedures/entry_clone.sql index 4f38447c8..3cd4b4cbe 100644 --- a/db/routines/vn/procedures/entry_clone.sql +++ b/db/routines/vn/procedures/entry_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_clone`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_clone`(vSelf INT) BEGIN /** * clones an entry. diff --git a/db/routines/vn/procedures/entry_cloneHeader.sql b/db/routines/vn/procedures/entry_cloneHeader.sql index 7f9426663..aa3a8cba5 100644 --- a/db/routines/vn/procedures/entry_cloneHeader.sql +++ b/db/routines/vn/procedures/entry_cloneHeader.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_cloneHeader`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_cloneHeader`( vSelf INT, OUT vNewEntryFk INT, vTravelFk INT diff --git a/db/routines/vn/procedures/entry_cloneWithoutBuy.sql b/db/routines/vn/procedures/entry_cloneWithoutBuy.sql index 8d75d8d51..4933cd609 100644 --- a/db/routines/vn/procedures/entry_cloneWithoutBuy.sql +++ b/db/routines/vn/procedures/entry_cloneWithoutBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) BEGIN /** * Clona una entrada sin compras diff --git a/db/routines/vn/procedures/entry_copyBuys.sql b/db/routines/vn/procedures/entry_copyBuys.sql index 9bf4a55e4..7bba8c60f 100644 --- a/db/routines/vn/procedures/entry_copyBuys.sql +++ b/db/routines/vn/procedures/entry_copyBuys.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) BEGIN /** * Copies all buys from an entry to an entry. diff --git a/db/routines/vn/procedures/entry_fixMisfit.sql b/db/routines/vn/procedures/entry_fixMisfit.sql index 986a0ae9e..928fdf01c 100644 --- a/db/routines/vn/procedures/entry_fixMisfit.sql +++ b/db/routines/vn/procedures/entry_fixMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_fixMisfit`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_fixMisfit`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_getRate.sql b/db/routines/vn/procedures/entry_getRate.sql index 2220ef999..d48f61a64 100644 --- a/db/routines/vn/procedures/entry_getRate.sql +++ b/db/routines/vn/procedures/entry_getRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_getRate`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_getRate`(vSelf INT) BEGIN /** * Prepara una tabla con las tarifas aplicables en funcion de la fecha diff --git a/db/routines/vn/procedures/entry_getTransfer.sql b/db/routines/vn/procedures/entry_getTransfer.sql index 165c87dc7..2bec79a1d 100644 --- a/db/routines/vn/procedures/entry_getTransfer.sql +++ b/db/routines/vn/procedures/entry_getTransfer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_getTransfer`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_getTransfer`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_isEditable.sql b/db/routines/vn/procedures/entry_isEditable.sql index c279fac65..fe009ccdd 100644 --- a/db/routines/vn/procedures/entry_isEditable.sql +++ b/db/routines/vn/procedures/entry_isEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_isEditable`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_isEditable`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_lock.sql b/db/routines/vn/procedures/entry_lock.sql index 8ec50323b..eb0ee2761 100644 --- a/db/routines/vn/procedures/entry_lock.sql +++ b/db/routines/vn/procedures/entry_lock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_lock`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_lock`(vSelf INT) BEGIN /** * Lock the indicated entry diff --git a/db/routines/vn/procedures/entry_moveNotPrinted.sql b/db/routines/vn/procedures/entry_moveNotPrinted.sql index 3a12007d1..b5cc373cb 100644 --- a/db/routines/vn/procedures/entry_moveNotPrinted.sql +++ b/db/routines/vn/procedures/entry_moveNotPrinted.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_moveNotPrinted`(vSelf INT, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_moveNotPrinted`(vSelf INT, vDays INT, vChangeEntry BOOL, OUT vNewEntryFk INT) diff --git a/db/routines/vn/procedures/entry_notifyChanged.sql b/db/routines/vn/procedures/entry_notifyChanged.sql index 11e6fe4c0..8c57a7a45 100644 --- a/db/routines/vn/procedures/entry_notifyChanged.sql +++ b/db/routines/vn/procedures/entry_notifyChanged.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) BEGIN DECLARE vEmail VARCHAR(255); DECLARE vFields VARCHAR(100); diff --git a/db/routines/vn/procedures/entry_recalc.sql b/db/routines/vn/procedures/entry_recalc.sql index b426a9b5b..8af72bdda 100644 --- a/db/routines/vn/procedures/entry_recalc.sql +++ b/db/routines/vn/procedures/entry_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_recalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_recalc`() BEGIN /** * Comprueba que las ventas creadas entre un rango de fechas tienen componentes diff --git a/db/routines/vn/procedures/entry_splitByShelving.sql b/db/routines/vn/procedures/entry_splitByShelving.sql index eb07c12b7..2dfd54382 100644 --- a/db/routines/vn/procedures/entry_splitByShelving.sql +++ b/db/routines/vn/procedures/entry_splitByShelving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT) BEGIN /** * Divide las compras entre dos entradas de acuerdo con lo ubicado en una matr�cula diff --git a/db/routines/vn/procedures/entry_splitMisfit.sql b/db/routines/vn/procedures/entry_splitMisfit.sql index 476c52689..60c2a27b1 100644 --- a/db/routines/vn/procedures/entry_splitMisfit.sql +++ b/db/routines/vn/procedures/entry_splitMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_splitMisfit`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_splitMisfit`(vSelf INT) BEGIN /* Divide una entrada, pasando los registros que ha insertado vn.entry_fixMisfit de la entrada original diff --git a/db/routines/vn/procedures/entry_unlock.sql b/db/routines/vn/procedures/entry_unlock.sql index 1dab48974..33efcfd32 100644 --- a/db/routines/vn/procedures/entry_unlock.sql +++ b/db/routines/vn/procedures/entry_unlock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_unlock`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_unlock`(vSelf INT) BEGIN /** * Unlock the indicated entry diff --git a/db/routines/vn/procedures/entry_updateComission.sql b/db/routines/vn/procedures/entry_updateComission.sql index 4ec4f6e58..e63a30029 100644 --- a/db/routines/vn/procedures/entry_updateComission.sql +++ b/db/routines/vn/procedures/entry_updateComission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_updateComission`(vCurrency INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_updateComission`(vCurrency INT) BEGIN /** * Actualiza la comision de las entradas de hoy a futuro y las recalcula diff --git a/db/routines/vn/procedures/expeditionGetFromRoute.sql b/db/routines/vn/procedures/expeditionGetFromRoute.sql index 46c3c5d70..89157d071 100644 --- a/db/routines/vn/procedures/expeditionGetFromRoute.sql +++ b/db/routines/vn/procedures/expeditionGetFromRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionGetFromRoute`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionGetFromRoute`( vExpeditionFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionPallet_Del.sql b/db/routines/vn/procedures/expeditionPallet_Del.sql index 451815ca0..ea76d8bf5 100644 --- a/db/routines/vn/procedures/expeditionPallet_Del.sql +++ b/db/routines/vn/procedures/expeditionPallet_Del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_Del`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_Del`(vPalletFk INT) BEGIN DELETE FROM vn.expeditionPallet diff --git a/db/routines/vn/procedures/expeditionPallet_List.sql b/db/routines/vn/procedures/expeditionPallet_List.sql index db7cd6f0e..f6ca2fa78 100644 --- a/db/routines/vn/procedures/expeditionPallet_List.sql +++ b/db/routines/vn/procedures/expeditionPallet_List.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_List`(vTruckFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_List`(vTruckFk INT) BEGIN SELECT ep.id Pallet, diff --git a/db/routines/vn/procedures/expeditionPallet_View.sql b/db/routines/vn/procedures/expeditionPallet_View.sql index fe410b2fb..d5c9e684a 100644 --- a/db/routines/vn/procedures/expeditionPallet_View.sql +++ b/db/routines/vn/procedures/expeditionPallet_View.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_View`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_View`(vPalletFk INT) BEGIN SELECT ep.id Pallet, diff --git a/db/routines/vn/procedures/expeditionPallet_build.sql b/db/routines/vn/procedures/expeditionPallet_build.sql index bea56eae6..47bacbdc9 100644 --- a/db/routines/vn/procedures/expeditionPallet_build.sql +++ b/db/routines/vn/procedures/expeditionPallet_build.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_build`(IN vExpeditions JSON, IN vArcId INT, IN vWorkerFk INT, OUT vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_build`(IN vExpeditions JSON, IN vArcId INT, IN vWorkerFk INT, OUT vPalletFk INT) BEGIN /** Construye un pallet de expediciones. * diff --git a/db/routines/vn/procedures/expeditionPallet_printLabel.sql b/db/routines/vn/procedures/expeditionPallet_printLabel.sql index 7aaf8cedb..1c59c8306 100644 --- a/db/routines/vn/procedures/expeditionPallet_printLabel.sql +++ b/db/routines/vn/procedures/expeditionPallet_printLabel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_printLabel`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_printLabel`(vSelf INT) BEGIN /** * Calls the report_print procedure and passes it diff --git a/db/routines/vn/procedures/expeditionScan_Add.sql b/db/routines/vn/procedures/expeditionScan_Add.sql index 6ab19e8d0..1dbf3fa46 100644 --- a/db/routines/vn/procedures/expeditionScan_Add.sql +++ b/db/routines/vn/procedures/expeditionScan_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Add`(vPalletFk INT, vTruckFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Add`(vPalletFk INT, vTruckFk INT) BEGIN DECLARE vTotal INT DEFAULT 0; diff --git a/db/routines/vn/procedures/expeditionScan_Del.sql b/db/routines/vn/procedures/expeditionScan_Del.sql index ecbfdad4b..6f3520065 100644 --- a/db/routines/vn/procedures/expeditionScan_Del.sql +++ b/db/routines/vn/procedures/expeditionScan_Del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Del`(vScanFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Del`(vScanFk INT) BEGIN DELETE FROM vn.expeditionScan diff --git a/db/routines/vn/procedures/expeditionScan_List.sql b/db/routines/vn/procedures/expeditionScan_List.sql index b0d53053f..651270da8 100644 --- a/db/routines/vn/procedures/expeditionScan_List.sql +++ b/db/routines/vn/procedures/expeditionScan_List.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_List`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_List`(vPalletFk INT) BEGIN SELECT es.id, diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index 9744a7cd7..7d196d6dc 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) BEGIN REPLACE vn.expeditionScan(expeditionFk, palletFk) diff --git a/db/routines/vn/procedures/expeditionState_add.sql b/db/routines/vn/procedures/expeditionState_add.sql index 299f11b04..6ed41df67 100644 --- a/db/routines/vn/procedures/expeditionState_add.sql +++ b/db/routines/vn/procedures/expeditionState_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByAdress.sql b/db/routines/vn/procedures/expeditionState_addByAdress.sql index 1d8de9745..3eaae58b2 100644 --- a/db/routines/vn/procedures/expeditionState_addByAdress.sql +++ b/db/routines/vn/procedures/expeditionState_addByAdress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByExpedition.sql b/db/routines/vn/procedures/expeditionState_addByExpedition.sql index 6fbc205e5..630e14401 100644 --- a/db/routines/vn/procedures/expeditionState_addByExpedition.sql +++ b/db/routines/vn/procedures/expeditionState_addByExpedition.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByPallet.sql b/db/routines/vn/procedures/expeditionState_addByPallet.sql index af99b444d..876249b33 100644 --- a/db/routines/vn/procedures/expeditionState_addByPallet.sql +++ b/db/routines/vn/procedures/expeditionState_addByPallet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) BEGIN /** * Inserta nuevos registros en la tabla vn.expeditionState diff --git a/db/routines/vn/procedures/expeditionState_addByRoute.sql b/db/routines/vn/procedures/expeditionState_addByRoute.sql index 5e438287b..832a990a8 100644 --- a/db/routines/vn/procedures/expeditionState_addByRoute.sql +++ b/db/routines/vn/procedures/expeditionState_addByRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expedition_StateGet.sql b/db/routines/vn/procedures/expedition_StateGet.sql index c709841eb..25bac8bc1 100644 --- a/db/routines/vn/procedures/expedition_StateGet.sql +++ b/db/routines/vn/procedures/expedition_StateGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expedition_StateGet`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_StateGet`(vExpeditionFk INT) BEGIN /* Devuelve una "ficha" con todos los datos relativos a la expedición diff --git a/db/routines/vn/procedures/expedition_getFromRoute.sql b/db/routines/vn/procedures/expedition_getFromRoute.sql index 2b726fa7d..a60d74df8 100644 --- a/db/routines/vn/procedures/expedition_getFromRoute.sql +++ b/db/routines/vn/procedures/expedition_getFromRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expedition_getFromRoute`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_getFromRoute`(vRouteFk INT) BEGIN /** * Obtiene las expediciones a partir de una ruta diff --git a/db/routines/vn/procedures/expedition_getState.sql b/db/routines/vn/procedures/expedition_getState.sql index 61d65f571..1866b4345 100644 --- a/db/routines/vn/procedures/expedition_getState.sql +++ b/db/routines/vn/procedures/expedition_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expedition_getState`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_getState`(vExpeditionFk INT) BEGIN DECLARE vTicketsPendientes INT; diff --git a/db/routines/vn/procedures/freelance_getInfo.sql b/db/routines/vn/procedures/freelance_getInfo.sql index 0f85ab4bd..950f09a1c 100644 --- a/db/routines/vn/procedures/freelance_getInfo.sql +++ b/db/routines/vn/procedures/freelance_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`freelance_getInfo`(workerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`freelance_getInfo`(workerFk INT) BEGIN SELECT s.name, s.street, s.city, s.nif, s.postCode FROM route r diff --git a/db/routines/vn/procedures/getDayExpeditions.sql b/db/routines/vn/procedures/getDayExpeditions.sql index b708c8b0e..8d0155a1d 100644 --- a/db/routines/vn/procedures/getDayExpeditions.sql +++ b/db/routines/vn/procedures/getDayExpeditions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`getDayExpeditions`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getDayExpeditions`() BEGIN SELECT diff --git a/db/routines/vn/procedures/getInfoDelivery.sql b/db/routines/vn/procedures/getInfoDelivery.sql index c240560e9..711725b42 100644 --- a/db/routines/vn/procedures/getInfoDelivery.sql +++ b/db/routines/vn/procedures/getInfoDelivery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`getInfoDelivery`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getInfoDelivery`(vRouteFk INT) BEGIN SELECT s.name, s.street, s.city, s.nif, s.postCode FROM vn.route r JOIN vn.agencyMode am ON r.agencyModeFk = am.id diff --git a/db/routines/vn/procedures/getPedidosInternos.sql b/db/routines/vn/procedures/getPedidosInternos.sql index 973e110ef..87f8a7e09 100644 --- a/db/routines/vn/procedures/getPedidosInternos.sql +++ b/db/routines/vn/procedures/getPedidosInternos.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`getPedidosInternos`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getPedidosInternos`() BEGIN SELECT id,name as description,upToDown as quantity FROM vn.item WHERE upToDown; diff --git a/db/routines/vn/procedures/getTaxBases.sql b/db/routines/vn/procedures/getTaxBases.sql index 54932aa4f..8ddf664c8 100644 --- a/db/routines/vn/procedures/getTaxBases.sql +++ b/db/routines/vn/procedures/getTaxBases.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`getTaxBases`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getTaxBases`() BEGIN /** * Calcula y devuelve en número de bases imponibles postivas y negativas diff --git a/db/routines/vn/procedures/greuge_add.sql b/db/routines/vn/procedures/greuge_add.sql index b2241ab83..4b1aea445 100644 --- a/db/routines/vn/procedures/greuge_add.sql +++ b/db/routines/vn/procedures/greuge_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`greuge_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`greuge_add`() BEGIN /** * Group inserts into vn.greuge and then deletes the records just inserted diff --git a/db/routines/vn/procedures/greuge_notifyEvents.sql b/db/routines/vn/procedures/greuge_notifyEvents.sql index ec00c1bde..21d400ec3 100644 --- a/db/routines/vn/procedures/greuge_notifyEvents.sql +++ b/db/routines/vn/procedures/greuge_notifyEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`greuge_notifyEvents`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`greuge_notifyEvents`() BEGIN /** * Notify to detect wrong greuges. diff --git a/db/routines/vn/procedures/inventoryFailureAdd.sql b/db/routines/vn/procedures/inventoryFailureAdd.sql index 38765cbda..311e2466c 100644 --- a/db/routines/vn/procedures/inventoryFailureAdd.sql +++ b/db/routines/vn/procedures/inventoryFailureAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`inventoryFailureAdd`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryFailureAdd`() BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/vn/procedures/inventoryMake.sql b/db/routines/vn/procedures/inventoryMake.sql index 30bea6690..1eca06aa6 100644 --- a/db/routines/vn/procedures/inventoryMake.sql +++ b/db/routines/vn/procedures/inventoryMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`inventoryMake`(vInventoryDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryMake`(vInventoryDate DATE) BEGIN /** * Recalculate the inventories diff --git a/db/routines/vn/procedures/inventoryMakeLauncher.sql b/db/routines/vn/procedures/inventoryMakeLauncher.sql index 717e3c163..967c3bb03 100644 --- a/db/routines/vn/procedures/inventoryMakeLauncher.sql +++ b/db/routines/vn/procedures/inventoryMakeLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`inventoryMakeLauncher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryMakeLauncher`() BEGIN /** * Recalculate the inventories of all warehouses diff --git a/db/routines/vn/procedures/inventory_repair.sql b/db/routines/vn/procedures/inventory_repair.sql index 93527d84b..eaf228eda 100644 --- a/db/routines/vn/procedures/inventory_repair.sql +++ b/db/routines/vn/procedures/inventory_repair.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`inventory_repair`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventory_repair`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.lastEntry; diff --git a/db/routines/vn/procedures/invoiceExpenseMake.sql b/db/routines/vn/procedures/invoiceExpenseMake.sql index a1fe69ff5..e1b81f85d 100644 --- a/db/routines/vn/procedures/invoiceExpenseMake.sql +++ b/db/routines/vn/procedures/invoiceExpenseMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceExpenseMake`(IN vInvoice INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceExpenseMake`(IN vInvoice INT) BEGIN /* Inserta las partidas de gasto correspondientes a la factura * REQUIERE tabla tmp.ticketToInvoice diff --git a/db/routines/vn/procedures/invoiceFromAddress.sql b/db/routines/vn/procedures/invoiceFromAddress.sql index 2879460ce..2a0cff866 100644 --- a/db/routines/vn/procedures/invoiceFromAddress.sql +++ b/db/routines/vn/procedures/invoiceFromAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) BEGIN DECLARE vMinDateTicket DATE DEFAULT TIMESTAMPADD(MONTH, -3, util.VN_CURDATE()); diff --git a/db/routines/vn/procedures/invoiceFromClient.sql b/db/routines/vn/procedures/invoiceFromClient.sql index 29cee5d4f..4042cdb26 100644 --- a/db/routines/vn/procedures/invoiceFromClient.sql +++ b/db/routines/vn/procedures/invoiceFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceFromClient`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromClient`( IN vMaxTicketDate datetime, IN vClientFk INT, IN vCompanyFk INT) diff --git a/db/routines/vn/procedures/invoiceFromTicket.sql b/db/routines/vn/procedures/invoiceFromTicket.sql index e5ea00e62..044c7406c 100644 --- a/db/routines/vn/procedures/invoiceFromTicket.sql +++ b/db/routines/vn/procedures/invoiceFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceFromTicket`(IN vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromTicket`(IN vTicket INT) BEGIN DROP TEMPORARY TABLE IF EXISTS `tmp`.`ticketToInvoice`; diff --git a/db/routines/vn/procedures/invoiceInDueDay_calculate.sql b/db/routines/vn/procedures/invoiceInDueDay_calculate.sql index e51b5f64d..a9a95909d 100644 --- a/db/routines/vn/procedures/invoiceInDueDay_calculate.sql +++ b/db/routines/vn/procedures/invoiceInDueDay_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_calculate`(vInvoiceInFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_calculate`(vInvoiceInFk INT) BEGIN /** * Calcula los vctos. de una factura recibida diff --git a/db/routines/vn/procedures/invoiceInDueDay_recalc.sql b/db/routines/vn/procedures/invoiceInDueDay_recalc.sql index 7d2b0a5ed..69626c746 100644 --- a/db/routines/vn/procedures/invoiceInDueDay_recalc.sql +++ b/db/routines/vn/procedures/invoiceInDueDay_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_recalc`(vInvoiceInFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_recalc`(vInvoiceInFk INT) BEGIN DELETE FROM invoiceInDueDay diff --git a/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql b/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql index 3453516cc..52b92ba05 100644 --- a/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql +++ b/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTaxMakeByDua`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTaxMakeByDua`( vDuaFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql b/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql index 962cc5224..1f969141f 100644 --- a/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql +++ b/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_afterUpsert`(vInvoiceInFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_afterUpsert`(vInvoiceInFk INT) BEGIN /** * Triggered actions when a invoiceInTax is updated or inserted. diff --git a/db/routines/vn/procedures/invoiceInTax_getFromDua.sql b/db/routines/vn/procedures/invoiceInTax_getFromDua.sql index bf2cbe61e..a2eb72483 100644 --- a/db/routines/vn/procedures/invoiceInTax_getFromDua.sql +++ b/db/routines/vn/procedures/invoiceInTax_getFromDua.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromDua`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromDua`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y sus vctos. y los vuelve a crear en base a la tabla duaEntry diff --git a/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql b/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql index 5f2ceeb4f..31f278e94 100644 --- a/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql +++ b/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`( IN vInvoiceInFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceInTax_recalc.sql b/db/routines/vn/procedures/invoiceInTax_recalc.sql index 4e20b01d3..11ad1ca7f 100644 --- a/db/routines/vn/procedures/invoiceInTax_recalc.sql +++ b/db/routines/vn/procedures/invoiceInTax_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_recalc`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_recalc`( vInvoiceInFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceIn_booking.sql b/db/routines/vn/procedures/invoiceIn_booking.sql index c194a774d..334ea46ad 100644 --- a/db/routines/vn/procedures/invoiceIn_booking.sql +++ b/db/routines/vn/procedures/invoiceIn_booking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`( vSelf INT, vBookNumber INT ) diff --git a/db/routines/vn/procedures/invoiceIn_checkBooked.sql b/db/routines/vn/procedures/invoiceIn_checkBooked.sql index 862870eb4..b0b8b92cd 100644 --- a/db/routines/vn/procedures/invoiceIn_checkBooked.sql +++ b/db/routines/vn/procedures/invoiceIn_checkBooked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_checkBooked`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceIn_checkBooked`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceOutAgain.sql b/db/routines/vn/procedures/invoiceOutAgain.sql index 82cebc18d..1643c2fa6 100644 --- a/db/routines/vn/procedures/invoiceOutAgain.sql +++ b/db/routines/vn/procedures/invoiceOutAgain.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/invoiceOutBooking.sql b/db/routines/vn/procedures/invoiceOutBooking.sql index 9fc1c92b6..15ea2d7e6 100644 --- a/db/routines/vn/procedures/invoiceOutBooking.sql +++ b/db/routines/vn/procedures/invoiceOutBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT) BEGIN /** * Asienta una factura emitida diff --git a/db/routines/vn/procedures/invoiceOutBookingRange.sql b/db/routines/vn/procedures/invoiceOutBookingRange.sql index 57d973f01..ccacb94de 100644 --- a/db/routines/vn/procedures/invoiceOutBookingRange.sql +++ b/db/routines/vn/procedures/invoiceOutBookingRange.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBookingRange`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutBookingRange`() BEGIN /* Reasentar facturas diff --git a/db/routines/vn/procedures/invoiceOutListByCompany.sql b/db/routines/vn/procedures/invoiceOutListByCompany.sql index 09ebfc1a4..97b1a1828 100644 --- a/db/routines/vn/procedures/invoiceOutListByCompany.sql +++ b/db/routines/vn/procedures/invoiceOutListByCompany.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) BEGIN SELECT diff --git a/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql b/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql index c263fe8d3..aef2a08c2 100644 --- a/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql +++ b/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutTaxAndExpense`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutTaxAndExpense`() BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql b/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql index 5fce7c428..aa1a8ec32 100644 --- a/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql +++ b/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOut_exportationFromClient`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_exportationFromClient`( vMaxTicketDate DATETIME, vClientFk INT, vCompanyFk INT) diff --git a/db/routines/vn/procedures/invoiceOut_new.sql b/db/routines/vn/procedures/invoiceOut_new.sql index c9b94027e..2d8233740 100644 --- a/db/routines/vn/procedures/invoiceOut_new.sql +++ b/db/routines/vn/procedures/invoiceOut_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOut_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_new`( vSerial VARCHAR(255), vInvoiceDate DATE, vTaxArea VARCHAR(25), diff --git a/db/routines/vn/procedures/invoiceOut_newFromClient.sql b/db/routines/vn/procedures/invoiceOut_newFromClient.sql index e6fc7b78a..f0f644c38 100644 --- a/db/routines/vn/procedures/invoiceOut_newFromClient.sql +++ b/db/routines/vn/procedures/invoiceOut_newFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromClient`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromClient`( IN vClientFk INT, IN vSerial CHAR(2), IN vMaxShipped DATE, diff --git a/db/routines/vn/procedures/invoiceOut_newFromTicket.sql b/db/routines/vn/procedures/invoiceOut_newFromTicket.sql index 3ee7cd678..6437a26c3 100644 --- a/db/routines/vn/procedures/invoiceOut_newFromTicket.sql +++ b/db/routines/vn/procedures/invoiceOut_newFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), IN vRef varchar(25), OUT vInvoiceId int) BEGIN /** diff --git a/db/routines/vn/procedures/invoiceTaxMake.sql b/db/routines/vn/procedures/invoiceTaxMake.sql index 30296dc26..70e7cce64 100644 --- a/db/routines/vn/procedures/invoiceTaxMake.sql +++ b/db/routines/vn/procedures/invoiceTaxMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) BEGIN /** * Factura un conjunto de tickets. diff --git a/db/routines/vn/procedures/itemBarcode_update.sql b/db/routines/vn/procedures/itemBarcode_update.sql index e2f13dc93..0e796b8b7 100644 --- a/db/routines/vn/procedures/itemBarcode_update.sql +++ b/db/routines/vn/procedures/itemBarcode_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) BEGIN IF vDelete THEN DELETE FROM vn.itemBarcode WHERE itemFk = vItemFk AND code = vCode; diff --git a/db/routines/vn/procedures/itemFuentesBalance.sql b/db/routines/vn/procedures/itemFuentesBalance.sql index e60273340..02c16bb59 100644 --- a/db/routines/vn/procedures/itemFuentesBalance.sql +++ b/db/routines/vn/procedures/itemFuentesBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemFuentesBalance`(vDaysInFuture INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemFuentesBalance`(vDaysInFuture INT) BEGIN /* Se utiliza para calcular la necesidad de mover mercancia entre el almacén de fuentes y el nuestro diff --git a/db/routines/vn/procedures/itemPlacementFromTicket.sql b/db/routines/vn/procedures/itemPlacementFromTicket.sql index 1a1a735e5..29b578edf 100644 --- a/db/routines/vn/procedures/itemPlacementFromTicket.sql +++ b/db/routines/vn/procedures/itemPlacementFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemPlacementFromTicket`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementFromTicket`(vTicket INT) BEGIN /** * Llama a itemPlacementUpdateVisible diff --git a/db/routines/vn/procedures/itemPlacementSupplyAiming.sql b/db/routines/vn/procedures/itemPlacementSupplyAiming.sql index ee9125a7b..d7cb11a51 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyAiming.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyAiming.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) BEGIN SELECT ish.itemFk, diff --git a/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql b/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql index 9c4457a5e..731c10c61 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) BEGIN UPDATE vn.itemPlacementSupply diff --git a/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql b/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql index b23f69fe7..f662d9121 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT ) BEGIN DECLARE vId INT; diff --git a/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql b/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql index 86d62cad4..70af69232 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) BEGIN /** * Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa. diff --git a/db/routines/vn/procedures/itemRefreshTags.sql b/db/routines/vn/procedures/itemRefreshTags.sql index 21af20c0f..9c4d23d78 100644 --- a/db/routines/vn/procedures/itemRefreshTags.sql +++ b/db/routines/vn/procedures/itemRefreshTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemRefreshTags`(IN vItem INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemRefreshTags`(IN vItem INT) BEGIN /** * Crea la tabla temporal necesaria para el procedimiento item_refreshTags diff --git a/db/routines/vn/procedures/itemSale_byWeek.sql b/db/routines/vn/procedures/itemSale_byWeek.sql index bc43b7b16..348ad2832 100644 --- a/db/routines/vn/procedures/itemSale_byWeek.sql +++ b/db/routines/vn/procedures/itemSale_byWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) BEGIN DECLARE vStarted DATE; diff --git a/db/routines/vn/procedures/itemSaveMin.sql b/db/routines/vn/procedures/itemSaveMin.sql index 510638348..75c99efd1 100644 --- a/db/routines/vn/procedures/itemSaveMin.sql +++ b/db/routines/vn/procedures/itemSaveMin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemSaveMin`(min INT,vBarcode VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSaveMin`(min INT,vBarcode VARCHAR(22)) BEGIN DECLARE vItemFk INT; diff --git a/db/routines/vn/procedures/itemSearchShelving.sql b/db/routines/vn/procedures/itemSearchShelving.sql index 8c2c6c7c8..6f805df19 100644 --- a/db/routines/vn/procedures/itemSearchShelving.sql +++ b/db/routines/vn/procedures/itemSearchShelving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemSearchShelving`(`vShelvingFk` VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSearchShelving`(`vShelvingFk` VARCHAR(3)) BEGIN SELECT p.`column` AS col , p.`row` FROM vn.shelving s diff --git a/db/routines/vn/procedures/itemShelvingDelete.sql b/db/routines/vn/procedures/itemShelvingDelete.sql index f895782d3..9c204722c 100644 --- a/db/routines/vn/procedures/itemShelvingDelete.sql +++ b/db/routines/vn/procedures/itemShelvingDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingDelete`(vId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingDelete`(vId INT) BEGIN DELETE FROM vn.itemShelving WHERE id = vId; diff --git a/db/routines/vn/procedures/itemShelvingLog_get.sql b/db/routines/vn/procedures/itemShelvingLog_get.sql index ad67ea5cd..ee3fc8b25 100644 --- a/db/routines/vn/procedures/itemShelvingLog_get.sql +++ b/db/routines/vn/procedures/itemShelvingLog_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) BEGIN /** diff --git a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql b/db/routines/vn/procedures/itemShelvingMakeFromDate.sql index 2dde68829..b8a0f3535 100644 --- a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql +++ b/db/routines/vn/procedures/itemShelvingMakeFromDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingMakeFromDate`(IN `vShelvingFk` VARCHAR(8), IN `vBarcode` VARCHAR(22), IN `vQuantity` INT, IN `vPackagingFk` VARCHAR(10), IN `vGrouping` INT, IN `vPacking` INT, IN `vWarehouseFk` INT, `vCreated` VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingMakeFromDate`(IN `vShelvingFk` VARCHAR(8), IN `vBarcode` VARCHAR(22), IN `vQuantity` INT, IN `vPackagingFk` VARCHAR(10), IN `vGrouping` INT, IN `vPacking` INT, IN `vWarehouseFk` INT, `vCreated` VARCHAR(22)) BEGIN DECLARE vItemFk INT; diff --git a/db/routines/vn/procedures/itemShelvingMatch.sql b/db/routines/vn/procedures/itemShelvingMatch.sql index 9a10c2b87..f94935162 100644 --- a/db/routines/vn/procedures/itemShelvingMatch.sql +++ b/db/routines/vn/procedures/itemShelvingMatch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) BEGIN DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql b/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql index c3fc59624..96fe8b514 100644 --- a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql +++ b/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) BEGIN INSERT INTO vn.itemShelvingPlacementSupply( itemShelvingFk, diff --git a/db/routines/vn/procedures/itemShelvingProblem.sql b/db/routines/vn/procedures/itemShelvingProblem.sql index aed7572ee..1a2d0a9aa 100644 --- a/db/routines/vn/procedures/itemShelvingProblem.sql +++ b/db/routines/vn/procedures/itemShelvingProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingProblem`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingProblem`(vSectorFk INT) BEGIN DECLARE vVisibleCache INT; diff --git a/db/routines/vn/procedures/itemShelvingRadar.sql b/db/routines/vn/procedures/itemShelvingRadar.sql index aa95d0503..0eb1d094d 100644 --- a/db/routines/vn/procedures/itemShelvingRadar.sql +++ b/db/routines/vn/procedures/itemShelvingRadar.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`( vSectorFk INT ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingRadar_Entry.sql b/db/routines/vn/procedures/itemShelvingRadar_Entry.sql index c0b4fcda2..c6d047699 100644 --- a/db/routines/vn/procedures/itemShelvingRadar_Entry.sql +++ b/db/routines/vn/procedures/itemShelvingRadar_Entry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; diff --git a/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql b/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql index c8b5d4bb4..ba0ba93ee 100644 --- a/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql +++ b/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry_State_beta`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry_State_beta`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; diff --git a/db/routines/vn/procedures/itemShelvingSale_Add.sql b/db/routines/vn/procedures/itemShelvingSale_Add.sql index 80eb4efca..48193ca83 100644 --- a/db/routines/vn/procedures/itemShelvingSale_Add.sql +++ b/db/routines/vn/procedures/itemShelvingSale_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) BEGIN /** * Añade línea a itemShelvingSale y regulariza el carro diff --git a/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql index 7f9cc6616..94b84f2ee 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql @@ -1,6 +1,6 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addByCollection`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addByCollection`( vCollectionFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql index 909ce5155..79f8f3b98 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySale`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySale`( vSaleFk INT ) proc: BEGIN diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql index 442abcf5d..b101a50f7 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySectorCollection`(vSectorCollectionFk INT(11)) BEGIN /** diff --git a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql index 629e303b3..427af73bc 100644 --- a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql +++ b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_doReserve`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_doReserve`() proc: BEGIN /** * Genera reservas de la tabla vn.itemShelvingSaleReserve diff --git a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql index 85230a386..0153692d1 100644 --- a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql +++ b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_reallocate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_reallocate`( vItemShelvingFk INT(10), vItemFk INT(10) ) diff --git a/db/routines/vn/procedures/itemShelvingSale_setPicked.sql b/db/routines/vn/procedures/itemShelvingSale_setPicked.sql index c1e58a9d1..fdeda3046 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setPicked.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setPicked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setPicked`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setPicked`( vSaleGroupFk INT(10) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql index 85f56ee68..64ef2e1d6 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQuantity`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQuantity`( vItemShelvingSaleFk INT(10), vQuantity DECIMAL(10,0), vIsItemShelvingSaleEmpty BOOLEAN diff --git a/db/routines/vn/procedures/itemShelvingSale_unpicked.sql b/db/routines/vn/procedures/itemShelvingSale_unpicked.sql index 889cadfd0..464a639bf 100644 --- a/db/routines/vn/procedures/itemShelvingSale_unpicked.sql +++ b/db/routines/vn/procedures/itemShelvingSale_unpicked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_unpicked`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_unpicked`( vSelf INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelving_add.sql b/db/routines/vn/procedures/itemShelving_add.sql index a1bca5b6c..26437b401 100644 --- a/db/routines/vn/procedures/itemShelving_add.sql +++ b/db/routines/vn/procedures/itemShelving_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_add`( vShelvingFk VARCHAR(8), vBarcode VARCHAR(22), vQuantity INT, diff --git a/db/routines/vn/procedures/itemShelving_addByClaim.sql b/db/routines/vn/procedures/itemShelving_addByClaim.sql index 851162952..a0bd6ba77 100644 --- a/db/routines/vn/procedures/itemShelving_addByClaim.sql +++ b/db/routines/vn/procedures/itemShelving_addByClaim.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) BEGIN /** * Insert items of claim into itemShelving. diff --git a/db/routines/vn/procedures/itemShelving_addList.sql b/db/routines/vn/procedures/itemShelving_addList.sql index 130007de5..d7f687659 100644 --- a/db/routines/vn/procedures/itemShelving_addList.sql +++ b/db/routines/vn/procedures/itemShelving_addList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT) BEGIN /* Recorre cada elemento en la colección vList. * Si el parámetro isChecking = FALSE, llama a itemShelving_add. diff --git a/db/routines/vn/procedures/itemShelving_filterBuyer.sql b/db/routines/vn/procedures/itemShelving_filterBuyer.sql index d4675ea0e..a62e64edd 100644 --- a/db/routines/vn/procedures/itemShelving_filterBuyer.sql +++ b/db/routines/vn/procedures/itemShelving_filterBuyer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) proc:BEGIN /** * Lista de articulos filtrados por comprador diff --git a/db/routines/vn/procedures/itemShelving_get.sql b/db/routines/vn/procedures/itemShelving_get.sql index 1be762f09..d8d24cf97 100644 --- a/db/routines/vn/procedures/itemShelving_get.sql +++ b/db/routines/vn/procedures/itemShelving_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8)) BEGIN /** * Lista artículos de itemshelving diff --git a/db/routines/vn/procedures/itemShelving_getAlternatives.sql b/db/routines/vn/procedures/itemShelving_getAlternatives.sql index de30d46ac..5b7998ce6 100644 --- a/db/routines/vn/procedures/itemShelving_getAlternatives.sql +++ b/db/routines/vn/procedures/itemShelving_getAlternatives.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) BEGIN /** * Devuelve un listado de posibles ubicaciones alternativas a ubicar los item de la matricula diff --git a/db/routines/vn/procedures/itemShelving_getInfo.sql b/db/routines/vn/procedures/itemShelving_getInfo.sql index a5749bd26..175ffa5db 100644 --- a/db/routines/vn/procedures/itemShelving_getInfo.sql +++ b/db/routines/vn/procedures/itemShelving_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22)) BEGIN /** * Muestra información realtiva a la ubicación de un item diff --git a/db/routines/vn/procedures/itemShelving_getItemDetails.sql b/db/routines/vn/procedures/itemShelving_getItemDetails.sql index c01bc348c..6ca17139a 100644 --- a/db/routines/vn/procedures/itemShelving_getItemDetails.sql +++ b/db/routines/vn/procedures/itemShelving_getItemDetails.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`( vBarcodeItem INT, vShelvingFK VARCHAR(10) ) diff --git a/db/routines/vn/procedures/itemShelving_getSaleDate.sql b/db/routines/vn/procedures/itemShelving_getSaleDate.sql index a9f9466cf..fd1096724 100644 --- a/db/routines/vn/procedures/itemShelving_getSaleDate.sql +++ b/db/routines/vn/procedures/itemShelving_getSaleDate.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) BEGIN /* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula. @@ -161,5 +161,5 @@ BEGIN DROP TEMPORARY TABLE tmp.tStockByDay, tmp.tItems; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/itemShelving_inventory.sql b/db/routines/vn/procedures/itemShelving_inventory.sql index f4b8ae165..f9999467d 100644 --- a/db/routines/vn/procedures/itemShelving_inventory.sql +++ b/db/routines/vn/procedures/itemShelving_inventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) BEGIN /** * Devuelve un listado de ubicaciones a revisar diff --git a/db/routines/vn/procedures/itemShelving_selfConsumption.sql b/db/routines/vn/procedures/itemShelving_selfConsumption.sql index c974d9903..8d7319e44 100644 --- a/db/routines/vn/procedures/itemShelving_selfConsumption.sql +++ b/db/routines/vn/procedures/itemShelving_selfConsumption.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`( vShelvingFk VARCHAR(10) COLLATE utf8_general_ci, vItemFk INT, vQuantity INT diff --git a/db/routines/vn/procedures/itemShelving_transfer.sql b/db/routines/vn/procedures/itemShelving_transfer.sql index 47a9a7cf0..f2717ac20 100644 --- a/db/routines/vn/procedures/itemShelving_transfer.sql +++ b/db/routines/vn/procedures/itemShelving_transfer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`( vItemShelvingFk INT, vShelvingFk VARCHAR(10) ) diff --git a/db/routines/vn/procedures/itemShelving_update.sql b/db/routines/vn/procedures/itemShelving_update.sql index 079add704..1931afe0f 100644 --- a/db/routines/vn/procedures/itemShelving_update.sql +++ b/db/routines/vn/procedures/itemShelving_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) BEGIN /** * Actualiza itemShelving. diff --git a/db/routines/vn/procedures/itemTagMake.sql b/db/routines/vn/procedures/itemTagMake.sql index 6d34ecb78..7ee39716d 100644 --- a/db/routines/vn/procedures/itemTagMake.sql +++ b/db/routines/vn/procedures/itemTagMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTagMake`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagMake`(vItemFk INT) BEGIN /* * Crea los tags usando la tabla plantilla itemTag diff --git a/db/routines/vn/procedures/itemTagReorder.sql b/db/routines/vn/procedures/itemTagReorder.sql index bba3cfe03..d6177c67d 100644 --- a/db/routines/vn/procedures/itemTagReorder.sql +++ b/db/routines/vn/procedures/itemTagReorder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTagReorder`(itemTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagReorder`(itemTypeFk INT) BEGIN SET @isTriggerDisabled = TRUE; diff --git a/db/routines/vn/procedures/itemTagReorderByName.sql b/db/routines/vn/procedures/itemTagReorderByName.sql index 89dc92740..ed490d8e8 100644 --- a/db/routines/vn/procedures/itemTagReorderByName.sql +++ b/db/routines/vn/procedures/itemTagReorderByName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTagReorderByName`(vName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagReorderByName`(vName VARCHAR(255)) BEGIN SET @isTriggerDisabled = TRUE; diff --git a/db/routines/vn/procedures/itemTag_replace.sql b/db/routines/vn/procedures/itemTag_replace.sql index b32285072..631abe6ea 100644 --- a/db/routines/vn/procedures/itemTag_replace.sql +++ b/db/routines/vn/procedures/itemTag_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100)) BEGIN /* Reemplaza los tags de un artículo por los de otro, así como su imagen diff --git a/db/routines/vn/procedures/itemTopSeller.sql b/db/routines/vn/procedures/itemTopSeller.sql index f42cf67cf..6537a65c3 100644 --- a/db/routines/vn/procedures/itemTopSeller.sql +++ b/db/routines/vn/procedures/itemTopSeller.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTopSeller`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTopSeller`() BEGIN DECLARE vCategoryFk INTEGER; DECLARE vDone INT DEFAULT FALSE; diff --git a/db/routines/vn/procedures/itemUpdateTag.sql b/db/routines/vn/procedures/itemUpdateTag.sql index 59529e2b0..ce88a24fb 100644 --- a/db/routines/vn/procedures/itemUpdateTag.sql +++ b/db/routines/vn/procedures/itemUpdateTag.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemUpdateTag`(IN vItem BIGINT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemUpdateTag`(IN vItem BIGINT) BEGIN diff --git a/db/routines/vn/procedures/item_calcVisible.sql b/db/routines/vn/procedures/item_calcVisible.sql index 820e73a7e..06541b614 100644 --- a/db/routines/vn/procedures/item_calcVisible.sql +++ b/db/routines/vn/procedures/item_calcVisible.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_calcVisible`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_calcVisible`( vSelf INT, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/item_cleanFloramondo.sql b/db/routines/vn/procedures/item_cleanFloramondo.sql index 080c61b5b..547c3b9d9 100644 --- a/db/routines/vn/procedures/item_cleanFloramondo.sql +++ b/db/routines/vn/procedures/item_cleanFloramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_cleanFloramondo`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_cleanFloramondo`() BEGIN /** * Elimina todos los items repetidos de floramondo diff --git a/db/routines/vn/procedures/item_comparative.sql b/db/routines/vn/procedures/item_comparative.sql index 2625a87a5..cd73eb4f6 100644 --- a/db/routines/vn/procedures/item_comparative.sql +++ b/db/routines/vn/procedures/item_comparative.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_comparative`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_comparative`( vDate DATETIME, vDayRange TINYINT, vWarehouseFk TINYINT, diff --git a/db/routines/vn/procedures/item_deactivateUnused.sql b/db/routines/vn/procedures/item_deactivateUnused.sql index 68a6b4978..cbb783aaf 100644 --- a/db/routines/vn/procedures/item_deactivateUnused.sql +++ b/db/routines/vn/procedures/item_deactivateUnused.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_deactivateUnused`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_deactivateUnused`() BEGIN /** * Cambia a false el campo isActive de la tabla vn.item para todos aquellos diff --git a/db/routines/vn/procedures/item_devalueA2.sql b/db/routines/vn/procedures/item_devalueA2.sql index 5b03fc872..a0188d019 100644 --- a/db/routines/vn/procedures/item_devalueA2.sql +++ b/db/routines/vn/procedures/item_devalueA2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_devalueA2`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_devalueA2`( vSelf INT, vShelvingFK VARCHAR(10), vBuyingValue DECIMAL(10,4), diff --git a/db/routines/vn/procedures/item_getAtp.sql b/db/routines/vn/procedures/item_getAtp.sql index 255e38867..4cff99635 100644 --- a/db/routines/vn/procedures/item_getAtp.sql +++ b/db/routines/vn/procedures/item_getAtp.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE) BEGIN /** * Calcula el valor mínimo acumulado para cada artículo ordenado por fecha y diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 0de59b478..683553500 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getBalance`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getBalance`( vItemFk INT, vWarehouseFk INT, vDated DATETIME diff --git a/db/routines/vn/procedures/item_getInfo.sql b/db/routines/vn/procedures/item_getInfo.sql index 50ab880a0..6411c2bb1 100644 --- a/db/routines/vn/procedures/item_getInfo.sql +++ b/db/routines/vn/procedures/item_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT) BEGIN /** * Devuelve información relativa al item correspondiente del vBarcode pasado diff --git a/db/routines/vn/procedures/item_getLack.sql b/db/routines/vn/procedures/item_getLack.sql index e0531e2ac..70e182a7c 100644 --- a/db/routines/vn/procedures/item_getLack.sql +++ b/db/routines/vn/procedures/item_getLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getLack`(IN vForce BOOLEAN, IN vDays INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getLack`(IN vForce BOOLEAN, IN vDays INT) BEGIN /** * Calcula una tabla con el máximo negativo visible para cada producto y almacen diff --git a/db/routines/vn/procedures/item_getMinETD.sql b/db/routines/vn/procedures/item_getMinETD.sql index 3876587fe..9ed112375 100644 --- a/db/routines/vn/procedures/item_getMinETD.sql +++ b/db/routines/vn/procedures/item_getMinETD.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getMinETD`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getMinETD`() BEGIN /* Devuelve una tabla temporal con la primera ETD, para todos los artículos con salida hoy. diff --git a/db/routines/vn/procedures/item_getMinacum.sql b/db/routines/vn/procedures/item_getMinacum.sql index a3ebedb12..6e880b2b9 100644 --- a/db/routines/vn/procedures/item_getMinacum.sql +++ b/db/routines/vn/procedures/item_getMinacum.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT) BEGIN /** * Cálculo del mínimo acumulado, para un item/almacén especificado, en caso de diff --git a/db/routines/vn/procedures/item_getSimilar.sql b/db/routines/vn/procedures/item_getSimilar.sql index 72c543b40..2bc0dae20 100644 --- a/db/routines/vn/procedures/item_getSimilar.sql +++ b/db/routines/vn/procedures/item_getSimilar.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getSimilar`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getSimilar`( vSelf INT, vWarehouseFk INT, vDated DATE, diff --git a/db/routines/vn/procedures/item_getStock.sql b/db/routines/vn/procedures/item_getStock.sql index c7df75ef2..3dc522312 100644 --- a/db/routines/vn/procedures/item_getStock.sql +++ b/db/routines/vn/procedures/item_getStock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getStock`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getStock`( vWarehouseFk SMALLINT, vDated DATE, vItemFk INT diff --git a/db/routines/vn/procedures/item_multipleBuy.sql b/db/routines/vn/procedures/item_multipleBuy.sql index ba49f8d36..4ff18a048 100644 --- a/db/routines/vn/procedures/item_multipleBuy.sql +++ b/db/routines/vn/procedures/item_multipleBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_multipleBuy`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_multipleBuy`( vDate DATETIME, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/item_multipleBuyByDate.sql b/db/routines/vn/procedures/item_multipleBuyByDate.sql index d508afca4..4b6f460b0 100644 --- a/db/routines/vn/procedures/item_multipleBuyByDate.sql +++ b/db/routines/vn/procedures/item_multipleBuyByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_multipleBuyByDate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_multipleBuyByDate`( vDated DATETIME, vWarehouseFk TINYINT(3) ) diff --git a/db/routines/vn/procedures/item_refreshFromTags.sql b/db/routines/vn/procedures/item_refreshFromTags.sql index 35f7c74e7..f74ee59ab 100644 --- a/db/routines/vn/procedures/item_refreshFromTags.sql +++ b/db/routines/vn/procedures/item_refreshFromTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_refreshFromTags`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_refreshFromTags`(vSelf INT) BEGIN /** * Updates item attributes with its corresponding tags. diff --git a/db/routines/vn/procedures/item_refreshTags.sql b/db/routines/vn/procedures/item_refreshTags.sql index 84ace0883..7e8279c55 100644 --- a/db/routines/vn/procedures/item_refreshTags.sql +++ b/db/routines/vn/procedures/item_refreshTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_refreshTags`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_refreshTags`() BEGIN /** * Update item table, tag "cache" fields diff --git a/db/routines/vn/procedures/item_saveReference.sql b/db/routines/vn/procedures/item_saveReference.sql index 52416b637..28cb70f01 100644 --- a/db/routines/vn/procedures/item_saveReference.sql +++ b/db/routines/vn/procedures/item_saveReference.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) BEGIN /** diff --git a/db/routines/vn/procedures/item_setGeneric.sql b/db/routines/vn/procedures/item_setGeneric.sql index 9a78b1349..b646fb592 100644 --- a/db/routines/vn/procedures/item_setGeneric.sql +++ b/db/routines/vn/procedures/item_setGeneric.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_setGeneric`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_setGeneric`(vSelf INT) BEGIN /** * Asigna el código genérico a un item, salvo que sea un código de item genérico. diff --git a/db/routines/vn/procedures/item_setVisibleDiscard.sql b/db/routines/vn/procedures/item_setVisibleDiscard.sql index a44d87333..7c9d24ad8 100644 --- a/db/routines/vn/procedures/item_setVisibleDiscard.sql +++ b/db/routines/vn/procedures/item_setVisibleDiscard.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_setVisibleDiscard`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_setVisibleDiscard`( vItemFk INT, vWarehouseFk INT, vQuantity INT, diff --git a/db/routines/vn/procedures/item_updatePackingType.sql b/db/routines/vn/procedures/item_updatePackingType.sql index 12a5e687b..86b437b0d 100644 --- a/db/routines/vn/procedures/item_updatePackingType.sql +++ b/db/routines/vn/procedures/item_updatePackingType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** * Update the packing type of an item diff --git a/db/routines/vn/procedures/item_valuateInventory.sql b/db/routines/vn/procedures/item_valuateInventory.sql index 18aefdf7b..2c2de1581 100644 --- a/db/routines/vn/procedures/item_valuateInventory.sql +++ b/db/routines/vn/procedures/item_valuateInventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_valuateInventory`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_valuateInventory`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/item_zoneClosure.sql b/db/routines/vn/procedures/item_zoneClosure.sql index c555e5df2..e50742a85 100644 --- a/db/routines/vn/procedures/item_zoneClosure.sql +++ b/db/routines/vn/procedures/item_zoneClosure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_zoneClosure`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_zoneClosure`() BEGIN /* Devuelve una tabla temporal con la hora minima de un ticket sino tiene el de la zoneClosure y diff --git a/db/routines/vn/procedures/ledger_doCompensation.sql b/db/routines/vn/procedures/ledger_doCompensation.sql index 391575bac..64efcc21b 100644 --- a/db/routines/vn/procedures/ledger_doCompensation.sql +++ b/db/routines/vn/procedures/ledger_doCompensation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`( vDated DATE, vCompensationAccount VARCHAR(10), vBankFk VARCHAR(10), diff --git a/db/routines/vn/procedures/ledger_next.sql b/db/routines/vn/procedures/ledger_next.sql index 0a390ab16..3e5a3c445 100644 --- a/db/routines/vn/procedures/ledger_next.sql +++ b/db/routines/vn/procedures/ledger_next.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_next`( IN vFiscalYear INT, OUT vLastBookEntry INT ) diff --git a/db/routines/vn/procedures/ledger_nextTx.sql b/db/routines/vn/procedures/ledger_nextTx.sql index 98c157676..ec6d73e8f 100644 --- a/db/routines/vn/procedures/ledger_nextTx.sql +++ b/db/routines/vn/procedures/ledger_nextTx.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_nextTx`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_nextTx`( IN vFiscalYear INT, OUT vLastBookEntry INT ) diff --git a/db/routines/vn/procedures/logShow.sql b/db/routines/vn/procedures/logShow.sql index 836d3b0c4..db525937b 100644 --- a/db/routines/vn/procedures/logShow.sql +++ b/db/routines/vn/procedures/logShow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`logShow`(vOriginFk INT, vEntity VARCHAR(45)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`logShow`(vOriginFk INT, vEntity VARCHAR(45)) BEGIN /** * Muestra las acciones realizadas por el usuario diff --git a/db/routines/vn/procedures/lungSize_generator.sql b/db/routines/vn/procedures/lungSize_generator.sql index e13e83650..91ffd29bc 100644 --- a/db/routines/vn/procedures/lungSize_generator.sql +++ b/db/routines/vn/procedures/lungSize_generator.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`lungSize_generator`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`lungSize_generator`(vDate DATE) BEGIN SET @buildingOrder := 0; diff --git a/db/routines/vn/procedures/machineWorker_add.sql b/db/routines/vn/procedures/machineWorker_add.sql index b2a7c7e19..6e4197f4d 100644 --- a/db/routines/vn/procedures/machineWorker_add.sql +++ b/db/routines/vn/procedures/machineWorker_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/machineWorker_getHistorical.sql b/db/routines/vn/procedures/machineWorker_getHistorical.sql index 47fcec5b6..72fa005ee 100644 --- a/db/routines/vn/procedures/machineWorker_getHistorical.sql +++ b/db/routines/vn/procedures/machineWorker_getHistorical.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) BEGIN /** * Obtiene historial de la matrícula vPlate que el trabajador vWorkerFk escanea, diff --git a/db/routines/vn/procedures/machineWorker_update.sql b/db/routines/vn/procedures/machineWorker_update.sql index 064aa8931..eed51c52c 100644 --- a/db/routines/vn/procedures/machineWorker_update.sql +++ b/db/routines/vn/procedures/machineWorker_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/machine_getWorkerPlate.sql b/db/routines/vn/procedures/machine_getWorkerPlate.sql index 4a50e0334..ea3e8d963 100644 --- a/db/routines/vn/procedures/machine_getWorkerPlate.sql +++ b/db/routines/vn/procedures/machine_getWorkerPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT) BEGIN /** * Selecciona la matrícula del vehículo del workerfk diff --git a/db/routines/vn/procedures/mail_insert.sql b/db/routines/vn/procedures/mail_insert.sql index 5c5c2e9fd..d290a1248 100644 --- a/db/routines/vn/procedures/mail_insert.sql +++ b/db/routines/vn/procedures/mail_insert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`mail_insert`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mail_insert`( vReceiver VARCHAR(255), vReplyTo VARCHAR(50), vSubject VARCHAR(100), diff --git a/db/routines/vn/procedures/makeNewItem.sql b/db/routines/vn/procedures/makeNewItem.sql index 5995f43b7..c96e12868 100644 --- a/db/routines/vn/procedures/makeNewItem.sql +++ b/db/routines/vn/procedures/makeNewItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`makeNewItem`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`makeNewItem`() BEGIN DECLARE newItemFk INT; diff --git a/db/routines/vn/procedures/makePCSGraf.sql b/db/routines/vn/procedures/makePCSGraf.sql index 31b4a42e7..96be6405d 100644 --- a/db/routines/vn/procedures/makePCSGraf.sql +++ b/db/routines/vn/procedures/makePCSGraf.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`makePCSGraf`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`makePCSGraf`(vDated DATE) BEGIN diff --git a/db/routines/vn/procedures/manaSpellersRequery.sql b/db/routines/vn/procedures/manaSpellersRequery.sql index 30b91b4f1..f127e8d2e 100644 --- a/db/routines/vn/procedures/manaSpellersRequery.sql +++ b/db/routines/vn/procedures/manaSpellersRequery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`manaSpellersRequery`(vWorkerFk INTEGER) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`manaSpellersRequery`(vWorkerFk INTEGER) `whole_proc`: BEGIN /** diff --git a/db/routines/vn/procedures/multipleInventory.sql b/db/routines/vn/procedures/multipleInventory.sql index 6cd584c6e..d81780593 100644 --- a/db/routines/vn/procedures/multipleInventory.sql +++ b/db/routines/vn/procedures/multipleInventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`multipleInventory`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`multipleInventory`( vDate DATE, vWarehouseFk TINYINT, vMaxDays TINYINT diff --git a/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql b/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql index 129b356f2..755316bab 100644 --- a/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql +++ b/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`mysqlConnectionsSorter_kill`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mysqlConnectionsSorter_kill`() BEGIN /** diff --git a/db/routines/vn/procedures/mysqlPreparedCount_check.sql b/db/routines/vn/procedures/mysqlPreparedCount_check.sql index b0c78946d..adb40db49 100644 --- a/db/routines/vn/procedures/mysqlPreparedCount_check.sql +++ b/db/routines/vn/procedures/mysqlPreparedCount_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`mysqlPreparedCount_check`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mysqlPreparedCount_check`() BEGIN DECLARE vPreparedCount INTEGER; diff --git a/db/routines/vn/procedures/nextShelvingCodeMake.sql b/db/routines/vn/procedures/nextShelvingCodeMake.sql index d76d6276b..865c86ec0 100644 --- a/db/routines/vn/procedures/nextShelvingCodeMake.sql +++ b/db/routines/vn/procedures/nextShelvingCodeMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`nextShelvingCodeMake`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`nextShelvingCodeMake`() BEGIN DECLARE newShelving VARCHAR(3); diff --git a/db/routines/vn/procedures/observationAdd.sql b/db/routines/vn/procedures/observationAdd.sql index 960cf0bfe..5d3a69385 100644 --- a/db/routines/vn/procedures/observationAdd.sql +++ b/db/routines/vn/procedures/observationAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) BEGIN /** * Guarda las observaciones realizadas por el usuario diff --git a/db/routines/vn/procedures/orderCreate.sql b/db/routines/vn/procedures/orderCreate.sql index 8f732dad6..9c4139f3e 100644 --- a/db/routines/vn/procedures/orderCreate.sql +++ b/db/routines/vn/procedures/orderCreate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`orderCreate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, diff --git a/db/routines/vn/procedures/orderDelete.sql b/db/routines/vn/procedures/orderDelete.sql index 4264191da..0b9cadaa3 100644 --- a/db/routines/vn/procedures/orderDelete.sql +++ b/db/routines/vn/procedures/orderDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`orderDelete`(IN vId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderDelete`(IN vId INT) BEGIN DELETE FROM hedera.`order` where id = vId; diff --git a/db/routines/vn/procedures/orderListCreate.sql b/db/routines/vn/procedures/orderListCreate.sql index 12396ea90..e489b23ea 100644 --- a/db/routines/vn/procedures/orderListCreate.sql +++ b/db/routines/vn/procedures/orderListCreate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`orderListCreate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderListCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, diff --git a/db/routines/vn/procedures/orderListVolume.sql b/db/routines/vn/procedures/orderListVolume.sql index 6eb641f83..de4690271 100644 --- a/db/routines/vn/procedures/orderListVolume.sql +++ b/db/routines/vn/procedures/orderListVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`orderListVolume`(IN vOrderId INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderListVolume`(IN vOrderId INT) BEGIN SELECT diff --git a/db/routines/vn/procedures/packingListSwitch.sql b/db/routines/vn/procedures/packingListSwitch.sql index 0883a7b6d..c426b83be 100644 --- a/db/routines/vn/procedures/packingListSwitch.sql +++ b/db/routines/vn/procedures/packingListSwitch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`packingListSwitch`(saleFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`packingListSwitch`(saleFk INT) BEGIN DECLARE valueFk INT; diff --git a/db/routines/vn/procedures/packingSite_startCollection.sql b/db/routines/vn/procedures/packingSite_startCollection.sql index 53edd89f1..c8939bf03 100644 --- a/db/routines/vn/procedures/packingSite_startCollection.sql +++ b/db/routines/vn/procedures/packingSite_startCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`packingSite_startCollection`(vSelf INT, vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`packingSite_startCollection`(vSelf INT, vTicketFk INT) proc: BEGIN /** * @param vSelf packingSite id diff --git a/db/routines/vn/procedures/parking_add.sql b/db/routines/vn/procedures/parking_add.sql index 17772424e..0fed6e1a6 100644 --- a/db/routines/vn/procedures/parking_add.sql +++ b/db/routines/vn/procedures/parking_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) BEGIN DECLARE vColumn INT; diff --git a/db/routines/vn/procedures/parking_algemesi.sql b/db/routines/vn/procedures/parking_algemesi.sql index 6ea13193d..004f26a86 100644 --- a/db/routines/vn/procedures/parking_algemesi.sql +++ b/db/routines/vn/procedures/parking_algemesi.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) BEGIN DECLARE vRow INT; diff --git a/db/routines/vn/procedures/parking_new.sql b/db/routines/vn/procedures/parking_new.sql index 327e3a4b0..b98216a2e 100644 --- a/db/routines/vn/procedures/parking_new.sql +++ b/db/routines/vn/procedures/parking_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`parking_new`(vStart INT, vEnd INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_new`(vStart INT, vEnd INT, vSectorFk INT) BEGIN DECLARE vRow INT; diff --git a/db/routines/vn/procedures/parking_setOrder.sql b/db/routines/vn/procedures/parking_setOrder.sql index 241f855f7..7ef8522e2 100644 --- a/db/routines/vn/procedures/parking_setOrder.sql +++ b/db/routines/vn/procedures/parking_setOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`parking_setOrder`(vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_setOrder`(vWarehouseFk INT) BEGIN /* diff --git a/db/routines/vn/procedures/payment_add.sql b/db/routines/vn/procedures/payment_add.sql index 061a75848..18e8834d1 100644 --- a/db/routines/vn/procedures/payment_add.sql +++ b/db/routines/vn/procedures/payment_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`payment_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`payment_add`( vDated DATE, vSupplierFk INT, vAmount DOUBLE, diff --git a/db/routines/vn/procedures/prepareClientList.sql b/db/routines/vn/procedures/prepareClientList.sql index 486152fd6..457ca4496 100644 --- a/db/routines/vn/procedures/prepareClientList.sql +++ b/db/routines/vn/procedures/prepareClientList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`prepareClientList`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`prepareClientList`() BEGIN /* diff --git a/db/routines/vn/procedures/prepareTicketList.sql b/db/routines/vn/procedures/prepareTicketList.sql index 29c95cc9f..864d65ddc 100644 --- a/db/routines/vn/procedures/prepareTicketList.sql +++ b/db/routines/vn/procedures/prepareTicketList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.productionTicket; CREATE TEMPORARY TABLE tmp.productionTicket diff --git a/db/routines/vn/procedures/previousSticker_get.sql b/db/routines/vn/procedures/previousSticker_get.sql index 05f7de250..9cdd3a488 100644 --- a/db/routines/vn/procedures/previousSticker_get.sql +++ b/db/routines/vn/procedures/previousSticker_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`previousSticker_get`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`previousSticker_get`(vSaleGroupFk INT) BEGIN /** * Devuelve los campos a imprimir en una etiqueta de preparación previa. diff --git a/db/routines/vn/procedures/printer_checkSector.sql b/db/routines/vn/procedures/printer_checkSector.sql index 40728a81a..91323a6d8 100644 --- a/db/routines/vn/procedures/printer_checkSector.sql +++ b/db/routines/vn/procedures/printer_checkSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) BEGIN /** * Comprueba si la impresora pertenece al sector diff --git a/db/routines/vn/procedures/productionControl.sql b/db/routines/vn/procedures/productionControl.sql index dad46393d..6777a8780 100644 --- a/db/routines/vn/procedures/productionControl.sql +++ b/db/routines/vn/procedures/productionControl.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionControl`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionControl`( vWarehouseFk INT, vScopeDays INT ) diff --git a/db/routines/vn/procedures/productionError_add.sql b/db/routines/vn/procedures/productionError_add.sql index e29accac9..23d9f0436 100644 --- a/db/routines/vn/procedures/productionError_add.sql +++ b/db/routines/vn/procedures/productionError_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionError_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionError_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/productionError_addCheckerPackager.sql b/db/routines/vn/procedures/productionError_addCheckerPackager.sql index dd75f797b..408fe8f82 100644 --- a/db/routines/vn/procedures/productionError_addCheckerPackager.sql +++ b/db/routines/vn/procedures/productionError_addCheckerPackager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionError_addCheckerPackager`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionError_addCheckerPackager`( vDatedFrom DATETIME, vDatedTo DATETIME, vRol VARCHAR(50)) diff --git a/db/routines/vn/procedures/productionSectorList.sql b/db/routines/vn/procedures/productionSectorList.sql index e1445ca52..f104fb916 100644 --- a/db/routines/vn/procedures/productionSectorList.sql +++ b/db/routines/vn/procedures/productionSectorList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionSectorList`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionSectorList`(vSectorFk INT) BEGIN /** * Devuelve el listado de sale que se puede preparar en previa para ese sector diff --git a/db/routines/vn/procedures/raidUpdate.sql b/db/routines/vn/procedures/raidUpdate.sql index 703c14e5c..1f0f6e429 100644 --- a/db/routines/vn/procedures/raidUpdate.sql +++ b/db/routines/vn/procedures/raidUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`raidUpdate`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`raidUpdate`() BEGIN /** * Actualiza el travel de las entradas de redadas diff --git a/db/routines/vn/procedures/rangeDateInfo.sql b/db/routines/vn/procedures/rangeDateInfo.sql index 502248686..0ce85efbe 100644 --- a/db/routines/vn/procedures/rangeDateInfo.sql +++ b/db/routines/vn/procedures/rangeDateInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`rangeDateInfo`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rangeDateInfo`(vStarted DATE, vEnded DATE) BEGIN /** * Crea una tabla temporal con las fechas diff --git a/db/routines/vn/procedures/rateView.sql b/db/routines/vn/procedures/rateView.sql index d840aa9d5..e0cef4bb8 100644 --- a/db/routines/vn/procedures/rateView.sql +++ b/db/routines/vn/procedures/rateView.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`rateView`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rateView`() BEGIN /** * Muestra información sobre tasas de cambio de Dolares diff --git a/db/routines/vn/procedures/rate_getPrices.sql b/db/routines/vn/procedures/rate_getPrices.sql index c82ad918e..73051866a 100644 --- a/db/routines/vn/procedures/rate_getPrices.sql +++ b/db/routines/vn/procedures/rate_getPrices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`rate_getPrices`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rate_getPrices`( vDated DATE, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/recipe_Plaster.sql b/db/routines/vn/procedures/recipe_Plaster.sql index 18fdf55c8..6554bf781 100644 --- a/db/routines/vn/procedures/recipe_Plaster.sql +++ b/db/routines/vn/procedures/recipe_Plaster.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) BEGIN DECLARE vLastCost DECIMAL(10,2); diff --git a/db/routines/vn/procedures/remittance_calc.sql b/db/routines/vn/procedures/remittance_calc.sql index ed0a18662..0eab43d68 100644 --- a/db/routines/vn/procedures/remittance_calc.sql +++ b/db/routines/vn/procedures/remittance_calc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`remittance_calc`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`remittance_calc`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/reportLabelCollection_get.sql b/db/routines/vn/procedures/reportLabelCollection_get.sql index f3bcbfa28..dcb899ac3 100644 --- a/db/routines/vn/procedures/reportLabelCollection_get.sql +++ b/db/routines/vn/procedures/reportLabelCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`reportLabelCollection_get`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`reportLabelCollection_get`( vParam INT, vLabelCount INT ) diff --git a/db/routines/vn/procedures/report_print.sql b/db/routines/vn/procedures/report_print.sql index 5d399dedf..9c8192d75 100644 --- a/db/routines/vn/procedures/report_print.sql +++ b/db/routines/vn/procedures/report_print.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`report_print`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`report_print`( vReportName VARCHAR(100), vPrinterFk INT, vUserFk INT, diff --git a/db/routines/vn/procedures/routeGuessPriority.sql b/db/routines/vn/procedures/routeGuessPriority.sql index 7208fcbcf..b626721a7 100644 --- a/db/routines/vn/procedures/routeGuessPriority.sql +++ b/db/routines/vn/procedures/routeGuessPriority.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`routeGuessPriority`(IN vRuta INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeGuessPriority`(IN vRuta INT) BEGIN /* Usa los valores del ultimo año para adivinar el orden de los tickets en la ruta * vRuta id ruta diff --git a/db/routines/vn/procedures/routeInfo.sql b/db/routines/vn/procedures/routeInfo.sql index 1f25b1429..a8f124da0 100644 --- a/db/routines/vn/procedures/routeInfo.sql +++ b/db/routines/vn/procedures/routeInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`routeInfo`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeInfo`(vRouteFk INT) BEGIN DECLARE vPackages INT; diff --git a/db/routines/vn/procedures/routeMonitor_calculate.sql b/db/routines/vn/procedures/routeMonitor_calculate.sql index 463c176ff..1a21b63cc 100644 --- a/db/routines/vn/procedures/routeMonitor_calculate.sql +++ b/db/routines/vn/procedures/routeMonitor_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`routeMonitor_calculate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeMonitor_calculate`( vDate DATE, vDaysAgo INT ) diff --git a/db/routines/vn/procedures/routeSetOk.sql b/db/routines/vn/procedures/routeSetOk.sql index 86b32fe7b..419697956 100644 --- a/db/routines/vn/procedures/routeSetOk.sql +++ b/db/routines/vn/procedures/routeSetOk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`routeSetOk`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeSetOk`( vRouteFk INT) BEGIN diff --git a/db/routines/vn/procedures/routeUpdateM3.sql b/db/routines/vn/procedures/routeUpdateM3.sql index 7dbf5a194..2d21b5a8f 100644 --- a/db/routines/vn/procedures/routeUpdateM3.sql +++ b/db/routines/vn/procedures/routeUpdateM3.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`routeUpdateM3`(vRoute INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeUpdateM3`(vRoute INT) BEGIN /** * @deprecated Use vn.route_updateM3() diff --git a/db/routines/vn/procedures/route_calcCommission.sql b/db/routines/vn/procedures/route_calcCommission.sql index 63f702bee..70e6a5cba 100644 --- a/db/routines/vn/procedures/route_calcCommission.sql +++ b/db/routines/vn/procedures/route_calcCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`route_calcCommission`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_calcCommission`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/route_doRecalc.sql b/db/routines/vn/procedures/route_doRecalc.sql index 365796f7e..7698d9576 100644 --- a/db/routines/vn/procedures/route_doRecalc.sql +++ b/db/routines/vn/procedures/route_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`route_doRecalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_doRecalc`() proc: BEGIN /** * Recalculates modified route. diff --git a/db/routines/vn/procedures/route_getTickets.sql b/db/routines/vn/procedures/route_getTickets.sql index 55b08208f..48a482121 100644 --- a/db/routines/vn/procedures/route_getTickets.sql +++ b/db/routines/vn/procedures/route_getTickets.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`route_getTickets`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_getTickets`(vRouteFk INT) BEGIN /** * Pasado un RouteFk devuelve la información diff --git a/db/routines/vn/procedures/route_updateM3.sql b/db/routines/vn/procedures/route_updateM3.sql index 98fdae5dd..e55671c71 100644 --- a/db/routines/vn/procedures/route_updateM3.sql +++ b/db/routines/vn/procedures/route_updateM3.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`route_updateM3`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_updateM3`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/saleBuy_Add.sql b/db/routines/vn/procedures/saleBuy_Add.sql index 2f689ad2a..1ff9b518f 100644 --- a/db/routines/vn/procedures/saleBuy_Add.sql +++ b/db/routines/vn/procedures/saleBuy_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleBuy_Add`(vSaleFk INT, vBuyFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleBuy_Add`(vSaleFk INT, vBuyFk INT) BEGIN /* Añade un registro a la tabla saleBuy en el caso de que sea posible mantener la trazabilidad diff --git a/db/routines/vn/procedures/saleGroup_add.sql b/db/routines/vn/procedures/saleGroup_add.sql index 63e3bdedd..0023214ee 100644 --- a/db/routines/vn/procedures/saleGroup_add.sql +++ b/db/routines/vn/procedures/saleGroup_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleGroup_add`(vSectorFk INT,vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleGroup_add`(vSectorFk INT,vTicketFk INT) BEGIN /** * Añade un nuevo registro a la tabla y devuelve su id. diff --git a/db/routines/vn/procedures/saleGroup_setParking.sql b/db/routines/vn/procedures/saleGroup_setParking.sql index 551ca6386..58c0e77ee 100644 --- a/db/routines/vn/procedures/saleGroup_setParking.sql +++ b/db/routines/vn/procedures/saleGroup_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`( vSaleGroupFk VARCHAR(8), vParkingFk INT ) diff --git a/db/routines/vn/procedures/saleMistake_Add.sql b/db/routines/vn/procedures/saleMistake_Add.sql index cc174993e..9334080d2 100644 --- a/db/routines/vn/procedures/saleMistake_Add.sql +++ b/db/routines/vn/procedures/saleMistake_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) BEGIN INSERT INTO vn.saleMistake(saleFk, userFk, typeFk) diff --git a/db/routines/vn/procedures/salePreparingList.sql b/db/routines/vn/procedures/salePreparingList.sql index ae3a267f3..ed22aba69 100644 --- a/db/routines/vn/procedures/salePreparingList.sql +++ b/db/routines/vn/procedures/salePreparingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`salePreparingList`(IN vTicketFk BIGINT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`salePreparingList`(IN vTicketFk BIGINT) BEGIN /** * Devuelve un listado con las lineas de vn.sale y los distintos estados de prepacion diff --git a/db/routines/vn/procedures/saleSplit.sql b/db/routines/vn/procedures/saleSplit.sql index dab78d811..1db171fef 100644 --- a/db/routines/vn/procedures/saleSplit.sql +++ b/db/routines/vn/procedures/saleSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleSplit`(vSaleFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleSplit`(vSaleFk INT, vQuantity INT) BEGIN diff --git a/db/routines/vn/procedures/saleTracking_add.sql b/db/routines/vn/procedures/saleTracking_add.sql index dc347b0e3..e0c20c1eb 100644 --- a/db/routines/vn/procedures/saleTracking_add.sql +++ b/db/routines/vn/procedures/saleTracking_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_add`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_add`(vSaleGroupFk INT) BEGIN /** Inserta en vn.saleTracking las lineas de una previa * diff --git a/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql b/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql index b9475433c..4856749a6 100644 --- a/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql +++ b/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) BEGIN /** * Inserta lineas de vn.saleTracking para un saleGroup (previa) que escanea un sacador diff --git a/db/routines/vn/procedures/saleTracking_addPrevOK.sql b/db/routines/vn/procedures/saleTracking_addPrevOK.sql index 84cea965f..df4ae7c15 100644 --- a/db/routines/vn/procedures/saleTracking_addPrevOK.sql +++ b/db/routines/vn/procedures/saleTracking_addPrevOK.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_addPrevOK`(vSectorCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_addPrevOK`(vSectorCollectionFk INT) BEGIN /** * Inserta los registros de la colección de sector con el estado PREVIA OK diff --git a/db/routines/vn/procedures/saleTracking_del.sql b/db/routines/vn/procedures/saleTracking_del.sql index 263bd68a1..0f50ade6c 100644 --- a/db/routines/vn/procedures/saleTracking_del.sql +++ b/db/routines/vn/procedures/saleTracking_del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) BEGIN DELETE FROM itemShelvingSale diff --git a/db/routines/vn/procedures/saleTracking_new.sql b/db/routines/vn/procedures/saleTracking_new.sql index 5982f8df0..2f0101308 100644 --- a/db/routines/vn/procedures/saleTracking_new.sql +++ b/db/routines/vn/procedures/saleTracking_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_new`( vSaleFK INT, vIsChecked BOOLEAN, vOriginalQuantity INT, diff --git a/db/routines/vn/procedures/saleTracking_updateIsChecked.sql b/db/routines/vn/procedures/saleTracking_updateIsChecked.sql index 57d8df701..fdb28ef42 100644 --- a/db/routines/vn/procedures/saleTracking_updateIsChecked.sql +++ b/db/routines/vn/procedures/saleTracking_updateIsChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) BEGIN /** diff --git a/db/routines/vn/procedures/sale_PriceFix.sql b/db/routines/vn/procedures/sale_PriceFix.sql index 5f956cba8..57db40540 100644 --- a/db/routines/vn/procedures/sale_PriceFix.sql +++ b/db/routines/vn/procedures/sale_PriceFix.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_PriceFix`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_PriceFix`(vTicketFk INT) BEGIN DELETE sc.* diff --git a/db/routines/vn/procedures/sale_boxPickingPrint.sql b/db/routines/vn/procedures/sale_boxPickingPrint.sql index dbb3b6c14..df9afe9ad 100644 --- a/db/routines/vn/procedures/sale_boxPickingPrint.sql +++ b/db/routines/vn/procedures/sale_boxPickingPrint.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.sale_boxPickingPrint( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE vn.sale_boxPickingPrint( IN vPrinterFk INT, IN vSaleFk INT, IN vPacking INT, diff --git a/db/routines/vn/procedures/sale_calculateComponent.sql b/db/routines/vn/procedures/sale_calculateComponent.sql index 63786c75c..d302fb8d6 100644 --- a/db/routines/vn/procedures/sale_calculateComponent.sql +++ b/db/routines/vn/procedures/sale_calculateComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_calculateComponent`(vSelf INT, vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_calculateComponent`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** * Crea tabla temporal para vn.sale_recalcComponent() para recalcular los componentes diff --git a/db/routines/vn/procedures/sale_getBoxPickingList.sql b/db/routines/vn/procedures/sale_getBoxPickingList.sql index a95ed5b0c..fdedee774 100644 --- a/db/routines/vn/procedures/sale_getBoxPickingList.sql +++ b/db/routines/vn/procedures/sale_getBoxPickingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getBoxPickingList`(vSectorFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getBoxPickingList`(vSectorFk INT, vDated DATE) BEGIN /** * Returns a suitable boxPicking sales list diff --git a/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql b/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql index 5308bdd28..94e601ec5 100644 --- a/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql +++ b/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getFromTicketOrCollection`(vParam INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getFromTicketOrCollection`(vParam INT) BEGIN /** * Visualizar lineas de la tabla sale a través del parámetro vParam que puede diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index ba4ff5857..339e6c65f 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1)) BEGIN /** * Calcula los problemas de cada venta para un conjunto de tickets. diff --git a/db/routines/vn/procedures/sale_getProblemsByTicket.sql b/db/routines/vn/procedures/sale_getProblemsByTicket.sql index b4aaad7de..3cb004895 100644 --- a/db/routines/vn/procedures/sale_getProblemsByTicket.sql +++ b/db/routines/vn/procedures/sale_getProblemsByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) BEGIN /** * Calcula los problemas de cada venta diff --git a/db/routines/vn/procedures/sale_recalcComponent.sql b/db/routines/vn/procedures/sale_recalcComponent.sql index 54297571a..99c191b12 100644 --- a/db/routines/vn/procedures/sale_recalcComponent.sql +++ b/db/routines/vn/procedures/sale_recalcComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_recalcComponent`(vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_recalcComponent`(vOption VARCHAR(25)) proc: BEGIN /** * Este procedimiento recalcula los componentes de un conjunto de sales, diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index a4aefc088..6366e6633 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) BEGIN /** * Añade un nuevo articulo para sustituir a otro, y actualiza la memoria de sustituciones. diff --git a/db/routines/vn/procedures/sale_setProblem.sql b/db/routines/vn/procedures/sale_setProblem.sql index b0870089f..f92caa396 100644 --- a/db/routines/vn/procedures/sale_setProblem.sql +++ b/db/routines/vn/procedures/sale_setProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblem`( vProblemCode VARCHAR(25) ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemComponentLack.sql b/db/routines/vn/procedures/sale_setProblemComponentLack.sql index aa5f5f1be..caf4312a1 100644 --- a/db/routines/vn/procedures/sale_setProblemComponentLack.sql +++ b/db/routines/vn/procedures/sale_setProblemComponentLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLack`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLack`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql b/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql index 2ee49b656..cd582749b 100644 --- a/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql +++ b/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLackByComponent`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLackByComponent`( vComponentFk INT ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemRounding.sql b/db/routines/vn/procedures/sale_setProblemRounding.sql index f58d00799..19a8cb7bc 100644 --- a/db/routines/vn/procedures/sale_setProblemRounding.sql +++ b/db/routines/vn/procedures/sale_setProblemRounding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRounding`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemRounding`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/sales_merge.sql b/db/routines/vn/procedures/sales_merge.sql index 3dd01f9bc..86874e2c2 100644 --- a/db/routines/vn/procedures/sales_merge.sql +++ b/db/routines/vn/procedures/sales_merge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/vn/procedures/sales_mergeByCollection.sql b/db/routines/vn/procedures/sales_mergeByCollection.sql index 4c0693753..0560ec733 100644 --- a/db/routines/vn/procedures/sales_mergeByCollection.sql +++ b/db/routines/vn/procedures/sales_mergeByCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sales_mergeByCollection`(vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sales_mergeByCollection`(vCollectionFk INT) BEGIN DECLARE vDone BOOL; diff --git a/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql b/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql index 5ffb30635..31ba38913 100644 --- a/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql +++ b/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) BEGIN /** * Inserta un nuevo registro en vn.sectorCollectionSaleGroup diff --git a/db/routines/vn/procedures/sectorCollection_get.sql b/db/routines/vn/procedures/sectorCollection_get.sql index e518e05f8..c8eb21145 100644 --- a/db/routines/vn/procedures/sectorCollection_get.sql +++ b/db/routines/vn/procedures/sectorCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollection_get`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_get`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas diff --git a/db/routines/vn/procedures/sectorCollection_getMyPartial.sql b/db/routines/vn/procedures/sectorCollection_getMyPartial.sql index 21f26770a..afc82505a 100644 --- a/db/routines/vn/procedures/sectorCollection_getMyPartial.sql +++ b/db/routines/vn/procedures/sectorCollection_getMyPartial.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollection_getMyPartial`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_getMyPartial`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas diff --git a/db/routines/vn/procedures/sectorCollection_getSale.sql b/db/routines/vn/procedures/sectorCollection_getSale.sql index e1636895b..360b5e95a 100644 --- a/db/routines/vn/procedures/sectorCollection_getSale.sql +++ b/db/routines/vn/procedures/sectorCollection_getSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollection_getSale`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_getSale`(vSelf INT) BEGIN /** * Devuelve las lineas de venta correspondientes a esa coleccion de sector diff --git a/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql b/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql index acb460190..2304bff47 100644 --- a/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql +++ b/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION vn.sectorCollection_hasSalesReserved(vSelf INT) RETURNS tinyint(1) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION vn.sectorCollection_hasSalesReserved(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** diff --git a/db/routines/vn/procedures/sectorCollection_new.sql b/db/routines/vn/procedures/sectorCollection_new.sql index fae8eba31..b67d355f1 100644 --- a/db/routines/vn/procedures/sectorCollection_new.sql +++ b/db/routines/vn/procedures/sectorCollection_new.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollection_new`(vSectorFk INT) +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_new`(vSectorFk INT) BEGIN /** * Inserta una nueva colección, si el usuario no tiene ninguna vacia. @@ -24,5 +24,5 @@ BEGIN INSERT INTO vn.sectorCollection(userFk, sectorFk) VALUES(vUserFk, vSectorFk); END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/sectorProductivity_add.sql b/db/routines/vn/procedures/sectorProductivity_add.sql index be75c842d..ea5f1b316 100644 --- a/db/routines/vn/procedures/sectorProductivity_add.sql +++ b/db/routines/vn/procedures/sectorProductivity_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorProductivity_add`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorProductivity_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/sector_getWarehouse.sql b/db/routines/vn/procedures/sector_getWarehouse.sql index fe363f39f..4177e3d26 100644 --- a/db/routines/vn/procedures/sector_getWarehouse.sql +++ b/db/routines/vn/procedures/sector_getWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sector_getWarehouse`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sector_getWarehouse`(vSectorFk INT) BEGIN SELECT s.warehouseFk diff --git a/db/routines/vn/procedures/setParking.sql b/db/routines/vn/procedures/setParking.sql index 1aa4f920a..1b090fbbb 100644 --- a/db/routines/vn/procedures/setParking.sql +++ b/db/routines/vn/procedures/setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`setParking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`setParking`( vParam VARCHAR(8), vParkingCode VARCHAR(8) ) diff --git a/db/routines/vn/procedures/shelvingChange.sql b/db/routines/vn/procedures/shelvingChange.sql index fde38212c..8dd71255e 100644 --- a/db/routines/vn/procedures/shelvingChange.sql +++ b/db/routines/vn/procedures/shelvingChange.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) BEGIN UPDATE vn.itemShelving diff --git a/db/routines/vn/procedures/shelvingLog_get.sql b/db/routines/vn/procedures/shelvingLog_get.sql index d48e38d03..2d662c502 100644 --- a/db/routines/vn/procedures/shelvingLog_get.sql +++ b/db/routines/vn/procedures/shelvingLog_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelvingLog_get`(shelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingLog_get`(shelvingFk VARCHAR(10)) BEGIN /* Lista el log de un carro diff --git a/db/routines/vn/procedures/shelvingParking_get.sql b/db/routines/vn/procedures/shelvingParking_get.sql index 0131db7d2..5e4aa19ec 100644 --- a/db/routines/vn/procedures/shelvingParking_get.sql +++ b/db/routines/vn/procedures/shelvingParking_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) BEGIN diff --git a/db/routines/vn/procedures/shelvingPriority_update.sql b/db/routines/vn/procedures/shelvingPriority_update.sql index 317f17333..8414ae2a4 100644 --- a/db/routines/vn/procedures/shelvingPriority_update.sql +++ b/db/routines/vn/procedures/shelvingPriority_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) BEGIN UPDATE vn.shelving SET priority = priority WHERE code=vShelvingFk COLLATE utf8_unicode_ci; diff --git a/db/routines/vn/procedures/shelving_clean.sql b/db/routines/vn/procedures/shelving_clean.sql index f9248a0d7..a648bec99 100644 --- a/db/routines/vn/procedures/shelving_clean.sql +++ b/db/routines/vn/procedures/shelving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_clean`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_clean`() BEGIN DELETE FROM shelving diff --git a/db/routines/vn/procedures/shelving_getSpam.sql b/db/routines/vn/procedures/shelving_getSpam.sql index 2895470ad..ea3552e98 100644 --- a/db/routines/vn/procedures/shelving_getSpam.sql +++ b/db/routines/vn/procedures/shelving_getSpam.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_getSpam`(vDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_getSpam`(vDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve las matrículas con productos que no son necesarios para la venta diff --git a/db/routines/vn/procedures/shelving_setParking.sql b/db/routines/vn/procedures/shelving_setParking.sql index 0ff07ef5d..1cdd70383 100644 --- a/db/routines/vn/procedures/shelving_setParking.sql +++ b/db/routines/vn/procedures/shelving_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT) proc: BEGIN /** * Aparca una matrícula en un parking diff --git a/db/routines/vn/procedures/sleep_X_min.sql b/db/routines/vn/procedures/sleep_X_min.sql index 39102b57d..688895ab9 100644 --- a/db/routines/vn/procedures/sleep_X_min.sql +++ b/db/routines/vn/procedures/sleep_X_min.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sleep_X_min`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sleep_X_min`() BEGIN # Ernesto. 4.8.2020 # Para su uso en las tareas ejecutadas a las 2AM (visibles con: SELECT * FROM bs.nightTask order by started asc;) diff --git a/db/routines/vn/procedures/stockBuyedByWorker.sql b/db/routines/vn/procedures/stockBuyedByWorker.sql index 730612db8..ef532a193 100644 --- a/db/routines/vn/procedures/stockBuyedByWorker.sql +++ b/db/routines/vn/procedures/stockBuyedByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`( vDated DATE, vWorker INT ) diff --git a/db/routines/vn/procedures/stockBuyed_add.sql b/db/routines/vn/procedures/stockBuyed_add.sql index 1fff1484c..572b15204 100644 --- a/db/routines/vn/procedures/stockBuyed_add.sql +++ b/db/routines/vn/procedures/stockBuyed_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`stockBuyed_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockBuyed_add`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/stockTraslation.sql b/db/routines/vn/procedures/stockTraslation.sql index c681112f1..d0d67df08 100644 --- a/db/routines/vn/procedures/stockTraslation.sql +++ b/db/routines/vn/procedures/stockTraslation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`stockTraslation`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockTraslation`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/subordinateGetList.sql b/db/routines/vn/procedures/subordinateGetList.sql index 0431afaa4..82b3f157d 100644 --- a/db/routines/vn/procedures/subordinateGetList.sql +++ b/db/routines/vn/procedures/subordinateGetList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`subordinateGetList`(vBossFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`subordinateGetList`(vBossFk INT) BEGIN -- deprecated usar vn.worker_GetHierarch diff --git a/db/routines/vn/procedures/supplierExpenses.sql b/db/routines/vn/procedures/supplierExpenses.sql index 11ebbd603..687845da0 100644 --- a/db/routines/vn/procedures/supplierExpenses.sql +++ b/db/routines/vn/procedures/supplierExpenses.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierExpenses`(vEnded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplierExpenses`(vEnded DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS openingBalance; diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index 63285203b..84dd11b33 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( vFromDated DATE, vSupplierFk INT ) diff --git a/db/routines/vn/procedures/supplier_checkBalance.sql b/db/routines/vn/procedures/supplier_checkBalance.sql index 04c513927..1b224d351 100644 --- a/db/routines/vn/procedures/supplier_checkBalance.sql +++ b/db/routines/vn/procedures/supplier_checkBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros proveedores con diff --git a/db/routines/vn/procedures/supplier_checkIsActive.sql b/db/routines/vn/procedures/supplier_checkIsActive.sql index 9dcb6452a..8e6dd53e5 100644 --- a/db/routines/vn/procedures/supplier_checkIsActive.sql +++ b/db/routines/vn/procedures/supplier_checkIsActive.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_checkIsActive`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_checkIsActive`(vSelf INT) BEGIN /** * Comprueba si un proveedor esta activo. diff --git a/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql b/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql index d486f6e86..e783e8884 100644 --- a/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql +++ b/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_disablePayMethodChecked`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_disablePayMethodChecked`() BEGIN /* diff --git a/db/routines/vn/procedures/supplier_statement.sql b/db/routines/vn/procedures/supplier_statement.sql index a03a7770c..733c01476 100644 --- a/db/routines/vn/procedures/supplier_statement.sql +++ b/db/routines/vn/procedures/supplier_statement.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_statement`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_statement`( vSupplierFk INT, vCurrencyFk INT, vCompanyFk INT, diff --git a/db/routines/vn/procedures/ticketBoxesView.sql b/db/routines/vn/procedures/ticketBoxesView.sql index d5fcef226..19d612fe9 100644 --- a/db/routines/vn/procedures/ticketBoxesView.sql +++ b/db/routines/vn/procedures/ticketBoxesView.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketBoxesView`(IN vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketBoxesView`(IN vTicketFk INT) BEGIN SELECT s.id, diff --git a/db/routines/vn/procedures/ticketBuiltTime.sql b/db/routines/vn/procedures/ticketBuiltTime.sql index 936e872ab..6fe536eef 100644 --- a/db/routines/vn/procedures/ticketBuiltTime.sql +++ b/db/routines/vn/procedures/ticketBuiltTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketBuiltTime`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketBuiltTime`(vDate DATE) BEGIN DECLARE vDateStart DATETIME DEFAULT DATE(vDate); diff --git a/db/routines/vn/procedures/ticketCalculateClon.sql b/db/routines/vn/procedures/ticketCalculateClon.sql index a56491590..94364a79d 100644 --- a/db/routines/vn/procedures/ticketCalculateClon.sql +++ b/db/routines/vn/procedures/ticketCalculateClon.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) BEGIN /* * Recalcula los componentes un ticket clonado, diff --git a/db/routines/vn/procedures/ticketCalculateFromType.sql b/db/routines/vn/procedures/ticketCalculateFromType.sql index 63f4b8941..7ab042b8f 100644 --- a/db/routines/vn/procedures/ticketCalculateFromType.sql +++ b/db/routines/vn/procedures/ticketCalculateFromType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketCalculateFromType`( vLanded DATE, +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculateFromType`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vTypeFk INT) diff --git a/db/routines/vn/procedures/ticketCalculatePurge.sql b/db/routines/vn/procedures/ticketCalculatePurge.sql index 86e3b0d1b..7afc6f1a7 100644 --- a/db/routines/vn/procedures/ticketCalculatePurge.sql +++ b/db/routines/vn/procedures/ticketCalculatePurge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketCalculatePurge`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculatePurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketCalculateItem, diff --git a/db/routines/vn/procedures/ticketClon.sql b/db/routines/vn/procedures/ticketClon.sql index 9144ac709..7d0674a68 100644 --- a/db/routines/vn/procedures/ticketClon.sql +++ b/db/routines/vn/procedures/ticketClon.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketClon`(vTicketFk INT, vNewShipped DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketClon`(vTicketFk INT, vNewShipped DATE) BEGIN DECLARE vNewTicketFk INT; diff --git a/db/routines/vn/procedures/ticketClon_OneYear.sql b/db/routines/vn/procedures/ticketClon_OneYear.sql index b0c08dec8..efe49688e 100644 --- a/db/routines/vn/procedures/ticketClon_OneYear.sql +++ b/db/routines/vn/procedures/ticketClon_OneYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketClon_OneYear`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketClon_OneYear`(vTicketFk INT) BEGIN DECLARE vShipped DATE; diff --git a/db/routines/vn/procedures/ticketCollection_get.sql b/db/routines/vn/procedures/ticketCollection_get.sql index 357471fee..e01ca0151 100644 --- a/db/routines/vn/procedures/ticketCollection_get.sql +++ b/db/routines/vn/procedures/ticketCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketCollection_get`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCollection_get`(vTicketFk INT) BEGIN SELECT tc.collectionFk diff --git a/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql b/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql index c69575ba7..5d9a9cefd 100644 --- a/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql +++ b/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) BEGIN /* diff --git a/db/routines/vn/procedures/ticketComponentUpdate.sql b/db/routines/vn/procedures/ticketComponentUpdate.sql index bdb3bf6cb..96d8a165a 100644 --- a/db/routines/vn/procedures/ticketComponentUpdate.sql +++ b/db/routines/vn/procedures/ticketComponentUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketComponentUpdate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketComponentUpdate`( vTicketFk INT, vClientFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/ticketComponentUpdateSale.sql b/db/routines/vn/procedures/ticketComponentUpdateSale.sql index d002655d1..c1a42f771 100644 --- a/db/routines/vn/procedures/ticketComponentUpdateSale.sql +++ b/db/routines/vn/procedures/ticketComponentUpdateSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketComponentUpdateSale`(vCode VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketComponentUpdateSale`(vCode VARCHAR(25)) BEGIN /** * A partir de la tabla tmp.sale, crea los Movimientos_componentes diff --git a/db/routines/vn/procedures/ticketDown_PrintableSelection.sql b/db/routines/vn/procedures/ticketDown_PrintableSelection.sql index 45002dd1f..a9c0cfd17 100644 --- a/db/routines/vn/procedures/ticketDown_PrintableSelection.sql +++ b/db/routines/vn/procedures/ticketDown_PrintableSelection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketDown_PrintableSelection`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketDown_PrintableSelection`(vSectorFk INT) BEGIN UPDATE vn.ticketDown td diff --git a/db/routines/vn/procedures/ticketGetTaxAdd.sql b/db/routines/vn/procedures/ticketGetTaxAdd.sql index 55f587d9d..c26453e3a 100644 --- a/db/routines/vn/procedures/ticketGetTaxAdd.sql +++ b/db/routines/vn/procedures/ticketGetTaxAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketGetTaxAdd`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTaxAdd`(vTicketFk INT) BEGIN /** * Añade un ticket a la tabla tmp.ticket para calcular diff --git a/db/routines/vn/procedures/ticketGetTax_new.sql b/db/routines/vn/procedures/ticketGetTax_new.sql index f7c5891cc..9b2f237dc 100644 --- a/db/routines/vn/procedures/ticketGetTax_new.sql +++ b/db/routines/vn/procedures/ticketGetTax_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketGetTax_new`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTax_new`() READS SQL DATA BEGIN /** diff --git a/db/routines/vn/procedures/ticketGetTotal.sql b/db/routines/vn/procedures/ticketGetTotal.sql index b77f261b0..ec5c6846c 100644 --- a/db/routines/vn/procedures/ticketGetTotal.sql +++ b/db/routines/vn/procedures/ticketGetTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketGetTotal`(vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTotal`(vTaxArea VARCHAR(25)) BEGIN /** * Calcula el total con IVA para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticketGetVisibleAvailable.sql b/db/routines/vn/procedures/ticketGetVisibleAvailable.sql index 3717d57e3..54ca2c1bf 100644 --- a/db/routines/vn/procedures/ticketGetVisibleAvailable.sql +++ b/db/routines/vn/procedures/ticketGetVisibleAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketGetVisibleAvailable`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetVisibleAvailable`( vTicket INT) BEGIN DECLARE vVisibleCalc INT; diff --git a/db/routines/vn/procedures/ticketNotInvoicedByClient.sql b/db/routines/vn/procedures/ticketNotInvoicedByClient.sql index cb177b6d0..274eaaa63 100644 --- a/db/routines/vn/procedures/ticketNotInvoicedByClient.sql +++ b/db/routines/vn/procedures/ticketNotInvoicedByClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketNotInvoicedByClient`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketNotInvoicedByClient`(vClientFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticket; diff --git a/db/routines/vn/procedures/ticketObservation_addNewBorn.sql b/db/routines/vn/procedures/ticketObservation_addNewBorn.sql index f70a11a48..c1a7afad0 100644 --- a/db/routines/vn/procedures/ticketObservation_addNewBorn.sql +++ b/db/routines/vn/procedures/ticketObservation_addNewBorn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketObservation_addNewBorn`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketObservation_addNewBorn`(vTicketFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticketPackaging_add.sql b/db/routines/vn/procedures/ticketPackaging_add.sql index f96068b56..3d223e601 100644 --- a/db/routines/vn/procedures/ticketPackaging_add.sql +++ b/db/routines/vn/procedures/ticketPackaging_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketPackaging_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketPackaging_add`( vClientFk INT, vDated DATE, vCompanyFk INT, diff --git a/db/routines/vn/procedures/ticketParking_findSkipped.sql b/db/routines/vn/procedures/ticketParking_findSkipped.sql index 7713d5b50..b3d609b76 100644 --- a/db/routines/vn/procedures/ticketParking_findSkipped.sql +++ b/db/routines/vn/procedures/ticketParking_findSkipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** diff --git a/db/routines/vn/procedures/ticketStateToday_setState.sql b/db/routines/vn/procedures/ticketStateToday_setState.sql index bd79043b4..fd54b705c 100644 --- a/db/routines/vn/procedures/ticketStateToday_setState.sql +++ b/db/routines/vn/procedures/ticketStateToday_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) BEGIN /* Modifica el estado de un ticket de hoy diff --git a/db/routines/vn/procedures/ticketToInvoiceByAddress.sql b/db/routines/vn/procedures/ticketToInvoiceByAddress.sql index ad51c761a..0ebb8426f 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByAddress.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByAddress`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByAddress`( vStarted DATE, vEnded DATETIME, vAddress INT, diff --git a/db/routines/vn/procedures/ticketToInvoiceByDate.sql b/db/routines/vn/procedures/ticketToInvoiceByDate.sql index 8937ab7ae..38996354a 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByDate.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByDate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByDate`( vStarted DATE, vEnded DATETIME, vClient INT, diff --git a/db/routines/vn/procedures/ticketToInvoiceByRef.sql b/db/routines/vn/procedures/ticketToInvoiceByRef.sql index 4f5c23ba2..f63b8450c 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByRef.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByRef.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/ticket_Clone.sql b/db/routines/vn/procedures/ticket_Clone.sql index d22d3c7ff..62fde53c6 100644 --- a/db/routines/vn/procedures/ticket_Clone.sql +++ b/db/routines/vn/procedures/ticket_Clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN /** * Clona el contenido de un ticket en otro diff --git a/db/routines/vn/procedures/ticket_DelayTruck.sql b/db/routines/vn/procedures/ticket_DelayTruck.sql index 81896dd8e..560f786e8 100644 --- a/db/routines/vn/procedures/ticket_DelayTruck.sql +++ b/db/routines/vn/procedures/ticket_DelayTruck.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) BEGIN DECLARE done INT DEFAULT FALSE; DECLARE vTicketFk INT; diff --git a/db/routines/vn/procedures/ticket_DelayTruckSplit.sql b/db/routines/vn/procedures/ticket_DelayTruckSplit.sql index 3e5195d9c..bd5759cee 100644 --- a/db/routines/vn/procedures/ticket_DelayTruckSplit.sql +++ b/db/routines/vn/procedures/ticket_DelayTruckSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_DelayTruckSplit`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_DelayTruckSplit`( vTicketFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_WeightDeclaration.sql b/db/routines/vn/procedures/ticket_WeightDeclaration.sql index e50290dd8..013c72643 100644 --- a/db/routines/vn/procedures/ticket_WeightDeclaration.sql +++ b/db/routines/vn/procedures/ticket_WeightDeclaration.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_WeightDeclaration`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_WeightDeclaration`(vClientFk INT, vDated DATE) BEGIN DECLARE vTheorycalWeight DECIMAL(10,2); diff --git a/db/routines/vn/procedures/ticket_add.sql b/db/routines/vn/procedures/ticket_add.sql index d9b68997c..58f699e9b 100644 --- a/db/routines/vn/procedures/ticket_add.sql +++ b/db/routines/vn/procedures/ticket_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_add`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_add`( vClientId INT ,vShipped DATE ,vWarehouseFk INT diff --git a/db/routines/vn/procedures/ticket_administrativeCopy.sql b/db/routines/vn/procedures/ticket_administrativeCopy.sql index f240a5fe0..9ccc3d5e5 100644 --- a/db/routines/vn/procedures/ticket_administrativeCopy.sql +++ b/db/routines/vn/procedures/ticket_administrativeCopy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN INSERT INTO vn.ticket(clientFk, addressFk, shipped, warehouseFk, companyFk, landed) diff --git a/db/routines/vn/procedures/ticket_canAdvance.sql b/db/routines/vn/procedures/ticket_canAdvance.sql index d1ca7b5e2..ea772ca17 100644 --- a/db/routines/vn/procedures/ticket_canAdvance.sql +++ b/db/routines/vn/procedures/ticket_canAdvance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) BEGIN /** * Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar. diff --git a/db/routines/vn/procedures/ticket_canMerge.sql b/db/routines/vn/procedures/ticket_canMerge.sql index c3f211027..4db78292f 100644 --- a/db/routines/vn/procedures/ticket_canMerge.sql +++ b/db/routines/vn/procedures/ticket_canMerge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT) BEGIN /** * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro diff --git a/db/routines/vn/procedures/ticket_canbePostponed.sql b/db/routines/vn/procedures/ticket_canbePostponed.sql index 442059b99..b6c4ac435 100644 --- a/db/routines/vn/procedures/ticket_canbePostponed.sql +++ b/db/routines/vn/procedures/ticket_canbePostponed.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro diff --git a/db/routines/vn/procedures/ticket_checkNoComponents.sql b/db/routines/vn/procedures/ticket_checkNoComponents.sql index b03427192..bada90838 100644 --- a/db/routines/vn/procedures/ticket_checkNoComponents.sql +++ b/db/routines/vn/procedures/ticket_checkNoComponents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_cloneAll.sql b/db/routines/vn/procedures/ticket_cloneAll.sql index 4b3401ed7..da938854c 100644 --- a/db/routines/vn/procedures/ticket_cloneAll.sql +++ b/db/routines/vn/procedures/ticket_cloneAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) BEGIN DECLARE vDone BOOLEAN DEFAULT FALSE; diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index fd45dc9fa..7a5f1a493 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_cloneWeekly`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_cloneWeekly`( vDateFrom DATE, vDateTo DATE ) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 7f52e81a7..1badf21e8 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_close`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_close`() BEGIN /** * Realiza el cierre de todos los diff --git a/db/routines/vn/procedures/ticket_closeByTicket.sql b/db/routines/vn/procedures/ticket_closeByTicket.sql index 837b809a2..32a9dbef9 100644 --- a/db/routines/vn/procedures/ticket_closeByTicket.sql +++ b/db/routines/vn/procedures/ticket_closeByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_closeByTicket`(IN vTicketFk int) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_closeByTicket`(IN vTicketFk int) BEGIN /** * Inserta el ticket en la tabla temporal diff --git a/db/routines/vn/procedures/ticket_componentMakeUpdate.sql b/db/routines/vn/procedures/ticket_componentMakeUpdate.sql index 4b0a5bdbc..30574b196 100644 --- a/db/routines/vn/procedures/ticket_componentMakeUpdate.sql +++ b/db/routines/vn/procedures/ticket_componentMakeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_componentMakeUpdate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_componentMakeUpdate`( vTicketFk INT, vClientFk INT, vNickname VARCHAR(50), diff --git a/db/routines/vn/procedures/ticket_componentPreview.sql b/db/routines/vn/procedures/ticket_componentPreview.sql index 729e3a743..93600f276 100644 --- a/db/routines/vn/procedures/ticket_componentPreview.sql +++ b/db/routines/vn/procedures/ticket_componentPreview.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_componentPreview`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_componentPreview`( vTicketFk INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/vn/procedures/ticket_doCmr.sql b/db/routines/vn/procedures/ticket_doCmr.sql index e9cd1d659..16ce2bef8 100644 --- a/db/routines/vn/procedures/ticket_doCmr.sql +++ b/db/routines/vn/procedures/ticket_doCmr.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(vSelf INT) BEGIN /** * Crea u actualiza la información del CMR asociado con diff --git a/db/routines/vn/procedures/ticket_getFromFloramondo.sql b/db/routines/vn/procedures/ticket_getFromFloramondo.sql index 5f2bedbb1..001a1e33d 100644 --- a/db/routines/vn/procedures/ticket_getFromFloramondo.sql +++ b/db/routines/vn/procedures/ticket_getFromFloramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) BEGIN /** * Genera una tabla con la lista de tickets de Floramondo diff --git a/db/routines/vn/procedures/ticket_getMovable.sql b/db/routines/vn/procedures/ticket_getMovable.sql index 512151bd4..90c8eced0 100644 --- a/db/routines/vn/procedures/ticket_getMovable.sql +++ b/db/routines/vn/procedures/ticket_getMovable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getMovable`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getMovable`( vTicketFk INT, vNewShipped DATETIME, vWarehouseFk INT diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index 521e4cf2f..95810d6da 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1)) BEGIN /** * Calcula los problemas para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticket_getSplitList.sql b/db/routines/vn/procedures/ticket_getSplitList.sql index 10488d596..260d272d4 100644 --- a/db/routines/vn/procedures/ticket_getSplitList.sql +++ b/db/routines/vn/procedures/ticket_getSplitList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) BEGIN /** * Devuelve un listado con los tickets posibles para splitar HOY. diff --git a/db/routines/vn/procedures/ticket_getTax.sql b/db/routines/vn/procedures/ticket_getTax.sql index b9f5c14e3..9f1bcd58d 100644 --- a/db/routines/vn/procedures/ticket_getTax.sql +++ b/db/routines/vn/procedures/ticket_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getTax`(IN vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getTax`(IN vTaxArea VARCHAR(25)) BEGIN /** * Calcula la base imponible, el IVA y el recargo de equivalencia para diff --git a/db/routines/vn/procedures/ticket_getWarnings.sql b/db/routines/vn/procedures/ticket_getWarnings.sql index 0bda30446..4481b33d8 100644 --- a/db/routines/vn/procedures/ticket_getWarnings.sql +++ b/db/routines/vn/procedures/ticket_getWarnings.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getWarnings`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getWarnings`() BEGIN /** * Calcula las adventencias para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticket_getWithParameters.sql b/db/routines/vn/procedures/ticket_getWithParameters.sql index 2d3d09311..8118c91fc 100644 --- a/db/routines/vn/procedures/ticket_getWithParameters.sql +++ b/db/routines/vn/procedures/ticket_getWithParameters.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getWithParameters`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getWithParameters`( vClientFk INT, vWarehouseFk INT, vShipped DATE, diff --git a/db/routines/vn/procedures/ticket_insertZone.sql b/db/routines/vn/procedures/ticket_insertZone.sql index ee6eabdec..293341091 100644 --- a/db/routines/vn/procedures/ticket_insertZone.sql +++ b/db/routines/vn/procedures/ticket_insertZone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_insertZone`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_insertZone`() BEGIN DECLARE vDone INT DEFAULT 0; DECLARE vFechedTicket INT; diff --git a/db/routines/vn/procedures/ticket_priceDifference.sql b/db/routines/vn/procedures/ticket_priceDifference.sql index 4ef168840..d099f6b32 100644 --- a/db/routines/vn/procedures/ticket_priceDifference.sql +++ b/db/routines/vn/procedures/ticket_priceDifference.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_priceDifference`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_priceDifference`( vTicketFk INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/vn/procedures/ticket_printLabelPrevious.sql b/db/routines/vn/procedures/ticket_printLabelPrevious.sql index cba42ff3e..dc4242d56 100644 --- a/db/routines/vn/procedures/ticket_printLabelPrevious.sql +++ b/db/routines/vn/procedures/ticket_printLabelPrevious.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_printLabelPrevious`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_printLabelPrevious`(vTicketFk INT) BEGIN /** * Calls the report_print procedure and passes it diff --git a/db/routines/vn/procedures/ticket_recalc.sql b/db/routines/vn/procedures/ticket_recalc.sql index 50065d03a..ed78ca2d7 100644 --- a/db/routines/vn/procedures/ticket_recalc.sql +++ b/db/routines/vn/procedures/ticket_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) proc:BEGIN /** * Calcula y guarda el total con/sin IVA en un ticket. diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 41105fe23..5917f5d89 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_recalcByScope`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalcByScope`( vScope VARCHAR(255), vId INT ) diff --git a/db/routines/vn/procedures/ticket_recalcComponents.sql b/db/routines/vn/procedures/ticket_recalcComponents.sql index 0282c0e42..070faec32 100644 --- a/db/routines/vn/procedures/ticket_recalcComponents.sql +++ b/db/routines/vn/procedures/ticket_recalcComponents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setNextState.sql b/db/routines/vn/procedures/ticket_setNextState.sql index b09309a47..d64a42934 100644 --- a/db/routines/vn/procedures/ticket_setNextState.sql +++ b/db/routines/vn/procedures/ticket_setNextState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setNextState`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setNextState`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setParking.sql b/db/routines/vn/procedures/ticket_setParking.sql index 7935e0d60..6cccc9a81 100644 --- a/db/routines/vn/procedures/ticket_setParking.sql +++ b/db/routines/vn/procedures/ticket_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setParking`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setParking`( vSelf INT, vParkingFk INT ) diff --git a/db/routines/vn/procedures/ticket_setPreviousState.sql b/db/routines/vn/procedures/ticket_setPreviousState.sql index c03d41b09..785b3019a 100644 --- a/db/routines/vn/procedures/ticket_setPreviousState.sql +++ b/db/routines/vn/procedures/ticket_setPreviousState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setPreviousState`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setPreviousState`(vTicketFk INT) BEGIN DECLARE vControlFk INT; diff --git a/db/routines/vn/procedures/ticket_setProblem.sql b/db/routines/vn/procedures/ticket_setProblem.sql index 66d244d5a..e6b5971f1 100644 --- a/db/routines/vn/procedures/ticket_setProblem.sql +++ b/db/routines/vn/procedures/ticket_setProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblem`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblem`( vProblemCode VARCHAR(25) ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemFreeze.sql b/db/routines/vn/procedures/ticket_setProblemFreeze.sql index 1de939ba7..1b556be86 100644 --- a/db/routines/vn/procedures/ticket_setProblemFreeze.sql +++ b/db/routines/vn/procedures/ticket_setProblemFreeze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemFreeze`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemFreeze`( vClientFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRequest.sql b/db/routines/vn/procedures/ticket_setProblemRequest.sql index 687facfc7..6202e0d28 100644 --- a/db/routines/vn/procedures/ticket_setProblemRequest.sql +++ b/db/routines/vn/procedures/ticket_setProblemRequest.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRequest`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRequest`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRisk.sql b/db/routines/vn/procedures/ticket_setProblemRisk.sql index efa5b10e2..20bd30c46 100644 --- a/db/routines/vn/procedures/ticket_setProblemRisk.sql +++ b/db/routines/vn/procedures/ticket_setProblemRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRisk`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRisk`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRounding.sql b/db/routines/vn/procedures/ticket_setProblemRounding.sql index fb580eacf..2cedc2dd7 100644 --- a/db/routines/vn/procedures/ticket_setProblemRounding.sql +++ b/db/routines/vn/procedures/ticket_setProblemRounding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRounding`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRounding`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql b/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql index 9877b5acc..707b71353 100644 --- a/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql +++ b/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTaxDataChecked`(vClientFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql index 48cc47809..a0b89c5e9 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittle`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittle`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql b/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql index ac3814c07..3f59c3316 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittleItemCost`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittleItemCost`( vItemFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setRisk.sql b/db/routines/vn/procedures/ticket_setRisk.sql index bd5d1e9f9..068532391 100644 --- a/db/routines/vn/procedures/ticket_setRisk.sql +++ b/db/routines/vn/procedures/ticket_setRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setRisk`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setRisk`( vClientFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setState.sql b/db/routines/vn/procedures/ticket_setState.sql index bde8e0692..9539a5e32 100644 --- a/db/routines/vn/procedures/ticket_setState.sql +++ b/db/routines/vn/procedures/ticket_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setState`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setState`( vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci ) diff --git a/db/routines/vn/procedures/ticket_split.sql b/db/routines/vn/procedures/ticket_split.sql index 9a359b83f..9023cd7b2 100644 --- a/db/routines/vn/procedures/ticket_split.sql +++ b/db/routines/vn/procedures/ticket_split.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_split`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_split`( vTicketFk INT, vTicketFutureFk INT, vDated DATE diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index c2ec50fd9..6113b03fe 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_splitItemPackingType`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_splitItemPackingType`( vSelf INT, vItemPackingTypeFk VARCHAR(1) ) diff --git a/db/routines/vn/procedures/ticket_splitPackingComplete.sql b/db/routines/vn/procedures/ticket_splitPackingComplete.sql index 528e8fbed..703955816 100644 --- a/db/routines/vn/procedures/ticket_splitPackingComplete.sql +++ b/db/routines/vn/procedures/ticket_splitPackingComplete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) BEGIN DECLARE vNeedToSplit BOOLEAN; diff --git a/db/routines/vn/procedures/timeBusiness_calculate.sql b/db/routines/vn/procedures/timeBusiness_calculate.sql index 3cb734069..e7b0e3d53 100644 --- a/db/routines/vn/procedures/timeBusiness_calculate.sql +++ b/db/routines/vn/procedures/timeBusiness_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * Horas que debe trabajar un empleado según contrato y día. diff --git a/db/routines/vn/procedures/timeBusiness_calculateAll.sql b/db/routines/vn/procedures/timeBusiness_calculateAll.sql index 4e0ac7da5..fbac865a4 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateAll.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql b/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql index 54c587342..eb8a4701e 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk diff --git a/db/routines/vn/procedures/timeBusiness_calculateByUser.sql b/db/routines/vn/procedures/timeBusiness_calculateByUser.sql index a54dfcc2e..efa4b5080 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByUser.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql b/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql index 89a4c0ab0..e9f93e7fd 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculate.sql b/db/routines/vn/procedures/timeControl_calculate.sql index 258960265..c315d1aa3 100644 --- a/db/routines/vn/procedures/timeControl_calculate.sql +++ b/db/routines/vn/procedures/timeControl_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculate`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculate`( vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN diff --git a/db/routines/vn/procedures/timeControl_calculateAll.sql b/db/routines/vn/procedures/timeControl_calculateAll.sql index c6354ad78..78b68acc6 100644 --- a/db/routines/vn/procedures/timeControl_calculateAll.sql +++ b/db/routines/vn/procedures/timeControl_calculateAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculateByDepartment.sql b/db/routines/vn/procedures/timeControl_calculateByDepartment.sql index bb9ccec60..0088b43b6 100644 --- a/db/routines/vn/procedures/timeControl_calculateByDepartment.sql +++ b/db/routines/vn/procedures/timeControl_calculateByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk diff --git a/db/routines/vn/procedures/timeControl_calculateByUser.sql b/db/routines/vn/procedures/timeControl_calculateByUser.sql index 8e831cb4c..c650ec658 100644 --- a/db/routines/vn/procedures/timeControl_calculateByUser.sql +++ b/db/routines/vn/procedures/timeControl_calculateByUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculateByWorker.sql b/db/routines/vn/procedures/timeControl_calculateByWorker.sql index 98c3dedd2..bfada7635 100644 --- a/db/routines/vn/procedures/timeControl_calculateByWorker.sql +++ b/db/routines/vn/procedures/timeControl_calculateByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_getError.sql b/db/routines/vn/procedures/timeControl_getError.sql index 6e5ca02ab..0bcfd2bfd 100644 --- a/db/routines/vn/procedures/timeControl_getError.sql +++ b/db/routines/vn/procedures/timeControl_getError.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /* * @param vDatedFrom diff --git a/db/routines/vn/procedures/tpvTransaction_checkStatus.sql b/db/routines/vn/procedures/tpvTransaction_checkStatus.sql index e16c20161..a33300b54 100644 --- a/db/routines/vn/procedures/tpvTransaction_checkStatus.sql +++ b/db/routines/vn/procedures/tpvTransaction_checkStatus.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`tpvTransaction_checkStatus`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`tpvTransaction_checkStatus`() BEGIN /** * diff --git a/db/routines/vn/procedures/travelVolume.sql b/db/routines/vn/procedures/travelVolume.sql index 21eae36ac..be3c111fb 100644 --- a/db/routines/vn/procedures/travelVolume.sql +++ b/db/routines/vn/procedures/travelVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travelVolume`(vTravelFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travelVolume`(vTravelFk INT) BEGIN SELECT w1.name AS ORI, diff --git a/db/routines/vn/procedures/travelVolume_get.sql b/db/routines/vn/procedures/travelVolume_get.sql index f9d00aeb4..cd444d28d 100644 --- a/db/routines/vn/procedures/travelVolume_get.sql +++ b/db/routines/vn/procedures/travelVolume_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) BEGIN SELECT tr.landed Fecha, a.name Agencia, diff --git a/db/routines/vn/procedures/travel_checkDates.sql b/db/routines/vn/procedures/travel_checkDates.sql index 45690fcb4..d31516466 100644 --- a/db/routines/vn/procedures/travel_checkDates.sql +++ b/db/routines/vn/procedures/travel_checkDates.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_checkDates`(vShipped DATE, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkDates`(vShipped DATE, vLanded DATE) BEGIN /** * Checks the landing/shipment dates of travel, throws an error diff --git a/db/routines/vn/procedures/travel_checkPackaging.sql b/db/routines/vn/procedures/travel_checkPackaging.sql index 59df1b894..5e69d9dd5 100644 --- a/db/routines/vn/procedures/travel_checkPackaging.sql +++ b/db/routines/vn/procedures/travel_checkPackaging.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_checkPackaging`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkPackaging`(vSelf INT) BEGIN DECLARE vDone BOOL; DECLARE vEntryFk INT; diff --git a/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql b/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql index ef69d772b..8177214c7 100644 --- a/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql +++ b/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) proc: BEGIN /* * Check that the warehouse is not Feed Stock diff --git a/db/routines/vn/procedures/travel_clone.sql b/db/routines/vn/procedures/travel_clone.sql index 96500baa1..4b4d611e9 100644 --- a/db/routines/vn/procedures/travel_clone.sql +++ b/db/routines/vn/procedures/travel_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) BEGIN /** * Clona un travel el número de dias indicado y devuelve su id. diff --git a/db/routines/vn/procedures/travel_cloneWithEntries.sql b/db/routines/vn/procedures/travel_cloneWithEntries.sql index e2d086fc8..90d59c2a6 100644 --- a/db/routines/vn/procedures/travel_cloneWithEntries.sql +++ b/db/routines/vn/procedures/travel_cloneWithEntries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_cloneWithEntries`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_cloneWithEntries`( IN vTravelFk INT, IN vDateStart DATE, IN vDateEnd DATE, diff --git a/db/routines/vn/procedures/travel_getDetailFromContinent.sql b/db/routines/vn/procedures/travel_getDetailFromContinent.sql index e81e648b3..d39754b65 100644 --- a/db/routines/vn/procedures/travel_getDetailFromContinent.sql +++ b/db/routines/vn/procedures/travel_getDetailFromContinent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_getDetailFromContinent`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_getDetailFromContinent`( vContinentFk INT ) BEGIN diff --git a/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql b/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql index 35d30e0c4..793e866d4 100644 --- a/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql +++ b/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_getEntriesMissingPackage`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_getEntriesMissingPackage`(vSelf INT) BEGIN DECLARE vpackageOrPackingNull INT; DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/travel_moveRaids.sql b/db/routines/vn/procedures/travel_moveRaids.sql index c7696e829..f590f836d 100644 --- a/db/routines/vn/procedures/travel_moveRaids.sql +++ b/db/routines/vn/procedures/travel_moveRaids.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_moveRaids`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_moveRaids`() BEGIN /* diff --git a/db/routines/vn/procedures/travel_recalc.sql b/db/routines/vn/procedures/travel_recalc.sql index 46d1cdc4f..c4021bdd0 100644 --- a/db/routines/vn/procedures/travel_recalc.sql +++ b/db/routines/vn/procedures/travel_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_recalc`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_recalc`(vSelf INT) proc: BEGIN /** * Updates the number of entries assigned to the travel. diff --git a/db/routines/vn/procedures/travel_throwAwb.sql b/db/routines/vn/procedures/travel_throwAwb.sql index 1b54f8532..5fc6ec7c5 100644 --- a/db/routines/vn/procedures/travel_throwAwb.sql +++ b/db/routines/vn/procedures/travel_throwAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT) BEGIN /** * Throws an error if travel does not have a logical AWB diff --git a/db/routines/vn/procedures/travel_upcomingArrivals.sql b/db/routines/vn/procedures/travel_upcomingArrivals.sql index a2cd3733c..6fadb0644 100644 --- a/db/routines/vn/procedures/travel_upcomingArrivals.sql +++ b/db/routines/vn/procedures/travel_upcomingArrivals.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_upcomingArrivals`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_upcomingArrivals`( vWarehouseFk INT, vDate DATETIME ) diff --git a/db/routines/vn/procedures/travel_updatePacking.sql b/db/routines/vn/procedures/travel_updatePacking.sql index 0f63bbf62..49b5bef0f 100644 --- a/db/routines/vn/procedures/travel_updatePacking.sql +++ b/db/routines/vn/procedures/travel_updatePacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_updatePacking`(vItemFk INT, vPacking INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_updatePacking`(vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing para los movimientos de almacén de la subasta al almacén central diff --git a/db/routines/vn/procedures/travel_weeklyClone.sql b/db/routines/vn/procedures/travel_weeklyClone.sql index a92916c10..c8bec5ae5 100644 --- a/db/routines/vn/procedures/travel_weeklyClone.sql +++ b/db/routines/vn/procedures/travel_weeklyClone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_weeklyClone`(vSinceWeek INT, vToWeek INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_weeklyClone`(vSinceWeek INT, vToWeek INT) BEGIN /** * Clona los traslados plantilla para las semanas pasadas por parámetros. diff --git a/db/routines/vn/procedures/typeTagMake.sql b/db/routines/vn/procedures/typeTagMake.sql index ddfc7fdb9..f0d1cdc4d 100644 --- a/db/routines/vn/procedures/typeTagMake.sql +++ b/db/routines/vn/procedures/typeTagMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`typeTagMake`(vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`typeTagMake`(vTypeFk INT) BEGIN /* * Plantilla para modificar reemplazar todos los tags diff --git a/db/routines/vn/procedures/updatePedidosInternos.sql b/db/routines/vn/procedures/updatePedidosInternos.sql index 97b01bf8b..b04f0109f 100644 --- a/db/routines/vn/procedures/updatePedidosInternos.sql +++ b/db/routines/vn/procedures/updatePedidosInternos.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`updatePedidosInternos`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`updatePedidosInternos`(vItemFk INT) BEGIN UPDATE vn.item SET upToDown = 0 WHERE item.id = vItemFk; diff --git a/db/routines/vn/procedures/vehicle_checkNumberPlate.sql b/db/routines/vn/procedures/vehicle_checkNumberPlate.sql index 8e3f24d76..2cae46588 100644 --- a/db/routines/vn/procedures/vehicle_checkNumberPlate.sql +++ b/db/routines/vn/procedures/vehicle_checkNumberPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) BEGIN /** * Comprueba si la matricula pasada tiene el formato correcto dependiendo del pais del vehiculo diff --git a/db/routines/vn/procedures/vehicle_notifyEvents.sql b/db/routines/vn/procedures/vehicle_notifyEvents.sql index 1a07a96e2..d78f48d0c 100644 --- a/db/routines/vn/procedures/vehicle_notifyEvents.sql +++ b/db/routines/vn/procedures/vehicle_notifyEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`vehicle_notifyEvents`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`vehicle_notifyEvents`() proc:BEGIN /** * Query the vehicleEvent table to see if there are any events that need to be notified. diff --git a/db/routines/vn/procedures/visible_getMisfit.sql b/db/routines/vn/procedures/visible_getMisfit.sql index 631f0236e..b565ad5c0 100644 --- a/db/routines/vn/procedures/visible_getMisfit.sql +++ b/db/routines/vn/procedures/visible_getMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`visible_getMisfit`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`visible_getMisfit`(vSectorFk INT) BEGIN /* Devuelve una tabla temporal con los descuadres entre el visible teórico y lo ubicado en la práctica diff --git a/db/routines/vn/procedures/warehouseFitting.sql b/db/routines/vn/procedures/warehouseFitting.sql index 4be35a3ee..7a3ad9e37 100644 --- a/db/routines/vn/procedures/warehouseFitting.sql +++ b/db/routines/vn/procedures/warehouseFitting.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) BEGIN DECLARE vCacheVisibleOriginFk INT; DECLARE vCacheVisibleDestinyFk INT; diff --git a/db/routines/vn/procedures/warehouseFitting_byTravel.sql b/db/routines/vn/procedures/warehouseFitting_byTravel.sql index db67c1599..d71f127e5 100644 --- a/db/routines/vn/procedures/warehouseFitting_byTravel.sql +++ b/db/routines/vn/procedures/warehouseFitting_byTravel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`warehouseFitting_byTravel`(IN vTravelFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`warehouseFitting_byTravel`(IN vTravelFk INT) BEGIN DECLARE vWhOrigin INT; diff --git a/db/routines/vn/procedures/workerCalculateBoss.sql b/db/routines/vn/procedures/workerCalculateBoss.sql index 0fc08ed40..65952d022 100644 --- a/db/routines/vn/procedures/workerCalculateBoss.sql +++ b/db/routines/vn/procedures/workerCalculateBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerCalculateBoss`(vWorker INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalculateBoss`(vWorker INT) BEGIN /** * Actualiza la tabla workerBosses diff --git a/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql b/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql index 72b461154..347ea045c 100644 --- a/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql +++ b/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) BEGIN /** * Calcula los días y horas de vacaciones en función de un contrato y año diff --git a/db/routines/vn/procedures/workerCalendar_calculateYear.sql b/db/routines/vn/procedures/workerCalendar_calculateYear.sql index 9e3baf641..cf91ddf79 100644 --- a/db/routines/vn/procedures/workerCalendar_calculateYear.sql +++ b/db/routines/vn/procedures/workerCalendar_calculateYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/workerCreateExternal.sql b/db/routines/vn/procedures/workerCreateExternal.sql index f8cea70b1..f15c586fa 100644 --- a/db/routines/vn/procedures/workerCreateExternal.sql +++ b/db/routines/vn/procedures/workerCreateExternal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerCreateExternal`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCreateExternal`( vFirstName VARCHAR(50), vSurname1 VARCHAR(50), vSurname2 VARCHAR(50), diff --git a/db/routines/vn/procedures/workerDepartmentByDate.sql b/db/routines/vn/procedures/workerDepartmentByDate.sql index 40a099d64..594e2bac5 100644 --- a/db/routines/vn/procedures/workerDepartmentByDate.sql +++ b/db/routines/vn/procedures/workerDepartmentByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerDepartmentByDate`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDepartmentByDate`(vDate DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.workerDepartmentByDate; diff --git a/db/routines/vn/procedures/workerDisable.sql b/db/routines/vn/procedures/workerDisable.sql index 04612a6dc..7ddd341d5 100644 --- a/db/routines/vn/procedures/workerDisable.sql +++ b/db/routines/vn/procedures/workerDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerDisable`(vUserId int) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDisable`(vUserId int) mainLabel:BEGIN IF (SELECT COUNT(*) FROM workerDisableExcluded WHERE workerFk = vUserId AND (dated > util.VN_CURDATE() OR dated IS NULL)) > 0 THEN diff --git a/db/routines/vn/procedures/workerDisableAll.sql b/db/routines/vn/procedures/workerDisableAll.sql index e2f7740b2..2bebe719d 100644 --- a/db/routines/vn/procedures/workerDisableAll.sql +++ b/db/routines/vn/procedures/workerDisableAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerDisableAll`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDisableAll`() BEGIN DECLARE done BOOL DEFAULT FALSE; DECLARE vUserFk INT; diff --git a/db/routines/vn/procedures/workerForAllCalculateBoss.sql b/db/routines/vn/procedures/workerForAllCalculateBoss.sql index f3574116e..1f7d94670 100644 --- a/db/routines/vn/procedures/workerForAllCalculateBoss.sql +++ b/db/routines/vn/procedures/workerForAllCalculateBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerForAllCalculateBoss`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerForAllCalculateBoss`() BEGIN /** * Actualiza la tabla workerBosses utilizando el procedimiento diff --git a/db/routines/vn/procedures/workerJourney_replace.sql b/db/routines/vn/procedures/workerJourney_replace.sql index 1fcb8c590..61498689e 100644 --- a/db/routines/vn/procedures/workerJourney_replace.sql +++ b/db/routines/vn/procedures/workerJourney_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerJourney_replace`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerJourney_replace`( vDatedFrom DATE, vDatedTo DATE, vWorkerFk INT) diff --git a/db/routines/vn/procedures/workerMistakeType_get.sql b/db/routines/vn/procedures/workerMistakeType_get.sql index ae81640a1..ca9b0f655 100644 --- a/db/routines/vn/procedures/workerMistakeType_get.sql +++ b/db/routines/vn/procedures/workerMistakeType_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerMistakeType_get`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerMistakeType_get`() BEGIN /** diff --git a/db/routines/vn/procedures/workerMistake_add.sql b/db/routines/vn/procedures/workerMistake_add.sql index c4786090b..95bee8c3d 100644 --- a/db/routines/vn/procedures/workerMistake_add.sql +++ b/db/routines/vn/procedures/workerMistake_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) BEGIN /** * Añade error al trabajador diff --git a/db/routines/vn/procedures/workerTimeControlSOWP.sql b/db/routines/vn/procedures/workerTimeControlSOWP.sql index 14959b942..4268468d8 100644 --- a/db/routines/vn/procedures/workerTimeControlSOWP.sql +++ b/db/routines/vn/procedures/workerTimeControlSOWP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) BEGIN SET @order := 0; diff --git a/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql b/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql index 9c1e58608..1e686afa1 100644 --- a/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql +++ b/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_calculateOddDays`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_calculateOddDays`() BEGIN /** * Calculo de las fichadas impares por empleado y dia. diff --git a/db/routines/vn/procedures/workerTimeControl_check.sql b/db/routines/vn/procedures/workerTimeControl_check.sql index ce0e51490..176e627b8 100644 --- a/db/routines/vn/procedures/workerTimeControl_check.sql +++ b/db/routines/vn/procedures/workerTimeControl_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100)) proc: BEGIN /** * Verifica si el empleado puede fichar en el momento actual, si puede fichar llama a workerTimeControlAdd diff --git a/db/routines/vn/procedures/workerTimeControl_checkBreak.sql b/db/routines/vn/procedures/workerTimeControl_checkBreak.sql index 15dd12373..7282275dc 100644 --- a/db/routines/vn/procedures/workerTimeControl_checkBreak.sql +++ b/db/routines/vn/procedures/workerTimeControl_checkBreak.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_checkBreak`(vStarted DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_checkBreak`(vStarted DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas diff --git a/db/routines/vn/procedures/workerTimeControl_clockIn.sql b/db/routines/vn/procedures/workerTimeControl_clockIn.sql index a1ce53bc2..3a4f0924a 100644 --- a/db/routines/vn/procedures/workerTimeControl_clockIn.sql +++ b/db/routines/vn/procedures/workerTimeControl_clockIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_clockIn`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_clockIn`( vWorkerFk INT, vTimed DATETIME, vDirection VARCHAR(10), diff --git a/db/routines/vn/procedures/workerTimeControl_direction.sql b/db/routines/vn/procedures/workerTimeControl_direction.sql index 8e807084c..0eeeba43c 100644 --- a/db/routines/vn/procedures/workerTimeControl_direction.sql +++ b/db/routines/vn/procedures/workerTimeControl_direction.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) BEGIN /** * Devuelve que direcciones de fichadas son lógicas a partir de la anterior fichada diff --git a/db/routines/vn/procedures/workerTimeControl_getClockIn.sql b/db/routines/vn/procedures/workerTimeControl_getClockIn.sql index 11cd23fa5..e1b380020 100644 --- a/db/routines/vn/procedures/workerTimeControl_getClockIn.sql +++ b/db/routines/vn/procedures/workerTimeControl_getClockIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_getClockIn`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_getClockIn`( vUserFk INT, vDated DATE) BEGIN diff --git a/db/routines/vn/procedures/workerTimeControl_login.sql b/db/routines/vn/procedures/workerTimeControl_login.sql index c46663e1f..642c3f6c2 100644 --- a/db/routines/vn/procedures/workerTimeControl_login.sql +++ b/db/routines/vn/procedures/workerTimeControl_login.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_login`(vWorkerFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_login`(vWorkerFk VARCHAR(10)) BEGIN /** * Consulta la información del usuario y los botones que tiene que activar en la tablet tras hacer login diff --git a/db/routines/vn/procedures/workerTimeControl_remove.sql b/db/routines/vn/procedures/workerTimeControl_remove.sql index 7b34cbbeb..9e973e1ea 100644 --- a/db/routines/vn/procedures/workerTimeControl_remove.sql +++ b/db/routines/vn/procedures/workerTimeControl_remove.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) BEGIN DECLARE vDirectionRemove VARCHAR(6); diff --git a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql index 5b276084a..74f724222 100644 --- a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql +++ b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT) BEGIN /** * Inserta el registro de horario semanalmente de PRODUCCION, CAMARA, REPARTO, TALLER NATURAL y TALLER ARTIFICIAL en vn.mail. diff --git a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql index 406bb8d8d..78dde73df 100644 --- a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql +++ b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartmentLauncher`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartmentLauncher`() BEGIN DECLARE vDatedFrom, vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql b/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql index 70ef3da07..edac2c60b 100644 --- a/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql +++ b/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas diff --git a/db/routines/vn/procedures/workerWeekControl.sql b/db/routines/vn/procedures/workerWeekControl.sql index 8001d8d3a..33ab8baec 100644 --- a/db/routines/vn/procedures/workerWeekControl.sql +++ b/db/routines/vn/procedures/workerWeekControl.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100)) BEGIN /* * Devuelve la cantidad de descansos de 12h y de 36 horas que ha disfrutado el trabajador diff --git a/db/routines/vn/procedures/worker_checkMultipleDevice.sql b/db/routines/vn/procedures/worker_checkMultipleDevice.sql index 00df08d49..e932e88a3 100644 --- a/db/routines/vn/procedures/worker_checkMultipleDevice.sql +++ b/db/routines/vn/procedures/worker_checkMultipleDevice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_checkMultipleDevice`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_checkMultipleDevice`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/worker_getFromHasMistake.sql b/db/routines/vn/procedures/worker_getFromHasMistake.sql index 052097e79..313830282 100644 --- a/db/routines/vn/procedures/worker_getFromHasMistake.sql +++ b/db/routines/vn/procedures/worker_getFromHasMistake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_getFromHasMistake`(vDepartmentFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getFromHasMistake`(vDepartmentFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/worker_getHierarchy.sql b/db/routines/vn/procedures/worker_getHierarchy.sql index de6956898..37e89ae8f 100644 --- a/db/routines/vn/procedures/worker_getHierarchy.sql +++ b/db/routines/vn/procedures/worker_getHierarchy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_getHierarchy`(vUserFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getHierarchy`(vUserFk INT) BEGIN /** * Retorna una tabla temporal con los trabajadores que tiene diff --git a/db/routines/vn/procedures/worker_getSector.sql b/db/routines/vn/procedures/worker_getSector.sql index 759bb839b..fe6ee8a5a 100644 --- a/db/routines/vn/procedures/worker_getSector.sql +++ b/db/routines/vn/procedures/worker_getSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_getSector`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getSector`() BEGIN /** diff --git a/db/routines/vn/procedures/worker_updateBalance.sql b/db/routines/vn/procedures/worker_updateBalance.sql index 17c2fbbe1..1f5f02882 100644 --- a/db/routines/vn/procedures/worker_updateBalance.sql +++ b/db/routines/vn/procedures/worker_updateBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) BEGIN /** * Actualiza la columna balance de worker. diff --git a/db/routines/vn/procedures/worker_updateBusiness.sql b/db/routines/vn/procedures/worker_updateBusiness.sql index 76c8c9cbb..e3040603c 100644 --- a/db/routines/vn/procedures/worker_updateBusiness.sql +++ b/db/routines/vn/procedures/worker_updateBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_updateBusiness`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateBusiness`(vSelf INT) BEGIN /** * Activates an account and configures its email settings. diff --git a/db/routines/vn/procedures/worker_updateChangedBusiness.sql b/db/routines/vn/procedures/worker_updateChangedBusiness.sql index 05e68b099..cc9c1e84d 100644 --- a/db/routines/vn/procedures/worker_updateChangedBusiness.sql +++ b/db/routines/vn/procedures/worker_updateChangedBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`worker_updateChangedBusiness`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateChangedBusiness`() BEGIN /** * Actualiza el contrato actual de todos los trabajadores cuyo contracto ha diff --git a/db/routines/vn/procedures/workingHours.sql b/db/routines/vn/procedures/workingHours.sql index c08226db7..0390efb7d 100644 --- a/db/routines/vn/procedures/workingHours.sql +++ b/db/routines/vn/procedures/workingHours.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workingHours`(username varchar(255), logon boolean) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHours`(username varchar(255), logon boolean) BEGIN DECLARE userid int(11); diff --git a/db/routines/vn/procedures/workingHoursTimeIn.sql b/db/routines/vn/procedures/workingHoursTimeIn.sql index 8a4268c54..07e0d7ccd 100644 --- a/db/routines/vn/procedures/workingHoursTimeIn.sql +++ b/db/routines/vn/procedures/workingHoursTimeIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workingHoursTimeIn`(vUserId INT(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHoursTimeIn`(vUserId INT(11)) BEGIN INSERT INTO vn.workingHours (timeIn, userId) VALUES (util.VN_NOW(),vUserId); diff --git a/db/routines/vn/procedures/workingHoursTimeOut.sql b/db/routines/vn/procedures/workingHoursTimeOut.sql index f6ce2886c..0f7ee543b 100644 --- a/db/routines/vn/procedures/workingHoursTimeOut.sql +++ b/db/routines/vn/procedures/workingHoursTimeOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`workingHoursTimeOut`(vUserId INT(11)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHoursTimeOut`(vUserId INT(11)) BEGIN UPDATE vn.workingHours SET timeOut = util.VN_NOW() diff --git a/db/routines/vn/procedures/wrongEqualizatedClient.sql b/db/routines/vn/procedures/wrongEqualizatedClient.sql index 47a6a608d..35709b32a 100644 --- a/db/routines/vn/procedures/wrongEqualizatedClient.sql +++ b/db/routines/vn/procedures/wrongEqualizatedClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`wrongEqualizatedClient`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`wrongEqualizatedClient`() BEGIN SELECT clientFk, c.name, c.isActive, c.isTaxDataChecked, count(ie) as num FROM vn.client c diff --git a/db/routines/vn/procedures/xdiario_new.sql b/db/routines/vn/procedures/xdiario_new.sql index 22a26184e..b965cd909 100644 --- a/db/routines/vn/procedures/xdiario_new.sql +++ b/db/routines/vn/procedures/xdiario_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`xdiario_new`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`xdiario_new`( vBookNumber INT, vDated DATE, vSubaccount VARCHAR(12), diff --git a/db/routines/vn/procedures/zoneClosure_recalc.sql b/db/routines/vn/procedures/zoneClosure_recalc.sql index 9e51c007d..9e7dcc179 100644 --- a/db/routines/vn/procedures/zoneClosure_recalc.sql +++ b/db/routines/vn/procedures/zoneClosure_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneClosure_recalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneClosure_recalc`() proc: BEGIN /** * Recalculates the delivery time (hour) for every zone in days + scope in future diff --git a/db/routines/vn/procedures/zoneGeo_calcTree.sql b/db/routines/vn/procedures/zoneGeo_calcTree.sql index 34e1d8241..cf241e82e 100644 --- a/db/routines/vn/procedures/zoneGeo_calcTree.sql +++ b/db/routines/vn/procedures/zoneGeo_calcTree.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTree`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of diff --git a/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql b/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql index da499ede3..195355280 100644 --- a/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql +++ b/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTreeRec`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, diff --git a/db/routines/vn/procedures/zoneGeo_checkName.sql b/db/routines/vn/procedures/zoneGeo_checkName.sql index 5933f4be2..998728120 100644 --- a/db/routines/vn/procedures/zoneGeo_checkName.sql +++ b/db/routines/vn/procedures/zoneGeo_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_checkName`(vName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_checkName`(vName VARCHAR(255)) BEGIN IF vName = '' THEN SIGNAL SQLSTATE '45000' diff --git a/db/routines/vn/procedures/zoneGeo_delete.sql b/db/routines/vn/procedures/zoneGeo_delete.sql index 5bf0c5120..83055d383 100644 --- a/db/routines/vn/procedures/zoneGeo_delete.sql +++ b/db/routines/vn/procedures/zoneGeo_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_delete`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_delete`(vSelf INT) BEGIN /** * Deletes a node from the #zoneGeo table. Also sets a mark diff --git a/db/routines/vn/procedures/zoneGeo_doCalc.sql b/db/routines/vn/procedures/zoneGeo_doCalc.sql index ce32357ec..748a33ed0 100644 --- a/db/routines/vn/procedures/zoneGeo_doCalc.sql +++ b/db/routines/vn/procedures/zoneGeo_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_doCalc`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_doCalc`() proc: BEGIN /** * Recalculates the zones tree. diff --git a/db/routines/vn/procedures/zoneGeo_setParent.sql b/db/routines/vn/procedures/zoneGeo_setParent.sql index 3f8f051a2..54b56d19f 100644 --- a/db/routines/vn/procedures/zoneGeo_setParent.sql +++ b/db/routines/vn/procedures/zoneGeo_setParent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_setParent`(vSelf INT, vParentFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_setParent`(vSelf INT, vParentFk INT) BEGIN /** * Updates the parent of a node. Also sets a mark diff --git a/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql b/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql index 0b5c8aecf..665e14080 100644 --- a/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql +++ b/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zoneGeo_throwNotEditable`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_throwNotEditable`() BEGIN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Column `geoFk` cannot be modified'; diff --git a/db/routines/vn/procedures/zone_excludeFromGeo.sql b/db/routines/vn/procedures/zone_excludeFromGeo.sql index 6f0556bd7..a105a2d84 100644 --- a/db/routines/vn/procedures/zone_excludeFromGeo.sql +++ b/db/routines/vn/procedures/zone_excludeFromGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_excludeFromGeo`(vZoneGeo INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_excludeFromGeo`(vZoneGeo INT) BEGIN /** * Excluye zonas a partir un geoFk. diff --git a/db/routines/vn/procedures/zone_getAddresses.sql b/db/routines/vn/procedures/zone_getAddresses.sql index ce7b0204e..8ea003f35 100644 --- a/db/routines/vn/procedures/zone_getAddresses.sql +++ b/db/routines/vn/procedures/zone_getAddresses.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getAddresses`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAddresses`( vSelf INT, vLanded DATE ) diff --git a/db/routines/vn/procedures/zone_getAgency.sql b/db/routines/vn/procedures/zone_getAgency.sql index 8b66b110b..7f6aed3a3 100644 --- a/db/routines/vn/procedures/zone_getAgency.sql +++ b/db/routines/vn/procedures/zone_getAgency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getAgency`(vAddress INT, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAgency`(vAddress INT, vLanded DATE) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha diff --git a/db/routines/vn/procedures/zone_getAvailable.sql b/db/routines/vn/procedures/zone_getAvailable.sql index 4fd3d1b34..90a8c292f 100644 --- a/db/routines/vn/procedures/zone_getAvailable.sql +++ b/db/routines/vn/procedures/zone_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getAvailable`(vAddress INT, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAvailable`(vAddress INT, vLanded DATE) BEGIN CALL zone_getFromGeo(address_getGeo(vAddress)); CALL zone_getOptionsForLanding(vLanded, FALSE); diff --git a/db/routines/vn/procedures/zone_getClosed.sql b/db/routines/vn/procedures/zone_getClosed.sql index f48e6ff44..3e2b7beff 100644 --- a/db/routines/vn/procedures/zone_getClosed.sql +++ b/db/routines/vn/procedures/zone_getClosed.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getClosed`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getClosed`() proc:BEGIN /** * Devuelve una tabla con las zonas cerradas para hoy diff --git a/db/routines/vn/procedures/zone_getCollisions.sql b/db/routines/vn/procedures/zone_getCollisions.sql index e28b2b341..87cfbf534 100644 --- a/db/routines/vn/procedures/zone_getCollisions.sql +++ b/db/routines/vn/procedures/zone_getCollisions.sql @@ -1,6 +1,6 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getCollisions`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getCollisions`() BEGIN /** * Calcula si para un mismo codigo postal y dia diff --git a/db/routines/vn/procedures/zone_getEvents.sql b/db/routines/vn/procedures/zone_getEvents.sql index 53e065083..417d87959 100644 --- a/db/routines/vn/procedures/zone_getEvents.sql +++ b/db/routines/vn/procedures/zone_getEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getEvents`( +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getEvents`( vGeoFk INT, vAgencyModeFk INT) BEGIN diff --git a/db/routines/vn/procedures/zone_getFromGeo.sql b/db/routines/vn/procedures/zone_getFromGeo.sql index fe6be86a7..52f53c9ad 100644 --- a/db/routines/vn/procedures/zone_getFromGeo.sql +++ b/db/routines/vn/procedures/zone_getFromGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getFromGeo`(vGeoFk INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getFromGeo`(vGeoFk INT) BEGIN /** * Returns all zones which have the passed geo included. diff --git a/db/routines/vn/procedures/zone_getLanded.sql b/db/routines/vn/procedures/zone_getLanded.sql index b75f409b9..e79f2a7a6 100644 --- a/db/routines/vn/procedures/zone_getLanded.sql +++ b/db/routines/vn/procedures/zone_getLanded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve una tabla temporal con el dia de recepcion para vShipped. diff --git a/db/routines/vn/procedures/zone_getLeaves.sql b/db/routines/vn/procedures/zone_getLeaves.sql index d1e66267e..67b4e7042 100644 --- a/db/routines/vn/procedures/zone_getLeaves.sql +++ b/db/routines/vn/procedures/zone_getLeaves.sql @@ -1,10 +1,10 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getLeaves`( +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getLeaves`( vSelf INT, vParentFk INT, vSearch VARCHAR(255), vHasInsert BOOL -) +) BEGIN /** * Devuelve las ubicaciones incluidas en la ruta y que sean hijos de parentFk. @@ -119,5 +119,5 @@ BEGIN END IF; DROP TEMPORARY TABLE tNodes, tZones; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/zone_getOptionsForLanding.sql b/db/routines/vn/procedures/zone_getOptionsForLanding.sql index 1c12e8c88..5b4310c40 100644 --- a/db/routines/vn/procedures/zone_getOptionsForLanding.sql +++ b/db/routines/vn/procedures/zone_getOptionsForLanding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and delivery date. diff --git a/db/routines/vn/procedures/zone_getOptionsForShipment.sql b/db/routines/vn/procedures/zone_getOptionsForShipment.sql index ec7824303..00f5a593d 100644 --- a/db/routines/vn/procedures/zone_getOptionsForShipment.sql +++ b/db/routines/vn/procedures/zone_getOptionsForShipment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and shipping date. diff --git a/db/routines/vn/procedures/zone_getPostalCode.sql b/db/routines/vn/procedures/zone_getPostalCode.sql index 920ad3171..e733c0640 100644 --- a/db/routines/vn/procedures/zone_getPostalCode.sql +++ b/db/routines/vn/procedures/zone_getPostalCode.sql @@ -1,5 +1,5 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getPostalCode`(vSelf INT) +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getPostalCode`(vSelf INT) BEGIN /** * Devuelve los códigos postales incluidos en una zona @@ -42,5 +42,5 @@ BEGIN DELETE FROM tmp.zoneNodes WHERE sons > 0; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/zone_getShipped.sql b/db/routines/vn/procedures/zone_getShipped.sql index 8d28c9062..40013017f 100644 --- a/db/routines/vn/procedures/zone_getShipped.sql +++ b/db/routines/vn/procedures/zone_getShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve la mínima fecha de envío para cada warehouse diff --git a/db/routines/vn/procedures/zone_getState.sql b/db/routines/vn/procedures/zone_getState.sql index aa61d08a2..310280af1 100644 --- a/db/routines/vn/procedures/zone_getState.sql +++ b/db/routines/vn/procedures/zone_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getState`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getState`(vDated DATE) BEGIN /** * Devuelve las zonas y el estado para la fecha solicitada diff --git a/db/routines/vn/procedures/zone_getWarehouse.sql b/db/routines/vn/procedures/zone_getWarehouse.sql index b6915a302..46a7f2eaf 100644 --- a/db/routines/vn/procedures/zone_getWarehouse.sql +++ b/db/routines/vn/procedures/zone_getWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha, diff --git a/db/routines/vn/procedures/zone_upcomingDeliveries.sql b/db/routines/vn/procedures/zone_upcomingDeliveries.sql index 96c4136ae..273f71e4e 100644 --- a/db/routines/vn/procedures/zone_upcomingDeliveries.sql +++ b/db/routines/vn/procedures/zone_upcomingDeliveries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_upcomingDeliveries`() +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_upcomingDeliveries`() BEGIN DECLARE vForwardDays INT; diff --git a/db/routines/vn/triggers/XDiario_beforeInsert.sql b/db/routines/vn/triggers/XDiario_beforeInsert.sql index bc89e221f..1fa7ca75c 100644 --- a/db/routines/vn/triggers/XDiario_beforeInsert.sql +++ b/db/routines/vn/triggers/XDiario_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`XDiario_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`XDiario_beforeInsert` BEFORE INSERT ON `XDiario` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/XDiario_beforeUpdate.sql b/db/routines/vn/triggers/XDiario_beforeUpdate.sql index 33787c8f1..1cf9c34e5 100644 --- a/db/routines/vn/triggers/XDiario_beforeUpdate.sql +++ b/db/routines/vn/triggers/XDiario_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`XDiario_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`XDiario_beforeUpdate` BEFORE UPDATE ON `XDiario` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql b/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql index 4fedd62b8..5bbd8f273 100644 --- a/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql +++ b/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`accountReconciliation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`accountReconciliation_beforeInsert` BEFORE INSERT ON `accountReconciliation` FOR EACH ROW diff --git a/db/routines/vn/triggers/address_afterDelete.sql b/db/routines/vn/triggers/address_afterDelete.sql index d4195d48d..834caa3ff 100644 --- a/db/routines/vn/triggers/address_afterDelete.sql +++ b/db/routines/vn/triggers/address_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`address_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterDelete` AFTER DELETE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_afterInsert.sql b/db/routines/vn/triggers/address_afterInsert.sql index 318fd3958..e4dfb0db9 100644 --- a/db/routines/vn/triggers/address_afterInsert.sql +++ b/db/routines/vn/triggers/address_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`address_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterInsert` BEFORE INSERT ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_afterUpdate.sql b/db/routines/vn/triggers/address_afterUpdate.sql index ab5e03882..6b936e5ef 100644 --- a/db/routines/vn/triggers/address_afterUpdate.sql +++ b/db/routines/vn/triggers/address_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`address_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterUpdate` AFTER UPDATE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_beforeInsert.sql b/db/routines/vn/triggers/address_beforeInsert.sql index 2ef582499..ba85f7a2c 100644 --- a/db/routines/vn/triggers/address_beforeInsert.sql +++ b/db/routines/vn/triggers/address_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`address_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_beforeInsert` BEFORE INSERT ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_beforeUpdate.sql b/db/routines/vn/triggers/address_beforeUpdate.sql index 8922105e7..79fe0fed4 100644 --- a/db/routines/vn/triggers/address_beforeUpdate.sql +++ b/db/routines/vn/triggers/address_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`address_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_beforeUpdate` BEFORE UPDATE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/agency_afterInsert.sql b/db/routines/vn/triggers/agency_afterInsert.sql index 35670538b..143e2d4fc 100644 --- a/db/routines/vn/triggers/agency_afterInsert.sql +++ b/db/routines/vn/triggers/agency_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`agency_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`agency_afterInsert` AFTER INSERT ON `agency` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/agency_beforeInsert.sql b/db/routines/vn/triggers/agency_beforeInsert.sql index 8ff3958e1..6c183a603 100644 --- a/db/routines/vn/triggers/agency_beforeInsert.sql +++ b/db/routines/vn/triggers/agency_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`agency_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`agency_beforeInsert` BEFORE INSERT ON `agency` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_afterDelete.sql b/db/routines/vn/triggers/autonomy_afterDelete.sql index f278ccdea..1d36ca385 100644 --- a/db/routines/vn/triggers/autonomy_afterDelete.sql +++ b/db/routines/vn/triggers/autonomy_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`autonomy_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_afterDelete` AFTER DELETE ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_beforeInsert.sql b/db/routines/vn/triggers/autonomy_beforeInsert.sql index 3a6448b81..9ccdd6972 100644 --- a/db/routines/vn/triggers/autonomy_beforeInsert.sql +++ b/db/routines/vn/triggers/autonomy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`autonomy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_beforeInsert` BEFORE INSERT ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_beforeUpdate.sql b/db/routines/vn/triggers/autonomy_beforeUpdate.sql index a2c9a2a11..f4e082505 100644 --- a/db/routines/vn/triggers/autonomy_beforeUpdate.sql +++ b/db/routines/vn/triggers/autonomy_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`autonomy_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_beforeUpdate` BEFORE UPDATE ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql b/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql index fd7f4c6e7..99d17805c 100644 --- a/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql +++ b/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`awbInvoiceIn_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`awbInvoiceIn_afterDelete` AFTER DELETE ON `awbInvoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/awb_beforeInsert.sql b/db/routines/vn/triggers/awb_beforeInsert.sql index 8dc216024..f19d1fd3c 100644 --- a/db/routines/vn/triggers/awb_beforeInsert.sql +++ b/db/routines/vn/triggers/awb_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`awb_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`awb_beforeInsert` BEFORE INSERT ON `awb` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/bankEntity_beforeInsert.sql b/db/routines/vn/triggers/bankEntity_beforeInsert.sql index 6c1ce78a7..cfbd2bf6a 100644 --- a/db/routines/vn/triggers/bankEntity_beforeInsert.sql +++ b/db/routines/vn/triggers/bankEntity_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`bankEntity_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`bankEntity_beforeInsert` BEFORE INSERT ON `bankEntity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/bankEntity_beforeUpdate.sql b/db/routines/vn/triggers/bankEntity_beforeUpdate.sql index 5bea154a2..a24b5f5ce 100644 --- a/db/routines/vn/triggers/bankEntity_beforeUpdate.sql +++ b/db/routines/vn/triggers/bankEntity_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`bankEntity_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`bankEntity_beforeUpdate` BEFORE UPDATE ON `bankEntity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/budgetNotes_beforeInsert.sql b/db/routines/vn/triggers/budgetNotes_beforeInsert.sql index 6ea5ad5eb..c432694d5 100644 --- a/db/routines/vn/triggers/budgetNotes_beforeInsert.sql +++ b/db/routines/vn/triggers/budgetNotes_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`budgetNotes_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`budgetNotes_beforeInsert` BEFORE INSERT ON `budgetNotes` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterDelete.sql b/db/routines/vn/triggers/business_afterDelete.sql index 9b897b4e9..fab217ab1 100644 --- a/db/routines/vn/triggers/business_afterDelete.sql +++ b/db/routines/vn/triggers/business_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`business_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterDelete` AFTER DELETE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterInsert.sql b/db/routines/vn/triggers/business_afterInsert.sql index 2949eede8..599a041f4 100644 --- a/db/routines/vn/triggers/business_afterInsert.sql +++ b/db/routines/vn/triggers/business_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`business_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterInsert` AFTER INSERT ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterUpdate.sql b/db/routines/vn/triggers/business_afterUpdate.sql index 95746a30d..1e6458a56 100644 --- a/db/routines/vn/triggers/business_afterUpdate.sql +++ b/db/routines/vn/triggers/business_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`business_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterUpdate` AFTER UPDATE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_beforeInsert.sql b/db/routines/vn/triggers/business_beforeInsert.sql index 1f136c1e8..02d577e71 100644 --- a/db/routines/vn/triggers/business_beforeInsert.sql +++ b/db/routines/vn/triggers/business_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`business_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_beforeInsert` BEFORE INSERT ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_beforeUpdate.sql b/db/routines/vn/triggers/business_beforeUpdate.sql index 7dc69bc75..33a5a51bb 100644 --- a/db/routines/vn/triggers/business_beforeUpdate.sql +++ b/db/routines/vn/triggers/business_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`business_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_beforeUpdate` BEFORE UPDATE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/buy_afterDelete.sql b/db/routines/vn/triggers/buy_afterDelete.sql index 5daaefa33..e0f5e238f 100644 --- a/db/routines/vn/triggers/buy_afterDelete.sql +++ b/db/routines/vn/triggers/buy_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterDelete` AFTER DELETE ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_afterInsert.sql b/db/routines/vn/triggers/buy_afterInsert.sql index b39842d35..8c5cdaaa4 100644 --- a/db/routines/vn/triggers/buy_afterInsert.sql +++ b/db/routines/vn/triggers/buy_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterInsert` AFTER INSERT ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_afterUpdate.sql b/db/routines/vn/triggers/buy_afterUpdate.sql index fc7ca152d..e6b1a8bdc 100644 --- a/db/routines/vn/triggers/buy_afterUpdate.sql +++ b/db/routines/vn/triggers/buy_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterUpdate` AFTER UPDATE ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_beforeDelete.sql b/db/routines/vn/triggers/buy_beforeDelete.sql index 1bbeadec9..2c58d3e8b 100644 --- a/db/routines/vn/triggers/buy_beforeDelete.sql +++ b/db/routines/vn/triggers/buy_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeDelete` BEFORE DELETE ON `buy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/buy_beforeInsert.sql b/db/routines/vn/triggers/buy_beforeInsert.sql index 39befcaf1..18d2288c2 100644 --- a/db/routines/vn/triggers/buy_beforeInsert.sql +++ b/db/routines/vn/triggers/buy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeInsert` BEFORE INSERT ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_beforeUpdate.sql b/db/routines/vn/triggers/buy_beforeUpdate.sql index 1e2faecdc..df8666381 100644 --- a/db/routines/vn/triggers/buy_beforeUpdate.sql +++ b/db/routines/vn/triggers/buy_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeUpdate` BEFORE UPDATE ON `buy` FOR EACH ROW trig:BEGIN diff --git a/db/routines/vn/triggers/calendar_afterDelete.sql b/db/routines/vn/triggers/calendar_afterDelete.sql index 5d0114ea8..53a45788b 100644 --- a/db/routines/vn/triggers/calendar_afterDelete.sql +++ b/db/routines/vn/triggers/calendar_afterDelete.sql @@ -1,12 +1,12 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`calendar_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_afterDelete` AFTER DELETE ON `calendar` FOR EACH ROW -BEGIN - INSERT INTO workerLog - SET `action` = 'delete', - `changedModel` = 'Calendar', - `changedModelId` = OLD.id, - `userFk` = account.myUser_getId(); +BEGIN + INSERT INTO workerLog + SET `action` = 'delete', + `changedModel` = 'Calendar', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/calendar_beforeInsert.sql b/db/routines/vn/triggers/calendar_beforeInsert.sql index 3e265a099..3ff6a714e 100644 --- a/db/routines/vn/triggers/calendar_beforeInsert.sql +++ b/db/routines/vn/triggers/calendar_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`calendar_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_beforeInsert` BEFORE INSERT ON `calendar` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/calendar_beforeUpdate.sql b/db/routines/vn/triggers/calendar_beforeUpdate.sql index f015dc29a..b94577035 100644 --- a/db/routines/vn/triggers/calendar_beforeUpdate.sql +++ b/db/routines/vn/triggers/calendar_beforeUpdate.sql @@ -1,8 +1,8 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`calendar_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_beforeUpdate` BEFORE UPDATE ON `calendar` FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +BEGIN + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/claimBeginning_afterDelete.sql b/db/routines/vn/triggers/claimBeginning_afterDelete.sql index 5e12d9feb..378ddf3e9 100644 --- a/db/routines/vn/triggers/claimBeginning_afterDelete.sql +++ b/db/routines/vn/triggers/claimBeginning_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimBeginning_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_afterDelete` AFTER DELETE ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimBeginning_beforeInsert.sql b/db/routines/vn/triggers/claimBeginning_beforeInsert.sql index f6ad1672b..bea886c12 100644 --- a/db/routines/vn/triggers/claimBeginning_beforeInsert.sql +++ b/db/routines/vn/triggers/claimBeginning_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimBeginning_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_beforeInsert` BEFORE INSERT ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql b/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql index 500d08cb6..a5b88941d 100644 --- a/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimBeginning_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_beforeUpdate` BEFORE UPDATE ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_afterDelete.sql b/db/routines/vn/triggers/claimDevelopment_afterDelete.sql index 90b1e89eb..867ab2237 100644 --- a/db/routines/vn/triggers/claimDevelopment_afterDelete.sql +++ b/db/routines/vn/triggers/claimDevelopment_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDevelopment_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_afterDelete` AFTER DELETE ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql b/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql index 15ec36138..ae51ba446 100644 --- a/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql +++ b/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeInsert` BEFORE INSERT ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql b/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql index b0727adb3..04e5156cc 100644 --- a/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeUpdate` BEFORE UPDATE ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_afterDelete.sql b/db/routines/vn/triggers/claimDms_afterDelete.sql index 53bf819e2..7e5f1eeac 100644 --- a/db/routines/vn/triggers/claimDms_afterDelete.sql +++ b/db/routines/vn/triggers/claimDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_afterDelete` AFTER DELETE ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_beforeInsert.sql b/db/routines/vn/triggers/claimDms_beforeInsert.sql index bb84e7a81..850fa680c 100644 --- a/db/routines/vn/triggers/claimDms_beforeInsert.sql +++ b/db/routines/vn/triggers/claimDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_beforeInsert` BEFORE INSERT ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_beforeUpdate.sql b/db/routines/vn/triggers/claimDms_beforeUpdate.sql index 8ffab268e..b8047066a 100644 --- a/db/routines/vn/triggers/claimDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_beforeUpdate` BEFORE UPDATE ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_afterDelete.sql b/db/routines/vn/triggers/claimEnd_afterDelete.sql index dee80fc77..a825fc17c 100644 --- a/db/routines/vn/triggers/claimEnd_afterDelete.sql +++ b/db/routines/vn/triggers/claimEnd_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimEnd_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_afterDelete` AFTER DELETE ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_beforeInsert.sql b/db/routines/vn/triggers/claimEnd_beforeInsert.sql index beb66c297..408c66f7b 100644 --- a/db/routines/vn/triggers/claimEnd_beforeInsert.sql +++ b/db/routines/vn/triggers/claimEnd_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimEnd_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_beforeInsert` BEFORE INSERT ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_beforeUpdate.sql b/db/routines/vn/triggers/claimEnd_beforeUpdate.sql index 7e91996dd..ff4e736a2 100644 --- a/db/routines/vn/triggers/claimEnd_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimEnd_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimEnd_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_beforeUpdate` BEFORE UPDATE ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_afterDelete.sql b/db/routines/vn/triggers/claimObservation_afterDelete.sql index b61368310..c0230c98c 100644 --- a/db/routines/vn/triggers/claimObservation_afterDelete.sql +++ b/db/routines/vn/triggers/claimObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_afterDelete` AFTER DELETE ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_beforeInsert.sql b/db/routines/vn/triggers/claimObservation_beforeInsert.sql index e6cf4a42a..6ea6d84b0 100644 --- a/db/routines/vn/triggers/claimObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/claimObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_beforeInsert` BEFORE INSERT ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_beforeUpdate.sql b/db/routines/vn/triggers/claimObservation_beforeUpdate.sql index 79008eb1b..84e71eb14 100644 --- a/db/routines/vn/triggers/claimObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_beforeUpdate` BEFORE UPDATE ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimRatio_afterInsert.sql b/db/routines/vn/triggers/claimRatio_afterInsert.sql index ca618bb89..5ba1a0893 100644 --- a/db/routines/vn/triggers/claimRatio_afterInsert.sql +++ b/db/routines/vn/triggers/claimRatio_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimRatio_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimRatio_afterInsert` AFTER INSERT ON `claimRatio` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimRatio_afterUpdate.sql b/db/routines/vn/triggers/claimRatio_afterUpdate.sql index daae7ecf0..0781d1345 100644 --- a/db/routines/vn/triggers/claimRatio_afterUpdate.sql +++ b/db/routines/vn/triggers/claimRatio_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate` AFTER UPDATE ON `claimRatio` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_afterDelete.sql b/db/routines/vn/triggers/claimState_afterDelete.sql index 00c0a203d..41c103bba 100644 --- a/db/routines/vn/triggers/claimState_afterDelete.sql +++ b/db/routines/vn/triggers/claimState_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimState_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_afterDelete` AFTER DELETE ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_beforeInsert.sql b/db/routines/vn/triggers/claimState_beforeInsert.sql index e289e8067..cd2071d7b 100644 --- a/db/routines/vn/triggers/claimState_beforeInsert.sql +++ b/db/routines/vn/triggers/claimState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_beforeInsert` BEFORE INSERT ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_beforeUpdate.sql b/db/routines/vn/triggers/claimState_beforeUpdate.sql index 53c8c254b..f343d6f73 100644 --- a/db/routines/vn/triggers/claimState_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimState_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimState_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_beforeUpdate` BEFORE UPDATE ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_afterDelete.sql b/db/routines/vn/triggers/claim_afterDelete.sql index bd01ad80f..fb86e2670 100644 --- a/db/routines/vn/triggers/claim_afterDelete.sql +++ b/db/routines/vn/triggers/claim_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claim_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_afterDelete` AFTER DELETE ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_beforeInsert.sql b/db/routines/vn/triggers/claim_beforeInsert.sql index 36f73902b..65eb12c00 100644 --- a/db/routines/vn/triggers/claim_beforeInsert.sql +++ b/db/routines/vn/triggers/claim_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claim_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_beforeInsert` BEFORE INSERT ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_beforeUpdate.sql b/db/routines/vn/triggers/claim_beforeUpdate.sql index 9dec746ad..995091bd8 100644 --- a/db/routines/vn/triggers/claim_beforeUpdate.sql +++ b/db/routines/vn/triggers/claim_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claim_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_beforeUpdate` BEFORE UPDATE ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientContact_afterDelete.sql b/db/routines/vn/triggers/clientContact_afterDelete.sql index b138a0957..b1ba5044f 100644 --- a/db/routines/vn/triggers/clientContact_afterDelete.sql +++ b/db/routines/vn/triggers/clientContact_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientContact_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientContact_afterDelete` AFTER DELETE ON `clientContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientContact_beforeInsert.sql b/db/routines/vn/triggers/clientContact_beforeInsert.sql index 7ddf4d7dd..6e1421532 100644 --- a/db/routines/vn/triggers/clientContact_beforeInsert.sql +++ b/db/routines/vn/triggers/clientContact_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientContact_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientContact_beforeInsert` BEFORE INSERT ON `clientContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientCredit_afterInsert.sql b/db/routines/vn/triggers/clientCredit_afterInsert.sql index 440f24865..e7f518be4 100644 --- a/db/routines/vn/triggers/clientCredit_afterInsert.sql +++ b/db/routines/vn/triggers/clientCredit_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientCredit_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientCredit_afterInsert` AFTER INSERT ON `clientCredit` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_afterDelete.sql b/db/routines/vn/triggers/clientDms_afterDelete.sql index 9b6fb4876..afc8db83b 100644 --- a/db/routines/vn/triggers/clientDms_afterDelete.sql +++ b/db/routines/vn/triggers/clientDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_afterDelete` AFTER DELETE ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_beforeInsert.sql b/db/routines/vn/triggers/clientDms_beforeInsert.sql index 011cc6e96..4f9d5d760 100644 --- a/db/routines/vn/triggers/clientDms_beforeInsert.sql +++ b/db/routines/vn/triggers/clientDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_beforeInsert` BEFORE INSERT ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_beforeUpdate.sql b/db/routines/vn/triggers/clientDms_beforeUpdate.sql index 56eaec7eb..41dd7abf8 100644 --- a/db/routines/vn/triggers/clientDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_beforeUpdate` BEFORE UPDATE ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_afterDelete.sql b/db/routines/vn/triggers/clientObservation_afterDelete.sql index c93564aa5..8fed5d711 100644 --- a/db/routines/vn/triggers/clientObservation_afterDelete.sql +++ b/db/routines/vn/triggers/clientObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_afterDelete` AFTER DELETE ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_beforeInsert.sql b/db/routines/vn/triggers/clientObservation_beforeInsert.sql index 684873031..8eb674fce 100644 --- a/db/routines/vn/triggers/clientObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/clientObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_beforeInsert` BEFORE INSERT ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_beforeUpdate.sql b/db/routines/vn/triggers/clientObservation_beforeUpdate.sql index 6e0b63794..a1f7e0005 100644 --- a/db/routines/vn/triggers/clientObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_beforeUpdate` BEFORE UPDATE ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_afterDelete.sql b/db/routines/vn/triggers/clientSample_afterDelete.sql index 1ac9e77be..846c529fc 100644 --- a/db/routines/vn/triggers/clientSample_afterDelete.sql +++ b/db/routines/vn/triggers/clientSample_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientSample_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_afterDelete` AFTER DELETE ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_beforeInsert.sql b/db/routines/vn/triggers/clientSample_beforeInsert.sql index c7fe43c9b..c8c8ccf3d 100644 --- a/db/routines/vn/triggers/clientSample_beforeInsert.sql +++ b/db/routines/vn/triggers/clientSample_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientSample_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_beforeInsert` BEFORE INSERT ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_beforeUpdate.sql b/db/routines/vn/triggers/clientSample_beforeUpdate.sql index 5c16950b5..33f028f72 100644 --- a/db/routines/vn/triggers/clientSample_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientSample_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientSample_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_beforeUpdate` BEFORE UPDATE ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql b/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql index 279a81b73..5e88d4ec4 100644 --- a/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql +++ b/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeInsert` BEFORE INSERT ON `clientUnpaid` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql b/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql index 13cac3fa7..15676f317 100644 --- a/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeUpdate` BEFORE UPDATE ON `clientUnpaid` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterDelete.sql b/db/routines/vn/triggers/client_afterDelete.sql index e6849ef49..23b736bd2 100644 --- a/db/routines/vn/triggers/client_afterDelete.sql +++ b/db/routines/vn/triggers/client_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`client_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterDelete` AFTER DELETE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterInsert.sql b/db/routines/vn/triggers/client_afterInsert.sql index 764d8f067..2178f5f30 100644 --- a/db/routines/vn/triggers/client_afterInsert.sql +++ b/db/routines/vn/triggers/client_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`client_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterInsert` AFTER INSERT ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterUpdate.sql b/db/routines/vn/triggers/client_afterUpdate.sql index a2a3e48e3..4c9219ab8 100644 --- a/db/routines/vn/triggers/client_afterUpdate.sql +++ b/db/routines/vn/triggers/client_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`client_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterUpdate` AFTER UPDATE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_beforeInsert.sql b/db/routines/vn/triggers/client_beforeInsert.sql index 75b69c7dd..da6d3c02b 100644 --- a/db/routines/vn/triggers/client_beforeInsert.sql +++ b/db/routines/vn/triggers/client_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`client_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_beforeInsert` BEFORE INSERT ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_beforeUpdate.sql b/db/routines/vn/triggers/client_beforeUpdate.sql index 914ae5b8a..d1cea1be1 100644 --- a/db/routines/vn/triggers/client_beforeUpdate.sql +++ b/db/routines/vn/triggers/client_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`client_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_beforeUpdate` BEFORE UPDATE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/cmr_beforeDelete.sql b/db/routines/vn/triggers/cmr_beforeDelete.sql index 2cb789244..85622b86a 100644 --- a/db/routines/vn/triggers/cmr_beforeDelete.sql +++ b/db/routines/vn/triggers/cmr_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`cmr_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`cmr_beforeDelete` BEFORE DELETE ON `cmr` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionColors_beforeInsert.sql b/db/routines/vn/triggers/collectionColors_beforeInsert.sql index 254529932..db1201b6e 100644 --- a/db/routines/vn/triggers/collectionColors_beforeInsert.sql +++ b/db/routines/vn/triggers/collectionColors_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collectionColors_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionColors_beforeInsert` BEFORE INSERT ON `collectionColors` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionColors_beforeUpdate.sql b/db/routines/vn/triggers/collectionColors_beforeUpdate.sql index 1ee83ab74..5435bca3f 100644 --- a/db/routines/vn/triggers/collectionColors_beforeUpdate.sql +++ b/db/routines/vn/triggers/collectionColors_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collectionColors_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionColors_beforeUpdate` BEFORE UPDATE ON `collectionColors` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql b/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql index 53c6340ee..49ac2d677 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterDelete` AFTER DELETE ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql b/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql index 9f061742c..f76636fe8 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterInsert` AFTER INSERT ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql b/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql index 6dc4311c5..c25f23ebb 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterUpdate` AFTER UPDATE ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collection_beforeUpdate.sql b/db/routines/vn/triggers/collection_beforeUpdate.sql index 40a0b7bed..aa3bc0590 100644 --- a/db/routines/vn/triggers/collection_beforeUpdate.sql +++ b/db/routines/vn/triggers/collection_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`collection_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collection_beforeUpdate` BEFORE UPDATE ON `collection` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterDelete.sql b/db/routines/vn/triggers/country_afterDelete.sql index 30fbfc817..599ca305e 100644 --- a/db/routines/vn/triggers/country_afterDelete.sql +++ b/db/routines/vn/triggers/country_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterDelete` AFTER DELETE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterInsert.sql b/db/routines/vn/triggers/country_afterInsert.sql index 69294a9d5..337ecfbf9 100644 --- a/db/routines/vn/triggers/country_afterInsert.sql +++ b/db/routines/vn/triggers/country_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterInsert` AFTER INSERT ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterUpdate.sql b/db/routines/vn/triggers/country_afterUpdate.sql index a38994735..f0de13169 100644 --- a/db/routines/vn/triggers/country_afterUpdate.sql +++ b/db/routines/vn/triggers/country_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterUpdate` AFTER UPDATE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_beforeInsert.sql b/db/routines/vn/triggers/country_beforeInsert.sql index 5ba5b832d..b6d73ff64 100644 --- a/db/routines/vn/triggers/country_beforeInsert.sql +++ b/db/routines/vn/triggers/country_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_beforeInsert` BEFORE INSERT ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_beforeUpdate.sql b/db/routines/vn/triggers/country_beforeUpdate.sql index 31de99f34..2050bfdad 100644 --- a/db/routines/vn/triggers/country_beforeUpdate.sql +++ b/db/routines/vn/triggers/country_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_beforeUpdate` BEFORE UPDATE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditClassification_beforeUpdate.sql b/db/routines/vn/triggers/creditClassification_beforeUpdate.sql index 410ce2bc4..84fd5d0c7 100644 --- a/db/routines/vn/triggers/creditClassification_beforeUpdate.sql +++ b/db/routines/vn/triggers/creditClassification_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`creditClassification_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditClassification_beforeUpdate` BEFORE UPDATE ON `creditClassification` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditInsurance_afterInsert.sql b/db/routines/vn/triggers/creditInsurance_afterInsert.sql index 22f94854b..f5e808ace 100644 --- a/db/routines/vn/triggers/creditInsurance_afterInsert.sql +++ b/db/routines/vn/triggers/creditInsurance_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`creditInsurance_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditInsurance_afterInsert` AFTER INSERT ON `creditInsurance` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditInsurance_beforeInsert.sql b/db/routines/vn/triggers/creditInsurance_beforeInsert.sql index 51ab223b1..413d0d689 100644 --- a/db/routines/vn/triggers/creditInsurance_beforeInsert.sql +++ b/db/routines/vn/triggers/creditInsurance_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`creditInsurance_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditInsurance_beforeInsert` BEFORE INSERT ON `creditInsurance` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/delivery_beforeInsert.sql b/db/routines/vn/triggers/delivery_beforeInsert.sql index eb4a6f21a..13bf3b513 100644 --- a/db/routines/vn/triggers/delivery_beforeInsert.sql +++ b/db/routines/vn/triggers/delivery_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`delivery_beforeInsert` BEFORE INSERT ON `delivery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/delivery_beforeUpdate.sql b/db/routines/vn/triggers/delivery_beforeUpdate.sql index 6206d4722..922063fe5 100644 --- a/db/routines/vn/triggers/delivery_beforeUpdate.sql +++ b/db/routines/vn/triggers/delivery_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate` BEFORE UPDATE ON `delivery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_afterDelete.sql b/db/routines/vn/triggers/department_afterDelete.sql index 311847556..6fe6a5434 100644 --- a/db/routines/vn/triggers/department_afterDelete.sql +++ b/db/routines/vn/triggers/department_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`department_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_afterDelete` AFTER DELETE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_afterUpdate.sql b/db/routines/vn/triggers/department_afterUpdate.sql index a425e1809..9c7ee4db3 100644 --- a/db/routines/vn/triggers/department_afterUpdate.sql +++ b/db/routines/vn/triggers/department_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`department_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_afterUpdate` AFTER UPDATE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_beforeDelete.sql b/db/routines/vn/triggers/department_beforeDelete.sql index 6eaa5b42e..94389e78b 100644 --- a/db/routines/vn/triggers/department_beforeDelete.sql +++ b/db/routines/vn/triggers/department_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`department_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_beforeDelete` BEFORE DELETE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_beforeInsert.sql b/db/routines/vn/triggers/department_beforeInsert.sql index 6bd6617ae..8880f3f04 100644 --- a/db/routines/vn/triggers/department_beforeInsert.sql +++ b/db/routines/vn/triggers/department_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`department_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_beforeInsert` BEFORE INSERT ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql index 3994520b7..0b8014ee6 100644 --- a/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeInsert` BEFORE INSERT ON `deviceProductionModels` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql index 01c8d347e..8498df0d9 100644 --- a/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeUpdate` BEFORE UPDATE ON `deviceProductionModels` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql index 1a2a66e10..5e9fe73a7 100644 --- a/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeInsert` BEFORE INSERT ON `deviceProductionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql index e8172fb42..f81753af8 100644 --- a/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeUpdate` BEFORE UPDATE ON `deviceProductionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql b/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql index a95170e9a..7824b3403 100644 --- a/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql +++ b/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterDelete` AFTER DELETE ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql b/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql index 3c8a9a51d..3954292e8 100644 --- a/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql +++ b/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterInsert` AFTER INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql index b392cf5a1..df45cc503 100644 --- a/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeInsert` BEFORE INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql index 7318bd99b..09799a498 100644 --- a/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeUpdate` BEFORE UPDATE ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_afterDelete.sql b/db/routines/vn/triggers/deviceProduction_afterDelete.sql index af2b640e5..5141c23b7 100644 --- a/db/routines/vn/triggers/deviceProduction_afterDelete.sql +++ b/db/routines/vn/triggers/deviceProduction_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProduction_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_afterDelete` AFTER DELETE ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_beforeInsert.sql b/db/routines/vn/triggers/deviceProduction_beforeInsert.sql index 66b5c2aef..28878ce3d 100644 --- a/db/routines/vn/triggers/deviceProduction_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProduction_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProduction_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_beforeInsert` BEFORE INSERT ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql b/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql index 9206195fe..50cabe342 100644 --- a/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProduction_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_beforeUpdate` BEFORE UPDATE ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeDelete.sql b/db/routines/vn/triggers/dms_beforeDelete.sql index 3bbc05ba3..e29074d63 100644 --- a/db/routines/vn/triggers/dms_beforeDelete.sql +++ b/db/routines/vn/triggers/dms_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`dms_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeDelete` BEFORE DELETE ON `dms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeInsert.sql b/db/routines/vn/triggers/dms_beforeInsert.sql index f7877ecb8..5d210dae0 100644 --- a/db/routines/vn/triggers/dms_beforeInsert.sql +++ b/db/routines/vn/triggers/dms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`dms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeInsert` BEFORE INSERT ON `dms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeUpdate.sql b/db/routines/vn/triggers/dms_beforeUpdate.sql index c93659d45..bb2276f51 100644 --- a/db/routines/vn/triggers/dms_beforeUpdate.sql +++ b/db/routines/vn/triggers/dms_beforeUpdate.sql @@ -1,7 +1,7 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`dms_beforeUpdate` - BEFORE UPDATE ON `dms` - FOR EACH ROW +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeUpdate` + BEFORE UPDATE ON `dms` + FOR EACH ROW BEGIN DECLARE vHardCopyNumber INT; @@ -24,5 +24,5 @@ BEGIN SET NEW.hasFile = 0; END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/duaTax_beforeInsert.sql b/db/routines/vn/triggers/duaTax_beforeInsert.sql index 9ca1d970d..8d19b1e34 100644 --- a/db/routines/vn/triggers/duaTax_beforeInsert.sql +++ b/db/routines/vn/triggers/duaTax_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`duaTax_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`duaTax_beforeInsert` BEFORE INSERT ON `duaTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/duaTax_beforeUpdate.sql b/db/routines/vn/triggers/duaTax_beforeUpdate.sql index dca8958a9..21ce9d3b9 100644 --- a/db/routines/vn/triggers/duaTax_beforeUpdate.sql +++ b/db/routines/vn/triggers/duaTax_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`duaTax_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`duaTax_beforeUpdate` BEFORE UPDATE ON `duaTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql b/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql index e42b43ca1..e1543c2b9 100644 --- a/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql +++ b/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterInsert` AFTER INSERT ON `ektEntryAssign` FOR EACH ROW UPDATE entry SET reference = NEW.`ref` WHERE id = NEW.entryFk$$ diff --git a/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql b/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql index 8d2791d0f..64289c28e 100644 --- a/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql +++ b/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterUpdate` AFTER UPDATE ON `ektEntryAssign` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_afterDelete.sql b/db/routines/vn/triggers/entryDms_afterDelete.sql index 9ae8e7058..00167d064 100644 --- a/db/routines/vn/triggers/entryDms_afterDelete.sql +++ b/db/routines/vn/triggers/entryDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_afterDelete` AFTER DELETE ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_beforeInsert.sql b/db/routines/vn/triggers/entryDms_beforeInsert.sql index 4f9550f48..61f78d647 100644 --- a/db/routines/vn/triggers/entryDms_beforeInsert.sql +++ b/db/routines/vn/triggers/entryDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_beforeInsert` BEFORE INSERT ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_beforeUpdate.sql b/db/routines/vn/triggers/entryDms_beforeUpdate.sql index ecc047029..67ccf3577 100644 --- a/db/routines/vn/triggers/entryDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/entryDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_beforeUpdate` BEFORE UPDATE ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_afterDelete.sql b/db/routines/vn/triggers/entryObservation_afterDelete.sql index d143e105a..02903707c 100644 --- a/db/routines/vn/triggers/entryObservation_afterDelete.sql +++ b/db/routines/vn/triggers/entryObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_afterDelete` AFTER DELETE ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_beforeInsert.sql b/db/routines/vn/triggers/entryObservation_beforeInsert.sql index b842aeee7..a8175771e 100644 --- a/db/routines/vn/triggers/entryObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/entryObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_beforeInsert` BEFORE INSERT ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_beforeUpdate.sql b/db/routines/vn/triggers/entryObservation_beforeUpdate.sql index 501631c69..3d6909135 100644 --- a/db/routines/vn/triggers/entryObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/entryObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entryObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_beforeUpdate` BEFORE UPDATE ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_afterDelete.sql b/db/routines/vn/triggers/entry_afterDelete.sql index c723930fa..f509a6e62 100644 --- a/db/routines/vn/triggers/entry_afterDelete.sql +++ b/db/routines/vn/triggers/entry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_afterDelete` AFTER DELETE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_afterUpdate.sql b/db/routines/vn/triggers/entry_afterUpdate.sql index 47d61ed30..a811bc562 100644 --- a/db/routines/vn/triggers/entry_afterUpdate.sql +++ b/db/routines/vn/triggers/entry_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_afterUpdate` AFTER UPDATE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeDelete.sql b/db/routines/vn/triggers/entry_beforeDelete.sql index 5b83daf77..6029af7c1 100644 --- a/db/routines/vn/triggers/entry_beforeDelete.sql +++ b/db/routines/vn/triggers/entry_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeDelete` BEFORE DELETE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeInsert.sql b/db/routines/vn/triggers/entry_beforeInsert.sql index 17831f1b8..6676f17e8 100644 --- a/db/routines/vn/triggers/entry_beforeInsert.sql +++ b/db/routines/vn/triggers/entry_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeInsert` BEFORE INSERT ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeUpdate.sql b/db/routines/vn/triggers/entry_beforeUpdate.sql index 0a161853b..678cc4540 100644 --- a/db/routines/vn/triggers/entry_beforeUpdate.sql +++ b/db/routines/vn/triggers/entry_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeUpdate` BEFORE UPDATE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql b/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql index 419cc2553..20bd9d204 100644 --- a/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionPallet_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionPallet_beforeInsert` BEFORE INSERT ON `expeditionPallet` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionScan_beforeInsert.sql b/db/routines/vn/triggers/expeditionScan_beforeInsert.sql index 1dce8fe9b..9b7170992 100644 --- a/db/routines/vn/triggers/expeditionScan_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionScan_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionScan_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionScan_beforeInsert` BEFORE INSERT ON `expeditionScan` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionState_afterInsert.sql b/db/routines/vn/triggers/expeditionState_afterInsert.sql index 3d8f4130c..0c5b547a9 100644 --- a/db/routines/vn/triggers/expeditionState_afterInsert.sql +++ b/db/routines/vn/triggers/expeditionState_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionState_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionState_afterInsert` AFTER INSERT ON `expeditionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionState_beforeInsert.sql b/db/routines/vn/triggers/expeditionState_beforeInsert.sql index 350240aab..4d7625a82 100644 --- a/db/routines/vn/triggers/expeditionState_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionState_beforeInsert` BEFORE INSERT ON `expeditionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionTruck_beforeInsert.sql b/db/routines/vn/triggers/expeditionTruck_beforeInsert.sql deleted file mode 100644 index 23cba7b3a..000000000 --- a/db/routines/vn/triggers/expeditionTruck_beforeInsert.sql +++ /dev/null @@ -1,10 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionTruck_beforeInsert` - BEFORE INSERT ON `expeditionTruck` - FOR EACH ROW -BEGIN - - SET NEW.description = UCASE(NEW.description); - -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/expeditionTruck_beforeUpdate.sql b/db/routines/vn/triggers/expeditionTruck_beforeUpdate.sql deleted file mode 100644 index 1b3b97238..000000000 --- a/db/routines/vn/triggers/expeditionTruck_beforeUpdate.sql +++ /dev/null @@ -1,10 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expeditionTruck_beforeUpdate` - BEFORE UPDATE ON `expeditionTruck` - FOR EACH ROW -BEGIN - - SET NEW.description = UCASE(NEW.description); - -END$$ -DELIMITER ; diff --git a/db/routines/vn/triggers/expedition_afterDelete.sql b/db/routines/vn/triggers/expedition_afterDelete.sql index e05cbf279..ee60d8f1d 100644 --- a/db/routines/vn/triggers/expedition_afterDelete.sql +++ b/db/routines/vn/triggers/expedition_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_afterDelete` AFTER DELETE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeDelete.sql b/db/routines/vn/triggers/expedition_beforeDelete.sql index cbcc5a3bb..fdf2df772 100644 --- a/db/routines/vn/triggers/expedition_beforeDelete.sql +++ b/db/routines/vn/triggers/expedition_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeDelete` BEFORE DELETE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeInsert.sql b/db/routines/vn/triggers/expedition_beforeInsert.sql index e73ed9e49..d0b86a4cb 100644 --- a/db/routines/vn/triggers/expedition_beforeInsert.sql +++ b/db/routines/vn/triggers/expedition_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeInsert` BEFORE INSERT ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeUpdate.sql b/db/routines/vn/triggers/expedition_beforeUpdate.sql index 870c1a285..e768f5394 100644 --- a/db/routines/vn/triggers/expedition_beforeUpdate.sql +++ b/db/routines/vn/triggers/expedition_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/floramondoConfig_afterInsert.sql b/db/routines/vn/triggers/floramondoConfig_afterInsert.sql index f64cb7878..8d50846a1 100644 --- a/db/routines/vn/triggers/floramondoConfig_afterInsert.sql +++ b/db/routines/vn/triggers/floramondoConfig_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`floramondoConfig_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`floramondoConfig_afterInsert` AFTER INSERT ON `floramondoConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/gregue_beforeInsert.sql b/db/routines/vn/triggers/gregue_beforeInsert.sql index 76e178356..3a8b924bb 100644 --- a/db/routines/vn/triggers/gregue_beforeInsert.sql +++ b/db/routines/vn/triggers/gregue_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`gregue_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`gregue_beforeInsert` BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_afterDelete.sql b/db/routines/vn/triggers/greuge_afterDelete.sql index 947359b4c..0e7f1a2d3 100644 --- a/db/routines/vn/triggers/greuge_afterDelete.sql +++ b/db/routines/vn/triggers/greuge_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`greuge_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_afterDelete` AFTER DELETE ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_beforeInsert.sql b/db/routines/vn/triggers/greuge_beforeInsert.sql index 100f2f244..6bc0a4767 100644 --- a/db/routines/vn/triggers/greuge_beforeInsert.sql +++ b/db/routines/vn/triggers/greuge_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`greuge_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_beforeInsert` BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_beforeUpdate.sql b/db/routines/vn/triggers/greuge_beforeUpdate.sql index 265861db5..5b1ced296 100644 --- a/db/routines/vn/triggers/greuge_beforeUpdate.sql +++ b/db/routines/vn/triggers/greuge_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`greuge_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_beforeUpdate` BEFORE UPDATE ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/host_beforeUpdate.sql b/db/routines/vn/triggers/host_beforeUpdate.sql index 0b0962e86..65fa0cd43 100644 --- a/db/routines/vn/triggers/host_beforeUpdate.sql +++ b/db/routines/vn/triggers/host_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`host_beforeUpdate` BEFORE UPDATE ON `host` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql b/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql index 1e5b75bb2..d5b6e4ae7 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_afterDelete` AFTER DELETE ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql b/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql index f7e4265a7..5185d89bc 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeInsert` BEFORE INSERT ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql b/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql index 2452ff0d1..863a28cef 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeUpdate` BEFORE UPDATE ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_afterDelete.sql b/db/routines/vn/triggers/invoiceInTax_afterDelete.sql index f541503ff..106f7fc5a 100644 --- a/db/routines/vn/triggers/invoiceInTax_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceInTax_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_afterDelete` AFTER DELETE ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql b/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql index b1138fc3a..432fb0bd3 100644 --- a/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeInsert` BEFORE INSERT ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql b/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql index 30918b7c5..cf7d09a50 100644 --- a/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUpdate` BEFORE UPDATE ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_afterDelete.sql b/db/routines/vn/triggers/invoiceIn_afterDelete.sql index c088f6492..cd766a361 100644 --- a/db/routines/vn/triggers/invoiceIn_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceIn_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_afterDelete` AFTER DELETE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_afterUpdate.sql b/db/routines/vn/triggers/invoiceIn_afterUpdate.sql index 1a9105c9e..7f0eeeb79 100644 --- a/db/routines/vn/triggers/invoiceIn_afterUpdate.sql +++ b/db/routines/vn/triggers/invoiceIn_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate` AFTER UPDATE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeDelete.sql b/db/routines/vn/triggers/invoiceIn_beforeDelete.sql index 2ffff923a..587d4b764 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeDelete.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeDelete` BEFORE DELETE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeInsert.sql b/db/routines/vn/triggers/invoiceIn_beforeInsert.sql index 2b80f2534..d14c617ae 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeInsert` BEFORE INSERT ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql b/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql index 4503c7dbd..d0ab65218 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdate` BEFORE UPDATE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_afterInsert.sql b/db/routines/vn/triggers/invoiceOut_afterInsert.sql index 389c01111..0c8f762bf 100644 --- a/db/routines/vn/triggers/invoiceOut_afterInsert.sql +++ b/db/routines/vn/triggers/invoiceOut_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceOut_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_afterInsert` AFTER INSERT ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeDelete.sql b/db/routines/vn/triggers/invoiceOut_beforeDelete.sql index 8c8d7464c..a63197a65 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeDelete.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceOut_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeDelete` BEFORE DELETE ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeInsert.sql b/db/routines/vn/triggers/invoiceOut_beforeInsert.sql index 0081c8803..d50279a95 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceOut_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeInsert` BEFORE INSERT ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql b/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql index 72be9cef0..bb9c13c40 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceOut_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeUpdate` BEFORE UPDATE ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_afterDelete.sql b/db/routines/vn/triggers/itemBarcode_afterDelete.sql index 4453d4a2f..a75ffb28f 100644 --- a/db/routines/vn/triggers/itemBarcode_afterDelete.sql +++ b/db/routines/vn/triggers/itemBarcode_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBarcode_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_afterDelete` AFTER DELETE ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_beforeInsert.sql b/db/routines/vn/triggers/itemBarcode_beforeInsert.sql index 503f1eb8a..3c272819d 100644 --- a/db/routines/vn/triggers/itemBarcode_beforeInsert.sql +++ b/db/routines/vn/triggers/itemBarcode_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBarcode_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_beforeInsert` BEFORE INSERT ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql b/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql index 2131427b2..a47d2bf68 100644 --- a/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBarcode_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_beforeUpdate` BEFORE UPDATE ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_afterDelete.sql b/db/routines/vn/triggers/itemBotanical_afterDelete.sql index 1b3c50ad1..e318f78e8 100644 --- a/db/routines/vn/triggers/itemBotanical_afterDelete.sql +++ b/db/routines/vn/triggers/itemBotanical_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBotanical_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_afterDelete` AFTER DELETE ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_beforeInsert.sql b/db/routines/vn/triggers/itemBotanical_beforeInsert.sql index 8a1b9346d..98d62a3ea 100644 --- a/db/routines/vn/triggers/itemBotanical_beforeInsert.sql +++ b/db/routines/vn/triggers/itemBotanical_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBotanical_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_beforeInsert` BEFORE INSERT ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql b/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql index 55939c403..1f0fbbbf7 100644 --- a/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemBotanical_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_beforeUpdate` BEFORE UPDATE ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCategory_afterInsert.sql b/db/routines/vn/triggers/itemCategory_afterInsert.sql index 9449737d1..20b1deaf4 100644 --- a/db/routines/vn/triggers/itemCategory_afterInsert.sql +++ b/db/routines/vn/triggers/itemCategory_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemCategory_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCategory_afterInsert` AFTER INSERT ON `itemCategory` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCost_beforeInsert.sql b/db/routines/vn/triggers/itemCost_beforeInsert.sql index ba80193a6..af39ab98d 100644 --- a/db/routines/vn/triggers/itemCost_beforeInsert.sql +++ b/db/routines/vn/triggers/itemCost_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemCost_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCost_beforeInsert` BEFORE INSERT ON `itemCost` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCost_beforeUpdate.sql b/db/routines/vn/triggers/itemCost_beforeUpdate.sql index 242c768f5..83f23e58e 100644 --- a/db/routines/vn/triggers/itemCost_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemCost_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemCost_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCost_beforeUpdate` BEFORE UPDATE ON `itemCost` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql b/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql index 1da5a5942..e12152fcd 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_afterDelete` AFTER DELETE ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql b/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql index 8833ac968..cfd080d3e 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeInsert` BEFORE INSERT ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql b/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql index ef030f9f9..a067e3e15 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeUpdate` BEFORE UPDATE ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving _afterDelete.sql b/db/routines/vn/triggers/itemShelving _afterDelete.sql index 9a1759eff..7ccc74a4a 100644 --- a/db/routines/vn/triggers/itemShelving _afterDelete.sql +++ b/db/routines/vn/triggers/itemShelving _afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_afterDelete` AFTER DELETE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql b/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql index ef0048b34..91f0b0194 100644 --- a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql +++ b/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert` AFTER INSERT ON `itemShelvingSale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_afterUpdate.sql b/db/routines/vn/triggers/itemShelving_afterUpdate.sql index 1ad57961a..8756180d9 100644 --- a/db/routines/vn/triggers/itemShelving_afterUpdate.sql +++ b/db/routines/vn/triggers/itemShelving_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate` AFTER UPDATE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_beforeDelete.sql b/db/routines/vn/triggers/itemShelving_beforeDelete.sql index a9f59e011..c9d74ac49 100644 --- a/db/routines/vn/triggers/itemShelving_beforeDelete.sql +++ b/db/routines/vn/triggers/itemShelving_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete` BEFORE DELETE ON `itemShelving` FOR EACH ROW INSERT INTO vn.itemShelvingLog(itemShelvingFk, diff --git a/db/routines/vn/triggers/itemShelving_beforeInsert.sql b/db/routines/vn/triggers/itemShelving_beforeInsert.sql index e9fe17cf2..ce91ac35e 100644 --- a/db/routines/vn/triggers/itemShelving_beforeInsert.sql +++ b/db/routines/vn/triggers/itemShelving_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeInsert` BEFORE INSERT ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql index 214c64b45..fbe114c12 100644 --- a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeUpdate` BEFORE UPDATE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterDelete.sql b/db/routines/vn/triggers/itemTag_afterDelete.sql index 4014c88b5..4e3bfb226 100644 --- a/db/routines/vn/triggers/itemTag_afterDelete.sql +++ b/db/routines/vn/triggers/itemTag_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTag_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterDelete` AFTER DELETE ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterInsert.sql b/db/routines/vn/triggers/itemTag_afterInsert.sql index 3dfb25ad3..fd7c20deb 100644 --- a/db/routines/vn/triggers/itemTag_afterInsert.sql +++ b/db/routines/vn/triggers/itemTag_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTag_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterInsert` AFTER INSERT ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterUpdate.sql b/db/routines/vn/triggers/itemTag_afterUpdate.sql index 61b45a161..a1a8cd574 100644 --- a/db/routines/vn/triggers/itemTag_afterUpdate.sql +++ b/db/routines/vn/triggers/itemTag_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTag_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterUpdate` AFTER UPDATE ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_beforeInsert.sql b/db/routines/vn/triggers/itemTag_beforeInsert.sql index cec4fd02f..8c05e73ec 100644 --- a/db/routines/vn/triggers/itemTag_beforeInsert.sql +++ b/db/routines/vn/triggers/itemTag_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTag_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_beforeInsert` BEFORE INSERT ON `itemTag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTag_beforeUpdate.sql b/db/routines/vn/triggers/itemTag_beforeUpdate.sql index 41de249ef..b0ecd54b8 100644 --- a/db/routines/vn/triggers/itemTag_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemTag_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTag_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_beforeUpdate` BEFORE UPDATE ON `itemTag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql b/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql index 8f91b26e1..cbc112a54 100644 --- a/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql +++ b/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTaxCountry_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_afterDelete` AFTER DELETE ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql b/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql index 348dac023..e853398af 100644 --- a/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql +++ b/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeInsert` BEFORE INSERT ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql b/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql index 7470cd81e..aca4f519a 100644 --- a/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeUpdate` BEFORE UPDATE ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemType_beforeUpdate.sql b/db/routines/vn/triggers/itemType_beforeUpdate.sql index 0e0aa0098..3498a106c 100644 --- a/db/routines/vn/triggers/itemType_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemType_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemType_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemType_beforeUpdate` BEFORE UPDATE ON `itemType` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterDelete.sql b/db/routines/vn/triggers/item_afterDelete.sql index 34f702cdd..81ad67cb2 100644 --- a/db/routines/vn/triggers/item_afterDelete.sql +++ b/db/routines/vn/triggers/item_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`item_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterDelete` AFTER DELETE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterInsert.sql b/db/routines/vn/triggers/item_afterInsert.sql index a4f9c5f5a..c3023131d 100644 --- a/db/routines/vn/triggers/item_afterInsert.sql +++ b/db/routines/vn/triggers/item_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`item_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterInsert` AFTER INSERT ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterUpdate.sql b/db/routines/vn/triggers/item_afterUpdate.sql index 3b433c302..75d5ddccc 100644 --- a/db/routines/vn/triggers/item_afterUpdate.sql +++ b/db/routines/vn/triggers/item_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`item_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterUpdate` AFTER UPDATE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_beforeInsert.sql b/db/routines/vn/triggers/item_beforeInsert.sql index d7ee4db34..4d5f8162d 100644 --- a/db/routines/vn/triggers/item_beforeInsert.sql +++ b/db/routines/vn/triggers/item_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`item_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_beforeInsert` BEFORE INSERT ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_beforeUpdate.sql b/db/routines/vn/triggers/item_beforeUpdate.sql index 3cf630d18..aa4630e1f 100644 --- a/db/routines/vn/triggers/item_beforeUpdate.sql +++ b/db/routines/vn/triggers/item_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`item_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_beforeUpdate` BEFORE UPDATE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/machine_beforeInsert.sql b/db/routines/vn/triggers/machine_beforeInsert.sql index 269879b22..52528b7b5 100644 --- a/db/routines/vn/triggers/machine_beforeInsert.sql +++ b/db/routines/vn/triggers/machine_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`machine_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`machine_beforeInsert` BEFORE INSERT ON `machine` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/mail_beforeInsert.sql b/db/routines/vn/triggers/mail_beforeInsert.sql index fc598f829..324710754 100644 --- a/db/routines/vn/triggers/mail_beforeInsert.sql +++ b/db/routines/vn/triggers/mail_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`mail_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`mail_beforeInsert` BEFORE INSERT ON `mail` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/mandate_beforeInsert.sql b/db/routines/vn/triggers/mandate_beforeInsert.sql index 7d1e9a59e..277d8d236 100644 --- a/db/routines/vn/triggers/mandate_beforeInsert.sql +++ b/db/routines/vn/triggers/mandate_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`mandate_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`mandate_beforeInsert` BEFORE INSERT ON `mandate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/operator_beforeInsert.sql b/db/routines/vn/triggers/operator_beforeInsert.sql index c1805d0fc..af19c4aad 100644 --- a/db/routines/vn/triggers/operator_beforeInsert.sql +++ b/db/routines/vn/triggers/operator_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`operator_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`operator_beforeInsert` BEFORE INSERT ON `operator` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/operator_beforeUpdate.sql b/db/routines/vn/triggers/operator_beforeUpdate.sql index 84fb8ca04..9fbe5bb99 100644 --- a/db/routines/vn/triggers/operator_beforeUpdate.sql +++ b/db/routines/vn/triggers/operator_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`operator_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`operator_beforeUpdate` BEFORE UPDATE ON `operator` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packaging_beforeInsert.sql b/db/routines/vn/triggers/packaging_beforeInsert.sql index 02ba3cf4f..4a2c3809b 100644 --- a/db/routines/vn/triggers/packaging_beforeInsert.sql +++ b/db/routines/vn/triggers/packaging_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`packaging_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packaging_beforeInsert` BEFORE INSERT ON `packaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packaging_beforeUpdate.sql b/db/routines/vn/triggers/packaging_beforeUpdate.sql index 515c94bb5..b41f755f5 100644 --- a/db/routines/vn/triggers/packaging_beforeUpdate.sql +++ b/db/routines/vn/triggers/packaging_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`packaging_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packaging_beforeUpdate` BEFORE UPDATE ON `packaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_afterDelete.sql b/db/routines/vn/triggers/packingSite_afterDelete.sql index 7c76ae7ec..f9cfe9b01 100644 --- a/db/routines/vn/triggers/packingSite_afterDelete.sql +++ b/db/routines/vn/triggers/packingSite_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`packingSite_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_afterDelete` AFTER DELETE ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_beforeInsert.sql b/db/routines/vn/triggers/packingSite_beforeInsert.sql index 966dfdd53..e7c854eee 100644 --- a/db/routines/vn/triggers/packingSite_beforeInsert.sql +++ b/db/routines/vn/triggers/packingSite_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`packingSite_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_beforeInsert` BEFORE INSERT ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_beforeUpdate.sql b/db/routines/vn/triggers/packingSite_beforeUpdate.sql index 4d56ac1b5..2590ff057 100644 --- a/db/routines/vn/triggers/packingSite_beforeUpdate.sql +++ b/db/routines/vn/triggers/packingSite_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`packingSite_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_beforeUpdate` BEFORE UPDATE ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_afterDelete.sql b/db/routines/vn/triggers/parking_afterDelete.sql index 1ec96c24d..b5ce29d44 100644 --- a/db/routines/vn/triggers/parking_afterDelete.sql +++ b/db/routines/vn/triggers/parking_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_afterDelete` AFTER DELETE ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_beforeInsert.sql b/db/routines/vn/triggers/parking_beforeInsert.sql index cdec4c759..f4899b5f7 100644 --- a/db/routines/vn/triggers/parking_beforeInsert.sql +++ b/db/routines/vn/triggers/parking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_beforeInsert` BEFORE INSERT ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_beforeUpdate.sql b/db/routines/vn/triggers/parking_beforeUpdate.sql index 3e808f505..137f869ca 100644 --- a/db/routines/vn/triggers/parking_beforeUpdate.sql +++ b/db/routines/vn/triggers/parking_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_beforeUpdate` BEFORE UPDATE ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_afterInsert.sql b/db/routines/vn/triggers/payment_afterInsert.sql index 5585d6682..f84613471 100644 --- a/db/routines/vn/triggers/payment_afterInsert.sql +++ b/db/routines/vn/triggers/payment_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`payment_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_afterInsert` AFTER INSERT ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_beforeInsert.sql b/db/routines/vn/triggers/payment_beforeInsert.sql index af369a69b..11d2c8ec9 100644 --- a/db/routines/vn/triggers/payment_beforeInsert.sql +++ b/db/routines/vn/triggers/payment_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`payment_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_beforeInsert` BEFORE INSERT ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_beforeUpdate.sql b/db/routines/vn/triggers/payment_beforeUpdate.sql index b3ef1342b..2c54f1cb1 100644 --- a/db/routines/vn/triggers/payment_beforeUpdate.sql +++ b/db/routines/vn/triggers/payment_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`payment_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_beforeUpdate` BEFORE UPDATE ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_afterDelete.sql b/db/routines/vn/triggers/postCode_afterDelete.sql index 736d5f5f3..be578ff8e 100644 --- a/db/routines/vn/triggers/postCode_afterDelete.sql +++ b/db/routines/vn/triggers/postCode_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`postCode_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_afterDelete` AFTER DELETE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_afterUpdate.sql b/db/routines/vn/triggers/postCode_afterUpdate.sql index c1e56044a..497c68f74 100644 --- a/db/routines/vn/triggers/postCode_afterUpdate.sql +++ b/db/routines/vn/triggers/postCode_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`postCode_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_afterUpdate` AFTER UPDATE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_beforeInsert.sql b/db/routines/vn/triggers/postCode_beforeInsert.sql index 9e6d7e592..77364ee1a 100644 --- a/db/routines/vn/triggers/postCode_beforeInsert.sql +++ b/db/routines/vn/triggers/postCode_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`postCode_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_beforeInsert` BEFORE INSERT ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_beforeUpdate.sql b/db/routines/vn/triggers/postCode_beforeUpdate.sql index 1b3c228a3..da831302c 100644 --- a/db/routines/vn/triggers/postCode_beforeUpdate.sql +++ b/db/routines/vn/triggers/postCode_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`postCode_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_beforeUpdate` BEFORE UPDATE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/priceFixed_beforeInsert.sql b/db/routines/vn/triggers/priceFixed_beforeInsert.sql index ecf6f3e30..0189856bb 100644 --- a/db/routines/vn/triggers/priceFixed_beforeInsert.sql +++ b/db/routines/vn/triggers/priceFixed_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`priceFixed_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`priceFixed_beforeInsert` BEFORE INSERT ON `priceFixed` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/priceFixed_beforeUpdate.sql b/db/routines/vn/triggers/priceFixed_beforeUpdate.sql index f675322b9..231087eed 100644 --- a/db/routines/vn/triggers/priceFixed_beforeUpdate.sql +++ b/db/routines/vn/triggers/priceFixed_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`priceFixed_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`priceFixed_beforeUpdate` BEFORE UPDATE ON `priceFixed` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_afterDelete.sql b/db/routines/vn/triggers/productionConfig_afterDelete.sql index 384bf681e..e5f0e0a69 100644 --- a/db/routines/vn/triggers/productionConfig_afterDelete.sql +++ b/db/routines/vn/triggers/productionConfig_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_afterDelete` AFTER DELETE ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_beforeInsert.sql b/db/routines/vn/triggers/productionConfig_beforeInsert.sql index 99b217be4..49a6719ed 100644 --- a/db/routines/vn/triggers/productionConfig_beforeInsert.sql +++ b/db/routines/vn/triggers/productionConfig_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_beforeInsert` BEFORE INSERT ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_beforeUpdate.sql b/db/routines/vn/triggers/productionConfig_beforeUpdate.sql index f1ceaa471..9c692b3c3 100644 --- a/db/routines/vn/triggers/productionConfig_beforeUpdate.sql +++ b/db/routines/vn/triggers/productionConfig_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_beforeUpdate` BEFORE UPDATE ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/projectNotes_beforeInsert.sql b/db/routines/vn/triggers/projectNotes_beforeInsert.sql index 58d75bec7..b03327512 100644 --- a/db/routines/vn/triggers/projectNotes_beforeInsert.sql +++ b/db/routines/vn/triggers/projectNotes_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`projectNotes_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`projectNotes_beforeInsert` BEFORE INSERT ON `projectNotes` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_afterDelete.sql b/db/routines/vn/triggers/province_afterDelete.sql index d0cee78e7..459860c43 100644 --- a/db/routines/vn/triggers/province_afterDelete.sql +++ b/db/routines/vn/triggers/province_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`province_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_afterDelete` AFTER DELETE ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_afterUpdate.sql b/db/routines/vn/triggers/province_afterUpdate.sql index e8f3958b2..5a1c579d9 100644 --- a/db/routines/vn/triggers/province_afterUpdate.sql +++ b/db/routines/vn/triggers/province_afterUpdate.sql @@ -1,7 +1,7 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`province_afterUpdate` - AFTER UPDATE ON `province` - FOR EACH ROW +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_afterUpdate` + AFTER UPDATE ON `province` + FOR EACH ROW BEGIN IF !(OLD.autonomyFk <=> NEW.autonomyFk) THEN CALL zoneGeo_setParent(NEW.geoFk, @@ -12,5 +12,5 @@ BEGIN UPDATE zoneGeo SET `name` = NEW.`name` WHERE id = NEW.geoFk; END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/province_beforeInsert.sql b/db/routines/vn/triggers/province_beforeInsert.sql index f3f039fc3..ecfb13088 100644 --- a/db/routines/vn/triggers/province_beforeInsert.sql +++ b/db/routines/vn/triggers/province_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`province_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_beforeInsert` BEFORE INSERT ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_beforeUpdate.sql b/db/routines/vn/triggers/province_beforeUpdate.sql index 23ca49d4a..a878ae759 100644 --- a/db/routines/vn/triggers/province_beforeUpdate.sql +++ b/db/routines/vn/triggers/province_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`province_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_beforeUpdate` BEFORE UPDATE ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_afterDelete.sql b/db/routines/vn/triggers/rate_afterDelete.sql index dae240c15..20cfcbd84 100644 --- a/db/routines/vn/triggers/rate_afterDelete.sql +++ b/db/routines/vn/triggers/rate_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`rate_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_afterDelete` AFTER DELETE ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_beforeInsert.sql b/db/routines/vn/triggers/rate_beforeInsert.sql index 0d77a95d7..45f64c054 100644 --- a/db/routines/vn/triggers/rate_beforeInsert.sql +++ b/db/routines/vn/triggers/rate_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`rate_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_beforeInsert` BEFORE INSERT ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_beforeUpdate.sql b/db/routines/vn/triggers/rate_beforeUpdate.sql index 2055d14fd..d5dab82ea 100644 --- a/db/routines/vn/triggers/rate_beforeUpdate.sql +++ b/db/routines/vn/triggers/rate_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`rate_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_beforeUpdate` BEFORE UPDATE ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/receipt_afterInsert.sql b/db/routines/vn/triggers/receipt_afterInsert.sql index 3881cb4d2..0a709107d 100644 --- a/db/routines/vn/triggers/receipt_afterInsert.sql +++ b/db/routines/vn/triggers/receipt_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`receipt_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_afterInsert` AFTER INSERT ON `receipt` FOR EACH ROW CALL clientRisk_update(NEW.clientFk, NEW.companyFk, -NEW.amountPaid)$$ diff --git a/db/routines/vn/triggers/receipt_afterUpdate.sql b/db/routines/vn/triggers/receipt_afterUpdate.sql index 3d739e8f1..c6f2257f2 100644 --- a/db/routines/vn/triggers/receipt_afterUpdate.sql +++ b/db/routines/vn/triggers/receipt_afterUpdate.sql @@ -1,7 +1,7 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`receipt_afterUpdate` - AFTER UPDATE ON `receipt` - FOR EACH ROW +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_afterUpdate` + AFTER UPDATE ON `receipt` + FOR EACH ROW BEGIN IF NEW.isConciliate = FALSE AND NEW.payed > OLD.payed THEN CALL mail_insert( @@ -11,5 +11,5 @@ BEGIN CONCAT('Se ha cambiado el recibo: ', NEW.Id, ' de ', OLD.payed, ' a ', NEW.payed) ); END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/receipt_beforeDelete.sql b/db/routines/vn/triggers/receipt_beforeDelete.sql index fc75a4c35..c5430306d 100644 --- a/db/routines/vn/triggers/receipt_beforeDelete.sql +++ b/db/routines/vn/triggers/receipt_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`receipt_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeDelete` BEFORE DELETE ON `receipt` FOR EACH ROW CALL clientRisk_update(OLD.clientFk, OLD.companyFk, OLD.amountPaid)$$ diff --git a/db/routines/vn/triggers/receipt_beforeInsert.sql b/db/routines/vn/triggers/receipt_beforeInsert.sql index 696cad241..cb0fbb7bf 100644 --- a/db/routines/vn/triggers/receipt_beforeInsert.sql +++ b/db/routines/vn/triggers/receipt_beforeInsert.sql @@ -1,7 +1,7 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`receipt_beforeInsert` - BEFORE INSERT ON `receipt` - FOR EACH ROW +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeInsert` + BEFORE INSERT ON `receipt` + FOR EACH ROW BEGIN DECLARE vIsAutoConciliated BOOLEAN; @@ -13,5 +13,5 @@ BEGIN SET NEW.isConciliate = vIsAutoConciliated; END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/receipt_beforeUpdate.sql b/db/routines/vn/triggers/receipt_beforeUpdate.sql index 8ea14c17c..9fac395c9 100644 --- a/db/routines/vn/triggers/receipt_beforeUpdate.sql +++ b/db/routines/vn/triggers/receipt_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`receipt_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeUpdate` BEFORE UPDATE ON `receipt` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_afterDelete.sql b/db/routines/vn/triggers/recovery_afterDelete.sql index 429f562ac..74c3bfb64 100644 --- a/db/routines/vn/triggers/recovery_afterDelete.sql +++ b/db/routines/vn/triggers/recovery_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`recovery_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_afterDelete` AFTER DELETE ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_beforeInsert.sql b/db/routines/vn/triggers/recovery_beforeInsert.sql index 2318e0b7b..a44cd208f 100644 --- a/db/routines/vn/triggers/recovery_beforeInsert.sql +++ b/db/routines/vn/triggers/recovery_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`recovery_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_beforeInsert` BEFORE INSERT ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_beforeUpdate.sql b/db/routines/vn/triggers/recovery_beforeUpdate.sql index 4d485c075..e57b1258f 100644 --- a/db/routines/vn/triggers/recovery_beforeUpdate.sql +++ b/db/routines/vn/triggers/recovery_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`recovery_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_beforeUpdate` BEFORE UPDATE ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/roadmapStop_beforeInsert.sql b/db/routines/vn/triggers/roadmapStop_beforeInsert.sql new file mode 100644 index 000000000..2db64d9ea --- /dev/null +++ b/db/routines/vn/triggers/roadmapStop_beforeInsert.sql @@ -0,0 +1,10 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`roadmapStop_beforeInsert` + BEFORE INSERT ON `roadmapStop` + FOR EACH ROW +BEGIN + + SET NEW.description = UCASE(NEW.description); + +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql b/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql new file mode 100644 index 000000000..e9a641548 --- /dev/null +++ b/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql @@ -0,0 +1,10 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`roadmapStop_beforeUpdate` + BEFORE UPDATE ON `roadmapStop` + FOR EACH ROW +BEGIN + + SET NEW.description = UCASE(NEW.description); + +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/route_afterDelete.sql b/db/routines/vn/triggers/route_afterDelete.sql index e929bd519..594251db3 100644 --- a/db/routines/vn/triggers/route_afterDelete.sql +++ b/db/routines/vn/triggers/route_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`route_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterDelete` AFTER DELETE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_afterInsert.sql b/db/routines/vn/triggers/route_afterInsert.sql index f030f09fa..7272d571b 100644 --- a/db/routines/vn/triggers/route_afterInsert.sql +++ b/db/routines/vn/triggers/route_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`route_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterInsert` AFTER INSERT ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_afterUpdate.sql b/db/routines/vn/triggers/route_afterUpdate.sql index 14b53c2a5..0af7359d9 100644 --- a/db/routines/vn/triggers/route_afterUpdate.sql +++ b/db/routines/vn/triggers/route_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`route_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterUpdate` AFTER UPDATE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_beforeInsert.sql b/db/routines/vn/triggers/route_beforeInsert.sql index 442b0620e..2cede5fcf 100644 --- a/db/routines/vn/triggers/route_beforeInsert.sql +++ b/db/routines/vn/triggers/route_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`route_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_beforeInsert` BEFORE INSERT ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_beforeUpdate.sql b/db/routines/vn/triggers/route_beforeUpdate.sql index 43ee802f5..98691a5a5 100644 --- a/db/routines/vn/triggers/route_beforeUpdate.sql +++ b/db/routines/vn/triggers/route_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`route_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_beforeUpdate` BEFORE UPDATE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_afterDelete.sql b/db/routines/vn/triggers/routesMonitor_afterDelete.sql index 000425dad..1eef37f3e 100644 --- a/db/routines/vn/triggers/routesMonitor_afterDelete.sql +++ b/db/routines/vn/triggers/routesMonitor_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`routesMonitor_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_afterDelete` AFTER DELETE ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_beforeInsert.sql b/db/routines/vn/triggers/routesMonitor_beforeInsert.sql index 70b723d54..62e736ebf 100644 --- a/db/routines/vn/triggers/routesMonitor_beforeInsert.sql +++ b/db/routines/vn/triggers/routesMonitor_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`routesMonitor_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_beforeInsert` BEFORE INSERT ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql b/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql index 0ca867b7a..0e413b7c9 100644 --- a/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql +++ b/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`routesMonitor_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_beforeUpdate` BEFORE UPDATE ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleBuy_beforeInsert.sql b/db/routines/vn/triggers/saleBuy_beforeInsert.sql index 1c36671d5..6a6f278d4 100644 --- a/db/routines/vn/triggers/saleBuy_beforeInsert.sql +++ b/db/routines/vn/triggers/saleBuy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleBuy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleBuy_beforeInsert` BEFORE INSERT ON `saleBuy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_afterDelete.sql b/db/routines/vn/triggers/saleGroup_afterDelete.sql index 1e0163187..ff72fecff 100644 --- a/db/routines/vn/triggers/saleGroup_afterDelete.sql +++ b/db/routines/vn/triggers/saleGroup_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroup_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_afterDelete` AFTER DELETE ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_beforeInsert.sql b/db/routines/vn/triggers/saleGroup_beforeInsert.sql index 18be92ed6..8e454033c 100644 --- a/db/routines/vn/triggers/saleGroup_beforeInsert.sql +++ b/db/routines/vn/triggers/saleGroup_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroup_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_beforeInsert` BEFORE INSERT ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_beforeUpdate.sql b/db/routines/vn/triggers/saleGroup_beforeUpdate.sql index 1f6aa6def..c6f18c35d 100644 --- a/db/routines/vn/triggers/saleGroup_beforeUpdate.sql +++ b/db/routines/vn/triggers/saleGroup_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroup_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_beforeUpdate` BEFORE UPDATE ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleLabel_afterUpdate.sql b/db/routines/vn/triggers/saleLabel_afterUpdate.sql index ff3787358..f53d4e50f 100644 --- a/db/routines/vn/triggers/saleLabel_afterUpdate.sql +++ b/db/routines/vn/triggers/saleLabel_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate` AFTER UPDATE ON `vn`.`saleLabel` FOR EACH ROW IF NEW.stem >= (SELECT s.quantity FROM sale s WHERE s.id = NEW.saleFk) THEN diff --git a/db/routines/vn/triggers/saleTracking_afterInsert.sql b/db/routines/vn/triggers/saleTracking_afterInsert.sql index 00bef8486..f0a48ab50 100644 --- a/db/routines/vn/triggers/saleTracking_afterInsert.sql +++ b/db/routines/vn/triggers/saleTracking_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleTracking_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleTracking_afterInsert` AFTER INSERT ON `saleTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterDelete.sql b/db/routines/vn/triggers/sale_afterDelete.sql index 6365208b2..75cfe3c36 100644 --- a/db/routines/vn/triggers/sale_afterDelete.sql +++ b/db/routines/vn/triggers/sale_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterDelete` AFTER DELETE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterInsert.sql b/db/routines/vn/triggers/sale_afterInsert.sql index b5b28257f..4f1637b44 100644 --- a/db/routines/vn/triggers/sale_afterInsert.sql +++ b/db/routines/vn/triggers/sale_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterInsert` AFTER INSERT ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterUpdate.sql b/db/routines/vn/triggers/sale_afterUpdate.sql index 3f59c9188..c932859d6 100644 --- a/db/routines/vn/triggers/sale_afterUpdate.sql +++ b/db/routines/vn/triggers/sale_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterUpdate` AFTER UPDATE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeDelete.sql b/db/routines/vn/triggers/sale_beforeDelete.sql index a91e7f010..dd1f5e30f 100644 --- a/db/routines/vn/triggers/sale_beforeDelete.sql +++ b/db/routines/vn/triggers/sale_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeDelete` BEFORE DELETE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeInsert.sql b/db/routines/vn/triggers/sale_beforeInsert.sql index 0ef368513..1b12caa06 100644 --- a/db/routines/vn/triggers/sale_beforeInsert.sql +++ b/db/routines/vn/triggers/sale_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeInsert` BEFORE INSERT ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeUpdate.sql b/db/routines/vn/triggers/sale_beforeUpdate.sql index c5a748503..4e038d1ec 100644 --- a/db/routines/vn/triggers/sale_beforeUpdate.sql +++ b/db/routines/vn/triggers/sale_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sale_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeUpdate` BEFORE UPDATE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeDelete.sql b/db/routines/vn/triggers/sharingCart_beforeDelete.sql index 6996b3138..2a2f1014d 100644 --- a/db/routines/vn/triggers/sharingCart_beforeDelete.sql +++ b/db/routines/vn/triggers/sharingCart_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sharingCart_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeDelete` BEFORE DELETE ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeInsert.sql b/db/routines/vn/triggers/sharingCart_beforeInsert.sql index 116337b62..92795e1f6 100644 --- a/db/routines/vn/triggers/sharingCart_beforeInsert.sql +++ b/db/routines/vn/triggers/sharingCart_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sharingCart_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeInsert` BEFORE INSERT ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeUpdate.sql b/db/routines/vn/triggers/sharingCart_beforeUpdate.sql index 91cbfb3d0..87054f891 100644 --- a/db/routines/vn/triggers/sharingCart_beforeUpdate.sql +++ b/db/routines/vn/triggers/sharingCart_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sharingCart_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeUpdate` BEFORE UPDATE ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingClient_beforeInsert.sql b/db/routines/vn/triggers/sharingClient_beforeInsert.sql index eea65e74c..ed2a53919 100644 --- a/db/routines/vn/triggers/sharingClient_beforeInsert.sql +++ b/db/routines/vn/triggers/sharingClient_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sharingClient_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingClient_beforeInsert` BEFORE INSERT ON `sharingClient` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingClient_beforeUpdate.sql b/db/routines/vn/triggers/sharingClient_beforeUpdate.sql index fceab691c..180fdc510 100644 --- a/db/routines/vn/triggers/sharingClient_beforeUpdate.sql +++ b/db/routines/vn/triggers/sharingClient_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`sharingClient_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingClient_beforeUpdate` BEFORE UPDATE ON `sharingClient` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_afterDelete.sql b/db/routines/vn/triggers/shelving_afterDelete.sql index 964a866e7..088bd4f95 100644 --- a/db/routines/vn/triggers/shelving_afterDelete.sql +++ b/db/routines/vn/triggers/shelving_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`shelving_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_afterDelete` AFTER DELETE ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_beforeInsert.sql b/db/routines/vn/triggers/shelving_beforeInsert.sql index ef3c7030c..39b54f247 100644 --- a/db/routines/vn/triggers/shelving_beforeInsert.sql +++ b/db/routines/vn/triggers/shelving_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`shelving_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_beforeInsert` BEFORE INSERT ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_beforeUpdate.sql b/db/routines/vn/triggers/shelving_beforeUpdate.sql index 89e7cb7e9..566e58f6d 100644 --- a/db/routines/vn/triggers/shelving_beforeUpdate.sql +++ b/db/routines/vn/triggers/shelving_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`shelving_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_beforeUpdate` BEFORE UPDATE ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_afterInsert.sql b/db/routines/vn/triggers/solunionCAP_afterInsert.sql index 0d6e510ad..1f3b3a2b4 100644 --- a/db/routines/vn/triggers/solunionCAP_afterInsert.sql +++ b/db/routines/vn/triggers/solunionCAP_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert` AFTER INSERT ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_afterUpdate.sql b/db/routines/vn/triggers/solunionCAP_afterUpdate.sql index 40ff57f35..921c1d5a4 100644 --- a/db/routines/vn/triggers/solunionCAP_afterUpdate.sql +++ b/db/routines/vn/triggers/solunionCAP_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`solunionCAP_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_afterUpdate` AFTER UPDATE ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_beforeDelete.sql b/db/routines/vn/triggers/solunionCAP_beforeDelete.sql index 29c4298fd..520b3c4b4 100644 --- a/db/routines/vn/triggers/solunionCAP_beforeDelete.sql +++ b/db/routines/vn/triggers/solunionCAP_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelete` BEFORE DELETE ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/specie_beforeInsert.sql b/db/routines/vn/triggers/specie_beforeInsert.sql index 68abf0d30..c32530643 100644 --- a/db/routines/vn/triggers/specie_beforeInsert.sql +++ b/db/routines/vn/triggers/specie_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`specie_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`specie_beforeInsert` BEFORE INSERT ON `specie` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/specie_beforeUpdate.sql b/db/routines/vn/triggers/specie_beforeUpdate.sql index 364b1d52f..0b0572bc8 100644 --- a/db/routines/vn/triggers/specie_beforeUpdate.sql +++ b/db/routines/vn/triggers/specie_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`specie_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`specie_beforeUpdate` BEFORE UPDATE ON `specie` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_afterDelete.sql b/db/routines/vn/triggers/supplierAccount_afterDelete.sql index 23c2cd4a4..a7da0dc3b 100644 --- a/db/routines/vn/triggers/supplierAccount_afterDelete.sql +++ b/db/routines/vn/triggers/supplierAccount_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAccount_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_afterDelete` AFTER DELETE ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_beforeInsert.sql b/db/routines/vn/triggers/supplierAccount_beforeInsert.sql index 512f172e1..43c449d0c 100644 --- a/db/routines/vn/triggers/supplierAccount_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierAccount_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAccount_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_beforeInsert` BEFORE INSERT ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql b/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql index 0fac19deb..8e73445e4 100644 --- a/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAccount_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_beforeUpdate` BEFORE UPDATE ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_afterDelete.sql b/db/routines/vn/triggers/supplierAddress_afterDelete.sql index 69dd94dfe..b8cbadc8e 100644 --- a/db/routines/vn/triggers/supplierAddress_afterDelete.sql +++ b/db/routines/vn/triggers/supplierAddress_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAddress_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_afterDelete` AFTER DELETE ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_beforeInsert.sql b/db/routines/vn/triggers/supplierAddress_beforeInsert.sql index db8d0ea94..75778c961 100644 --- a/db/routines/vn/triggers/supplierAddress_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierAddress_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAddress_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_beforeInsert` BEFORE INSERT ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql b/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql index 8e484e4de..beddba628 100644 --- a/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierAddress_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_beforeUpdate` BEFORE UPDATE ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_afterDelete.sql b/db/routines/vn/triggers/supplierContact_afterDelete.sql index 401ec9e9e..c89a2a5d2 100644 --- a/db/routines/vn/triggers/supplierContact_afterDelete.sql +++ b/db/routines/vn/triggers/supplierContact_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierContact_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_afterDelete` AFTER DELETE ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_beforeInsert.sql b/db/routines/vn/triggers/supplierContact_beforeInsert.sql index 76e78ba5a..6402918b9 100644 --- a/db/routines/vn/triggers/supplierContact_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierContact_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierContact_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_beforeInsert` BEFORE INSERT ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_beforeUpdate.sql b/db/routines/vn/triggers/supplierContact_beforeUpdate.sql index 24723656a..2a047dec6 100644 --- a/db/routines/vn/triggers/supplierContact_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierContact_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierContact_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_beforeUpdate` BEFORE UPDATE ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_afterDelete.sql b/db/routines/vn/triggers/supplierDms_afterDelete.sql index 482decbb6..88349cc3c 100644 --- a/db/routines/vn/triggers/supplierDms_afterDelete.sql +++ b/db/routines/vn/triggers/supplierDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_afterDelete` AFTER DELETE ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_beforeInsert.sql b/db/routines/vn/triggers/supplierDms_beforeInsert.sql index 130428d1e..e7b6c492d 100644 --- a/db/routines/vn/triggers/supplierDms_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_beforeInsert` BEFORE INSERT ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_beforeUpdate.sql b/db/routines/vn/triggers/supplierDms_beforeUpdate.sql index 54dcef049..bcb5d48e7 100644 --- a/db/routines/vn/triggers/supplierDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplierDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_beforeUpdate` BEFORE UPDATE ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_afterDelete.sql b/db/routines/vn/triggers/supplier_afterDelete.sql index d4b8e0d21..17ca494c5 100644 --- a/db/routines/vn/triggers/supplier_afterDelete.sql +++ b/db/routines/vn/triggers/supplier_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplier_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_afterDelete` AFTER DELETE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_afterUpdate.sql b/db/routines/vn/triggers/supplier_afterUpdate.sql index e89df037f..a0e3ed210 100644 --- a/db/routines/vn/triggers/supplier_afterUpdate.sql +++ b/db/routines/vn/triggers/supplier_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplier_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_afterUpdate` BEFORE UPDATE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_beforeInsert.sql b/db/routines/vn/triggers/supplier_beforeInsert.sql index aef8d02ab..7440ecb6f 100644 --- a/db/routines/vn/triggers/supplier_beforeInsert.sql +++ b/db/routines/vn/triggers/supplier_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplier_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_beforeInsert` BEFORE INSERT ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_beforeUpdate.sql b/db/routines/vn/triggers/supplier_beforeUpdate.sql index f462d6f57..568556667 100644 --- a/db/routines/vn/triggers/supplier_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplier_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplier_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_beforeUpdate` BEFORE UPDATE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/tag_beforeInsert.sql b/db/routines/vn/triggers/tag_beforeInsert.sql index 27057754d..e4a494b81 100644 --- a/db/routines/vn/triggers/tag_beforeInsert.sql +++ b/db/routines/vn/triggers/tag_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`tag_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`tag_beforeInsert` BEFORE INSERT ON `tag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketCollection_afterDelete.sql b/db/routines/vn/triggers/ticketCollection_afterDelete.sql index e0917452a..fe33dfdf2 100644 --- a/db/routines/vn/triggers/ticketCollection_afterDelete.sql +++ b/db/routines/vn/triggers/ticketCollection_afterDelete.sql @@ -1,7 +1,7 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketCollection_afterDelete` - AFTER DELETE ON `ticketCollection` - FOR EACH ROW +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketCollection_afterDelete` + AFTER DELETE ON `ticketCollection` + FOR EACH ROW BEGIN DECLARE vSalesRemaining INT; @@ -24,5 +24,5 @@ BEGIN END IF; -END$$ -DELIMITER ; +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/ticketDms_afterDelete.sql b/db/routines/vn/triggers/ticketDms_afterDelete.sql index 834079520..72dbe94bb 100644 --- a/db/routines/vn/triggers/ticketDms_afterDelete.sql +++ b/db/routines/vn/triggers/ticketDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_afterDelete` AFTER DELETE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeDelete.sql b/db/routines/vn/triggers/ticketDms_beforeDelete.sql index 9c251fba1..7c7e080e1 100644 --- a/db/routines/vn/triggers/ticketDms_beforeDelete.sql +++ b/db/routines/vn/triggers/ticketDms_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketDms_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeDelete` BEFORE DELETE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeInsert.sql b/db/routines/vn/triggers/ticketDms_beforeInsert.sql index 0c00dba28..0a3da13a7 100644 --- a/db/routines/vn/triggers/ticketDms_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeInsert` BEFORE INSERT ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeUpdate.sql b/db/routines/vn/triggers/ticketDms_beforeUpdate.sql index aab22dd99..13e6f6817 100644 --- a/db/routines/vn/triggers/ticketDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeUpdate` BEFORE UPDATE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_afterDelete.sql b/db/routines/vn/triggers/ticketObservation_afterDelete.sql index f8d88add6..e909d43f4 100644 --- a/db/routines/vn/triggers/ticketObservation_afterDelete.sql +++ b/db/routines/vn/triggers/ticketObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_afterDelete` AFTER DELETE ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_beforeInsert.sql b/db/routines/vn/triggers/ticketObservation_beforeInsert.sql index ce141d56a..7988215a5 100644 --- a/db/routines/vn/triggers/ticketObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_beforeInsert` BEFORE INSERT ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql b/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql index 466e17e85..05a400a19 100644 --- a/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_beforeUpdate` BEFORE UPDATE ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_afterDelete.sql b/db/routines/vn/triggers/ticketPackaging_afterDelete.sql index 320f7e01e..2bd702595 100644 --- a/db/routines/vn/triggers/ticketPackaging_afterDelete.sql +++ b/db/routines/vn/triggers/ticketPackaging_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketPackaging_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_afterDelete` AFTER DELETE ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql b/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql index f47a7ae35..ed86e94ce 100644 --- a/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeInsert` BEFORE INSERT ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql b/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql index 5d15249c4..0e2068654 100644 --- a/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeUpdate` BEFORE UPDATE ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketParking_beforeInsert.sql b/db/routines/vn/triggers/ticketParking_beforeInsert.sql index 2add4f3ea..6cb3329bf 100644 --- a/db/routines/vn/triggers/ticketParking_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketParking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketParking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketParking_beforeInsert` BEFORE INSERT ON `ticketParking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_afterDelete.sql b/db/routines/vn/triggers/ticketRefund_afterDelete.sql index 167030d4a..4f26885a5 100644 --- a/db/routines/vn/triggers/ticketRefund_afterDelete.sql +++ b/db/routines/vn/triggers/ticketRefund_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_afterDelete` AFTER DELETE ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql index ff8ce634a..aa62fad74 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_beforeInsert` BEFORE INSERT ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql index d809b5d99..d2b13b516 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUpdate` BEFORE UPDATE ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_afterDelete.sql b/db/routines/vn/triggers/ticketRequest_afterDelete.sql index a8932a744..49ab2c814 100644 --- a/db/routines/vn/triggers/ticketRequest_afterDelete.sql +++ b/db/routines/vn/triggers/ticketRequest_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRequest_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_afterDelete` AFTER DELETE ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_beforeInsert.sql b/db/routines/vn/triggers/ticketRequest_beforeInsert.sql index 00e659abc..8416b565d 100644 --- a/db/routines/vn/triggers/ticketRequest_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRequest_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRequest_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_beforeInsert` BEFORE INSERT ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql b/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql index 954df8ed3..9b875243c 100644 --- a/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRequest_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_beforeUpdate` BEFORE UPDATE ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_afterDelete.sql b/db/routines/vn/triggers/ticketService_afterDelete.sql index ca2675ce8..94125782e 100644 --- a/db/routines/vn/triggers/ticketService_afterDelete.sql +++ b/db/routines/vn/triggers/ticketService_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_afterDelete` AFTER DELETE ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_beforeInsert.sql b/db/routines/vn/triggers/ticketService_beforeInsert.sql index 81b7e5e91..f16ec9fe9 100644 --- a/db/routines/vn/triggers/ticketService_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketService_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_beforeInsert` BEFORE INSERT ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_beforeUpdate.sql b/db/routines/vn/triggers/ticketService_beforeUpdate.sql index a24af8269..111dc80bf 100644 --- a/db/routines/vn/triggers/ticketService_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketService_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_beforeUpdate` BEFORE UPDATE ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterDelete.sql b/db/routines/vn/triggers/ticketTracking_afterDelete.sql index 2683e8d3c..be35d817f 100644 --- a/db/routines/vn/triggers/ticketTracking_afterDelete.sql +++ b/db/routines/vn/triggers/ticketTracking_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketTracking_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterDelete` AFTER DELETE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterInsert.sql b/db/routines/vn/triggers/ticketTracking_afterInsert.sql index b246cd44f..53132b906 100644 --- a/db/routines/vn/triggers/ticketTracking_afterInsert.sql +++ b/db/routines/vn/triggers/ticketTracking_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketTracking_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterInsert` AFTER INSERT ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterUpdate.sql b/db/routines/vn/triggers/ticketTracking_afterUpdate.sql index ce5586569..0b350825c 100644 --- a/db/routines/vn/triggers/ticketTracking_afterUpdate.sql +++ b/db/routines/vn/triggers/ticketTracking_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketTracking_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterUpdate` AFTER UPDATE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_beforeInsert.sql b/db/routines/vn/triggers/ticketTracking_beforeInsert.sql index 685713aea..7ee5de7d3 100644 --- a/db/routines/vn/triggers/ticketTracking_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketTracking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketTracking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_beforeInsert` BEFORE INSERT ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql b/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql index ec875387e..4bfea0dc1 100644 --- a/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketTracking_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_beforeUpdate` BEFORE UPDATE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_afterDelete.sql b/db/routines/vn/triggers/ticketWeekly_afterDelete.sql index d0ef0b8df..e11808ac8 100644 --- a/db/routines/vn/triggers/ticketWeekly_afterDelete.sql +++ b/db/routines/vn/triggers/ticketWeekly_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketWeekly_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_afterDelete` AFTER DELETE ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql b/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql index e4a61d203..36b49a978 100644 --- a/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeInsert` BEFORE INSERT ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql b/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql index 1a631bec1..68a5e140a 100644 --- a/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeUpdate` BEFORE UPDATE ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterDelete.sql b/db/routines/vn/triggers/ticket_afterDelete.sql index c80f3dbe1..3c4b26663 100644 --- a/db/routines/vn/triggers/ticket_afterDelete.sql +++ b/db/routines/vn/triggers/ticket_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterDelete` AFTER DELETE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterInsert.sql b/db/routines/vn/triggers/ticket_afterInsert.sql index 0fad0aaee..3c3985701 100644 --- a/db/routines/vn/triggers/ticket_afterInsert.sql +++ b/db/routines/vn/triggers/ticket_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterInsert` AFTER INSERT ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterUpdate.sql b/db/routines/vn/triggers/ticket_afterUpdate.sql index 1c0a8be67..b80f5cd21 100644 --- a/db/routines/vn/triggers/ticket_afterUpdate.sql +++ b/db/routines/vn/triggers/ticket_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterUpdate` AFTER UPDATE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeDelete.sql b/db/routines/vn/triggers/ticket_beforeDelete.sql index 02c5352e6..1e0d2a486 100644 --- a/db/routines/vn/triggers/ticket_beforeDelete.sql +++ b/db/routines/vn/triggers/ticket_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_beforeDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeDelete` BEFORE DELETE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeInsert.sql b/db/routines/vn/triggers/ticket_beforeInsert.sql index 7e0fc57b8..a289f7cb2 100644 --- a/db/routines/vn/triggers/ticket_beforeInsert.sql +++ b/db/routines/vn/triggers/ticket_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeInsert` BEFORE INSERT ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeUpdate.sql b/db/routines/vn/triggers/ticket_beforeUpdate.sql index 72831bc3d..cb36219d0 100644 --- a/db/routines/vn/triggers/ticket_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticket_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeUpdate` BEFORE UPDATE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/time_afterUpdate.sql b/db/routines/vn/triggers/time_afterUpdate.sql index 1eb735923..650c3b352 100644 --- a/db/routines/vn/triggers/time_afterUpdate.sql +++ b/db/routines/vn/triggers/time_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`time_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`time_afterUpdate` AFTER UPDATE ON `time` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_afterDelete.sql b/db/routines/vn/triggers/town_afterDelete.sql index e6ca82d80..4f4eb31f8 100644 --- a/db/routines/vn/triggers/town_afterDelete.sql +++ b/db/routines/vn/triggers/town_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`town_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_afterDelete` AFTER DELETE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_afterUpdate.sql b/db/routines/vn/triggers/town_afterUpdate.sql index 830428061..bffc46c1c 100644 --- a/db/routines/vn/triggers/town_afterUpdate.sql +++ b/db/routines/vn/triggers/town_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`town_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_afterUpdate` AFTER UPDATE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_beforeInsert.sql b/db/routines/vn/triggers/town_beforeInsert.sql index f3a060b2d..6b0aa8411 100644 --- a/db/routines/vn/triggers/town_beforeInsert.sql +++ b/db/routines/vn/triggers/town_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`town_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_beforeInsert` BEFORE INSERT ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_beforeUpdate.sql b/db/routines/vn/triggers/town_beforeUpdate.sql index e607b3f41..1e358404f 100644 --- a/db/routines/vn/triggers/town_beforeUpdate.sql +++ b/db/routines/vn/triggers/town_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`town_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_beforeUpdate` BEFORE UPDATE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_afterDelete.sql b/db/routines/vn/triggers/travelThermograph_afterDelete.sql index 14a875799..7dbda6250 100644 --- a/db/routines/vn/triggers/travelThermograph_afterDelete.sql +++ b/db/routines/vn/triggers/travelThermograph_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travelThermograph_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_afterDelete` AFTER DELETE ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql index 4ebe14e75..ea87b4539 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travelThermograph_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_beforeInsert` BEFORE INSERT ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql index 381e655f3..45ad83812 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travelThermograph_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_beforeUpdate` BEFORE UPDATE ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_afterDelete.sql b/db/routines/vn/triggers/travel_afterDelete.sql index a528793e9..2496a01e3 100644 --- a/db/routines/vn/triggers/travel_afterDelete.sql +++ b/db/routines/vn/triggers/travel_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_afterDelete` AFTER DELETE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_afterUpdate.sql b/db/routines/vn/triggers/travel_afterUpdate.sql index 7cfe865f3..f4b7f3705 100644 --- a/db/routines/vn/triggers/travel_afterUpdate.sql +++ b/db/routines/vn/triggers/travel_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_afterUpdate` AFTER UPDATE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_beforeInsert.sql b/db/routines/vn/triggers/travel_beforeInsert.sql index e54a5d08b..39711701b 100644 --- a/db/routines/vn/triggers/travel_beforeInsert.sql +++ b/db/routines/vn/triggers/travel_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_beforeInsert` BEFORE INSERT ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_beforeUpdate.sql b/db/routines/vn/triggers/travel_beforeUpdate.sql index 5e64ad5b3..f800aed06 100644 --- a/db/routines/vn/triggers/travel_beforeUpdate.sql +++ b/db/routines/vn/triggers/travel_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_beforeUpdate` BEFORE UPDATE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/vehicle_beforeInsert.sql b/db/routines/vn/triggers/vehicle_beforeInsert.sql index 046e11703..0e4dd8004 100644 --- a/db/routines/vn/triggers/vehicle_beforeInsert.sql +++ b/db/routines/vn/triggers/vehicle_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`vehicle_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`vehicle_beforeInsert` BEFORE INSERT ON `vehicle` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/vehicle_beforeUpdate.sql b/db/routines/vn/triggers/vehicle_beforeUpdate.sql index d61005468..18c7114c6 100644 --- a/db/routines/vn/triggers/vehicle_beforeUpdate.sql +++ b/db/routines/vn/triggers/vehicle_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`vehicle_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`vehicle_beforeUpdate` BEFORE UPDATE ON `vehicle` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/warehouse_afterInsert.sql b/db/routines/vn/triggers/warehouse_afterInsert.sql index 97a8c4152..9fd2faba6 100644 --- a/db/routines/vn/triggers/warehouse_afterInsert.sql +++ b/db/routines/vn/triggers/warehouse_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`warehouse_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`warehouse_afterInsert` BEFORE UPDATE ON `warehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_afterDelete.sql b/db/routines/vn/triggers/workerDocument_afterDelete.sql index b266d3bf6..edfb0e19a 100644 --- a/db/routines/vn/triggers/workerDocument_afterDelete.sql +++ b/db/routines/vn/triggers/workerDocument_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerDocument_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_afterDelete` AFTER DELETE ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_beforeInsert.sql b/db/routines/vn/triggers/workerDocument_beforeInsert.sql index 2a795ba38..1dfea3429 100644 --- a/db/routines/vn/triggers/workerDocument_beforeInsert.sql +++ b/db/routines/vn/triggers/workerDocument_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerDocument_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_beforeInsert` BEFORE INSERT ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_beforeUpdate.sql b/db/routines/vn/triggers/workerDocument_beforeUpdate.sql index ffa137b3a..d8976de11 100644 --- a/db/routines/vn/triggers/workerDocument_beforeUpdate.sql +++ b/db/routines/vn/triggers/workerDocument_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerDocument_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_beforeUpdate` BEFORE UPDATE ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterDelete.sql b/db/routines/vn/triggers/workerIncome_afterDelete.sql index e19df59a8..5b35fd5ee 100644 --- a/db/routines/vn/triggers/workerIncome_afterDelete.sql +++ b/db/routines/vn/triggers/workerIncome_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerIncome_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterDelete` AFTER DELETE ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterInsert.sql b/db/routines/vn/triggers/workerIncome_afterInsert.sql index 8837f9c07..110b7f156 100644 --- a/db/routines/vn/triggers/workerIncome_afterInsert.sql +++ b/db/routines/vn/triggers/workerIncome_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerIncome_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterInsert` AFTER INSERT ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterUpdate.sql b/db/routines/vn/triggers/workerIncome_afterUpdate.sql index a2584df22..19d111db3 100644 --- a/db/routines/vn/triggers/workerIncome_afterUpdate.sql +++ b/db/routines/vn/triggers/workerIncome_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerIncome_afterUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterUpdate` AFTER UPDATE ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_afterDelete.sql b/db/routines/vn/triggers/workerTimeControl_afterDelete.sql index 19653c913..ee60f0de9 100644 --- a/db/routines/vn/triggers/workerTimeControl_afterDelete.sql +++ b/db/routines/vn/triggers/workerTimeControl_afterDelete.sql @@ -1,12 +1,12 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerTimeControl_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterDelete` AFTER DELETE ON `workerTimeControl` FOR EACH ROW -BEGIN - INSERT INTO workerLog - SET `action` = 'delete', - `changedModel` = 'WorkerTimeControl', - `changedModelId` = OLD.id, - `userFk` = account.myUser_getId(); +BEGIN + INSERT INTO workerLog + SET `action` = 'delete', + `changedModel` = 'WorkerTimeControl', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/workerTimeControl_afterInsert.sql b/db/routines/vn/triggers/workerTimeControl_afterInsert.sql index b8b9c3b01..5ea2e711a 100644 --- a/db/routines/vn/triggers/workerTimeControl_afterInsert.sql +++ b/db/routines/vn/triggers/workerTimeControl_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert` AFTER INSERT ON `workerTimeControl` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql b/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql index ad7acb784..e3bf448ad 100644 --- a/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql +++ b/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql @@ -1,8 +1,8 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeInsert` BEFORE INSERT ON `workerTimeControl` FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +BEGIN + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql b/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql index bb391ad61..4ecdeeede 100644 --- a/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql +++ b/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql @@ -1,8 +1,8 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeUpdate` BEFORE UPDATE ON `workerTimeControl` FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +BEGIN + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/worker_afterDelete.sql b/db/routines/vn/triggers/worker_afterDelete.sql index 0104248ff..bfebe141c 100644 --- a/db/routines/vn/triggers/worker_afterDelete.sql +++ b/db/routines/vn/triggers/worker_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`worker_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_afterDelete` AFTER DELETE ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/worker_beforeInsert.sql b/db/routines/vn/triggers/worker_beforeInsert.sql index 8830bd77e..8bddf8d4d 100644 --- a/db/routines/vn/triggers/worker_beforeInsert.sql +++ b/db/routines/vn/triggers/worker_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`worker_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_beforeInsert` BEFORE INSERT ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/worker_beforeUpdate.sql b/db/routines/vn/triggers/worker_beforeUpdate.sql index 05705d273..a0302eef4 100644 --- a/db/routines/vn/triggers/worker_beforeUpdate.sql +++ b/db/routines/vn/triggers/worker_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`worker_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_beforeUpdate` BEFORE UPDATE ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workingHours_beforeInsert.sql b/db/routines/vn/triggers/workingHours_beforeInsert.sql index dce726f10..c552fdaf5 100644 --- a/db/routines/vn/triggers/workingHours_beforeInsert.sql +++ b/db/routines/vn/triggers/workingHours_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`workingHours_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workingHours_beforeInsert` BEFORE INSERT ON `workingHours` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_afterDelete.sql b/db/routines/vn/triggers/zoneEvent_afterDelete.sql index 1eecc21dc..5f1637993 100644 --- a/db/routines/vn/triggers/zoneEvent_afterDelete.sql +++ b/db/routines/vn/triggers/zoneEvent_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneEvent_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_afterDelete` AFTER DELETE ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_beforeInsert.sql b/db/routines/vn/triggers/zoneEvent_beforeInsert.sql index ae1542851..e871182ee 100644 --- a/db/routines/vn/triggers/zoneEvent_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneEvent_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneEvent_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_beforeInsert` BEFORE INSERT ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql b/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql index 09698a2c9..dc7baacf6 100644 --- a/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneEvent_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_beforeUpdate` BEFORE UPDATE ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_afterDelete.sql b/db/routines/vn/triggers/zoneExclusion_afterDelete.sql index 6c8a441aa..6725d4e46 100644 --- a/db/routines/vn/triggers/zoneExclusion_afterDelete.sql +++ b/db/routines/vn/triggers/zoneExclusion_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneExclusion_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_afterDelete` AFTER DELETE ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql b/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql index 6b2d2f5c7..d4bd22d7c 100644 --- a/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeInsert` BEFORE INSERT ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql b/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql index 1daa6d2f0..bc0bebac9 100644 --- a/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeUpdate` BEFORE UPDATE ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneGeo_beforeInsert.sql b/db/routines/vn/triggers/zoneGeo_beforeInsert.sql index 1dbefbed9..adc3bdf1a 100644 --- a/db/routines/vn/triggers/zoneGeo_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneGeo_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneGeo_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneGeo_beforeInsert` BEFORE INSERT ON `zoneGeo` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql b/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql index 0fdd7a682..2bb5758ff 100644 --- a/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneGeo_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneGeo_beforeUpdate` BEFORE UPDATE ON `zoneGeo` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_afterDelete.sql b/db/routines/vn/triggers/zoneIncluded_afterDelete.sql index 18332bb55..df5d41458 100644 --- a/db/routines/vn/triggers/zoneIncluded_afterDelete.sql +++ b/db/routines/vn/triggers/zoneIncluded_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_afterDelete` AFTER DELETE ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql b/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql index 18895c9a5..b2678dcf8 100644 --- a/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert` BEFORE INSERT ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql b/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql index e3f0a27e2..f30e0dad4 100644 --- a/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUpdate` BEFORE UPDATE ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql b/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql index 3befff38a..c4f93ab6c 100644 --- a/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql +++ b/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneWarehouse_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_afterDelete` AFTER DELETE ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql b/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql index 099e66587..ea405db8e 100644 --- a/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeInsert` BEFORE INSERT ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql b/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql index 2a6563dc5..efc6ef049 100644 --- a/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeUpdate` BEFORE UPDATE ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_afterDelete.sql b/db/routines/vn/triggers/zone_afterDelete.sql index 463fa89e8..6272d3675 100644 --- a/db/routines/vn/triggers/zone_afterDelete.sql +++ b/db/routines/vn/triggers/zone_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zone_afterDelete` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_afterDelete` AFTER DELETE ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_beforeInsert.sql b/db/routines/vn/triggers/zone_beforeInsert.sql index e0449a989..5a719b138 100644 --- a/db/routines/vn/triggers/zone_beforeInsert.sql +++ b/db/routines/vn/triggers/zone_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zone_beforeInsert` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_beforeInsert` BEFORE INSERT ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_beforeUpdate.sql b/db/routines/vn/triggers/zone_beforeUpdate.sql index f945ad32c..d05b9a492 100644 --- a/db/routines/vn/triggers/zone_beforeUpdate.sql +++ b/db/routines/vn/triggers/zone_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zone_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_beforeUpdate` BEFORE UPDATE ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/views/NewView.sql b/db/routines/vn/views/NewView.sql index 389564966..cac232071 100644 --- a/db/routines/vn/views/NewView.sql +++ b/db/routines/vn/views/NewView.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`NewView` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/agencyTerm.sql b/db/routines/vn/views/agencyTerm.sql index 5f54cf39f..8244fc47d 100644 --- a/db/routines/vn/views/agencyTerm.sql +++ b/db/routines/vn/views/agencyTerm.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`agencyTerm` AS SELECT `sat`.`agencyFk` AS `agencyFk`, diff --git a/db/routines/vn/views/annualAverageInvoiced.sql b/db/routines/vn/views/annualAverageInvoiced.sql index 30e81e1ec..c48cf7321 100644 --- a/db/routines/vn/views/annualAverageInvoiced.sql +++ b/db/routines/vn/views/annualAverageInvoiced.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`annualAverageInvoiced` AS SELECT `cec`.`clientFk` AS `clientFk`, diff --git a/db/routines/vn/views/awbVolume.sql b/db/routines/vn/views/awbVolume.sql index df3b1ed1a..7b59a0cf4 100644 --- a/db/routines/vn/views/awbVolume.sql +++ b/db/routines/vn/views/awbVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`awbVolume` AS SELECT `t`.`awbFk` AS `awbFk`, diff --git a/db/routines/vn/views/businessCalendar.sql b/db/routines/vn/views/businessCalendar.sql index feda22793..5640e1bdd 100644 --- a/db/routines/vn/views/businessCalendar.sql +++ b/db/routines/vn/views/businessCalendar.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`businessCalendar` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/buyer.sql b/db/routines/vn/views/buyer.sql index 7114c50bc..91e472ca6 100644 --- a/db/routines/vn/views/buyer.sql +++ b/db/routines/vn/views/buyer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`buyer` AS SELECT DISTINCT `u`.`id` AS `userFk`, diff --git a/db/routines/vn/views/buyerSales.sql b/db/routines/vn/views/buyerSales.sql index b67e17569..ed605b436 100644 --- a/db/routines/vn/views/buyerSales.sql +++ b/db/routines/vn/views/buyerSales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`buyerSales` AS SELECT `v`.`importe` AS `importe`, diff --git a/db/routines/vn/views/clientLost.sql b/db/routines/vn/views/clientLost.sql index 764782d08..df3eaac7d 100644 --- a/db/routines/vn/views/clientLost.sql +++ b/db/routines/vn/views/clientLost.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`clientLost` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/clientPhoneBook.sql b/db/routines/vn/views/clientPhoneBook.sql index 7ab2a99db..67e42d8c5 100644 --- a/db/routines/vn/views/clientPhoneBook.sql +++ b/db/routines/vn/views/clientPhoneBook.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`clientPhoneBook` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/companyL10n.sql b/db/routines/vn/views/companyL10n.sql index fa5c4c5d8..0c42de12e 100644 --- a/db/routines/vn/views/companyL10n.sql +++ b/db/routines/vn/views/companyL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`companyL10n` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/defaulter.sql b/db/routines/vn/views/defaulter.sql index 9d48978b2..c7cb9ecb2 100644 --- a/db/routines/vn/views/defaulter.sql +++ b/db/routines/vn/views/defaulter.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`defaulter` AS SELECT `d`.`clientFk` AS `clientFk`, diff --git a/db/routines/vn/views/departmentTree.sql b/db/routines/vn/views/departmentTree.sql index 6f5a1205a..829b21854 100644 --- a/db/routines/vn/views/departmentTree.sql +++ b/db/routines/vn/views/departmentTree.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`departmentTree` AS SELECT `node`.`id` AS `id`, diff --git a/db/routines/vn/views/ediGenus.sql b/db/routines/vn/views/ediGenus.sql index 4546afa33..5a50f7694 100644 --- a/db/routines/vn/views/ediGenus.sql +++ b/db/routines/vn/views/ediGenus.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ediGenus` AS SELECT `g`.`genus_id` AS `id`, diff --git a/db/routines/vn/views/ediSpecie.sql b/db/routines/vn/views/ediSpecie.sql index 9587cb530..c472dd5b0 100644 --- a/db/routines/vn/views/ediSpecie.sql +++ b/db/routines/vn/views/ediSpecie.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ediSpecie` AS SELECT `s`.`specie_id` AS `id`, diff --git a/db/routines/vn/views/ektSubAddress.sql b/db/routines/vn/views/ektSubAddress.sql index 11f6e2e70..46fc02828 100644 --- a/db/routines/vn/views/ektSubAddress.sql +++ b/db/routines/vn/views/ektSubAddress.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ektSubAddress` AS SELECT `eea`.`sub` AS `sub`, diff --git a/db/routines/vn/views/especialPrice.sql b/db/routines/vn/views/especialPrice.sql index 79d3e1384..95615802c 100644 --- a/db/routines/vn/views/especialPrice.sql +++ b/db/routines/vn/views/especialPrice.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`especialPrice` AS SELECT `sp`.`id` AS `id`, diff --git a/db/routines/vn/views/exchangeInsuranceEntry.sql b/db/routines/vn/views/exchangeInsuranceEntry.sql index e9c7a7bbe..3b122712a 100644 --- a/db/routines/vn/views/exchangeInsuranceEntry.sql +++ b/db/routines/vn/views/exchangeInsuranceEntry.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceEntry` AS SELECT max(`tr`.`landed`) AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceIn.sql b/db/routines/vn/views/exchangeInsuranceIn.sql index aa27cfb4c..745bc5fd1 100644 --- a/db/routines/vn/views/exchangeInsuranceIn.sql +++ b/db/routines/vn/views/exchangeInsuranceIn.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceIn` AS SELECT `exchangeInsuranceInPrevious`.`dated` AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceInPrevious.sql b/db/routines/vn/views/exchangeInsuranceInPrevious.sql index 3f997e8bf..5fbe8c7e4 100644 --- a/db/routines/vn/views/exchangeInsuranceInPrevious.sql +++ b/db/routines/vn/views/exchangeInsuranceInPrevious.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceInPrevious` AS SELECT `ei`.`dueDated` AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceOut.sql b/db/routines/vn/views/exchangeInsuranceOut.sql index 5c41dbb24..658552fa0 100644 --- a/db/routines/vn/views/exchangeInsuranceOut.sql +++ b/db/routines/vn/views/exchangeInsuranceOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceOut` AS SELECT `p`.`received` AS `received`, diff --git a/db/routines/vn/views/expeditionCommon.sql b/db/routines/vn/views/expeditionCommon.sql index fcf36a7d8..c79561a7a 100644 --- a/db/routines/vn/views/expeditionCommon.sql +++ b/db/routines/vn/views/expeditionCommon.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionCommon` AS SELECT `rs`.`id` AS `truckFk`, diff --git a/db/routines/vn/views/expeditionPallet_Print.sql b/db/routines/vn/views/expeditionPallet_Print.sql index aab725ebe..0f58d5c50 100644 --- a/db/routines/vn/views/expeditionPallet_Print.sql +++ b/db/routines/vn/views/expeditionPallet_Print.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionPallet_Print` AS SELECT `rs2`.`description` AS `truck`, diff --git a/db/routines/vn/views/expeditionRoute_Monitor.sql b/db/routines/vn/views/expeditionRoute_Monitor.sql index 7eef40425..cfcdcae01 100644 --- a/db/routines/vn/views/expeditionRoute_Monitor.sql +++ b/db/routines/vn/views/expeditionRoute_Monitor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionRoute_Monitor` AS SELECT `r`.`id` AS `routeFk`, diff --git a/db/routines/vn/views/expeditionRoute_freeTickets.sql b/db/routines/vn/views/expeditionRoute_freeTickets.sql index 85e6297c9..99b09c919 100644 --- a/db/routines/vn/views/expeditionRoute_freeTickets.sql +++ b/db/routines/vn/views/expeditionRoute_freeTickets.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionRoute_freeTickets` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/vn/views/expeditionScan_Monitor.sql b/db/routines/vn/views/expeditionScan_Monitor.sql index 94bda1863..1eefc8747 100644 --- a/db/routines/vn/views/expeditionScan_Monitor.sql +++ b/db/routines/vn/views/expeditionScan_Monitor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionScan_Monitor` AS SELECT `rs`.`id` AS `truckFk`, diff --git a/db/routines/vn/views/expeditionSticker.sql b/db/routines/vn/views/expeditionSticker.sql index ef0743527..05de3f248 100644 --- a/db/routines/vn/views/expeditionSticker.sql +++ b/db/routines/vn/views/expeditionSticker.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionSticker` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/vn/views/expeditionTicket_NoBoxes.sql b/db/routines/vn/views/expeditionTicket_NoBoxes.sql index 75218c7a9..76ff021f4 100644 --- a/db/routines/vn/views/expeditionTicket_NoBoxes.sql +++ b/db/routines/vn/views/expeditionTicket_NoBoxes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTicket_NoBoxes` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/vn/views/expeditionTimeExpended.sql b/db/routines/vn/views/expeditionTimeExpended.sql index 65aeb72b2..ebf074f39 100644 --- a/db/routines/vn/views/expeditionTimeExpended.sql +++ b/db/routines/vn/views/expeditionTimeExpended.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTimeExpended` AS SELECT `e`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/expeditionTruck.sql b/db/routines/vn/views/expeditionTruck.sql index 065869de0..55596e286 100644 --- a/db/routines/vn/views/expeditionTruck.sql +++ b/db/routines/vn/views/expeditionTruck.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTruck` AS SELECT `rs`.`id` AS `id`, diff --git a/db/routines/vn/views/firstTicketShipped.sql b/db/routines/vn/views/firstTicketShipped.sql index c01a17976..65d414d68 100644 --- a/db/routines/vn/views/firstTicketShipped.sql +++ b/db/routines/vn/views/firstTicketShipped.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`firstTicketShipped` AS SELECT min(`vn`.`ticket`.`shipped`) AS `shipped`, diff --git a/db/routines/vn/views/floraHollandBuyedItems.sql b/db/routines/vn/views/floraHollandBuyedItems.sql index b695c49fd..1083d1362 100644 --- a/db/routines/vn/views/floraHollandBuyedItems.sql +++ b/db/routines/vn/views/floraHollandBuyedItems.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`floraHollandBuyedItems` AS SELECT `b`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/inkL10n.sql b/db/routines/vn/views/inkL10n.sql index 14958ff0a..39244921b 100644 --- a/db/routines/vn/views/inkL10n.sql +++ b/db/routines/vn/views/inkL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`inkL10n` AS SELECT `k`.`id` AS `id`, diff --git a/db/routines/vn/views/invoiceCorrectionDataSource.sql b/db/routines/vn/views/invoiceCorrectionDataSource.sql index d401c20f1..50037ba6a 100644 --- a/db/routines/vn/views/invoiceCorrectionDataSource.sql +++ b/db/routines/vn/views/invoiceCorrectionDataSource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`invoiceCorrectionDataSource` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemBotanicalWithGenus.sql b/db/routines/vn/views/itemBotanicalWithGenus.sql index 3bc0b943d..3feceaf29 100644 --- a/db/routines/vn/views/itemBotanicalWithGenus.sql +++ b/db/routines/vn/views/itemBotanicalWithGenus.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemBotanicalWithGenus` AS SELECT `ib`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemCategoryL10n.sql b/db/routines/vn/views/itemCategoryL10n.sql index 08a7c7321..357638aa1 100644 --- a/db/routines/vn/views/itemCategoryL10n.sql +++ b/db/routines/vn/views/itemCategoryL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemCategoryL10n` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/itemColor.sql b/db/routines/vn/views/itemColor.sql index 5ab8a4c4f..8b9e1100d 100644 --- a/db/routines/vn/views/itemColor.sql +++ b/db/routines/vn/views/itemColor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemColor` AS SELECT `it`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemEntryIn.sql b/db/routines/vn/views/itemEntryIn.sql index 184ccbf59..8ebed93fc 100644 --- a/db/routines/vn/views/itemEntryIn.sql +++ b/db/routines/vn/views/itemEntryIn.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemEntryIn` AS SELECT `t`.`warehouseInFk` AS `warehouseInFk`, diff --git a/db/routines/vn/views/itemEntryOut.sql b/db/routines/vn/views/itemEntryOut.sql index 82b065985..d9c8d9ec0 100644 --- a/db/routines/vn/views/itemEntryOut.sql +++ b/db/routines/vn/views/itemEntryOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemEntryOut` AS SELECT `t`.`warehouseOutFk` AS `warehouseOutFk`, diff --git a/db/routines/vn/views/itemInk.sql b/db/routines/vn/views/itemInk.sql index d13a862e7..d055806a7 100644 --- a/db/routines/vn/views/itemInk.sql +++ b/db/routines/vn/views/itemInk.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemInk` AS SELECT `i`.`longName` AS `longName`, diff --git a/db/routines/vn/views/itemPlacementSupplyList.sql b/db/routines/vn/views/itemPlacementSupplyList.sql index 10e7ae3ef..fe46ef038 100644 --- a/db/routines/vn/views/itemPlacementSupplyList.sql +++ b/db/routines/vn/views/itemPlacementSupplyList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemPlacementSupplyList` AS SELECT `ips`.`id` AS `id`, diff --git a/db/routines/vn/views/itemProductor.sql b/db/routines/vn/views/itemProductor.sql index f6cb0eb19..93c7ff4c9 100644 --- a/db/routines/vn/views/itemProductor.sql +++ b/db/routines/vn/views/itemProductor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemProductor` AS SELECT `it`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemSearch.sql b/db/routines/vn/views/itemSearch.sql index 6a21b9e92..d246f91c8 100644 --- a/db/routines/vn/views/itemSearch.sql +++ b/db/routines/vn/views/itemSearch.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemSearch` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingAvailable.sql b/db/routines/vn/views/itemShelvingAvailable.sql index 868d6a963..85aa8154d 100644 --- a/db/routines/vn/views/itemShelvingAvailable.sql +++ b/db/routines/vn/views/itemShelvingAvailable.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingAvailable` AS SELECT `s`.`id` AS `saleFk`, diff --git a/db/routines/vn/views/itemShelvingList.sql b/db/routines/vn/views/itemShelvingList.sql index 570bf0be6..d65cf82fa 100644 --- a/db/routines/vn/views/itemShelvingList.sql +++ b/db/routines/vn/views/itemShelvingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingList` AS SELECT `ish`.`shelvingFk` AS `shelvingFk`, diff --git a/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql b/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql index 217aaf6ac..ed47f02c9 100644 --- a/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql +++ b/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingPlacementSupplyStock` AS SELECT `ish`.`id` AS `itemShelvingFk`, diff --git a/db/routines/vn/views/itemShelvingSaleSum.sql b/db/routines/vn/views/itemShelvingSaleSum.sql index 566e20a69..99e335891 100644 --- a/db/routines/vn/views/itemShelvingSaleSum.sql +++ b/db/routines/vn/views/itemShelvingSaleSum.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingSaleSum` AS SELECT `iss`.`id` AS `id`, diff --git a/db/routines/vn/views/itemShelvingStock.sql b/db/routines/vn/views/itemShelvingStock.sql index e0825eae5..59b41e801 100644 --- a/db/routines/vn/views/itemShelvingStock.sql +++ b/db/routines/vn/views/itemShelvingStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStock` AS SELECT `ish`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingStockFull.sql b/db/routines/vn/views/itemShelvingStockFull.sql index 71ce5ed79..85f89a9a3 100644 --- a/db/routines/vn/views/itemShelvingStockFull.sql +++ b/db/routines/vn/views/itemShelvingStockFull.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStockFull` AS SELECT `ish`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingStockRemoved.sql b/db/routines/vn/views/itemShelvingStockRemoved.sql index fb201e0f1..48b4aae2f 100644 --- a/db/routines/vn/views/itemShelvingStockRemoved.sql +++ b/db/routines/vn/views/itemShelvingStockRemoved.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStockRemoved` AS SELECT `ish`.`id` AS `itemShelvingFk`, diff --git a/db/routines/vn/views/itemTagged.sql b/db/routines/vn/views/itemTagged.sql index c22354bda..1804ba21e 100644 --- a/db/routines/vn/views/itemTagged.sql +++ b/db/routines/vn/views/itemTagged.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTagged` AS SELECT DISTINCT `vn`.`itemTag`.`itemFk` AS `itemFk` diff --git a/db/routines/vn/views/itemTaxCountrySpain.sql b/db/routines/vn/views/itemTaxCountrySpain.sql index 9dfaf0b41..5a0fbaf55 100644 --- a/db/routines/vn/views/itemTaxCountrySpain.sql +++ b/db/routines/vn/views/itemTaxCountrySpain.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTaxCountrySpain` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/vn/views/itemTicketOut.sql b/db/routines/vn/views/itemTicketOut.sql index d9bbd54bd..8638e5797 100644 --- a/db/routines/vn/views/itemTicketOut.sql +++ b/db/routines/vn/views/itemTicketOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTicketOut` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/itemTypeL10n.sql b/db/routines/vn/views/itemTypeL10n.sql index 03d72f0d4..4b5b713d1 100644 --- a/db/routines/vn/views/itemTypeL10n.sql +++ b/db/routines/vn/views/itemTypeL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTypeL10n` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn/views/item_Free_Id.sql b/db/routines/vn/views/item_Free_Id.sql index 36464004c..fb6414d29 100644 --- a/db/routines/vn/views/item_Free_Id.sql +++ b/db/routines/vn/views/item_Free_Id.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`item_Free_Id` AS SELECT `i1`.`id` + 1 AS `newId` diff --git a/db/routines/vn/views/labelInfo.sql b/db/routines/vn/views/labelInfo.sql index ccc6fc6ac..32febb94c 100644 --- a/db/routines/vn/views/labelInfo.sql +++ b/db/routines/vn/views/labelInfo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`labelInfo` AS SELECT `i`.`id` AS `itemId`, diff --git a/db/routines/vn/views/lastHourProduction.sql b/db/routines/vn/views/lastHourProduction.sql index 90bc0cd76..43042912a 100644 --- a/db/routines/vn/views/lastHourProduction.sql +++ b/db/routines/vn/views/lastHourProduction.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastHourProduction` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/lastPurchases.sql b/db/routines/vn/views/lastPurchases.sql index 04a9f8c05..42a7be08d 100644 --- a/db/routines/vn/views/lastPurchases.sql +++ b/db/routines/vn/views/lastPurchases.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastPurchases` AS SELECT `tr`.`landed` AS `landed`, diff --git a/db/routines/vn/views/lastTopClaims.sql b/db/routines/vn/views/lastTopClaims.sql index 0bc36e3c2..bb7592df3 100644 --- a/db/routines/vn/views/lastTopClaims.sql +++ b/db/routines/vn/views/lastTopClaims.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastTopClaims` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/mistake.sql b/db/routines/vn/views/mistake.sql index 0ed4dccf2..fdc8791db 100644 --- a/db/routines/vn/views/mistake.sql +++ b/db/routines/vn/views/mistake.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`mistake` AS SELECT `wr`.`code` AS `revisador`, diff --git a/db/routines/vn/views/mistakeRatio.sql b/db/routines/vn/views/mistakeRatio.sql index 4b7fd5a1f..93662010a 100644 --- a/db/routines/vn/views/mistakeRatio.sql +++ b/db/routines/vn/views/mistakeRatio.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`mistakeRatio` AS SELECT `wr`.`code` AS `revisador`, diff --git a/db/routines/vn/views/newBornSales.sql b/db/routines/vn/views/newBornSales.sql index d34eff4ef..98babfcd6 100644 --- a/db/routines/vn/views/newBornSales.sql +++ b/db/routines/vn/views/newBornSales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`newBornSales` AS SELECT `v`.`importe` AS `amount`, diff --git a/db/routines/vn/views/operatorWorkerCode.sql b/db/routines/vn/views/operatorWorkerCode.sql index 340d833a7..9a96bfb42 100644 --- a/db/routines/vn/views/operatorWorkerCode.sql +++ b/db/routines/vn/views/operatorWorkerCode.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`operatorWorkerCode` AS SELECT `o`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/originL10n.sql b/db/routines/vn/views/originL10n.sql index 2ff368e14..dc4f2cecf 100644 --- a/db/routines/vn/views/originL10n.sql +++ b/db/routines/vn/views/originL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`originL10n` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/vn/views/packageEquivalentItem.sql b/db/routines/vn/views/packageEquivalentItem.sql index ba2897c14..bca06fae3 100644 --- a/db/routines/vn/views/packageEquivalentItem.sql +++ b/db/routines/vn/views/packageEquivalentItem.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`packageEquivalentItem` AS SELECT `p`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/paymentExchangeInsurance.sql b/db/routines/vn/views/paymentExchangeInsurance.sql index f3e07eaaf..068c165ee 100644 --- a/db/routines/vn/views/paymentExchangeInsurance.sql +++ b/db/routines/vn/views/paymentExchangeInsurance.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`paymentExchangeInsurance` AS SELECT `ei`.`id` AS `pago_sdc_id`, diff --git a/db/routines/vn/views/payrollCenter.sql b/db/routines/vn/views/payrollCenter.sql index dfe7e4728..566dfa367 100644 --- a/db/routines/vn/views/payrollCenter.sql +++ b/db/routines/vn/views/payrollCenter.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`payrollCenter` AS SELECT `b`.`workCenterFkA3` AS `codCenter`, diff --git a/db/routines/vn/views/personMedia.sql b/db/routines/vn/views/personMedia.sql index d17410ef1..41cca52d5 100644 --- a/db/routines/vn/views/personMedia.sql +++ b/db/routines/vn/views/personMedia.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`personMedia` AS SELECT `c`.`id` AS `workerFk`, diff --git a/db/routines/vn/views/phoneBook.sql b/db/routines/vn/views/phoneBook.sql index 5fcafe99c..1fd0c4641 100644 --- a/db/routines/vn/views/phoneBook.sql +++ b/db/routines/vn/views/phoneBook.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`phoneBook` AS SELECT 'C' AS `Tipo`, diff --git a/db/routines/vn/views/productionVolume.sql b/db/routines/vn/views/productionVolume.sql index fd83b96bc..8e3a14c10 100644 --- a/db/routines/vn/views/productionVolume.sql +++ b/db/routines/vn/views/productionVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`productionVolume` AS SELECT HOUR(`e`.`created`) AS `hora`, diff --git a/db/routines/vn/views/productionVolume_LastHour.sql b/db/routines/vn/views/productionVolume_LastHour.sql index 561a23f9b..ad77b3c6f 100644 --- a/db/routines/vn/views/productionVolume_LastHour.sql +++ b/db/routines/vn/views/productionVolume_LastHour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`productionVolume_LastHour` AS SELECT cast( diff --git a/db/routines/vn/views/role.sql b/db/routines/vn/views/role.sql index 310951570..1aa1482e6 100644 --- a/db/routines/vn/views/role.sql +++ b/db/routines/vn/views/role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`role` AS SELECT `account`.`role`.`id` AS `id`, diff --git a/db/routines/vn/views/routesControl.sql b/db/routines/vn/views/routesControl.sql index 282dd21e3..697d1298d 100644 --- a/db/routines/vn/views/routesControl.sql +++ b/db/routines/vn/views/routesControl.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`routesControl` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/vn/views/saleCost.sql b/db/routines/vn/views/saleCost.sql index 304b9e3a3..e9f451f37 100644 --- a/db/routines/vn/views/saleCost.sql +++ b/db/routines/vn/views/saleCost.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleCost` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/saleMistakeList.sql b/db/routines/vn/views/saleMistakeList.sql index d362e0d97..36413406c 100644 --- a/db/routines/vn/views/saleMistakeList.sql +++ b/db/routines/vn/views/saleMistakeList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleMistakeList` AS SELECT `st`.`saleFk` AS `saleFk`, diff --git a/db/routines/vn/views/saleMistake_list__2.sql b/db/routines/vn/views/saleMistake_list__2.sql index 1f40a89d9..0f302cbd2 100644 --- a/db/routines/vn/views/saleMistake_list__2.sql +++ b/db/routines/vn/views/saleMistake_list__2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleMistake_list__2` AS SELECT `st`.`saleFk` AS `saleFk`, diff --git a/db/routines/vn/views/saleSaleTracking.sql b/db/routines/vn/views/saleSaleTracking.sql index 9ada798cf..20b20569c 100644 --- a/db/routines/vn/views/saleSaleTracking.sql +++ b/db/routines/vn/views/saleSaleTracking.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleSaleTracking` AS SELECT DISTINCT `st`.`saleFk` AS `saleFk` diff --git a/db/routines/vn/views/saleValue.sql b/db/routines/vn/views/saleValue.sql index 2dee4695e..4587143c6 100644 --- a/db/routines/vn/views/saleValue.sql +++ b/db/routines/vn/views/saleValue.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleValue` AS SELECT `wh`.`name` AS `warehouse`, diff --git a/db/routines/vn/views/saleVolume.sql b/db/routines/vn/views/saleVolume.sql index ffc6714c6..37d27ff77 100644 --- a/db/routines/vn/views/saleVolume.sql +++ b/db/routines/vn/views/saleVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleVolume` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/saleVolume_Today_VNH.sql b/db/routines/vn/views/saleVolume_Today_VNH.sql index c36779146..31ba77844 100644 --- a/db/routines/vn/views/saleVolume_Today_VNH.sql +++ b/db/routines/vn/views/saleVolume_Today_VNH.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleVolume_Today_VNH` AS SELECT `t`.`nickname` AS `Cliente`, diff --git a/db/routines/vn/views/sale_freightComponent.sql b/db/routines/vn/views/sale_freightComponent.sql index 269a8cca1..6548b4a84 100644 --- a/db/routines/vn/views/sale_freightComponent.sql +++ b/db/routines/vn/views/sale_freightComponent.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`sale_freightComponent` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/vn/views/salesPersonSince.sql b/db/routines/vn/views/salesPersonSince.sql index 4234ecac4..485bdbf2c 100644 --- a/db/routines/vn/views/salesPersonSince.sql +++ b/db/routines/vn/views/salesPersonSince.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPersonSince` AS SELECT `b`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/salesPreparedLastHour.sql b/db/routines/vn/views/salesPreparedLastHour.sql index caa7866cb..ec4a2cbef 100644 --- a/db/routines/vn/views/salesPreparedLastHour.sql +++ b/db/routines/vn/views/salesPreparedLastHour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPreparedLastHour` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/salesPreviousPreparated.sql b/db/routines/vn/views/salesPreviousPreparated.sql index 40ae29eda..d12a28801 100644 --- a/db/routines/vn/views/salesPreviousPreparated.sql +++ b/db/routines/vn/views/salesPreviousPreparated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPreviousPreparated` AS SELECT `st`.`saleFk` AS `saleFk` diff --git a/db/routines/vn/views/supplierPackaging.sql b/db/routines/vn/views/supplierPackaging.sql index 45a9d46d3..319f48d9f 100644 --- a/db/routines/vn/views/supplierPackaging.sql +++ b/db/routines/vn/views/supplierPackaging.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`supplierPackaging` AS SELECT `e`.`supplierFk` AS `supplierFk`, diff --git a/db/routines/vn/views/tagL10n.sql b/db/routines/vn/views/tagL10n.sql index 982122b13..201e07345 100644 --- a/db/routines/vn/views/tagL10n.sql +++ b/db/routines/vn/views/tagL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`tagL10n` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn/views/ticketDownBuffer.sql b/db/routines/vn/views/ticketDownBuffer.sql index 4d157f20c..cf46a317b 100644 --- a/db/routines/vn/views/ticketDownBuffer.sql +++ b/db/routines/vn/views/ticketDownBuffer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketDownBuffer` AS SELECT `td`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketLastUpdated.sql b/db/routines/vn/views/ticketLastUpdated.sql index 96b6eaa17..cdebf34b1 100644 --- a/db/routines/vn/views/ticketLastUpdated.sql +++ b/db/routines/vn/views/ticketLastUpdated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketLastUpdated` AS SELECT `ticketLastUpdatedList`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketLastUpdatedList.sql b/db/routines/vn/views/ticketLastUpdatedList.sql index bfc769e47..4eb672cd0 100644 --- a/db/routines/vn/views/ticketLastUpdatedList.sql +++ b/db/routines/vn/views/ticketLastUpdatedList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketLastUpdatedList` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketNotInvoiced.sql b/db/routines/vn/views/ticketNotInvoiced.sql index c35b414ce..dbe35a6fa 100644 --- a/db/routines/vn/views/ticketNotInvoiced.sql +++ b/db/routines/vn/views/ticketNotInvoiced.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketNotInvoiced` AS SELECT `t`.`companyFk` AS `companyFk`, diff --git a/db/routines/vn/views/ticketPackingList.sql b/db/routines/vn/views/ticketPackingList.sql index bafe3c00c..72d9061ff 100644 --- a/db/routines/vn/views/ticketPackingList.sql +++ b/db/routines/vn/views/ticketPackingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketPackingList` AS SELECT `t`.`nickname` AS `nickname`, diff --git a/db/routines/vn/views/ticketPreviousPreparingList.sql b/db/routines/vn/views/ticketPreviousPreparingList.sql index cd18b3a7c..ef3065b9e 100644 --- a/db/routines/vn/views/ticketPreviousPreparingList.sql +++ b/db/routines/vn/views/ticketPreviousPreparingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketPreviousPreparingList` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketState.sql b/db/routines/vn/views/ticketState.sql index 118a58b34..a9f2720de 100644 --- a/db/routines/vn/views/ticketState.sql +++ b/db/routines/vn/views/ticketState.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketState` AS SELECT `tt`.`created` AS `updated`, diff --git a/db/routines/vn/views/ticketStateToday.sql b/db/routines/vn/views/ticketStateToday.sql index 1f10aceb1..b38bd0737 100644 --- a/db/routines/vn/views/ticketStateToday.sql +++ b/db/routines/vn/views/ticketStateToday.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketStateToday` AS SELECT `ts`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/tr2.sql b/db/routines/vn/views/tr2.sql index 5abc2bfa8..6d963d1c7 100644 --- a/db/routines/vn/views/tr2.sql +++ b/db/routines/vn/views/tr2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`tr2` AS SELECT `vn`.`travel`.`id` AS `id`, diff --git a/db/routines/vn/views/traceabilityBuy.sql b/db/routines/vn/views/traceabilityBuy.sql index 0257c2f5d..9711ffaba 100644 --- a/db/routines/vn/views/traceabilityBuy.sql +++ b/db/routines/vn/views/traceabilityBuy.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`traceabilityBuy` AS SELECT `b`.`id` AS `buyFk`, diff --git a/db/routines/vn/views/traceabilitySale.sql b/db/routines/vn/views/traceabilitySale.sql index 9caf11d5e..7cc7985e1 100644 --- a/db/routines/vn/views/traceabilitySale.sql +++ b/db/routines/vn/views/traceabilitySale.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`traceabilitySale` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/workerBusinessDated.sql b/db/routines/vn/views/workerBusinessDated.sql index 83d6eb48c..56bc0f1e9 100644 --- a/db/routines/vn/views/workerBusinessDated.sql +++ b/db/routines/vn/views/workerBusinessDated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerBusinessDated` AS SELECT `t`.`dated` AS `dated`, diff --git a/db/routines/vn/views/workerDepartment.sql b/db/routines/vn/views/workerDepartment.sql index 4be3122da..c652cd2ae 100644 --- a/db/routines/vn/views/workerDepartment.sql +++ b/db/routines/vn/views/workerDepartment.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerDepartment` AS SELECT `b`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/workerLabour.sql b/db/routines/vn/views/workerLabour.sql index 2f4067c2d..478eb7504 100644 --- a/db/routines/vn/views/workerLabour.sql +++ b/db/routines/vn/views/workerLabour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerLabour` AS SELECT `b`.`id` AS `businessFk`, diff --git a/db/routines/vn/views/workerMedia.sql b/db/routines/vn/views/workerMedia.sql index 72ee04299..a2dd9adab 100644 --- a/db/routines/vn/views/workerMedia.sql +++ b/db/routines/vn/views/workerMedia.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerMedia` AS SELECT `w`.`id` AS `workerFk`, diff --git a/db/routines/vn/views/workerSpeedExpedition.sql b/db/routines/vn/views/workerSpeedExpedition.sql index db13cf16a..a3c03d497 100644 --- a/db/routines/vn/views/workerSpeedExpedition.sql +++ b/db/routines/vn/views/workerSpeedExpedition.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerSpeedExpedition` AS SELECT `sv`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/workerSpeedSaleTracking.sql b/db/routines/vn/views/workerSpeedSaleTracking.sql index 21f07ea8a..8bce49546 100644 --- a/db/routines/vn/views/workerSpeedSaleTracking.sql +++ b/db/routines/vn/views/workerSpeedSaleTracking.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerSpeedSaleTracking` AS SELECT `salesPreparedLastHour`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/workerTeamCollegues.sql b/db/routines/vn/views/workerTeamCollegues.sql index dbe245a16..56fa3d7d3 100644 --- a/db/routines/vn/views/workerTeamCollegues.sql +++ b/db/routines/vn/views/workerTeamCollegues.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTeamCollegues` AS SELECT DISTINCT `w`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/workerTimeControlUserInfo.sql b/db/routines/vn/views/workerTimeControlUserInfo.sql index eea8ffd7c..03457f58c 100644 --- a/db/routines/vn/views/workerTimeControlUserInfo.sql +++ b/db/routines/vn/views/workerTimeControlUserInfo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTimeControlUserInfo` AS SELECT `u`.`id` AS `userFk`, diff --git a/db/routines/vn/views/workerTimeJourneyNG.sql b/db/routines/vn/views/workerTimeJourneyNG.sql index b45b855b7..2674896da 100644 --- a/db/routines/vn/views/workerTimeJourneyNG.sql +++ b/db/routines/vn/views/workerTimeJourneyNG.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTimeJourneyNG` AS SELECT `wtc`.`userFk` AS `userFk`, diff --git a/db/routines/vn/views/workerWithoutTractor.sql b/db/routines/vn/views/workerWithoutTractor.sql index e0c0978a5..fce4e1c11 100644 --- a/db/routines/vn/views/workerWithoutTractor.sql +++ b/db/routines/vn/views/workerWithoutTractor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerWithoutTractor` AS SELECT `c`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/zoneEstimatedDelivery.sql b/db/routines/vn/views/zoneEstimatedDelivery.sql index 90c7381d8..372e2c5cb 100644 --- a/db/routines/vn/views/zoneEstimatedDelivery.sql +++ b/db/routines/vn/views/zoneEstimatedDelivery.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`zoneEstimatedDelivery` AS SELECT `t`.`zoneFk` AS `zoneFk`, diff --git a/db/routines/vn2008/views/Agencias.sql b/db/routines/vn2008/views/Agencias.sql index d70ec73f4..24964bdd6 100644 --- a/db/routines/vn2008/views/Agencias.sql +++ b/db/routines/vn2008/views/Agencias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Agencias` AS SELECT `am`.`id` AS `Id_Agencia`, diff --git a/db/routines/vn2008/views/Articles.sql b/db/routines/vn2008/views/Articles.sql index 385bf310b..652c25e84 100644 --- a/db/routines/vn2008/views/Articles.sql +++ b/db/routines/vn2008/views/Articles.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Articles` AS SELECT `i`.`id` AS `Id_Article`, diff --git a/db/routines/vn2008/views/Bancos.sql b/db/routines/vn2008/views/Bancos.sql index 6e850f365..b7a86df1c 100644 --- a/db/routines/vn2008/views/Bancos.sql +++ b/db/routines/vn2008/views/Bancos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos` AS SELECT `a`.`id` AS `Id_Banco`, diff --git a/db/routines/vn2008/views/Bancos_poliza.sql b/db/routines/vn2008/views/Bancos_poliza.sql index 4cd443545..fa4a31c37 100644 --- a/db/routines/vn2008/views/Bancos_poliza.sql +++ b/db/routines/vn2008/views/Bancos_poliza.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos_poliza` AS SELECT `bp`.`id` AS `poliza_id`, diff --git a/db/routines/vn2008/views/Cajas.sql b/db/routines/vn2008/views/Cajas.sql index 54b9ee189..a86b65298 100644 --- a/db/routines/vn2008/views/Cajas.sql +++ b/db/routines/vn2008/views/Cajas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cajas` AS SELECT `t`.`id` AS `Id_Caja`, diff --git a/db/routines/vn2008/views/Clientes.sql b/db/routines/vn2008/views/Clientes.sql index 153d875bc..e031f229d 100644 --- a/db/routines/vn2008/views/Clientes.sql +++ b/db/routines/vn2008/views/Clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Clientes` AS SELECT `c`.`id` AS `id_cliente`, diff --git a/db/routines/vn2008/views/Comparativa.sql b/db/routines/vn2008/views/Comparativa.sql index 875a5c370..8e2465699 100644 --- a/db/routines/vn2008/views/Comparativa.sql +++ b/db/routines/vn2008/views/Comparativa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Comparativa` AS SELECT `c`.`timePeriod` AS `Periodo`, diff --git a/db/routines/vn2008/views/Compres.sql b/db/routines/vn2008/views/Compres.sql index b99dd2b73..62e2496e1 100644 --- a/db/routines/vn2008/views/Compres.sql +++ b/db/routines/vn2008/views/Compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres` AS SELECT `c`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Compres_mark.sql b/db/routines/vn2008/views/Compres_mark.sql index 7138c4e4c..803e0bb0c 100644 --- a/db/routines/vn2008/views/Compres_mark.sql +++ b/db/routines/vn2008/views/Compres_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres_mark` AS SELECT `bm`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Consignatarios.sql b/db/routines/vn2008/views/Consignatarios.sql index 13a426f4d..d4430d6de 100644 --- a/db/routines/vn2008/views/Consignatarios.sql +++ b/db/routines/vn2008/views/Consignatarios.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Consignatarios` AS SELECT `a`.`id` AS `id_consigna`, diff --git a/db/routines/vn2008/views/Cubos.sql b/db/routines/vn2008/views/Cubos.sql index 4ece9c435..89df40466 100644 --- a/db/routines/vn2008/views/Cubos.sql +++ b/db/routines/vn2008/views/Cubos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos` AS SELECT `p`.`id` AS `Id_Cubo`, diff --git a/db/routines/vn2008/views/Cubos_Retorno.sql b/db/routines/vn2008/views/Cubos_Retorno.sql index bc56f275b..3a2d77cb2 100644 --- a/db/routines/vn2008/views/Cubos_Retorno.sql +++ b/db/routines/vn2008/views/Cubos_Retorno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos_Retorno` AS SELECT `rb`.`id` AS `idCubos_Retorno`, diff --git a/db/routines/vn2008/views/Entradas.sql b/db/routines/vn2008/views/Entradas.sql index 63fbaa728..4d1e061fb 100644 --- a/db/routines/vn2008/views/Entradas.sql +++ b/db/routines/vn2008/views/Entradas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas` AS SELECT `e`.`id` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Entradas_Auto.sql b/db/routines/vn2008/views/Entradas_Auto.sql index 5d1266965..a755beda3 100644 --- a/db/routines/vn2008/views/Entradas_Auto.sql +++ b/db/routines/vn2008/views/Entradas_Auto.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_Auto` AS SELECT `ev`.`entryFk` AS `Id_Entrada` diff --git a/db/routines/vn2008/views/Entradas_orden.sql b/db/routines/vn2008/views/Entradas_orden.sql index 66f46a929..57dd56d26 100644 --- a/db/routines/vn2008/views/Entradas_orden.sql +++ b/db/routines/vn2008/views/Entradas_orden.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_orden` AS SELECT `eo`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Impresoras.sql b/db/routines/vn2008/views/Impresoras.sql index c4782ab72..9a310da66 100644 --- a/db/routines/vn2008/views/Impresoras.sql +++ b/db/routines/vn2008/views/Impresoras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Impresoras` AS SELECT `vn`.`printer`.`id` AS `Id_impresora`, diff --git a/db/routines/vn2008/views/Monedas.sql b/db/routines/vn2008/views/Monedas.sql index 3693885be..565401a6c 100644 --- a/db/routines/vn2008/views/Monedas.sql +++ b/db/routines/vn2008/views/Monedas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Monedas` AS SELECT `c`.`id` AS `Id_Moneda`, diff --git a/db/routines/vn2008/views/Movimientos.sql b/db/routines/vn2008/views/Movimientos.sql index da41c51bb..7ee59260f 100644 --- a/db/routines/vn2008/views/Movimientos.sql +++ b/db/routines/vn2008/views/Movimientos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos` AS SELECT `m`.`id` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_componentes.sql b/db/routines/vn2008/views/Movimientos_componentes.sql index 440fbfb6a..24ff3ef59 100644 --- a/db/routines/vn2008/views/Movimientos_componentes.sql +++ b/db/routines/vn2008/views/Movimientos_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_componentes` AS SELECT `sc`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_mark.sql b/db/routines/vn2008/views/Movimientos_mark.sql index 10ef2fc08..bf30e869f 100644 --- a/db/routines/vn2008/views/Movimientos_mark.sql +++ b/db/routines/vn2008/views/Movimientos_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_mark` AS SELECT `mm`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Ordenes.sql b/db/routines/vn2008/views/Ordenes.sql index de31f8f99..77f00c31a 100644 --- a/db/routines/vn2008/views/Ordenes.sql +++ b/db/routines/vn2008/views/Ordenes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Ordenes` AS SELECT `tr`.`id` AS `Id_ORDEN`, diff --git a/db/routines/vn2008/views/Origen.sql b/db/routines/vn2008/views/Origen.sql index 5bb1d9b7f..776bb12fe 100644 --- a/db/routines/vn2008/views/Origen.sql +++ b/db/routines/vn2008/views/Origen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Origen` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/vn2008/views/Paises.sql b/db/routines/vn2008/views/Paises.sql index 99d2835f0..02ea61193 100644 --- a/db/routines/vn2008/views/Paises.sql +++ b/db/routines/vn2008/views/Paises.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Paises` AS SELECT `c`.`id` AS `Id`, diff --git a/db/routines/vn2008/views/PreciosEspeciales.sql b/db/routines/vn2008/views/PreciosEspeciales.sql index cea9f87fd..fe1d09416 100644 --- a/db/routines/vn2008/views/PreciosEspeciales.sql +++ b/db/routines/vn2008/views/PreciosEspeciales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`PreciosEspeciales` AS SELECT `sp`.`id` AS `Id_PrecioEspecial`, diff --git a/db/routines/vn2008/views/Proveedores.sql b/db/routines/vn2008/views/Proveedores.sql index 203d4295f..941ed8a68 100644 --- a/db/routines/vn2008/views/Proveedores.sql +++ b/db/routines/vn2008/views/Proveedores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores` AS SELECT `s`.`id` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Proveedores_cargueras.sql b/db/routines/vn2008/views/Proveedores_cargueras.sql index c1dc6ad23..e1dab8395 100644 --- a/db/routines/vn2008/views/Proveedores_cargueras.sql +++ b/db/routines/vn2008/views/Proveedores_cargueras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_cargueras` AS SELECT `fs`.`supplierFk` AS `Id_Proveedor` diff --git a/db/routines/vn2008/views/Proveedores_gestdoc.sql b/db/routines/vn2008/views/Proveedores_gestdoc.sql index c25623b8b..45ff86aa1 100644 --- a/db/routines/vn2008/views/Proveedores_gestdoc.sql +++ b/db/routines/vn2008/views/Proveedores_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_gestdoc` AS SELECT `sd`.`supplierFk` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Recibos.sql b/db/routines/vn2008/views/Recibos.sql index 93ec7bc6f..51413df39 100644 --- a/db/routines/vn2008/views/Recibos.sql +++ b/db/routines/vn2008/views/Recibos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Recibos` AS SELECT `r`.`Id` AS `Id`, diff --git a/db/routines/vn2008/views/Remesas.sql b/db/routines/vn2008/views/Remesas.sql index 9e8c18ada..979adc339 100644 --- a/db/routines/vn2008/views/Remesas.sql +++ b/db/routines/vn2008/views/Remesas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Remesas` AS SELECT `r`.`id` AS `Id_Remesa`, diff --git a/db/routines/vn2008/views/Rutas.sql b/db/routines/vn2008/views/Rutas.sql index 78b3bb471..38a88cc88 100644 --- a/db/routines/vn2008/views/Rutas.sql +++ b/db/routines/vn2008/views/Rutas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Rutas` AS SELECT `r`.`id` AS `Id_Ruta`, diff --git a/db/routines/vn2008/views/Split.sql b/db/routines/vn2008/views/Split.sql index eec90a5f8..d977f0af7 100644 --- a/db/routines/vn2008/views/Split.sql +++ b/db/routines/vn2008/views/Split.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Splits` AS SELECT `s`.`id` AS `Id_Split`, diff --git a/db/routines/vn2008/views/Split_lines.sql b/db/routines/vn2008/views/Split_lines.sql index 0b7897be7..48457a927 100644 --- a/db/routines/vn2008/views/Split_lines.sql +++ b/db/routines/vn2008/views/Split_lines.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Split_lines` AS SELECT `sl`.`id` AS `Id_Split_lines`, diff --git a/db/routines/vn2008/views/Tickets.sql b/db/routines/vn2008/views/Tickets.sql index 59dcb9100..bc0393aac 100644 --- a/db/routines/vn2008/views/Tickets.sql +++ b/db/routines/vn2008/views/Tickets.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets` AS SELECT `t`.`id` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_state.sql b/db/routines/vn2008/views/Tickets_state.sql index be59a750f..94b59d22b 100644 --- a/db/routines/vn2008/views/Tickets_state.sql +++ b/db/routines/vn2008/views/Tickets_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_state` AS SELECT `t`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_turno.sql b/db/routines/vn2008/views/Tickets_turno.sql index 28bc2d55f..c7aa363bf 100644 --- a/db/routines/vn2008/views/Tickets_turno.sql +++ b/db/routines/vn2008/views/Tickets_turno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_turno` AS SELECT `tw`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tintas.sql b/db/routines/vn2008/views/Tintas.sql index 2299aa759..0cbdc4766 100644 --- a/db/routines/vn2008/views/Tintas.sql +++ b/db/routines/vn2008/views/Tintas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tintas` AS SELECT `i`.`id` AS `Id_Tinta`, diff --git a/db/routines/vn2008/views/Tipos.sql b/db/routines/vn2008/views/Tipos.sql index 5b96c1766..d61cabe38 100644 --- a/db/routines/vn2008/views/Tipos.sql +++ b/db/routines/vn2008/views/Tipos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tipos` AS SELECT `it`.`id` AS `tipo_id`, diff --git a/db/routines/vn2008/views/Trabajadores.sql b/db/routines/vn2008/views/Trabajadores.sql index 72b53e54e..9d36ceed1 100644 --- a/db/routines/vn2008/views/Trabajadores.sql +++ b/db/routines/vn2008/views/Trabajadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Trabajadores` AS SELECT `w`.`id` AS `Id_Trabajador`, diff --git a/db/routines/vn2008/views/Tramos.sql b/db/routines/vn2008/views/Tramos.sql index 6919a610b..3ff578291 100644 --- a/db/routines/vn2008/views/Tramos.sql +++ b/db/routines/vn2008/views/Tramos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tramos` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/V_edi_item_track.sql b/db/routines/vn2008/views/V_edi_item_track.sql index 64cfdc1c5..0b1da3f6e 100644 --- a/db/routines/vn2008/views/V_edi_item_track.sql +++ b/db/routines/vn2008/views/V_edi_item_track.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`V_edi_item_track` AS SELECT `edi`.`item_track`.`item_id` AS `item_id`, diff --git a/db/routines/vn2008/views/Vehiculos_consumo.sql b/db/routines/vn2008/views/Vehiculos_consumo.sql index 422a77499..828ee25a8 100644 --- a/db/routines/vn2008/views/Vehiculos_consumo.sql +++ b/db/routines/vn2008/views/Vehiculos_consumo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Vehiculos_consumo` AS SELECT `vc`.`id` AS `Vehiculos_consumo_id`, diff --git a/db/routines/vn2008/views/account_conciliacion.sql b/db/routines/vn2008/views/account_conciliacion.sql index 66db78eee..3d0dc77ac 100644 --- a/db/routines/vn2008/views/account_conciliacion.sql +++ b/db/routines/vn2008/views/account_conciliacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_conciliacion` AS SELECT `ar`.`id` AS `idaccount_conciliacion`, diff --git a/db/routines/vn2008/views/account_detail.sql b/db/routines/vn2008/views/account_detail.sql index 74d35ae41..7335adf41 100644 --- a/db/routines/vn2008/views/account_detail.sql +++ b/db/routines/vn2008/views/account_detail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail` AS SELECT `ac`.`id` AS `account_detail_id`, diff --git a/db/routines/vn2008/views/account_detail_type.sql b/db/routines/vn2008/views/account_detail_type.sql index 6def86a9a..62361d979 100644 --- a/db/routines/vn2008/views/account_detail_type.sql +++ b/db/routines/vn2008/views/account_detail_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail_type` AS SELECT `adt`.`id` AS `account_detail_type_id`, diff --git a/db/routines/vn2008/views/agency.sql b/db/routines/vn2008/views/agency.sql index 637bb0910..d1160d4a4 100644 --- a/db/routines/vn2008/views/agency.sql +++ b/db/routines/vn2008/views/agency.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`agency` AS SELECT `a`.`id` AS `agency_id`, diff --git a/db/routines/vn2008/views/airline.sql b/db/routines/vn2008/views/airline.sql index 786206b1c..6a02852af 100644 --- a/db/routines/vn2008/views/airline.sql +++ b/db/routines/vn2008/views/airline.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airline` AS SELECT `a`.`id` AS `airline_id`, diff --git a/db/routines/vn2008/views/airport.sql b/db/routines/vn2008/views/airport.sql index 0e8ab39d2..90de84e44 100644 --- a/db/routines/vn2008/views/airport.sql +++ b/db/routines/vn2008/views/airport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airport` AS SELECT `a`.`id` AS `airport_id`, diff --git a/db/routines/vn2008/views/albaran.sql b/db/routines/vn2008/views/albaran.sql index b1055ff56..86f4b7c39 100644 --- a/db/routines/vn2008/views/albaran.sql +++ b/db/routines/vn2008/views/albaran.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran` AS SELECT `dn`.`id` AS `albaran_id`, diff --git a/db/routines/vn2008/views/albaran_gestdoc.sql b/db/routines/vn2008/views/albaran_gestdoc.sql index ffde86937..7ec8f154d 100644 --- a/db/routines/vn2008/views/albaran_gestdoc.sql +++ b/db/routines/vn2008/views/albaran_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_gestdoc` AS SELECT `dnd`.`dmsFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/albaran_state.sql b/db/routines/vn2008/views/albaran_state.sql index a15938f45..a191cb07e 100644 --- a/db/routines/vn2008/views/albaran_state.sql +++ b/db/routines/vn2008/views/albaran_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_state` AS SELECT `dn`.`id` AS `albaran_state_id`, diff --git a/db/routines/vn2008/views/awb.sql b/db/routines/vn2008/views/awb.sql index 010596288..94bffabd0 100644 --- a/db/routines/vn2008/views/awb.sql +++ b/db/routines/vn2008/views/awb.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb` AS SELECT `a`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component.sql b/db/routines/vn2008/views/awb_component.sql index 8053c4a59..6097219c1 100644 --- a/db/routines/vn2008/views/awb_component.sql +++ b/db/routines/vn2008/views/awb_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component` AS SELECT `ac`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component_template.sql b/db/routines/vn2008/views/awb_component_template.sql index bc8fd1cd8..2c2fcf8f9 100644 --- a/db/routines/vn2008/views/awb_component_template.sql +++ b/db/routines/vn2008/views/awb_component_template.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_template` AS SELECT`act`.`id` AS `awb_component_template_id`, diff --git a/db/routines/vn2008/views/awb_component_type.sql b/db/routines/vn2008/views/awb_component_type.sql index 45921e11c..56626476d 100644 --- a/db/routines/vn2008/views/awb_component_type.sql +++ b/db/routines/vn2008/views/awb_component_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_type` AS SELECT `act`.`id` AS `awb_component_type_id`, diff --git a/db/routines/vn2008/views/awb_gestdoc.sql b/db/routines/vn2008/views/awb_gestdoc.sql index 6b5c58d56..5f8040714 100644 --- a/db/routines/vn2008/views/awb_gestdoc.sql +++ b/db/routines/vn2008/views/awb_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_gestdoc` AS SELECT `ad`.`id` AS `awb_gestdoc_id`, diff --git a/db/routines/vn2008/views/awb_recibida.sql b/db/routines/vn2008/views/awb_recibida.sql index c7586214d..5cea69644 100644 --- a/db/routines/vn2008/views/awb_recibida.sql +++ b/db/routines/vn2008/views/awb_recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_recibida` AS SELECT `aii`.`awbFk` AS `awb_id`, diff --git a/db/routines/vn2008/views/awb_role.sql b/db/routines/vn2008/views/awb_role.sql index 5ef004244..86402f14b 100644 --- a/db/routines/vn2008/views/awb_role.sql +++ b/db/routines/vn2008/views/awb_role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_role` AS SELECT `ar`.`id` AS `awb_role_id`, diff --git a/db/routines/vn2008/views/awb_unit.sql b/db/routines/vn2008/views/awb_unit.sql index 7d1193105..c50cc4c2f 100644 --- a/db/routines/vn2008/views/awb_unit.sql +++ b/db/routines/vn2008/views/awb_unit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_unit` AS SELECT `au`.`id` AS `awb_unit_id`, diff --git a/db/routines/vn2008/views/balance_nest_tree.sql b/db/routines/vn2008/views/balance_nest_tree.sql index 66d048d7f..c4007db31 100644 --- a/db/routines/vn2008/views/balance_nest_tree.sql +++ b/db/routines/vn2008/views/balance_nest_tree.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`balance_nest_tree` AS SELECT `bnt`.`lft` AS `lft`, diff --git a/db/routines/vn2008/views/barcodes.sql b/db/routines/vn2008/views/barcodes.sql index f366e15fa..a48c5577e 100644 --- a/db/routines/vn2008/views/barcodes.sql +++ b/db/routines/vn2008/views/barcodes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`barcodes` AS SELECT `b`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buySource.sql b/db/routines/vn2008/views/buySource.sql index 850483833..54eddfdd0 100644 --- a/db/routines/vn2008/views/buySource.sql +++ b/db/routines/vn2008/views/buySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buySource` AS SELECT `b`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/buy_edi.sql b/db/routines/vn2008/views/buy_edi.sql index d00196e95..d26cc587e 100644 --- a/db/routines/vn2008/views/buy_edi.sql +++ b/db/routines/vn2008/views/buy_edi.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buy_edi_k012.sql b/db/routines/vn2008/views/buy_edi_k012.sql index 8ef89e5c9..bde9ad8b3 100644 --- a/db/routines/vn2008/views/buy_edi_k012.sql +++ b/db/routines/vn2008/views/buy_edi_k012.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k012` AS SELECT `eek`.`id` AS `buy_edi_k012_id`, diff --git a/db/routines/vn2008/views/buy_edi_k03.sql b/db/routines/vn2008/views/buy_edi_k03.sql index 04ca10ef5..7f2265986 100644 --- a/db/routines/vn2008/views/buy_edi_k03.sql +++ b/db/routines/vn2008/views/buy_edi_k03.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k03` AS SELECT `eek`.`id` AS `buy_edi_k03_id`, diff --git a/db/routines/vn2008/views/buy_edi_k04.sql b/db/routines/vn2008/views/buy_edi_k04.sql index 3c32e3b88..261077e50 100644 --- a/db/routines/vn2008/views/buy_edi_k04.sql +++ b/db/routines/vn2008/views/buy_edi_k04.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k04` AS SELECT `eek`.`id` AS `buy_edi_k04_id`, diff --git a/db/routines/vn2008/views/cdr.sql b/db/routines/vn2008/views/cdr.sql index 9d0d2f172..2bcd1877a 100644 --- a/db/routines/vn2008/views/cdr.sql +++ b/db/routines/vn2008/views/cdr.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cdr` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/vn2008/views/chanel.sql b/db/routines/vn2008/views/chanel.sql index 9d2ed0d9c..5d1274f60 100644 --- a/db/routines/vn2008/views/chanel.sql +++ b/db/routines/vn2008/views/chanel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`chanel` AS SELECT `c`.`id` AS `chanel_id`, diff --git a/db/routines/vn2008/views/cl_act.sql b/db/routines/vn2008/views/cl_act.sql index a62ac3efe..312f42a46 100644 --- a/db/routines/vn2008/views/cl_act.sql +++ b/db/routines/vn2008/views/cl_act.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_act` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_cau.sql b/db/routines/vn2008/views/cl_cau.sql index a835a94c9..26d1d915c 100644 --- a/db/routines/vn2008/views/cl_cau.sql +++ b/db/routines/vn2008/views/cl_cau.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_cau` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_con.sql b/db/routines/vn2008/views/cl_con.sql index b4f596d56..5730f7cb8 100644 --- a/db/routines/vn2008/views/cl_con.sql +++ b/db/routines/vn2008/views/cl_con.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_con` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_det.sql b/db/routines/vn2008/views/cl_det.sql index cef5c821d..380b40237 100644 --- a/db/routines/vn2008/views/cl_det.sql +++ b/db/routines/vn2008/views/cl_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_det` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_main.sql b/db/routines/vn2008/views/cl_main.sql index ef0c2cb8a..703b035ae 100644 --- a/db/routines/vn2008/views/cl_main.sql +++ b/db/routines/vn2008/views/cl_main.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_main` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_mot.sql b/db/routines/vn2008/views/cl_mot.sql index 60fb27041..f10449f70 100644 --- a/db/routines/vn2008/views/cl_mot.sql +++ b/db/routines/vn2008/views/cl_mot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_mot` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_res.sql b/db/routines/vn2008/views/cl_res.sql index e82ee73b0..fb60e0078 100644 --- a/db/routines/vn2008/views/cl_res.sql +++ b/db/routines/vn2008/views/cl_res.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_res` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_sol.sql b/db/routines/vn2008/views/cl_sol.sql index 23f2b8594..5dfb8543d 100644 --- a/db/routines/vn2008/views/cl_sol.sql +++ b/db/routines/vn2008/views/cl_sol.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_sol` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/config_host.sql b/db/routines/vn2008/views/config_host.sql index 2d4d6fa4c..905645d80 100644 --- a/db/routines/vn2008/views/config_host.sql +++ b/db/routines/vn2008/views/config_host.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`config_host` AS SELECT `vn`.`host`.`code` AS `config_host_id`, diff --git a/db/routines/vn2008/views/consignatarios_observation.sql b/db/routines/vn2008/views/consignatarios_observation.sql index 1f4c2eeb2..424550c82 100644 --- a/db/routines/vn2008/views/consignatarios_observation.sql +++ b/db/routines/vn2008/views/consignatarios_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`consignatarios_observation` AS SELECT `co`.`id` AS `consignatarios_observation_id`, diff --git a/db/routines/vn2008/views/credit.sql b/db/routines/vn2008/views/credit.sql index 0de60b967..fc3f049e1 100644 --- a/db/routines/vn2008/views/credit.sql +++ b/db/routines/vn2008/views/credit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`credit` AS SELECT diff --git a/db/routines/vn2008/views/definitivo.sql b/db/routines/vn2008/views/definitivo.sql index 1bc554161..076a373d2 100644 --- a/db/routines/vn2008/views/definitivo.sql +++ b/db/routines/vn2008/views/definitivo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`definitivo` AS SELECT `d`.`id` AS `definitivo_id`, diff --git a/db/routines/vn2008/views/edi_article.sql b/db/routines/vn2008/views/edi_article.sql index 34bb64149..b5a75acc7 100644 --- a/db/routines/vn2008/views/edi_article.sql +++ b/db/routines/vn2008/views/edi_article.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_article` AS SELECT `edi`.`item`.`id` AS `id`, diff --git a/db/routines/vn2008/views/edi_bucket.sql b/db/routines/vn2008/views/edi_bucket.sql index 1af487a6c..58c524e4a 100644 --- a/db/routines/vn2008/views/edi_bucket.sql +++ b/db/routines/vn2008/views/edi_bucket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket` AS SELECT cast( diff --git a/db/routines/vn2008/views/edi_bucket_type.sql b/db/routines/vn2008/views/edi_bucket_type.sql index 8e3af2080..bc083559a 100644 --- a/db/routines/vn2008/views/edi_bucket_type.sql +++ b/db/routines/vn2008/views/edi_bucket_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket_type` AS SELECT `edi`.`bucket_type`.`bucket_type_id` AS `bucket_type_id`, diff --git a/db/routines/vn2008/views/edi_specie.sql b/db/routines/vn2008/views/edi_specie.sql index 33e38482e..32dda6828 100644 --- a/db/routines/vn2008/views/edi_specie.sql +++ b/db/routines/vn2008/views/edi_specie.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_specie` AS SELECT `edi`.`specie`.`specie_id` AS `specie_id`, diff --git a/db/routines/vn2008/views/edi_supplier.sql b/db/routines/vn2008/views/edi_supplier.sql index 51f96b83d..c38a0b113 100644 --- a/db/routines/vn2008/views/edi_supplier.sql +++ b/db/routines/vn2008/views/edi_supplier.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_supplier` AS SELECT `edi`.`supplier`.`supplier_id` AS `supplier_id`, diff --git a/db/routines/vn2008/views/empresa.sql b/db/routines/vn2008/views/empresa.sql index 8c80a06e8..9571f3008 100644 --- a/db/routines/vn2008/views/empresa.sql +++ b/db/routines/vn2008/views/empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/empresa_grupo.sql b/db/routines/vn2008/views/empresa_grupo.sql index 35ba27279..8a90fc446 100644 --- a/db/routines/vn2008/views/empresa_grupo.sql +++ b/db/routines/vn2008/views/empresa_grupo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa_grupo` AS SELECT `vn`.`companyGroup`.`id` AS `empresa_grupo_id`, diff --git a/db/routines/vn2008/views/entrySource.sql b/db/routines/vn2008/views/entrySource.sql index 3a8df41bf..7c3efd0d5 100644 --- a/db/routines/vn2008/views/entrySource.sql +++ b/db/routines/vn2008/views/entrySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`entrySource` AS SELECT `e`.`gestDocFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/financialProductType.sql b/db/routines/vn2008/views/financialProductType.sql index 89a063856..69196038c 100644 --- a/db/routines/vn2008/views/financialProductType.sql +++ b/db/routines/vn2008/views/financialProductType.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`financialProductType`AS SELECT * FROM vn.financialProductType; \ No newline at end of file diff --git a/db/routines/vn2008/views/flight.sql b/db/routines/vn2008/views/flight.sql index 2df5362f7..dcfc6f9d5 100644 --- a/db/routines/vn2008/views/flight.sql +++ b/db/routines/vn2008/views/flight.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`flight` AS SELECT diff --git a/db/routines/vn2008/views/gastos_resumen.sql b/db/routines/vn2008/views/gastos_resumen.sql index d40d6d229..877780408 100644 --- a/db/routines/vn2008/views/gastos_resumen.sql +++ b/db/routines/vn2008/views/gastos_resumen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`gastos_resumen` AS SELECT diff --git a/db/routines/vn2008/views/integra2.sql b/db/routines/vn2008/views/integra2.sql index 05840d6bb..63bd27afb 100644 --- a/db/routines/vn2008/views/integra2.sql +++ b/db/routines/vn2008/views/integra2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2` AS SELECT diff --git a/db/routines/vn2008/views/integra2_province.sql b/db/routines/vn2008/views/integra2_province.sql index bc099adb3..58a8e9bcb 100644 --- a/db/routines/vn2008/views/integra2_province.sql +++ b/db/routines/vn2008/views/integra2_province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2_province` AS SELECT diff --git a/db/routines/vn2008/views/mail.sql b/db/routines/vn2008/views/mail.sql index 3074dfa95..9695bdce6 100644 --- a/db/routines/vn2008/views/mail.sql +++ b/db/routines/vn2008/views/mail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mail` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato.sql b/db/routines/vn2008/views/mandato.sql index dde43b48d..8f7350fa0 100644 --- a/db/routines/vn2008/views/mandato.sql +++ b/db/routines/vn2008/views/mandato.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato_tipo.sql b/db/routines/vn2008/views/mandato_tipo.sql index a1b5b0a9f..dd02aa338 100644 --- a/db/routines/vn2008/views/mandato_tipo.sql +++ b/db/routines/vn2008/views/mandato_tipo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato_tipo` AS SELECT `m`.`id` AS `idmandato_tipo`, diff --git a/db/routines/vn2008/views/pago.sql b/db/routines/vn2008/views/pago.sql index 546496070..4530c0645 100644 --- a/db/routines/vn2008/views/pago.sql +++ b/db/routines/vn2008/views/pago.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago` AS SELECT `p`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pago_sdc.sql b/db/routines/vn2008/views/pago_sdc.sql index 29480e376..93e16702f 100644 --- a/db/routines/vn2008/views/pago_sdc.sql +++ b/db/routines/vn2008/views/pago_sdc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago_sdc` AS SELECT `ei`.`id` AS `pago_sdc_id`, diff --git a/db/routines/vn2008/views/pay_dem.sql b/db/routines/vn2008/views/pay_dem.sql index 1ef00d645..cb3bc656c 100644 --- a/db/routines/vn2008/views/pay_dem.sql +++ b/db/routines/vn2008/views/pay_dem.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem` AS SELECT `pd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_dem_det.sql b/db/routines/vn2008/views/pay_dem_det.sql index 822897ed8..51f811d29 100644 --- a/db/routines/vn2008/views/pay_dem_det.sql +++ b/db/routines/vn2008/views/pay_dem_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem_det` AS SELECT `pdd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_met.sql b/db/routines/vn2008/views/pay_met.sql index 63e2b30e0..4f2f1ef1a 100644 --- a/db/routines/vn2008/views/pay_met.sql +++ b/db/routines/vn2008/views/pay_met.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_met` AS SELECT `pm`.`id` AS `id`, diff --git a/db/routines/vn2008/views/payrollWorker.sql b/db/routines/vn2008/views/payrollWorker.sql index 6199e98b8..e77748df3 100644 --- a/db/routines/vn2008/views/payrollWorker.sql +++ b/db/routines/vn2008/views/payrollWorker.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_employee` AS SELECT diff --git a/db/routines/vn2008/views/payroll_categorias.sql b/db/routines/vn2008/views/payroll_categorias.sql index b71e69019..cc04eeb50 100644 --- a/db/routines/vn2008/views/payroll_categorias.sql +++ b/db/routines/vn2008/views/payroll_categorias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_categorias` AS SELECT `pc`.`id` AS `codcategoria`, diff --git a/db/routines/vn2008/views/payroll_centros.sql b/db/routines/vn2008/views/payroll_centros.sql index b7e162f90..70d46bd30 100644 --- a/db/routines/vn2008/views/payroll_centros.sql +++ b/db/routines/vn2008/views/payroll_centros.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_centros` AS SELECT `pwc`.`workCenterFkA3` AS `cod_centro`, diff --git a/db/routines/vn2008/views/payroll_conceptos.sql b/db/routines/vn2008/views/payroll_conceptos.sql index a7c6ece5b..cc3d0612c 100644 --- a/db/routines/vn2008/views/payroll_conceptos.sql +++ b/db/routines/vn2008/views/payroll_conceptos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_conceptos` AS SELECT `pc`.`id` AS `conceptoid`, diff --git a/db/routines/vn2008/views/plantpassport.sql b/db/routines/vn2008/views/plantpassport.sql index b1be6a80b..12cfff7a5 100644 --- a/db/routines/vn2008/views/plantpassport.sql +++ b/db/routines/vn2008/views/plantpassport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport` AS SELECT `pp`.`producerFk` AS `producer_id`, diff --git a/db/routines/vn2008/views/plantpassport_authority.sql b/db/routines/vn2008/views/plantpassport_authority.sql index 4548bbede..31a5c73cb 100644 --- a/db/routines/vn2008/views/plantpassport_authority.sql +++ b/db/routines/vn2008/views/plantpassport_authority.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport_authority` AS SELECT `ppa`.`id` AS `plantpassport_authority_id`, diff --git a/db/routines/vn2008/views/price_fixed.sql b/db/routines/vn2008/views/price_fixed.sql index ce8170e7c..cfb56e500 100644 --- a/db/routines/vn2008/views/price_fixed.sql +++ b/db/routines/vn2008/views/price_fixed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`price_fixed` AS SELECT `pf`.`itemFk` AS `item_id`, diff --git a/db/routines/vn2008/views/producer.sql b/db/routines/vn2008/views/producer.sql index babfb887e..ae28bc9fa 100644 --- a/db/routines/vn2008/views/producer.sql +++ b/db/routines/vn2008/views/producer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`producer` AS SELECT `p`.`id` AS `producer_id`, diff --git a/db/routines/vn2008/views/promissoryNote.sql b/db/routines/vn2008/views/promissoryNote.sql index 0db0fa86f..ffcda2893 100644 --- a/db/routines/vn2008/views/promissoryNote.sql +++ b/db/routines/vn2008/views/promissoryNote.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Pagares` AS SELECT `p`.`id` AS `Id_Pagare`, diff --git a/db/routines/vn2008/views/proveedores_clientes.sql b/db/routines/vn2008/views/proveedores_clientes.sql index e08f4a3a7..925f8e6cf 100644 --- a/db/routines/vn2008/views/proveedores_clientes.sql +++ b/db/routines/vn2008/views/proveedores_clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`proveedores_clientes` AS SELECT `Proveedores`.`Id_Proveedor` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/province.sql b/db/routines/vn2008/views/province.sql index 1477ec803..3f591a927 100644 --- a/db/routines/vn2008/views/province.sql +++ b/db/routines/vn2008/views/province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`province` AS SELECT `p`.`id` AS `province_id`, diff --git a/db/routines/vn2008/views/recibida.sql b/db/routines/vn2008/views/recibida.sql index 76b86505e..5c415414a 100644 --- a/db/routines/vn2008/views/recibida.sql +++ b/db/routines/vn2008/views/recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_intrastat.sql b/db/routines/vn2008/views/recibida_intrastat.sql index 402781931..96d1b8832 100644 --- a/db/routines/vn2008/views/recibida_intrastat.sql +++ b/db/routines/vn2008/views/recibida_intrastat.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_intrastat` AS SELECT `i`.`invoiceInFk` AS `recibida_id`, diff --git a/db/routines/vn2008/views/recibida_iva.sql b/db/routines/vn2008/views/recibida_iva.sql index 7d948a6ff..7f6c55e43 100644 --- a/db/routines/vn2008/views/recibida_iva.sql +++ b/db/routines/vn2008/views/recibida_iva.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_iva` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_vencimiento.sql b/db/routines/vn2008/views/recibida_vencimiento.sql index 813ae40d7..d41686c98 100644 --- a/db/routines/vn2008/views/recibida_vencimiento.sql +++ b/db/routines/vn2008/views/recibida_vencimiento.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_vencimiento` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recovery.sql b/db/routines/vn2008/views/recovery.sql index 5bbff3124..781597506 100644 --- a/db/routines/vn2008/views/recovery.sql +++ b/db/routines/vn2008/views/recovery.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recovery` AS SELECT `r`.`id` AS `recovery_id`, diff --git a/db/routines/vn2008/views/reference_rate.sql b/db/routines/vn2008/views/reference_rate.sql index eb0f1c25e..44f0887e2 100644 --- a/db/routines/vn2008/views/reference_rate.sql +++ b/db/routines/vn2008/views/reference_rate.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reference_rate` AS SELECT `rr`.`currencyFk` AS `moneda_id`, diff --git a/db/routines/vn2008/views/reinos.sql b/db/routines/vn2008/views/reinos.sql index 4d98d1f09..e34683492 100644 --- a/db/routines/vn2008/views/reinos.sql +++ b/db/routines/vn2008/views/reinos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reinos` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/state.sql b/db/routines/vn2008/views/state.sql index 63f6589af..ad0681e54 100644 --- a/db/routines/vn2008/views/state.sql +++ b/db/routines/vn2008/views/state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`state` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tag.sql b/db/routines/vn2008/views/tag.sql index 25b3ab82e..1d088446b 100644 --- a/db/routines/vn2008/views/tag.sql +++ b/db/routines/vn2008/views/tag.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tag` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tarifa_componentes.sql b/db/routines/vn2008/views/tarifa_componentes.sql index bec53abd9..c4baace56 100644 --- a/db/routines/vn2008/views/tarifa_componentes.sql +++ b/db/routines/vn2008/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes` AS SELECT `tarifa_componentes`.`Id_Componente` AS `Id_Componente`, diff --git a/db/routines/vn2008/views/tarifa_componentes_series.sql b/db/routines/vn2008/views/tarifa_componentes_series.sql index a1d188709..283171dc8 100644 --- a/db/routines/vn2008/views/tarifa_componentes_series.sql +++ b/db/routines/vn2008/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes_series` AS SELECT `tarifa_componentes_series`.`tarifa_componentes_series_id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/vn2008/views/tblContadores.sql b/db/routines/vn2008/views/tblContadores.sql index 129d3ce8b..0f01981f9 100644 --- a/db/routines/vn2008/views/tblContadores.sql +++ b/db/routines/vn2008/views/tblContadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tblContadores` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/thermograph.sql b/db/routines/vn2008/views/thermograph.sql index f51b83d24..8ddabe25f 100644 --- a/db/routines/vn2008/views/thermograph.sql +++ b/db/routines/vn2008/views/thermograph.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`thermograph` AS SELECT `t`.`id` AS `thermograph_id`, diff --git a/db/routines/vn2008/views/ticket_observation.sql b/db/routines/vn2008/views/ticket_observation.sql index deb85e4b6..bbc0a54b9 100644 --- a/db/routines/vn2008/views/ticket_observation.sql +++ b/db/routines/vn2008/views/ticket_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`ticket_observation` AS SELECT `to`.`id` AS `ticket_observation_id`, diff --git a/db/routines/vn2008/views/tickets_gestdoc.sql b/db/routines/vn2008/views/tickets_gestdoc.sql index a8682db57..c130e0420 100644 --- a/db/routines/vn2008/views/tickets_gestdoc.sql +++ b/db/routines/vn2008/views/tickets_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tickets_gestdoc` AS SELECT `td`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/time.sql b/db/routines/vn2008/views/time.sql index f3bbc8607..fc66b19ff 100644 --- a/db/routines/vn2008/views/time.sql +++ b/db/routines/vn2008/views/time.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`time` AS SELECT `t`.`dated` AS `date`, diff --git a/db/routines/vn2008/views/travel.sql b/db/routines/vn2008/views/travel.sql index b55dbf9b6..b5e88fdf0 100644 --- a/db/routines/vn2008/views/travel.sql +++ b/db/routines/vn2008/views/travel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`travel` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/v_Articles_botanical.sql b/db/routines/vn2008/views/v_Articles_botanical.sql index 8640bb638..fd0b05f01 100644 --- a/db/routines/vn2008/views/v_Articles_botanical.sql +++ b/db/routines/vn2008/views/v_Articles_botanical.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_Articles_botanical` AS SELECT `ib`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn2008/views/v_compres.sql b/db/routines/vn2008/views/v_compres.sql index 8bd6a4a64..5836bf632 100644 --- a/db/routines/vn2008/views/v_compres.sql +++ b/db/routines/vn2008/views/v_compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_compres` AS SELECT `TP`.`Id_Tipo` AS `Familia`, diff --git a/db/routines/vn2008/views/v_empresa.sql b/db/routines/vn2008/views/v_empresa.sql index 5a6d6e0f5..18a4c8153 100644 --- a/db/routines/vn2008/views/v_empresa.sql +++ b/db/routines/vn2008/views/v_empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_empresa` AS SELECT `e`.`logo` AS `logo`, diff --git a/db/routines/vn2008/views/versiones.sql b/db/routines/vn2008/views/versiones.sql index 3d27f4f92..5cb9207e1 100644 --- a/db/routines/vn2008/views/versiones.sql +++ b/db/routines/vn2008/views/versiones.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`versiones` AS SELECT `m`.`app` AS `programa`, diff --git a/db/routines/vn2008/views/warehouse_pickup.sql b/db/routines/vn2008/views/warehouse_pickup.sql index c3a7268a1..b8a625228 100644 --- a/db/routines/vn2008/views/warehouse_pickup.sql +++ b/db/routines/vn2008/views/warehouse_pickup.sql @@ -1,5 +1,5 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` +CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`warehouse_pickup` AS SELECT diff --git a/db/versions/11163-maroonEucalyptus/00-firstScript.sql b/db/versions/11163-maroonEucalyptus/00-firstScript.sql new file mode 100644 index 000000000..dda7845dc --- /dev/null +++ b/db/versions/11163-maroonEucalyptus/00-firstScript.sql @@ -0,0 +1,2 @@ +CREATE USER 'vn-admin'@'localhost'; +GRANT ALL PRIVILEGES ON *.* TO 'vn-admin'@'localhost' WITH GRANT OPTION;; From 8845f783834997cb7cf7492adaaaf5238765aaf1 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 23 Jul 2024 12:23:31 +0200 Subject: [PATCH 020/250] test: refs #7615 add test to setDeleted --- .../methods/ticket/specs/setDeleted.spec.js | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js index ed9347714..782c31c02 100644 --- a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js +++ b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js @@ -76,21 +76,42 @@ describe('ticket setDeleted()', () => { } }); - it('should show error trying to delete a ticket with a refund', async() => { - const tx = await models.Ticket.beginTransaction({}); - let error; - try { - const options = {transaction: tx}; + describe('ticket with refund setDeleted()', () => { + it('should show error trying to delete a ticket with a refund', async() => { + const tx = await models.Ticket.beginTransaction({}); + let error; + try { + const options = {transaction: tx}; - const ticketId = 8; - await models.Ticket.setDeleted(ctx, ticketId, options); + const ticketId = 8; + await models.Ticket.setDeleted(ctx, ticketId, options); - await tx.rollback(); - } catch (e) { - await tx.rollback(); - error = e; - } + await tx.rollback(); + } catch (e) { + await tx.rollback(); + error = e; + } - expect(error.message).toContain('Tickets with associated refunds'); + expect(error.message).toContain('Tickets with associated refunds'); + }); + + it('should delete a ticket with a refund if ticket refund is deleted', async() => { + const tx = await models.Ticket.beginTransaction({}); + try { + const options = {transaction: tx}; + + const ticketId = 8; + const ticketRefundId = 24; + await models.Ticket.updateAll({id: ticketRefundId}, {isDeleted: true}, options); + await models.Ticket.setDeleted(ctx, ticketId, options); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + error = e; + } + + expect(error.message).not.toContain('Tickets with associated refunds'); + }); }); }); From a7f725a194232d375661a2662be71ea91d167ce3 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 24 Jul 2024 07:25:43 +0200 Subject: [PATCH 021/250] feat: refs #7774 ticket_cloneWeekly --- .../vn/procedures/ticket_cloneWeekly.sql | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index fd45dc9fa..06d1554ce 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -17,6 +17,10 @@ BEGIN DECLARE vYear INT; DECLARE vSalesPersonFK INT; DECLARE vItemPicker INT; + DECLARE vTicketfailed INT; + DECLARE vSubjectsTicketfailed VARCHAR(50); + DECLARE vMessagesTicketfailed TEXT; + DECLARE rsTicket CURSOR FOR SELECT tt.ticketFk, @@ -185,8 +189,11 @@ BEGIN IF (vLanding IS NULL) THEN - SELECT e.email INTO vSalesPersonEmail + SELECT IFNULL(d.notificationEmail,e.email) INTO vSalesPersonEmail FROM client c + JOIN worker w ON w.id = c.salesPersonFk + JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk + JOIN department d ON d.id = wd.departmentFk JOIN account.emailUser e ON e.userFk = c.salesPersonFk WHERE c.id = vClientFk; @@ -213,6 +220,37 @@ BEGIN END; END LOOP; CLOSE rsTicket; + + WITH tOrigin AS ( + SELECT tt.ticketFk, + t.clientFk, + t.warehouseFk, + t.companyFk, + t.addressFk, + tt.agencyModeFk, + ti.dated + FROM ticketWeekly tt + JOIN ticket t ON tt.ticketFk = t.id + JOIN tmp.time ti + WHERE WEEKDAY(ti.dated) = tt.weekDay + ),total AS( + SELECT tor.ticketFk, tc.id + FROM tOrigin tor + JOIN sale so ON tor.ticketFk = so.ticketFk + LEFT JOIN ticket tc ON tc.id = tor.ticketFk + AND DATE(tc.shipped) = tor.dated + LEFT JOIN sale sc ON sc.ticketFk = tc.id + WHERE sc.id IS NULL + GROUP BY tor.ticketFk, tc.id + )SELECT COUNT(DISTINCT ticketFk) INTO vTicketfailed + FROM total; + + IF vTicketfailed THEN + SET vSubjectsTicketfailed = 'Turnos - Tickets que no se han clonado '; + SET vMessagesTicketfailed = 'No se ha podido clonar tickets revisar que tickets han sido y mirar por que no se han clonado'; + CALL mail_insert('nocontestar@verdnatura.es', NULL, vSubjectsTicketfailed, vMessagesTicketfailed); + END IF; + DROP TEMPORARY TABLE IF EXISTS tmp.time, tmp.zoneGetLanded; END$$ DELIMITER ; From 5a9ab843568e2fdcda02df303d55cf363c75a86c Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 24 Jul 2024 09:14:28 +0200 Subject: [PATCH 022/250] feat: refs #7646 delete scannableCodeType --- .../11165-grayAralia/00-firstScript.sql | 7 ++++++ .../collection-label/collection-label.html | 6 +---- .../collection-label/collection-label.js | 23 ++----------------- .../collection-label/sql/barcodeType.sql | 3 --- 4 files changed, 10 insertions(+), 29 deletions(-) create mode 100644 db/versions/11165-grayAralia/00-firstScript.sql delete mode 100644 print/templates/reports/collection-label/sql/barcodeType.sql diff --git a/db/versions/11165-grayAralia/00-firstScript.sql b/db/versions/11165-grayAralia/00-firstScript.sql new file mode 100644 index 000000000..2e0e2a329 --- /dev/null +++ b/db/versions/11165-grayAralia/00-firstScript.sql @@ -0,0 +1,7 @@ +-- Place your SQL code here +ALTER TABLE IF EXISTS vn.productionConfig +CHANGE COLUMN IF EXISTS scannableCodeType scannableCodeType__ enum('qr','barcode') + CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'barcode' NOT NULL, +CHANGE COLUMN IF EXISTS scannablePreviusCodeType scannablePreviusCodeType__ enum('qr','barcode') + CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'barcode' NOT NULL; + diff --git a/print/templates/reports/collection-label/collection-label.html b/print/templates/reports/collection-label/collection-label.html index 65709ead0..1f57fc3d9 100644 --- a/print/templates/reports/collection-label/collection-label.html +++ b/print/templates/reports/collection-label/collection-label.html @@ -10,14 +10,10 @@ {{dashIfEmpty(labelData.shipped)}} - + {{dashIfEmpty(labelData.workerCode)}} - -
- {{dashIfEmpty(labelData.workerCode)}} - {{labelCount || labelData.labelCount || 0}} diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index f2f697ae6..4aeaca854 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -1,7 +1,5 @@ -const {DOMImplementation, XMLSerializer} = require('xmldom'); const vnReport = require('../../../core/mixins/vn-report.js'); const {toDataURL} = require('qrcode'); -const jsBarcode = require('jsbarcode'); module.exports = { name: 'collection-label', @@ -30,11 +28,8 @@ module.exports = { const labels = await this.rawSqlFromDef('labelsData', [ticketIds]); - const [{scannableCodeType}] = await this.rawSqlFromDef('barcodeType'); - if (scannableCodeType === 'qr') { - for (const labelData of labels) - labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk); - } + for (const labelData of labels) + labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk); this.labelsData = labels; this.checkMainEntity(this.labelsData); @@ -50,20 +45,6 @@ module.exports = { }); return toDataURL(QRdata, {margin: 0}); }, - getBarcode(id) { - const xmlSerializer = new XMLSerializer(); - const document = new DOMImplementation().createDocument('http://www.w3.org/1999/xhtml', 'html', null); - const svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - - jsBarcode(svgNode, id, { - xmlDocument: document, - format: 'code128', - displayValue: false, - width: 3.8, - height: 115, - }); - return xmlSerializer.serializeToString(svgNode); - }, getVertical(labelData) { let value; if (labelData.collectionFk) { diff --git a/print/templates/reports/collection-label/sql/barcodeType.sql b/print/templates/reports/collection-label/sql/barcodeType.sql deleted file mode 100644 index 0700c95a2..000000000 --- a/print/templates/reports/collection-label/sql/barcodeType.sql +++ /dev/null @@ -1,3 +0,0 @@ -SELECT scannableCodeType - FROM productionConfig - LIMIT 1 \ No newline at end of file From cf3ee07dd2361e236b59faf18d53527fd5a302ee Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 24 Jul 2024 10:03:51 +0200 Subject: [PATCH 023/250] feat: refs #7713 Created ACLLog --- .../salix/triggers/ACL_afterDelete.sql | 12 +++++++++ .../salix/triggers/ACL_beforeInsert.sql | 8 ++++++ .../salix/triggers/ACL_beforeUpdate.sql | 8 ++++++ .../11166-azureDracena/00-firstScript.sql | 25 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 db/routines/salix/triggers/ACL_afterDelete.sql create mode 100644 db/routines/salix/triggers/ACL_beforeInsert.sql create mode 100644 db/routines/salix/triggers/ACL_beforeUpdate.sql create mode 100644 db/versions/11166-azureDracena/00-firstScript.sql diff --git a/db/routines/salix/triggers/ACL_afterDelete.sql b/db/routines/salix/triggers/ACL_afterDelete.sql new file mode 100644 index 000000000..18689dfb0 --- /dev/null +++ b/db/routines/salix/triggers/ACL_afterDelete.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_afterDelete` + AFTER DELETE ON `ACL` + FOR EACH ROW +BEGIN + INSERT INTO ACL + SET `action` = 'delete', + `changedModel` = 'Acl', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/salix/triggers/ACL_beforeInsert.sql b/db/routines/salix/triggers/ACL_beforeInsert.sql new file mode 100644 index 000000000..94fb51ada --- /dev/null +++ b/db/routines/salix/triggers/ACL_beforeInsert.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_beforeInsert` + BEFORE INSERT ON `ACL` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/salix/triggers/ACL_beforeUpdate.sql b/db/routines/salix/triggers/ACL_beforeUpdate.sql new file mode 100644 index 000000000..b214fc9f6 --- /dev/null +++ b/db/routines/salix/triggers/ACL_beforeUpdate.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_beforeUpdate` + BEFORE UPDATE ON `ACL` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/versions/11166-azureDracena/00-firstScript.sql b/db/versions/11166-azureDracena/00-firstScript.sql new file mode 100644 index 000000000..ba087b5a8 --- /dev/null +++ b/db/versions/11166-azureDracena/00-firstScript.sql @@ -0,0 +1,25 @@ +CREATE OR REPLACE TABLE `salix`.`ACLLog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `originFk` int(11) DEFAULT NULL, + `userFk` int(10) unsigned DEFAULT NULL, + `action` set('insert','update','delete','select') NOT NULL, + `creationDate` timestamp NULL DEFAULT current_timestamp(), + `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `changedModel` enum('Acl') NOT NULL DEFAULT 'Acl', + `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)), + `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), + `changedModelId` int(11) NOT NULL, + `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `logRateuserFk` (`userFk`), + KEY `ACLLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), + KEY `ACLLog_originFk` (`originFk`,`creationDate`), + CONSTRAINT `aclUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +ALTER TABLE salix.ACL + ADD editorFk int(10) unsigned DEFAULT NULL NULL; + +ALTER TABLE vn.ticket + CHANGE editorFk editorFk int(10) unsigned DEFAULT NULL NULL AFTER risk; From d0dfb95718f2924ff8d054d8a1cc7efada9e63c2 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 24 Jul 2024 13:56:21 +0200 Subject: [PATCH 024/250] feat: refs #7774 --- .../vn/procedures/ticket_cloneWeekly.sql | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index 06d1554ce..f689f2600 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -18,9 +18,6 @@ BEGIN DECLARE vSalesPersonFK INT; DECLARE vItemPicker INT; DECLARE vTicketfailed INT; - DECLARE vSubjectsTicketfailed VARCHAR(50); - DECLARE vMessagesTicketfailed TEXT; - DECLARE rsTicket CURSOR FOR SELECT tt.ticketFk, @@ -221,36 +218,6 @@ BEGIN END LOOP; CLOSE rsTicket; - WITH tOrigin AS ( - SELECT tt.ticketFk, - t.clientFk, - t.warehouseFk, - t.companyFk, - t.addressFk, - tt.agencyModeFk, - ti.dated - FROM ticketWeekly tt - JOIN ticket t ON tt.ticketFk = t.id - JOIN tmp.time ti - WHERE WEEKDAY(ti.dated) = tt.weekDay - ),total AS( - SELECT tor.ticketFk, tc.id - FROM tOrigin tor - JOIN sale so ON tor.ticketFk = so.ticketFk - LEFT JOIN ticket tc ON tc.id = tor.ticketFk - AND DATE(tc.shipped) = tor.dated - LEFT JOIN sale sc ON sc.ticketFk = tc.id - WHERE sc.id IS NULL - GROUP BY tor.ticketFk, tc.id - )SELECT COUNT(DISTINCT ticketFk) INTO vTicketfailed - FROM total; - - IF vTicketfailed THEN - SET vSubjectsTicketfailed = 'Turnos - Tickets que no se han clonado '; - SET vMessagesTicketfailed = 'No se ha podido clonar tickets revisar que tickets han sido y mirar por que no se han clonado'; - CALL mail_insert('nocontestar@verdnatura.es', NULL, vSubjectsTicketfailed, vMessagesTicketfailed); - END IF; - DROP TEMPORARY TABLE IF EXISTS tmp.time, tmp.zoneGetLanded; END$$ DELIMITER ; From 000a967a03404c047f41b510caad37d3d66f933c Mon Sep 17 00:00:00 2001 From: pablone Date: Fri, 26 Jul 2024 07:12:51 +0200 Subject: [PATCH 025/250] feat: refs #6403 packingSite to productionConfig --- db/versions/11170-redPaniculata/00-firstScript.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/versions/11170-redPaniculata/00-firstScript.sql diff --git a/db/versions/11170-redPaniculata/00-firstScript.sql b/db/versions/11170-redPaniculata/00-firstScript.sql new file mode 100644 index 000000000..b5d34c082 --- /dev/null +++ b/db/versions/11170-redPaniculata/00-firstScript.sql @@ -0,0 +1,6 @@ +-- Place your SQL code here + +ALTER TABLE vn.packingSite DROP COLUMN IF EXISTS hasNewLabelMrwMethod; + +ALTER TABLE vn.productionConfig ADD IF NOT EXISTS hasNewLabelMrwMethod BOOL DEFAULT TRUE NOT NULL + COMMENT 'column to activate the new mrw integration'; From e0b9100de1c9178f4b32940320d84d62b5d5f42b Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 29 Jul 2024 07:20:05 +0200 Subject: [PATCH 026/250] fix --- db/routines/vn/procedures/itemShelvingSale_addBySale.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql index 176dbc05c..bfab30dbb 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql @@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSal vSaleFk INT, vSectorFk INT ) -BEGIN +proc: BEGIN /** * Reserva una línea de venta en la ubicación más óptima * From baa1498923c7434a9f780e91876544b121526ed8 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 29 Jul 2024 13:29:26 +0200 Subject: [PATCH 027/250] feat: refs #7712 sizeLimit --- db/routines/vn/procedures/collection_new.sql | 19 +++++++++++++++---- .../11171-maroonMoss/00-firstScript.sql | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 db/versions/11171-maroonMoss/00-firstScript.sql diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 0bd6e1b25..f7f342ea7 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -9,10 +9,11 @@ BEGIN DECLARE vWarehouseFk INT; DECLARE vWagons INT; DECLARE vTrainFk INT; - DECLARE vLinesLimit INT DEFAULT NULL; + DECLARE vLinesLimit INT; DECLARE vTicketLines INT; - DECLARE vVolumeLimit DECIMAL DEFAULT NULL; + DECLARE vVolumeLimit DECIMAL; DECLARE vTicketVolume DECIMAL; + DECLARE vSizeLimit INT; DECLARE vMaxTickets INT; DECLARE vStateFk VARCHAR(45); DECLARE vFirstTicketFk INT; @@ -77,6 +78,7 @@ BEGIN o.trainFk, o.linesLimit, o.volumeLimit, + o.sizeLimit, pc.collection_new_lockname INTO vMaxTickets, vHasUniqueCollectionTime, @@ -88,6 +90,7 @@ BEGIN vTrainFk, vLinesLimit, vVolumeLimit, + vSizeLimit, vLockName FROM productionConfig pc JOIN worker w ON w.id = vUserFk @@ -172,6 +175,13 @@ BEGIN JOIN state s ON s.id = pb.state JOIN agencyMode am ON am.id = pb.agencyModeFk JOIN agency a ON a.id = am.agencyFk + LEFT JOIN ( + SELECT pb.ticketFk, MAX(i.`size`) maxSize + FROM tmp.productionBuffer pb + JOIN ticket t ON t.id = pb.ticketfk + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() OR (pb.ubicacion IS NULL AND a.isOwn) @@ -183,8 +193,9 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR (pb.lines >= vLinesLimit AND vLinesLimit IS NOT NULL) - OR (pb.m3 >= vVolumeLimit AND vVolumeLimit IS NOT NULL); + OR (pb.lines > vLinesLimit AND vLinesLimit IS NOT NULL) + OR (pb.m3 > vVolumeLimit AND vVolumeLimit IS NOT NULL) + OR ((sub.maxSize > vSizeLimit OR sub.maxSize IS NOT NULL) AND vSizeLimit IS NOT NULL); END IF; -- Es importante que el primer ticket se coja en todos los casos diff --git a/db/versions/11171-maroonMoss/00-firstScript.sql b/db/versions/11171-maroonMoss/00-firstScript.sql new file mode 100644 index 000000000..1bf0d646b --- /dev/null +++ b/db/versions/11171-maroonMoss/00-firstScript.sql @@ -0,0 +1,8 @@ +ALTER TABLE vn.operator + ADD sizeLimit int(10) unsigned DEFAULT 90 NULL + COMMENT 'Límite de altura en una colección para la asignación de pedidos' + AFTER volumeLimit; + +ALTER TABLE vn.operator + MODIFY COLUMN linesLimit int(10) unsigned DEFAULT 20 NULL + COMMENT 'Límite de lineas en una colección para la asignación de pedidos'; From a01ae9b7b8d35ea976c8510e25c47164274d0125 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 29 Jul 2024 14:09:55 +0200 Subject: [PATCH 028/250] fix: refs #7756 Foreign keys invoiceOut --- db/versions/11172-blueFern/00-firstScript.sql | 1 + db/versions/11172-blueFern/01-firstScript.sql | 1 + db/versions/11172-blueFern/02-firstScript.sql | 1 + db/versions/11172-blueFern/03-firstScript.sql | 1 + db/versions/11172-blueFern/04-firstScript.sql | 1 + db/versions/11172-blueFern/05-firstScript.sql | 1 + db/versions/11172-blueFern/06-firstScript.sql | 1 + db/versions/11172-blueFern/07-firstScript.sql | 1 + db/versions/11172-blueFern/08-firstScript.sql | 1 + db/versions/11172-blueFern/09-firstScript.sql | 1 + db/versions/11172-blueFern/10-firstScript.sql | 2 ++ db/versions/11172-blueFern/11-firstScript.sql | 2 ++ db/versions/11172-blueFern/12-firstScript.sql | 2 ++ db/versions/11172-blueFern/13-firstScript.sql | 2 ++ db/versions/11172-blueFern/14-firstScript.sql | 2 ++ 15 files changed, 20 insertions(+) create mode 100644 db/versions/11172-blueFern/00-firstScript.sql create mode 100644 db/versions/11172-blueFern/01-firstScript.sql create mode 100644 db/versions/11172-blueFern/02-firstScript.sql create mode 100644 db/versions/11172-blueFern/03-firstScript.sql create mode 100644 db/versions/11172-blueFern/04-firstScript.sql create mode 100644 db/versions/11172-blueFern/05-firstScript.sql create mode 100644 db/versions/11172-blueFern/06-firstScript.sql create mode 100644 db/versions/11172-blueFern/07-firstScript.sql create mode 100644 db/versions/11172-blueFern/08-firstScript.sql create mode 100644 db/versions/11172-blueFern/09-firstScript.sql create mode 100644 db/versions/11172-blueFern/10-firstScript.sql create mode 100644 db/versions/11172-blueFern/11-firstScript.sql create mode 100644 db/versions/11172-blueFern/12-firstScript.sql create mode 100644 db/versions/11172-blueFern/13-firstScript.sql create mode 100644 db/versions/11172-blueFern/14-firstScript.sql diff --git a/db/versions/11172-blueFern/00-firstScript.sql b/db/versions/11172-blueFern/00-firstScript.sql new file mode 100644 index 000000000..04e0813d5 --- /dev/null +++ b/db/versions/11172-blueFern/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.ticket DROP FOREIGN KEY ticket_FK; \ No newline at end of file diff --git a/db/versions/11172-blueFern/01-firstScript.sql b/db/versions/11172-blueFern/01-firstScript.sql new file mode 100644 index 000000000..64255f9de --- /dev/null +++ b/db/versions/11172-blueFern/01-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut DROP KEY Id_Factura; diff --git a/db/versions/11172-blueFern/02-firstScript.sql b/db/versions/11172-blueFern/02-firstScript.sql new file mode 100644 index 000000000..e76b7f7d6 --- /dev/null +++ b/db/versions/11172-blueFern/02-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned NOT NULL; \ No newline at end of file diff --git a/db/versions/11172-blueFern/03-firstScript.sql b/db/versions/11172-blueFern/03-firstScript.sql new file mode 100644 index 000000000..e6def98a4 --- /dev/null +++ b/db/versions/11172-blueFern/03-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceCorrection DROP FOREIGN KEY corrected_fk; diff --git a/db/versions/11172-blueFern/04-firstScript.sql b/db/versions/11172-blueFern/04-firstScript.sql new file mode 100644 index 000000000..a19bc336e --- /dev/null +++ b/db/versions/11172-blueFern/04-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceCorrection DROP FOREIGN KEY correcting_fk; diff --git a/db/versions/11172-blueFern/05-firstScript.sql b/db/versions/11172-blueFern/05-firstScript.sql new file mode 100644 index 000000000..9f5ec2871 --- /dev/null +++ b/db/versions/11172-blueFern/05-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOutExpense DROP FOREIGN KEY invoiceOutExpence_FK_1; diff --git a/db/versions/11172-blueFern/06-firstScript.sql b/db/versions/11172-blueFern/06-firstScript.sql new file mode 100644 index 000000000..2c16e9b77 --- /dev/null +++ b/db/versions/11172-blueFern/06-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOutTax DROP FOREIGN KEY invoiceOutFk; diff --git a/db/versions/11172-blueFern/07-firstScript.sql b/db/versions/11172-blueFern/07-firstScript.sql new file mode 100644 index 000000000..bec72a131 --- /dev/null +++ b/db/versions/11172-blueFern/07-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut DROP PRIMARY KEY; diff --git a/db/versions/11172-blueFern/08-firstScript.sql b/db/versions/11172-blueFern/08-firstScript.sql new file mode 100644 index 000000000..316db2e32 --- /dev/null +++ b/db/versions/11172-blueFern/08-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_pk PRIMARY KEY (id); diff --git a/db/versions/11172-blueFern/09-firstScript.sql b/db/versions/11172-blueFern/09-firstScript.sql new file mode 100644 index 000000000..553d7857e --- /dev/null +++ b/db/versions/11172-blueFern/09-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_unique UNIQUE KEY (`ref`); diff --git a/db/versions/11172-blueFern/10-firstScript.sql b/db/versions/11172-blueFern/10-firstScript.sql new file mode 100644 index 000000000..e1847a877 --- /dev/null +++ b/db/versions/11172-blueFern/10-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.ticket ADD CONSTRAINT ticket_invoiceOut_FK + FOREIGN KEY (refFk) REFERENCES vn.invoiceOut(`ref`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/11-firstScript.sql b/db/versions/11172-blueFern/11-firstScript.sql new file mode 100644 index 000000000..720b7962e --- /dev/null +++ b/db/versions/11172-blueFern/11-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK + FOREIGN KEY (correctingFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/12-firstScript.sql b/db/versions/11172-blueFern/12-firstScript.sql new file mode 100644 index 000000000..35099bd5d --- /dev/null +++ b/db/versions/11172-blueFern/12-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK_1 + FOREIGN KEY (correctedFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file diff --git a/db/versions/11172-blueFern/13-firstScript.sql b/db/versions/11172-blueFern/13-firstScript.sql new file mode 100644 index 000000000..f1aa0a216 --- /dev/null +++ b/db/versions/11172-blueFern/13-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.invoiceOutExpense ADD CONSTRAINT invoiceOutExpense_invoiceOut_FK + FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/14-firstScript.sql b/db/versions/11172-blueFern/14-firstScript.sql new file mode 100644 index 000000000..ba570e20c --- /dev/null +++ b/db/versions/11172-blueFern/14-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.invoiceOutTax ADD CONSTRAINT invoiceOutTax_invoiceOut_FK + FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; From 766da06c2fe150638a9d58b12888edb0ac9eb65c Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 30 Jul 2024 09:40:34 +0200 Subject: [PATCH 029/250] feat: refs #7524 add mock limit on find query --- back/model-config.json | 3 +++ back/models/ormConfig.json | 26 +++++++++++++++++++ .../11175-pinkChico/00-firstScript.sql | 8 ++++++ loopback/common/models/vn-model.js | 24 ++++++++++++++++- loopback/locale/es.json | 3 ++- 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 back/models/ormConfig.json create mode 100644 db/versions/11175-pinkChico/00-firstScript.sql diff --git a/back/model-config.json b/back/model-config.json index a16fe4e8a..9884eadfb 100644 --- a/back/model-config.json +++ b/back/model-config.json @@ -115,6 +115,9 @@ "NotificationSubscription": { "dataSource": "vn" }, + "OrmConfig": { + "dataSource": "vn" + }, "Province": { "dataSource": "vn" }, diff --git a/back/models/ormConfig.json b/back/models/ormConfig.json new file mode 100644 index 000000000..ef4c2b181 --- /dev/null +++ b/back/models/ormConfig.json @@ -0,0 +1,26 @@ +{ + "name": "OrmConfig", + "base": "VnModel", + "options": { + "mysql": { + "table": "ormConfig" + } + }, + "properties": { + "id": { + "type": "number", + "id": true + }, + "selectLimit": { + "type": "number" + } + }, + "acls": [ + { + "accessType": "*", + "principalType": "ROLE", + "principalId": "$authenticated", + "permission": "ALLOW" + } + ] +} \ No newline at end of file diff --git a/db/versions/11175-pinkChico/00-firstScript.sql b/db/versions/11175-pinkChico/00-firstScript.sql new file mode 100644 index 000000000..349f4c7f7 --- /dev/null +++ b/db/versions/11175-pinkChico/00-firstScript.sql @@ -0,0 +1,8 @@ +USE vn; + +CREATE TABLE IF NOT EXISTS ormConfig ( + id int(5) NOT NULL AUTO_INCREMENT primary key, + selectLimit int(5) NOT NULL +); + +INSERT IGNORE INTO ormConfig SET selectLimit = 1000; \ No newline at end of file diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 22b535f62..30a2da6be 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -5,6 +5,7 @@ const utils = require('loopback/lib/utils'); module.exports = function(Self) { Self.ParameterizedSQL = ParameterizedSQL; + let isSelect; require('../methods/vn-model/getSetValues')(Self); require('../methods/vn-model/getEnumValues')(Self); @@ -13,7 +14,6 @@ module.exports = function(Self) { Object.assign(Self, { setup() { Self.super_.setup.call(this); - /** * Setting a global transaction timeout to find out if the service * is blocked because the connection pool is empty. @@ -28,6 +28,28 @@ module.exports = function(Self) { }; }); + /* + * Intercept GET request for find + */ + this.beforeRemote('find', async function(ctx) { + isSelect = true; + const filter = ctx.args.filter || {}; + // const models = this.app.models; + if (filter.limit === undefined) { + // WIP + // const {limit} = await models.OrmConfig.findOne(); Not working + // const [{selectLimit: limit}] = await this.rawSql('SELECT selectLimit FROM ormConfig', null); + filter.limit = 1/* limit */; + ctx.args.filter = filter; + } + }); + + this.observe('loaded', async function({data}) { + if (!isSelect) return; + const length = Array.isArray(data) ? data.length : data ? 1 : 0; + if (length >= 1) throw new UserError('Too many records'); + }); + // Register field ACL validation /* this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx)); diff --git a/loopback/locale/es.json b/loopback/locale/es.json index acc3d69f6..c2973bf62 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -368,5 +368,6 @@ "Payment method is required": "El método de pago es obligatorio", "Cannot send mail": "Não é possível enviar o email", "CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos", - "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo" + "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo", + "Too many records": "Demasiados registros" } \ No newline at end of file From 18dc3873b87a6e461f0ec7d85f371488c0318679 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 30 Jul 2024 09:54:43 +0200 Subject: [PATCH 030/250] feat: refs #7650 Added no transfer lines to inventory entry and fixtures --- db/dump/fixtures.before.sql | 4 ++++ db/routines/vn/triggers/buy_beforeUpdate.sql | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 60c96abb4..e3c19f6e0 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -582,6 +582,7 @@ INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif` VALUES (1, 'PLANTS SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'GOTHAM', 1, 46000, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'), (2, 'FARMER KING', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 46000, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'), + (4, 'INVENTARIO', 'INVENTARIO', 4000000004, NULL, NULL, 0, util.VN_CURDATE(), 1, NULL, NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL, NULL), (69, 'PACKAGING', 'Packaging nick', 4100000069, 1, '94935005K', 0, util.VN_CURDATE(), 1, 'supplier address 5', 'ASGARD', 3, 46600, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'), (442, 'VERDNATURA LEVANTE SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'), (567, 'HOLLAND', 'Holland nick', 4000020567, 1, '14364089Z', 0, util.VN_CURDATE(), 1, 'supplier address 6', 'ASGARD', 3, 46600, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'), @@ -1516,6 +1517,9 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed (9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''), (10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''); +INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`) + VALUES (1, 4, 1); + INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleQuantity`, `saleInternalWaste`, `saleExternalWaste`) VALUES ('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 1, 1, '1062', '51', '56.20', '56.20'), diff --git a/db/routines/vn/triggers/buy_beforeUpdate.sql b/db/routines/vn/triggers/buy_beforeUpdate.sql index 1e2faecdc..366681f99 100644 --- a/db/routines/vn/triggers/buy_beforeUpdate.sql +++ b/db/routines/vn/triggers/buy_beforeUpdate.sql @@ -69,6 +69,10 @@ trig:BEGIN IF NOT NEW.printedStickers <=> OLD.printedStickers THEN CALL util.throw("Stickers cannot be modified if they are inventory"); END IF; + + IF OLD.entryFk <> NEW.entryFk THEN + CALL util.throw("Cannot transfer lines to inventory entry"); + END IF; END IF; IF NEW.quantity < 0 THEN From 82c28e03991565d494e12fb678ed0e80cc3019eb Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 30 Jul 2024 10:01:05 +0200 Subject: [PATCH 031/250] chore: refs #7524 WIP limit call --- loopback/common/models/vn-model.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 30a2da6be..0b16c6532 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -34,11 +34,8 @@ module.exports = function(Self) { this.beforeRemote('find', async function(ctx) { isSelect = true; const filter = ctx.args.filter || {}; - // const models = this.app.models; + // console.log(this.dataSource, Self.dataSource); undefined/null if (filter.limit === undefined) { - // WIP - // const {limit} = await models.OrmConfig.findOne(); Not working - // const [{selectLimit: limit}] = await this.rawSql('SELECT selectLimit FROM ormConfig', null); filter.limit = 1/* limit */; ctx.args.filter = filter; } From 0451e4bb2a50dca6fe5e148335cfcd168e09900e Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 30 Jul 2024 10:20:04 +0200 Subject: [PATCH 032/250] feat: refs #7650 Fix tests --- db/dump/fixtures.before.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index e3c19f6e0..adb0c01ac 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -1518,7 +1518,7 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed (10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''); INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`) - VALUES (1, 4, 1); + VALUES (2, 4, 1); INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleQuantity`, `saleInternalWaste`, `saleExternalWaste`) VALUES From d74a04a881438698210321716fae90a131530da5 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 30 Jul 2024 11:37:41 +0200 Subject: [PATCH 033/250] feat: deleted code and redirect to Lilium --- modules/invoiceOut/front/card/index.html | 8 - modules/invoiceOut/front/card/index.js | 41 --- modules/invoiceOut/front/card/index.spec.js | 27 -- .../front/descriptor-menu/index.html | 252 ------------------ .../invoiceOut/front/descriptor-menu/index.js | 191 ------------- .../front/descriptor-menu/index.spec.js | 121 --------- .../front/descriptor-menu/locale/en.yml | 7 - .../front/descriptor-menu/locale/es.yml | 30 --- .../front/descriptor-menu/style.scss | 30 --- .../front/descriptor-popover/index.html | 4 - .../front/descriptor-popover/index.js | 9 - .../invoiceOut/front/descriptor/index.html | 59 ---- modules/invoiceOut/front/descriptor/index.js | 52 ---- .../invoiceOut/front/descriptor/index.spec.js | 26 -- .../invoiceOut/front/descriptor/locale/es.yml | 2 - .../front/global-invoicing/index.html | 158 ----------- .../front/global-invoicing/index.js | 174 ------------ .../front/global-invoicing/index.spec.js | 74 ----- .../front/global-invoicing/locale/es.yml | 22 -- .../front/global-invoicing/style.scss | 21 -- modules/invoiceOut/front/index.js | 10 - modules/invoiceOut/front/index/index.html | 89 ------- modules/invoiceOut/front/index/index.js | 47 ---- modules/invoiceOut/front/index/locale/es.yml | 9 - .../invoiceOut/front/index/manual/index.html | 86 ------ .../invoiceOut/front/index/manual/index.js | 51 ---- .../front/index/manual/index.spec.js | 66 ----- .../front/index/manual/locale/es.yml | 6 - .../invoiceOut/front/index/manual/style.scss | 17 -- modules/invoiceOut/front/main/index.html | 18 -- modules/invoiceOut/front/main/index.js | 10 +- .../invoiceOut/front/{ => main}/locale/es.yml | 0 .../front/negative-bases/index.html | 134 ---------- .../invoiceOut/front/negative-bases/index.js | 74 ----- .../front/negative-bases/locale/es.yml | 2 - .../front/negative-bases/style.scss | 10 - modules/invoiceOut/front/routes.json | 30 --- .../invoiceOut/front/search-panel/index.html | 68 ----- .../invoiceOut/front/search-panel/index.js | 7 - modules/invoiceOut/front/summary/index.html | 104 -------- modules/invoiceOut/front/summary/index.js | 34 --- .../invoiceOut/front/summary/index.spec.js | 31 --- .../invoiceOut/front/summary/locale/es.yml | 13 - modules/invoiceOut/front/summary/style.scss | 6 - 44 files changed, 9 insertions(+), 2221 deletions(-) delete mode 100644 modules/invoiceOut/front/card/index.html delete mode 100644 modules/invoiceOut/front/card/index.js delete mode 100644 modules/invoiceOut/front/card/index.spec.js delete mode 100644 modules/invoiceOut/front/descriptor-menu/index.html delete mode 100644 modules/invoiceOut/front/descriptor-menu/index.js delete mode 100644 modules/invoiceOut/front/descriptor-menu/index.spec.js delete mode 100644 modules/invoiceOut/front/descriptor-menu/locale/en.yml delete mode 100644 modules/invoiceOut/front/descriptor-menu/locale/es.yml delete mode 100644 modules/invoiceOut/front/descriptor-menu/style.scss delete mode 100644 modules/invoiceOut/front/descriptor-popover/index.html delete mode 100644 modules/invoiceOut/front/descriptor-popover/index.js delete mode 100644 modules/invoiceOut/front/descriptor/index.html delete mode 100644 modules/invoiceOut/front/descriptor/index.js delete mode 100644 modules/invoiceOut/front/descriptor/index.spec.js delete mode 100644 modules/invoiceOut/front/descriptor/locale/es.yml delete mode 100644 modules/invoiceOut/front/global-invoicing/index.html delete mode 100644 modules/invoiceOut/front/global-invoicing/index.js delete mode 100644 modules/invoiceOut/front/global-invoicing/index.spec.js delete mode 100644 modules/invoiceOut/front/global-invoicing/locale/es.yml delete mode 100644 modules/invoiceOut/front/global-invoicing/style.scss delete mode 100644 modules/invoiceOut/front/index/index.html delete mode 100644 modules/invoiceOut/front/index/index.js delete mode 100644 modules/invoiceOut/front/index/locale/es.yml delete mode 100644 modules/invoiceOut/front/index/manual/index.html delete mode 100644 modules/invoiceOut/front/index/manual/index.js delete mode 100644 modules/invoiceOut/front/index/manual/index.spec.js delete mode 100644 modules/invoiceOut/front/index/manual/locale/es.yml delete mode 100644 modules/invoiceOut/front/index/manual/style.scss rename modules/invoiceOut/front/{ => main}/locale/es.yml (100%) delete mode 100644 modules/invoiceOut/front/negative-bases/index.html delete mode 100644 modules/invoiceOut/front/negative-bases/index.js delete mode 100644 modules/invoiceOut/front/negative-bases/locale/es.yml delete mode 100644 modules/invoiceOut/front/negative-bases/style.scss delete mode 100644 modules/invoiceOut/front/search-panel/index.html delete mode 100644 modules/invoiceOut/front/search-panel/index.js delete mode 100644 modules/invoiceOut/front/summary/index.html delete mode 100644 modules/invoiceOut/front/summary/index.js delete mode 100644 modules/invoiceOut/front/summary/index.spec.js delete mode 100644 modules/invoiceOut/front/summary/locale/es.yml delete mode 100644 modules/invoiceOut/front/summary/style.scss diff --git a/modules/invoiceOut/front/card/index.html b/modules/invoiceOut/front/card/index.html deleted file mode 100644 index a6f56f775..000000000 --- a/modules/invoiceOut/front/card/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/modules/invoiceOut/front/card/index.js b/modules/invoiceOut/front/card/index.js deleted file mode 100644 index c443912d9..000000000 --- a/modules/invoiceOut/front/card/index.js +++ /dev/null @@ -1,41 +0,0 @@ -import ngModule from '../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - const filter = { - fields: [ - 'id', - 'ref', - 'issued', - 'serial', - 'amount', - 'clientFk', - 'companyFk', - 'hasPdf' - ], - include: [ - { - relation: 'company', - scope: { - fields: ['id', 'code'] - } - }, { - relation: 'client', - scope: { - fields: ['id', 'socialName', 'name', 'email'] - } - } - ] - }; - - this.$http.get(`InvoiceOuts/${this.$params.id}`, {filter}) - .then(res => this.invoiceOut = res.data); - } -} - -ngModule.vnComponent('vnInvoiceOutCard', { - template: require('./index.html'), - controller: Controller -}); - diff --git a/modules/invoiceOut/front/card/index.spec.js b/modules/invoiceOut/front/card/index.spec.js deleted file mode 100644 index 2a8d576dc..000000000 --- a/modules/invoiceOut/front/card/index.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -import './index.js'; - -describe('vnInvoiceOut', () => { - let controller; - let $httpBackend; - let data = {id: 1, name: 'fooName'}; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => { - $httpBackend = _$httpBackend_; - - let $element = angular.element('
'); - controller = $componentController('vnInvoiceOutCard', {$element}); - - $stateParams.id = data.id; - $httpBackend.whenRoute('GET', 'InvoiceOuts/:id').respond(data); - })); - - it('should request data and set it on the controller', () => { - controller.reload(); - $httpBackend.flush(); - - expect(controller.invoiceOut).toEqual(data); - }); -}); - diff --git a/modules/invoiceOut/front/descriptor-menu/index.html b/modules/invoiceOut/front/descriptor-menu/index.html deleted file mode 100644 index da04c8e72..000000000 --- a/modules/invoiceOut/front/descriptor-menu/index.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - Transfer invoice to... - - - Show invoice... - - -
- as PDF - - - as CSV - - - - - - Send invoice... - - - - Send PDF - - - Send CSV - - - - - - Delete Invoice - - - Book invoice - - - {{!$ctrl.invoiceOut.hasPdf ? 'Generate PDF invoice': 'Regenerate PDF invoice'}} - - - Show CITES letter - - - Refund... - - - - with warehouse - - - without warehouse - - - - - - - - - - - - - - - - - - - - - Are you sure you want to send it? - - - - - - - - - - - - - Are you sure you want to send it? - - - - - - - - - - - - transferInvoice - - -
- - - - #{{id}} - {{::name}} - - - - - {{ ::description}} - - - - - - - {{::code}} - {{::description}} - - - - - - - - - -
-
- - - -
diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js deleted file mode 100644 index 8ea4507ec..000000000 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ /dev/null @@ -1,191 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $, vnReport, vnEmail) { - super($element, $); - this.vnReport = vnReport; - this.vnEmail = vnEmail; - this.checked = true; - } - - get invoiceOut() { - return this._invoiceOut; - } - - set invoiceOut(value) { - this._invoiceOut = value; - if (value) - this.id = value.id; - } - - get hasInvoicing() { - return this.aclService.hasAny(['invoicing']); - } - - get isChecked() { - return this.checked; - } - - set isChecked(value) { - this.checked = value; - } - - $onInit() { - this.$http.get(`CplusRectificationTypes`, {filter: {order: 'description'}}) - .then(res => { - this.cplusRectificationTypes = res.data; - this.cplusRectificationType = res.data.filter(type => type.description == 'I – Por diferencias')[0].id; - }); - this.$http.get(`SiiTypeInvoiceOuts`, {filter: {where: {code: {like: 'R%'}}}}) - .then(res => { - this.siiTypeInvoiceOuts = res.data; - this.siiTypeInvoiceOut = res.data.filter(type => type.code == 'R4')[0].id; - }); - } - loadData() { - const filter = { - include: [ - { - relation: 'company', - scope: { - fields: ['id', 'code'] - } - }, { - relation: 'client', - scope: { - fields: ['id', 'name', 'email', 'hasToInvoiceByAddress'] - } - } - ] - }; - return this.$http.get(`InvoiceOuts/${this.invoiceOut.id}`, {filter}) - .then(res => this.invoiceOut = res.data); - } - reload() { - return this.loadData().then(() => { - if (this.parentReload) - this.parentReload(); - }); - } - - cardReload() { - // Prevents error when not defined - } - - deleteInvoiceOut() { - return this.$http.post(`InvoiceOuts/${this.invoiceOut.id}/delete`) - .then(() => { - const isInsideInvoiceOut = this.$state.current.name.startsWith('invoiceOut'); - if (isInsideInvoiceOut) - this.$state.go('invoiceOut.index'); - else - this.$state.reload(); - }) - .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut deleted'))); - } - - bookInvoiceOut() { - return this.$http.post(`InvoiceOuts/${this.invoiceOut.ref}/book`) - .then(() => this.$state.reload()) - .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked'))); - } - - createPdfInvoice() { - return this.$http.post(`InvoiceOuts/${this.id}/createPdf`) - .then(() => this.reload()) - .then(() => { - const snackbarMessage = this.$t( - `The invoice PDF document has been regenerated`); - this.vnApp.showSuccess(snackbarMessage); - }); - } - - sendPdfInvoice($data) { - if (!$data.email) - return this.vnApp.showError(this.$t(`The email can't be empty`)); - - return this.vnEmail.send(`InvoiceOuts/${this.invoiceOut.ref}/invoice-email`, { - recipientId: this.invoiceOut.client.id, - recipient: $data.email - }); - } - - showCsvInvoice() { - this.vnReport.show(`InvoiceOuts/${this.invoiceOut.ref}/invoice-csv`, { - recipientId: this.invoiceOut.client.id - }); - } - - sendCsvInvoice($data) { - if (!$data.email) - return this.vnApp.showError(this.$t(`The email can't be empty`)); - - return this.vnEmail.send(`InvoiceOuts/${this.invoiceOut.ref}/invoice-csv-email`, { - recipientId: this.invoiceOut.client.id, - recipient: $data.email - }); - } - - showExportationLetter() { - this.vnReport.show(`InvoiceOuts/${this.invoiceOut.ref}/exportation-pdf`, { - recipientId: this.invoiceOut.client.id, - refFk: this.invoiceOut.ref - }); - } - - refundInvoiceOut(withWarehouse) { - const query = 'InvoiceOuts/refund'; - const params = {ref: this.invoiceOut.ref, withWarehouse: withWarehouse}; - this.$http.post(query, params).then(res => { - const tickets = res.data; - const refundTickets = tickets.map(ticket => ticket.id); - - this.vnApp.showSuccess(this.$t('The following refund tickets have been created', { - ticketId: refundTickets.join(',') - })); - if (refundTickets.length == 1) - this.$state.go('ticket.card.sale', {id: refundTickets[0]}); - }); - } - - transferInvoice() { - const params = { - id: this.invoiceOut.id, - refFk: this.invoiceOut.ref, - newClientFk: this.clientId, - cplusRectificationTypeFk: this.cplusRectificationType, - siiTypeInvoiceOutFk: this.siiTypeInvoiceOut, - invoiceCorrectionTypeFk: this.invoiceCorrectionType, - makeInvoice: this.checked - }; - - this.$http.get(`Clients/${this.clientId}`).then(response => { - const clientData = response.data; - const hasToInvoiceByAddress = clientData.hasToInvoiceByAddress; - - if (this.checked && hasToInvoiceByAddress) { - if (!window.confirm(this.$t('confirmTransferInvoice'))) - return; - } - - this.$http.post(`InvoiceOuts/transferInvoice`, params).then(res => { - const invoiceId = res.data; - this.vnApp.showSuccess(this.$t('Transferred invoice')); - this.$state.go('invoiceOut.card.summary', {id: invoiceId}); - }); - }); - } -} - -Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail']; - -ngModule.vnComponent('vnInvoiceOutDescriptorMenu', { - template: require('./index.html'), - controller: Controller, - bindings: { - invoiceOut: '<', - parentReload: '&' - } -}); diff --git a/modules/invoiceOut/front/descriptor-menu/index.spec.js b/modules/invoiceOut/front/descriptor-menu/index.spec.js deleted file mode 100644 index d2ccfa117..000000000 --- a/modules/invoiceOut/front/descriptor-menu/index.spec.js +++ /dev/null @@ -1,121 +0,0 @@ -import './index'; - -describe('vnInvoiceOutDescriptorMenu', () => { - let controller; - let $httpBackend; - let $httpParamSerializer; - const invoiceOut = { - id: 1, - client: {id: 1101}, - ref: 'T1111111' - }; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, _$httpParamSerializer_, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - controller = $componentController('vnInvoiceOutDescriptorMenu', {$element: null}); - controller.invoiceOut = { - id: 1, - ref: 'T1111111', - client: {id: 1101} - }; - })); - - describe('createPdfInvoice()', () => { - it('should make a query to the createPdf() endpoint and show a success snackbar', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.whenGET(`InvoiceOuts/${invoiceOut.id}`).respond(); - $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/createPdf`).respond(); - controller.createPdfInvoice(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('showCsvInvoice()', () => { - it('should make a query to the csv invoice download endpoint and show a message snackbar', () => { - jest.spyOn(window, 'open').mockReturnThis(); - - const expectedParams = { - recipientId: invoiceOut.client.id - }; - const serializedParams = $httpParamSerializer(expectedParams); - const expectedPath = `api/InvoiceOuts/${invoiceOut.ref}/invoice-csv?${serializedParams}`; - controller.showCsvInvoice(); - - expect(window.open).toHaveBeenCalledWith(expectedPath); - }); - }); - - describe('deleteInvoiceOut()', () => { - it(`should make a query and call showSuccess()`, () => { - controller.$state.reload = jest.fn(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/delete`).respond(); - controller.deleteInvoiceOut(); - $httpBackend.flush(); - - expect(controller.$state.reload).toHaveBeenCalled(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - - it(`should make a query and call showSuccess() after state.go if the state wasn't in invoiceOut module`, () => { - jest.spyOn(controller.$state, 'go').mockReturnValue('ok'); - jest.spyOn(controller.vnApp, 'showSuccess'); - controller.$state.current.name = 'invoiceOut.card.something'; - - $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/delete`).respond(); - controller.deleteInvoiceOut(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('invoiceOut.index'); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('sendPdfInvoice()', () => { - it('should make a query to the email invoice endpoint and show a message snackbar', () => { - jest.spyOn(controller.vnApp, 'showMessage'); - - const $data = {email: 'brucebanner@gothamcity.com'}; - - $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.ref}/invoice-email`).respond(); - controller.sendPdfInvoice($data); - $httpBackend.flush(); - - expect(controller.vnApp.showMessage).toHaveBeenCalled(); - }); - }); - - describe('sendCsvInvoice()', () => { - it('should make a query to the csv invoice send endpoint and show a message snackbar', () => { - jest.spyOn(controller.vnApp, 'showMessage'); - - const $data = {email: 'brucebanner@gothamcity.com'}; - - $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.ref}/invoice-csv-email`).respond(); - controller.sendCsvInvoice($data); - $httpBackend.flush(); - - expect(controller.vnApp.showMessage).toHaveBeenCalled(); - }); - }); - - describe('refundInvoiceOut()', () => { - it('should make a query and show a success message', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - const params = {ref: controller.invoiceOut.ref}; - - $httpBackend.expectPOST(`InvoiceOuts/refund`, params).respond([{id: 1}, {id: 2}]); - controller.refundInvoiceOut(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); -}); diff --git a/modules/invoiceOut/front/descriptor-menu/locale/en.yml b/modules/invoiceOut/front/descriptor-menu/locale/en.yml deleted file mode 100644 index 32ea03442..000000000 --- a/modules/invoiceOut/front/descriptor-menu/locale/en.yml +++ /dev/null @@ -1,7 +0,0 @@ -The following refund tickets have been created: "The following refund tickets have been created: {{ticketIds}}" -Transfer invoice to...: Transfer invoice to... -Cplus Type: Cplus Type -transferInvoice: Transfer Invoice -destinationClient: Bill destination client -transferInvoiceInfo: New tickets from the destination customer will be generated in the default consignee. -confirmTransferInvoice: Destination customer has marked to bill by consignee, do you want to continue? \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-menu/locale/es.yml b/modules/invoiceOut/front/descriptor-menu/locale/es.yml deleted file mode 100644 index 92c109878..000000000 --- a/modules/invoiceOut/front/descriptor-menu/locale/es.yml +++ /dev/null @@ -1,30 +0,0 @@ -Show invoice...: Ver factura... -Send invoice...: Enviar factura... -Send PDF invoice: Enviar factura en PDF -Send CSV invoice: Enviar factura en CSV -as PDF: como PDF -as CSV: como CSV -Delete Invoice: Eliminar factura -Clone Invoice: Clonar factura -Book invoice: Asentar factura -Generate PDF invoice: Generar PDF factura -Show CITES letter: Ver carta CITES -InvoiceOut deleted: Factura eliminada -Are you sure you want to delete this invoice?: Estas seguro de eliminar esta factura? -Are you sure you want to clone this invoice?: Estas seguro de clonar esta factura? -InvoiceOut booked: Factura asentada -Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura? -Are you sure you want to refund this invoice?: Estas seguro de querer abonar esta factura? -Create a refund ticket for each ticket on the current invoice: Crear un ticket abono por cada ticket de la factura actual -Regenerate PDF invoice: Regenerar PDF factura -The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado -The email can't be empty: El correo no puede estar vacío -The following refund tickets have been created: "Se han creado los siguientes tickets de abono: {{ticketIds}}" -Refund...: Abono... -Transfer invoice to...: Transferir factura a... -Rectificative type: Tipo rectificativa -Transferred invoice: Factura transferida -transferInvoice: Transferir factura -destinationClient: Facturar cliente destino -transferInvoiceInfo: Los nuevos tickets del cliente destino serán generados en el consignatario por defecto. -confirmTransferInvoice: El cliente destino tiene marcado facturar por consignatario, ¿desea continuar? \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-menu/style.scss b/modules/invoiceOut/front/descriptor-menu/style.scss deleted file mode 100644 index 9e4cf4297..000000000 --- a/modules/invoiceOut/front/descriptor-menu/style.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import "./effects"; -@import "variables"; - -vn-invoice-out-descriptor-menu { - & > vn-icon-button[icon="more_vert"] { - display: flex; - min-width: 45px; - height: 45px; - box-sizing: border-box; - align-items: center; - justify-content: center; - } - & > vn-icon-button[icon="more_vert"] { - @extend %clickable; - color: inherit; - - & > vn-icon { - padding: 10px; - } - vn-icon { - font-size: 1.75rem; - } - } - -} -@media screen and (min-width: 1000px) { - .transferInvoice { - min-width: $width-md; - } -} diff --git a/modules/invoiceOut/front/descriptor-popover/index.html b/modules/invoiceOut/front/descriptor-popover/index.html deleted file mode 100644 index 2bd912133..000000000 --- a/modules/invoiceOut/front/descriptor-popover/index.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-popover/index.js b/modules/invoiceOut/front/descriptor-popover/index.js deleted file mode 100644 index fc9899da0..000000000 --- a/modules/invoiceOut/front/descriptor-popover/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import ngModule from '../module'; -import DescriptorPopover from 'salix/components/descriptor-popover'; - -class Controller extends DescriptorPopover {} - -ngModule.vnComponent('vnInvoiceOutDescriptorPopover', { - slotTemplate: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html deleted file mode 100644 index e1dc579ab..000000000 --- a/modules/invoiceOut/front/descriptor/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -
- - - - - - - {{$ctrl.invoiceOut.client.name}} - - - - -
- -
-
- - - - - diff --git a/modules/invoiceOut/front/descriptor/index.js b/modules/invoiceOut/front/descriptor/index.js deleted file mode 100644 index 7eeb85ea6..000000000 --- a/modules/invoiceOut/front/descriptor/index.js +++ /dev/null @@ -1,52 +0,0 @@ -import ngModule from '../module'; -import Descriptor from 'salix/components/descriptor'; - -class Controller extends Descriptor { - get invoiceOut() { - return this.entity; - } - - set invoiceOut(value) { - this.entity = value; - } - - get hasInvoicing() { - return this.aclService.hasAny(['invoicing']); - } - - get filter() { - if (this.invoiceOut) - return JSON.stringify({refFk: this.invoiceOut.ref}); - - return null; - } - - loadData() { - const filter = { - include: [ - { - relation: 'company', - scope: { - fields: ['id', 'code'] - } - }, { - relation: 'client', - scope: { - fields: ['id', 'name', 'email'] - } - } - ] - }; - - return this.getData(`InvoiceOuts/${this.id}`, {filter}) - .then(res => this.entity = res.data); - } -} - -ngModule.vnComponent('vnInvoiceOutDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - invoiceOut: '<', - } -}); diff --git a/modules/invoiceOut/front/descriptor/index.spec.js b/modules/invoiceOut/front/descriptor/index.spec.js deleted file mode 100644 index 987763b0a..000000000 --- a/modules/invoiceOut/front/descriptor/index.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -import './index'; - -describe('vnInvoiceOutDescriptor', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnInvoiceOutDescriptor', {$element: null}); - })); - - describe('loadData()', () => { - it(`should perform a get query to store the invoice in data into the controller`, () => { - const id = 1; - const response = {id: 1}; - - $httpBackend.expectGET(`InvoiceOuts/${id}`).respond(response); - controller.id = id; - $httpBackend.flush(); - - expect(controller.invoiceOut).toEqual(response); - }); - }); -}); diff --git a/modules/invoiceOut/front/descriptor/locale/es.yml b/modules/invoiceOut/front/descriptor/locale/es.yml deleted file mode 100644 index 0e88a7dc7..000000000 --- a/modules/invoiceOut/front/descriptor/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Client card: Ficha del cliente -Invoice ticket list: Listado de tickets de la factura \ No newline at end of file diff --git a/modules/invoiceOut/front/global-invoicing/index.html b/modules/invoiceOut/front/global-invoicing/index.html deleted file mode 100644 index 3ece30862..000000000 --- a/modules/invoiceOut/front/global-invoicing/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - -
-
- - Build packaging tickets - - - {{'Invoicing client' | translate}} {{$ctrl.currentAddress.clientId}} - - - Stopping process - - - Ended process - -
-
-
- {{$ctrl.percentage | percentage: 0}} - ({{$ctrl.addressNumber}} of {{$ctrl.nAddresses}}) -
-
- {{$ctrl.nPdfs}} of {{$ctrl.totalPdfs}} - PDFs -
-
-
-
- - - - - Id - Client - Address id - Street - Error - - - - - - - {{::error.address.clientId}} - - - - {{::error.address.clientName}} - - - {{::error.address.id}} - - - {{::error.address.nickname}} - - - - {{::error.message}} - - - - - - - - - - - -
- - - - - - - - - -
{{::name}}
-
#{{::id}}
-
-
- - - - - - - - - - - - -
-
-
- - - diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js deleted file mode 100644 index 9a936611a..000000000 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ /dev/null @@ -1,174 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import UserError from 'core/lib/user-error'; -import './style.scss'; - -class Controller extends Section { - $onInit() { - const date = Date.vnNew(); - Object.assign(this, { - maxShipped: new Date(date.getFullYear(), date.getMonth(), 0), - clientsToInvoice: 'all', - companyFk: this.vnConfig.companyFk, - parallelism: 1 - }); - - const params = {companyFk: this.companyFk}; - this.$http.get('InvoiceOuts/getInvoiceDate', {params}) - .then(res => { - this.minInvoicingDate = res.data.issued ? new Date(res.data.issued) : null; - this.invoiceDate = this.minInvoicingDate; - }); - - const filter = {fields: ['parallelism']}; - this.$http.get('InvoiceOutConfigs/findOne', {filter}) - .then(res => { - if (res.data.parallelism) - this.parallelism = res.data.parallelism; - }) - .catch(res => { - if (res.status == 404) return; - throw res; - }); - } - - makeInvoice() { - this.invoicing = true; - this.status = 'packageInvoicing'; - this.errors = []; - this.addresses = null; - - try { - if (this.clientsToInvoice == 'one' && !this.clientId) - throw new UserError('Choose a valid client'); - if (!this.invoiceDate || !this.maxShipped) - throw new UserError('Invoice date and the max date should be filled'); - if (this.invoiceDate < this.maxShipped) - throw new UserError('Invoice date can\'t be less than max date'); - if (this.minInvoicingDate && this.invoiceDate.getTime() < this.minInvoicingDate.getTime()) - throw new UserError('Exists an invoice with a future date'); - if (!this.companyFk) - throw new UserError('Choose a valid company'); - if (!this.printerFk) - throw new UserError('Choose a valid printer'); - - if (this.clientsToInvoice == 'all') - this.clientId = undefined; - - const params = { - invoiceDate: this.invoiceDate, - maxShipped: this.maxShipped, - clientId: this.clientId, - companyFk: this.companyFk - }; - this.$http.post(`InvoiceOuts/clientsToInvoice`, params) - .then(res => { - this.addresses = res.data; - if (!this.addresses.length) - throw new UserError(`There aren't tickets to invoice`); - - this.nRequests = 0; - this.nPdfs = 0; - this.totalPdfs = 0; - this.addressIndex = 0; - this.invoiceClient(); - }) - .catch(err => this.handleError(err)); - } catch (err) { - this.handleError(err); - } - } - - handleError(err) { - this.invoicing = false; - this.status = null; - throw err; - } - - invoiceClient() { - if (this.nRequests == this.parallelism || this.isInvoicing) return; - - if (this.addressIndex >= this.addresses.length || this.status == 'stopping') { - if (this.nRequests) return; - this.invoicing = false; - this.status = 'done'; - return; - } - - this.status = 'invoicing'; - const address = this.addresses[this.addressIndex]; - this.currentAddress = address; - this.isInvoicing = true; - - const params = { - clientId: address.clientId, - addressId: address.id, - invoiceDate: this.invoiceDate, - maxShipped: this.maxShipped, - companyFk: this.companyFk - }; - - this.$http.post(`InvoiceOuts/invoiceClient`, params) - .then(res => { - this.isInvoicing = false; - if (res.data) - this.makePdfAndNotify(res.data, address); - this.invoiceNext(); - }) - .catch(res => { - this.isInvoicing = false; - if (res.status >= 400 && res.status < 500) { - this.invoiceError(address, res); - this.invoiceNext(); - } else { - this.invoicing = false; - this.status = 'done'; - throw new UserError(`Critical invoicing error, proccess stopped`); - } - }); - } - - invoiceNext() { - this.addressIndex++; - this.invoiceClient(); - } - - makePdfAndNotify(invoiceId, address) { - this.nRequests++; - this.totalPdfs++; - const params = {printerFk: this.printerFk}; - this.$http.post(`InvoiceOuts/${invoiceId}/makePdfAndNotify`, params) - .catch(res => { - this.invoiceError(address, res, true); - }) - .finally(() => { - this.nPdfs++; - this.nRequests--; - this.invoiceClient(); - }); - } - - invoiceError(address, res, isWarning) { - const message = res.data?.error?.message || res.message; - this.errors.unshift({address, message, isWarning}); - } - - get nAddresses() { - if (!this.addresses) return 0; - return this.addresses.length; - } - - get addressNumber() { - return Math.min(this.addressIndex + 1, this.nAddresses); - } - - get percentage() { - const len = this.nAddresses; - return Math.min(this.addressIndex, len) / len; - } -} - -ngModule.vnComponent('vnInvoiceOutGlobalInvoicing', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceOut/front/global-invoicing/index.spec.js b/modules/invoiceOut/front/global-invoicing/index.spec.js deleted file mode 100644 index 056839b20..000000000 --- a/modules/invoiceOut/front/global-invoicing/index.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -import './index'; - -describe('InvoiceOut', () => { - describe('Component vnInvoiceOutGlobalInvoicing', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - const $scope = $rootScope.$new(); - const $element = angular.element(''); - - controller = $componentController('vnInvoiceOutGlobalInvoicing', {$element, $scope}); - })); - - describe('makeInvoice()', () => { - it('should throw an error when invoiceDate or maxShipped properties are not filled in', () => { - jest.spyOn(controller.vnApp, 'showError'); - controller.clientsToInvoice = 'all'; - - let error; - try { - controller.makeInvoice(); - } catch (e) { - error = e.message; - } - - const expectedError = 'Invoice date and the max date should be filled'; - - expect(error).toBe(expectedError); - }); - - it('should throw an error when select one client and clientId is not filled in', () => { - jest.spyOn(controller.vnApp, 'showError'); - controller.clientsToInvoice = 'one'; - - let error; - try { - controller.makeInvoice(); - } catch (e) { - error = e.message; - } - - const expectedError = 'Choose a valid client'; - - expect(error).toBe(expectedError); - }); - - it('should make an http POST query and then call to the showSuccess() method', () => { - const date = Date.vnNew(); - Object.assign(controller, { - invoiceDate: date, - maxShipped: date, - minInvoicingDate: date, - clientsToInvoice: 'one', - clientId: 1101, - companyFk: 442, - printerFk: 1 - }); - $httpBackend.expectPOST(`InvoiceOuts/clientsToInvoice`).respond([{ - clientId: 1101, - id: 121 - }]); - $httpBackend.expectPOST(`InvoiceOuts/invoiceClient`).respond(); - controller.makeInvoice(); - $httpBackend.flush(); - - expect(controller.status).toEqual('done'); - }); - }); - }); -}); diff --git a/modules/invoiceOut/front/global-invoicing/locale/es.yml b/modules/invoiceOut/front/global-invoicing/locale/es.yml deleted file mode 100644 index f1a411ba1..000000000 --- a/modules/invoiceOut/front/global-invoicing/locale/es.yml +++ /dev/null @@ -1,22 +0,0 @@ -There aren't tickets to invoice: No existen tickets para facturar -Max date: Fecha límite -Invoice date: Fecha de factura -Invoice date can't be less than max date: La fecha de factura no puede ser inferior a la fecha límite -Invoice date and the max date should be filled: La fecha de factura y la fecha límite deben rellenarse -Choose a valid company: Selecciona un empresa válida -Choose a valid printer: Selecciona una impresora válida -All clients: Todos los clientes -Build packaging tickets: Generando tickets de embalajes -Address id: Id dirección -Printer: Impresora -of: de -PDFs: PDFs -Client: Cliente -Current client id: Id cliente actual -Invoicing client: Facturando cliente -Ended process: Proceso finalizado -Invoice out: Facturar -One client: Un solo cliente -Choose a valid client: Selecciona un cliente válido -Stop: Parar -Critical invoicing error, proccess stopped: Error crítico al facturar, proceso detenido diff --git a/modules/invoiceOut/front/global-invoicing/style.scss b/modules/invoiceOut/front/global-invoicing/style.scss deleted file mode 100644 index 3ad767aba..000000000 --- a/modules/invoiceOut/front/global-invoicing/style.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "variables"; - -vn-invoice-out-global-invoicing { - h5 { - color: $color-primary; - } - .status { - height: 80px; - display: flex; - align-items: center; - justify-content: center; - gap: 20px; - } - #error { - line-break: normal; - overflow-wrap: break-word; - white-space: normal; - } -} - - diff --git a/modules/invoiceOut/front/index.js b/modules/invoiceOut/front/index.js index 723e3be5a..a7209a0bd 100644 --- a/modules/invoiceOut/front/index.js +++ b/modules/invoiceOut/front/index.js @@ -1,13 +1,3 @@ export * from './module'; import './main'; -import './index/'; -import './search-panel'; -import './summary'; -import './card'; -import './descriptor'; -import './descriptor-popover'; -import './descriptor-menu'; -import './index/manual'; -import './global-invoicing'; -import './negative-bases'; diff --git a/modules/invoiceOut/front/index/index.html b/modules/invoiceOut/front/index/index.html deleted file mode 100644 index dc4d5d8a9..000000000 --- a/modules/invoiceOut/front/index/index.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - Reference - Issued - Amount - Client - Created - Company - Due date - - - - - - - - - - {{::invoiceOut.ref | dashIfEmpty}} - {{::invoiceOut.issued | date:'dd/MM/yyyy' | dashIfEmpty}} - {{::invoiceOut.amount | currency: 'EUR': 2 | dashIfEmpty}} - - - {{::invoiceOut.clientSocialName | dashIfEmpty}} - - - {{::invoiceOut.created | date:'dd/MM/yyyy' | dashIfEmpty}} - {{::invoiceOut.companyCode | dashIfEmpty}} - {{::invoiceOut.dued | date:'dd/MM/yyyy' | dashIfEmpty}} - - - - - - - - - -
- - -
- - - - - - - - diff --git a/modules/invoiceOut/front/index/index.js b/modules/invoiceOut/front/index/index.js deleted file mode 100644 index f109cd5b0..000000000 --- a/modules/invoiceOut/front/index/index.js +++ /dev/null @@ -1,47 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - get checked() { - const rows = this.$.model.data || []; - const checkedRows = []; - for (let row of rows) { - if (row.checked) - checkedRows.push(row.id); - } - - return checkedRows; - } - - get totalChecked() { - return this.checked.length; - } - - preview(invoiceOut) { - this.selectedInvoiceOut = invoiceOut; - this.$.summary.show(); - } - - openPdf() { - const access_token = this.vnToken.tokenMultimedia; - if (this.checked.length <= 1) { - const [invoiceOutId] = this.checked; - const url = `api/InvoiceOuts/${invoiceOutId}/download?access_token=${access_token}`; - window.open(url, '_blank'); - } else { - const invoiceOutIds = this.checked; - const invoicesIds = invoiceOutIds.join(','); - const serializedParams = this.$httpParamSerializer({ - access_token, - ids: invoicesIds - }); - const url = `api/InvoiceOuts/downloadZip?${serializedParams}`; - window.open(url, '_blank'); - } - } -} - -ngModule.vnComponent('vnInvoiceOutIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceOut/front/index/locale/es.yml b/modules/invoiceOut/front/index/locale/es.yml deleted file mode 100644 index 74572da49..000000000 --- a/modules/invoiceOut/front/index/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Created: Fecha creacion -Issued: Fecha factura -Due date: Fecha vencimiento -Has PDF: PDF disponible -Minimum: Minimo -Maximum: Máximo -Global invoicing: Facturación global -Manual invoicing: Facturación manual -Files are too large: Los archivos son demasiado grandes \ No newline at end of file diff --git a/modules/invoiceOut/front/index/manual/index.html b/modules/invoiceOut/front/index/manual/index.html deleted file mode 100644 index 3b991618d..000000000 --- a/modules/invoiceOut/front/index/manual/index.html +++ /dev/null @@ -1,86 +0,0 @@ - - Create manual invoice - - - - - - -
- - - Invoicing in progress... - -
- - - -
#{{::id}}
-
{{::nickname}}
-
-
- Or - - - - -
- - - - - - - - - - -
- - - - diff --git a/modules/invoiceOut/front/index/manual/index.js b/modules/invoiceOut/front/index/manual/index.js deleted file mode 100644 index 3abe4b825..000000000 --- a/modules/invoiceOut/front/index/manual/index.js +++ /dev/null @@ -1,51 +0,0 @@ -import ngModule from '../../module'; -import Dialog from 'core/components/dialog'; -import './style.scss'; - -class Controller extends Dialog { - constructor($element, $, $transclude) { - super($element, $, $transclude); - - this.isInvoicing = false; - this.invoice = { - maxShipped: Date.vnNew() - }; - } - - responseHandler(response) { - try { - if (response !== 'accept') - return super.responseHandler(response); - - if (this.invoice.clientFk && !this.invoice.maxShipped) - throw new Error('Client and the max shipped should be filled'); - - if (!this.invoice.serial || !this.invoice.taxArea) - throw new Error('Some fields are required'); - - this.isInvoicing = true; - return this.$http.post(`InvoiceOuts/createManualInvoice`, this.invoice) - .then(res => { - this.$state.go('invoiceOut.card.summary', {id: res.data.id}); - super.responseHandler(response); - }) - .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))) - .finally(() => this.isInvoicing = false); - } catch (e) { - this.vnApp.showError(this.$t(e.message)); - this.isInvoicing = false; - return false; - } - } -} - -Controller.$inject = ['$element', '$scope', '$transclude']; - -ngModule.vnComponent('vnInvoiceOutManual', { - slotTemplate: require('./index.html'), - controller: Controller, - bindings: { - ticketFk: ' { - describe('Component vnInvoiceOutManual', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - let $scope = $rootScope.$new(); - const $element = angular.element(''); - const $transclude = { - $$boundTransclude: { - $$slots: [] - } - }; - controller = $componentController('vnInvoiceOutManual', {$element, $scope, $transclude}); - })); - - describe('responseHandler()', () => { - it('should throw an error when clientFk property is set and the maxShipped is not filled', () => { - jest.spyOn(controller.vnApp, 'showError'); - - controller.invoice = { - clientFk: 1101, - serial: 'T', - taxArea: 'B' - }; - - controller.responseHandler('accept'); - - expect(controller.vnApp.showError).toHaveBeenCalledWith(`Client and the max shipped should be filled`); - }); - - it('should throw an error when some required fields are not filled in', () => { - jest.spyOn(controller.vnApp, 'showError'); - - controller.invoice = { - ticketFk: 1101 - }; - - controller.responseHandler('accept'); - - expect(controller.vnApp.showError).toHaveBeenCalledWith(`Some fields are required`); - }); - - it('should make an http POST query and then call to the parent showSuccess() method', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.invoice = { - ticketFk: 1101, - serial: 'T', - taxArea: 'B' - }; - - $httpBackend.expect('POST', `InvoiceOuts/createManualInvoice`).respond({id: 1}); - controller.responseHandler('accept'); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/modules/invoiceOut/front/index/manual/locale/es.yml b/modules/invoiceOut/front/index/manual/locale/es.yml deleted file mode 100644 index 370e823d0..000000000 --- a/modules/invoiceOut/front/index/manual/locale/es.yml +++ /dev/null @@ -1,6 +0,0 @@ -Create manual invoice: Crear factura manual -Some fields are required: Algunos campos son obligatorios -Client and max shipped fields should be filled: Los campos de cliente y fecha límite deben rellenarse -Max date: Fecha límite -Serial: Serie -Invoicing in progress...: Facturación en progreso... \ No newline at end of file diff --git a/modules/invoiceOut/front/index/manual/style.scss b/modules/invoiceOut/front/index/manual/style.scss deleted file mode 100644 index 820c07756..000000000 --- a/modules/invoiceOut/front/index/manual/style.scss +++ /dev/null @@ -1,17 +0,0 @@ -@import "variables"; - -.vn-invoice-out-manual { - tpl-body { - width: 500px; - - .progress { - font-weight: bold; - text-align: center; - font-size: 1.5rem; - color: $color-primary; - vn-horizontal { - justify-content: center - } - } - } -} diff --git a/modules/invoiceOut/front/main/index.html b/modules/invoiceOut/front/main/index.html index ab3fce9ea..e69de29bb 100644 --- a/modules/invoiceOut/front/main/index.html +++ b/modules/invoiceOut/front/main/index.html @@ -1,18 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/invoiceOut/front/main/index.js b/modules/invoiceOut/front/main/index.js index ad37e9c4b..f7e21a126 100644 --- a/modules/invoiceOut/front/main/index.js +++ b/modules/invoiceOut/front/main/index.js @@ -1,7 +1,15 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; -export default class InvoiceOut extends ModuleMain {} +export default class InvoiceOut extends ModuleMain { + constructor($element, $) { + super($element, $); + } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`invoice-out/`); + } +} ngModule.vnComponent('vnInvoiceOut', { controller: InvoiceOut, diff --git a/modules/invoiceOut/front/locale/es.yml b/modules/invoiceOut/front/main/locale/es.yml similarity index 100% rename from modules/invoiceOut/front/locale/es.yml rename to modules/invoiceOut/front/main/locale/es.yml diff --git a/modules/invoiceOut/front/negative-bases/index.html b/modules/invoiceOut/front/negative-bases/index.html deleted file mode 100644 index 499b6bfe0..000000000 --- a/modules/invoiceOut/front/negative-bases/index.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Company - - Country - - Client id - - Client - - Amount - - Base - - Ticket id - - Active - - Has To Invoice - - Verified data - - Comercial -
{{client.company | dashIfEmpty}}{{client.country | dashIfEmpty}} - - {{::client.clientId | dashIfEmpty}} - - {{client.clientSocialName | dashIfEmpty}}{{client.amount | currency: 'EUR':2 | dashIfEmpty}}{{client.taxableBase | dashIfEmpty}} - - {{::client.ticketFk | dashIfEmpty}} - - - - - - - - - - - - - {{::client.workerName | dashIfEmpty}} - -
-
-
-
- - - - - - diff --git a/modules/invoiceOut/front/negative-bases/index.js b/modules/invoiceOut/front/negative-bases/index.js deleted file mode 100644 index 7ce610513..000000000 --- a/modules/invoiceOut/front/negative-bases/index.js +++ /dev/null @@ -1,74 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -export default class Controller extends Section { - constructor($element, $, vnReport) { - super($element, $); - - this.vnReport = vnReport; - const now = Date.vnNew(); - const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1); - const lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0); - this.params = { - from: firstDayOfMonth, - to: lastDayOfMonth - }; - this.$checkAll = false; - - this.smartTableOptions = { - activeButtons: { - search: true, - }, - columns: [ - { - field: 'isActive', - searchable: false - }, - { - field: 'hasToInvoice', - searchable: false - }, - { - field: 'isTaxDataChecked', - searchable: false - }, - ] - }; - } - - exprBuilder(param, value) { - switch (param) { - case 'company': - return {'company': value}; - case 'country': - return {'country': value}; - case 'clientId': - return {'clientId': value}; - case 'clientSocialName': - return {'clientSocialName': value}; - case 'amount': - return {'amount': value}; - case 'taxableBase': - return {'taxableBase': value}; - case 'ticketFk': - return {'ticketFk': value}; - case 'comercialName': - return {'comercialName': value}; - } - } - - downloadCSV() { - this.vnReport.show('InvoiceOuts/negativeBasesCsv', { - from: this.params.from, - to: this.params.to - }); - } -} - -Controller.$inject = ['$element', '$scope', 'vnReport']; - -ngModule.vnComponent('vnNegativeBases', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceOut/front/negative-bases/locale/es.yml b/modules/invoiceOut/front/negative-bases/locale/es.yml deleted file mode 100644 index dd3432592..000000000 --- a/modules/invoiceOut/front/negative-bases/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Has To Invoice: Facturar -Download as CSV: Descargar como CSV diff --git a/modules/invoiceOut/front/negative-bases/style.scss b/modules/invoiceOut/front/negative-bases/style.scss deleted file mode 100644 index 2d628cb94..000000000 --- a/modules/invoiceOut/front/negative-bases/style.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import "./variables"; - -vn-negative-bases { - vn-date-picker{ - padding-right: 5%; - } - slot-actions{ - align-items: center; - } -} diff --git a/modules/invoiceOut/front/routes.json b/modules/invoiceOut/front/routes.json index f7f589b01..26dd2da03 100644 --- a/modules/invoiceOut/front/routes.json +++ b/modules/invoiceOut/front/routes.json @@ -25,36 +25,6 @@ "state": "invoiceOut.index", "component": "vn-invoice-out-index", "description": "InvoiceOut" - }, - { - "url": "/global-invoicing?q", - "state": "invoiceOut.global-invoicing", - "component": "vn-invoice-out-global-invoicing", - "description": "Global invoicing" - }, - { - "url": "/summary", - "state": "invoiceOut.card.summary", - "component": "vn-invoice-out-summary", - "description": "Summary", - "params": { - "invoice-out": "$ctrl.invoiceOut" - } - }, - { - "url": "/:id", - "state": "invoiceOut.card", - "abstract": true, - "component": "vn-invoice-out-card" - }, - { - "url": "/negative-bases", - "state": "invoiceOut.negative-bases", - "component": "vn-negative-bases", - "description": "Negative bases", - "acl": [ - "administrative" - ] } ] } diff --git a/modules/invoiceOut/front/search-panel/index.html b/modules/invoiceOut/front/search-panel/index.html deleted file mode 100644 index f49002cca..000000000 --- a/modules/invoiceOut/front/search-panel/index.html +++ /dev/null @@ -1,68 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/invoiceOut/front/search-panel/index.js b/modules/invoiceOut/front/search-panel/index.js deleted file mode 100644 index a77d479ca..000000000 --- a/modules/invoiceOut/front/search-panel/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -ngModule.vnComponent('vnInvoiceSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/invoiceOut/front/summary/index.html b/modules/invoiceOut/front/summary/index.html deleted file mode 100644 index b83775158..000000000 --- a/modules/invoiceOut/front/summary/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - -
- - - - {{$ctrl.summary.invoiceOut.ref}} - {{$ctrl.summary.invoiceOut.client.socialName}} - -
- - - - - - - - - - - - - - -

Tax breakdown

- - - - Type - Taxable base - Rate - Fee - - - - - {{tax.name}} - {{tax.taxableBase | currency: 'EUR': 2}} - {{tax.rate}}% - {{tax.vat | currency: 'EUR': 2}} - - - -
- -

Ticket

- - - - Ticket id - Alias - Shipped - Amount - - - - - - - {{ticket.id}} - - - - - {{ticket.nickname}} - - - {{ticket.shipped | date: 'dd/MM/yyyy' | dashIfEmpty}} - {{ticket.totalWithVat | currency: 'EUR': 2}} - - - - - -
-
-
- - - - \ No newline at end of file diff --git a/modules/invoiceOut/front/summary/index.js b/modules/invoiceOut/front/summary/index.js deleted file mode 100644 index 131f9ba8f..000000000 --- a/modules/invoiceOut/front/summary/index.js +++ /dev/null @@ -1,34 +0,0 @@ -import ngModule from '../module'; -import Summary from 'salix/components/summary'; -import './style.scss'; - -class Controller extends Summary { - get invoiceOut() { - return this._invoiceOut; - } - - set invoiceOut(value) { - this._invoiceOut = value; - if (value && value.id) { - this.loadData(); - this.loadTickets(); - } - } - - loadData() { - this.$http.get(`InvoiceOuts/${this.invoiceOut.id}/summary`) - .then(res => this.summary = res.data); - } - - loadTickets() { - this.$.$applyAsync(() => this.$.ticketsModel.refresh()); - } -} - -ngModule.vnComponent('vnInvoiceOutSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - invoiceOut: '<' - } -}); diff --git a/modules/invoiceOut/front/summary/index.spec.js b/modules/invoiceOut/front/summary/index.spec.js deleted file mode 100644 index 44e3094ae..000000000 --- a/modules/invoiceOut/front/summary/index.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -import './index.js'; -import crudModel from 'core/mocks/crud-model'; - -describe('InvoiceOut', () => { - describe('Component summary', () => { - let controller; - let $httpBackend; - let $scope; - - beforeEach(ngModule('invoiceOut')); - - beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - const $element = angular.element(''); - controller = $componentController('vnInvoiceOutSummary', {$element, $scope}); - controller._invoiceOut = {id: 1}; - controller.$.ticketsModel = crudModel; - })); - - describe('loadData()', () => { - it('should perform a query to set summary', () => { - $httpBackend.expect('GET', `InvoiceOuts/1/summary`).respond(200, 'the data you are looking for'); - controller.loadData(); - $httpBackend.flush(); - - expect(controller.summary).toEqual('the data you are looking for'); - }); - }); - }); -}); diff --git a/modules/invoiceOut/front/summary/locale/es.yml b/modules/invoiceOut/front/summary/locale/es.yml deleted file mode 100644 index caff7ce99..000000000 --- a/modules/invoiceOut/front/summary/locale/es.yml +++ /dev/null @@ -1,13 +0,0 @@ -Date: Fecha -Created: Creada -Due: Vencimiento -Booked: Asentado -General VAT: IVA general -Reduced VAT: IVA reducido -Shipped: F. envío -Type: Tipo -Rate: Tasa -Fee: Cuota -Taxable base: Base imp. -Tax breakdown: Desglose impositivo -Go to the Invoice Out: Ir a la factura emitida \ No newline at end of file diff --git a/modules/invoiceOut/front/summary/style.scss b/modules/invoiceOut/front/summary/style.scss deleted file mode 100644 index e6e31fd94..000000000 --- a/modules/invoiceOut/front/summary/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import "variables"; - - -vn-invoice-out-summary .summary { - max-width: $width-lg; -} \ No newline at end of file From eaa366ff39c4f1a75b34538e502ed6e15bc4d7c8 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 30 Jul 2024 12:36:02 +0200 Subject: [PATCH 034/250] feat workerActivity refs #6078 --- back/methods/workerActivity/add.js | 55 +++++++++++++++++++ back/methods/workerActivity/specs/add.spec.js | 41 ++++++++++++++ back/models/workerActivity.js | 3 + back/models/workerActivity.json | 22 ++++---- 4 files changed, 110 insertions(+), 11 deletions(-) create mode 100644 back/methods/workerActivity/add.js create mode 100644 back/methods/workerActivity/specs/add.spec.js create mode 100644 back/models/workerActivity.js diff --git a/back/methods/workerActivity/add.js b/back/methods/workerActivity/add.js new file mode 100644 index 000000000..94c1bf57e --- /dev/null +++ b/back/methods/workerActivity/add.js @@ -0,0 +1,55 @@ + +module.exports = Self => { + Self.remoteMethodCtx('add', { + description: 'Add activity if the activity is different or is the same but have exceed time for break', + accessType: 'WRITE', + accepts: [ + { + arg: 'code', + type: 'string', + description: 'Code for activity' + }, + { + arg: 'model', + type: 'string', + description: 'Origin model from insert' + }, + + ], + http: { + path: `/add`, + verb: 'POST' + } + }); + + Self.add = async(ctx, code, model, options) => { + const userId = ctx.req.accessToken.userId; + + const result = await await Self.rawSql(` + INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model) + SELECT ?, + ?, + ? + FROM workerTimeControlParams wtcp + LEFT JOIN ( + SELECT wa.workerFk, + wa.created, + wat.code + FROM workerActivity wa + LEFT JOIN workerActivityType wat ON wat.code = wa.workerActivityTypeFk + WHERE wa.workerFk = ? + ORDER BY wa.created DESC + LIMIT 1 + ) sub ON TRUE + WHERE sub.workerFk IS NULL + OR sub.code <> ? + OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;` + , [userId, code, model, userId, code]); + console.log('*******'); + console.log('*******' + userId); + console.log('*******' + code); + console.log('*******' + model); + + return result; + }; +}; diff --git a/back/methods/workerActivity/specs/add.spec.js b/back/methods/workerActivity/specs/add.spec.js new file mode 100644 index 000000000..b0a69dc35 --- /dev/null +++ b/back/methods/workerActivity/specs/add.spec.js @@ -0,0 +1,41 @@ +const {models} = require('vn-loopback'); + +describe('workerActivity insert()', () => { + beforeAll(async() => { + ctx = { + req: { + accessToken: {}, + headers: {origin: 'http://localhost'}, + __: value => value + } + }; + }); + + fit('should insert in workerActivity', async() => { + const tx = await models.WorkerActivity.beginTransaction({}); + + try { + await models.WorkerActivityType.create( + {'code': 'STOP', 'description': 'STOP'} + ); + const options = {transaction: tx}; + ctx.req.accessToken.userId = 1106; + + models.WorkerActivity.add(ctx, 'STOP', 'APP', options); + const wac = await models.WorkerActivity.find( + {'wokerFk': 1106} + ); + console.log('----' + JSON.stringify(wac, null, 2)); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + const count = await models.WorkerActivity.count( + {'workerFK': 1106} + ); + + expect(count).toEqual(1); + }); +}); diff --git a/back/models/workerActivity.js b/back/models/workerActivity.js new file mode 100644 index 000000000..b3bb2c160 --- /dev/null +++ b/back/models/workerActivity.js @@ -0,0 +1,3 @@ +module.exports = Self => { + require('../methods/workerActivity/add')(Self); +}; diff --git a/back/models/workerActivity.json b/back/models/workerActivity.json index e3b994f77..ecd92bbce 100644 --- a/back/models/workerActivity.json +++ b/back/models/workerActivity.json @@ -22,18 +22,18 @@ }, "description": { "type": "string" + } + }, + "relations": { + "workerFk": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" }, - "relations": { - "workerFk": { - "type": "belongsTo", - "model": "Worker", - "foreignKey": "workerFk" - }, - "workerActivityTypeFk": { - "type": "belongsTo", - "model": "WorkerActivityType", - "foreignKey": "workerActivityTypeFk" - } + "workerActivityTypeFk": { + "type": "belongsTo", + "model": "WorkerActivityType", + "foreignKey": "workerActivityTypeFk" } } } \ No newline at end of file From 59df0b38863853fa5ace13efdf68e9fd49ceb113 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 30 Jul 2024 17:46:21 +0200 Subject: [PATCH 035/250] feat workerActivity refs #6078 --- back/methods/workerActivity/add.js | 4 ---- back/methods/workerActivity/specs/add.spec.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/back/methods/workerActivity/add.js b/back/methods/workerActivity/add.js index 94c1bf57e..587ebfae7 100644 --- a/back/methods/workerActivity/add.js +++ b/back/methods/workerActivity/add.js @@ -45,10 +45,6 @@ module.exports = Self => { OR sub.code <> ? OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;` , [userId, code, model, userId, code]); - console.log('*******'); - console.log('*******' + userId); - console.log('*******' + code); - console.log('*******' + model); return result; }; diff --git a/back/methods/workerActivity/specs/add.spec.js b/back/methods/workerActivity/specs/add.spec.js index b0a69dc35..1ca4be74f 100644 --- a/back/methods/workerActivity/specs/add.spec.js +++ b/back/methods/workerActivity/specs/add.spec.js @@ -22,10 +22,6 @@ describe('workerActivity insert()', () => { ctx.req.accessToken.userId = 1106; models.WorkerActivity.add(ctx, 'STOP', 'APP', options); - const wac = await models.WorkerActivity.find( - {'wokerFk': 1106} - ); - console.log('----' + JSON.stringify(wac, null, 2)); await tx.rollback(); } catch (e) { From 3c620462774897ab40dd1c9c48ed519117909dcb Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 31 Jul 2024 06:43:19 +0200 Subject: [PATCH 036/250] feat workerActivity refs #6078 --- back/methods/workerActivity/specs/add.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/workerActivity/specs/add.spec.js b/back/methods/workerActivity/specs/add.spec.js index 1ca4be74f..3f9657c67 100644 --- a/back/methods/workerActivity/specs/add.spec.js +++ b/back/methods/workerActivity/specs/add.spec.js @@ -11,7 +11,7 @@ describe('workerActivity insert()', () => { }; }); - fit('should insert in workerActivity', async() => { + it('should insert in workerActivity', async() => { const tx = await models.WorkerActivity.beginTransaction({}); try { From 460b9899c05762030794c0b0306015841f599a86 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 31 Jul 2024 10:22:56 +0200 Subject: [PATCH 037/250] refactor: deleted e2e & added back descriptor and summary --- e2e/paths/09-invoice-out/01_summary.spec.js | 44 --- .../09-invoice-out/02_descriptor.spec.js | 137 ---------- .../09-invoice-out/03_manualInvoice.spec.js | 53 ---- .../09-invoice-out/04_globalInvoice.spec.js | 39 --- .../09-invoice-out/05_negative_bases.spec.js | 29 -- .../front/descriptor-menu/index.html | 252 ++++++++++++++++++ .../invoiceOut/front/descriptor-menu/index.js | 191 +++++++++++++ .../front/descriptor-menu/index.spec.js | 121 +++++++++ .../front/descriptor-menu/locale/en.yml | 7 + .../front/descriptor-menu/locale/es.yml | 30 +++ .../front/descriptor-menu/style.scss | 30 +++ .../front/descriptor-popover/index.html | 4 + .../front/descriptor-popover/index.js | 9 + modules/invoiceOut/front/descriptor/es.yml | 2 + .../invoiceOut/front/descriptor/index.html | 59 ++++ modules/invoiceOut/front/descriptor/index.js | 52 ++++ .../invoiceOut/front/descriptor/index.spec.js | 26 ++ modules/invoiceOut/front/index.js | 4 + modules/invoiceOut/front/routes.json | 9 + modules/invoiceOut/front/summary/es.yml | 13 + modules/invoiceOut/front/summary/index.html | 104 ++++++++ modules/invoiceOut/front/summary/index.js | 34 +++ .../invoiceOut/front/summary/index.spec.js | 31 +++ modules/invoiceOut/front/summary/style.scss | 6 + 24 files changed, 984 insertions(+), 302 deletions(-) delete mode 100644 e2e/paths/09-invoice-out/01_summary.spec.js delete mode 100644 e2e/paths/09-invoice-out/02_descriptor.spec.js delete mode 100644 e2e/paths/09-invoice-out/03_manualInvoice.spec.js delete mode 100644 e2e/paths/09-invoice-out/04_globalInvoice.spec.js delete mode 100644 e2e/paths/09-invoice-out/05_negative_bases.spec.js create mode 100644 modules/invoiceOut/front/descriptor-menu/index.html create mode 100644 modules/invoiceOut/front/descriptor-menu/index.js create mode 100644 modules/invoiceOut/front/descriptor-menu/index.spec.js create mode 100644 modules/invoiceOut/front/descriptor-menu/locale/en.yml create mode 100644 modules/invoiceOut/front/descriptor-menu/locale/es.yml create mode 100644 modules/invoiceOut/front/descriptor-menu/style.scss create mode 100644 modules/invoiceOut/front/descriptor-popover/index.html create mode 100644 modules/invoiceOut/front/descriptor-popover/index.js create mode 100644 modules/invoiceOut/front/descriptor/es.yml create mode 100644 modules/invoiceOut/front/descriptor/index.html create mode 100644 modules/invoiceOut/front/descriptor/index.js create mode 100644 modules/invoiceOut/front/descriptor/index.spec.js create mode 100644 modules/invoiceOut/front/summary/es.yml create mode 100644 modules/invoiceOut/front/summary/index.html create mode 100644 modules/invoiceOut/front/summary/index.js create mode 100644 modules/invoiceOut/front/summary/index.spec.js create mode 100644 modules/invoiceOut/front/summary/style.scss diff --git a/e2e/paths/09-invoice-out/01_summary.spec.js b/e2e/paths/09-invoice-out/01_summary.spec.js deleted file mode 100644 index 09ac66ffc..000000000 --- a/e2e/paths/09-invoice-out/01_summary.spec.js +++ /dev/null @@ -1,44 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceOut summary path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('employee', 'invoiceOut'); - await page.accessToSearchResult('T1111111'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the summary section', async() => { - await page.waitForState('invoiceOut.card.summary'); - }); - - it('should contain the company from which the invoice is emited', async() => { - const result = await page.waitToGetProperty(selectors.invoiceOutSummary.company, 'innerText'); - - expect(result).toEqual('Company VNL'); - }); - - it('should contain the tax breakdown', async() => { - const firstTax = await page.waitToGetProperty(selectors.invoiceOutSummary.taxOne, 'innerText'); - const secondTax = await page.waitToGetProperty(selectors.invoiceOutSummary.taxTwo, 'innerText'); - - expect(firstTax).toContain('10%'); - expect(secondTax).toContain('21%'); - }); - - it('should contain the tickets info', async() => { - const firstTicket = await page.waitToGetProperty(selectors.invoiceOutSummary.ticketOne, 'innerText'); - const secondTicket = await page.waitToGetProperty(selectors.invoiceOutSummary.ticketTwo, 'innerText'); - - expect(firstTicket).toContain('Bat cave'); - expect(secondTicket).toContain('Bat cave'); - }); -}); diff --git a/e2e/paths/09-invoice-out/02_descriptor.spec.js b/e2e/paths/09-invoice-out/02_descriptor.spec.js deleted file mode 100644 index 5169345bc..000000000 --- a/e2e/paths/09-invoice-out/02_descriptor.spec.js +++ /dev/null @@ -1,137 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceOut descriptor path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'ticket'); - }); - - afterAll(async() => { - await browser.close(); - }); - - describe('as Administrative', () => { - it('should search for tickets with an specific invoiceOut', async() => { - await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton); - await page.clearInput(selectors.ticketsIndex.advancedSearchDaysOnward); - await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222'); - await page.waitToClick(selectors.ticketsIndex.advancedSearchButton); - await page.waitForState('ticket.card.summary'); - }); - - it('should navigate to the invoiceOut index', async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.invoiceOutButton); - await page.waitForSelector(selectors.invoiceOutIndex.topbarSearch); - await page.waitForState('invoiceOut.index'); - }); - - it(`should click on the search result to access to the invoiceOut summary`, async() => { - await page.accessToSearchResult('T2222222'); - await page.waitForState('invoiceOut.card.summary'); - }); - - it('should delete the invoiceOut using the descriptor more menu', async() => { - await page.waitToClick(selectors.invoiceOutDescriptor.moreMenu); - await page.waitToClick(selectors.invoiceOutDescriptor.moreMenuDeleteInvoiceOut); - await page.waitToClick(selectors.invoiceOutDescriptor.acceptDeleteButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('InvoiceOut deleted'); - }); - - it('should have been relocated to the invoiceOut index', async() => { - await page.waitForState('invoiceOut.index'); - }); - - it(`should search for the deleted invouceOut to find no results`, async() => { - await page.doSearch('T2222222'); - const nResults = await page.countElement(selectors.invoiceOutIndex.searchResult); - - expect(nResults).toEqual(0); - }); - - it('should navigate to the ticket index', async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.ticketsButton); - await page.waitForState('ticket.index'); - }); - - it('should search now for tickets with an specific invoiceOut to find no results', async() => { - await page.doSearch('T2222222'); - const nResults = await page.countElement(selectors.ticketsIndex.searchResult); - - expect(nResults).toEqual(0); - }); - - it('should now navigate to the invoiceOut index', async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.invoiceOutButton); - await page.waitForState('invoiceOut.index'); - }); - - it(`should search and access to the invoiceOut summary`, async() => { - await page.accessToSearchResult('T1111111'); - await page.waitForState('invoiceOut.card.summary'); - }); - - it(`should check the invoiceOut is booked in the summary data`, async() => { - await page.waitForTextInElement(selectors.invoiceOutSummary.bookedLabel, '/'); - const result = await page.waitToGetProperty(selectors.invoiceOutSummary.bookedLabel, 'innerText'); - - expect(result.length).toBeGreaterThan(1); - }); - - it('should re-book the invoiceOut using the descriptor more menu', async() => { - await page.waitToClick(selectors.invoiceOutDescriptor.moreMenu); - await page.waitToClick(selectors.invoiceOutDescriptor.moreMenuBookInvoiceOut); - await page.waitToClick(selectors.invoiceOutDescriptor.acceptBookingButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('InvoiceOut booked'); - }); - - it(`should check the invoiceOut booked in the summary data`, async() => { - let today = Date.vnNew(); - - let day = today.getDate(); - if (day < 10) day = `0${day}`; - - let month = (today.getMonth() + 1); - if (month < 10) month = `0${month}`; - - let expectedDate = `${day}/${month}/${today.getFullYear()}`; - - await page.waitForContentLoaded(); - const result = await page - .waitToGetProperty(selectors.invoiceOutSummary.bookedLabel, 'innerText'); - - expect(result).toEqual(expectedDate); - }); - }); - - describe('as salesPerson', () => { - it(`should log in as salesPerson then go to the target invoiceOut summary`, async() => { - await page.loginAndModule('salesPerson', 'invoiceOut'); - await page.accessToSearchResult('A1111111'); - }); - - it(`should check the salesPerson role doens't see the book option in the more menu`, async() => { - await page.waitToClick(selectors.invoiceOutDescriptor.moreMenu); - await page.waitForSelector(selectors.invoiceOutDescriptor.moreMenuShowInvoiceOutPdf); - await page.waitForSelector(selectors.invoiceOutDescriptor.moreMenuBookInvoiceOut, {hidden: true}); - }); - - it(`should check the salesPerson role doens't see the delete option in the more menu`, async() => { - await page.waitForSelector(selectors.invoiceOutDescriptor.moreMenuDeleteInvoiceOut, {hidden: true}); - }); - }); -}); diff --git a/e2e/paths/09-invoice-out/03_manualInvoice.spec.js b/e2e/paths/09-invoice-out/03_manualInvoice.spec.js deleted file mode 100644 index a1856f1b1..000000000 --- a/e2e/paths/09-invoice-out/03_manualInvoice.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceOut manual invoice path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceOut'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should create an invoice from a ticket', async() => { - await page.waitToClick(selectors.invoiceOutIndex.createInvoice); - await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm); - - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTicket, '15'); - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceSerial, 'Global nacional'); - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTaxArea, 'national'); - await page.waitToClick(selectors.invoiceOutIndex.saveInvoice); - const message = await page.waitForSnackbar(); - - await page.waitForState('invoiceOut.card.summary'); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should create another invoice from a client`, async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.invoiceOutButton); - await page.waitForSelector(selectors.invoiceOutIndex.topbarSearch); - await page.waitForState('invoiceOut.index'); - - await page.waitToClick(selectors.invoiceOutIndex.createInvoice); - await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm); - - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceClient, 'Petter Parker'); - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceSerial, 'Global nacional'); - await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTaxArea, 'national'); - await page.waitToClick(selectors.invoiceOutIndex.saveInvoice); - const message = await page.waitForSnackbar(); - - await page.waitForState('invoiceOut.card.summary'); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/09-invoice-out/04_globalInvoice.spec.js b/e2e/paths/09-invoice-out/04_globalInvoice.spec.js deleted file mode 100644 index 64cddfa25..000000000 --- a/e2e/paths/09-invoice-out/04_globalInvoice.spec.js +++ /dev/null @@ -1,39 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceOut global invoice path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceOut'); - await page.waitToClick('[icon="search"]'); - await page.waitForTimeout(1000); // index search needs time to return results - }); - - afterAll(async() => { - await browser.close(); - }); - - let invoicesBeforeOneClient; - let now = Date.vnNew(); - - it('should count the amount of invoices listed before globla invoces are made', async() => { - invoicesBeforeOneClient = await page.countElement(selectors.invoiceOutIndex.searchResult); - - expect(invoicesBeforeOneClient).toBeGreaterThanOrEqual(4); - }); - - it('should create a global invoice for charles xavier today', async() => { - await page.accessToSection('invoiceOut.global-invoicing'); - await page.waitToClick(selectors.invoiceOutGlobalInvoicing.oneClient); - await page.autocompleteSearch(selectors.invoiceOutGlobalInvoicing.clientId, 'Charles Xavier'); - await page.pickDate(selectors.invoiceOutGlobalInvoicing.invoiceDate, now); - await page.pickDate(selectors.invoiceOutGlobalInvoicing.maxShipped, now); - await page.autocompleteSearch(selectors.invoiceOutGlobalInvoicing.printer, '1'); - await page.waitToClick(selectors.invoiceOutGlobalInvoicing.makeInvoice); - await page.waitForTimeout(1000); - }); -}); diff --git a/e2e/paths/09-invoice-out/05_negative_bases.spec.js b/e2e/paths/09-invoice-out/05_negative_bases.spec.js deleted file mode 100644 index 43ced2115..000000000 --- a/e2e/paths/09-invoice-out/05_negative_bases.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceOut negative bases path', () => { - let browser; - let page; - const httpRequests = []; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - page.on('request', req => { - if (req.url().includes(`InvoiceOuts/negativeBases`)) - httpRequests.push(req.url()); - }); - await page.loginAndModule('administrative', 'invoiceOut'); - await page.accessToSection('invoiceOut.negative-bases'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should show negative bases in a date range', async() => { - const request = httpRequests.find(req => - req.includes(`from`) && req.includes(`to`)); - - expect(request).toBeDefined(); - }); -}); diff --git a/modules/invoiceOut/front/descriptor-menu/index.html b/modules/invoiceOut/front/descriptor-menu/index.html new file mode 100644 index 000000000..da04c8e72 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/index.html @@ -0,0 +1,252 @@ + + + + + + + + + Transfer invoice to... + + + Show invoice... + + + + as PDF + + + as CSV + + + + + + Send invoice... + + + + Send PDF + + + Send CSV + + + + + + Delete Invoice + + + Book invoice + + + {{!$ctrl.invoiceOut.hasPdf ? 'Generate PDF invoice': 'Regenerate PDF invoice'}} + + + Show CITES letter + + + Refund... + + + + with warehouse + + + without warehouse + + + + + + + + + + + + + + + + + + + + + Are you sure you want to send it? + + + + + + + + + + + + + Are you sure you want to send it? + + + + + + + + + + + + transferInvoice + + +
+ + + + #{{id}} - {{::name}} + + + + + {{ ::description}} + + + + + + + {{::code}} - {{::description}} + + + + + + + + + +
+
+ + + +
diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js new file mode 100644 index 000000000..8ea4507ec --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -0,0 +1,191 @@ +import ngModule from '../module'; +import Section from 'salix/components/section'; +import './style.scss'; + +class Controller extends Section { + constructor($element, $, vnReport, vnEmail) { + super($element, $); + this.vnReport = vnReport; + this.vnEmail = vnEmail; + this.checked = true; + } + + get invoiceOut() { + return this._invoiceOut; + } + + set invoiceOut(value) { + this._invoiceOut = value; + if (value) + this.id = value.id; + } + + get hasInvoicing() { + return this.aclService.hasAny(['invoicing']); + } + + get isChecked() { + return this.checked; + } + + set isChecked(value) { + this.checked = value; + } + + $onInit() { + this.$http.get(`CplusRectificationTypes`, {filter: {order: 'description'}}) + .then(res => { + this.cplusRectificationTypes = res.data; + this.cplusRectificationType = res.data.filter(type => type.description == 'I – Por diferencias')[0].id; + }); + this.$http.get(`SiiTypeInvoiceOuts`, {filter: {where: {code: {like: 'R%'}}}}) + .then(res => { + this.siiTypeInvoiceOuts = res.data; + this.siiTypeInvoiceOut = res.data.filter(type => type.code == 'R4')[0].id; + }); + } + loadData() { + const filter = { + include: [ + { + relation: 'company', + scope: { + fields: ['id', 'code'] + } + }, { + relation: 'client', + scope: { + fields: ['id', 'name', 'email', 'hasToInvoiceByAddress'] + } + } + ] + }; + return this.$http.get(`InvoiceOuts/${this.invoiceOut.id}`, {filter}) + .then(res => this.invoiceOut = res.data); + } + reload() { + return this.loadData().then(() => { + if (this.parentReload) + this.parentReload(); + }); + } + + cardReload() { + // Prevents error when not defined + } + + deleteInvoiceOut() { + return this.$http.post(`InvoiceOuts/${this.invoiceOut.id}/delete`) + .then(() => { + const isInsideInvoiceOut = this.$state.current.name.startsWith('invoiceOut'); + if (isInsideInvoiceOut) + this.$state.go('invoiceOut.index'); + else + this.$state.reload(); + }) + .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut deleted'))); + } + + bookInvoiceOut() { + return this.$http.post(`InvoiceOuts/${this.invoiceOut.ref}/book`) + .then(() => this.$state.reload()) + .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked'))); + } + + createPdfInvoice() { + return this.$http.post(`InvoiceOuts/${this.id}/createPdf`) + .then(() => this.reload()) + .then(() => { + const snackbarMessage = this.$t( + `The invoice PDF document has been regenerated`); + this.vnApp.showSuccess(snackbarMessage); + }); + } + + sendPdfInvoice($data) { + if (!$data.email) + return this.vnApp.showError(this.$t(`The email can't be empty`)); + + return this.vnEmail.send(`InvoiceOuts/${this.invoiceOut.ref}/invoice-email`, { + recipientId: this.invoiceOut.client.id, + recipient: $data.email + }); + } + + showCsvInvoice() { + this.vnReport.show(`InvoiceOuts/${this.invoiceOut.ref}/invoice-csv`, { + recipientId: this.invoiceOut.client.id + }); + } + + sendCsvInvoice($data) { + if (!$data.email) + return this.vnApp.showError(this.$t(`The email can't be empty`)); + + return this.vnEmail.send(`InvoiceOuts/${this.invoiceOut.ref}/invoice-csv-email`, { + recipientId: this.invoiceOut.client.id, + recipient: $data.email + }); + } + + showExportationLetter() { + this.vnReport.show(`InvoiceOuts/${this.invoiceOut.ref}/exportation-pdf`, { + recipientId: this.invoiceOut.client.id, + refFk: this.invoiceOut.ref + }); + } + + refundInvoiceOut(withWarehouse) { + const query = 'InvoiceOuts/refund'; + const params = {ref: this.invoiceOut.ref, withWarehouse: withWarehouse}; + this.$http.post(query, params).then(res => { + const tickets = res.data; + const refundTickets = tickets.map(ticket => ticket.id); + + this.vnApp.showSuccess(this.$t('The following refund tickets have been created', { + ticketId: refundTickets.join(',') + })); + if (refundTickets.length == 1) + this.$state.go('ticket.card.sale', {id: refundTickets[0]}); + }); + } + + transferInvoice() { + const params = { + id: this.invoiceOut.id, + refFk: this.invoiceOut.ref, + newClientFk: this.clientId, + cplusRectificationTypeFk: this.cplusRectificationType, + siiTypeInvoiceOutFk: this.siiTypeInvoiceOut, + invoiceCorrectionTypeFk: this.invoiceCorrectionType, + makeInvoice: this.checked + }; + + this.$http.get(`Clients/${this.clientId}`).then(response => { + const clientData = response.data; + const hasToInvoiceByAddress = clientData.hasToInvoiceByAddress; + + if (this.checked && hasToInvoiceByAddress) { + if (!window.confirm(this.$t('confirmTransferInvoice'))) + return; + } + + this.$http.post(`InvoiceOuts/transferInvoice`, params).then(res => { + const invoiceId = res.data; + this.vnApp.showSuccess(this.$t('Transferred invoice')); + this.$state.go('invoiceOut.card.summary', {id: invoiceId}); + }); + }); + } +} + +Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail']; + +ngModule.vnComponent('vnInvoiceOutDescriptorMenu', { + template: require('./index.html'), + controller: Controller, + bindings: { + invoiceOut: '<', + parentReload: '&' + } +}); diff --git a/modules/invoiceOut/front/descriptor-menu/index.spec.js b/modules/invoiceOut/front/descriptor-menu/index.spec.js new file mode 100644 index 000000000..d2ccfa117 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/index.spec.js @@ -0,0 +1,121 @@ +import './index'; + +describe('vnInvoiceOutDescriptorMenu', () => { + let controller; + let $httpBackend; + let $httpParamSerializer; + const invoiceOut = { + id: 1, + client: {id: 1101}, + ref: 'T1111111' + }; + + beforeEach(ngModule('invoiceOut')); + + beforeEach(inject(($componentController, _$httpParamSerializer_, _$httpBackend_) => { + $httpBackend = _$httpBackend_; + $httpParamSerializer = _$httpParamSerializer_; + controller = $componentController('vnInvoiceOutDescriptorMenu', {$element: null}); + controller.invoiceOut = { + id: 1, + ref: 'T1111111', + client: {id: 1101} + }; + })); + + describe('createPdfInvoice()', () => { + it('should make a query to the createPdf() endpoint and show a success snackbar', () => { + jest.spyOn(controller.vnApp, 'showSuccess'); + + $httpBackend.whenGET(`InvoiceOuts/${invoiceOut.id}`).respond(); + $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/createPdf`).respond(); + controller.createPdfInvoice(); + $httpBackend.flush(); + + expect(controller.vnApp.showSuccess).toHaveBeenCalled(); + }); + }); + + describe('showCsvInvoice()', () => { + it('should make a query to the csv invoice download endpoint and show a message snackbar', () => { + jest.spyOn(window, 'open').mockReturnThis(); + + const expectedParams = { + recipientId: invoiceOut.client.id + }; + const serializedParams = $httpParamSerializer(expectedParams); + const expectedPath = `api/InvoiceOuts/${invoiceOut.ref}/invoice-csv?${serializedParams}`; + controller.showCsvInvoice(); + + expect(window.open).toHaveBeenCalledWith(expectedPath); + }); + }); + + describe('deleteInvoiceOut()', () => { + it(`should make a query and call showSuccess()`, () => { + controller.$state.reload = jest.fn(); + jest.spyOn(controller.vnApp, 'showSuccess'); + + $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/delete`).respond(); + controller.deleteInvoiceOut(); + $httpBackend.flush(); + + expect(controller.$state.reload).toHaveBeenCalled(); + expect(controller.vnApp.showSuccess).toHaveBeenCalled(); + }); + + it(`should make a query and call showSuccess() after state.go if the state wasn't in invoiceOut module`, () => { + jest.spyOn(controller.$state, 'go').mockReturnValue('ok'); + jest.spyOn(controller.vnApp, 'showSuccess'); + controller.$state.current.name = 'invoiceOut.card.something'; + + $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.id}/delete`).respond(); + controller.deleteInvoiceOut(); + $httpBackend.flush(); + + expect(controller.$state.go).toHaveBeenCalledWith('invoiceOut.index'); + expect(controller.vnApp.showSuccess).toHaveBeenCalled(); + }); + }); + + describe('sendPdfInvoice()', () => { + it('should make a query to the email invoice endpoint and show a message snackbar', () => { + jest.spyOn(controller.vnApp, 'showMessage'); + + const $data = {email: 'brucebanner@gothamcity.com'}; + + $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.ref}/invoice-email`).respond(); + controller.sendPdfInvoice($data); + $httpBackend.flush(); + + expect(controller.vnApp.showMessage).toHaveBeenCalled(); + }); + }); + + describe('sendCsvInvoice()', () => { + it('should make a query to the csv invoice send endpoint and show a message snackbar', () => { + jest.spyOn(controller.vnApp, 'showMessage'); + + const $data = {email: 'brucebanner@gothamcity.com'}; + + $httpBackend.expectPOST(`InvoiceOuts/${invoiceOut.ref}/invoice-csv-email`).respond(); + controller.sendCsvInvoice($data); + $httpBackend.flush(); + + expect(controller.vnApp.showMessage).toHaveBeenCalled(); + }); + }); + + describe('refundInvoiceOut()', () => { + it('should make a query and show a success message', () => { + jest.spyOn(controller.vnApp, 'showSuccess'); + const params = {ref: controller.invoiceOut.ref}; + + $httpBackend.expectPOST(`InvoiceOuts/refund`, params).respond([{id: 1}, {id: 2}]); + controller.refundInvoiceOut(); + $httpBackend.flush(); + + expect(controller.vnApp.showSuccess).toHaveBeenCalled(); + }); + }); +}); diff --git a/modules/invoiceOut/front/descriptor-menu/locale/en.yml b/modules/invoiceOut/front/descriptor-menu/locale/en.yml new file mode 100644 index 000000000..32ea03442 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/locale/en.yml @@ -0,0 +1,7 @@ +The following refund tickets have been created: "The following refund tickets have been created: {{ticketIds}}" +Transfer invoice to...: Transfer invoice to... +Cplus Type: Cplus Type +transferInvoice: Transfer Invoice +destinationClient: Bill destination client +transferInvoiceInfo: New tickets from the destination customer will be generated in the default consignee. +confirmTransferInvoice: Destination customer has marked to bill by consignee, do you want to continue? \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-menu/locale/es.yml b/modules/invoiceOut/front/descriptor-menu/locale/es.yml new file mode 100644 index 000000000..92c109878 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/locale/es.yml @@ -0,0 +1,30 @@ +Show invoice...: Ver factura... +Send invoice...: Enviar factura... +Send PDF invoice: Enviar factura en PDF +Send CSV invoice: Enviar factura en CSV +as PDF: como PDF +as CSV: como CSV +Delete Invoice: Eliminar factura +Clone Invoice: Clonar factura +Book invoice: Asentar factura +Generate PDF invoice: Generar PDF factura +Show CITES letter: Ver carta CITES +InvoiceOut deleted: Factura eliminada +Are you sure you want to delete this invoice?: Estas seguro de eliminar esta factura? +Are you sure you want to clone this invoice?: Estas seguro de clonar esta factura? +InvoiceOut booked: Factura asentada +Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura? +Are you sure you want to refund this invoice?: Estas seguro de querer abonar esta factura? +Create a refund ticket for each ticket on the current invoice: Crear un ticket abono por cada ticket de la factura actual +Regenerate PDF invoice: Regenerar PDF factura +The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado +The email can't be empty: El correo no puede estar vacío +The following refund tickets have been created: "Se han creado los siguientes tickets de abono: {{ticketIds}}" +Refund...: Abono... +Transfer invoice to...: Transferir factura a... +Rectificative type: Tipo rectificativa +Transferred invoice: Factura transferida +transferInvoice: Transferir factura +destinationClient: Facturar cliente destino +transferInvoiceInfo: Los nuevos tickets del cliente destino serán generados en el consignatario por defecto. +confirmTransferInvoice: El cliente destino tiene marcado facturar por consignatario, ¿desea continuar? \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-menu/style.scss b/modules/invoiceOut/front/descriptor-menu/style.scss new file mode 100644 index 000000000..9e4cf4297 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-menu/style.scss @@ -0,0 +1,30 @@ +@import "./effects"; +@import "variables"; + +vn-invoice-out-descriptor-menu { + & > vn-icon-button[icon="more_vert"] { + display: flex; + min-width: 45px; + height: 45px; + box-sizing: border-box; + align-items: center; + justify-content: center; + } + & > vn-icon-button[icon="more_vert"] { + @extend %clickable; + color: inherit; + + & > vn-icon { + padding: 10px; + } + vn-icon { + font-size: 1.75rem; + } + } + +} +@media screen and (min-width: 1000px) { + .transferInvoice { + min-width: $width-md; + } +} diff --git a/modules/invoiceOut/front/descriptor-popover/index.html b/modules/invoiceOut/front/descriptor-popover/index.html new file mode 100644 index 000000000..2bd912133 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-popover/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor-popover/index.js b/modules/invoiceOut/front/descriptor-popover/index.js new file mode 100644 index 000000000..fc9899da0 --- /dev/null +++ b/modules/invoiceOut/front/descriptor-popover/index.js @@ -0,0 +1,9 @@ +import ngModule from '../module'; +import DescriptorPopover from 'salix/components/descriptor-popover'; + +class Controller extends DescriptorPopover {} + +ngModule.vnComponent('vnInvoiceOutDescriptorPopover', { + slotTemplate: require('./index.html'), + controller: Controller +}); diff --git a/modules/invoiceOut/front/descriptor/es.yml b/modules/invoiceOut/front/descriptor/es.yml new file mode 100644 index 000000000..0e88a7dc7 --- /dev/null +++ b/modules/invoiceOut/front/descriptor/es.yml @@ -0,0 +1,2 @@ +Client card: Ficha del cliente +Invoice ticket list: Listado de tickets de la factura \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html new file mode 100644 index 000000000..e1dc579ab --- /dev/null +++ b/modules/invoiceOut/front/descriptor/index.html @@ -0,0 +1,59 @@ + + + + + +
+ + + + + + + {{$ctrl.invoiceOut.client.name}} + + + + +
+ +
+
+ + + + + diff --git a/modules/invoiceOut/front/descriptor/index.js b/modules/invoiceOut/front/descriptor/index.js new file mode 100644 index 000000000..7eeb85ea6 --- /dev/null +++ b/modules/invoiceOut/front/descriptor/index.js @@ -0,0 +1,52 @@ +import ngModule from '../module'; +import Descriptor from 'salix/components/descriptor'; + +class Controller extends Descriptor { + get invoiceOut() { + return this.entity; + } + + set invoiceOut(value) { + this.entity = value; + } + + get hasInvoicing() { + return this.aclService.hasAny(['invoicing']); + } + + get filter() { + if (this.invoiceOut) + return JSON.stringify({refFk: this.invoiceOut.ref}); + + return null; + } + + loadData() { + const filter = { + include: [ + { + relation: 'company', + scope: { + fields: ['id', 'code'] + } + }, { + relation: 'client', + scope: { + fields: ['id', 'name', 'email'] + } + } + ] + }; + + return this.getData(`InvoiceOuts/${this.id}`, {filter}) + .then(res => this.entity = res.data); + } +} + +ngModule.vnComponent('vnInvoiceOutDescriptor', { + template: require('./index.html'), + controller: Controller, + bindings: { + invoiceOut: '<', + } +}); diff --git a/modules/invoiceOut/front/descriptor/index.spec.js b/modules/invoiceOut/front/descriptor/index.spec.js new file mode 100644 index 000000000..987763b0a --- /dev/null +++ b/modules/invoiceOut/front/descriptor/index.spec.js @@ -0,0 +1,26 @@ +import './index'; + +describe('vnInvoiceOutDescriptor', () => { + let controller; + let $httpBackend; + + beforeEach(ngModule('invoiceOut')); + + beforeEach(inject(($componentController, _$httpBackend_) => { + $httpBackend = _$httpBackend_; + controller = $componentController('vnInvoiceOutDescriptor', {$element: null}); + })); + + describe('loadData()', () => { + it(`should perform a get query to store the invoice in data into the controller`, () => { + const id = 1; + const response = {id: 1}; + + $httpBackend.expectGET(`InvoiceOuts/${id}`).respond(response); + controller.id = id; + $httpBackend.flush(); + + expect(controller.invoiceOut).toEqual(response); + }); + }); +}); diff --git a/modules/invoiceOut/front/index.js b/modules/invoiceOut/front/index.js index a7209a0bd..a5e51d439 100644 --- a/modules/invoiceOut/front/index.js +++ b/modules/invoiceOut/front/index.js @@ -1,3 +1,7 @@ export * from './module'; import './main'; +import './summary'; +import './descriptor'; +import './descriptor-popover'; +import './descriptor-menu'; diff --git a/modules/invoiceOut/front/routes.json b/modules/invoiceOut/front/routes.json index 26dd2da03..7c7495cb9 100644 --- a/modules/invoiceOut/front/routes.json +++ b/modules/invoiceOut/front/routes.json @@ -25,6 +25,15 @@ "state": "invoiceOut.index", "component": "vn-invoice-out-index", "description": "InvoiceOut" + }, + { + "url": "/summary", + "state": "invoiceOut.card.summary", + "component": "vn-invoice-out-summary", + "description": "Summary", + "params": { + "invoice-out": "$ctrl.invoiceOut" + } } ] } diff --git a/modules/invoiceOut/front/summary/es.yml b/modules/invoiceOut/front/summary/es.yml new file mode 100644 index 000000000..caff7ce99 --- /dev/null +++ b/modules/invoiceOut/front/summary/es.yml @@ -0,0 +1,13 @@ +Date: Fecha +Created: Creada +Due: Vencimiento +Booked: Asentado +General VAT: IVA general +Reduced VAT: IVA reducido +Shipped: F. envío +Type: Tipo +Rate: Tasa +Fee: Cuota +Taxable base: Base imp. +Tax breakdown: Desglose impositivo +Go to the Invoice Out: Ir a la factura emitida \ No newline at end of file diff --git a/modules/invoiceOut/front/summary/index.html b/modules/invoiceOut/front/summary/index.html new file mode 100644 index 000000000..b83775158 --- /dev/null +++ b/modules/invoiceOut/front/summary/index.html @@ -0,0 +1,104 @@ + + + +
+ + + + {{$ctrl.summary.invoiceOut.ref}} - {{$ctrl.summary.invoiceOut.client.socialName}} + +
+ + + + + + + + + + + + + + +

Tax breakdown

+ + + + Type + Taxable base + Rate + Fee + + + + + {{tax.name}} + {{tax.taxableBase | currency: 'EUR': 2}} + {{tax.rate}}% + {{tax.vat | currency: 'EUR': 2}} + + + +
+ +

Ticket

+ + + + Ticket id + Alias + Shipped + Amount + + + + + + + {{ticket.id}} + + + + + {{ticket.nickname}} + + + {{ticket.shipped | date: 'dd/MM/yyyy' | dashIfEmpty}} + {{ticket.totalWithVat | currency: 'EUR': 2}} + + + + + +
+
+
+ + + + \ No newline at end of file diff --git a/modules/invoiceOut/front/summary/index.js b/modules/invoiceOut/front/summary/index.js new file mode 100644 index 000000000..131f9ba8f --- /dev/null +++ b/modules/invoiceOut/front/summary/index.js @@ -0,0 +1,34 @@ +import ngModule from '../module'; +import Summary from 'salix/components/summary'; +import './style.scss'; + +class Controller extends Summary { + get invoiceOut() { + return this._invoiceOut; + } + + set invoiceOut(value) { + this._invoiceOut = value; + if (value && value.id) { + this.loadData(); + this.loadTickets(); + } + } + + loadData() { + this.$http.get(`InvoiceOuts/${this.invoiceOut.id}/summary`) + .then(res => this.summary = res.data); + } + + loadTickets() { + this.$.$applyAsync(() => this.$.ticketsModel.refresh()); + } +} + +ngModule.vnComponent('vnInvoiceOutSummary', { + template: require('./index.html'), + controller: Controller, + bindings: { + invoiceOut: '<' + } +}); diff --git a/modules/invoiceOut/front/summary/index.spec.js b/modules/invoiceOut/front/summary/index.spec.js new file mode 100644 index 000000000..44e3094ae --- /dev/null +++ b/modules/invoiceOut/front/summary/index.spec.js @@ -0,0 +1,31 @@ +import './index.js'; +import crudModel from 'core/mocks/crud-model'; + +describe('InvoiceOut', () => { + describe('Component summary', () => { + let controller; + let $httpBackend; + let $scope; + + beforeEach(ngModule('invoiceOut')); + + beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => { + $httpBackend = _$httpBackend_; + $scope = $rootScope.$new(); + const $element = angular.element(''); + controller = $componentController('vnInvoiceOutSummary', {$element, $scope}); + controller._invoiceOut = {id: 1}; + controller.$.ticketsModel = crudModel; + })); + + describe('loadData()', () => { + it('should perform a query to set summary', () => { + $httpBackend.expect('GET', `InvoiceOuts/1/summary`).respond(200, 'the data you are looking for'); + controller.loadData(); + $httpBackend.flush(); + + expect(controller.summary).toEqual('the data you are looking for'); + }); + }); + }); +}); diff --git a/modules/invoiceOut/front/summary/style.scss b/modules/invoiceOut/front/summary/style.scss new file mode 100644 index 000000000..e6e31fd94 --- /dev/null +++ b/modules/invoiceOut/front/summary/style.scss @@ -0,0 +1,6 @@ +@import "variables"; + + +vn-invoice-out-summary .summary { + max-width: $width-lg; +} \ No newline at end of file From ed283cac4648e9ba9b9e6fa4fbf2813055d60c33 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 1 Aug 2024 13:15:11 +0200 Subject: [PATCH 038/250] feat: deleted worker module code & redirect to Lilium --- .../01-department/01_summary.spec.js | 29 - .../01-department/02-basicData.spec.js | 43 -- e2e/paths/03-worker/01_summary.spec.js | 34 -- e2e/paths/03-worker/02_basicData.spec.js | 40 -- e2e/paths/03-worker/03_pbx.spec.js | 32 -- e2e/paths/03-worker/04_time_control.spec.js | 65 --- e2e/paths/03-worker/05_calendar.spec.js | 114 ---- e2e/paths/03-worker/06_create.spec.js | 73 --- e2e/paths/03-worker/08_add_notes.spec.js | 42 -- modules/worker/front/basic-data/index.html | 93 ---- modules/worker/front/basic-data/index.js | 27 - modules/worker/front/basic-data/locale/es.yml | 9 - modules/worker/front/calendar/index.html | 114 ---- modules/worker/front/calendar/index.js | 302 ----------- modules/worker/front/calendar/index.spec.js | 346 ------------ modules/worker/front/calendar/locale/es.yml | 15 - modules/worker/front/calendar/style.scss | 65 --- modules/worker/front/create/index.html | 198 ------- modules/worker/front/create/index.js | 141 ----- modules/worker/front/create/index.spec.js | 133 ----- modules/worker/front/create/locale/es.yml | 13 - modules/worker/front/dms/create/index.html | 94 ---- modules/worker/front/dms/create/index.js | 113 ---- modules/worker/front/dms/create/index.spec.js | 77 --- modules/worker/front/dms/create/style.scss | 7 - modules/worker/front/dms/edit/index.html | 87 --- modules/worker/front/dms/edit/index.js | 94 ---- modules/worker/front/dms/edit/index.spec.js | 82 --- modules/worker/front/dms/edit/style.scss | 7 - modules/worker/front/dms/index/index.html | 106 ---- modules/worker/front/dms/index/index.js | 75 --- modules/worker/front/dms/index/index.spec.js | 37 -- modules/worker/front/dms/index/locale/es.yml | 9 - modules/worker/front/dms/index/style.scss | 6 - modules/worker/front/dms/locale/en.yml | 2 - modules/worker/front/dms/locale/es.yml | 20 - modules/worker/front/index.js | 15 - modules/worker/front/index/index.html | 57 -- modules/worker/front/index/index.js | 31 -- modules/worker/front/index/locale/es.yml | 1 - modules/worker/front/log/index.html | 1 - modules/worker/front/log/index.js | 7 - modules/worker/front/main/index.html | 18 - modules/worker/front/main/index.js | 10 +- modules/worker/front/note/create/index.html | 30 -- modules/worker/front/note/create/index.js | 21 - .../worker/front/note/create/index.spec.js | 22 - .../worker/front/note/create/locale/es.yml | 2 - modules/worker/front/note/index/index.html | 32 -- modules/worker/front/note/index/index.js | 22 - modules/worker/front/note/index/style.scss | 5 - modules/worker/front/notifications/index.html | 2 - modules/worker/front/notifications/index.js | 21 - modules/worker/front/pbx/index.html | 28 - modules/worker/front/pbx/index.js | 25 - modules/worker/front/pda/index.js | 18 - modules/worker/front/routes.json | 164 +----- modules/worker/front/search-panel/index.html | 67 --- modules/worker/front/search-panel/index.js | 7 - modules/worker/front/time-control/index.html | 219 -------- modules/worker/front/time-control/index.js | 507 ------------------ .../worker/front/time-control/index.spec.js | 286 ---------- .../worker/front/time-control/locale/es.yml | 22 - modules/worker/front/time-control/style.scss | 52 -- 64 files changed, 17 insertions(+), 4419 deletions(-) delete mode 100644 e2e/paths/03-worker/01-department/01_summary.spec.js delete mode 100644 e2e/paths/03-worker/01-department/02-basicData.spec.js delete mode 100644 e2e/paths/03-worker/01_summary.spec.js delete mode 100644 e2e/paths/03-worker/02_basicData.spec.js delete mode 100644 e2e/paths/03-worker/03_pbx.spec.js delete mode 100644 e2e/paths/03-worker/04_time_control.spec.js delete mode 100644 e2e/paths/03-worker/05_calendar.spec.js delete mode 100644 e2e/paths/03-worker/06_create.spec.js delete mode 100644 e2e/paths/03-worker/08_add_notes.spec.js delete mode 100644 modules/worker/front/basic-data/index.html delete mode 100644 modules/worker/front/basic-data/index.js delete mode 100644 modules/worker/front/basic-data/locale/es.yml delete mode 100644 modules/worker/front/calendar/index.html delete mode 100644 modules/worker/front/calendar/index.js delete mode 100644 modules/worker/front/calendar/index.spec.js delete mode 100644 modules/worker/front/calendar/locale/es.yml delete mode 100644 modules/worker/front/calendar/style.scss delete mode 100644 modules/worker/front/create/index.html delete mode 100644 modules/worker/front/create/index.js delete mode 100644 modules/worker/front/create/index.spec.js delete mode 100644 modules/worker/front/create/locale/es.yml delete mode 100644 modules/worker/front/dms/create/index.html delete mode 100644 modules/worker/front/dms/create/index.js delete mode 100644 modules/worker/front/dms/create/index.spec.js delete mode 100644 modules/worker/front/dms/create/style.scss delete mode 100644 modules/worker/front/dms/edit/index.html delete mode 100644 modules/worker/front/dms/edit/index.js delete mode 100644 modules/worker/front/dms/edit/index.spec.js delete mode 100644 modules/worker/front/dms/edit/style.scss delete mode 100644 modules/worker/front/dms/index/index.html delete mode 100644 modules/worker/front/dms/index/index.js delete mode 100644 modules/worker/front/dms/index/index.spec.js delete mode 100644 modules/worker/front/dms/index/locale/es.yml delete mode 100644 modules/worker/front/dms/index/style.scss delete mode 100644 modules/worker/front/dms/locale/en.yml delete mode 100644 modules/worker/front/dms/locale/es.yml delete mode 100644 modules/worker/front/index/index.html delete mode 100644 modules/worker/front/index/index.js delete mode 100644 modules/worker/front/index/locale/es.yml delete mode 100644 modules/worker/front/log/index.html delete mode 100644 modules/worker/front/log/index.js delete mode 100644 modules/worker/front/note/create/index.html delete mode 100644 modules/worker/front/note/create/index.js delete mode 100644 modules/worker/front/note/create/index.spec.js delete mode 100644 modules/worker/front/note/create/locale/es.yml delete mode 100644 modules/worker/front/note/index/index.html delete mode 100644 modules/worker/front/note/index/index.js delete mode 100644 modules/worker/front/note/index/style.scss delete mode 100644 modules/worker/front/notifications/index.html delete mode 100644 modules/worker/front/notifications/index.js delete mode 100644 modules/worker/front/pbx/index.html delete mode 100644 modules/worker/front/pbx/index.js delete mode 100644 modules/worker/front/pda/index.js delete mode 100644 modules/worker/front/search-panel/index.html delete mode 100644 modules/worker/front/search-panel/index.js delete mode 100644 modules/worker/front/time-control/index.html delete mode 100644 modules/worker/front/time-control/index.js delete mode 100644 modules/worker/front/time-control/index.spec.js delete mode 100644 modules/worker/front/time-control/locale/es.yml delete mode 100644 modules/worker/front/time-control/style.scss diff --git a/e2e/paths/03-worker/01-department/01_summary.spec.js b/e2e/paths/03-worker/01-department/01_summary.spec.js deleted file mode 100644 index e4bf8fc2d..000000000 --- a/e2e/paths/03-worker/01-department/01_summary.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import selectors from '../../../helpers/selectors.js'; -import getBrowser from '../../../helpers/puppeteer'; - -describe('department summary path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - await page.accessToSection('worker.department'); - await page.doSearch('INFORMATICA'); - await page.click(selectors.department.firstDepartment); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the employee summary section and check all properties', async() => { - expect(await page.waitToGetProperty(selectors.departmentSummary.header, 'innerText')).toEqual('INFORMATICA'); - expect(await page.getProperty(selectors.departmentSummary.name, 'innerText')).toEqual('INFORMATICA'); - expect(await page.getProperty(selectors.departmentSummary.code, 'innerText')).toEqual('it'); - expect(await page.getProperty(selectors.departmentSummary.chat, 'innerText')).toEqual('informatica-cau'); - expect(await page.getProperty(selectors.departmentSummary.bossDepartment, 'innerText')).toEqual(''); - expect(await page.getProperty(selectors.departmentSummary.email, 'innerText')).toEqual('-'); - expect(await page.getProperty(selectors.departmentSummary.clientFk, 'innerText')).toEqual('-'); - }); -}); diff --git a/e2e/paths/03-worker/01-department/02-basicData.spec.js b/e2e/paths/03-worker/01-department/02-basicData.spec.js deleted file mode 100644 index 219d1426c..000000000 --- a/e2e/paths/03-worker/01-department/02-basicData.spec.js +++ /dev/null @@ -1,43 +0,0 @@ -import getBrowser from '../../../helpers/puppeteer'; -import selectors from '../../../helpers/selectors.js'; - -const $ = { - form: 'vn-worker-department-basic-data form', -}; - -describe('department summary path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - await page.accessToSection('worker.department'); - await page.doSearch('INFORMATICA'); - await page.click(selectors.department.firstDepartment); - }); - - beforeEach(async() => { - await page.accessToSection('worker.department.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should edit the department basic data and confirm the department data was edited`, async() => { - const values = { - Name: 'Informatica', - Code: 'IT', - Chat: 'informatica-cau', - Email: 'it@verdnatura.es', - }; - - await page.fillForm($.form, values); - const formValues = await page.fetchForm($.form, Object.keys(values)); - const message = await page.sendForm($.form, values); - - expect(message.isSuccess).toBeTrue(); - expect(formValues).toEqual(values); - }); -}); diff --git a/e2e/paths/03-worker/01_summary.spec.js b/e2e/paths/03-worker/01_summary.spec.js deleted file mode 100644 index 51992b41d..000000000 --- a/e2e/paths/03-worker/01_summary.spec.js +++ /dev/null @@ -1,34 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker summary path', () => { - const workerId = 3; - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('employee', 'worker'); - const httpDataResponse = page.waitForResponse(response => { - return response.status() === 200 && response.url().includes(`Workers/${workerId}`); - }); - await page.accessToSearchResult('agencyNick'); - await httpDataResponse; - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the employee summary section and check all properties', async() => { - expect(await page.getProperty(selectors.workerSummary.header, 'innerText')).toEqual('agency agency'); - expect(await page.getProperty(selectors.workerSummary.id, 'innerText')).toEqual('3'); - expect(await page.getProperty(selectors.workerSummary.email, 'innerText')).toEqual('agency@verdnatura.es'); - expect(await page.getProperty(selectors.workerSummary.department, 'innerText')).toEqual('CAMARA'); - expect(await page.getProperty(selectors.workerSummary.userId, 'innerText')).toEqual('3'); - expect(await page.getProperty(selectors.workerSummary.userName, 'innerText')).toEqual('agency'); - expect(await page.getProperty(selectors.workerSummary.role, 'innerText')).toEqual('agency'); - expect(await page.getProperty(selectors.workerSummary.extension, 'innerText')).toEqual('1101'); - expect(await page.getProperty(selectors.workerSummary.locker, 'innerText')).toEqual('-'); - }); -}); diff --git a/e2e/paths/03-worker/02_basicData.spec.js b/e2e/paths/03-worker/02_basicData.spec.js deleted file mode 100644 index 66a597dd1..000000000 --- a/e2e/paths/03-worker/02_basicData.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker basic data path', () => { - const workerId = 1106; - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - const httpDataResponse = page.waitForResponse(response => { - return response.status() === 200 && response.url().includes(`Workers/${workerId}`); - }); - await page.accessToSearchResult('David Charles Haller'); - await httpDataResponse; - await page.accessToSection('worker.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should edit the form and then reload the section and check the data was edited', async() => { - await page.overwrite(selectors.workerBasicData.name, 'David C.'); - await page.overwrite(selectors.workerBasicData.surname, 'H.'); - await page.overwrite(selectors.workerBasicData.phone, '444332211'); - await page.click(selectors.workerBasicData.saveButton); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - - await page.reloadSection('worker.card.basicData'); - - expect(await page.waitToGetProperty(selectors.workerBasicData.name, 'value')).toEqual('David C.'); - expect(await page.waitToGetProperty(selectors.workerBasicData.surname, 'value')).toEqual('H.'); - expect(await page.waitToGetProperty(selectors.workerBasicData.phone, 'value')).toEqual('444332211'); - }); -}); diff --git a/e2e/paths/03-worker/03_pbx.spec.js b/e2e/paths/03-worker/03_pbx.spec.js deleted file mode 100644 index 0e8003c47..000000000 --- a/e2e/paths/03-worker/03_pbx.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker pbx path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - await page.accessToSearchResult('employee'); - await page.accessToSection('worker.card.pbx'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should receive an error when the extension exceeds 4 characters and then sucessfully save the changes', async() => { - await page.write(selectors.workerPbx.extension, '55555'); - await page.click(selectors.workerPbx.saveButton); - let message = await page.waitForSnackbar(); - - expect(message.text).toContain('Extension format is invalid'); - - await page.overwrite(selectors.workerPbx.extension, '4444'); - await page.click(selectors.workerPbx.saveButton); - message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved! User must access web'); - }); -}); diff --git a/e2e/paths/03-worker/04_time_control.spec.js b/e2e/paths/03-worker/04_time_control.spec.js deleted file mode 100644 index c6589d2e3..000000000 --- a/e2e/paths/03-worker/04_time_control.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint max-len: ["error", { "code": 150 }]*/ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker time control path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('salesBoss', 'worker'); - await page.accessToSearchResult('HankPym'); - await page.accessToSection('worker.card.timeControl'); - }); - - afterAll(async() => { - await browser.close(); - }); - - const eightAm = '08:00'; - const fourPm = '16:00'; - const hankPymId = 1107; - - it('should go to the next month, go to current month and go 1 month in the past', async() => { - let date = Date.vnNew(); - date.setDate(1); - date.setMonth(date.getMonth() + 1); - let month = date.toLocaleString('default', {month: 'long'}); - - await page.waitToClick(selectors.workerTimeControl.nextMonthButton); - let result = await page.getProperty(selectors.workerTimeControl.monthName, 'innerText'); - - expect(result).toContain(month); - - date = Date.vnNew(); - date.setDate(1); - month = date.toLocaleString('default', {month: 'long'}); - - await page.waitToClick(selectors.workerTimeControl.previousMonthButton); - result = await page.getProperty(selectors.workerTimeControl.monthName, 'innerText'); - - expect(result).toContain(month); - - date = Date.vnNew(); - date.setDate(1); - date.setMonth(date.getMonth() - 1); - const timestamp = Math.round(date.getTime() / 1000); - month = date.toLocaleString('default', {month: 'long'}); - - await page.loginAndModule('salesBoss', 'worker'); - await page.goto(`http://localhost:5000/#!/worker/${hankPymId}/time-control?timestamp=${timestamp}`); - await page.waitToClick(selectors.workerTimeControl.secondWeekDay); - - result = await page.getProperty(selectors.workerTimeControl.monthName, 'innerText'); - - expect(result).toContain(month); - }); - - it('should change week of month', async() => { - await page.click(selectors.workerTimeControl.thrirdWeekDay); - const result = await page.getProperty(selectors.workerTimeControl.mondayWorkedHours, 'innerText'); - - expect(result).toEqual('00:00 h.'); - }); -}); diff --git a/e2e/paths/03-worker/05_calendar.spec.js b/e2e/paths/03-worker/05_calendar.spec.js deleted file mode 100644 index f0af0a053..000000000 --- a/e2e/paths/03-worker/05_calendar.spec.js +++ /dev/null @@ -1,114 +0,0 @@ -/* eslint-disable max-len */ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker calendar path', () => { - const reasonableTimeBetweenClicks = 300; - const date = Date.vnNew(); - const lastYear = (date.getFullYear() - 1).toString(); - - let browser; - let page; - - async function accessAs(user) { - await page.loginAndModule(user, 'worker'); - await page.accessToSearchResult('Charles Xavier'); - await page.accessToSection('worker.card.calendar'); - } - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - accessAs('hr'); - }); - - afterAll(async() => { - await browser.close(); - }); - - describe('as hr', () => { - it('should set two days as holidays on the calendar and check the total holidays increased by 1.5', async() => { - await page.waitToClick(selectors.workerCalendar.holidays); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.penultimateMondayOfJanuary); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.absence); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.lastMondayOfMarch); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.halfHoliday); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.fistMondayOfMay); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.furlough); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.secondTuesdayOfMay); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.secondWednesdayOfMay); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.secondThursdayOfMay); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.halfFurlough); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.click(selectors.workerCalendar.secondFridayOfJun); - - expect(await page.getProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText')).toContain(' 1.5 '); - }); - }); - - describe(`as salesBoss`, () => { - it(`should log in, get to Charles Xavier's calendar, undo what was done here, and check the total holidays used are back to what it was`, async() => { - accessAs('salesBoss'); - - await page.waitToClick(selectors.workerCalendar.holidays); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.penultimateMondayOfJanuary); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.absence); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.lastMondayOfMarch); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.halfHoliday); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.fistMondayOfMay); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.furlough); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.secondTuesdayOfMay); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.secondWednesdayOfMay); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.secondThursdayOfMay); - - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.halfFurlough); - await page.waitForTimeout(reasonableTimeBetweenClicks); - await page.waitToClick(selectors.workerCalendar.secondFridayOfJun); - - expect(await page.getProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText')).toContain(' 0 '); - }); - }); - - describe(`as Charles Xavier`, () => { - it('should log in and get to his calendar, make a futile attempt to add holidays, check the total holidays used are now the initial ones and use the year selector to go to the previous year', async() => { - accessAs('CharlesXavier'); - await page.waitToClick(selectors.workerCalendar.holidays); - await page.waitForTimeout(reasonableTimeBetweenClicks); - - await page.click(selectors.workerCalendar.penultimateMondayOfJanuary); - - expect(await page.getProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText')).toContain(' 0 '); - - await page.autocompleteSearch(selectors.workerCalendar.year, lastYear); - - expect(await page.getProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText')).toContain(' 0 '); - }); - }); -}); diff --git a/e2e/paths/03-worker/06_create.spec.js b/e2e/paths/03-worker/06_create.spec.js deleted file mode 100644 index 2accdfc31..000000000 --- a/e2e/paths/03-worker/06_create.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker create path', () => { - let browser; - let page; - let newWorker; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - await page.waitToClick(selectors.workerCreate.newWorkerButton); - await page.waitForState('worker.create'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should insert default data', async() => { - await page.write(selectors.workerCreate.firstname, 'Victor'); - await page.write(selectors.workerCreate.lastname, 'Von Doom'); - await page.write(selectors.workerCreate.fi, '78457139E'); - await page.write(selectors.workerCreate.phone, '12356789'); - await page.write(selectors.workerCreate.postcode, '46680'); - await page.write(selectors.workerCreate.street, 'S/ DOOMSTADT'); - await page.write(selectors.workerCreate.email, 'doctorDoom@marvel.com'); - await page.write(selectors.workerCreate.iban, 'ES9121000418450200051332'); - - // should check for autocompleted worker code and worker user name - const workerCode = await page - .waitToGetProperty(selectors.workerCreate.code, 'value'); - - newWorker = await page - .waitToGetProperty(selectors.workerCreate.user, 'value'); - - expect(workerCode).toEqual('VVD'); - expect(newWorker).toContain('victorvd'); - - // should fail if necessary data is void - await page.waitToClick(selectors.workerCreate.createButton); - let message = await page.waitForSnackbar(); - - expect(message.text).toContain('is a required argument'); - - // should create a new worker and go to worker basic data' - await page.pickDate(selectors.workerCreate.birth, new Date(1962, 8, 5)); - await page.autocompleteSearch(selectors.workerCreate.boss, 'deliveryAssistant'); - await page.waitToClick(selectors.workerCreate.createButton); - message = await page.waitForSnackbar(); - await page.waitForState('worker.card.basicData'); - - expect(message.text).toContain('Data saved!'); - - // 'rollback' - await page.loginAndModule('itManagement', 'account'); - await page.accessToSearchResult(newWorker); - - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.deactivateUser); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - message = await page.waitForSnackbar(); - - expect(message.text).toContain('User deactivated!'); - - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.disableAccount); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - message = await page.waitForSnackbar(); - - expect(message.text).toContain('Account disabled!'); - }); -}); diff --git a/e2e/paths/03-worker/08_add_notes.spec.js b/e2e/paths/03-worker/08_add_notes.spec.js deleted file mode 100644 index bdc475c90..000000000 --- a/e2e/paths/03-worker/08_add_notes.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import selectors from '../../helpers/selectors'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Worker Add notes path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('hr', 'worker'); - await page.accessToSearchResult('Bruce Banner'); - await page.accessToSection('worker.card.note.index'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should reach the notes index`, async() => { - await page.waitForState('worker.card.note.index'); - }); - - it(`should click on the add note button`, async() => { - await page.waitToClick(selectors.workerNotes.addNoteFloatButton); - await page.waitForState('worker.card.note.create'); - }); - - it(`should create a note`, async() => { - await page.waitForSelector(selectors.workerNotes.note); - await page.type(`${selectors.workerNotes.note} textarea`, 'Meeting with Black Widow 21st 9am'); - await page.waitToClick(selectors.workerNotes.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should confirm the note was created', async() => { - const result = await page.waitToGetProperty(selectors.workerNotes.firstNoteText, 'innerText'); - - expect(result).toEqual('Meeting with Black Widow 21st 9am'); - }); -}); diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html deleted file mode 100644 index bece1b6fd..000000000 --- a/modules/worker/front/basic-data/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js deleted file mode 100644 index ea75d7b97..000000000 --- a/modules/worker/front/basic-data/index.js +++ /dev/null @@ -1,27 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - this.maritalStatus = [ - {code: 'M', name: this.$t('Married')}, - {code: 'S', name: this.$t('Single')} - ]; - } - onSubmit() { - return this.$.watcher.submit() - .then(() => this.card.reload()); - } -} - -ngModule.vnComponent('vnWorkerBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - }, - require: { - card: '^vnWorkerCard' - } -}); diff --git a/modules/worker/front/basic-data/locale/es.yml b/modules/worker/front/basic-data/locale/es.yml deleted file mode 100644 index edf08de90..000000000 --- a/modules/worker/front/basic-data/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Marital status: Estado civil -Origin country: País origen -Education level: Nivel educación -SSN: NSS -Married: Casado/a -Single: Soltero/a -Business phone: Teléfono de empresa -Mobile extension: Extensión móvil -Locker: Taquilla diff --git a/modules/worker/front/calendar/index.html b/modules/worker/front/calendar/index.html deleted file mode 100644 index 1b0608633..000000000 --- a/modules/worker/front/calendar/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - -
-
- - - - - - -
-
-
- Autonomous worker -
- -
-
-
{{'Contract' | translate}} #{{$ctrl.businessId}}
-
- {{'Used' | translate}} {{$ctrl.contractHolidays.holidaysEnjoyed || 0}} - {{'of' | translate}} {{$ctrl.contractHolidays.totalHolidays || 0}} {{'days' | translate}} -
-
- {{'Spent' | translate}} {{$ctrl.contractHolidays.hoursEnjoyed || 0}} - {{'of' | translate}} {{$ctrl.contractHolidays.totalHours || 0}} {{'hours' | translate}} -
-
- {{'Paid holidays' | translate}} {{$ctrl.contractHolidays.payedHolidays || 0}} {{'days' | translate}} -
-
- -
-
{{'Year' | translate}} {{$ctrl.year}}
-
- {{'Used' | translate}} {{$ctrl.yearHolidays.holidaysEnjoyed || 0}} - {{'of' | translate}} {{$ctrl.yearHolidays.totalHolidays || 0}} {{'days' | translate}} -
-
- {{'Spent' | translate}} {{$ctrl.yearHolidays.hoursEnjoyed || 0}} - {{'of' | translate}} {{$ctrl.yearHolidays.totalHours || 0}} {{'hours' | translate}} -
-
- -
- - - - -
#{{businessFk}}
-
- {{started | date: 'dd/MM/yyyy'}} - {{ended ? (ended | date: 'dd/MM/yyyy') : 'Indef.'}} -
-
-
-
-
- - - - - - {{absenceType.name}} - -
-
- - - - Festive - - - - - Current day - -
-
-
- - - - diff --git a/modules/worker/front/calendar/index.js b/modules/worker/front/calendar/index.js deleted file mode 100644 index 5606ad0ce..000000000 --- a/modules/worker/front/calendar/index.js +++ /dev/null @@ -1,302 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - this.date = Date.vnNew(); - this.events = {}; - this.buildYearFilter(); - } - - get year() { - return this.date.getFullYear(); - } - - set year(value) { - const newYear = Date.vnNew(); - newYear.setFullYear(value); - - this.date = newYear; - - this.refresh() - .then(() => this.repaint()) - .then(() => this.getContractHolidays()) - .then(() => this.getYearHolidays()); - } - - get businessId() { - return this._businessId; - } - - set businessId(value) { - if (!this.card.hasWorkCenter) return; - - this._businessId = value; - if (value) { - this.refresh() - .then(() => this.repaint()) - .then(() => this.getContractHolidays()) - .then(() => this.getYearHolidays()); - } - } - - get date() { - return this._date; - } - - set date(value) { - this._date = value; - value.setHours(0, 0, 0, 0); - - this.months = new Array(12); - - for (let i = 0; i < this.months.length; i++) { - const now = new Date(value.getTime()); - now.setDate(1); - now.setMonth(i); - this.months[i] = now; - } - } - - get worker() { - return this._worker; - } - - set worker(value) { - this._worker = value; - if (value) { - this.getIsSubordinate(); - this.getActiveContract(); - } - } - - buildYearFilter() { - const now = Date.vnNew(); - now.setFullYear(now.getFullYear() + 1); - - const maxYear = now.getFullYear(); - const minRange = maxYear - 5; - - const years = []; - for (let i = maxYear; i > minRange; i--) - years.push({year: i}); - - this.yearFilter = years; - } - - getIsSubordinate() { - this.$http.get(`Workers/${this.worker.id}/isSubordinate`) - .then(res => this.isSubordinate = res.data); - } - - getActiveContract() { - this.$http.get(`Workers/${this.worker.id}/activeContract`) - .then(res => { - if (res.data) this.businessId = res.data.businessFk; - }); - } - - getContractHolidays() { - this.getHolidays({ - businessFk: this.businessId, - year: this.year - }, data => this.contractHolidays = data); - } - - getYearHolidays() { - this.getHolidays({ - year: this.year - }, data => this.yearHolidays = data); - } - - getHolidays(params, cb) { - this.$http.get(`Workers/${this.worker.id}/holidays`, {params}) - .then(res => cb(res.data)); - } - - onData(data) { - this.events = {}; - this.calendar = data.calendar; - - let addEvent = (day, newEvent) => { - const timestamp = new Date(day).getTime(); - const event = this.events[timestamp]; - - if (event) { - const oldName = event.name; - Object.assign(event, newEvent); - event.name = `${oldName}, ${event.name}`; - } else - this.events[timestamp] = newEvent; - }; - - if (data.holidays) { - data.holidays.forEach(holiday => { - const holidayDetail = holiday.detail && holiday.detail.name; - const holidayType = holiday.type && holiday.type.name; - const holidayName = holidayDetail || holidayType; - - addEvent(holiday.dated, { - name: holidayName, - className: 'festive' - }); - }); - } - if (data.absences) { - data.absences.forEach(absence => { - let type = absence.absenceType; - addEvent(absence.dated, { - name: type.name, - color: type.rgb, - type: type.code, - absenceId: absence.id - }); - }); - } - } - - repaint() { - let calendars = this.element.querySelectorAll('vn-calendar'); - for (let calendar of calendars) - calendar.$ctrl.repaint(); - } - - formatDay(day, element) { - let event = this.events[day.getTime()]; - if (!event) return; - - let dayNumber = element.firstElementChild; - dayNumber.title = event.name; - dayNumber.style.backgroundColor = event.color; - - if (event.border) - dayNumber.style.border = event.border; - - if (event.className) - dayNumber.classList.add(event.className); - } - - pick(absenceType) { - if (!this.isSubordinate) return; - if (absenceType == this.absenceType) - absenceType = null; - - this.absenceType = absenceType; - } - - onSelection($event, $days) { - if (!this.absenceType) - return this.vnApp.showMessage(this.$t('Choose an absence type from the right menu')); - - const day = $days[0]; - const stamp = day.getTime(); - const event = this.events[stamp]; - const calendar = $event.target.closest('vn-calendar').$ctrl; - - if (event && event.absenceId) { - if (event.type == this.absenceType.code) - this.delete(calendar, day, event); - else - this.edit(calendar, event); - } else - this.create(calendar, day); - } - - create(calendar, dated) { - const absenceType = this.absenceType; - const params = { - dated: dated, - absenceTypeId: absenceType.id, - businessFk: this.businessId - }; - - const path = `Workers/${this.$params.id}/createAbsence`; - this.$http.post(path, params).then(res => { - const newEvent = res.data; - this.events[dated.getTime()] = { - name: absenceType.name, - color: absenceType.rgb, - type: absenceType.code, - absenceId: newEvent.id - }; - - this.repaintCanceller(() => - this.refresh() - .then(calendar.repaint()) - .then(() => this.getContractHolidays()) - .then(() => this.getYearHolidays()) - .then(() => this.repaint()) - ); - }); - } - - edit(calendar, event) { - const absenceType = this.absenceType; - const params = { - absenceId: event.absenceId, - absenceTypeId: absenceType.id - }; - const path = `Workers/${this.$params.id}/updateAbsence`; - this.$http.patch(path, params).then(() => { - event.color = absenceType.rgb; - event.name = absenceType.name; - event.type = absenceType.code; - - this.repaintCanceller(() => - this.refresh() - .then(calendar.repaint()) - .then(() => this.getContractHolidays()) - .then(() => this.getYearHolidays()) - ); - }); - } - - delete(calendar, day, event) { - const params = {absenceId: event.absenceId}; - const path = `Workers/${this.$params.id}/deleteAbsence`; - this.$http.delete(path, {params}).then(() => { - delete this.events[day.getTime()]; - - this.repaintCanceller(() => - this.refresh() - .then(calendar.repaint()) - .then(() => this.getContractHolidays()) - .then(() => this.getYearHolidays()) - .then(() => this.repaint()) - ); - }); - } - - repaintCanceller(cb) { - if (this.canceller) { - clearTimeout(this.canceller); - this.canceller = null; - } - - this.canceller = setTimeout( - () => cb(), 500); - } - - refresh() { - const params = { - workerFk: this.$params.id, - businessFk: this.businessId, - year: this.year - }; - return this.$http.get(`Calendars/absences`, {params}) - .then(res => this.onData(res.data)); - } -} - -ngModule.vnComponent('vnWorkerCalendar', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - }, - require: { - card: '^vnWorkerCard' - } -}); diff --git a/modules/worker/front/calendar/index.spec.js b/modules/worker/front/calendar/index.spec.js deleted file mode 100644 index 5d7ae0795..000000000 --- a/modules/worker/front/calendar/index.spec.js +++ /dev/null @@ -1,346 +0,0 @@ -import './index'; - -describe('Worker', () => { - describe('Component vnWorkerCalendar', () => { - let $httpBackend; - let $httpParamSerializer; - let $scope; - let controller; - let year = Date.vnNew().getFullYear(); - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, $rootScope, _$httpParamSerializer_, _$httpBackend_) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - const $element = angular.element(''); - controller = $componentController('vnWorkerCalendar', {$element, $scope}); - controller.isSubordinate = true; - controller.absenceType = {id: 1, name: 'Holiday', code: 'holiday', rgb: 'red'}; - controller.$params.id = 1106; - controller._worker = {id: 1106}; - controller.card = { - hasWorkCenter: true - }; - })); - - describe('year() getter', () => { - it(`should return the year number of the calendar date`, () => { - expect(controller.year).toEqual(year); - }); - }); - - describe('year() setter', () => { - it(`should set the year of the calendar date`, () => { - jest.spyOn(controller, 'refresh').mockReturnValue(Promise.resolve()); - - const previousYear = year - 1; - controller.year = previousYear; - - expect(controller.year).toEqual(previousYear); - expect(controller.date.getFullYear()).toEqual(previousYear); - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('businessId() setter', () => { - it(`should set the contract id and then call to the refresh method`, () => { - jest.spyOn(controller, 'refresh').mockReturnValue(Promise.resolve()); - - controller.businessId = 1106; - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('months property', () => { - it(`should return an array of twelve months length`, () => { - const started = new Date(year, 0, 1); - const ended = new Date(year, 11, 1); - - expect(controller.months.length).toEqual(12); - expect(controller.months[0]).toEqual(started); - expect(controller.months[11]).toEqual(ended); - }); - }); - - describe('worker() setter', () => { - it(`should perform a get query and set the reponse data on the model`, () => { - controller.getIsSubordinate = jest.fn(); - controller.getActiveContract = jest.fn(); - - let today = Date.vnNew(); - let tomorrow = new Date(today.getTime()); - tomorrow.setDate(tomorrow.getDate() + 1); - - let yesterday = new Date(today.getTime()); - yesterday.setDate(yesterday.getDate() - 1); - - controller.worker = {id: 1107}; - - expect(controller.getIsSubordinate).toHaveBeenCalledWith(); - expect(controller.getActiveContract).toHaveBeenCalledWith(); - }); - }); - - describe('getIsSubordinate()', () => { - it(`should return whether the worker is a subordinate`, () => { - $httpBackend.expect('GET', `Workers/1106/isSubordinate`).respond(true); - controller.getIsSubordinate(); - $httpBackend.flush(); - - expect(controller.isSubordinate).toBe(true); - }); - }); - - describe('getActiveContract()', () => { - it(`should return the current contract and then set the businessId property`, () => { - jest.spyOn(controller, 'refresh').mockReturnValue(Promise.resolve()); - - $httpBackend.expect('GET', `Workers/1106/activeContract`).respond({businessFk: 1106}); - controller.getActiveContract(); - $httpBackend.flush(); - - expect(controller.businessId).toEqual(1106); - }); - }); - - describe('getContractHolidays()', () => { - it(`should return the worker holidays amount and then set the contractHolidays property`, () => { - const today = Date.vnNew(); - const year = today.getFullYear(); - - const serializedParams = $httpParamSerializer({year}); - $httpBackend.expect('GET', `Workers/1106/holidays?${serializedParams}`).respond({totalHolidays: 28}); - controller.getContractHolidays(); - $httpBackend.flush(); - - expect(controller.contractHolidays).toEqual({totalHolidays: 28}); - }); - }); - - describe('formatDay()', () => { - it(`should set the day element style`, () => { - const today = Date.vnNew(); - - controller.events[today.getTime()] = { - name: 'Holiday', - color: '#000' - }; - - const dayElement = angular.element('
')[0]; - const dayNumber = dayElement.firstElementChild; - - controller.formatDay(today, dayElement); - - expect(dayNumber.title).toEqual('Holiday'); - expect(dayNumber.style.backgroundColor).toEqual('rgb(0, 0, 0)'); - }); - }); - - describe('pick()', () => { - it(`should set the absenceType property to null if they match with the current one`, () => { - const absenceType = {id: 1, name: 'Holiday'}; - controller.absenceType = absenceType; - controller.pick(absenceType); - - expect(controller.absenceType).toBeNull(); - }); - - it(`should set the absenceType property`, () => { - const absenceType = {id: 1, name: 'Holiday'}; - const expectedAbsence = {id: 2, name: 'Leave of absence'}; - controller.absenceType = absenceType; - controller.pick(expectedAbsence); - - expect(controller.absenceType).toEqual(expectedAbsence); - }); - }); - - describe('onSelection()', () => { - it(`should show an snackbar message if no absence type is selected`, () => { - jest.spyOn(controller.vnApp, 'showMessage').mockReturnThis(); - - const $event = {}; - const $days = []; - controller.absenceType = null; - controller.onSelection($event, $days); - - expect(controller.vnApp.showMessage).toHaveBeenCalledWith('Choose an absence type from the right menu'); - }); - - it(`should call to the create() method`, () => { - jest.spyOn(controller, 'create').mockReturnThis(); - - const selectedDay = Date.vnNew(); - const $event = { - target: { - closest: () => { - return {$ctrl: {}}; - } - } - }; - const $days = [selectedDay]; - controller.absenceType = {id: 1}; - controller.onSelection($event, $days); - - expect(controller.create).toHaveBeenCalledWith(jasmine.any(Object), selectedDay); - }); - - it(`should call to the delete() method`, () => { - jest.spyOn(controller, 'delete').mockReturnThis(); - - const selectedDay = Date.vnNew(); - const expectedEvent = { - dated: selectedDay, - type: 'holiday', - absenceId: 1 - }; - const $event = { - target: { - closest: () => { - return {$ctrl: {}}; - } - } - }; - const $days = [selectedDay]; - controller.events[selectedDay.getTime()] = expectedEvent; - controller.absenceType = {id: 1, code: 'holiday'}; - controller.onSelection($event, $days); - - expect(controller.delete).toHaveBeenCalledWith(jasmine.any(Object), selectedDay, expectedEvent); - }); - - it(`should call to the edit() method`, () => { - jest.spyOn(controller, 'edit').mockReturnThis(); - - const selectedDay = Date.vnNew(); - const expectedEvent = { - dated: selectedDay, - type: 'leaveOfAbsence', - absenceId: 1 - }; - const $event = { - target: { - closest: () => { - return {$ctrl: {}}; - } - } - }; - const $days = [selectedDay]; - controller.events[selectedDay.getTime()] = expectedEvent; - controller.absenceType = {id: 1, code: 'holiday'}; - controller.onSelection($event, $days); - - expect(controller.edit).toHaveBeenCalledWith(jasmine.any(Object), expectedEvent); - }); - }); - - describe('create()', () => { - it(`should make a HTTP POST query and then call to the repaintCanceller() method`, () => { - jest.spyOn(controller, 'repaintCanceller').mockReturnThis(); - - const dated = Date.vnNew(); - const calendarElement = {}; - const expectedResponse = {id: 10}; - - $httpBackend.expect('POST', `Workers/1106/createAbsence`).respond(200, expectedResponse); - controller.create(calendarElement, dated); - $httpBackend.flush(); - - const createdEvent = controller.events[dated.getTime()]; - const absenceType = controller.absenceType; - - expect(createdEvent.absenceId).toEqual(expectedResponse.id); - expect(createdEvent.color).toEqual(absenceType.rgb); - expect(controller.repaintCanceller).toHaveBeenCalled(); - }); - }); - - describe('edit()', () => { - it(`should make a HTTP PATCH query and then call to the repaintCanceller() method`, () => { - jest.spyOn(controller, 'repaintCanceller').mockReturnThis(); - - const event = {absenceId: 10}; - const calendarElement = {}; - const newAbsenceType = { - id: 2, - name: 'Leave of absence', - code: 'leaveOfAbsence', - rgb: 'purple' - }; - controller.absenceType = newAbsenceType; - - const expectedParams = {absenceId: 10, absenceTypeId: 2}; - $httpBackend.expect('PATCH', `Workers/1106/updateAbsence`, expectedParams).respond(200); - controller.edit(calendarElement, event); - $httpBackend.flush(); - - expect(event.name).toEqual(newAbsenceType.name); - expect(event.color).toEqual(newAbsenceType.rgb); - expect(event.type).toEqual(newAbsenceType.code); - expect(controller.repaintCanceller).toHaveBeenCalled(); - }); - }); - - describe('delete()', () => { - it(`should make a HTTP DELETE query and then call to the repaintCanceller() method`, () => { - jest.spyOn(controller, 'repaintCanceller').mockReturnThis(); - - const expectedParams = {absenceId: 10}; - const calendarElement = {}; - const selectedDay = Date.vnNew(); - const expectedEvent = { - dated: selectedDay, - type: 'leaveOfAbsence', - absenceId: 10 - }; - - controller.events[selectedDay.getTime()] = expectedEvent; - - const serializedParams = $httpParamSerializer(expectedParams); - $httpBackend.expect('DELETE', `Workers/1106/deleteAbsence?${serializedParams}`).respond(200); - controller.delete(calendarElement, selectedDay, expectedEvent); - $httpBackend.flush(); - - const event = controller.events[selectedDay.getTime()]; - - expect(event).toBeUndefined(); - expect(controller.repaintCanceller).toHaveBeenCalled(); - }); - }); - - describe('repaintCanceller()', () => { - it(`should cancell the callback execution timer`, () => { - jest.spyOn(window, 'clearTimeout'); - jest.spyOn(window, 'setTimeout'); - - const timeoutId = 90; - controller.canceller = timeoutId; - - controller.repaintCanceller(() => { - return 'My callback'; - }); - - expect(window.clearTimeout).toHaveBeenCalledWith(timeoutId); - expect(window.setTimeout).toHaveBeenCalledWith(jasmine.any(Function), 500); - }); - }); - - describe('refresh()', () => { - it(`should make a HTTP GET query and then call to the onData() method`, () => { - jest.spyOn(controller, 'onData').mockReturnThis(); - - const expecteResponse = [{id: 1}]; - const expectedParams = {workerFk: controller.worker.id, year: year}; - const serializedParams = $httpParamSerializer(expectedParams); - $httpBackend.expect('GET', `Calendars/absences?${serializedParams}`).respond(200, expecteResponse); - controller.refresh(); - $httpBackend.flush(); - - expect(controller.onData).toHaveBeenCalledWith(expecteResponse); - }); - }); - }); -}); diff --git a/modules/worker/front/calendar/locale/es.yml b/modules/worker/front/calendar/locale/es.yml deleted file mode 100644 index 50bb4bb52..000000000 --- a/modules/worker/front/calendar/locale/es.yml +++ /dev/null @@ -1,15 +0,0 @@ -Calendar: Calendario -Contract: Contrato -Festive: Festivo -Used: Utilizados -Spent: Utilizadas -Year: Año -of: de -days: días -hours: horas -Choose an absence type from the right menu: Elige un tipo de ausencia desde el menú de la derecha -To start adding absences, click an absence type from the right menu and then on the day you want to add an absence: Para empezar a añadir ausencias, haz clic en un tipo de ausencia desde el menu de la derecha y después en el día que quieres añadir la ausencia -You can just add absences within the current year: Solo puedes añadir ausencias dentro del año actual -Current day: Día actual -Paid holidays: Vacaciones pagadas -Autonomous worker: Trabajador autónomo diff --git a/modules/worker/front/calendar/style.scss b/modules/worker/front/calendar/style.scss deleted file mode 100644 index e99f64689..000000000 --- a/modules/worker/front/calendar/style.scss +++ /dev/null @@ -1,65 +0,0 @@ -@import "variables"; - -vn-worker-calendar { - .calendars { - position: relative; - display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; - box-sizing: border-box; - padding: $spacing-md; - - & > vn-calendar { - border: $border-thin; - margin: $spacing-md; - padding: $spacing-xs; - max-width: 288px; - } - } - - vn-chip.selectable { - cursor: pointer - } - - vn-chip.selectable:hover { - opacity: 0.8 - } - - vn-chip vn-avatar { - text-align: center; - color: white - } - - vn-icon[icon="info"] { - position: absolute; - top: 16px; - right: 16px - } - - vn-side-menu div > .input { - border-bottom: $border-thin; - } - - .festive, - vn-avatar.today { - color: $color-font; - width: 24px; - min-width: 24px; - height: 24px - } - - .festive { - border: 2px solid $color-alert - } - - vn-avatar.today { - border: 2px solid $color-font-link - } - - .check { - margin-top: 0.5px; - margin-left: -3px; - font-size: 125%; - } -} diff --git a/modules/worker/front/create/index.html b/modules/worker/front/create/index.html deleted file mode 100644 index 3030ffecd..000000000 --- a/modules/worker/front/create/index.html +++ /dev/null @@ -1,198 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - {{code}} - {{town.name}} ({{town.province.name}}, - {{town.province.country.name}}) - - - - - - - - {{name}} ({{country.name}}) - - - - - - {{name}}, {{province.name}} - ({{province.country.name}}) - - - - - - - - - - - - - - - - - - - - - - - - {{bic}} {{name}} - - - - - - - - - - - - - -
- - - diff --git a/modules/worker/front/create/index.js b/modules/worker/front/create/index.js deleted file mode 100644 index e6d65221f..000000000 --- a/modules/worker/front/create/index.js +++ /dev/null @@ -1,141 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.worker = {companyFk: this.vnConfig.user.companyFk}; - this.$http.get(`WorkerConfigs/findOne`, {field: ['payMethodFk']}).then(res => { - if (res.data) this.worker.payMethodFk = res.data.payMethodFk; - }); - } - - onSubmit() { - if (!this.worker.iban && !this.worker.bankEntityFk) { - delete this.worker.iban; - delete this.worker.bankEntityFk; - } - - return this.$.watcher.submit().then(json => { - this.$state.go('worker.card.basicData', {id: json.data.id}); - }); - } - - get ibanCountry() { - if (!this.worker || !this.worker.iban) return false; - - let countryCode = this.worker.iban.substr(0, 2); - - return countryCode; - } - - autofillBic() { - if (!this.worker || !this.worker.iban) return; - - let bankEntityId = parseInt(this.worker.iban.substr(4, 4)); - let filter = {where: {id: bankEntityId}}; - - this.$http.get(`BankEntities`, {filter}).then(response => { - const hasData = response.data && response.data[0]; - - if (hasData) - this.worker.bankEntityFk = response.data[0].id; - else if (!hasData) - this.worker.bankEntityFk = null; - }); - } - - generateCodeUser() { - if (!this.worker.firstName || !this.worker.lastNames) return; - - const totalName = this.worker.firstName.concat(' ' + this.worker.lastNames).toLowerCase(); - const totalNameArray = totalName.split(' '); - let newCode = ''; - - for (let part of totalNameArray) - newCode += part.charAt(0); - - this.worker.code = newCode.toUpperCase().slice(0, 3); - this.worker.name = totalNameArray[0] + newCode.slice(1); - - if (!this.worker.companyFk) - this.worker.companyFk = this.vnConfig.user.companyFk; - } - - get province() { - return this._province; - } - - // Province auto complete - set province(selection) { - this._province = selection; - - if (!selection) return; - - const country = selection.country; - - if (!this.worker.countryFk) - this.worker.countryFk = country.id; - } - - get town() { - return this._town; - } - - // Town auto complete - set town(selection) { - this._town = selection; - - if (!selection) return; - - const province = selection.province; - const country = province.country; - const postcodes = selection.postcodes; - - if (!this.worker.provinceFk) - this.worker.provinceFk = province.id; - - if (!this.worker.countryFk) - this.worker.countryFk = country.id; - - if (postcodes.length === 1) - this.worker.postcode = postcodes[0].code; - } - - get postcode() { - return this._postcode; - } - - // Postcode auto complete - set postcode(selection) { - this._postcode = selection; - - if (!selection) return; - - const town = selection.town; - const province = town.province; - const country = province.country; - - if (!this.worker.city) - this.worker.city = town.name; - - if (!this.worker.provinceFk) - this.worker.provinceFk = province.id; - - if (!this.worker.countryFk) - this.worker.countryFk = country.id; - } - - onResponse(response) { - this.worker.postcode = response.code; - this.worker.city = response.city; - this.worker.provinceFk = response.provinceFk; - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnWorkerCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/worker/front/create/index.spec.js b/modules/worker/front/create/index.spec.js deleted file mode 100644 index c2e9acce0..000000000 --- a/modules/worker/front/create/index.spec.js +++ /dev/null @@ -1,133 +0,0 @@ -import './index'; - -describe('Worker', () => { - describe('Component vnWorkerCreate', () => { - let $scope; - let $state; - let controller; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, $rootScope, _$state_) => { - $scope = $rootScope.$new(); - $state = _$state_; - $scope.watcher = { - submit: () => { - return { - then: callback => { - callback({data: {id: '1234'}}); - } - }; - } - }; - const $element = angular.element(''); - controller = $componentController('vnWorkerCreate', {$element, $scope}); - controller.worker = {}; - controller.vnConfig = {user: {companyFk: 1}}; - })); - - describe('onSubmit()', () => { - it(`should call submit() on the watcher then expect a callback`, () => { - jest.spyOn($state, 'go'); - controller.onSubmit(); - - expect(controller.$state.go).toHaveBeenCalledWith('worker.card.basicData', {id: '1234'}); - }); - }); - - describe('province() setter', () => { - it(`should set countryFk property`, () => { - controller.worker.countryFk = null; - controller.province = { - id: 1, - name: 'New york', - country: { - id: 2, - name: 'USA' - } - }; - - expect(controller.worker.countryFk).toEqual(2); - }); - }); - - describe('town() setter', () => { - it(`should set provinceFk property`, () => { - controller.town = { - provinceFk: 1, - code: 46001, - province: { - id: 1, - name: 'New york', - country: { - id: 2, - name: 'USA' - } - }, - postcodes: [] - }; - - expect(controller.worker.provinceFk).toEqual(1); - }); - - it(`should set provinceFk property and fill the postalCode if there's just one`, () => { - controller.town = { - provinceFk: 1, - code: 46001, - province: { - id: 1, - name: 'New york', - country: { - id: 2, - name: 'USA' - } - }, - postcodes: [{code: '46001'}] - }; - - expect(controller.worker.provinceFk).toEqual(1); - expect(controller.worker.postcode).toEqual('46001'); - }); - }); - - describe('postcode() setter', () => { - it(`should set the town, provinceFk and contryFk properties`, () => { - controller.postcode = { - townFk: 1, - code: 46001, - town: { - id: 1, - name: 'New York', - province: { - id: 1, - name: 'New york', - country: { - id: 2, - name: 'USA' - } - } - } - }; - - expect(controller.worker.city).toEqual('New York'); - expect(controller.worker.provinceFk).toEqual(1); - expect(controller.worker.countryFk).toEqual(2); - }); - }); - - describe('generateCodeUser()', () => { - it(`should generate worker code, name and company `, () => { - controller.worker = { - firstName: 'default', - lastNames: 'generate worker' - }; - - controller.generateCodeUser(); - - expect(controller.worker.code).toEqual('DGW'); - expect(controller.worker.name).toEqual('defaultgw'); - expect(controller.worker.companyFk).toEqual(controller.vnConfig.user.companyFk); - }); - }); - }); -}); diff --git a/modules/worker/front/create/locale/es.yml b/modules/worker/front/create/locale/es.yml deleted file mode 100644 index 4e8d2df1e..000000000 --- a/modules/worker/front/create/locale/es.yml +++ /dev/null @@ -1,13 +0,0 @@ -Firstname: Nombre -Lastname: Apellidos -Fi: DNI/NIF/NIE -Birth: Fecha de nacimiento -Worker code: Código de trabajador -Province: Provincia -City: Población -ProfileType: Tipo de perfil -Street: Dirección -Postcode: Código postal -Web user: Usuario Web -Access permission: Permiso de acceso -Pay method: Método de pago diff --git a/modules/worker/front/dms/create/index.html b/modules/worker/front/dms/create/index.html deleted file mode 100644 index 0f2d51dd3..000000000 --- a/modules/worker/front/dms/create/index.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/worker/front/dms/create/index.js b/modules/worker/front/dms/create/index.js deleted file mode 100644 index ff6112211..000000000 --- a/modules/worker/front/dms/create/index.js +++ /dev/null @@ -1,113 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - this.dms = { - files: [], - hasFile: false, - hasFileAttached: false - }; - } - - get worker() { - return this._worker; - } - - set worker(value) { - this._worker = value; - - if (value) { - this.setDefaultParams(); - this.getAllowedContentTypes(); - } - } - - getAllowedContentTypes() { - this.$http.get('DmsContainers/allowedContentTypes').then(res => { - const contentTypes = res.data.join(', '); - this.allowedContentTypes = contentTypes; - }); - } - - get contentTypesInfo() { - return this.$t('ContentTypesInfo', { - allowedContentTypes: this.allowedContentTypes - }); - } - - setDefaultParams() { - const params = {filter: { - where: {code: 'hhrrData'} - }}; - this.$http.get('DmsTypes/findOne', {params}).then(res => { - const dmsType = res.data && res.data; - const companyId = this.vnConfig.companyFk; - const warehouseId = this.vnConfig.warehouseFk; - const defaultParams = { - reference: this.worker.id, - warehouseId: warehouseId, - companyId: companyId, - dmsTypeId: dmsType.id, - description: this.$t('WorkerFileDescription', { - dmsTypeName: dmsType.name, - workerId: this.worker.id, - workerName: this.worker.name - }).toUpperCase() - }; - - this.dms = Object.assign(this.dms, defaultParams); - }); - } - - onSubmit() { - const query = `Workers/${this.worker.id}/uploadFile`; - const options = { - method: 'POST', - url: query, - params: this.dms, - headers: { - 'Content-Type': undefined - }, - transformRequest: files => { - const formData = new FormData(); - - for (let i = 0; i < files.length; i++) - formData.append(files[i].name, files[i]); - - return formData; - }, - data: this.dms.files - }; - this.$http(options).then(res => { - if (res) { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.$.watcher.updateOriginalData(); - this.$state.go('worker.card.dms.index'); - } - }); - } - - onFileChange(files) { - let hasFileAttached = false; - - if (files.length > 0) - hasFileAttached = true; - - this.$.$applyAsync(() => { - this.dms.hasFileAttached = hasFileAttached; - }); - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnWorkerDmsCreate', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - } -}); diff --git a/modules/worker/front/dms/create/index.spec.js b/modules/worker/front/dms/create/index.spec.js deleted file mode 100644 index 08a2a5981..000000000 --- a/modules/worker/front/dms/create/index.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -import './index'; - -describe('Client', () => { - describe('Component vnWorkerDmsCreate', () => { - let $element; - let controller; - let $scope; - let $httpBackend; - let $httpParamSerializer; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($compile, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - $element = $compile(``)($rootScope); - controller = $element.controller('vnWorkerDmsCreate'); - controller._worker = {id: 1101, name: 'Bruce wayne'}; - $httpBackend.whenRoute('GET', `Warehouses?filter=%7B%7D`).respond([{$oldData: {}}]); - })); - - describe('worker() setter', () => { - it('should set the worker data and then call setDefaultParams() and getAllowedContentTypes()', () => { - jest.spyOn(controller, 'setDefaultParams'); - jest.spyOn(controller, 'getAllowedContentTypes'); - controller.worker = { - id: 15, - name: 'Bruce wayne' - }; - - expect(controller.worker).toBeDefined(); - expect(controller.setDefaultParams).toHaveBeenCalledWith(); - expect(controller.getAllowedContentTypes).toHaveBeenCalledWith(); - }); - }); - - describe('setDefaultParams()', () => { - it('should perform a GET query and define the dms property on controller', () => { - $httpBackend.whenRoute('GET', `DmsTypes`).respond({id: 12, code: 'hhrrData'}); - const params = {filter: { - where: {code: 'hhrrData'} - }}; - let serializedParams = $httpParamSerializer(params); - $httpBackend.when('GET', `DmsTypes/findOne?${serializedParams}`).respond({id: 12, code: 'hhrrData'}); - controller.setDefaultParams(); - $httpBackend.flush(); - - expect(controller.dms).toBeDefined(); - expect(controller.dms.reference).toEqual(1101); - expect(controller.dms.dmsTypeId).toEqual(12); - }); - }); - - describe('onFileChange()', () => { - it('should set dms hasFileAttached property to true if has any files', () => { - const files = [{id: 1, name: 'MyFile'}]; - controller.onFileChange(files); - $scope.$apply(); - - expect(controller.dms.hasFileAttached).toBeTruthy(); - }); - }); - - describe('getAllowedContentTypes()', () => { - it('should make an HTTP GET request to get the allowed content types', () => { - const expectedResponse = ['image/png', 'image/jpg']; - $httpBackend.expect('GET', `DmsContainers/allowedContentTypes`).respond(expectedResponse); - controller.getAllowedContentTypes(); - $httpBackend.flush(); - - expect(controller.allowedContentTypes).toBeDefined(); - expect(controller.allowedContentTypes).toEqual('image/png, image/jpg'); - }); - }); - }); -}); diff --git a/modules/worker/front/dms/create/style.scss b/modules/worker/front/dms/create/style.scss deleted file mode 100644 index 73f136fc1..000000000 --- a/modules/worker/front/dms/create/style.scss +++ /dev/null @@ -1,7 +0,0 @@ -vn-ticket-request { - .vn-textfield { - margin: 0!important; - max-width: 100px; - } -} - diff --git a/modules/worker/front/dms/edit/index.html b/modules/worker/front/dms/edit/index.html deleted file mode 100644 index 39d4af801..000000000 --- a/modules/worker/front/dms/edit/index.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/worker/front/dms/edit/index.js b/modules/worker/front/dms/edit/index.js deleted file mode 100644 index 31d4c2853..000000000 --- a/modules/worker/front/dms/edit/index.js +++ /dev/null @@ -1,94 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - get worker() { - return this._worker; - } - - set worker(value) { - this._worker = value; - - if (value) { - this.setDefaultParams(); - this.getAllowedContentTypes(); - } - } - - getAllowedContentTypes() { - this.$http.get('DmsContainers/allowedContentTypes').then(res => { - const contentTypes = res.data.join(', '); - this.allowedContentTypes = contentTypes; - }); - } - - get contentTypesInfo() { - return this.$t('ContentTypesInfo', { - allowedContentTypes: this.allowedContentTypes - }); - } - - setDefaultParams() { - const path = `Dms/${this.$params.dmsId}`; - this.$http.get(path).then(res => { - const dms = res.data && res.data; - this.dms = { - reference: dms.reference, - warehouseId: dms.warehouseFk, - companyId: dms.companyFk, - dmsTypeId: dms.dmsTypeFk, - description: dms.description, - hasFile: dms.hasFile, - hasFileAttached: false, - files: [] - }; - }); - } - - onSubmit() { - const query = `dms/${this.$params.dmsId}/updateFile`; - const options = { - method: 'POST', - url: query, - params: this.dms, - headers: { - 'Content-Type': undefined - }, - transformRequest: files => { - const formData = new FormData(); - - for (let i = 0; i < files.length; i++) - formData.append(files[i].name, files[i]); - - return formData; - }, - data: this.dms.files - }; - this.$http(options).then(res => { - if (res) { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.$.watcher.updateOriginalData(); - this.$state.go('worker.card.dms.index'); - } - }); - } - - onFileChange(files) { - let hasFileAttached = false; - if (files.length > 0) - hasFileAttached = true; - - this.$.$applyAsync(() => { - this.dms.hasFileAttached = hasFileAttached; - }); - } -} - -ngModule.vnComponent('vnWorkerDmsEdit', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - } -}); diff --git a/modules/worker/front/dms/edit/index.spec.js b/modules/worker/front/dms/edit/index.spec.js deleted file mode 100644 index 0b69f2894..000000000 --- a/modules/worker/front/dms/edit/index.spec.js +++ /dev/null @@ -1,82 +0,0 @@ -import './index'; - -describe('Worker', () => { - describe('Component vnClientDmsEdit', () => { - let controller; - let $scope; - let $element; - let $httpBackend; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - $element = angular.element(` { - it('should set the worker data and then call setDefaultParams() and getAllowedContentTypes()', () => { - jest.spyOn(controller, 'setDefaultParams'); - jest.spyOn(controller, 'getAllowedContentTypes'); - controller._worker = undefined; - controller.worker = { - id: 1106 - }; - - expect(controller.setDefaultParams).toHaveBeenCalledWith(); - expect(controller.worker).toBeDefined(); - expect(controller.getAllowedContentTypes).toHaveBeenCalledWith(); - }); - }); - - describe('setDefaultParams()', () => { - it('should perform a GET query and define the dms property on controller', () => { - const dmsId = 4; - const expectedResponse = { - reference: 1101, - warehouseFk: 1, - companyFk: 442, - dmsTypeFk: 3, - description: 'Test', - hasFile: false, - hasFileAttached: false - }; - - $httpBackend.expect('GET', `Dms/${dmsId}`).respond(expectedResponse); - controller.setDefaultParams(); - $httpBackend.flush(); - - expect(controller.dms).toBeDefined(); - expect(controller.dms.reference).toEqual(1101); - expect(controller.dms.dmsTypeId).toEqual(3); - }); - }); - - describe('onFileChange()', () => { - it('should set dms hasFileAttached property to true if has any files', () => { - const files = [{id: 1, name: 'MyFile'}]; - controller.dms = {hasFileAttached: false}; - controller.onFileChange(files); - $scope.$apply(); - - expect(controller.dms.hasFileAttached).toBeTruthy(); - }); - }); - - describe('getAllowedContentTypes()', () => { - it('should make an HTTP GET request to get the allowed content types', () => { - const expectedResponse = ['image/png', 'image/jpg']; - $httpBackend.expect('GET', `DmsContainers/allowedContentTypes`).respond(expectedResponse); - controller.getAllowedContentTypes(); - $httpBackend.flush(); - - expect(controller.allowedContentTypes).toBeDefined(); - expect(controller.allowedContentTypes).toEqual('image/png, image/jpg'); - }); - }); - }); -}); diff --git a/modules/worker/front/dms/edit/style.scss b/modules/worker/front/dms/edit/style.scss deleted file mode 100644 index 73f136fc1..000000000 --- a/modules/worker/front/dms/edit/style.scss +++ /dev/null @@ -1,7 +0,0 @@ -vn-ticket-request { - .vn-textfield { - margin: 0!important; - max-width: 100px; - } -} - diff --git a/modules/worker/front/dms/index/index.html b/modules/worker/front/dms/index/index.html deleted file mode 100644 index 310fb95d1..000000000 --- a/modules/worker/front/dms/index/index.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - Id - Order - Reference - Description - Original - File - Created - - - - - - - - {{::document.id}} - - - {{::document.dms.hardCopyNumber}} - - - - - {{::document.dms.reference}} - - - - - {{::document.dms.description}} - - - - - - - - - {{::document.dms.file}} - - - - {{::document.dms.created | date:'dd/MM/yyyy HH:mm'}} - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/worker/front/dms/index/index.js b/modules/worker/front/dms/index/index.js deleted file mode 100644 index 6fdc46dbb..000000000 --- a/modules/worker/front/dms/index/index.js +++ /dev/null @@ -1,75 +0,0 @@ -import ngModule from '../../module'; -import Component from 'core/lib/component'; -import './style.scss'; - -class Controller extends Component { - constructor($element, $, vnFile) { - super($element, $); - this.vnFile = vnFile; - this.filter = { - include: { - relation: 'dms', - scope: { - fields: [ - 'dmsTypeFk', - 'reference', - 'hardCopyNumber', - 'workerFk', - 'description', - 'hasFile', - 'file', - 'created', - 'companyFk', - 'warehouseFk', - ], - include: [ - { - relation: 'dmsType', - scope: { - fields: ['name'], - }, - }, - { - relation: 'worker', - scope: { - fields: ['id'], - include: { - relation: 'user', - scope: { - fields: ['name'], - }, - }, - }, - }, - ], - }, - }, - }; - } - - deleteDms(index) { - const workerDmsId = this.workerDms[index].dmsFk; - return this.$http.post(`WorkerDms/${workerDmsId}/removeFile`) - .then(() => { - this.$.model.remove(index); - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } - - downloadFile(dmsId, isDocuware) { - if (isDocuware) return this.vnFile.download(`api/workerDms/${dmsId}/docuwareDownload`); - this.vnFile.download(`api/workerDms/${dmsId}/downloadFile`); - } - - async openDocuware() { - const url = await this.vnApp.getUrl(`WebClient`, 'docuware'); - if (url) window.open(url).focus(); - } -} - -Controller.$inject = ['$element', '$scope', 'vnFile']; - -ngModule.vnComponent('vnWorkerDmsIndex', { - template: require('./index.html'), - controller: Controller, -}); diff --git a/modules/worker/front/dms/index/index.spec.js b/modules/worker/front/dms/index/index.spec.js deleted file mode 100644 index 9c1e87011..000000000 --- a/modules/worker/front/dms/index/index.spec.js +++ /dev/null @@ -1,37 +0,0 @@ -import './index'; -import crudModel from 'core/mocks/crud-model'; - -describe('Worker', () => { - describe('Component vnWorkerDmsIndex', () => { - let $scope; - let $httpBackend; - let controller; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - controller = $componentController('vnWorkerDmsIndex', {$element: null, $scope}); - controller.$.model = crudModel; - })); - - describe('deleteDms()', () => { - it('should make an HTTP Post query', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller.$.model, 'remove'); - - const workerDmsId = 4; - const dmsIndex = 0; - controller.workerDms = [{id: 1, dmsFk: 4}]; - - $httpBackend.expectPOST(`WorkerDms/${workerDmsId}/removeFile`).respond(); - controller.deleteDms(dmsIndex); - $httpBackend.flush(); - - expect(controller.$.model.remove).toHaveBeenCalledWith(dmsIndex); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/modules/worker/front/dms/index/locale/es.yml b/modules/worker/front/dms/index/locale/es.yml deleted file mode 100644 index b6feb4206..000000000 --- a/modules/worker/front/dms/index/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Are you sure?: Estas seguro? -Download file: Descargar fichero -File: Fichero -File deleted: Fichero eliminado -Hard copy: Copia -My documentation: Mi documentacion -Remove file: Eliminar fichero -This file will be deleted: Este fichero va a ser borrado -Type: Tipo \ No newline at end of file diff --git a/modules/worker/front/dms/index/style.scss b/modules/worker/front/dms/index/style.scss deleted file mode 100644 index a6758e2e6..000000000 --- a/modules/worker/front/dms/index/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -vn-client-risk-index { - .totalBox { - display: table; - float: right; - } -} \ No newline at end of file diff --git a/modules/worker/front/dms/locale/en.yml b/modules/worker/front/dms/locale/en.yml deleted file mode 100644 index 766853fca..000000000 --- a/modules/worker/front/dms/locale/en.yml +++ /dev/null @@ -1,2 +0,0 @@ -ClientFileDescription: "{{dmsTypeName}} from client {{clientName}} id {{clientId}}" -ContentTypesInfo: Allowed file types {{allowedContentTypes}} \ No newline at end of file diff --git a/modules/worker/front/dms/locale/es.yml b/modules/worker/front/dms/locale/es.yml deleted file mode 100644 index fa4178d35..000000000 --- a/modules/worker/front/dms/locale/es.yml +++ /dev/null @@ -1,20 +0,0 @@ -Reference: Referencia -Description: Descripción -Company: Empresa -Upload file: Subir fichero -Edit file: Editar fichero -Upload: Subir -File: Fichero -WorkerFileDescription: "{{dmsTypeName}} del empleado {{workerName}} id {{workerId}}" -ContentTypesInfo: "Tipos de archivo permitidos: {{allowedContentTypes}}" -Generate identifier for original file: Generar identificador para archivo original -Are you sure you want to continue?: ¿Seguro que quieres continuar? -File management: Gestión documental -Hard copy: Copia -This file will be deleted: Este fichero va a ser borrado -Are you sure?: ¿Seguro? -File deleted: Fichero eliminado -Remove file: Eliminar fichero -Download file: Descargar fichero -Created: Creado -Employee: Empleado \ No newline at end of file diff --git a/modules/worker/front/index.js b/modules/worker/front/index.js index 5c03dc8de..26cb403bb 100644 --- a/modules/worker/front/index.js +++ b/modules/worker/front/index.js @@ -1,24 +1,9 @@ export * from './module'; import './main'; -import './index/'; import './summary'; import './card'; -import './create'; import './descriptor'; import './descriptor-popover'; -import './search-panel'; -import './basic-data'; -import './pbx'; -import './pda'; import './department'; -import './calendar'; -import './time-control'; -import './log'; -import './dms/index'; -import './dms/create'; -import './dms/edit'; -import './note/index'; -import './note/create'; -import './notifications'; diff --git a/modules/worker/front/index/index.html b/modules/worker/front/index/index.html deleted file mode 100644 index 7044ca551..000000000 --- a/modules/worker/front/index/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - diff --git a/modules/worker/front/index/index.js b/modules/worker/front/index/index.js deleted file mode 100644 index 77dd872e1..000000000 --- a/modules/worker/front/index/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(event, worker) { - if (event.defaultPrevented) return; - - event.preventDefault(); - event.stopPropagation(); - - this.selectedWorker = worker; - this.$.preview.show(); - } - - goToTimeControl(event, workerId) { - if (event.defaultPrevented) return; - - event.preventDefault(); - event.stopPropagation(); - this.$state.go('worker.card.timeControl', {id: workerId}, {absolute: true}); - } - - onMoreChange(callback) { - callback.call(this); - } -} - -ngModule.vnComponent('vnWorkerIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/worker/front/index/locale/es.yml b/modules/worker/front/index/locale/es.yml deleted file mode 100644 index df6383273..000000000 --- a/modules/worker/front/index/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -New worker: Nuevo trabajador diff --git a/modules/worker/front/log/index.html b/modules/worker/front/log/index.html deleted file mode 100644 index 090dbf2e3..000000000 --- a/modules/worker/front/log/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/modules/worker/front/log/index.js b/modules/worker/front/log/index.js deleted file mode 100644 index e30ce7e22..000000000 --- a/modules/worker/front/log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnWorkerLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/worker/front/main/index.html b/modules/worker/front/main/index.html index 376c8f534..e69de29bb 100644 --- a/modules/worker/front/main/index.html +++ b/modules/worker/front/main/index.html @@ -1,18 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/worker/front/main/index.js b/modules/worker/front/main/index.js index d97a2d636..29da1bcc1 100644 --- a/modules/worker/front/main/index.js +++ b/modules/worker/front/main/index.js @@ -1,7 +1,15 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; -export default class Worker extends ModuleMain {} +export default class Worker extends ModuleMain { + constructor($element, $) { + super($element, $); + } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`worker/`); + } +} ngModule.vnComponent('vnWorker', { controller: Worker, diff --git a/modules/worker/front/note/create/index.html b/modules/worker/front/note/create/index.html deleted file mode 100644 index d09fc2da5..000000000 --- a/modules/worker/front/note/create/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - -
- - - - - - - - - - - - -
\ No newline at end of file diff --git a/modules/worker/front/note/create/index.js b/modules/worker/front/note/create/index.js deleted file mode 100644 index 81ee247db..000000000 --- a/modules/worker/front/note/create/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.note = { - workerFk: parseInt(this.$params.id), - text: null - }; - } - - cancel() { - this.$state.go('worker.card.note.index', {id: this.$params.id}); - } -} - -ngModule.vnComponent('vnNoteWorkerCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/worker/front/note/create/index.spec.js b/modules/worker/front/note/create/index.spec.js deleted file mode 100644 index d900c8ee0..000000000 --- a/modules/worker/front/note/create/index.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -import './index'; - -describe('Worker', () => { - describe('Component vnNoteWorkerCreate', () => { - let $state; - let controller; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, _$state_) => { - $state = _$state_; - $state.params.id = '1234'; - const $element = angular.element(''); - controller = $componentController('vnNoteWorkerCreate', {$element, $state}); - })); - - it('should define workerFk using $state.params.id', () => { - expect(controller.note.workerFk).toBe(1234); - expect(controller.note.worker).toBe(undefined); - }); - }); -}); diff --git a/modules/worker/front/note/create/locale/es.yml b/modules/worker/front/note/create/locale/es.yml deleted file mode 100644 index bfe773f48..000000000 --- a/modules/worker/front/note/create/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -New note: Nueva nota -Note: Nota \ No newline at end of file diff --git a/modules/worker/front/note/index/index.html b/modules/worker/front/note/index/index.html deleted file mode 100644 index 9f5c27008..000000000 --- a/modules/worker/front/note/index/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -
- - {{::note.user.nickname}} - {{::note.created | date:'dd/MM/yyyy HH:mm'}} - - - {{::note.text}} - -
-
-
- - - diff --git a/modules/worker/front/note/index/index.js b/modules/worker/front/note/index/index.js deleted file mode 100644 index d20971413..000000000 --- a/modules/worker/front/note/index/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.filter = { - order: 'created DESC', - }; - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnWorkerNote', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - } -}); diff --git a/modules/worker/front/note/index/style.scss b/modules/worker/front/note/index/style.scss deleted file mode 100644 index 5ff6baf4f..000000000 --- a/modules/worker/front/note/index/style.scss +++ /dev/null @@ -1,5 +0,0 @@ -vn-worker-note { - .note:last-child { - margin-bottom: 0; - } -} \ No newline at end of file diff --git a/modules/worker/front/notifications/index.html b/modules/worker/front/notifications/index.html deleted file mode 100644 index 7fb3b870e..000000000 --- a/modules/worker/front/notifications/index.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/modules/worker/front/notifications/index.js b/modules/worker/front/notifications/index.js deleted file mode 100644 index 622892979..000000000 --- a/modules/worker/front/notifications/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - async $onInit() { - const url = await this.vnApp.getUrl(`worker/${this.$params.id}/notifications`); - window.open(url).focus(); - } -} - -ngModule.vnComponent('vnWorkerNotifications', { - template: require('./index.html'), - controller: Controller, - bindings: { - ticket: '<' - } -}); diff --git a/modules/worker/front/pbx/index.html b/modules/worker/front/pbx/index.html deleted file mode 100644 index e1ca61a4a..000000000 --- a/modules/worker/front/pbx/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - - - - - - - - - - - - - -
diff --git a/modules/worker/front/pbx/index.js b/modules/worker/front/pbx/index.js deleted file mode 100644 index 3b6443d3c..000000000 --- a/modules/worker/front/pbx/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - onSubmit() { - const sip = this.worker.sip; - const params = { - userFk: this.worker.id, - extension: sip.extension - }; - this.$.watcher.check(); - this.$http.patch('Sips', params).then(() => { - this.$.watcher.updateOriginalData(); - this.vnApp.showSuccess(this.$t('Data saved! User must access web')); - }); - } -} - -ngModule.vnComponent('vnWorkerPbx', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - } -}); diff --git a/modules/worker/front/pda/index.js b/modules/worker/front/pda/index.js deleted file mode 100644 index c3616b41e..000000000 --- a/modules/worker/front/pda/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - async $onInit() { - const url = await this.vnApp.getUrl(`worker/${this.$params.id}/pda`); - this.$state.go('worker.card.summary', {id: this.$params.id}); - window.location.href = url; - } -} - -ngModule.vnComponent('vnWorkerPda', { - controller: Controller -}); diff --git a/modules/worker/front/routes.json b/modules/worker/front/routes.json index 489b4346a..9b3a50230 100644 --- a/modules/worker/front/routes.json +++ b/modules/worker/front/routes.json @@ -9,23 +9,6 @@ {"state": "worker.index", "icon": "icon-worker"}, {"state": "worker.department", "icon": "work"} ], - "card": [ - {"state": "worker.card.basicData", "icon": "settings"}, - {"state": "worker.card.note.index", "icon": "insert_drive_file"}, - {"state": "worker.card.timeControl", "icon": "access_time"}, - {"state": "worker.card.calendar", "icon": "icon-calendar"}, - {"state": "worker.card.pda", "icon": "phone_android"}, - {"state": "worker.card.notifications", "icon": "notifications"}, - {"state": "worker.card.pbx", "icon": "icon-pbx"}, - {"state": "worker.card.dms.index", "icon": "cloud_upload"}, - { - "icon": "icon-wiki", - "external":true, - "url": "http://wiki.verdnatura.es", - "description": "Wikipedia" - }, - {"state": "worker.card.workerLog", "icon": "history"} - ], "department": [ {"state": "worker.department.card.basicData", "icon": "settings"} ] @@ -43,12 +26,14 @@ "abstract": true, "component": "vn-worker", "description": "Workers" - }, { + }, + { "url": "/index?q", "state": "worker.index", "component": "vn-worker-index", "description": "Workers" - }, { + }, + { "url" : "/summary", "state": "worker.card.summary", "component": "vn-worker-summary", @@ -56,91 +41,14 @@ "params": { "worker": "$ctrl.worker" } - }, { - "url": "/:id", - "state": "worker.card", - "component": "vn-worker-card", - "abstract": true, - "description": "Detail" - }, { - "url": "/basic-data", - "state": "worker.card.basicData", - "component": "vn-worker-basic-data", - "description": "Basic data", - "params": { - "worker": "$ctrl.worker" - }, - "acl": ["hr"] - }, { - "url" : "/log", - "state": "worker.card.workerLog", - "component": "vn-worker-log", - "description": "Log", - "acl": ["hr"] - }, { - "url": "/note", - "state": "worker.card.note", - "component": "ui-view", - "abstract": true - }, { - "url": "/index", - "state": "worker.card.note.index", - "component": "vn-worker-note", - "description": "Notes", - "params": { - "worker": "$ctrl.worker" - }, - "acl": ["hr"] - }, { - "url": "/create", - "state": "worker.card.note.create", - "component": "vn-note-worker-create", - "description": "New note" - }, { - "url": "/pbx", - "state": "worker.card.pbx", - "component": "vn-worker-pbx", - "description": "Private Branch Exchange", - "params": { - "worker": "$ctrl.worker" - }, - "acl": ["hr"] - }, { - "url": "/calendar", - "state": "worker.card.calendar", - "component": "vn-worker-calendar", - "description": "Calendar", - "params": { - "worker": "$ctrl.worker" - } - }, { - "url": "/notifications", - "state": "worker.card.notifications", - "component": "vn-worker-notifications", - "description": "Notifications", - "params": { - "worker": "$ctrl.worker" - } - }, { - "url": "/time-control?timestamp", - "state": "worker.card.timeControl", - "component": "vn-worker-time-control", - "description": "Time control", - "params": { - "worker": "$ctrl.worker" - } - }, { + }, + { "url": "/department?q", "state": "worker.department", "component": "vn-worker-department", "description":"Departments" - }, { - "url": "/:id", - "state": "worker.department.card", - "component": "vn-worker-department-card", - "abstract": true, - "description": "Detail" - }, { + }, + { "url" : "/summary", "state": "worker.department.card.summary", "component": "vn-worker-department-summary", @@ -148,62 +56,6 @@ "params": { "department": "$ctrl.department" } - }, - { - "url": "/basic-data", - "state": "worker.department.card.basicData", - "component": "vn-worker-department-basic-data", - "description": "Basic data", - "params": { - "department": "$ctrl.department" - } - }, - { - "url": "/dms", - "state": "worker.card.dms", - "abstract": true, - "component": "ui-view" - }, - { - "url": "/index", - "state": "worker.card.dms.index", - "component": "vn-worker-dms-index", - "description": "My documentation", - "acl": ["employee"] - }, - { - "url": "/create", - "state": "worker.card.dms.create", - "component": "vn-worker-dms-create", - "description": "Upload file", - "params": { - "worker": "$ctrl.worker" - }, - "acl": ["hr"] - }, - { - "url": "/:dmsId/edit", - "state": "worker.card.dms.edit", - "component": "vn-worker-dms-edit", - "description": "Edit file", - "params": { - "worker": "$ctrl.worker" - }, - "acl": ["hr"] - }, - { - "url": "/create", - "state": "worker.create", - "component": "vn-worker-create", - "description": "New worker", - "acl": ["hr"] - }, - { - "url": "/pda", - "state": "worker.card.pda", - "component": "vn-worker-pda", - "description": "PDA", - "acl": ["hr", "productionAssi"] } ] } diff --git a/modules/worker/front/search-panel/index.html b/modules/worker/front/search-panel/index.html deleted file mode 100644 index c93eef78b..000000000 --- a/modules/worker/front/search-panel/index.html +++ /dev/null @@ -1,67 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/worker/front/search-panel/index.js b/modules/worker/front/search-panel/index.js deleted file mode 100644 index ac7405e78..000000000 --- a/modules/worker/front/search-panel/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -ngModule.vnComponent('vnWorkerSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/worker/front/time-control/index.html b/modules/worker/front/time-control/index.html deleted file mode 100644 index c34a1e3ca..000000000 --- a/modules/worker/front/time-control/index.html +++ /dev/null @@ -1,219 +0,0 @@ - - -
- - - - - -
{{::$ctrl.weekdayNames[$index].name}}
-
- {{::weekday.dated | date: 'dd'}} - - {{::weekday.dated | date: 'MMMM'}} - -
- - - -
- {{::weekday.event.name}} -
-
-
-
-
- - - -
- - - - - - - - {{::hour.timed | date: 'HH:mm'}} - -
-
-
-
- - - - {{$ctrl.formatHours(weekday.workedHours)}} h. - - - - - - - - - -
-
- - -
- - - - - - -
- - -
-
- - -
-
-
Hours
- - - - -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- - - - -
- - - - Are you sure you want to send it? - - - - - - diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js deleted file mode 100644 index 2993e3986..000000000 --- a/modules/worker/front/time-control/index.js +++ /dev/null @@ -1,507 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; -import UserError from 'core/lib/user-error'; - -class Controller extends Section { - constructor($element, $, vnWeekDays, moment) { - super($element, $); - this.weekDays = []; - this.weekdayNames = vnWeekDays.locales; - this.moment = moment; - this.entryDirections = [ - {code: 'in', description: this.$t('In')}, - {code: 'middle', description: this.$t('Intermediate')}, - {code: 'out', description: this.$t('Out')} - ]; - } - - $postLink() { - const timestamp = this.$params.timestamp; - let initialDate = Date.vnNew(); - - if (timestamp) { - initialDate = new Date(timestamp * 1000); - this.$.calendar.defaultDate = initialDate; - } - - this.date = initialDate; - - this.getMailStates(this.date); - } - - get isHr() { - return this.aclService.hasAny(['hr']); - } - - get isHimSelf() { - const userId = window.localStorage.currentUserWorkerId; - return userId == this.$params.id; - } - - get worker() { - return this._worker; - } - - get weekNumber() { - return this.getWeekNumber(this.date); - } - - set weekNumber(value) { - this._weekNumber = value; - } - - set worker(value) { - this._worker = value; - this.fetchHours(); - if (this.date) - this.getWeekData(); - } - - /** - * Worker hours data - */ - get hours() { - return this._hours; - } - - set hours(value) { - this._hours = value; - - for (const weekDay of this.weekDays) { - if (value) { - let day = weekDay.dated.getDay(); - weekDay.hours = value - .filter(hour => new Date(hour.timed).getDay() == day) - .sort((a, b) => new Date(a.timed) - new Date(b.timed)); - } else - weekDay.hours = null; - } - } - - /** - * The current selected date - */ - get date() { - return this._date; - } - - set date(value) { - this._date = value; - value.setHours(0, 0, 0, 0); - - let weekOffset = value.getDay() - 1; - if (weekOffset < 0) weekOffset = 6; - - let started = new Date(value.getTime()); - started.setDate(started.getDate() - weekOffset); - this.started = started; - - let ended = new Date(started.getTime()); - ended.setHours(23, 59, 59, 59); - ended.setDate(ended.getDate() + 6); - this.ended = ended; - - this.weekDays = []; - let dayIndex = new Date(started.getTime()); - - while (dayIndex < ended) { - this.weekDays.push({ - dated: new Date(dayIndex.getTime()) - }); - dayIndex.setDate(dayIndex.getDate() + 1); - } - - if (this.worker) { - this.fetchHours(); - this.getWeekData(); - } - } - - set weekTotalHours(totalHours) { - this._weekTotalHours = this.formatHours(totalHours); - } - - get weekTotalHours() { - return this._weekTotalHours; - } - - getWeekData() { - const filter = { - where: { - workerFk: this.$params.id, - year: this._date.getFullYear(), - week: this.getWeekNumber(this._date) - }, - }; - this.$http.get('WorkerTimeControlMails', {filter}) - .then(res => { - if (!res.data.length) { - this.state = null; - return; - } - const [mail] = res.data; - this.state = mail.state; - this.reason = mail.reason; - }); - this.canBeResend(); - } - - canBeResend() { - this.canResend = false; - const filter = { - where: { - year: this._date.getFullYear(), - week: this.getWeekNumber(this._date) - }, - limit: 1 - }; - this.$http.get('WorkerTimeControlMails', {filter}) - .then(res => { - if (res.data.length) - this.canResend = true; - }); - } - - fetchHours() { - if (!this.worker || !this.date) return; - - const params = {workerFk: this.$params.id}; - const filter = { - where: {and: [ - {timed: {gte: this.started}}, - {timed: {lte: this.ended}} - ]} - }; - this.$.model.applyFilter(filter, params).then(() => { - this.getWorkedHours(this.started, this.ended); - this.getAbsences(); - }); - } - - getWorkedHours(from, to) { - this.weekTotalHours = null; - let weekTotalHours = 0; - let params = { - id: this.$params.id, - from: from, - to: to - }; - const query = `Workers/${this.$params.id}/getWorkedHours`; - return this.$http.get(query, {params}).then(res => { - const workDays = res.data; - const map = new Map(); - - for (const workDay of workDays) { - workDay.dated = new Date(workDay.dated); - map.set(workDay.dated, workDay); - weekTotalHours += workDay.workedHours; - } - - for (const weekDay of this.weekDays) { - const workDay = workDays.find(day => { - let from = new Date(day.dated); - from.setHours(0, 0, 0, 0); - - let to = new Date(day.dated); - to.setHours(23, 59, 59, 59); - - return weekDay.dated >= from && weekDay.dated <= to; - }); - - if (workDay) { - weekDay.expectedHours = workDay.expectedHours; - weekDay.workedHours = workDay.workedHours; - } - } - this.weekTotalHours = weekTotalHours; - }); - } - - getAbsences() { - const fullYear = this.started.getFullYear(); - let params = { - workerFk: this.$params.id, - businessFk: null, - year: fullYear - }; - - return this.$http.get(`Calendars/absences`, {params}) - .then(res => this.onData(res.data)); - } - - hasEvents(day) { - return day >= this.started && day < this.ended; - } - - onData(data) { - const events = {}; - - const addEvent = (day, event) => { - events[new Date(day).getTime()] = event; - }; - - if (data.holidays) { - data.holidays.forEach(holiday => { - const holidayDetail = holiday.detail && holiday.detail.description; - const holidayType = holiday.type && holiday.type.name; - const holidayName = holidayDetail || holidayType; - - addEvent(holiday.dated, { - name: holidayName, - color: '#ff0' - }); - }); - } - if (data.absences) { - data.absences.forEach(absence => { - const type = absence.absenceType; - addEvent(absence.dated, { - name: type.name, - color: type.rgb - }); - }); - } - - this.weekDays.forEach(day => { - const timestamp = day.dated.getTime(); - if (events[timestamp]) - day.event = events[timestamp]; - }); - } - - getFinishTime() { - if (!this.weekDays) return; - - let today = Date.vnNew(); - today.setHours(0, 0, 0, 0); - - let todayInWeek = this.weekDays.find(day => day.dated.getTime() === today.getTime()); - - if (todayInWeek && todayInWeek.hours && todayInWeek.hours.length) { - const remainingTime = todayInWeek.workedHours ? - ((todayInWeek.expectedHours - todayInWeek.workedHours) * 1000) : null; - const lastKnownEntry = todayInWeek.hours[todayInWeek.hours.length - 1]; - const lastKnownTime = new Date(lastKnownEntry.timed).getTime(); - const finishTimeStamp = lastKnownTime && remainingTime ? lastKnownTime + remainingTime : null; - - if (finishTimeStamp) { - let finishDate = new Date(finishTimeStamp); - let hour = finishDate.getHours(); - let minute = finishDate.getMinutes(); - - if (hour < 10) hour = `0${hour}`; - if (minute < 10) minute = `0${minute}`; - - return `${hour}:${minute} h.`; - } - } - } - - formatHours(timestamp = 0) { - let hour = Math.floor(timestamp / 3600); - let min = Math.floor(timestamp / 60 - 60 * hour); - - if (hour < 10) hour = `0${hour}`; - if (min < 10) min = `0${min}`; - - return `${hour}:${min}`; - } - - showAddTimeDialog(weekday) { - const timed = new Date(weekday.dated.getTime()); - timed.setHours(0, 0, 0, 0); - - this.newTimeEntry = { - workerFk: this.$params.id, - timed: timed - }; - this.selectedWeekday = weekday; - this.$.addTimeDialog.show(); - } - - addTime() { - try { - const entry = this.newTimeEntry; - if (!entry.direction) - throw new Error(`The entry type can't be empty`); - - const query = `WorkerTimeControls/${this.worker.id}/addTimeEntry`; - this.$http.post(query, entry) - .then(() => { - this.fetchHours(); - this.getMailStates(this.date); - }); - } catch (e) { - this.vnApp.showError(this.$t(e.message)); - return false; - } - - return true; - } - - showDeleteDialog($event, hour) { - $event.preventDefault(); - - this.timeEntryToDelete = hour; - this.$.deleteEntryDialog.show(); - } - - deleteTimeEntry() { - const entryId = this.timeEntryToDelete.id; - - this.$http.post(`WorkerTimeControls/${entryId}/deleteTimeEntry`).then(() => { - this.fetchHours(); - this.getMailStates(this.date); - this.vnApp.showSuccess(this.$t('Entry removed')); - }); - } - - edit($event, hour) { - if ($event.defaultPrevented) return; - - this.selectedRow = hour; - this.$.editEntry.show($event); - } - - getWeekNumber(date) { - const tempDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); - return this.moment(tempDate).isoWeek(); - } - - isSatisfied() { - this.updateWorkerTimeControlMail('CONFIRMED'); - } - - isUnsatisfied() { - if (!this.reason) throw new UserError(`You must indicate a reason`); - this.updateWorkerTimeControlMail('REVISE', this.reason); - } - - updateWorkerTimeControlMail(state, reason) { - const params = { - year: this.date.getFullYear(), - week: this.weekNumber, - state - }; - - if (reason) - params.reason = reason; - - const query = `WorkerTimeControls/${this.worker.id}/updateMailState`; - this.$http.post(query, params).then(() => { - this.getMailStates(this.date); - this.getWeekData(); - this.vnApp.showSuccess(this.$t('Data saved!')); - }); - } - - state(state, reason) { - this.state = state; - this.reason = reason; - this.repaint(); - } - - save() { - try { - const entry = this.selectedRow; - if (!entry.direction) - throw new Error(`The entry type can't be empty`); - - const query = `WorkerTimeControls/${entry.id}/updateTimeEntry`; - if (entry.direction !== entry.$orgRow.direction) { - this.$http.post(query, {direction: entry.direction}) - .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))) - .then(() => this.$.editEntry.hide()) - .then(() => this.fetchHours()) - .then(() => this.getMailStates(this.date)); - } - } catch (e) { - this.vnApp.showError(this.$t(e.message)); - } - } - - resendEmail() { - const params = { - recipient: this.worker.user.emailUser.email, - week: this.weekNumber, - year: this.date.getFullYear(), - workerId: this.worker.id, - state: 'SENDED' - }; - this.$http.post(`WorkerTimeControls/weekly-hour-record-email`, params) - .then(() => { - this.getMailStates(this.date); - this.vnApp.showSuccess(this.$t('Email sended')); - }); - } - - getTime(timeString) { - const [hours, minutes, seconds] = timeString.split(':'); - return [parseInt(hours), parseInt(minutes), parseInt(seconds)]; - } - - getMailStates(date) { - const params = { - month: date.getMonth() + 1, - year: date.getFullYear() - }; - const query = `WorkerTimeControls/${this.$params.id}/getMailStates`; - this.$http.get(query, {params}) - .then(res => { - this.workerTimeControlMails = res.data; - this.repaint(); - }); - } - - formatWeek($element) { - const weekNumberHTML = $element.firstElementChild; - const weekNumberValue = weekNumberHTML.innerHTML; - - if (!this.workerTimeControlMails) return; - const workerTimeControlMail = this.workerTimeControlMails.find( - workerTimeControlMail => workerTimeControlMail.week == weekNumberValue - ); - - if (!workerTimeControlMail) return; - const state = workerTimeControlMail.state; - - if (state == 'CONFIRMED') { - weekNumberHTML.classList.remove('revise'); - weekNumberHTML.classList.remove('sended'); - - weekNumberHTML.classList.add('confirmed'); - weekNumberHTML.setAttribute('title', 'Conforme'); - } - if (state == 'REVISE') { - weekNumberHTML.classList.remove('confirmed'); - weekNumberHTML.classList.remove('sended'); - - weekNumberHTML.classList.add('revise'); - weekNumberHTML.setAttribute('title', 'No conforme'); - } - if (state == 'SENDED') { - weekNumberHTML.classList.add('sended'); - weekNumberHTML.setAttribute('title', 'Pendiente'); - } - } - - repaint() { - let calendars = this.element.querySelectorAll('vn-calendar'); - for (let calendar of calendars) - calendar.$ctrl.repaint(); - } -} - -Controller.$inject = ['$element', '$scope', 'vnWeekDays', 'moment']; - -ngModule.vnComponent('vnWorkerTimeControl', { - template: require('./index.html'), - controller: Controller, - bindings: { - worker: '<' - }, - require: { - card: '^vnWorkerCard' - } -}); diff --git a/modules/worker/front/time-control/index.spec.js b/modules/worker/front/time-control/index.spec.js deleted file mode 100644 index 3868ded75..000000000 --- a/modules/worker/front/time-control/index.spec.js +++ /dev/null @@ -1,286 +0,0 @@ -import './index.js'; - -describe('Component vnWorkerTimeControl', () => { - let $httpBackend; - let $scope; - let $element; - let controller; - let $httpParamSerializer; - - beforeEach(ngModule('worker')); - - beforeEach(inject(($componentController, $rootScope, $stateParams, _$httpBackend_, _$httpParamSerializer_) => { - $stateParams.id = 1; - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - $scope = $rootScope.$new(); - $element = angular.element(''); - controller = $componentController('vnWorkerTimeControl', {$element, $scope}); - controller.card = { - hasWorkCenter: true - }; - })); - - describe('date() setter', () => { - it(`should set the weekDays and the date in the controller`, () => { - let today = Date.vnNew(); - jest.spyOn(controller, 'fetchHours').mockReturnThis(); - - controller.date = today; - - expect(controller._date).toEqual(today); - expect(controller.started).toBeDefined(); - expect(controller.ended).toBeDefined(); - expect(controller.weekDays.length).toEqual(7); - }); - }); - - describe('hours() setter', () => { - it(`should set hours data at it's corresponding week day`, () => { - let today = Date.vnNew(); - jest.spyOn(controller, 'fetchHours').mockReturnThis(); - - controller.date = today; - - let hours = [ - { - id: 1, - timed: controller.started.toJSON(), - userFk: 1 - }, { - id: 2, - timed: controller.ended.toJSON(), - userFk: 1 - }, { - id: 3, - timed: controller.ended.toJSON(), - userFk: 1 - } - ]; - - controller.hours = hours; - - expect(controller.weekDays.length).toEqual(7); - expect(controller.weekDays[0].hours.length).toEqual(1); - expect(controller.weekDays[6].hours.length).toEqual(2); - }); - }); - - describe('getWorkedHours() ', () => { - it('should set the weekdays expected and worked hours plus the total worked hours', () => { - let today = Date.vnNew(); - jest.spyOn(controller, 'fetchHours').mockReturnThis(); - - controller.date = today; - - let sixHoursInSeconds = 6 * 60 * 60; - let tenHoursInSeconds = 10 * 60 * 60; - let response = [ - { - dated: today, - expectedHours: sixHoursInSeconds, - workedHours: tenHoursInSeconds, - - }, - ]; - $httpBackend.whenRoute('GET', 'Workers/:id/getWorkedHours') - .respond(response); - - $httpBackend.whenRoute('GET', 'WorkerTimeControlMails') - .respond([]); - - today.setHours(0, 0, 0, 0); - - let weekOffset = today.getDay() - 1; - if (weekOffset < 0) weekOffset = 6; - - let started = new Date(today.getTime()); - started.setDate(started.getDate() - weekOffset); - controller.started = started; - - let ended = new Date(started.getTime()); - ended.setHours(23, 59, 59, 59); - ended.setDate(ended.getDate() + 6); - controller.ended = ended; - - controller.getWorkedHours(controller.started, controller.ended); - $httpBackend.flush(); - - expect(controller.weekDays.length).toEqual(7); - expect(controller.weekDays[weekOffset].expectedHours).toEqual(response[0].expectedHours); - expect(controller.weekDays[weekOffset].workedHours).toEqual(response[0].workedHours); - expect(controller.weekTotalHours).toEqual('10:00'); - }); - - describe('formatHours() ', () => { - it(`should format a passed timestamp to hours and minutes`, () => { - const result = controller.formatHours(3600); - - expect(result).toEqual('01:00'); - }); - }); - - describe('save() ', () => { - it(`should make a query an then call to the fetchHours() method`, () => { - const today = Date.vnNew(); - - jest.spyOn(controller, 'getWeekData').mockReturnThis(); - jest.spyOn(controller, 'getMailStates').mockReturnThis(); - - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.date = today; - controller.fetchHours = jest.fn(); - controller.selectedRow = {id: 1, timed: Date.vnNew(), direction: 'in', $orgRow: {direction: null}}; - controller.$.editEntry = { - hide: () => {} - }; - const expectedParams = {direction: 'in'}; - $httpBackend.expect('POST', 'WorkerTimeControls/1/updateTimeEntry', expectedParams).respond(200); - controller.save(); - $httpBackend.flush(); - - expect(controller.fetchHours).toHaveBeenCalledWith(); - }); - }); - - describe('$postLink() ', () => { - it(`should set the controller date as today if no timestamp is defined`, () => { - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.$params = {timestamp: undefined}; - controller.$postLink(); - - expect(controller.date).toEqual(jasmine.any(Date)); - }); - - it(`should set the controller date using the received timestamp`, () => { - const timestamp = 1; - const date = new Date(timestamp); - - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.$.calendar = {}; - controller.$params = {timestamp: timestamp}; - - controller.$postLink(); - - expect(controller.date.toDateString()).toEqual(date.toDateString()); - }); - }); - - describe('getWeekData() ', () => { - it(`should make a query an then update the state and reason`, () => { - const today = Date.vnNew(); - const response = [ - { - state: 'SENDED', - reason: null - } - ]; - - controller._date = today; - - $httpBackend.whenRoute('GET', 'WorkerTimeControlMails') - .respond(response); - - controller.getWeekData(); - $httpBackend.flush(); - - expect(controller.state).toBe('SENDED'); - expect(controller.reason).toBe(null); - }); - }); - - describe('isSatisfied() ', () => { - it(`should make a query an then call three methods`, () => { - const today = Date.vnNew(); - jest.spyOn(controller, 'getWeekData').mockReturnThis(); - jest.spyOn(controller, 'getMailStates').mockReturnThis(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.worker = {id: 1}; - controller.date = today; - controller.weekNumber = 1; - - $httpBackend.expect('POST', 'WorkerTimeControls/1/updateMailState').respond(); - controller.isSatisfied(); - $httpBackend.flush(); - - expect(controller.getMailStates).toHaveBeenCalledWith(controller.date); - expect(controller.getWeekData).toHaveBeenCalled(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('isUnsatisfied() ', () => { - it(`should throw an error is reason is empty`, () => { - let error; - try { - controller.isUnsatisfied(); - } catch (e) { - error = e; - } - - expect(error).toBeDefined(); - expect(error.message).toBe(`You must indicate a reason`); - }); - - it(`should make a query an then call three methods`, () => { - const today = Date.vnNew(); - jest.spyOn(controller, 'getWeekData').mockReturnThis(); - jest.spyOn(controller, 'getMailStates').mockReturnThis(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.worker = {id: 1}; - controller.date = today; - controller.weekNumber = 1; - controller.reason = 'reason'; - - $httpBackend.expect('POST', 'WorkerTimeControls/1/updateMailState').respond(); - controller.isSatisfied(); - $httpBackend.flush(); - - expect(controller.getMailStates).toHaveBeenCalledWith(controller.date); - expect(controller.getWeekData).toHaveBeenCalled(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('resendEmail() ', () => { - it(`should make a query an then call showSuccess method`, () => { - const today = Date.vnNew(); - - jest.spyOn(controller, 'getWeekData').mockReturnThis(); - jest.spyOn(controller, 'getMailStates').mockReturnThis(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; - controller.worker = {id: 1}; - controller.worker = {user: {emailUser: {email: 'employee@verdnatura.es'}}}; - controller.date = today; - controller.weekNumber = 1; - - $httpBackend.expect('POST', 'WorkerTimeControls/weekly-hour-record-email').respond(); - controller.resendEmail(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('getMailStates() ', () => { - it(`should make a query an then call showSuccess method`, () => { - const today = Date.vnNew(); - jest.spyOn(controller, 'repaint').mockReturnThis(); - - controller.$params = {id: 1}; - - $httpBackend.expect('GET', `WorkerTimeControls/1/getMailStates?month=1&year=2001`).respond(); - controller.getMailStates(today); - $httpBackend.flush(); - - expect(controller.repaint).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/modules/worker/front/time-control/locale/es.yml b/modules/worker/front/time-control/locale/es.yml deleted file mode 100644 index 091c01baa..000000000 --- a/modules/worker/front/time-control/locale/es.yml +++ /dev/null @@ -1,22 +0,0 @@ -In: Entrada -Out: Salida -Intermediate: Intermedio -Hour: Hora -Hours: Horas -Add time: Añadir hora -Week total: Total semana -Current week: Semana actual -This time entry will be deleted: Se eliminará la hora fichada -Are you sure you want to delete this entry?: ¿Seguro que quieres eliminarla? -Finish at: Termina a las -Entry removed: Fichada borrada -The entry type can't be empty: El tipo de fichada no puede quedar vacía -Satisfied: Conforme -Not satisfied: No conforme -Reason: Motivo -Resend: Reenviar -Email sended: Email enviado -You must indicate a reason: Debes indicar un motivo -Send time control email: Enviar email control horario -Are you sure you want to send it?: ¿Seguro que quieres enviarlo? -Resend email of this week to the user: Reenviar email de esta semana al usuario diff --git a/modules/worker/front/time-control/style.scss b/modules/worker/front/time-control/style.scss deleted file mode 100644 index 9d7545aaf..000000000 --- a/modules/worker/front/time-control/style.scss +++ /dev/null @@ -1,52 +0,0 @@ -@import "variables"; - -vn-worker-time-control { - vn-thead > vn-tr > vn-td > div.weekday { - margin-bottom: 5px; - color: $color-main - } - vn-td.hours { - min-width: 100px; - vertical-align: top; - - & > section { - display: flex; - align-items: center; - justify-content: center; - padding: 4px 0; - - & > vn-icon { - color: $color-font-secondary; - padding-right: 1px; - } - } - } - .totalBox { - max-width: none - } - -} - -.reasonDialog{ - min-width: 500px; -} - -.edit-time-entry { - width: 200px -} - -.right { - float: right; - } - -.confirmed { - color: #97B92F; -} - -.revise { - color: #f61e1e; -} - -.sended { - color: #d19b25; -} From f431d6c37f967ffedccee8f202faeb420b201d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 2 Aug 2024 13:45:58 +0200 Subject: [PATCH 039/250] Hotfix changes whit conficts merged incorrectly --- db/routines/vn/procedures/sale_setProblem.sql | 17 +++++++++++------ db/routines/vn/procedures/ticket_setProblem.sql | 14 +++++++++----- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/db/routines/vn/procedures/sale_setProblem.sql b/db/routines/vn/procedures/sale_setProblem.sql index b0870089f..b343c0b8c 100644 --- a/db/routines/vn/procedures/sale_setProblem.sql +++ b/db/routines/vn/procedures/sale_setProblem.sql @@ -11,24 +11,29 @@ BEGIN */ DECLARE vSaleFk INT; DECLARE vHasProblem INT; + DECLARE vIsProblemCalcNeeded BOOL; DECLARE vDone BOOL; - DECLARE vSaleList CURSOR FOR SELECT saleFk, hasProblem FROM tmp.sale; + DECLARE vSaleList CURSOR FOR + SELECT saleFk, hasProblem, isProblemCalcNeeded + FROM tmp.sale; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; OPEN vSaleList; l: LOOP SET vDone = FALSE; - FETCH vSaleList INTO vSaleFk, vHasProblem; + FETCH vSaleList INTO vSaleFk, vHasProblem, vIsProblemCalcNeeded; IF vDone THEN LEAVE l; END IF; UPDATE sale - SET problem = CONCAT( - IF(vHasProblem, - CONCAT(problem, ',', vProblemCode), - REPLACE(problem, vProblemCode , ''))) + SET problem = IF (vIsProblemCalcNeeded, + CONCAT( + IF(vHasProblem, + CONCAT(problem, ',', vProblemCode), + REPLACE(problem, vProblemCode , ''))), + NULL) WHERE id = vSaleFk; END LOOP; CLOSE vSaleList; diff --git a/db/routines/vn/procedures/ticket_setProblem.sql b/db/routines/vn/procedures/ticket_setProblem.sql index 66d244d5a..fea6d9b7d 100644 --- a/db/routines/vn/procedures/ticket_setProblem.sql +++ b/db/routines/vn/procedures/ticket_setProblem.sql @@ -12,24 +12,28 @@ BEGIN */ DECLARE vTicketFk INT; DECLARE vHasProblem INT; + DECLARE vIsProblemCalcNeeded BOOL; DECLARE vDone BOOL; - DECLARE vTicketList CURSOR FOR SELECT ticketFk, hasProblem FROM tmp.ticket; + DECLARE vTicketList CURSOR FOR + SELECT ticketFk, hasProblem, isProblemCalcNeeded + FROM tmp.ticket; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; OPEN vTicketList; l: LOOP SET vDone = FALSE; - FETCH vTicketList INTO vTicketFk, vHasProblem; + FETCH vTicketList INTO vTicketFk, vHasProblem, vIsProblemCalcNeeded; IF vDone THEN LEAVE l; END IF; UPDATE ticket - SET problem = CONCAT( - IF(vHasProblem, + SET problem = IF(vIsProblemCalcNeeded, + CONCAT(IF(vHasProblem, CONCAT(problem, ',', vProblemCode), - REPLACE(problem, vProblemCode , ''))) + REPLACE(problem, vProblemCode , ''))), + NULL) WHERE id = vTicketFk; END LOOP; CLOSE vTicketList; From bf7cd1530cc85645174217b7b845661f67e18073 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 2 Aug 2024 15:36:02 +0200 Subject: [PATCH 040/250] feat: refs #7283 order by desc date --- db/routines/vn/procedures/item_getBalance.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 3a594c81c..9c609b4c6 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -189,8 +189,8 @@ BEGIN SELECT * FROM sales UNION ALL SELECT * FROM orders - ORDER BY shipped, - (inventorySupplierFk = entityId) DESC, + ORDER BY shipped DESC, + (inventorySupplierFk = entityId) ASC, alertLevel DESC, isTicket, `order` DESC, From ab446b54ed2e015ebd947ba256dbe3801ee65b1c Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 11:29:35 +0200 Subject: [PATCH 041/250] feat: refs #7644 Optimized entry labels report --- loopback/locale/es.json | 3 +- modules/entry/back/methods/entry/buyLabel.js | 2 +- modules/entry/back/methods/entry/print.js | 58 +++++++++++++++++++ modules/entry/back/models/entry.js | 1 + package.json | 5 +- .../reports/buy-label/buy-label.html | 2 +- .../templates/reports/buy-label/buy-label.js | 5 +- print/templates/reports/buy-label/sql/buy.sql | 38 ++++++++++++ .../templates/reports/buy-label/sql/buys.sql | 33 ----------- 9 files changed, 107 insertions(+), 40 deletions(-) create mode 100644 modules/entry/back/methods/entry/print.js create mode 100644 print/templates/reports/buy-label/sql/buy.sql delete mode 100644 print/templates/reports/buy-label/sql/buys.sql diff --git a/loopback/locale/es.json b/loopback/locale/es.json index acc3d69f6..e1f7fd655 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -368,5 +368,6 @@ "Payment method is required": "El método de pago es obligatorio", "Cannot send mail": "Não é possível enviar o email", "CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos", - "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo" + "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo", + "The entry not have stickers": "La entrada no tiene etiquetas" } \ No newline at end of file diff --git a/modules/entry/back/methods/entry/buyLabel.js b/modules/entry/back/methods/entry/buyLabel.js index d9b0ebf1d..919f7c4d7 100644 --- a/modules/entry/back/methods/entry/buyLabel.js +++ b/modules/entry/back/methods/entry/buyLabel.js @@ -1,6 +1,6 @@ module.exports = Self => { Self.remoteMethodCtx('buyLabel', { - description: 'Returns the entry buys labels', + description: 'Returns the entry buy labels', accessType: 'READ', accepts: [ { diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js new file mode 100644 index 000000000..c155c3d8b --- /dev/null +++ b/modules/entry/back/methods/entry/print.js @@ -0,0 +1,58 @@ +const UserError = require('vn-loopback/util/user-error'); +module.exports = Self => { + Self.remoteMethodCtx('print', { + description: 'Print stickers of all entries', + accessType: 'READ', + accepts: [ + { + arg: 'id', + type: 'number', + required: true, + description: 'The entry id', + http: {source: 'path'} + } + ], + returns: [ + { + arg: 'body', + type: 'file', + root: true + }, { + arg: 'Content-Type', + type: 'String', + http: {target: 'header'} + }, { + arg: 'Content-Disposition', + type: 'String', + http: {target: 'header'} + } + ], + http: { + path: '/:id/print', + verb: 'GET' + }, + accessScopes: ['DEFAULT', 'read:multimedia'] + }); + + Self.print = async function(ctx, id, options) { + const models = Self.app.models; + const myOptions = {}; + if (typeof options == 'object') + Object.assign(myOptions, options); + + // Importación dinámica porque no admite commonjs + const PDFMerger = ((await import('pdf-merger-js')).default); + const merger = new PDFMerger(); + const buys = await models.Buy.find({where: {entryFk: id}}, myOptions); + + for (const buy of buys) { + if (buy.stickers < 1) continue; + ctx.args.id = buy.id; + const pdfBuffer = await models.Entry.buyLabel(ctx, myOptions); + await merger.add(new Uint8Array(pdfBuffer[0])); + } + + if (!merger._doc) throw new UserError('The entry not have stickers'); + return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`]; + }; +}; diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index 6e27e1ece..b11d64415 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -10,6 +10,7 @@ module.exports = Self => { require('../methods/entry/addFromPackaging')(Self); require('../methods/entry/addFromBuy')(Self); require('../methods/entry/buyLabel')(Self); + require('../methods/entry/print')(Self); Self.observe('before save', async function(ctx, options) { if (ctx.isNewInstance) return; diff --git a/package.json b/package.json index ea126bce3..32efa9ab2 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "mysql": "2.18.1", "node-ssh": "^11.0.0", "object.pick": "^1.3.0", + "pdf-merger-js": "^5.1.2", "puppeteer": "21.11.0", "read-chunk": "^3.2.0", "require-yaml": "0.0.1", @@ -80,10 +81,10 @@ "gulp-merge-json": "^1.3.1", "gulp-nodemon": "^2.5.0", "gulp-print": "^2.0.1", - "gulp-wrap": "^0.15.0", - "gulp-yaml": "^1.0.1", "gulp-rename": "^2.0.0", "gulp-replace": "^1.1.4", + "gulp-wrap": "^0.15.0", + "gulp-yaml": "^1.0.1", "html-loader": "^0.4.5", "html-loader-jest": "^0.2.1", "html-webpack-plugin": "^5.5.1", diff --git a/print/templates/reports/buy-label/buy-label.html b/print/templates/reports/buy-label/buy-label.html index 4a0d7f3fc..5777d34de 100644 --- a/print/templates/reports/buy-label/buy-label.html +++ b/print/templates/reports/buy-label/buy-label.html @@ -86,7 +86,7 @@
{{$t('boxNum')}} - {{`${buy.labelNum} / ${maxLabelNum}`}} + {{`${buy.labelNum} / ${buy.maxLabelNum}`}}
diff --git a/print/templates/reports/buy-label/buy-label.js b/print/templates/reports/buy-label/buy-label.js index 48ffe336c..932c34453 100755 --- a/print/templates/reports/buy-label/buy-label.js +++ b/print/templates/reports/buy-label/buy-label.js @@ -7,8 +7,9 @@ module.exports = { name: 'buy-label', mixins: [vnReport], async serverPrefetch() { - this.buys = await this.rawSqlFromDef('buys', [this.id, this.id]); - this.maxLabelNum = Math.max(...this.buys.map(buy => buy.labelNum)); + const models = require('vn-loopback/server/server').models; + const buy = await models.Buy.findById(this.id, null); + this.buys = await this.rawSqlFromDef('buy', [buy.entryFk, buy.entryFk, buy.entryFk, this.id]); const date = new Date(); this.weekNum = moment(date).isoWeek(); this.dayNum = moment(date).day(); diff --git a/print/templates/reports/buy-label/sql/buy.sql b/print/templates/reports/buy-label/sql/buy.sql new file mode 100644 index 000000000..72765baa9 --- /dev/null +++ b/print/templates/reports/buy-label/sql/buy.sql @@ -0,0 +1,38 @@ +WITH RECURSIVE numbers AS ( + SELECT 1 n + UNION ALL + SELECT n + 1 + FROM numbers + WHERE n < ( + SELECT MAX(stickers) + FROM buy + WHERE entryFk = ? + ) +), +labels AS ( + SELECT ROW_NUMBER() OVER(ORDER BY b.id, num.n) labelNum, + i.name, + i.`size`, + i.category, + ink.id color, + o.code, + b.packing, + b.`grouping`, + i.stems, + b.id, + b.itemFk, + p.name producer, + IF(i2.id, i2.comment, i.comment) comment + FROM buy b + JOIN item i ON i.id = b.itemFk + LEFT JOIN producer p ON p.id = i.producerFk + LEFT JOIN ink ON ink.id = i.inkFk + LEFT JOIN origin o ON o.id = i.originFk + LEFT JOIN item i2 ON i2.id = b.itemOriginalFk + JOIN numbers num + WHERE b.entryFk = ? + AND num.n <= b.stickers +) +SELECT *, (SELECT SUM(stickers) FROM buy WHERE entryFk = ?) maxLabelNum + FROM labels + WHERE id = ? \ No newline at end of file diff --git a/print/templates/reports/buy-label/sql/buys.sql b/print/templates/reports/buy-label/sql/buys.sql deleted file mode 100644 index 44b1b4bad..000000000 --- a/print/templates/reports/buy-label/sql/buys.sql +++ /dev/null @@ -1,33 +0,0 @@ -WITH RECURSIVE numbers AS ( - SELECT 1 n - UNION ALL - SELECT n + 1 - FROM numbers - WHERE n < ( - SELECT MAX(stickers) - FROM buy - WHERE entryFk = ? - ) -) -SELECT ROW_NUMBER() OVER(ORDER BY b.id, num.n) labelNum, - i.name, - i.`size`, - i.category, - ink.id color, - o.code, - b.packing, - b.`grouping`, - i.stems, - b.id, - b.itemFk, - p.name producer, - IF(i2.id, i2.comment, i.comment) comment - FROM buy b - JOIN item i ON i.id = b.itemFk - LEFT JOIN producer p ON p.id = i.producerFk - LEFT JOIN ink ON ink.id = i.inkFk - LEFT JOIN origin o ON o.id = i.originFk - LEFT JOIN item i2 ON i2.id = b.itemOriginalFk - JOIN numbers num - WHERE b.entryFk = ? - AND num.n <= b.stickers From 760a1debca18081dbc5ca48270fd64c30ffc5c4f Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 11:44:20 +0200 Subject: [PATCH 042/250] feat: refs #7644 Requested changes --- print/templates/reports/buy-label/buy-label.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print/templates/reports/buy-label/buy-label.js b/print/templates/reports/buy-label/buy-label.js index 932c34453..289483051 100755 --- a/print/templates/reports/buy-label/buy-label.js +++ b/print/templates/reports/buy-label/buy-label.js @@ -1,5 +1,6 @@ const vnReport = require('../../../core/mixins/vn-report.js'); const {DOMImplementation, XMLSerializer} = require('xmldom'); +const {models} = require('vn-loopback/server/server'); const jsBarcode = require('jsbarcode'); const moment = require('moment'); @@ -7,7 +8,6 @@ module.exports = { name: 'buy-label', mixins: [vnReport], async serverPrefetch() { - const models = require('vn-loopback/server/server').models; const buy = await models.Buy.findById(this.id, null); this.buys = await this.rawSqlFromDef('buy', [buy.entryFk, buy.entryFk, buy.entryFk, this.id]); const date = new Date(); From 32b48a7bb6fed8ff58de1a9af2f34660a669a83c Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 11:48:02 +0200 Subject: [PATCH 043/250] feat: refs #7644 Fix --- pnpm-lock.yaml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22d5b46f1..b4030d779 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ dependencies: object.pick: specifier: ^1.3.0 version: 1.3.0 + pdf-merger-js: + specifier: ^5.1.2 + version: 5.1.2 puppeteer: specifier: 21.11.0 version: 21.11.0(typescript@5.4.4) @@ -2090,6 +2093,18 @@ packages: rimraf: 3.0.2 dev: true + /@pdf-lib/standard-fonts@1.0.0: + resolution: {integrity: sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==} + dependencies: + pako: 1.0.11 + dev: false + + /@pdf-lib/upng@1.0.1: + resolution: {integrity: sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==} + dependencies: + pako: 1.0.11 + dev: false + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -4486,6 +4501,11 @@ packages: engines: {node: '>=14'} dev: true + /commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + dev: false + /commander@2.17.1: resolution: {integrity: sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==} dev: true @@ -11323,6 +11343,24 @@ packages: pinkie-promise: 2.0.1 dev: true + /pdf-lib@1.17.1: + resolution: {integrity: sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==} + dependencies: + '@pdf-lib/standard-fonts': 1.0.0 + '@pdf-lib/upng': 1.0.1 + pako: 1.0.11 + tslib: 1.14.1 + dev: false + + /pdf-merger-js@5.1.2: + resolution: {integrity: sha512-RCBjLQILZ8UA4keO/Ip2/gjUuxigMMoK7mO5eJg6zjlnyymboFnRTgzKwOs/FiU9ornS2m72Qr95oARX1C24fw==} + engines: {node: '>=14'} + hasBin: true + dependencies: + commander: 11.1.0 + pdf-lib: 1.17.1 + dev: false + /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: false @@ -13836,6 +13874,10 @@ packages: resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} dev: false + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: false + /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} From 967443b4278edb3ae0e99f23bd14421713a53e17 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 12:26:16 +0200 Subject: [PATCH 044/250] fix: refs #7834 expeditionScan_Put --- db/routines/vn/procedures/expeditionScan_Put.sql | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index 9744a7cd7..a5afc824f 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -1,11 +1,14 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`( + vPalletFk INT, + vExpeditionFk INT +) BEGIN - - REPLACE vn.expeditionScan(expeditionFk, palletFk) + IF (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN + REPLACE expeditionScan(expeditionFk, palletFk) VALUES(vExpeditionFk, vPalletFk); - + SELECT LAST_INSERT_ID() INTO vPalletFk; - + END IF; END$$ DELIMITER ; From fa3a7aa9312a3ca591377cc6bb1b5ea5516765a6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 12:49:04 +0200 Subject: [PATCH 045/250] refactor: refs #7820 Deprecated silexACL --- db/versions/11179-whiteLaurel/00-firstScript.sql | 2 ++ myt.config.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 db/versions/11179-whiteLaurel/00-firstScript.sql diff --git a/db/versions/11179-whiteLaurel/00-firstScript.sql b/db/versions/11179-whiteLaurel/00-firstScript.sql new file mode 100644 index 000000000..4a4e32c9d --- /dev/null +++ b/db/versions/11179-whiteLaurel/00-firstScript.sql @@ -0,0 +1,2 @@ +RENAME TABLE vn.silexACL TO vn.silexACL__; +ALTER TABLE vn.silexACL__ COMMENT='@deprecated 2024-08-05 refs #7820'; diff --git a/myt.config.yml b/myt.config.yml index 116e3668a..ffa4188b2 100755 --- a/myt.config.yml +++ b/myt.config.yml @@ -66,7 +66,6 @@ fixtures: - siiTrascendencyInvoiceIn - siiTypeInvoiceIn - siiTypeInvoiceOut - - silexACL - state - ticketUpdateAction - volumeConfig From 91253cc8070e16ae54c2bed1afda53edad5b11fe Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 5 Aug 2024 12:57:38 +0200 Subject: [PATCH 046/250] fix: refs #7835 transferSales --- modules/ticket/back/methods/ticket/transferSales.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index 54306510c..5f5fdde67 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -83,12 +83,12 @@ module.exports = Self => { for (const sale of sales) { const originalSale = map.get(sale.id); - if (sale.quantity == originalSale.quantity) { + if (sale.quantity == originalSale?.quantity) { query = `UPDATE sale SET ticketFk = ? WHERE id = ?`; await Self.rawSql(query, [ticketId, sale.id], myOptions); - } else if (sale.quantity != originalSale.quantity) { + } else if (sale.quantity != originalSale?.quantity) { await transferPartialSale( ticketId, originalSale, sale, myOptions); } From be5859b8cfcf4116d77f204c8c1842a6d5bbc5b1 Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 5 Aug 2024 14:28:29 +0200 Subject: [PATCH 047/250] prototipo --- .../supplier_statementWithEntries.sql | 166 ++++++++++++++++++ .../11180-navyGerbera/00-firstScript.sql | 2 + 2 files changed, 168 insertions(+) create mode 100644 db/routines/vn/procedures/supplier_statementWithEntries.sql create mode 100644 db/versions/11180-navyGerbera/00-firstScript.sql diff --git a/db/routines/vn/procedures/supplier_statementWithEntries.sql b/db/routines/vn/procedures/supplier_statementWithEntries.sql new file mode 100644 index 000000000..25a104af3 --- /dev/null +++ b/db/routines/vn/procedures/supplier_statementWithEntries.sql @@ -0,0 +1,166 @@ +DELIMITER $$ +$$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.supplier_statementWithEntries( + vSupplierFk INT, + vCurrencyFk INT, + vCompanyFk INT, + vOrderBy VARCHAR(15), + vIsConciliated BOOL, + vHasEntries BOOL +) +BEGIN +/** +* Creates a supplier statement, calculating balances in euros and the specified currency. +* +* @param vSupplierFk Supplier ID +* @param vCurrencyFk Currency ID +* @param vCompanyFk Company ID +* @param vOrderBy Order by criteria +* @param vIsConciliated Indicates whether it is reconciled or not +* @param vHasEntries Indicates if future entries must be shown +* @return tmp.supplierStatement +*/ + SET @euroBalance:= 0; + SET @currencyBalance:= 0; + + CREATE OR REPLACE TEMPORARY TABLE tmp.supplierStatement + ENGINE = MEMORY + SELECT *, + @euroBalance:= ROUND( + @euroBalance + IFNULL(paymentEuros, 0) - + IFNULL(invoiceEuros, 0), 2 + ) euroBalance, + @currencyBalance:= ROUND( + @currencyBalance + IFNULL(paymentCurrency, 0) - + IFNULL(invoiceCurrency, 0), 2 + ) currencyBalance + FROM ( + SELECT * FROM + ( + SELECT NULL bankFk, + ii.companyFk, + ii.serial, + ii.id, + CASE + WHEN vOrderBy = 'issued' THEN ii.issued + WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried + WHEN vOrderBy = 'booked' THEN ii.booked + WHEN vOrderBy = 'dueDate' THEN iid.dueDated + END dated, + CONCAT('S/Fra ', ii.supplierRef) sref, + IF(ii.currencyFk > 1, + ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), + NULL + ) changeValue, + CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, + CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, + NULL paymentEuros, + NULL paymentCurrency, + ii.currencyFk, + ii.isBooked, + c.code, + 'invoiceIn' statementType + FROM invoiceIn ii + JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id + JOIN currency c ON c.id = ii.currencyFk + JOIN invoiceInConfig iic + WHERE ii.issued >= iic.balanceStartingDate + AND ii.supplierFk = vSupplierFk + AND vCurrencyFk IN (ii.currencyFk, 0) + AND vCompanyFk IN (ii.companyFk, 0) + AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) + GROUP BY iid.id + UNION ALL + SELECT p.bankFk, + p.companyFk, + NULL, + p.id, + CASE + WHEN vOrderBy = 'issued' THEN p.received + WHEN vOrderBy = 'bookEntried' THEN p.received + WHEN vOrderBy = 'booked' THEN p.received + WHEN vOrderBy = 'dueDate' THEN p.dueDated + END, + CONCAT(IFNULL(pm.name, ''), + IF(pn.concept <> '', + CONCAT(' : ', pn.concept), + '') + ), + IF(p.currencyFk > 1, p.divisa / p.amount, NULL), + NULL, + NULL, + p.amount, + p.divisa, + p.currencyFk, + p.isConciliated, + c.code, + 'payment' + FROM payment p + LEFT JOIN currency c ON c.id = p.currencyFk + LEFT JOIN accounting a ON a.id = p.bankFk + LEFT JOIN payMethod pm ON pm.id = p.payMethodFk + LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id + JOIN invoiceInConfig iic + WHERE p.received >= iic.balanceStartingDate + AND p.supplierFk = vSupplierFk + AND vCurrencyFk IN (p.currencyFk, 0) + AND vCompanyFk IN (p.companyFk, 0) + AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL, + companyFk, + NULL, + se.id, + CASE + WHEN vOrderBy = 'issued' THEN se.dated + WHEN vOrderBy = 'bookEntried' THEN se.dated + WHEN vOrderBy = 'booked' THEN se.dated + WHEN vOrderBy = 'dueDate' THEN se.dueDated + END, + se.description, + 1, + amount, + NULL, + NULL, + NULL, + currencyFk, + isConciliated, + c.`code`, + 'expense' + FROM supplierExpense se + JOIN currency c ON c.id = se.currencyFk + WHERE se.supplierFk = vSupplierFk + AND vCurrencyFk IN (se.currencyFk,0) + AND vCompanyFk IN (se.companyFk,0) + AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL bankFk, + e.companyFk, + 'E' serial, + e.invoiceNumber id, + tr.landed dated, + CONCAT('Ent. ',e.id) sref, + 1 / ((e.commission/100)+1) changeValue, + e.invoiceAmount * (1 + (e.commission/100)), + e.invoiceAmount, + NULL, + NULL, + e.currencyFk, + FALSE isBooked, + c.code, + 'order' + FROM vn.entry e + JOIN travel tr ON tr.id = e.travelFk + JOIN currency c ON c.id = e.currencyFk + WHERE e.supplierFk = vSupplierFk + AND tr.landed >= CURDATE() + AND e.invoiceInFk IS NULL + AND vHasEntries + ) sub + ORDER BY (dated IS NULL AND NOT isBooked), + dated, + IF(vOrderBy = 'dueDate', id, NULL) + LIMIT 10000000000000000000 + ) t; +END;$$ +DELIMITER ; diff --git a/db/versions/11180-navyGerbera/00-firstScript.sql b/db/versions/11180-navyGerbera/00-firstScript.sql new file mode 100644 index 000000000..8c5d79ce8 --- /dev/null +++ b/db/versions/11180-navyGerbera/00-firstScript.sql @@ -0,0 +1,2 @@ +-- Place your SQL code here +ALTER TABLE vn.invoiceInConfig ADD balanceStartingDate DATE DEFAULT '2015-01-01' NOT NULL; From e95d722a7c9c1b7a2be0b1cee7a89cfa32095ff5 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 5 Aug 2024 14:52:09 +0200 Subject: [PATCH 048/250] add changelog --- CHANGELOG.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f59a3d4c6..6db79a40a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,61 @@ +# Version 24.32 - 2024-08-06 + +### Added 🆕 + +- chore: refs #7197 add supplierActivityFk filter by:jorgep +- feat checkExpeditionPrintOut refs #7751 by:sergiodt +- feat(defaulter_filter): add department by:alexm +- feat: redirect to lilium page not found by:alexm +- feat: refactor buyUltimate refs #7736 by:Carlos Andrés +- feat: refs #6403 add delete by:pablone +- feat: refs #7126 Added manaClaim calc by:guillermo +- feat: refs #7126 Refactor and added columns in bs.waste table & proc by:guillermo +- feat: refs #7197 filter by correcting by:jorgep +- feat: refs #7297 add new columns by:pablone +- feat: refs #7356 new parameters in sql for Weekly tickets front by:Jon +- feat: refs #7401 redirect lilium by:pablone +- feat: refs #7511 Fix tests by:guillermo +- feat: refs #7511 Rename to multiConfig tables by:guillermo +- feat: refs #7589 Added display (item_valuateInventory) by:guillermo +- feat: refs #7589 Added vItemTypeFk & vItemCategoryFk (item_valuateInventory) by:guillermo +- feat: refs #7681 Changes by:guillermo +- feat: refs #7681 Optimization and refactor by:guillermo +- feat: refs #7683 drop temporary table by:robert +- feat: refs #7683 productionControl by:robert +- feat: refs #7728 Added throw due date by:guillermo +- feat: refs #7740 Ticket before update added restriction by:guillermo +- feat(salix): #7648 Add field for endpoint as buyLabel report by:Javier Segarra +- feat(salix): #7648 remove white line by:Javier Segarra +- feat: tabla config dias margen vctos. refs #7728 by:Carlos Andrés + +### Changed 📦 + +- eat: refactor buyUltimate refs #7736 by:Carlos Andrés +- feat: refactor buyUltimate refs #7736 by:Carlos Andrés +- feat: refs #7681 Optimization and refactor by:guillermo +- refactor: refs #7126 Requested changes by:guillermo +- refactor: refs #7511 Minor change by:guillermo +- refactor: refs #7640 Multipleinventory available by:guillermo +- refactor: refs #7681 Changes by:guillermo +- refactor: refs #7681 Requested changes by:guillermo + +### Fixed 🛠️ + +- add prefix (hotFix_liliumRedirection) by:alexm +- fix(client_filter): add recovery by:alexm +- fix: defaulter filter correct sql (6943-fix_defaulter_filter) by:alexm +- fix(deletExpeditions): merge test → dev by:guillermo +- fix: refs #6403 fix mrw cancel shipment return type by:pablone +- fix: refs #7126 Added addressWaste type by:guillermo +- fix: refs #7126 Fix by:guillermo +- fix: refs #7126 Minor change by:guillermo +- fix: refs #7126 Primary key no unique data by:guillermo +- fix: refs #7126 Slow update by:guillermo +- fix: refs #7511 Minor change by:guillermo +- fix: refs #7546 Deleted insert util.binlogQueue by:guillermo +- fix: refs #7811 Variables pm2 by:guillermo +- fix: without path by:alexm + # Version 24.28 - 2024-07-09 ### Added 🆕 From e03a1914d94e1f0a9eea3bda1afbff38b5f79af8 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 6 Aug 2024 07:27:36 +0200 Subject: [PATCH 049/250] fix: refs #7834 Throw --- db/routines/vn/procedures/expeditionScan_Put.sql | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index a5afc824f..2a3e00df7 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -5,10 +5,16 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put` ) BEGIN IF (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN - REPLACE expeditionScan(expeditionFk, palletFk) - VALUES(vExpeditionFk, vPalletFk); - - SELECT LAST_INSERT_ID() INTO vPalletFk; + CALL util.throw('Expedition not exists'); END IF; + + IF (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN + CALL util.throw('Pallet not exists'); + END IF; + + REPLACE expeditionScan(expeditionFk, palletFk) + VALUES(vExpeditionFk, vPalletFk); + + SELECT LAST_INSERT_ID() INTO vPalletFk; END$$ DELIMITER ; From 54e6c63b8b246090686ed17511a1ca7c7a138a6f Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 6 Aug 2024 07:29:32 +0200 Subject: [PATCH 050/250] fix: refs #7834 SELECT --- db/routines/vn/procedures/expeditionScan_Put.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index 2a3e00df7..68e124e4b 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -14,7 +14,5 @@ BEGIN REPLACE expeditionScan(expeditionFk, palletFk) VALUES(vExpeditionFk, vPalletFk); - - SELECT LAST_INSERT_ID() INTO vPalletFk; END$$ DELIMITER ; From 70a91da0ffdbdfb7e32743976155a1b1fefd8cfc Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 6 Aug 2024 08:27:40 +0200 Subject: [PATCH 051/250] build: dump 2432 --- db/dump/.dump/data.sql | 28 +- db/dump/.dump/privileges.sql | 8 + db/dump/.dump/structure.sql | 2030 ++++++++++++++++++++-------------- db/dump/.dump/triggers.sql | 23 +- 4 files changed, 1212 insertions(+), 877 deletions(-) diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql index 711524e4c..f6bc84db7 100644 --- a/db/dump/.dump/data.sql +++ b/db/dump/.dump/data.sql @@ -3,7 +3,7 @@ USE `util`; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -INSERT INTO `version` VALUES ('vn-database','11154','04ff3e0cc79b00272d1ebbde7196292eab651c1d','2024-07-23 09:24:55','11163'); +INSERT INTO `version` VALUES ('vn-database','11161','36dee872d62ba2421c05503f374f6b208c40ecfa','2024-08-06 07:53:56','11180'); INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL); @@ -822,6 +822,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11034','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11037','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11038','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11040','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11042','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11044','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11046','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL); @@ -896,14 +897,22 @@ INSERT INTO `versionLog` VALUES ('vn-database','11138','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11139','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-08 10:58:01',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11140','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:34',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11145','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 13:55:46',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11146','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11149','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:35',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11150','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:35',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11152','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-16 09:06:11',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11154','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:35',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11155','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11156','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11157','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-16 13:11:00',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11158','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-17 17:06:30',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11159','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-18 17:23:32',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11160','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-18 13:46:16',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11161','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11164','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-23 11:03:16',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11168','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 08:58:34',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11169','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 12:38:13',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11177','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-30 12:42:28',NULL,NULL); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; @@ -2046,13 +2055,14 @@ INSERT INTO `ACL` VALUES (892,'WorkerIncome','*','*','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (893,'PayrollComponent','*','*','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (894,'Worker','__get__incomes','*','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (896,'Expedition_PrintOut','*','READ','ALLOW','ROLE','production'); INSERT INTO `ACL` VALUES (897,'WorkerLog','*','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system'); INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier'); INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier'); INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier'); INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production'); +INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier'); +INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production'); INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee'); INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee'); @@ -2137,11 +2147,11 @@ INSERT INTO `module` VALUES ('wagon'); INSERT INTO `module` VALUES ('worker'); INSERT INTO `module` VALUES ('zone'); -INSERT INTO `defaultViewConfig` VALUES ('itemsIndex','{\"intrastat\":false,\"stemMultiplier\":false,\"landed\":false,\"producer\":false}'); -INSERT INTO `defaultViewConfig` VALUES ('latestBuys','{\"intrastat\":false,\"description\":false,\"density\":false,\"isActive\":false,\n \"freightValue\":false,\"packageValue\":false,\"isIgnored\":false,\"price2\":false,\"ektFk\":false,\"weight\":false,\n \"size\":false,\"comissionValue\":false,\"landing\":false}'); -INSERT INTO `defaultViewConfig` VALUES ('ticketsMonitor','{\"id\":false}'); -INSERT INTO `defaultViewConfig` VALUES ('clientsDetail','{\"id\":true,\"phone\":true,\"city\":true,\"socialName\":true,\"salesPersonFk\":true,\"email\":true,\"name\":false,\"fi\":false,\"credit\":false,\"creditInsurance\":false,\"mobile\":false,\"street\":false,\"countryFk\":false,\"provinceFk\":false,\"postcode\":false,\"created\":false,\"businessTypeFk\":false,\"payMethodFk\":false,\"sageTaxTypeFk\":false,\"sageTransactionTypeFk\":false,\"isActive\":false,\"isVies\":false,\"isTaxDataChecked\":false,\"isEqualizated\":false,\"isFreezed\":false,\"hasToInvoice\":false,\"hasToInvoiceByAddress\":false,\"isToBeMailed\":false,\"hasLcr\":false,\"hasCoreVnl\":false,\"hasSepaVnl\":false}'); -INSERT INTO `defaultViewConfig` VALUES ('routesList','{\"ID\":true,\"worker\":true,\"agency\":true,\"vehicle\":true,\"date\":true,\"volume\":true,\"description\":true,\"started\":true,\"finished\":true,\"actions\":true}'); +INSERT INTO `defaultViewMultiConfig` VALUES ('itemsIndex','{\"intrastat\":false,\"stemMultiplier\":false,\"landed\":false,\"producer\":false}'); +INSERT INTO `defaultViewMultiConfig` VALUES ('latestBuys','{\"intrastat\":false,\"description\":false,\"density\":false,\"isActive\":false,\n \"freightValue\":false,\"packageValue\":false,\"isIgnored\":false,\"price2\":false,\"ektFk\":false,\"weight\":false,\n \"size\":false,\"comissionValue\":false,\"landing\":false}'); +INSERT INTO `defaultViewMultiConfig` VALUES ('ticketsMonitor','{\"id\":false}'); +INSERT INTO `defaultViewMultiConfig` VALUES ('clientsDetail','{\"id\":true,\"phone\":true,\"city\":true,\"socialName\":true,\"salesPersonFk\":true,\"email\":true,\"name\":false,\"fi\":false,\"credit\":false,\"creditInsurance\":false,\"mobile\":false,\"street\":false,\"countryFk\":false,\"provinceFk\":false,\"postcode\":false,\"created\":false,\"businessTypeFk\":false,\"payMethodFk\":false,\"sageTaxTypeFk\":false,\"sageTransactionTypeFk\":false,\"isActive\":false,\"isVies\":false,\"isTaxDataChecked\":false,\"isEqualizated\":false,\"isFreezed\":false,\"hasToInvoice\":false,\"hasToInvoiceByAddress\":false,\"isToBeMailed\":false,\"hasLcr\":false,\"hasCoreVnl\":false,\"hasSepaVnl\":false}'); +INSERT INTO `defaultViewMultiConfig` VALUES ('routesList','{\"ID\":true,\"worker\":true,\"agency\":true,\"vehicle\":true,\"date\":true,\"volume\":true,\"description\":true,\"started\":true,\"finished\":true,\"actions\":true}'); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; @@ -2153,6 +2163,7 @@ USE `vn`; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; INSERT INTO `alertLevel` VALUES ('FREE',0,1); +INSERT INTO `alertLevel` VALUES ('ON_PREVIOUS',1,1); INSERT INTO `alertLevel` VALUES ('ON_PREPARATION',2,1); INSERT INTO `alertLevel` VALUES ('PACKED',3,0); INSERT INTO `alertLevel` VALUES ('DELIVERED',4,0); @@ -2384,7 +2395,7 @@ INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1 INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (44,'management','GERENCIA',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); @@ -2722,6 +2733,7 @@ INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',2,37,1, INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',2,29,1,0,1,0,0,1,2,0,'warning'); INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',NULL,16,0,1,0,0,0,0,0,0,NULL); INSERT INTO `ticketUpdateAction` VALUES (1,'Cambiar los precios en el ticket','renewPrices'); INSERT INTO `ticketUpdateAction` VALUES (2,'Convertir en maná','mana'); diff --git a/db/dump/.dump/privileges.sql b/db/dump/.dump/privileges.sql index dc0549de4..7776e6d5a 100644 --- a/db/dump/.dump/privileges.sql +++ b/db/dump/.dump/privileges.sql @@ -1292,6 +1292,8 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','buffer','juan@db-p INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','greuge','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','item','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select,Update'); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemShelving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','agencyIncoming','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','addressObservation','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','negativeOrigin','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','Vehiculos_consumo','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','entryOrder','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); @@ -1357,6 +1359,8 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accounting', INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accounting','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketRequest','guillermo@10.5.1.3','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Vehiculos_consumo','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budgetState','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleState','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','expeditionState','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','specialPrice','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); @@ -1379,6 +1383,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','professionalCategor INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','ticketObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deliveryNoteState','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','inventoryConfig','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','comparative','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceOutExpense','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','delivery','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); @@ -1404,6 +1409,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','teamBoss','business','guiller INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketServiceType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','business','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select'); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierAgencyTerm','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemMinimumQuantity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientRate','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','entryEditor','Entradas','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert','Update'); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','clientInforma','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); @@ -1428,6 +1434,8 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessReasonEnd','guil INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buySource','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','claims_ratio','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','shelfMultiConfig','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientConfig','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','albaran','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','albaran_gestdoc','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','albaran_state','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); diff --git a/db/dump/.dump/structure.sql b/db/dump/.dump/structure.sql index 174471895..4790e156c 100644 --- a/db/dump/.dump/structure.sql +++ b/db/dump/.dump/structure.sql @@ -4499,20 +4499,22 @@ DROP TABLE IF EXISTS `waste`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `waste` ( - `buyer` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `year` int(4) NOT NULL, `week` int(2) NOT NULL, - `family` varchar(30) NOT NULL, + `buyerFk` int(10) unsigned NOT NULL, + `itemTypeFk` smallint(5) unsigned NOT NULL, `itemFk` int(11) NOT NULL DEFAULT 0, - `itemTypeFk` smallint(5) unsigned DEFAULT NULL, - `saleTotal` decimal(16,0) DEFAULT NULL, - `saleWaste` decimal(16,0) DEFAULT NULL, - `rate` decimal(5,1) DEFAULT NULL, - PRIMARY KEY (`buyer`,`year`,`week`,`family`,`itemFk`), + `saleQuantity` decimal(10,2) DEFAULT NULL, + `saleTotal` decimal(10,2) DEFAULT NULL, + `saleInternalWaste` decimal(10,2) DEFAULT NULL, + `saleExternalWaste` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`year`,`week`,`buyerFk`,`itemTypeFk`,`itemFk`), KEY `waste_itemType_id` (`itemTypeFk`), KEY `waste_item_id` (`itemFk`), + KEY `waste_user_FK` (`buyerFk`), CONSTRAINT `waste_itemType_id` FOREIGN KEY (`itemTypeFk`) REFERENCES `vn`.`itemType` (`id`), - CONSTRAINT `waste_item_id` FOREIGN KEY (`itemFk`) REFERENCES `vn`.`item` (`id`) ON UPDATE CASCADE + CONSTRAINT `waste_item_id` FOREIGN KEY (`itemFk`) REFERENCES `vn`.`item` (`id`) ON UPDATE CASCADE, + CONSTRAINT `waste_user_FK` FOREIGN KEY (`buyerFk`) REFERENCES `account`.`user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6525,32 +6527,51 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `waste_addSales`() BEGIN - DECLARE vWeek INT; - DECLARE vYear INT; + DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY; + DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; + + CALL cache.last_buy_refresh(FALSE); - SELECT week, year - INTO vWeek, vYear - FROM vn.time - WHERE dated = util.VN_CURDATE(); - REPLACE bs.waste - SELECT *, 100 * mermas / total as porcentaje - FROM ( - SELECT buyer, - year, - week, - family, - itemFk, - itemTypeFk, - floor(sum(value)) as total, - floor(sum(IF(typeFk = 'loses', value, 0))) as mermas - FROM vn.saleValue - where year = vYear and week = vWeek - - GROUP BY family, itemFk - - ) sub - ORDER BY mermas DESC; + SELECT YEAR(t.shipped), + WEEK(t.shipped, 4), + it.workerFk, + it.id, + s.itemFk, + SUM(s.quantity), + SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity) `value`, + SUM ( + IF( + aw.`type` = 'internal', + (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, + 0 + ) + ) internalWaste, + SUM ( + IF( + aw.`type` = 'external', + (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, + IF(c.code = 'manaClaim', + sc.value * s.quantity, + 0 + ) + ) + ) externalWaste + FROM vn.sale s + JOIN vn.item i ON i.id = s.itemFk + JOIN vn.itemType it ON it.id = i.typeFk + JOIN vn.ticket t ON t.id = s.ticketFk + JOIN vn.address a FORCE INDEX (PRIMARY) ON a.id = t.addressFk + LEFT JOIN vn.addressWaste aw ON aw.addressFk = a.id + JOIN vn.warehouse w ON w.id = t.warehouseFk + JOIN cache.last_buy lb ON lb.item_id = i.id + AND lb.warehouse_id = w.id + JOIN vn.buy b ON b.id = lb.buy_id + LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id + LEFT JOIN vn.component c ON c.id = sc.componentFk + WHERE t.shipped BETWEEN vDateFrom AND vDateTo + AND w.isManaged + GROUP BY it.id, i.id; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -7745,7 +7766,7 @@ proc: BEGIN SELECT inventoried INTO started FROM vn.config LIMIT 1; SET ended = util.VN_CURDATE(); -- TIMESTAMPADD(DAY, -1, util.VN_CURDATE()); - CALL vn.buyUltimateFromInterval(NULL, started, ended); + CALL vn.buy_getUltimateFromInterval(NULL, NULL, started, ended); DELETE FROM last_buy; @@ -7889,9 +7910,12 @@ proc:BEGIN CREATE OR REPLACE TEMPORARY TABLE tmp.itemVisible (PRIMARY KEY (item_id)) ENGINE = MEMORY - SELECT item_id, amount stock, amount visible - FROM cache.stock - WHERE warehouse_id = v_warehouse; + SELECT s.item_id, SUM(s.amount) stock, SUM(s.amount) visible + FROM stock s + JOIN vn.warehouse w ON w.id = s.warehouse_id + WHERE (v_warehouse IS NULL OR s.warehouse_id = v_warehouse) + AND w.isComparative + GROUP BY s.item_id; -- Calculamos los movimientos confirmados de hoy CALL vn.item_calcVisible(NULL, v_warehouse); @@ -7964,6 +7988,7 @@ CREATE TABLE `expedition_PrintOut` ( `longName` varchar(30) DEFAULT NULL, `shelvingFk` varchar(5) DEFAULT NULL, `comments` varchar(100) DEFAULT NULL, + `isChecked` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Indica si la expedición ha sido revisada por un revisor', PRIMARY KEY (`expeditionFk`), KEY `expedition_PrintOut_FK` (`printerFk`), CONSTRAINT `expedition_PrintOut_FK` FOREIGN KEY (`printerFk`) REFERENCES `printer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE @@ -8608,13 +8633,13 @@ CREATE TABLE `feature` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `fileConfig` +-- Table structure for table `fileMultiConfig` -- -DROP TABLE IF EXISTS `fileConfig`; +DROP TABLE IF EXISTS `fileMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `fileConfig` ( +CREATE TABLE `fileMultiConfig` ( `name` varchar(25) NOT NULL, `checksum` text DEFAULT NULL, `keyValue` tinyint(1) NOT NULL DEFAULT 1, @@ -8687,13 +8712,13 @@ CREATE TABLE `goodCharacteristic` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `imapConfig` +-- Table structure for table `imapMultiConfig` -- -DROP TABLE IF EXISTS `imapConfig`; +DROP TABLE IF EXISTS `imapMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `imapConfig` ( +CREATE TABLE `imapMultiConfig` ( `id` tinyint(3) unsigned NOT NULL, `environment` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `host` varchar(150) NOT NULL DEFAULT 'localhost', @@ -9219,13 +9244,13 @@ CREATE TABLE `supplyResponseLog` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `tableConfig` +-- Table structure for table `tableMultiConfig` -- -DROP TABLE IF EXISTS `tableConfig`; +DROP TABLE IF EXISTS `tableMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tableConfig` ( +CREATE TABLE `tableMultiConfig` ( `fileName` varchar(2) NOT NULL, `toTable` varchar(15) NOT NULL, `file` varchar(30) NOT NULL, @@ -12256,13 +12281,13 @@ CREATE TABLE `shelf` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `shelfConfig` +-- Table structure for table `shelfMultiConfig` -- -DROP TABLE IF EXISTS `shelfConfig`; +DROP TABLE IF EXISTS `shelfMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shelfConfig` ( +CREATE TABLE `shelfMultiConfig` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) NOT NULL, `namePrefix` varchar(50) DEFAULT NULL, @@ -12276,9 +12301,9 @@ CREATE TABLE `shelfConfig` ( KEY `shelf_id` (`shelf`), KEY `family_id` (`family`), KEY `warehouse_id` (`warehouse`), - CONSTRAINT `shelfConfig_ibfk_1` FOREIGN KEY (`family`) REFERENCES `vn`.`itemType` (`id`), - CONSTRAINT `shelfConfig_ibfk_2` FOREIGN KEY (`shelf`) REFERENCES `shelf` (`id`) ON UPDATE CASCADE, - CONSTRAINT `shelfConfig_ibfk_3` FOREIGN KEY (`warehouse`) REFERENCES `vn`.`warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `shelfMultiConfig_ibfk_1` FOREIGN KEY (`family`) REFERENCES `vn`.`itemType` (`id`), + CONSTRAINT `shelfMultiConfig_ibfk_2` FOREIGN KEY (`shelf`) REFERENCES `shelf` (`id`) ON UPDATE CASCADE, + CONSTRAINT `shelfMultiConfig_ibfk_3` FOREIGN KEY (`warehouse`) REFERENCES `vn`.`warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -15834,7 +15859,7 @@ CREATE TABLE `queue` ( UNIQUE KEY `name` (`name`), UNIQUE KEY `description` (`description`), KEY `config` (`config`), - CONSTRAINT `queue_ibfk_1` FOREIGN KEY (`config`) REFERENCES `queueConfig` (`id`) ON UPDATE CASCADE + CONSTRAINT `queue_ibfk_1` FOREIGN KEY (`config`) REFERENCES `queueMultiConfig` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Queues'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -15856,25 +15881,6 @@ SET character_set_client = utf8; 1 AS `ringinuse` */; SET character_set_client = @saved_cs_client; --- --- Table structure for table `queueConfig` --- - -DROP TABLE IF EXISTS `queueConfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `queueConfig` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `strategy` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `timeout` int(10) unsigned NOT NULL, - `retry` int(10) unsigned NOT NULL, - `weight` int(10) unsigned NOT NULL, - `maxLen` int(10) unsigned NOT NULL, - `ringInUse` tinyint(4) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Default values for queues configuration'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `queueMember` -- @@ -15909,6 +15915,25 @@ SET character_set_client = utf8; 1 AS `paused` */; SET character_set_client = @saved_cs_client; +-- +-- Table structure for table `queueMultiConfig` +-- + +DROP TABLE IF EXISTS `queueMultiConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `queueMultiConfig` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `strategy` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + `timeout` int(10) unsigned NOT NULL, + `retry` int(10) unsigned NOT NULL, + `weight` int(10) unsigned NOT NULL, + `maxLen` int(10) unsigned NOT NULL, + `ringInUse` tinyint(4) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Default values for queues configuration'; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `queuePhone` -- @@ -19090,13 +19115,13 @@ CREATE TABLE `authCode` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `defaultViewConfig` +-- Table structure for table `defaultViewMultiConfig` -- -DROP TABLE IF EXISTS `defaultViewConfig`; +DROP TABLE IF EXISTS `defaultViewMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `defaultViewConfig` ( +CREATE TABLE `defaultViewMultiConfig` ( `tableCode` varchar(25) NOT NULL, `columns` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='The default configuration of columns for views'; @@ -26523,6 +26548,7 @@ CREATE TABLE `agencyLog` ( `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), `changedModelId` int(11) NOT NULL, `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`), KEY `logAgencyUserFk` (`userFk`), KEY `agencyLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), @@ -27664,8 +27690,10 @@ CREATE TABLE `calendar` ( KEY `calendar_employee_business_labour_id_idx` (`businessFk`), KEY `calendar_employee_calendar_state_calendar_state_id_idx` (`dayOffTypeFk`), KEY `id_index` (`id`), + KEY `calendar_user_FK` (`editorFk`), CONSTRAINT `calendar_FK` FOREIGN KEY (`dayOffTypeFk`) REFERENCES `absenceType` (`id`) ON UPDATE CASCADE, - CONSTRAINT `calendar_businessFk` FOREIGN KEY (`businessFk`) REFERENCES `business` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `calendar_businessFk` FOREIGN KEY (`businessFk`) REFERENCES `business` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `calendar_user_FK` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -29332,24 +29360,6 @@ CREATE TABLE `conveyorBuildingClass` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Tipo de caja para el montaje de pallets'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `conveyorConfig` --- - -DROP TABLE IF EXISTS `conveyorConfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `conveyorConfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `itemName` varchar(45) NOT NULL, - `length` int(11) DEFAULT NULL, - `width` int(11) DEFAULT NULL, - `height` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `itemName_UNIQUE` (`itemName`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `conveyorExpedition` -- @@ -29398,6 +29408,24 @@ CREATE TABLE `conveyorMode` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `conveyorMultiConfig` +-- + +DROP TABLE IF EXISTS `conveyorMultiConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `conveyorMultiConfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `itemName` varchar(45) NOT NULL, + `length` int(11) DEFAULT NULL, + `width` int(11) DEFAULT NULL, + `height` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `itemName_UNIQUE` (`itemName`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `conveyorType` -- @@ -32085,6 +32113,7 @@ CREATE TABLE `invoiceInConfig` ( `sageFarmerWithholdingFk` smallint(6) NOT NULL, `daysAgo` int(10) unsigned DEFAULT 45 COMMENT 'Días en el pasado para mostrar facturas en invoiceIn series en salix', `taxRowLimit` int(11) DEFAULT 4 COMMENT 'Número máximo de líneas de IVA que puede tener una factura', + `dueDateMarginDays` int(10) unsigned DEFAULT 2, PRIMARY KEY (`id`), KEY `invoiceInConfig_sageWithholdingFk` (`sageFarmerWithholdingFk`), CONSTRAINT `invoiceInConfig_sageWithholdingFk` FOREIGN KEY (`sageFarmerWithholdingFk`) REFERENCES `sage`.`TiposRetencion` (`CodigoRetencion`) ON DELETE CASCADE ON UPDATE CASCADE, @@ -32438,13 +32467,13 @@ CREATE TABLE `invoiceOutTax` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `invoiceOutTaxConfig` +-- Table structure for table `invoiceOutTaxMultiConfig` -- -DROP TABLE IF EXISTS `invoiceOutTaxConfig`; +DROP TABLE IF EXISTS `invoiceOutTaxMultiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `invoiceOutTaxConfig` ( +CREATE TABLE `invoiceOutTaxMultiConfig` ( `id` int(11) NOT NULL AUTO_INCREMENT, `taxClassCodeFk` varchar(1) DEFAULT NULL, `taxTypeSageFk` smallint(6) DEFAULT NULL, @@ -32534,6 +32563,12 @@ CREATE TABLE `item` ( `minQuantity__` int(10) unsigned DEFAULT NULL COMMENT '@deprecated 2024-07-11 refs #7704 Cantidad mínima para una línea de venta', `isBoxPickingMode` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'FALSE: using item.packingOut TRUE: boxPicking using itemShelving.packing', `photoMotivation` varchar(255) DEFAULT NULL, + `tag11` varchar(20) DEFAULT NULL, + `value11` varchar(50) DEFAULT NULL, + `tag12` varchar(20) DEFAULT NULL, + `value12` varchar(50) DEFAULT NULL, + `tag13` varchar(20) DEFAULT NULL, + `value13` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `item_supplyResponseFk_idx` (`supplyResponseFk`), KEY `Color` (`inkFk`), @@ -33070,7 +33105,7 @@ CREATE TABLE `itemShelving` ( `buyFk` int(11) DEFAULT NULL, `editorFk` int(10) unsigned DEFAULT NULL, `available` int(11) DEFAULT NULL, - `isSplit` tinyint(1) DEFAULT NULL COMMENT 'Este valor cambia al splitar un carro que se ha quedado en holanda', + `isSplit` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Este valor cambia al splitar un carro que se ha quedado en holanda', PRIMARY KEY (`id`), KEY `itemShelving_fk1_idx` (`itemFk`), KEY `itemShelving_fk2_idx` (`shelvingFk`), @@ -33253,7 +33288,8 @@ CREATE TABLE `itemShelvingSaleReserve` ( `sectorFk` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `itemShelvingSaleReserve_ibfk_1` (`saleFk`), - CONSTRAINT `itemShelvingSaleReserve_sector_FK` FOREIGN KEY (`id`) REFERENCES `sector` (`id`) ON UPDATE CASCADE + KEY `itemShelvingSaleReserve_sector_FK` (`sectorFk`), + CONSTRAINT `itemShelvingSaleReserve_sector_FK` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Queue of changed itemShelvingSale to reserve'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -35741,6 +35777,7 @@ CREATE TABLE `productionConfigLog` ( `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), `changedModelId` int(11) NOT NULL, `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`), KEY `productionConfigLog_userFk` (`userFk`), KEY `productionConfigLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), @@ -39958,27 +39995,6 @@ CREATE TABLE `trolley` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `userConfig` --- - -DROP TABLE IF EXISTS `userConfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `userConfig` ( - `userFk` int(10) unsigned NOT NULL, - `warehouseFk` smallint(6) DEFAULT NULL, - `companyFk` smallint(5) unsigned DEFAULT NULL, - `created` timestamp NULL DEFAULT current_timestamp(), - `updated` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `darkMode` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Salix interface dark mode', - `tabletFk` varchar(100) DEFAULT NULL, - PRIMARY KEY (`userFk`), - KEY `tabletFk` (`tabletFk`), - CONSTRAINT `userConfig_ibfk_1` FOREIGN KEY (`tabletFk`) REFERENCES `docuwareTablet` (`tablet`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Configuración de usuario en Salix'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `userLog` -- @@ -40006,6 +40022,27 @@ CREATE TABLE `userLog` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `userMultiConfig` +-- + +DROP TABLE IF EXISTS `userMultiConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `userMultiConfig` ( + `userFk` int(10) unsigned NOT NULL, + `warehouseFk` smallint(6) DEFAULT NULL, + `companyFk` smallint(5) unsigned DEFAULT NULL, + `created` timestamp NULL DEFAULT current_timestamp(), + `updated` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `darkMode` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Salix interface dark mode', + `tabletFk` varchar(100) DEFAULT NULL, + PRIMARY KEY (`userFk`), + KEY `tabletFk` (`tabletFk`), + CONSTRAINT `userMultiConfig_ibfk_1` FOREIGN KEY (`tabletFk`) REFERENCES `docuwareTablet` (`tablet`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Configuración de usuario en Salix'; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `userPhone` -- @@ -42152,6 +42189,28 @@ DELIMITER ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; /*!50003 SET character_set_results = @saved_cs_results */ ;; /*!50003 SET collation_connection = @saved_col_connection */ ;; +/*!50106 DROP EVENT IF EXISTS `travel_setDelivered` */;; +DELIMITER ;; +/*!50003 SET @saved_cs_client = @@character_set_client */ ;; +/*!50003 SET @saved_cs_results = @@character_set_results */ ;; +/*!50003 SET @saved_col_connection = @@collation_connection */ ;; +/*!50003 SET character_set_client = utf8mb4 */ ;; +/*!50003 SET character_set_results = utf8mb4 */ ;; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ;; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;; +/*!50003 SET @saved_time_zone = @@time_zone */ ;; +/*!50003 SET time_zone = 'SYSTEM' */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `travel_setDelivered` ON SCHEDULE EVERY 1 DAY STARTS '2024-07-12 00:10:00' ON COMPLETION PRESERVE ENABLE DO BEGIN + UPDATE travel t + SET t.isDelivered = TRUE + WHERE t.shipped < util.VN_CURDATE(); +END */ ;; +/*!50003 SET time_zone = @saved_time_zone */ ;; +/*!50003 SET sql_mode = @saved_sql_mode */ ;; +/*!50003 SET character_set_client = @saved_cs_client */ ;; +/*!50003 SET character_set_results = @saved_cs_results */ ;; +/*!50003 SET collation_connection = @saved_col_connection */ ;; /*!50106 DROP EVENT IF EXISTS `vehicle_notify` */;; DELIMITER ;; /*!50003 SET @saved_cs_client = @@character_set_client */ ;; @@ -47452,7 +47511,7 @@ proc: BEGIN -- Tabla con el ultimo dia de last_buy para cada producto -- que hace un replace de la anterior. - CALL buyUltimate(vWarehouseShipment, util.VN_CURDATE()); + CALL buy_getUltimate (NULL, vWarehouseShipment, util.VN_CURDATE()); INSERT INTO tItemRange SELECT t.itemFk, tr.landed @@ -48118,40 +48177,15 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `buyUltimate`( ) BEGIN /** - * Calcula las últimas compras realizadas hasta una fecha + * @deprecated Usar buy_getUltimate + * Calcula las últimas compras realizadas hasta una fecha. * + * @param vItemFk Id del artículo * @param vWarehouseFk Id del almacén * @param vDated Compras hasta fecha * @return tmp.buyUltimate */ - CALL cache.last_buy_refresh (FALSE); - - DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimate; - CREATE TEMPORARY TABLE tmp.buyUltimate - (PRIMARY KEY (itemFk, warehouseFk), - INDEX(itemFk)) - ENGINE = MEMORY - SELECT item_id itemFk, buy_id buyFk, warehouse_id warehouseFk, landing - FROM cache.last_buy - WHERE warehouse_id = vWarehouseFk OR vWarehouseFk IS NULL; - - IF vDated >= util.VN_CURDATE() THEN - CALL buyUltimateFromInterval(vWarehouseFk, util.VN_CURDATE(), vDated); - - REPLACE INTO tmp.buyUltimate - SELECT itemFk, buyFk, warehouseFk, landed landing - FROM tmp.buyUltimateFromInterval - WHERE (warehouseFk = vWarehouseFk OR vWarehouseFk IS NULL) - AND landed <= vDated - AND NOT isIgnored; - - INSERT IGNORE INTO tmp.buyUltimate - SELECT itemFk, buyFk, warehouseFk, landed landing - FROM tmp.buyUltimateFromInterval - WHERE (warehouseFk = vWarehouseFk OR vWarehouseFk IS NULL) - AND landed > vDated - ORDER BY isIgnored = FALSE DESC; - END IF; + CALL buy_getUltimate(NULL, vWarehouseFk, vDated); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -48175,6 +48209,7 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `buyUltimateFromInterval`( ) BEGIN /** + * @deprecated Usar buy_getUltimateFromInterval * Calcula las últimas compras realizadas * desde un rango de fechas. * @@ -48183,154 +48218,7 @@ BEGIN * @param vEnded Fecha fin * @return tmp.buyUltimateFromInterval */ - IF vEnded IS NULL THEN - SET vEnded = vStarted; - END IF; - - IF vEnded < vStarted THEN - SET vStarted = TIMESTAMPADD(MONTH, -1, vEnded); - END IF; - - -- Item - DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimateFromInterval; - CREATE TEMPORARY TABLE tmp.buyUltimateFromInterval - (PRIMARY KEY (itemFk, warehouseFk), - INDEX(buyFk), INDEX(landed), INDEX(warehouseFk), INDEX(itemFk)) - ENGINE = MEMORY - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed BETWEEN vStarted AND vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.price2 > 0 - ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; - - - INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed > vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.price2 > 0 - AND NOT b.isIgnored - ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; - - INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed BETWEEN vStarted AND vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.quantity = 0 - ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; - - -- ItemOriginal - INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - itemOriginalFk, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed BETWEEN vStarted AND vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.price2 > 0 - AND NOT b.isIgnored - AND b.quantity > 0 - AND itemOriginalFk - ORDER BY t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; - INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed > vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.price2 > 0 - AND NOT b.isIgnored - AND itemOriginalFk - ORDER BY t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; - - INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) - SELECT itemFk, - warehouseFk, - buyFk, - landed, - isIgnored - FROM - (SELECT b.itemFk, - t.warehouseInFk warehouseFk, - b.id buyFk, - t.landed, - b.isIgnored - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed BETWEEN vStarted AND vEnded - AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND b.quantity = 0 - AND itemOriginalFk - ORDER BY t.landed DESC, b.id DESC - LIMIT 10000000000000000000) sub - GROUP BY itemFk, warehouseFk; + CALL vn.buy_getUltimateFromInterval(NULL, vWarehouseFk, vStarted, vEnded); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -48716,6 +48604,254 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `buy_getUltimate` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getUltimate`( + vItemFk INT, + vWarehouseFk SMALLINT, + vDated DATE +) +BEGIN +/** + * Calcula las últimas compras realizadas hasta una fecha. + * + * @param vItemFk Id del artículo + * @param vWarehouseFk Id del almacén + * @param vDated Compras hasta fecha + * @return tmp.buyUltimate + */ + CALL cache.last_buy_refresh(FALSE); + + CREATE OR REPLACE TEMPORARY TABLE tmp.buyUltimate + (PRIMARY KEY (itemFk, warehouseFk), + INDEX(itemFk)) + ENGINE = MEMORY + SELECT item_id itemFk, buy_id buyFk, warehouse_id warehouseFk, landing + FROM cache.last_buy + WHERE (warehouse_id = vWarehouseFk OR vWarehouseFk IS NULL) + AND (item_id = vItemFk OR vItemFk IS NULL); + + IF vDated >= util.VN_CURDATE() THEN + CALL buy_getUltimateFromInterval(vItemFk, vWarehouseFk, util.VN_CURDATE(), vDated); + + REPLACE INTO tmp.buyUltimate + SELECT itemFk, buyFk, warehouseFk, landed landing + FROM tmp.buyUltimateFromInterval + WHERE (warehouseFk = vWarehouseFk OR vWarehouseFk IS NULL) + AND (itemFk = vItemFk OR vItemFk IS NULL) + AND landed <= vDated + AND NOT isIgnored; + + INSERT IGNORE INTO tmp.buyUltimate + SELECT itemFk, buyFk, warehouseFk, landed landing + FROM tmp.buyUltimateFromInterval + WHERE (warehouseFk = vWarehouseFk OR vWarehouseFk IS NULL) + AND (itemFk = vItemFk OR vItemFk IS NULL) + AND landed > vDated + ORDER BY isIgnored = FALSE DESC; + END IF; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `buy_getUltimateFromInterval` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getUltimateFromInterval`( + vItemFk INT, + vWarehouseFk SMALLINT, + vStarted DATE, + vEnded DATE +) +BEGIN +/** + * Calcula las últimas compras realizadas + * desde un rango de fechas. + * + * @param vItemFk Id del artículo + * @param vWarehouseFk Id del almacén si es NULL se actualizan todos + * @param vStarted Fecha inicial + * @param vEnded Fecha fin + * @return tmp.buyUltimateFromInterval + */ + IF vEnded IS NULL THEN + SET vEnded = vStarted; + END IF; + + IF vEnded < vStarted THEN + SET vStarted = vEnded - INTERVAL 1 MONTH; + END IF; + + -- Item + + CREATE OR REPLACE TEMPORARY TABLE tmp.buyUltimateFromInterval + (PRIMARY KEY (itemFk, warehouseFk), + INDEX(buyFk), INDEX(landed), INDEX(warehouseFk), INDEX(itemFk)) + ENGINE = MEMORY + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed BETWEEN vStarted AND vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.price2 > 0 + ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; + + + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed > vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.price2 > 0 + AND NOT b.isIgnored + ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; + + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed BETWEEN vStarted AND vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.quantity = 0 + ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; + + -- ItemOriginal + + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + itemOriginalFk, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed BETWEEN vStarted AND vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.price2 > 0 + AND NOT b.isIgnored + AND b.quantity > 0 + AND itemOriginalFk + ORDER BY t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed > vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.price2 > 0 + AND NOT b.isIgnored + AND itemOriginalFk + ORDER BY t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; + + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) + SELECT itemFk, + warehouseFk, + buyFk, + landed, + isIgnored + FROM + (SELECT b.itemFk, + t.warehouseInFk warehouseFk, + b.id buyFk, + t.landed, + b.isIgnored + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE t.landed BETWEEN vStarted AND vEnded + AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) + AND (b.itemFk = vItemFk OR vItemFk IS NULL) + AND b.quantity = 0 + AND itemOriginalFk + ORDER BY t.landed DESC, b.id DESC + LIMIT 10000000000000000000) sub + GROUP BY itemFk, warehouseFk; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `buy_getVolume` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; @@ -49044,7 +49180,11 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updateGrouping`( + vWarehouseFk INT, + vItemFk INT, + vGrouping INT +) BEGIN /** * Actualiza el grouping de las últimas compras de un artículo @@ -49053,9 +49193,9 @@ BEGIN * @param vItemFk Id del Artículo * @param vGrouping Cantidad de grouping */ - CALL vn.buyUltimate(vWarehouseFk, util.VN_CURDATE()); + CALL buy_getUltimate(vItemFk, vWarehouseFk, util.VN_CURDATE()); - UPDATE vn.buy b + UPDATE buy b JOIN tmp.buyUltimate bu ON b.id = bu.buyFk SET b.`grouping` = vGrouping WHERE bu.warehouseFk = vWarehouseFk @@ -49087,7 +49227,7 @@ BEGIN * @param vItemFk id del item * @param vPacking packing a actualizar */ - CALL buyUltimate(vWarehouseFk, util.VN_CURDATE()); + CALL buy_getUltimate(vItemFk, vWarehouseFk, util.VN_CURDATE()); UPDATE buy b JOIN tmp.buyUltimate bu ON b.id = bu.buyFk @@ -49182,7 +49322,7 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - CALL vn.zone_getShipped (vLanded, vAddressFk, vAgencyModeFk, vShowExpiredZones); + CALL zone_getShipped (vLanded, vAddressFk, vAgencyModeFk, vShowExpiredZones); DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; CREATE TEMPORARY TABLE tmp.ticketLot( @@ -49225,9 +49365,9 @@ BEGIN LEAVE l; END IF; - CALL `cache`.available_refresh (vAvailableCalc, FALSE, vWarehouseFk, vShipped); - CALL `cache`.availableNoRaids_refresh (vAvailableNoRaidsCalc, FALSE, vWarehouseFk, vShipped); - CALL vn.buyUltimate(vWarehouseFk, vShipped); + CALL `cache`.available_refresh(vAvailableCalc, FALSE, vWarehouseFk, vShipped); + CALL `cache`.availableNoRaids_refresh(vAvailableNoRaidsCalc, FALSE, vWarehouseFk, vShipped); + CALL buy_getUltimate(NULL, vWarehouseFk, vShipped); INSERT INTO tmp.ticketLot (warehouseFk, itemFk, available, buyFk, zoneFk) SELECT vWarehouseFk, @@ -49239,17 +49379,17 @@ BEGIN LEFT JOIN cache.availableNoRaids anr ON anr.item_id = a.item_id AND anr.calc_id = vAvailableNoRaidsCalc JOIN tmp.item i ON i.itemFk = a.item_id - JOIN vn.item it ON it.id = i.itemFk - JOIN vn.`zone` z ON z.id = vZoneFk + JOIN item it ON it.id = i.itemFk + JOIN `zone` z ON z.id = vZoneFk LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = a.item_id LEFT JOIN edi.supplyResponse sr ON sr.ID = it.supplyResponseFk LEFT JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID LEFT JOIN edi.marketPlace mp ON mp.id = sr.MarketPlaceID LEFT JOIN (SELECT isVNHSupplier, isEarlyBird, TRUE AS itemAllowed - FROM vn.addressFilter af + FROM addressFilter af JOIN (SELECT ad.provinceFk, p.countryFk, ad.isLogifloraAllowed - FROM vn.address ad - JOIN vn.province p ON p.id = ad.provinceFk + FROM address ad + JOIN province p ON p.id = ad.provinceFk WHERE ad.id = vAddressFk ) sub2 ON sub2.provinceFk <=> IFNULL(af.provinceFk, sub2.provinceFk) AND sub2.countryFk <=> IFNULL(af.countryFk, sub2.countryFk) @@ -49261,18 +49401,18 @@ BEGIN OR ISNULL(af.afterDated)) ) sub ON sub.isVNHSupplier = v.isVNHSupplier AND (sub.isEarlyBird = mp.isEarlyBird OR ISNULL(sub.isEarlyBird)) - JOIN vn.agencyMode am ON am.id = vAgencyModeFk - JOIN vn.agency ag ON ag.id = am.agencyFk - JOIN vn.itemType itt ON itt.id = it.typeFk - JOIN vn.itemCategory itc on itc.id = itt.categoryFk - JOIN vn.address ad ON ad.id = vAddressFk - LEFT JOIN vn.clientItemType cit + JOIN agencyMode am ON am.id = vAgencyModeFk + JOIN agency ag ON ag.id = am.agencyFk + JOIN itemType itt ON itt.id = it.typeFk + JOIN itemCategory itc on itc.id = itt.categoryFk + JOIN address ad ON ad.id = vAddressFk + LEFT JOIN clientItemType cit ON cit.clientFk = ad.clientFk AND cit.itemTypeFk = itt.id - LEFT JOIN vn.zoneItemType zit + LEFT JOIN zoneItemType zit ON zit.zoneFk = vZoneFk AND zit.itemTypeFk = itt.id - LEFT JOIN vn.agencyModeItemType ait + LEFT JOIN agencyModeItemType ait ON ait.agencyModeFk = vAgencyModeFk AND ait.itemTypeFk = itt.id WHERE a.calc_id = vAvailableCalc @@ -49286,7 +49426,7 @@ BEGIN DROP TEMPORARY TABLE tmp.buyUltimate; - CALL vn.catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk); + CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk); INSERT INTO tmp.ticketCalculateItem( itemFk, @@ -52853,7 +52993,7 @@ DECLARE vCompanyFk INT; SELECT IFNULL(uc.companyFk, rc.defaultCompanyFk) INTO vCompanyFk FROM vn.routeConfig rc - LEFT JOIN userConfig uc ON uc.userFk = workerFk; + LEFT JOIN userMultiConfig uc ON uc.userFk = workerFk; SELECT @@ -54183,6 +54323,7 @@ BEGIN DECLARE vInvoiceFk INT; DECLARE vBookEntry INT; DECLARE vFiscalYear INT; + DECLARE vIncorrectInvoiceInDueDay INT; DECLARE vInvoicesIn CURSOR FOR SELECT DISTINCT e.invoiceInFk @@ -54195,6 +54336,19 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + SELECT GROUP_CONCAT(ii.id) INTO vIncorrectInvoiceInDueDay + FROM invoiceInDueDay iidd + JOIN invoiceIn ii ON iidd.invoiceInFk = ii.id + JOIN `entry` e ON e.invoiceInFk = ii.id + JOIN duaEntry de ON de.entryFk = e.id + JOIN invoiceInConfig iic + WHERE de.duaFk = vDuaFk + AND iidd.dueDated <= util.VN_CURDATE() + INTERVAL iic.dueDateMarginDays DAY; + + IF vIncorrectInvoiceInDueDay THEN + CALL util.throw(CONCAT('Incorrect due date, invoice: ', vIncorrectInvoiceInDueDay)); + END IF; + UPDATE invoiceIn ii JOIN entry e ON e.invoiceInFk = ii.id JOIN duaEntry de ON de.entryFk = e.id @@ -55212,7 +55366,7 @@ BEGIN FROM tmp.itemList; END IF; - CALL buyUltimateFromInterval(vWarehouseIn,vInventoryDate, vDateLanded); + CALL buy_getUltimateFromInterval(NULL, vWarehouseIn,vInventoryDate, vDateLanded); CREATE OR REPLACE TEMPORARY TABLE tTransfer ENGINE = MEMORY @@ -55785,7 +55939,7 @@ BEGIN UPDATE itemShelving SET isSplit = TRUE - WHERE shelvingFk = vShelvingFk; + WHERE shelvingFk = vShelvingFk COLLATE utf8_general_ci; END LOOP; CLOSE cur; END ;; @@ -57642,7 +57796,9 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInDueDay_calculate`(vInvoiceInFk INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInDueDay_calculate`( +vInvoiceInFk INT +) BEGIN /** * Calcula los vctos. de una factura recibida @@ -57699,12 +57855,13 @@ BEGIN COUNT(DISTINCT(pdd.detail)) cont, s.payDay, ii.issued, - DATE(ii.created) + INTERVAL 2 DAY created + DATE(ii.created) + INTERVAL iic.dueDateMarginDays DAY created FROM invoiceIn ii JOIN invoiceInTax iit ON iit.invoiceInFk = ii.id LEFT JOIN sage.TiposIva ti ON ti.CodigoIva= iit.taxTypeSageFk JOIN supplier s ON s.id = ii.supplierFk - JOIN payDemDetail pdd ON pdd.id = s.payDemFk + JOIN payDemDetail pdd ON pdd.id = s.payDemFk + JOIN invoiceInConfig iic WHERE ii.id = vInvoiceInFk GROUP BY ii.id )sub @@ -58038,9 +58195,11 @@ BEGIN DECLARE vHasRepeatedTransactions BOOL; SELECT TRUE INTO vHasRepeatedTransactions - FROM invoiceInTax - WHERE invoiceInFk = vSelf - HAVING COUNT(DISTINCT transactionTypeSageFk) > 1 + FROM invoiceInTax iit + JOIN invoiceIn ii ON ii.id = iit.invoiceInFk + WHERE ii.id = vSelf + AND ii.serial = 'E' + HAVING COUNT(DISTINCT iit.transactionTypeSageFk) > 1 LIMIT 1; IF vHasRepeatedTransactions THEN @@ -59101,7 +59260,7 @@ BEGIN i.transactionTypeSageFk, @vTaxCodeGeneral := i.taxClassCodeFk FROM tmp.ticketServiceTax tst - JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tst.code + JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tst.code WHERE i.isService HAVING taxableBase ) sub; @@ -59114,7 +59273,7 @@ BEGIN i.taxTypeSageFk , i.transactionTypeSageFk FROM tmp.ticketTax tt - JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tt.code + JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tt.code WHERE !i.isService GROUP BY tt.pgcFk HAVING taxableBase @@ -60660,6 +60819,7 @@ proc: BEGIN itemShelvingFk, saleFk, quantity, + userFk, isPicked) SELECT vItemShelvingFk, vSaleFk, @@ -60684,6 +60844,65 @@ DELIMITER ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingSale_addBySaleGroup` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_addBySaleGroup`( + vSaleGroupFk INT(11) +) +BEGIN +/** + * Reserva cantidades con ubicaciones para el contenido de una preparación previa + * a través del saleGroup + * + * @param vSaleGroupFk Identificador de saleGroup + */ + DECLARE vDone BOOL DEFAULT FALSE; + DECLARE vSaleFk INT; + DECLARE vSectorFk INT; + DECLARE vSales CURSOR FOR + SELECT s.id + FROM saleGroupDetail sgd + JOIN sale s ON sgd.saleFk = s.id + JOIN saleTracking str ON str.saleFk = s.id + JOIN `state` st ON st.id = str.stateFk + AND st.code = 'PREVIOUS_PREPARATION' + LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id + WHERE sgd.saleGroupFk = vSaleGroupFk + AND str.workerFk = account.myUser_getId() + AND iss.id IS NULL; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + SELECT sectorFk INTO vSectorFk + FROM operator + WHERE workerFk = account.myUser_getId(); + + OPEN vSales; + l: LOOP + SET vDone = FALSE; + FETCH vSales INTO vSaleFk; + + IF vDone THEN + LEAVE l; + END IF; + + CALL itemShelvingSale_addBySale(vSaleFk, vSectorFk); + END LOOP; + CLOSE vSales; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `itemShelvingSale_addBySectorCollection` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -60817,58 +61036,58 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_reallocate`( - vItemShelvingFk INT(10), - vItemFk INT(10), - vSectorFk INT +CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_reallocate`( + vItemShelvingFk INT(10), + vItemFk INT(10), + vSectorFk INT ) -BEGIN -/** - * Elimina reservas de un itemShelving e intenta reservar en otra ubicación - * - * @param vItemShelvingFk Id itemShelving - * @param vItemFk Id del artículo - * @param vSectorFk Id del sector - */ - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - ROLLBACK; - RESIGNAL; - END; - - START TRANSACTION; - - UPDATE itemShelving - SET visible = 0, - available = 0 - WHERE id = vItemShelvingFk - AND itemFk = vItemFk; - - SELECT iss.id - FROM itemShelvingSale iss - JOIN itemShelving ish ON ish.id = iss.itemShelvingFk - WHERE iss.itemShelvingFk = vItemShelvingFk - AND iss.itemFk = vItemFk - AND NOT iss.isPicked - FOR UPDATE; - - INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk) - SELECT DISTINCT iss.saleFk - FROM itemShelvingSale iss - JOIN itemShelving ish ON ish.id = iss.itemShelvingFk - WHERE iss.itemShelvingFk = vItemShelvingFk - AND ish.itemFk = vItemFk - AND NOT iss.isPicked; - - DELETE iss - FROM itemShelvingSale iss - JOIN itemShelving ish ON ish.id = iss.itemShelvingFk - WHERE iss.itemShelvingFk = vItemShelvingFk - AND ish.itemFk = vItemFk - AND NOT iss.isPicked; - COMMIT; - - CALL itemShelvingSale_doReserve(); +BEGIN +/** + * Elimina reservas de un itemShelving e intenta reservar en otra ubicación + * + * @param vItemShelvingFk Id itemShelving + * @param vItemFk Id del artículo + * @param vSectorFk Id del sector + */ + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; + + START TRANSACTION; + + UPDATE itemShelving + SET visible = 0, + available = 0 + WHERE id = vItemShelvingFk + AND itemFk = vItemFk; + + SELECT iss.id + FROM itemShelvingSale iss + JOIN itemShelving ish ON ish.id = iss.itemShelvingFk + WHERE iss.itemShelvingFk = vItemShelvingFk + AND ish.itemFk = vItemFk + AND NOT iss.isPicked + FOR UPDATE; + + INSERT INTO itemShelvingSaleReserve (saleFk, sectorFk) + SELECT DISTINCT iss.saleFk, vSectorFk + FROM itemShelvingSale iss + JOIN itemShelving ish ON ish.id = iss.itemShelvingFk + WHERE iss.itemShelvingFk = vItemShelvingFk + AND ish.itemFk = vItemFk + AND NOT iss.isPicked; + + DELETE iss + FROM itemShelvingSale iss + JOIN itemShelving ish ON ish.id = iss.itemShelvingFk + WHERE iss.itemShelvingFk = vItemShelvingFk + AND ish.itemFk = vItemFk + AND NOT iss.isPicked; + COMMIT; + + CALL itemShelvingSale_doReserve(); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -61036,7 +61255,7 @@ BEGIN COMMIT; IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN - INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk) + INSERT INTO itemShelvingSaleReserve (saleFk, sectorFk) SELECT vSaleFk, vSectorFk; CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk, vSectorFk); END IF; @@ -61231,7 +61450,7 @@ BEGIN JOIN ticket t ON t.id = c.ticketFk WHERE c.id = vClaimFk; - CALL buyUltimate (vWarehouseFk, util.VN_CURDATE()); + CALL buy_getUltimate(NULL, vWarehouseFk, util.VN_CURDATE()); INSERT INTO itemShelving (itemFk, shelvingFk, packing, `grouping`, visible) SELECT s.itemFk, vShelvingFk, b.packing, b.`grouping`, cb.quantity AS visible @@ -61434,7 +61653,8 @@ BEGIN ish.id, s.priority, ish.isChecked, - ic.url + ic.url, + ish.available FROM itemShelving ish JOIN item i ON i.id = ish.itemFk JOIN shelving s ON vSelf = s.code COLLATE utf8_unicode_ci @@ -61553,7 +61773,7 @@ BEGIN FROM operator WHERE workerFk = account.myUser_getId(); - CALL buyUltimate(vWarehouseFk, util.VN_CURDATE()); + CALL buy_getUltimate(vBarcodeItem, vWarehouseFk, util.VN_CURDATE()); SELECT buyFk INTO vBuyFk FROM tmp.buyUltimate @@ -62397,6 +62617,7 @@ BEGIN FROM itemTicketOut i LEFT JOIN ticketState ts ON ts.ticketFk = i.ticketFk JOIN `state` s ON s.id = ts.stateFk + JOIN warehouse w ON w.id = i.warehouseFk LEFT JOIN ( SELECT DISTINCT st.saleFk FROM saleTracking st @@ -62404,26 +62625,31 @@ BEGIN WHERE st.created > vDated AND (s.isPicked OR st.isChecked) ) stPrevious ON `stPrevious`.`saleFk` = i.saleFk - WHERE IFNULL(vWarehouseFk, i.warehouseFk) = i.warehouseFk + WHERE (vWarehouseFk IS NULL OR i.warehouseFk = vWarehouseFk) AND (vSelf IS NULL OR i.itemFk = vSelf) AND (s.isPicked OR i.reserved OR stPrevious.saleFk) AND i.shipped >= vDated AND i.shipped < vTomorrow + AND w.isComparative UNION ALL - SELECT itemFk, quantity - FROM itemEntryIn - WHERE isReceived - AND landed >= vDated AND landed < vTomorrow - AND IFNULL(vWarehouseFk, warehouseInFk) = warehouseInFk - AND (vSelf IS NULL OR itemFk = vSelf) - AND NOT isVirtualStock + SELECT iei.itemFk, iei.quantity + FROM itemEntryIn iei + JOIN warehouse w ON w.id = iei.warehouseInFk + WHERE iei.isReceived + AND iei.landed >= vDated AND iei.landed < vTomorrow + AND (vWarehouseFk IS NULL OR iei.warehouseInFk = vWarehouseFk) + AND (vSelf IS NULL OR iei.itemFk = vSelf) + AND NOT iei.isVirtualStock + AND w.isComparative UNION ALL - SELECT itemFk, quantity - FROM itemEntryOut - WHERE isDelivered - AND shipped >= vDated - AND shipped < vTomorrow - AND IFNULL(vWarehouseFk, warehouseOutFk) = warehouseOutFk - AND (vSelf IS NULL OR itemFk = vSelf) + SELECT ieo.itemFk, ieo.quantity + FROM itemEntryOut ieo + JOIN warehouse w ON w.id = ieo.warehouseOutFk + WHERE ieo.isDelivered + AND ieo.shipped >= vDated + AND ieo.shipped < vTomorrow + AND (vWarehouseFk IS NULL OR ieo.warehouseOutFk = vWarehouseFk) + AND (vSelf IS NULL OR ieo.itemFk = vSelf) + AND w.isComparative ) t GROUP BY itemFk ON DUPLICATE KEY UPDATE @@ -62668,19 +62894,20 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `item_comparative`( ) proc: BEGIN /** - * Genera una tabla de comparativa de artículos por itemType/comprador/fecha. - * Los datos se calculan en función de los parámetros proporcionados. + * Generates a comparison table of items by itemType/buyer/date. + * The data is calculated based on the provided parameters. * - * @param vDate La fecha para la cual se generará la comparativa. - * @param vDayRange El rango de días a considerar para la comparativa. - * @param vWarehouseFk El identificador del almacén para filtrar los artículos. - * @param vAvailableSince La fecha de disponibilidad desde la cual se consideran los artículos disponibles. - * @param vBuyerFk El identificador del comprador para filtrar los artículos. - * @param vIsFloramondo Indica si se deben incluir solo los artículos de Floramondo (opcional). - * @param vCountryFk El identificador del país. - * @param tmp.comparativeFilterType(filterFk INT ,itemTypeFk INT) + * @param vDate The date for which the comparison will be generated. + * @param vDayRange The range of days to consider for the comparison. + * @param vWarehouseFk The warehouse identifier to filter the items. + * @param vAvailableSince The availability date from which the items are considered available. + * @param vBuyerFk The buyer identifier to filter the items. + * @param vIsFloramondo Indicates whether only Floramondo items should be included (optional). + * @param vCountryFk The country identifier. + * @param tmp.comparativeFilterType(filterFk INT, itemTypeFk INT) * @return tmp.comparative */ + DECLARE vDayRangeStart DATE; DECLARE vDayRangeEnd DATE; DECLARE w1, w2, w3, w4, w5, w6, w7 INT; @@ -63053,7 +63280,7 @@ BEGIN END IF; SELECT warehouseFk INTO vWarehouseFk - FROM userConfig + FROM userMultiConfig WHERE userFk = account.myUser_getId(); IF NOT vWarehouseFk OR vWarehouseFk IS NULL THEN @@ -63104,7 +63331,7 @@ BEGIN ORDER BY created DESC LIMIT 1; - CALL buyUltimate(vWarehouseFk, vCurdate); + CALL buy_getUltimate(vSelf, vWarehouseFk, vCurdate); SELECT b.entryFk, bu.buyFk,IFNULL(b.buyingValue, 0) INTO vLastEntryFk, vLastBuyFk, vBuyingValueOriginal FROM tmp.buyUltimate bu @@ -63785,7 +64012,10 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getInfo`( + `vBarcode` VARCHAR(22), + `vWarehouseFk` INT +) BEGIN /** * Devuelve información relativa al item correspondiente del vBarcode pasado @@ -63797,12 +64027,14 @@ BEGIN DECLARE vCacheAvailableFk INT; DECLARE vVisibleItemShelving INT; DECLARE vItemFk INT; + DECLARE vDated DATE; + + SELECT barcodeToItem(vBarcode), util.VN_CURDATE() INTO vItemFk, vDated; CALL cache.visible_refresh(vCacheVisibleFk, FALSE, vWarehouseFk); - CALL cache.available_refresh(vCacheAvailableFk, FALSE, vWarehouseFk, util.VN_CURDATE()); - CALL buyUltimate(vWarehouseFk, util.VN_CURDATE()); - - SELECT barcodeToItem(vBarcode) INTO vItemFk; + CALL cache.available_refresh(vCacheAvailableFk, FALSE, vWarehouseFk, vDated); + CALL buy_getUltimate(vItemFk, vWarehouseFk, vDated); + SELECT SUM(visible) INTO vVisibleItemShelving FROM itemShelvingStock WHERE itemFk = vItemFk @@ -63940,39 +64172,42 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinacum`( + vWarehouseFk TINYINT, + vDated DATE, + vRange INT, + vItemFk INT +) BEGIN /** - * Cálculo del mínimo acumulado, para un item/almacén especificado, en caso de - * NULL para todo. + * Cálculo del mínimo acumulado, para un item/almacén + * especificado, en caso de NULL para todos. * - * @param vWarehouseFk -> warehouseFk - * @param vDatedFrom -> fecha inicio - * @param vRange -> número de días a considerar - * @param vItemFk -> Identificador de item + * @param vWarehouseFk Id warehouse + * @param vDated Fecha inicio + * @param vRange Número de días a considerar + * @param vItemFk Id de artículo * @return tmp.itemMinacum */ - DECLARE vDatedTo DATETIME; + DECLARE vDatedTo DATETIME DEFAULT util.dayEnd(vDated + INTERVAL vRange DAY); - SET vDatedFrom = TIMESTAMP(DATE(vDatedFrom), '00:00:00'); - SET vDatedTo = TIMESTAMP(TIMESTAMPADD(DAY, vRange, vDatedFrom), '23:59:59'); - - DROP TEMPORARY TABLE IF EXISTS tmp.itemCalc; - CREATE TEMPORARY TABLE tmp.itemCalc + CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc (INDEX (itemFk, warehouseFk)) + ENGINE = MEMORY SELECT sub.itemFk, sub.dated, CAST(SUM(sub.quantity) AS SIGNED) quantity, sub.warehouseFk - FROM (SELECT s.itemFk, + FROM ( + SELECT s.itemFk, DATE(t.shipped) dated, -s.quantity quantity, t.warehouseFk FROM sale s JOIN ticket t ON t.id = s.ticketFk - WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo + WHERE t.shipped BETWEEN vDated AND vDatedTo AND t.warehouseFk - AND s.quantity != 0 + AND s.quantity <> 0 AND (vItemFk IS NULL OR s.itemFk = vItemFk) AND (vWarehouseFk IS NULL OR t.warehouseFk = vWarehouseFk) UNION ALL @@ -63983,10 +64218,10 @@ BEGIN FROM buy b JOIN entry e ON e.id = b.entryFk JOIN travel t ON t.id = e.travelFk - WHERE t.landed BETWEEN vDatedFrom AND vDatedTo + WHERE t.landed BETWEEN vDated AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND !e.isExcludedFromAvailable - AND b.quantity != 0 + AND NOT e.isExcludedFromAvailable + AND b.quantity <> 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) UNION ALL SELECT b.itemFk, @@ -63996,29 +64231,46 @@ BEGIN FROM buy b JOIN entry e ON e.id = b.entryFk JOIN travel t ON t.id = e.travelFk - WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo + WHERE t.shipped BETWEEN vDated AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseOutFk = vWarehouseFk) - AND !e.isExcludedFromAvailable - AND b.quantity != 0 + AND NOT e.isExcludedFromAvailable + AND b.quantity <> 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) - AND !e.isRaid + AND NOT e.isRaid + UNION ALL + SELECT r.itemFk, + r.shipment, + -r.amount, + r.warehouseFk + FROM hedera.orderRow r + JOIN hedera.`order` o ON o.id = r.orderFk + JOIN client c ON c.id = o.customer_id + WHERE r.shipment BETWEEN vDated AND vDatedTo + AND (vWarehouseFk IS NULL OR r.warehouseFk = vWarehouseFk) + AND r.created >= ( + SELECT util.VN_NOW() - INTERVAL TIME_TO_SEC(reserveTime) SECOND + FROM hedera.orderConfig + ) + AND NOT o.confirmed + AND (vItemFk IS NULL OR r.itemFk = vItemFk) + AND r.amount <> 0 ) sub GROUP BY sub.itemFk, sub.warehouseFk, sub.dated; - CALL item_getAtp(vDatedFrom); - DROP TEMPORARY TABLE tmp.itemCalc; + CALL item_getAtp(vDated); - DROP TEMPORARY TABLE IF EXISTS tmp.itemMinacum; - CREATE TEMPORARY TABLE tmp.itemMinacum + CREATE OR REPLACE TEMPORARY TABLE tmp.itemMinacum (INDEX(itemFk)) ENGINE = MEMORY - SELECT i.itemFk, - i.warehouseFk, - i.quantity amount - FROM tmp.itemAtp i - HAVING amount != 0; + SELECT itemFk, + warehouseFk, + quantity amount + FROM tmp.itemAtp + WHERE quantity <> 0; - DROP TEMPORARY TABLE tmp.itemAtp; + DROP TEMPORARY TABLE + tmp.itemAtp, + tmp.itemCalc; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -64283,7 +64535,7 @@ BEGIN */ ALTER TABLE tmp.itemInventory ADD IF NOT EXISTS buy_id INT; - CALL buyUltimate(vWarehouseFk, vDate); + CALL buy_getUltimate (NULL, vWarehouseFk, vDate); CREATE OR REPLACE TEMPORARY TABLE tmp (KEY (itemFk)) @@ -64418,12 +64670,18 @@ BEGIN i.tag8 = JSON_VALUE(vTags, '$.8'), i.tag9 = JSON_VALUE(vTags, '$.9'), i.tag10 = JSON_VALUE(vTags, '$.10'), + i.tag11 = JSON_VALUE(vTags, '$.11'), + i.tag12 = JSON_VALUE(vTags, '$.12'), + i.tag13 = JSON_VALUE(vTags, '$.13'), i.value5 = JSON_VALUE(vValues, '$.5'), i.value6 = JSON_VALUE(vValues, '$.6'), i.value7 = JSON_VALUE(vValues, '$.7'), i.value8 = JSON_VALUE(vValues, '$.8'), i.value9 = JSON_VALUE(vValues, '$.9'), i.value10 = JSON_VALUE(vValues, '$.10'), + i.value11 = JSON_VALUE(vValues, '$.11'), + i.value12 = JSON_VALUE(vValues, '$.12'), + i.value13 = JSON_VALUE(vValues, '$.13'), i.producerFk = p.id, i.inkFk = k.id, i.originFk = IFNULL(o.id, i.originFk) @@ -64699,232 +64957,256 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `item_valuateInventory` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; -/*!50003 SET character_set_client = utf8mb3 */ ; -/*!50003 SET character_set_results = utf8mb3 */ ; -/*!50003 SET collation_connection = utf8mb3_general_ci */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `item_valuateInventory`( -vDated DATE + vDated DATE, + vItemTypeFk INT, + vItemCategoryFk INT ) BEGIN -DECLARE vInventoried DATE; -DECLARE vHasNotInventory BOOLEAN DEFAULT FALSE; -DECLARE vInventoryClone DATE; -DECLARE vDateDayEnd DATETIME; -DECLARE vInventorySupplierFk INT; + DECLARE vInventoried DATE; + DECLARE vHasNotInventory BOOLEAN DEFAULT FALSE; + DECLARE vInventoryClone DATE; + DECLARE vDateDayEnd DATETIME; + DECLARE vInventorySupplierFk INT; -SELECT inventorySupplierFk INTO vInventorySupplierFk -FROM entryConfig; + SELECT inventorySupplierFk INTO vInventorySupplierFk + FROM entryConfig; -SET vDateDayEnd = util.dayEnd(vDated); + SET vDateDayEnd = util.dayEnd(vDated); -SELECT tr.landed INTO vInventoried -FROM travel tr -JOIN `entry` e ON e.travelFk = tr.id -WHERE tr.landed <= vDateDayEnd -AND e.supplierFk = vInventorySupplierFk -ORDER BY tr.landed DESC -LIMIT 1; + SELECT tr.landed INTO vInventoried + FROM travel tr + JOIN `entry` e ON e.travelFk = tr.id + WHERE tr.landed <= vDateDayEnd + AND e.supplierFk = vInventorySupplierFk + ORDER BY tr.landed DESC + LIMIT 1; -SET vHasNotInventory = (vInventoried IS NULL); + SET vHasNotInventory = (vInventoried IS NULL); + + IF vHasNotInventory THEN + SELECT landed INTO vInventoryClone + FROM travel tr + JOIN `entry` e ON e.travelFk = tr.id + WHERE tr.landed >= vDated + AND e.supplierFk = vInventorySupplierFk + ORDER BY landed ASC + LIMIT 1; -IF vHasNotInventory THEN -SELECT landed INTO vInventoryClone -FROM travel tr -JOIN `entry` e ON e.travelFk = tr.id -WHERE tr.landed >= vDated -AND e.supplierFk = vInventorySupplierFk -ORDER BY landed ASC -LIMIT 1; + SET vInventoried = vDated + INTERVAL 1 DAY; + SET vDateDayEnd = vInventoryClone; + END IF; -SET vInventoried = vDated + INTERVAL 1 DAY; -SET vDateDayEnd = vInventoryClone; -END IF; + CREATE OR REPLACE TEMPORARY TABLE tInventory( + warehouseFk SMALLINT, + itemFk BIGINT, + quantity INT, + volume DECIMAL(10,2), + cost DOUBLE DEFAULT 0, + total DOUBLE DEFAULT 0, + warehouseInventory VARCHAR(20), + PRIMARY KEY (warehouseInventory, itemFk) USING HASH + ) + ENGINE = MEMORY; + + -- Inventario inicial + IF vHasNotInventory THEN + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT tr.warehouseInFk, + b.itemFk, + SUM(b.quantity), + w.name + FROM buy b + JOIN item i ON i.id = b.itemFk + JOIN `entry` e ON e.id = b.entryFk + JOIN travel tr ON tr.id = e.travelFk + JOIN itemType t ON t.id = i.typeFk + JOIN itemCategory ic ON ic.id = t.categoryFk + JOIN warehouse w ON w.id = tr.warehouseInFk + WHERE tr.landed = vDateDayEnd + AND e.supplierFk = vInventorySupplierFk + AND w.valuatedInventory + AND t.isInventory + AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + GROUP BY tr.warehouseInFk, b.itemFk; + ELSE + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT tr.warehouseInFk, + b.itemFk, + SUM(b.quantity), + w.name + FROM buy b + JOIN item i ON i.id = b.itemFk + JOIN `entry` e ON e.id = b.entryFk + JOIN travel tr ON tr.id = e.travelFk + JOIN itemType t ON t.id = i.typeFk + JOIN itemCategory ic ON ic.id = t.categoryFk + JOIN warehouse w ON w.id = tr.warehouseInFk + WHERE tr.landed = vInventoried + AND e.supplierFk = vInventorySupplierFk + AND w.valuatedInventory + AND t.isInventory + AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + GROUP BY tr.warehouseInFk, b.itemFk; + END IF; -CREATE OR REPLACE TEMPORARY TABLE tInventory( -warehouseFk SMALLINT, -itemFk BIGINT, -quantity INT, -volume DECIMAL(10,2), -cost DOUBLE DEFAULT 0, -total DOUBLE DEFAULT 0, -warehouseInventory VARCHAR(20), -PRIMARY KEY (warehouseInventory, itemFk) USING HASH -) -ENGINE = MEMORY; + -- Añadimos las entradas + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT tr.warehouseInFk, + b.itemFk, + b.quantity * IF(vHasNotInventory, -1, 1), + w.name + FROM buy b + JOIN item i ON i.id = b.itemFk + JOIN `entry` e ON e.id = b.entryFk + JOIN travel tr ON tr.id = e.travelFk + JOIN itemType t ON t.id = i.typeFk + JOIN itemCategory ic ON ic.id = t.categoryFk + JOIN warehouse w ON w.id = tr.warehouseInFk + WHERE tr.landed BETWEEN vInventoried AND vDateDayEnd + AND IF(tr.landed = util.VN_CURDATE(), tr.isReceived, TRUE) + AND NOT e.isRaid + AND w.valuatedInventory + AND t.isInventory + AND e.supplierFk <> vInventorySupplierFk + AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity * IF(vHasNotInventory, -1, 1)); + -- Descontamos las salidas + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT tr.warehouseOutFk, + b.itemFk, + b.quantity * IF(vHasNotInventory, 1, -1), + w.name + FROM buy b + JOIN item i ON i.id = b.itemFk + JOIN `entry` e ON e.id = b.entryFk + JOIN travel tr ON tr.id = e.travelFk + JOIN itemType t ON t.id = i.typeFk + JOIN itemCategory ic ON ic.id = t.categoryFk + JOIN warehouse w ON w.id = tr.warehouseOutFk + WHERE tr.shipped BETWEEN vInventoried AND vDateDayEnd + AND NOT e.isRaid + AND w.valuatedInventory + AND t.isInventory + AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity * IF(vHasNotInventory,1,-1)); -IF vHasNotInventory THEN -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT tr.warehouseInFk, -b.itemFk, -SUM(b.quantity), -w.name -FROM buy b -JOIN item i ON i.id = b.itemFk -JOIN `entry` e ON e.id = b.entryFk -JOIN travel tr ON tr.id = e.travelFk -JOIN itemType t ON t.id = i.typeFk -JOIN warehouse w ON w.id = tr.warehouseInFk -WHERE tr.landed = vDateDayEnd -AND e.supplierFk = vInventorySupplierFk -AND w.valuatedInventory -AND t.isInventory -GROUP BY tr.warehouseInFk, b.itemFk; -ELSE -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT tr.warehouseInFk, -b.itemFk, -SUM(b.quantity), -w.name -FROM buy b -JOIN item i ON i.id = b.itemFk -JOIN `entry` e ON e.id = b.entryFk -JOIN travel tr ON tr.id = e.travelFk -JOIN itemType t ON t.id = i.typeFk -JOIN warehouse w ON w.id = tr.warehouseInFk -WHERE tr.landed = vInventoried -AND e.supplierFk = vInventorySupplierFk -AND w.valuatedInventory -AND t.isInventory -GROUP BY tr.warehouseInFk, b.itemFk; -END IF; + -- Descontamos las lineas de venta + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT w.id, + s.itemFk, + s.quantity * IF(vHasNotInventory, 1, -1), + w.name + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN `client` c ON c.id = t.clientFk + JOIN item i ON i.id = s.itemFk + JOIN itemType it ON it.id = i.typeFk + JOIN itemCategory ic ON ic.id = it.categoryFk + JOIN warehouse w ON w.id = t.warehouseFk + WHERE t.shipped BETWEEN vInventoried AND vDateDayEnd + AND w.valuatedInventory + AND it.isInventory + AND (it.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + s.quantity * IF(vHasNotInventory, 1, -1); + -- Volver a poner lo que esta aun en las estanterias + IF vDated = util.VN_CURDATE() THEN + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT w.id, + s.itemFk, + s.quantity * IF(vHasNotInventory, 0, 1), + w.name + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN `client` c ON c.id = t.clientFk + JOIN item i ON i.id = s.itemFk + JOIN itemType it ON it.id = i.typeFk + JOIN itemCategory ic ON ic.id = it.categoryFk + JOIN warehouse w ON w.id = t.warehouseFk + WHERE t.shipped BETWEEN vDated AND vDateDayEnd + AND NOT (s.isPicked OR t.isLabeled) + AND w.valuatedInventory + AND it.isInventory + AND (it.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + s.quantity * IF(vHasNotInventory, 0, 1); + END IF; -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT tr.warehouseInFk, -b.itemFk, -b.quantity * IF(vHasNotInventory, -1, 1), -w.name -FROM buy b -JOIN item i ON i.id = b.itemFk -JOIN `entry` e ON e.id = b.entryFk -JOIN travel tr ON tr.id = e.travelFk -JOIN itemType t ON t.id = i.typeFk -JOIN warehouse w ON w.id = tr.warehouseInFk -WHERE tr.landed BETWEEN vInventoried AND vDateDayEnd -AND IF(tr.landed = util.VN_CURDATE(), tr.isReceived, TRUE) -AND NOT e.isRaid -AND w.valuatedInventory -AND t.isInventory -AND e.supplierFk <> vInventorySupplierFk -ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity * IF(vHasNotInventory, -1, 1)); + -- Mercancia en transito + INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) + SELECT tr.warehouseInFk, + b.itemFk, + b.quantity, + CONCAT(wOut.`name`, ' - ', wIn.`name`) + FROM buy b + JOIN item i ON i.id = b.itemFk + JOIN `entry` e ON e.id = b.entryFk + JOIN travel tr ON tr.id = e.travelFk + JOIN itemType t ON t.id = i.typeFk + JOIN itemCategory ic ON ic.id = t.categoryFk + JOIN warehouse wIn ON wIn.id = tr.warehouseInFk + JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk + WHERE vDated >= tr.shipped AND vDated < tr.landed + AND NOT isRaid + AND wIn.valuatedInventory + AND t.isInventory + AND e.isConfirmed + AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL) + AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL) + ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity); + + CALL buy_getUltimate (NULL, NULL, vDateDayEnd); + DELETE FROM tInventory WHERE quantity IS NULL OR NOT quantity; -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT tr.warehouseOutFk, -b.itemFk, -b.quantity * IF(vHasNotInventory, 1, -1), -w.name -FROM buy b -JOIN item i ON i.id = b.itemFk -JOIN `entry` e ON e.id = b.entryFk -JOIN travel tr ON tr.id = e.travelFk -JOIN itemType t ON t.id = i.typeFk -JOIN warehouse w ON w.id = tr.warehouseOutFk -WHERE tr.shipped BETWEEN vInventoried AND vDateDayEnd -AND NOT e.isRaid -AND w.valuatedInventory -AND t.isInventory -ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity * IF(vHasNotInventory,1,-1)); + UPDATE tInventory i + JOIN tmp.buyUltimate bu ON i.warehouseFk = bu.warehouseFk AND i.itemFk = bu.itemFk + JOIN buy b ON b.id = bu.buyFk + LEFT JOIN itemCost ic ON ic.itemFk = i.itemFk + AND ic.warehouseFk = i.warehouseFk + SET i.total = i.quantity * (IFNULL(b.buyingValue, 0) + IFNULL(b.packageValue, 0) + IFNULL(b.freightValue, 0) + IFNULL(b.comissionValue, 0)), + i.cost = IFNULL(b.buyingValue, 0) + IFNULL(b.packageValue, 0) + IFNULL(b.freightValue, 0) + IFNULL(b.comissionValue, 0), + i.volume = i.quantity * ic.cm3delivery / 1000000; + SELECT ti.warehouseFk, + i.id, + i.longName, + i.size, + ti.quantity, + ti.volume, + tp.name itemTypeName, + ic.name itemCategoryName, + ti.cost, + ti.total, + ti.warehouseInventory, + ic.display + FROM tInventory ti + JOIN warehouse w ON w.id = warehouseFk + JOIN item i ON i.id = ti.itemFk + JOIN itemType tp ON tp.id = i.typeFk + JOIN itemCategory ic ON ic.id = tp.categoryFk + WHERE w.valuatedInventory + AND ti.total > 0; -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT w.id, -s.itemFk, -s.quantity * IF(vHasNotInventory, 1, -1), -w.name -FROM sale s -JOIN ticket t ON t.id = s.ticketFk -JOIN `client` c ON c.id = t.clientFk -JOIN item i ON i.id = s.itemFk -JOIN itemType it ON it.id = i.typeFk -JOIN warehouse w ON w.id = t.warehouseFk -WHERE t.shipped BETWEEN vInventoried AND vDateDayEnd -AND w.valuatedInventory -AND it.isInventory -ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + s.quantity * IF(vHasNotInventory, 1, -1); - - -IF vDated = util.VN_CURDATE() THEN -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT w.id, -s.itemFk, -s.quantity * IF(vHasNotInventory, 0, 1), -w.name -FROM sale s -JOIN ticket t ON t.id = s.ticketFk -JOIN `client` c ON c.id = t.clientFk -JOIN item i ON i.id = s.itemFk -JOIN itemType it ON it.id = i.typeFk -JOIN warehouse w ON w.id = t.warehouseFk -WHERE t.shipped BETWEEN vDated AND vDateDayEnd -AND NOT (s.isPicked OR t.isLabeled) -AND w.valuatedInventory -AND it.isInventory -ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + s.quantity * IF(vHasNotInventory, 0, 1); -END IF; - - -INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory) -SELECT tr.warehouseInFk, -b.itemFk, -b.quantity, -CONCAT(wOut.`name`, ' - ', wIn.`name`) -FROM buy b -JOIN item i ON i.id = b.itemFk -JOIN `entry` e ON e.id = b.entryFk -JOIN travel tr ON tr.id = e.travelFk -JOIN itemType t ON t.id = i.typeFk -JOIN warehouse wIn ON wIn.id = tr.warehouseInFk -JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk -WHERE vDated >= tr.shipped AND vDated < tr.landed -AND NOT isRaid -AND wIn.valuatedInventory -AND t.isInventory -AND e.isConfirmed -ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity); - -CALL buyUltimate(NULL, vDateDayEnd); - -DELETE FROM tInventory WHERE quantity IS NULL OR NOT quantity; - -UPDATE tInventory i -JOIN tmp.buyUltimate bu ON i.warehouseFk = bu.warehouseFk AND i.itemFk = bu.itemFk -JOIN buy b ON b.id = bu.buyFk -LEFT JOIN itemCost ic ON ic.itemFk = i.itemFk -AND ic.warehouseFk = i.warehouseFk -SET i.total = i.quantity * (IFNULL(b.buyingValue, 0) + IFNULL(b.packageValue, 0) + IFNULL(b.freightValue, 0) + IFNULL(b.comissionValue, 0)), -i.cost = IFNULL(b.buyingValue, 0) + IFNULL(b.packageValue, 0) + IFNULL(b.freightValue, 0) + IFNULL(b.comissionValue, 0), -i.volume = i.quantity * ic.cm3delivery / 1000000; - -SELECT ti.warehouseFk, -i.id, -i.longName, -i.size, -ti.quantity, -ti.volume, -tp.name itemTypeName, -ic.name itemCategoryName, -ti.cost, -ti.total, -ti.warehouseInventory -FROM tInventory ti -JOIN warehouse w ON w.id = warehouseFk -JOIN item i ON i.id = ti.itemFk -JOIN itemType tp ON tp.id = i.typeFk -JOIN itemCategory ic ON ic.id = tp.categoryFk -WHERE w.valuatedInventory -AND ti.total > 0; - -DROP TEMPORARY TABLE -tmp.buyUltimate, -tInventory; + DROP TEMPORARY TABLE + tmp.buyUltimate, + tInventory; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -65679,13 +65961,6 @@ proc: BEGIN ) sub GROUP BY itemFk; - UPDATE tmp.itemInventory ai - JOIN tItemInventoryCalc iic ON iic.itemFk = ai.id - SET ai.inventory = iic.quantity, - ai.visible = iic.quantity, - ai.avalaible = iic.quantity, - ai.sd = iic.quantity; - -- Cálculo del visible CALL cache.visible_refresh(vCalcFk, FALSE, vWarehouseFk); @@ -65697,8 +65972,12 @@ proc: BEGIN WHERE calc_id = vCalcFk; UPDATE tmp.itemInventory it - JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id - SET it.visible = it.visible + ivc.visible; + LEFT JOIN tItemInventoryCalc iic ON iic.itemFk = it.id + LEFT JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id + SET it.inventory = iic.quantity, + it.visible = ivc.visible, + it.avalaible = iic.quantity, + it.sd = iic.quantity; -- Calculo del disponible CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc @@ -65746,32 +66025,36 @@ proc: BEGIN CALL item_getAtp(vDate); CALL travel_upcomingArrivals(vWarehouseFk, vDate); - UPDATE tmp.itemInventory ai - JOIN ( - SELECT it.itemFk, - SUM(it.quantity) quantity, - im.quantity minQuantity - FROM tmp.itemCalc it - JOIN tmp.itemAtp im ON im.itemFk = it.itemFk - JOIN item i ON i.id = it.itemFk - LEFT JOIN origin o ON o.id = i.originFk - LEFT JOIN tmp.itemTravel t ON t.wh = o.warehouseFk - WHERE it.dated < IF(vMaxDays < 0 AND t.landing IS NOT NULL, - t.landing, - vDateToTomorrow) - GROUP BY it.itemFk - ) sub ON sub.itemFk = ai.id - SET ai.avalaible = IF(sub.minQuantity > 0, - ai.avalaible, - ai.avalaible + sub.minQuantity), - ai.sd = ai.inventory + sub.quantity; + CREATE OR REPLACE TEMPORARY TABLE tItemAvailableCalc + (PRIMARY KEY (itemFk)) + ENGINE = MEMORY + SELECT it.itemFk, + SUM(it.quantity) quantity, + im.quantity minQuantity + FROM tmp.itemCalc it + JOIN tmp.itemAtp im ON im.itemFk = it.itemFk + JOIN item i ON i.id = it.itemFk + LEFT JOIN origin o ON o.id = i.originFk + LEFT JOIN tmp.itemTravel t ON t.wh = o.warehouseFk + WHERE it.dated < IF(vMaxDays < 0 AND t.landing IS NOT NULL, + t.landing, + vDateToTomorrow) + GROUP BY it.itemFk; + + UPDATE tmp.itemInventory it + JOIN tItemAvailableCalc iac ON iac.itemFk = it.id + SET it.avalaible = IF(iac.minQuantity > 0, + it.avalaible, + it.avalaible + iac.minQuantity), + it.sd = it.inventory + iac.quantity; DROP TEMPORARY TABLE tmp.itemTravel, tmp.itemCalc, tmp.itemAtp, tItemInventoryCalc, - tItemVisibleCalc; + tItemVisibleCalc, + tItemAvailableCalc; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -66861,27 +67144,30 @@ proc: BEGIN WHERE NOT `lines`; -- Lineas por linea de encajado + CREATE OR REPLACE TEMPORARY TABLE tItemPackingType + (PRIMARY KEY(ticketFk)) + ENGINE = MEMORY + SELECT ticketFk, + SUM(sub.H) H, + SUM(sub.V) V, + SUM(sub.N) N + FROM ( + SELECT t.ticketFk, + SUM(i.itemPackingTypeFk = 'H') H, + SUM(i.itemPackingTypeFk = 'V') V, + SUM(i.itemPackingTypeFk IS NULL) N + FROM tmp.productionTicket t + JOIN sale s ON s.ticketFk = t.ticketFk + JOIN item i ON i.id = s.itemFk + GROUP BY t.ticketFk, i.itemPackingTypeFk + ) sub + GROUP BY ticketFk; + UPDATE tmp.productionBuffer pb - JOIN ( - SELECT ticketFk, - SUM(sub.H) H, - SUM(sub.V) V, - SUM(sub.N) N - FROM ( - SELECT t.ticketFk, - SUM(i.itemPackingTypeFk = 'H') H, - SUM(i.itemPackingTypeFk = 'V') V, - SUM(i.itemPackingTypeFk IS NULL) N - FROM tmp.productionTicket t - JOIN sale s ON s.ticketFk = t.ticketFk - JOIN item i ON i.id = s.itemFk - GROUP BY t.ticketFk, i.itemPackingTypeFk - ) sub - GROUP BY ticketFk - ) sub2 ON sub2.ticketFk = pb.ticketFk - SET pb.H = sub2.H, - pb.V = sub2.V, - pb.N = sub2.N; + JOIN tItemPackingType ti ON ti.ticketFk = pb.ticketFk + SET pb.H = ti.H, + pb.V = ti.V, + pb.N = ti.N; -- Colecciones segun tipo de encajado UPDATE tmp.productionBuffer pb @@ -66960,7 +67246,8 @@ proc: BEGIN tmp.risk, tmp.ticket_problems, tmp.ticketWithPrevia, - tItemShelvingStock; + tItemShelvingStock, + tItemPackingType; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -68339,17 +68626,21 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `route_updateM3`(vRoute INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `route_updateM3`( + vSelf INT +) BEGIN +/** + * Actualiza el volumen de la ruta. + * + * @param vSelf Id ruta + */ + DECLARE vVolume DECIMAL(10,1) + DEFAULT (SELECT SUM(volume) FROM saleVolume WHERE routeFk = vSelf); - UPDATE vn.route r - LEFT JOIN ( - SELECT routeFk, SUM(volume) AS m3 - FROM saleVolume - WHERE routeFk = vRoute - ) v ON v.routeFk = r.id - SET r.m3 = IFNULL(v.m3,0) - WHERE r.id =vRoute; + UPDATE `route` + SET m3 = IFNULL(vVolume, 0) + WHERE id = vSelf; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -68445,15 +68736,10 @@ BEGIN * @param vSaleGroupFk id de la preparación previa * @param vParkingFk id del parking */ - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - RESIGNAL; - END; - UPDATE saleGroup sg SET sg.parkingFk = vParkingFk - WHERE sg.id = vSaleGroupFk - AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK; + WHERE sg.id = vSaleGroupFk + AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK; CALL ticket_setNextState(ticket_get(vSaleGroupFk)); END ;; @@ -69496,7 +69782,7 @@ BEGIN DECLARE vAvailableCache INT; DECLARE vVisibleCache INT; DECLARE vDone BOOL; - DECLARE vComponentCount INT; + DECLARE vRequiredComponent INT; DECLARE vCursor CURSOR FOR SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(tt.shipped)) @@ -69537,7 +69823,7 @@ BEGIN SELECT ticketFk, clientFk FROM tmp.sale_getProblems; - SELECT COUNT(*) INTO vComponentCount + SELECT COUNT(*) INTO vRequiredComponent FROM component WHERE isRequired; @@ -69579,20 +69865,18 @@ BEGIN -- Faltan componentes INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk) - SELECT ticketFk, (vComponentCount > nComp) hasComponentLack, saleFk - FROM ( - SELECT COUNT(s.id) nComp, tl.ticketFk, s.id saleFk - FROM tmp.ticket_list tl - JOIN sale s ON s.ticketFk = tl.ticketFk - LEFT JOIN saleComponent sc ON sc.saleFk = s.id - LEFT JOIN component c ON c.id = sc.componentFk AND c.isRequired - JOIN ticket t ON t.id = tl.ticketFk - JOIN agencyMode am ON am.id = t.agencyModeFk - JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk - WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP') - AND s.quantity > 0 - GROUP BY s.id - ) sub + SELECT t.id, COUNT(c.id) < vRequiredComponent hasComponentLack, s.id + FROM tmp.ticket_list tl + JOIN ticket t ON t.id = tl.ticketFk + JOIN sale s ON s.ticketFk = t.id + JOIN agencyMode am ON am.id = t.agencyModeFk + JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk + LEFT JOIN saleComponent sc ON sc.saleFk = s.id + LEFT JOIN component c ON c.id = sc.componentFk + AND c.isRequired + WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP') + AND s.quantity > 0 + GROUP BY s.id HAVING hasComponentLack; -- Cliente congelado @@ -69759,7 +70043,7 @@ BEGIN ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; -- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra - CALL buyUltimate(vWarehouseFk, vDate); + CALL buy_getUltimate(NULL, vWarehouseFk, vDate); INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) SELECT ticketFk, problem ,saleFk FROM ( @@ -69872,14 +70156,14 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `sale_recalcComponent` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; -/*!50003 SET character_set_client = utf8mb3 */ ; -/*!50003 SET character_set_results = utf8mb3 */ ; -/*!50003 SET collation_connection = utf8mb3_general_ci */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_recalcComponent`(vOption VARCHAR(25)) proc: BEGIN @@ -69960,7 +70244,7 @@ proc: BEGIN DROP TEMPORARY TABLE tmp.zoneGetLanded; -- rellena la tabla buyUltimate con la ultima compra - CALL buyUltimate (vWarehouseFk, vShipped); + CALL buy_getUltimate(NULL, vWarehouseFk, vShipped); CREATE OR REPLACE TEMPORARY TABLE tmp.sale (PRIMARY KEY (saleFk)) ENGINE = MEMORY @@ -70063,7 +70347,7 @@ BEGIN JOIN ticket t ON t.id = s.ticketFk WHERE s.id = vSaleFk; - CALL buyUltimate(vWarehouseFk, vDate); + CALL buy_getUltimate(vNewItemFk, vWarehouseFk, vDate); SELECT `grouping`, groupingMode, packing INTO vGrouping,vGroupingMode,vPacking @@ -70071,6 +70355,8 @@ BEGIN JOIN tmp.buyUltimate tmp ON b.id = tmp.buyFk WHERE tmp.itemFk = vNewItemFk AND tmp.WarehouseFk = vWarehouseFk; + DROP TEMPORARY TABLE tmp.buyUltimate; + IF vGroupingMode = 'packing' AND vPacking > 0 THEN SET vRoundQuantity = vPacking; END IF; @@ -70166,24 +70452,29 @@ BEGIN */ DECLARE vSaleFk INT; DECLARE vHasProblem INT; + DECLARE vIsProblemCalcNeeded BOOL; DECLARE vDone BOOL; - DECLARE vSaleList CURSOR FOR SELECT saleFk, hasProblem FROM tmp.sale; + DECLARE vSaleList CURSOR FOR + SELECT saleFk, hasProblem, isProblemCalcNeeded + FROM tmp.sale; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; OPEN vSaleList; l: LOOP SET vDone = FALSE; - FETCH vSaleList INTO vSaleFk, vHasProblem; + FETCH vSaleList INTO vSaleFk, vHasProblem, vIsProblemCalcNeeded; IF vDone THEN LEAVE l; END IF; UPDATE sale - SET problem = CONCAT( - IF(vHasProblem, - CONCAT(problem, ',', vProblemCode), - REPLACE(problem, vProblemCode , ''))) + SET problem = IF (vIsProblemCalcNeeded, + CONCAT( + IF(vHasProblem, + CONCAT(problem, ',', vProblemCode), + REPLACE(problem, vProblemCode , ''))), + NULL) WHERE id = vSaleFk; END LOOP; CLOSE vSaleList; @@ -70218,7 +70509,7 @@ BEGIN ENGINE = MEMORY SELECT vSelf saleFk, sale_hasComponentLack(vSelf) hasProblem, - ticket_isProblemCalcNeeded(ticketFk) isProblemCalcNeeded + (ticket_isProblemCalcNeeded(ticketFk) AND quantity > 0) isProblemCalcNeeded FROM sale WHERE id = vSelf; @@ -70256,9 +70547,9 @@ BEGIN ENGINE = MEMORY SELECT saleFk, sale_hasComponentLack(saleFk) hasProblem, - ticket_isProblemCalcNeeded(ticketFk) isProblemCalcNeeded + (ticket_isProblemCalcNeeded(ticketFk) AND quantity > 0) isProblemCalcNeeded FROM ( - SELECT s.id saleFk, s.ticketFk + SELECT s.id saleFk, s.ticketFk, s.quantity FROM ticket t JOIN sale s ON s.ticketFk = t.id LEFT JOIN saleComponent sc ON sc.saleFk = s.id @@ -70305,7 +70596,7 @@ BEGIN JOIN ticket t ON t.id = s.ticketFk WHERE s.id = vSelf; - CALL buyUltimate(vWarehouseFk, vShipped); + CALL buy_getUltimate(vItemFk, vWarehouseFk, vShipped); CREATE OR REPLACE TEMPORARY TABLE tmp.sale SELECT vSelf saleFk, @@ -70681,12 +70972,6 @@ BEGIN DECLARE vParkingFk INT; DECLARE vLastWeek DATE; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - ROLLBACK; - RESIGNAL; - END; - SET vParkingCode = REPLACE(vParkingCode, ' ', ''); SELECT id INTO vParkingFk @@ -70697,8 +70982,6 @@ BEGIN CALL util.throw('parkingNotExist'); END IF; - START TRANSACTION; - SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK; -- Comprobamos si es una prep. previa, ticket, colección o shelving @@ -70713,8 +70996,6 @@ BEGIN ELSE CALL util.throw('paramNotExist'); END IF; - - COMMIT; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -70991,21 +71272,21 @@ DELIMITER ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT) -proc: BEGIN +BEGIN /** * Aparca una matrícula en un parking * * @param vShelvingCode code de la matrícula * @param vParkingFk id del parking */ - INSERT INTO vn.shelvingLog (originFk, userFk, action , description,changedModel,changedModelId) + INSERT INTO shelvingLog (originFk, userFk, action , description,changedModel,changedModelId) SELECT s.id, account.myUser_getId(), 'update', CONCAT("Cambio parking ",vShelvingCode," de ", p.code," a ", pNew.code),'Shelving',s.id FROM parking p JOIN shelving s ON s.parkingFk = p.id JOIN parking pNew ON pNew.id = vParkingFk WHERE s.code = vShelvingCode COLLATE utf8_unicode_ci; - UPDATE vn.shelving + UPDATE shelving SET parkingFk = vParkingFk, parked = util.VN_NOW(), isPrinted = TRUE @@ -71255,7 +71536,7 @@ BEGIN WHERE warehouse_id = vAuctionWarehouseFk ON DUPLICATE KEY UPDATE quantity = tmp.item.quantity + VALUES(quantity); - CALL buyUltimate(vAuctionWarehouseFk, vDated); + CALL buy_getUltimate(NULL, vAuctionWarehouseFk, vDated); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -74392,13 +74673,12 @@ BEGIN FROM zone WHERE id = vZoneFk; - CALL buyUltimate(vWarehouseFk, vShipped); + CALL buy_getUltimate(NULL, vWarehouseFk, vShipped); DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; CREATE TEMPORARY TABLE tmp.ticketLot ENGINE = MEMORY ( - SELECT - vWarehouseFk AS warehouseFk, - NULL AS available, + SELECT vWarehouseFk warehouseFk, + NULL available, s.itemFk, bu.buyFk, vZoneFk zoneFk @@ -75694,11 +75974,6 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - RESIGNAL; - END; - INSERT INTO vn.ticketParking(ticketFk, parkingFk) SELECT IFNULL(tc2.ticketFk, t.id), vParkingFk FROM ticket t @@ -75793,24 +76068,28 @@ BEGIN */ DECLARE vTicketFk INT; DECLARE vHasProblem INT; + DECLARE vIsProblemCalcNeeded BOOL; DECLARE vDone BOOL; - DECLARE vTicketList CURSOR FOR SELECT ticketFk, hasProblem FROM tmp.ticket; + DECLARE vTicketList CURSOR FOR + SELECT ticketFk, hasProblem, isProblemCalcNeeded + FROM tmp.ticket; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; OPEN vTicketList; l: LOOP SET vDone = FALSE; - FETCH vTicketList INTO vTicketFk, vHasProblem; + FETCH vTicketList INTO vTicketFk, vHasProblem, vIsProblemCalcNeeded; IF vDone THEN LEAVE l; END IF; UPDATE ticket - SET problem = CONCAT( - IF(vHasProblem, + SET problem = IF(vIsProblemCalcNeeded, + CONCAT(IF(vHasProblem, CONCAT(problem, ',', vProblemCode), - REPLACE(problem, vProblemCode , ''))) + REPLACE(problem, vProblemCode , ''))), + NULL) WHERE id = vTicketFk; END LOOP; CLOSE vTicketList; @@ -75964,6 +76243,54 @@ DELIMITER ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `ticket_setProblemRiskByClient` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemRiskByClient`( + vClientFk INT +) +BEGIN +/** + * Updates future ticket risk for a client. + * + * @param vClientFk Id client + */ + DECLARE vDone INT DEFAULT FALSE; + DECLARE vTicketFk INT; + DECLARE vTickets CURSOR FOR + SELECT id + FROM ticket + WHERE clientFk = vClientFk + AND shipped >= util.VN_CURDATE() + AND refFk IS NULL; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + OPEN vTickets; + l: LOOP + SET vDone = FALSE; + FETCH vTickets INTO vTicketFk; + + IF vDone THEN + LEAVE l; + END IF; + + CALL vn.ticket_setProblemRisk(vTicketFk); + END LOOP; + CLOSE vTickets; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `ticket_setProblemRounding` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -75989,7 +76316,7 @@ BEGIN FROM ticket WHERE id = vSelf; - CALL buyUltimate(vWarehouseFk, vDated); + CALL buy_getUltimate(NULL, vWarehouseFk, vDated); CREATE OR REPLACE TEMPORARY TABLE tmp.sale (INDEX(saleFk, isProblemCalcNeeded)) @@ -76142,96 +76469,85 @@ DELIMITER ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setRisk`( - vClientFk INT) + vClientFk INT +) BEGIN /** - * Update the risk for a client with pending tickets + * Update the risk for a client with pending tickets. * * @param vClientFk Id cliente */ - DECLARE vHasDebt BOOL; - DECLARE vStarted DATETIME; - - SELECT COUNT(*) INTO vHasDebt - FROM `client` - WHERE id = vClientFk - AND typeFk = 'normal'; - - IF vHasDebt THEN - - SELECT util.VN_CURDATE() - INTERVAL riskScope MONTH INTO vStarted - FROM clientConfig; - + IF (SELECT COUNT(*) FROM client WHERE id = vClientFk AND typeFk = 'normal') THEN CREATE OR REPLACE TEMPORARY TABLE tTicketRisk - (KEY (ticketFk)) + (PRIMARY KEY (ticketFk)) ENGINE = MEMORY - WITH ticket AS( - SELECT id ticketFk, - companyFk, - DATE(shipped) dated, - totalWithVat, - ticket_isProblemCalcNeeded(id) isProblemCalcNeeded - FROM vn.ticket - WHERE clientFk = vClientFk - AND refFk IS NULL - AND NOT isDeleted - AND IFNULL(totalWithVat, 0) <> 0 - AND shipped > vStarted - ), balance AS( - SELECT SUM(amount)amount, companyFk - FROM ( - SELECT amount, companyFk - FROM vn.clientRisk - WHERE clientFk = vClientFk - UNION ALL - SELECT -(SUM(amount) / 100) amount, tm.companyFk - FROM hedera.tpvTransaction t - JOIN hedera.tpvMerchant tm ON t.id = t.merchantFk - WHERE clientFk = vClientFk - AND receiptFk IS NULL - AND status = 'ok' - ) sub - WHERE companyFk - GROUP BY companyFk - ), uninvoiced AS( + WITH ticket AS ( + SELECT t.id ticketFk, + t.companyFk, + DATE(t.shipped) dated, + t.totalWithVat, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + FROM vn.ticket t + JOIN vn.clientConfig cc + WHERE t.clientFk = vClientFk + AND t.refFk IS NULL + AND NOT t.isDeleted + AND IFNULL(t.totalWithVat, 0) <> 0 + AND t.shipped > (util.VN_CURDATE() - INTERVAL cc.riskScope MONTH) + ), uninvoiced AS ( SELECT companyFk, dated, SUM(totalWithVat) amount FROM ticket - GROUP BY companyFk, dated - ), receipt AS( - SELECT companyFk, DATE(payed) dated, SUM(amountPaid) amount - FROM vn.receipt - WHERE clientFk = vClientFk - AND payed > util.VN_CURDATE() - GROUP BY companyFk, DATE(payed) - ), risk AS( + GROUP BY companyFk, dated + ), companies AS ( + SELECT DISTINCT companyFk FROM uninvoiced + ), balance AS ( + SELECT SUM(IFNULL(amount, 0))amount, companyFk + FROM ( + SELECT cr.amount, c.companyFk + FROM companies c + LEFT JOIN vn.clientRisk cr ON cr.companyFk = c.companyFk + AND cr.clientFk = vClientFk + UNION ALL + SELECT -(SUM(t.amount) / 100) amount, c.companyFk + FROM companies c + LEFT JOIN hedera.tpvMerchant tm ON tm.companyFk = c.companyFk + LEFT JOIN hedera.tpvTransaction t ON t.merchantFk = tm.id + AND t.clientFk = vClientFk + AND t.receiptFk IS NULL + AND t.`status` = 'ok' + ) sub + WHERE companyFk + GROUP BY companyFk + ), receipt AS ( + SELECT r.companyFk, DATE(r.payed) dated, SUM(r.amountPaid) amount + FROM vn.receipt r + JOIN companies c ON c.companyFk = r.companyFk + WHERE r.clientFk = vClientFk + AND r.payed > util.VN_CURDATE() + GROUP BY r.companyFk, DATE(r.payed) + ), risk AS ( SELECT b.companyFk, - ui.dated, - SUM(ui.amount) OVER (PARTITION BY b.companyFk ORDER BY ui.dated ) + + ui.dated, + SUM(ui.amount) OVER (PARTITION BY b.companyFk ORDER BY ui.dated) + b.amount + SUM(IFNULL(r.amount, 0)) amount FROM balance b JOIN uninvoiced ui ON ui.companyFk = b.companyFk - LEFT JOIN receipt r ON r.dated > ui.dated AND r.companyFk = ui.companyFk + LEFT JOIN receipt r ON r.dated > ui.dated + AND r.companyFk = ui.companyFk GROUP BY b.companyFk, ui.dated - ) - SELECT ti.ticketFk, r.amount, ti.isProblemCalcNeeded - FROM ticket ti - JOIN risk r ON r.dated = ti.dated AND r.companyFk = ti.companyFk; + ) + SELECT ti.ticketFk, r.amount, ti.isProblemCalcNeeded + FROM ticket ti + JOIN risk r ON r.dated = ti.dated + AND r.companyFk = ti.companyFk; UPDATE ticket t JOIN tTicketRisk tr ON tr.ticketFk = t.id - SET t.risk = tr.amount - WHERE tr.isProblemCalcNeeded - ORDER BY t.id; - - UPDATE ticket t - JOIN tTicketRisk tr ON tr.ticketFk = t.id - SET t.risk = NULL - WHERE tr.isProblemCalcNeeded - ORDER BY t.id; + SET t.risk = IF(tr.isProblemCalcNeeded, tr.amount, NULL); DROP TEMPORARY TABLE tTicketRisk; - END IF; + END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -76408,7 +76724,7 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_splitItemPackingType`( vSelf INT, - vItemPackingTypeFk VARCHAR(1) + vOriginalItemPackingTypeFk VARCHAR(1) ) BEGIN /** @@ -76416,7 +76732,7 @@ BEGIN * Respeta el id inicial para el tipo propuesto. * * @param vSelf Id ticket - * @param vItemPackingTypeFk Tipo para el que se reserva el número de ticket original + * @param vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original * @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk) */ DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H'; @@ -76430,7 +76746,7 @@ BEGIN SELECT itemPackingTypeFk FROM tSaleGroup WHERE itemPackingTypeFk IS NOT NULL - ORDER BY (itemPackingTypeFk = vItemPackingTypeFk) DESC; + ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; @@ -86309,7 +86625,7 @@ USE `pbx`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `queueConf` AS select `q`.`name` AS `name`,`c`.`strategy` AS `strategy`,`c`.`timeout` AS `timeout`,`c`.`retry` AS `retry`,`c`.`weight` AS `weight`,`c`.`maxLen` AS `maxlen`,`c`.`ringInUse` AS `ringinuse` from (`queue` `q` join `queueConfig` `c` on(`q`.`config` = `c`.`id`)) */; +/*!50001 VIEW `queueConf` AS select `q`.`name` AS `name`,`c`.`strategy` AS `strategy`,`c`.`timeout` AS `timeout`,`c`.`retry` AS `retry`,`c`.`weight` AS `weight`,`c`.`maxLen` AS `maxlen`,`c`.`ringInUse` AS `ringinuse` from (`queue` `q` join `queueMultiConfig` `c` on(`q`.`config` = `c`.`id`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -91039,4 +91355,4 @@ USE `vn2008`; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-07-23 8:19:18 +-- Dump completed on 2024-08-06 6:02:57 diff --git a/db/dump/.dump/triggers.sql b/db/dump/.dump/triggers.sql index 1b92f0d43..014bce729 100644 --- a/db/dump/.dump/triggers.sql +++ b/db/dump/.dump/triggers.sql @@ -6325,10 +6325,6 @@ BEGIN SET NEW.userFk = account.myUser_getId(); END IF; - IF (NEW.visible <> OLD.visible) THEN - SET NEW.available = GREATEST(NEW.available + NEW.visible - OLD.visible, 0); - END IF; - END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -9224,13 +9220,16 @@ BEGIN SET NEW.editorFk = account.myUser_getId(); IF NOT (NEW.routeFk <=> OLD.routeFk) THEN - INSERT IGNORE INTO `vn`.`routeRecalc` (`routeFk`) - SELECT r.id - FROM vn.route r - WHERE r.isOk = FALSE - AND r.id IN (OLD.routeFk,NEW.routeFk) - AND r.created >= util.VN_CURDATE() - GROUP BY r.id; + IF NEW.isSigned THEN + CALL util.throw('A signed ticket cannot be rerouted'); + END IF; + INSERT IGNORE INTO routeRecalc(routeFk) + SELECT id + FROM `route` + WHERE NOT isOk + AND id IN (OLD.routeFk, NEW.routeFk) + AND created >= util.VN_CURDATE() + GROUP BY id; END IF; IF NOT (DATE(NEW.shipped) <=> DATE(OLD.shipped)) THEN @@ -11143,4 +11142,4 @@ USE `vn2008`; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-07-23 8:19:41 +-- Dump completed on 2024-08-06 6:03:19 From 6fb78e15995efb5ad0972c8a9061cd53d9ee3bd2 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 6 Aug 2024 08:59:20 +0200 Subject: [PATCH 052/250] test: hotFix saveSign --- .../back/methods/ticket/specs/saveSign.spec.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/ticket/back/methods/ticket/specs/saveSign.spec.js b/modules/ticket/back/methods/ticket/specs/saveSign.spec.js index 53ab42364..e93408973 100644 --- a/modules/ticket/back/methods/ticket/specs/saveSign.spec.js +++ b/modules/ticket/back/methods/ticket/specs/saveSign.spec.js @@ -30,8 +30,6 @@ describe('Ticket saveSign()', () => { it('should change state for ticket', async() => { const tx = await models.Ticket.beginTransaction({}); const ticketWithPackedState = 7; - const ticketStateId = 16; - const ticketCode = 'PARTIAL_DELIVERED'; spyOn(models.Dms, 'uploadFile').and.returnValue([{id: 1}]); let ticketTrackingAfter; @@ -39,16 +37,11 @@ describe('Ticket saveSign()', () => { const options = {transaction: tx}; const tickets = [ticketWithPackedState]; - const state = await models.State.findById(ticketStateId, null, options); - await state.updateAttributes({ - code: ticketCode, - name: ticketCode - }, options); + const expedition = await models.Expedition.findById(3, null, options); + expedition.updateAttribute('ticketFk', ticketWithPackedState, options); await models.Ticket.saveSign(ctx, tickets, null, null, options); - ticketTrackingAfter = await models.TicketLastState.findOne({ - where: {ticketFk: ticketWithPackedState} - }, options); + ticketTrackingAfter = await models.TicketLastState.findById(ticketWithPackedState, null, options); await tx.rollback(); } catch (e) { @@ -56,6 +49,6 @@ describe('Ticket saveSign()', () => { throw e; } - expect(ticketTrackingAfter.name).toBe('PARTIAL_DELIVERED'); + expect(ticketTrackingAfter.name).toBe('Entregado en parte'); }); }); From 69c676d44b0678c8037c2d779c14c1a65ce001e7 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 6 Aug 2024 09:38:27 +0200 Subject: [PATCH 053/250] hotFix(route): fix getTicket use skip --- modules/route/back/methods/route/getTickets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index c0b952b70..5aa4fdf0f 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -90,7 +90,7 @@ module.exports = Self => { stmt.merge(conn.makeWhere(filter.where)); stmt.merge(conn.makeGroupBy('t.id')); - stmt.merge(conn.makeOrderBy(filter.order)); + stmt.merge(conn.makePagination(filter)); return conn.executeStmt(stmt, myOptions); }; From 0152fb8a982360aa7bf72bf4ae0746db44b4051d Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 6 Aug 2024 09:51:15 +0200 Subject: [PATCH 054/250] hotFix getTIckets --- modules/route/back/methods/route/getTickets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index 5aa4fdf0f..c0b952b70 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -90,7 +90,7 @@ module.exports = Self => { stmt.merge(conn.makeWhere(filter.where)); stmt.merge(conn.makeGroupBy('t.id')); - stmt.merge(conn.makePagination(filter)); + stmt.merge(conn.makeOrderBy(filter.order)); return conn.executeStmt(stmt, myOptions); }; From c7c711ac1a4fb0f613827ccb6a8b0b4aa637ab69 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 6 Aug 2024 12:43:51 +0200 Subject: [PATCH 055/250] fix: refs #7728 duaInvoiceInBooking --- db/routines/vn/procedures/duaInvoiceInBooking.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/duaInvoiceInBooking.sql b/db/routines/vn/procedures/duaInvoiceInBooking.sql index 80166db62..4570de332 100644 --- a/db/routines/vn/procedures/duaInvoiceInBooking.sql +++ b/db/routines/vn/procedures/duaInvoiceInBooking.sql @@ -32,7 +32,7 @@ BEGIN JOIN duaEntry de ON de.entryFk = e.id JOIN invoiceInConfig iic WHERE de.duaFk = vDuaFk - AND iidd.dueDated <= util.VN_CURDATE() + INTERVAL iic.dueDateMarginDays DAY; + AND iidd.dueDated < util.VN_CURDATE() + INTERVAL iic.dueDateMarginDays DAY; IF vIncorrectInvoiceInDueDay THEN CALL util.throw(CONCAT('Incorrect due date, invoice: ', vIncorrectInvoiceInDueDay)); From d1bb77d6ed2222e149aa9442997693aa2a871eeb Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 6 Aug 2024 12:51:55 +0200 Subject: [PATCH 056/250] fix: refs #7834 expeditionScan_Put --- db/routines/vn/procedures/expeditionScan_Put.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index 68e124e4b..cbc76d317 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -4,11 +4,11 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put` vExpeditionFk INT ) BEGIN - IF (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN + IF NOT (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN CALL util.throw('Expedition not exists'); END IF; - IF (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN + IF NOT (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN CALL util.throw('Pallet not exists'); END IF; From 03358170d3281404a694196cbbfb6fea2727ca81 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 6 Aug 2024 14:10:16 +0200 Subject: [PATCH 057/250] fix: refs #7740 ticket route throw --- db/routines/vn/triggers/ticket_beforeUpdate.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/db/routines/vn/triggers/ticket_beforeUpdate.sql b/db/routines/vn/triggers/ticket_beforeUpdate.sql index 34b6711ff..6d5d7f908 100644 --- a/db/routines/vn/triggers/ticket_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticket_beforeUpdate.sql @@ -8,7 +8,13 @@ BEGIN SET NEW.editorFk = account.myUser_getId(); IF NOT (NEW.routeFk <=> OLD.routeFk) THEN - IF NEW.isSigned THEN + IF NEW.isSigned AND NOT ( + SELECT (COUNT(s.id) = COUNT(cb.saleFk) + AND SUM(s.quantity) = SUM(cb.quantity)) + FROM sale s + LEFT JOIN claimBeginning cb ON cb.saleFk = s.id + WHERE s.ticketFk = NEW.id + ) THEN CALL util.throw('A signed ticket cannot be rerouted'); END IF; INSERT IGNORE INTO routeRecalc(routeFk) From 163faf983e326c2679c54d1993c0daeade61b7b4 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 6 Aug 2024 16:34:46 +0200 Subject: [PATCH 058/250] feat workerActivity refs #6078 --- back/methods/workerActivity/add.js | 10 +++++--- back/methods/workerActivity/specs/add.spec.js | 25 +++++++------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/back/methods/workerActivity/add.js b/back/methods/workerActivity/add.js index 587ebfae7..bba05dafd 100644 --- a/back/methods/workerActivity/add.js +++ b/back/methods/workerActivity/add.js @@ -24,8 +24,12 @@ module.exports = Self => { Self.add = async(ctx, code, model, options) => { const userId = ctx.req.accessToken.userId; + const myOptions = {}; - const result = await await Self.rawSql(` + if (typeof options == 'object') + Object.assign(myOptions, options); + + return await Self.rawSql(` INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model) SELECT ?, ?, @@ -44,8 +48,6 @@ module.exports = Self => { WHERE sub.workerFk IS NULL OR sub.code <> ? OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;` - , [userId, code, model, userId, code]); - - return result; + , [userId, code, model, userId, code], myOptions); }; }; diff --git a/back/methods/workerActivity/specs/add.spec.js b/back/methods/workerActivity/specs/add.spec.js index 3f9657c67..67a85cb7d 100644 --- a/back/methods/workerActivity/specs/add.spec.js +++ b/back/methods/workerActivity/specs/add.spec.js @@ -1,36 +1,29 @@ const {models} = require('vn-loopback'); describe('workerActivity insert()', () => { - beforeAll(async() => { - ctx = { - req: { - accessToken: {}, - headers: {origin: 'http://localhost'}, - __: value => value - } - }; - }); + const ctx = beforeAll.getCtx(1106); it('should insert in workerActivity', async() => { const tx = await models.WorkerActivity.beginTransaction({}); + let count = 0; + const options = {transaction: tx}; try { await models.WorkerActivityType.create( - {'code': 'STOP', 'description': 'STOP'} + {'code': 'STOP', 'description': 'STOP'}, options ); - const options = {transaction: tx}; - ctx.req.accessToken.userId = 1106; - models.WorkerActivity.add(ctx, 'STOP', 'APP', options); + result = await models.WorkerActivity.add(ctx, 'STOP', 'APP', options); + + count = await models.WorkerActivity.count( + {'workerFK': 1106}, options + ); await tx.rollback(); } catch (e) { await tx.rollback(); throw e; } - const count = await models.WorkerActivity.count( - {'workerFK': 1106} - ); expect(count).toEqual(1); }); From b3b7e9c2135c114fe842359abe48029f7d6cd353 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 6 Aug 2024 17:08:27 +0200 Subject: [PATCH 059/250] fix: refs #7524 default limit select --- loopback/common/models/vn-model.js | 9 ++++----- loopback/server/boot/orm.js | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 loopback/server/boot/orm.js diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 0b16c6532..20c75ca8c 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -31,20 +31,19 @@ module.exports = function(Self) { /* * Intercept GET request for find */ - this.beforeRemote('find', async function(ctx) { + this.beforeRemote('find', async ctx => { isSelect = true; const filter = ctx.args.filter || {}; - // console.log(this.dataSource, Self.dataSource); undefined/null if (filter.limit === undefined) { - filter.limit = 1/* limit */; + filter.limit = this.app.orm.selectLimit; ctx.args.filter = filter; } }); - this.observe('loaded', async function({data}) { + this.observe('loaded', async({data}) => { if (!isSelect) return; const length = Array.isArray(data) ? data.length : data ? 1 : 0; - if (length >= 1) throw new UserError('Too many records'); + if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); }); // Register field ACL validation diff --git a/loopback/server/boot/orm.js b/loopback/server/boot/orm.js new file mode 100644 index 000000000..8bbd969e1 --- /dev/null +++ b/loopback/server/boot/orm.js @@ -0,0 +1,6 @@ +module.exports = async function(app) { + if (!app.orm) { + const ormConfig = await app.models.OrmConfig.findOne(); + app.orm = ormConfig; + } +}; From f385b9a8a3da9702998a7c7204212084b9fe6498 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 7 Aug 2024 07:12:29 +0200 Subject: [PATCH 060/250] feat: refs #7818 entry_splitByShelving --- db/routines/vn/procedures/entry_splitByShelving.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/entry_splitByShelving.sql b/db/routines/vn/procedures/entry_splitByShelving.sql index f46278e5a..9f09ed5be 100644 --- a/db/routines/vn/procedures/entry_splitByShelving.sql +++ b/db/routines/vn/procedures/entry_splitByShelving.sql @@ -15,7 +15,7 @@ BEGIN DECLARE cur CURSOR FOR SELECT bb.id buyFk, - FLOOR(ish.visible / ish.packing) ishStickers, + LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers, bb.stickers buyStickers FROM itemShelving ish JOIN (SELECT b.id, b.itemFk, b.stickers @@ -23,7 +23,6 @@ BEGIN WHERE b.entryFk = vFromEntryFk ORDER BY b.stickers DESC LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk - AND bb.stickers >= FLOOR(ish.visible / ish.packing) WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci AND NOT ish.isSplit GROUP BY ish.id; From 849989afa87c5a80dcd025dc38e4dd746eca8984 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 7 Aug 2024 08:19:44 +0200 Subject: [PATCH 061/250] feat workerActivity refs #6078 --- back/methods/workerActivity/add.js | 33 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/back/methods/workerActivity/add.js b/back/methods/workerActivity/add.js index bba05dafd..4592a0797 100644 --- a/back/methods/workerActivity/add.js +++ b/back/methods/workerActivity/add.js @@ -1,4 +1,3 @@ - module.exports = Self => { Self.remoteMethodCtx('add', { description: 'Add activity if the activity is different or is the same but have exceed time for break', @@ -31,23 +30,21 @@ module.exports = Self => { return await Self.rawSql(` INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model) - SELECT ?, - ?, - ? - FROM workerTimeControlParams wtcp - LEFT JOIN ( - SELECT wa.workerFk, - wa.created, - wat.code - FROM workerActivity wa - LEFT JOIN workerActivityType wat ON wat.code = wa.workerActivityTypeFk - WHERE wa.workerFk = ? - ORDER BY wa.created DESC - LIMIT 1 - ) sub ON TRUE - WHERE sub.workerFk IS NULL - OR sub.code <> ? - OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;` + SELECT ?, ?, ? + FROM workerTimeControlParams wtcp + LEFT JOIN ( + SELECT wa.workerFk, + wa.created, + wat.code + FROM workerActivity wa + LEFT JOIN workerActivityType wat ON wat.code = wa.workerActivityTypeFk + WHERE wa.workerFk = ? + ORDER BY wa.created DESC + LIMIT 1 + ) sub ON TRUE + WHERE sub.workerFk IS NULL + OR sub.code <> ? + OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;` , [userId, code, model, userId, code], myOptions); }; }; From 41e44b747a7c02a00f0cd80ec8762a558d2acc7c Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 7 Aug 2024 10:12:39 +0200 Subject: [PATCH 062/250] fix: refs #7685 hotFixAddress_updateCoordinates --- db/routines/vn/procedures/address_updateCoordinates.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/address_updateCoordinates.sql b/db/routines/vn/procedures/address_updateCoordinates.sql index bdeb886df..9d3ec963a 100644 --- a/db/routines/vn/procedures/address_updateCoordinates.sql +++ b/db/routines/vn/procedures/address_updateCoordinates.sql @@ -1,8 +1,8 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`( vTicketFk INT, - vLongitude INT, - vLatitude INT) + vLongitude DECIMAL(11,7), + vLatitude DECIMAL(11,7)) BEGIN /** * Actualiza las coordenadas de una dirección. From b64b91e50fe9bbc3c1fb2f368d8a10a3f2f4a731 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 7 Aug 2024 10:12:54 +0200 Subject: [PATCH 063/250] feat: refs #7524 wip remote hooks --- loopback/common/models/vn-model.js | 32 ++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 20c75ca8c..56a4f4dd0 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -28,21 +28,33 @@ module.exports = function(Self) { }; }); - /* - * Intercept GET request for find - */ this.beforeRemote('find', async ctx => { - isSelect = true; - const filter = ctx.args.filter || {}; - if (filter.limit === undefined) { - filter.limit = this.app.orm.selectLimit; + const defaultLimit = this.app.orm.selectLimit; + const filter = ctx.args.filter || {limit: defaultLimit}; + + if (filter.limit > defaultLimit) { + filter.limit = defaultLimit; ctx.args.filter = filter; } }); - this.observe('loaded', async({data}) => { - if (!isSelect) return; - const length = Array.isArray(data) ? data.length : data ? 1 : 0; + this.afterRemote('find', async({result}) => { + const length = Array.isArray(result) ? result.length : result ? 1 : 0; + if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); + }); + + this.beforeRemote('filter', async ctx => { + const defaultLimit = this.app.orm.selectLimit; + const filter = ctx.args.filter || {limit: defaultLimit}; + + if (filter.limit > defaultLimit) { + filter.limit = defaultLimit; + ctx.args.filter = filter; + } + }); + + this.afterRemote('filter', async({result}) => { + const length = Array.isArray(result) ? result.length : result ? 1 : 0; if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); }); From ea754469824eb0610f1e59243172dd1127b6ed56 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 7 Aug 2024 10:32:47 +0200 Subject: [PATCH 064/250] refs #7844 Change in problems calc --- .../vn/procedures/productionControl.sql | 6 - .../vn/procedures/sale_getProblems.sql | 285 +++++++----------- .../procedures/sale_getProblemsByTicket.sql | 3 +- .../vn/procedures/ticket_getProblems.sql | 4 +- 4 files changed, 107 insertions(+), 191 deletions(-) diff --git a/db/routines/vn/procedures/productionControl.sql b/db/routines/vn/procedures/productionControl.sql index af6d929d7..84717a19a 100644 --- a/db/routines/vn/procedures/productionControl.sql +++ b/db/routines/vn/procedures/productionControl.sql @@ -15,11 +15,6 @@ proc: BEGIN DECLARE vEndingDate DATETIME; DECLARE vIsTodayRelative BOOLEAN; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - RESIGNAL; - END; - SELECT util.dayEnd(util.VN_CURDATE()) + INTERVAL LEAST(vScopeDays, maxProductionScopeDays) DAY INTO vEndingDate FROM productionConfig; @@ -273,7 +268,6 @@ proc: BEGIN DROP TEMPORARY TABLE tmp.productionTicket, tmp.ticket, - tmp.risk, tmp.ticket_problems, tmp.ticketWithPrevia, tItemShelvingStock, diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index c881bcf92..20e9f4c3a 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -1,152 +1,87 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblems`( + vIsTodayRelative tinyint(1) +) BEGIN /** * Calcula los problemas de cada venta para un conjunto de tickets. * * @param vIsTodayRelative Indica si se calcula el disponible como si todo saliera hoy - * @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Identificadores de los tickets a calcular + * @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Tickets a calcular * @return tmp.sale_problems */ - DECLARE vWarehouseFk INT; + DECLARE vWarehouseFk INT; DECLARE vDate DATE; - DECLARE vAvailableCache INT; + DECLARE vAvailableCache INT; DECLARE vVisibleCache INT; DECLARE vDone BOOL; - DECLARE vRequiredComponent INT; - - DECLARE vCursor CURSOR FOR - SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(tt.shipped)) - FROM tmp.sale_getProblems tt - WHERE DATE(tt.shipped) BETWEEN util.VN_CURDATE() - AND util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY; + DECLARE vCursor CURSOR FOR + SELECT DISTINCT warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(shipped)) + FROM tmp.sale_getProblems + WHERE shipped BETWEEN util.VN_CURDATE() + AND util.dayEnd(util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DELETE tt.* FROM tmp.sale_getProblems tt JOIN ticketObservation tto ON tto.ticketFk = tt.ticketFk - JOIN observationType ot ON ot.id = tto.observationTypeFk - WHERE ot.code = 'administrative' + JOIN observationType ot ON ot.id = tto.observationTypeFk + WHERE ot.code = 'administrative' AND tto.description = 'Miriam'; - CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( - ticketFk INT(11), - saleFk INT(11), - isFreezed INTEGER(1) DEFAULT 0, - risk DECIMAL(10,1) DEFAULT 0, - hasHighRisk TINYINT(1) DEFAULT 0, - hasTicketRequest INTEGER(1) DEFAULT 0, - itemShortage VARCHAR(255), - isTaxDataChecked INTEGER(1) DEFAULT 1, - itemDelay VARCHAR(255), - itemLost VARCHAR(255), - hasComponentLack INTEGER(1), - hasRounding VARCHAR(255), - isTooLittle BOOL DEFAULT FALSE, - isVip BOOL DEFAULT FALSE, - PRIMARY KEY (ticketFk, saleFk) - ) ENGINE = MEMORY; + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( + ticketFk INT(11), + saleFk INT(11), + isFreezed INTEGER(1) DEFAULT 0, + risk DECIMAL(10,1) DEFAULT 0, + hasHighRisk TINYINT(1) DEFAULT 0, + hasTicketRequest INTEGER(1) DEFAULT 0, + itemShortage VARCHAR(255), + isTaxDataChecked INTEGER(1) DEFAULT 1, + itemDelay VARCHAR(255), + itemLost VARCHAR(255), + hasComponentLack INTEGER(1), + hasRounding VARCHAR(255), + isTooLittle BOOL DEFAULT FALSE, + isVip BOOL DEFAULT FALSE, + PRIMARY KEY (ticketFk, saleFk) + ) ENGINE = MEMORY; - CREATE OR REPLACE TEMPORARY TABLE tmp.ticket_list - (PRIMARY KEY (ticketFk)) - ENGINE = MEMORY - SELECT ticketFk, clientFk - FROM tmp.sale_getProblems; - - SELECT COUNT(*) INTO vRequiredComponent - FROM component - WHERE isRequired; - - -- Too Little - INSERT INTO tmp.sale_problems(ticketFk, isTooLittle) - SELECT tp.ticketFk, TRUE - FROM tmp.sale_getProblems tp - JOIN ticket t ON t.id = tp.ticketFk - JOIN ( - SELECT t.addressFk, - SUM(ROUND(`ic`.`cm3delivery` * `s`.`quantity` / 1000, 0)) litros, - t.totalWithoutVat - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN sale s ON s.ticketFk = t.id - AND s.quantity > 0 - JOIN itemCost ic ON ic.itemFk = s.itemFk - AND ic.warehouseFk = t.warehouseFk - JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk - AND zc.dated = util.VN_CURDATE() - JOIN agencyMode am ON am.id = t.agencyModeFk - JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk - WHERE util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE - AND dm.code IN ('AGENCY','DELIVERY','PICKUP') - AND t.shipped BETWEEN util.VN_CURDATE() AND util.midnight() - GROUP BY t.addressFk - ) sub ON sub.addressFk = t.addressFk - JOIN volumeConfig vc - WHERE sub.litros < vc.minTicketVolume - AND sub.totalWithoutVat < vc.minTicketValue; - - -- VIP - INSERT INTO tmp.sale_problems(ticketFk, isVip) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk - WHERE c.businessTypeFk = 'VIP' - ON DUPLICATE KEY UPDATE isVip = TRUE; - - -- Faltan componentes - INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk) - SELECT t.id, COUNT(c.id) < vRequiredComponent hasComponentLack, s.id - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN sale s ON s.ticketFk = t.id - JOIN agencyMode am ON am.id = t.agencyModeFk - JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk - LEFT JOIN saleComponent sc ON sc.saleFk = s.id - LEFT JOIN component c ON c.id = sc.componentFk - AND c.isRequired - WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP') - AND s.quantity > 0 - GROUP BY s.id - HAVING hasComponentLack; - - -- Cliente congelado - INSERT INTO tmp.sale_problems(ticketFk, isFreezed) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk - WHERE c.isFreezed - ON DUPLICATE KEY UPDATE isFreezed = c.isFreezed; - - -- Credit exceeded - CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt - (PRIMARY KEY (clientFk)) - ENGINE = MEMORY - SELECT DISTINCT clientFk - FROM tmp.ticket_list; - - CALL client_getDebt(util.VN_CURDATE()); - - INSERT INTO tmp.sale_problems(ticketFk, risk, hasHighRisk) - SELECT DISTINCT tl.ticketFk, r.risk, ((r.risk - cc.riskTolerance) > c.credit + 10) - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN agencyMode a ON t.agencyModeFk = a.id - JOIN tmp.risk r ON r.clientFk = t.clientFk - JOIN client c ON c.id = t.clientFk - JOIN clientConfig cc - WHERE r.risk > c.credit + 10 - AND NOT a.isRiskFree - ON DUPLICATE KEY UPDATE - risk = r.risk, hasHighRisk = ((r.risk - cc.riskTolerance) > c.credit + 10); - - -- Antiguo COD 100, son peticiones de compra sin terminar - INSERT INTO tmp.sale_problems(ticketFk, hasTicketRequest) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN ticketRequest tr ON tr.ticketFk = tl.ticketFk - WHERE tr.isOK IS NULL - ON DUPLICATE KEY UPDATE hasTicketRequest = TRUE; + INSERT INTO tmp.sale_problems (ticketFk, + saleFk, + isFreezed, + hasHighRisk, + hasTicketRequest, + isTaxDataChecked, + hasComponentLack, + hasRounding, + isTooLittle, + isVip) + SELECT sgp.ticketFk, + s.id, + IF(FIND_IN_SET('isFreezed', s.problem), TRUE, FALSE) isFreezed, + IF(FIND_IN_SET('hasHighRisk', s.problem), TRUE, FALSE) hasHighRisk, + IF(FIND_IN_SET('hasTicketRequest', s.problem), TRUE, FALSE) hasTicketRequest, + IF(FIND_IN_SET('isTaxDataChecked', s.problem), FALSE, TRUE) isTaxDataChecked, + IF(FIND_IN_SET('hasComponentLack', s.problem), TRUE, FALSE) hasComponentLack, + IF(FIND_IN_SET('hasRounding', s.problem), + LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250), + NULL + ) hasRounding, + IF(FIND_IN_SET('isTooLittle', s.problem), TRUE, FALSE) isTooLittle, + IF(FIND_IN_SET('isVip', s.problem), TRUE, FALSE) isVip + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + WHERE s.problem <> '' + GROUP BY s.id; + + INSERT INTO tmp.sale_problems (ticketFk, risk) + SELECT t.id, t.risk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk; CREATE OR REPLACE TEMPORARY TABLE tItemShelvingStock_byWarehouse (INDEX (itemFk, warehouseFk)) @@ -158,10 +93,9 @@ BEGIN JOIN shelving sh ON sh.code = ish.shelvingFk JOIN parking p ON p.id = sh.parkingFk JOIN sector s ON s.id = p.sectorFk - GROUP BY ish.itemFk, - s.warehouseFk; + GROUP BY ish.itemFk, s.warehouseFk; - -- Disponible, Faltas, Inventario y Retrasos + -- Disponible, faltas, inventario y retrasos OPEN vCursor; l: LOOP SET vDone = FALSE; @@ -180,14 +114,14 @@ BEGIN INSERT INTO tmp.sale_problems(ticketFk, itemShortage, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, - LEFT(CONCAT('F: ',GROUP_CONCAT(i.id, ' ', i.longName, ' ')),250) problem, - s.id AS saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + SELECT sgp.ticketFk, + LEFT(CONCAT('F: ', GROUP_CONCAT(i.id, ' ', i.longName, ' ')), 250) problem, + s.id saleFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = i.id AND v.calc_id = vVisibleCache @@ -195,8 +129,8 @@ BEGIN AND av.calc_id = vAvailableCache LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk - WHERE IFNULL(v.visible,0) < s.quantity - AND IFNULL(av.available ,0) < s.quantity + WHERE IFNULL(v.visible, 0) < s.quantity + AND IFNULL(av.available, 0) < s.quantity AND IFNULL(issw.visible, 0) < s.quantity AND NOT s.isPicked AND NOT s.reserved @@ -205,27 +139,27 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk) sub + GROUP BY sgp.ticketFk) sub ON DUPLICATE KEY UPDATE itemShortage = sub.problem, saleFk = sub.saleFk; -- Inventario: Visible suficiente, pero ubicado menor a la cantidad vendida INSERT INTO tmp.sale_problems(ticketFk, itemLost, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, + SELECT sgp.ticketFk, LEFT(GROUP_CONCAT('I: ', i.id, ' ', i.longName, ' '), 250) problem, s.id saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = s.itemFk AND v.calc_id = vVisibleCache LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk - WHERE IFNULL(v.visible,0) >= s.quantity + WHERE IFNULL(v.visible, 0) >= s.quantity AND IFNULL(issw.visible, 0) < s.quantity AND s.quantity > 0 AND NOT s.isPicked @@ -235,22 +169,22 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk + GROUP BY sgp.ticketFk ) sub - ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; + ON DUPLICATE KEY UPDATE itemLost = sub.problem, saleFk = sub.saleFk; -- Retraso: Disponible suficiente, pero no visible ni ubicado INSERT INTO tmp.sale_problems(ticketFk, itemDelay, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, + SELECT sgp.ticketFk, LEFT(GROUP_CONCAT('R: ', i.id, ' ', i.longName, ' '), 250) problem, s.id saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = s.itemFk AND v.calc_id = vVisibleCache @@ -269,42 +203,29 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk + GROUP BY sgp.ticketFk ) sub ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; - - -- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra - CALL buy_getUltimate(NULL, vWarehouseFk, vDate); - INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) - SELECT ticketFk, problem ,saleFk - FROM ( - SELECT tl.ticketFk, - s.id saleFk, - LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - AND t.warehouseFk = vWarehouseFk - JOIN sale s ON s.ticketFk = tl.ticketFk - JOIN item i ON i.id = s.itemFk - JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk - JOIN buy b ON b.id = bu.buyFk - WHERE MOD(s.quantity, b.`grouping`) - GROUP BY tl.ticketFk - )sub - ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; END LOOP; CLOSE vCursor; - - INSERT INTO tmp.sale_problems(ticketFk, isTaxDataChecked) - SELECT DISTINCT tl.ticketFk, FALSE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk - WHERE NOT c.isTaxDataChecked - ON DUPLICATE KEY UPDATE isTaxDataChecked = FALSE; + + INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) + SELECT ticketFk, problem, saleFk + FROM ( + SELECT sgp.ticketFk, + s.id saleFk, + LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk + JOIN sale s ON s.ticketFk = sgp.ticketFk + JOIN item i ON i.id = s.itemFk + WHERE FIND_IN_SET('hasRounding', s.problem) + GROUP BY sgp.ticketFk + ) sub + ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; DROP TEMPORARY TABLE - tmp.clientGetDebt, - tmp.ticket_list, + tmp.sale_getProblems, tItemShelvingStock_byWarehouse; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/sale_getProblemsByTicket.sql b/db/routines/vn/procedures/sale_getProblemsByTicket.sql index b4aaad7de..f7a066705 100644 --- a/db/routines/vn/procedures/sale_getProblemsByTicket.sql +++ b/db/routines/vn/procedures/sale_getProblemsByTicket.sql @@ -7,8 +7,7 @@ BEGIN * * @return Problems result */ - DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems; - CREATE TEMPORARY TABLE tmp.sale_getProblems + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems (INDEX (ticketFk)) ENGINE = MEMORY SELECT t.id ticketFk, t.clientFk, t.warehouseFk, t.shipped diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index 521e4cf2f..e9becab2a 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -1,5 +1,7 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getProblems`( + vIsTodayRelative tinyint(1) +) BEGIN /** * Calcula los problemas para un conjunto de tickets. From 4f2e343d0c7e78f766571ccfc683fa6035938673 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 7 Aug 2024 10:40:10 +0200 Subject: [PATCH 065/250] refs #7844 Fix --- db/routines/vn/procedures/sale_getProblems.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 20e9f4c3a..d8b7264c1 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -224,8 +224,6 @@ BEGIN ) sub ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; - DROP TEMPORARY TABLE - tmp.sale_getProblems, - tItemShelvingStock_byWarehouse; + DROP TEMPORARY TABLE tItemShelvingStock_byWarehouse; END$$ DELIMITER ; From 9b2cbcd5ccfef6c2efda734affbbe9b88a8e5f4b Mon Sep 17 00:00:00 2001 From: Pako Date: Wed, 7 Aug 2024 10:42:14 +0200 Subject: [PATCH 066/250] reviewed --- .../supplier_statementWithEntries.sql | 256 +++++++++--------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/db/routines/vn/procedures/supplier_statementWithEntries.sql b/db/routines/vn/procedures/supplier_statementWithEntries.sql index 25a104af3..df3b918a7 100644 --- a/db/routines/vn/procedures/supplier_statementWithEntries.sql +++ b/db/routines/vn/procedures/supplier_statementWithEntries.sql @@ -1,5 +1,4 @@ DELIMITER $$ -$$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.supplier_statementWithEntries( vSupplierFk INT, vCurrencyFk INT, @@ -20,9 +19,15 @@ BEGIN * @param vHasEntries Indicates if future entries must be shown * @return tmp.supplierStatement */ + DECLARE vBalanceStartingDate DATETIME; + SET @euroBalance:= 0; SET @currencyBalance:= 0; + SELECT balanceStartingDate + INTO vBalanceStartingDate + FROM invoiceInConfig; + CREATE OR REPLACE TEMPORARY TABLE tmp.supplierStatement ENGINE = MEMORY SELECT *, @@ -35,132 +40,127 @@ BEGIN IFNULL(invoiceCurrency, 0), 2 ) currencyBalance FROM ( - SELECT * FROM - ( - SELECT NULL bankFk, - ii.companyFk, - ii.serial, - ii.id, - CASE - WHEN vOrderBy = 'issued' THEN ii.issued - WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried - WHEN vOrderBy = 'booked' THEN ii.booked - WHEN vOrderBy = 'dueDate' THEN iid.dueDated - END dated, - CONCAT('S/Fra ', ii.supplierRef) sref, - IF(ii.currencyFk > 1, - ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), - NULL - ) changeValue, - CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, - CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, - NULL paymentEuros, - NULL paymentCurrency, - ii.currencyFk, - ii.isBooked, - c.code, - 'invoiceIn' statementType - FROM invoiceIn ii - JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id - JOIN currency c ON c.id = ii.currencyFk - JOIN invoiceInConfig iic - WHERE ii.issued >= iic.balanceStartingDate - AND ii.supplierFk = vSupplierFk - AND vCurrencyFk IN (ii.currencyFk, 0) - AND vCompanyFk IN (ii.companyFk, 0) - AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) - GROUP BY iid.id - UNION ALL - SELECT p.bankFk, - p.companyFk, - NULL, - p.id, - CASE - WHEN vOrderBy = 'issued' THEN p.received - WHEN vOrderBy = 'bookEntried' THEN p.received - WHEN vOrderBy = 'booked' THEN p.received - WHEN vOrderBy = 'dueDate' THEN p.dueDated - END, - CONCAT(IFNULL(pm.name, ''), - IF(pn.concept <> '', - CONCAT(' : ', pn.concept), - '') - ), - IF(p.currencyFk > 1, p.divisa / p.amount, NULL), - NULL, - NULL, - p.amount, - p.divisa, - p.currencyFk, - p.isConciliated, - c.code, - 'payment' - FROM payment p - LEFT JOIN currency c ON c.id = p.currencyFk - LEFT JOIN accounting a ON a.id = p.bankFk - LEFT JOIN payMethod pm ON pm.id = p.payMethodFk - LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id - JOIN invoiceInConfig iic - WHERE p.received >= iic.balanceStartingDate - AND p.supplierFk = vSupplierFk - AND vCurrencyFk IN (p.currencyFk, 0) - AND vCompanyFk IN (p.companyFk, 0) - AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) - UNION ALL - SELECT NULL, - companyFk, - NULL, - se.id, - CASE - WHEN vOrderBy = 'issued' THEN se.dated - WHEN vOrderBy = 'bookEntried' THEN se.dated - WHEN vOrderBy = 'booked' THEN se.dated - WHEN vOrderBy = 'dueDate' THEN se.dueDated - END, - se.description, - 1, - amount, - NULL, - NULL, - NULL, - currencyFk, - isConciliated, - c.`code`, - 'expense' - FROM supplierExpense se - JOIN currency c ON c.id = se.currencyFk - WHERE se.supplierFk = vSupplierFk - AND vCurrencyFk IN (se.currencyFk,0) - AND vCompanyFk IN (se.companyFk,0) - AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) - UNION ALL - SELECT NULL bankFk, - e.companyFk, - 'E' serial, - e.invoiceNumber id, - tr.landed dated, - CONCAT('Ent. ',e.id) sref, - 1 / ((e.commission/100)+1) changeValue, - e.invoiceAmount * (1 + (e.commission/100)), - e.invoiceAmount, - NULL, - NULL, - e.currencyFk, - FALSE isBooked, - c.code, - 'order' - FROM vn.entry e - JOIN travel tr ON tr.id = e.travelFk - JOIN currency c ON c.id = e.currencyFk - WHERE e.supplierFk = vSupplierFk - AND tr.landed >= CURDATE() - AND e.invoiceInFk IS NULL - AND vHasEntries - ) sub - ORDER BY (dated IS NULL AND NOT isBooked), - dated, - IF(vOrderBy = 'dueDate', id, NULL) - LIMIT 10000000000000000000 + SELECT NULL bankFk, + ii.companyFk, + ii.serial, + ii.id, + CASE + WHEN vOrderBy = 'issued' THEN ii.issued + WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried + WHEN vOrderBy = 'booked' THEN ii.booked + WHEN vOrderBy = 'dueDate' THEN iid.dueDated + END dated, + CONCAT('S/Fra ', ii.supplierRef) sref, + IF(ii.currencyFk > 1, + ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), + NULL + ) changeValue, + CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, + CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, + NULL paymentEuros, + NULL paymentCurrency, + ii.currencyFk, + ii.isBooked, + c.code, + 'invoiceIn' statementType + FROM invoiceIn ii + JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id + JOIN currency c ON c.id = ii.currencyFk + WHERE ii.issued >= vBalanceStartingDate + AND ii.supplierFk = vSupplierFk + AND vCurrencyFk IN (ii.currencyFk, 0) + AND vCompanyFk IN (ii.companyFk, 0) + AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) + GROUP BY iid.id + UNION ALL + SELECT p.bankFk, + p.companyFk, + NULL, + p.id, + CASE + WHEN vOrderBy = 'issued' THEN p.received + WHEN vOrderBy = 'bookEntried' THEN p.received + WHEN vOrderBy = 'booked' THEN p.received + WHEN vOrderBy = 'dueDate' THEN p.dueDated + END, + CONCAT(IFNULL(pm.name, ''), + IF(pn.concept <> '', + CONCAT(' : ', pn.concept), + '') + ), + IF(p.currencyFk > 1, p.divisa / p.amount, NULL), + NULL, + NULL, + p.amount, + p.divisa, + p.currencyFk, + p.isConciliated, + c.code, + 'payment' + FROM payment p + LEFT JOIN currency c ON c.id = p.currencyFk + LEFT JOIN accounting a ON a.id = p.bankFk + LEFT JOIN payMethod pm ON pm.id = p.payMethodFk + LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id + WHERE p.received >= vBalanceStartingDate + AND p.supplierFk = vSupplierFk + AND vCurrencyFk IN (p.currencyFk, 0) + AND vCompanyFk IN (p.companyFk, 0) + AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL, + companyFk, + NULL, + se.id, + CASE + WHEN vOrderBy = 'issued' THEN se.dated + WHEN vOrderBy = 'bookEntried' THEN se.dated + WHEN vOrderBy = 'booked' THEN se.dated + WHEN vOrderBy = 'dueDate' THEN se.dueDated + END, + se.description, + 1, + amount, + NULL, + NULL, + NULL, + currencyFk, + isConciliated, + c.`code`, + 'expense' + FROM supplierExpense se + JOIN currency c ON c.id = se.currencyFk + WHERE se.supplierFk = vSupplierFk + AND vCurrencyFk IN (se.currencyFk,0) + AND vCompanyFk IN (se.companyFk,0) + AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL bankFk, + e.companyFk, + 'E' serial, + e.invoiceNumber id, + tr.landed dated, + CONCAT('Ent. ',e.id) sref, + 1 / ((e.commission/100)+1) changeValue, + e.invoiceAmount * (1 + (e.commission/100)), + e.invoiceAmount, + NULL, + NULL, + e.currencyFk, + FALSE isBooked, + c.code, + 'order' + FROM entry e + JOIN travel tr ON tr.id = e.travelFk + JOIN currency c ON c.id = e.currencyFk + WHERE e.supplierFk = vSupplierFk + AND tr.landed >= CURDATE() + AND e.invoiceInFk IS NULL + AND vHasEntries + ORDER BY (dated IS NULL AND NOT isBooked), + dated, + IF(vOrderBy = 'dueDate', id, NULL) + LIMIT 10000000000000000000 ) t; -END;$$ +END$$ DELIMITER ; From 22c3a632e2fd82560cb03ac318523ae26f6b8bf9 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 7 Aug 2024 10:48:12 +0200 Subject: [PATCH 067/250] feat workerActivity refs #6078 --- back/methods/workerActivity/specs/add.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/workerActivity/specs/add.spec.js b/back/methods/workerActivity/specs/add.spec.js index 67a85cb7d..352d67723 100644 --- a/back/methods/workerActivity/specs/add.spec.js +++ b/back/methods/workerActivity/specs/add.spec.js @@ -13,7 +13,7 @@ describe('workerActivity insert()', () => { {'code': 'STOP', 'description': 'STOP'}, options ); - result = await models.WorkerActivity.add(ctx, 'STOP', 'APP', options); + await models.WorkerActivity.add(ctx, 'STOP', 'APP', options); count = await models.WorkerActivity.count( {'workerFK': 1106}, options From 8aa06e12b3374e1476a140e029af4146b3982cbe Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 7 Aug 2024 12:39:18 +0200 Subject: [PATCH 068/250] refs #7844 Fix tests part 1/2 --- db/dump/fixtures.before.sql | 162 +++++++++--------- .../vn/procedures/sale_getProblems.sql | 2 +- modules/ticket/back/methods/ticket/filter.js | 63 ++++--- .../back/methods/ticket/getTicketsFuture.js | 19 +- 4 files changed, 122 insertions(+), 124 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 60c96abb4..4b69d3b6d 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -743,45 +743,45 @@ INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agen (6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3), (7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5); -INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`) +INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`, `problem`, `risk`) VALUES - (1 , 3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1), - (2 , 1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 1, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2), - (3 , 1, 7, 1, 6, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 3), - (4 , 3, 2, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 9, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, NULL), - (5 , 3, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, NULL), - (6 , 1, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, NULL), - (7 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE(), NULL, NULL), - (15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR), NULL, NULL), - (19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE(), NULL, NULL), - (20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL), - (21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL), - (22, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL), - (23, NULL, 8, 1, 7, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL), - (24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL), - (25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (28, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (29, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (30, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (31, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (32, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL), - (33, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL), - (34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL), - (35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL), - (36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL), - (37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL); + (1 , 3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 'hasHighRisk', 901.4), + (2 , 1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 1, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2, 'hasHighRisk', 901.4), + (3 , 1, 7, 1, 6, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 3, NULL, NULL), + (4 , 3, 2, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 9, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, NULL, NULL, NULL), + (5 , 3, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, NULL, NULL, NULL), + (6 , 1, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, NULL, 'hasHighRisk', 901.4), + (7 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isTooLittle', NULL), + (11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7), + (17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7), + (18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR), NULL, NULL, 'isFreezed', NULL), + (19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isTaxDataChecked', NULL), + (20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL), + (21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL), + (22, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL), + (23, NULL, 8, 1, 7, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasTicketRequest, hasHighRisk', 901.4), + (24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (28, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (29, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (30, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (31, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (32, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (33, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, 'isTaxDataChecked', NULL); INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`) VALUES @@ -1059,50 +1059,50 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, (2, 2, 2, 1, util.VN_CURDATE(), NULL), (3, 3, 2, 4, util.VN_CURDATE(), NULL); -INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`) +INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`, `problem`) VALUES - (1, 1, 1, 'Ranged weapon longbow 200cm', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (3, 1, 1, 'Ranged weapon longbow 200cm', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)), - (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE()), - (8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE()), - (9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()), - (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE()), - (11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()), - (12, 4, 16, 'Melee weapon heavy shield 100cm', 20, 1.71, 0, 0, 0, util.VN_CURDATE()), - (13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE()), - (14, 1, 8, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE()), - (15, 1, 19, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()), - (16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE()), - (17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)), - (18, 4, 22, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)), - (19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)), - (20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)), - (21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), - (22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()), - (23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()), - (24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()), - (25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE()), - (32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE()), - (33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE()), - (34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), - (38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)), - (39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE()), - (40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE()), - (41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE()), - (42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE()); + (1, 1, 1, 'Ranged weapon longbow 200cm', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (3, 1, 1, 'Ranged weapon longbow 200cm', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 'hasComponentLack'), + (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), + (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE(), NULL), + (11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), + (12, 4, 16, 'Melee weapon heavy shield 100cm', 20, 1.71, 0, 0, 0, util.VN_CURDATE(), NULL), + (13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE(), NULL), + (14, 1, 8, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), + (15, 1, 19, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), + (16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'), + (18, 4, 22, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'), + (19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 'hasComponentLack'), + (20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 'hasComponentLack'), + (21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), + (22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack, isFreezed'), + (29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE(), 'hasRounding'), + (32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE(), NULL), + (33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE(), NULL), + (34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'), + (39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'); INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`) VALUES diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index d8b7264c1..258998e68 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -77,7 +77,7 @@ BEGIN JOIN item i ON i.id = s.itemFk WHERE s.problem <> '' GROUP BY s.id; - + INSERT INTO tmp.sale_problems (ticketFk, risk) SELECT t.id, t.risk FROM tmp.sale_getProblems sgp diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 0823b38b8..3e8b732af 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -224,16 +224,14 @@ module.exports = Self => { const stmts = []; let stmt; - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); - stmt = new ParameterizedSQL( - `CREATE TEMPORARY TABLE tmp.filter + stmt = new ParameterizedSQL(` + CREATE OR REPLACE TEMPORARY TABLE tmp.filter (INDEX (id)) ENGINE = MEMORY - SELECT - t.id, + SELECT t.id, t.shipped, - CAST(DATE(t.shipped) AS CHAR) AS shippedDate, - HOUR(t.shipped) AS shippedHour, + CAST(DATE(t.shipped) AS CHAR) shippedDate, + HOUR(t.shipped) shippedHour, t.nickname, t.refFk, t.routeFk, @@ -241,26 +239,26 @@ module.exports = Self => { t.clientFk, t.totalWithoutVat, t.totalWithVat, - io.id AS invoiceOutId, + io.id invoiceOutId, a.provinceFk, - p.name AS province, - w.name AS warehouse, - am.name AS agencyMode, - am.id AS agencyModeFk, - st.name AS state, + p.name province, + w.name warehouse, + am.name agencyMode, + am.id agencyModeFk, + st.name state, st.classColor, - wk.lastName AS salesPerson, - ts.stateFk AS stateFk, - ts.alertLevel AS alertLevel, - ts.code AS alertLevelCode, - u.name AS userName, + wk.lastName salesPerson, + ts.stateFk stateFk, + ts.alertLevel alertLevel, + ts.code alertLevelCode, + u.name userName, c.salesPersonFk, - z.hour AS zoneLanding, - HOUR(z.hour) AS zoneHour, - MINUTE(z.hour) AS zoneMinute, - z.name AS zoneName, - z.id AS zoneFk, - CAST(z.hour AS CHAR) AS hour + z.hour zoneLanding, + HOUR(z.hour) zoneHour, + MINUTE(z.hour) zoneMinute, + z.name zoneName, + z.id zoneFk, + CAST(z.hour AS CHAR) hour FROM ticket t LEFT JOIN invoiceOut io ON t.refFk = io.ref LEFT JOIN zone z ON z.id = t.zoneFk @@ -273,7 +271,8 @@ module.exports = Self => { LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN route r ON r.id = t.routeFk`); + LEFT JOIN route r ON r.id = t.routeFk + `); if (args.orderFk) { stmt.merge({ @@ -293,25 +292,25 @@ module.exports = Self => { stmt.merge(conn.makeWhere(filter.where)); stmts.push(stmt); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems'); - stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.sale_getProblems + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems (INDEX (ticketFk)) ENGINE = MEMORY SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped FROM tmp.filter f LEFT JOIN alertLevel al ON al.id = f.alertLevel WHERE (al.code = 'FREE' OR f.alertLevel IS NULL) - AND f.shipped >= ?`, [date]); - stmts.push(stmt); + AND f.shipped >= ? + `, [date]); + stmts.push(stmt); stmts.push('CALL ticket_getProblems(FALSE)'); stmt = new ParameterizedSQL(` SELECT f.*, tp.* - FROM tmp.filter f - LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id`); + FROM tmp.filter f + LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id + `); if (args.problems != undefined && (!args.from && !args.to)) throw new UserError('Choose a date range or days forward'); diff --git a/modules/ticket/back/methods/ticket/getTicketsFuture.js b/modules/ticket/back/methods/ticket/getTicketsFuture.js index ab5071be4..b7267995e 100644 --- a/modules/ticket/back/methods/ticket/getTicketsFuture.js +++ b/modules/ticket/back/methods/ticket/getTicketsFuture.js @@ -145,18 +145,17 @@ module.exports = Self => { stmts.push(stmt); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems'); - stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.sale_getProblems - (INDEX (ticketFk)) - ENGINE = MEMORY - SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped, f.lines, f.liters - FROM tmp.filter f - LEFT JOIN alertLevel al ON al.id = f.alertLevel - WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)`); - stmts.push(stmt); + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems + (INDEX (ticketFk)) + ENGINE = MEMORY + SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped, f.lines, f.liters + FROM tmp.filter f + LEFT JOIN alertLevel al ON al.id = f.alertLevel + WHERE (al.code = 'FREE' OR f.alertLevel IS NULL) + `); + stmts.push(stmt); stmts.push('CALL ticket_getProblems(FALSE)'); stmt = new ParameterizedSQL(` From 4cbea3bf7bc1dc981e523ff6dd9d99d629b12189 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 7 Aug 2024 13:51:00 +0200 Subject: [PATCH 069/250] refs #7844 Fix tests part 2/2 --- db/dump/fixtures.before.sql | 20 +++++------ .../vn/procedures/sale_getProblems.sql | 36 ++++++++++--------- .../back/methods/ticket/getTicketsFuture.js | 3 +- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 4b69d3b6d..650cf5333 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -755,11 +755,11 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF (8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), (9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isTooLittle', NULL), - (11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasTicketRequest', NULL), (12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), - (15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), + (15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isFreezed', NULL), (16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7), (17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7), (18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR), NULL, NULL, 'isFreezed', NULL), @@ -771,7 +771,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF (24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), (25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), (26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), - (27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4), + (27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 901.4), (28, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (29, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (30, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL), @@ -781,7 +781,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF (34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), (36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL), - (37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, 'isTaxDataChecked', NULL); + (37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL); INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`) VALUES @@ -1067,8 +1067,8 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric (4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), (5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'), (6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 'hasComponentLack'), - (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), - (8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE(), NULL), + (8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE(), NULL), (9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE(), NULL), (11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL), @@ -1088,15 +1088,15 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric (25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), - (28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack, isFreezed'), + (28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), - (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE(), 'hasRounding'), - (32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE(), NULL), + (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE(), NULL), + (32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE(), NULL), (33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE(), NULL), (34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), - (37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), + (37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), NULL), (36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), (38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'), (39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'), diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 258998e68..6f65a3722 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -48,40 +48,42 @@ BEGIN PRIMARY KEY (ticketFk, saleFk) ) ENGINE = MEMORY; - INSERT INTO tmp.sale_problems (ticketFk, + INSERT INTO tmp.sale_problems(ticketFk, saleFk, isFreezed, + risk, hasHighRisk, hasTicketRequest, isTaxDataChecked, hasComponentLack, hasRounding, - isTooLittle, - isVip) + isTooLittle) SELECT sgp.ticketFk, s.id, - IF(FIND_IN_SET('isFreezed', s.problem), TRUE, FALSE) isFreezed, - IF(FIND_IN_SET('hasHighRisk', s.problem), TRUE, FALSE) hasHighRisk, - IF(FIND_IN_SET('hasTicketRequest', s.problem), TRUE, FALSE) hasTicketRequest, - IF(FIND_IN_SET('isTaxDataChecked', s.problem), FALSE, TRUE) isTaxDataChecked, + IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed, + t.risk, + IF(FIND_IN_SET('hasHighRisk', t.problem), TRUE, FALSE) hasHighRisk, + IF(FIND_IN_SET('hasTicketRequest', t.problem), TRUE, FALSE) hasTicketRequest, + IF(FIND_IN_SET('isTaxDataChecked', t.problem), FALSE, TRUE) isTaxDataChecked, IF(FIND_IN_SET('hasComponentLack', s.problem), TRUE, FALSE) hasComponentLack, IF(FIND_IN_SET('hasRounding', s.problem), LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250), NULL ) hasRounding, - IF(FIND_IN_SET('isTooLittle', s.problem), TRUE, FALSE) isTooLittle, - IF(FIND_IN_SET('isVip', s.problem), TRUE, FALSE) isVip + IF(FIND_IN_SET('isTooLittle', t.problem), TRUE, FALSE) isTooLittle FROM tmp.sale_getProblems sgp JOIN ticket t ON t.id = sgp.ticketFk - JOIN sale s ON s.ticketFk = t.id - JOIN item i ON i.id = s.itemFk - WHERE s.problem <> '' - GROUP BY s.id; + LEFT JOIN sale s ON s.ticketFk = t.id + LEFT JOIN item i ON i.id = s.itemFk + WHERE s.problem <> '' OR t.problem <> '' OR t.risk + GROUP BY t.id, s.id; - INSERT INTO tmp.sale_problems (ticketFk, risk) - SELECT t.id, t.risk - FROM tmp.sale_getProblems sgp - JOIN ticket t ON t.id = sgp.ticketFk; + INSERT INTO tmp.sale_problems(ticketFk, isVip) + SELECT sgp.ticketFk, TRUE + FROM tmp.sale_getProblems sgp + JOIN client c ON c.id = sgp.clientFk + WHERE c.businessTypeFk = 'VIP' + ON DUPLICATE KEY UPDATE isVIP = TRUE; CREATE OR REPLACE TEMPORARY TABLE tItemShelvingStock_byWarehouse (INDEX (itemFk, warehouseFk)) diff --git a/modules/ticket/back/methods/ticket/getTicketsFuture.js b/modules/ticket/back/methods/ticket/getTicketsFuture.js index b7267995e..0fd21ea74 100644 --- a/modules/ticket/back/methods/ticket/getTicketsFuture.js +++ b/modules/ticket/back/methods/ticket/getTicketsFuture.js @@ -161,7 +161,8 @@ module.exports = Self => { stmt = new ParameterizedSQL(` SELECT f.*, tp.* FROM tmp.filter f - LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id`); + LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id + `); if (args.problems != undefined && (!args.originDated && !args.futureDated)) throw new UserError('Choose a date range or days forward'); From 09a0459a7b4cbdca8690661f44e2ccf0acd2227c Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 7 Aug 2024 13:52:41 +0200 Subject: [PATCH 070/250] refs #7844 Fix tests part 2/2 --- modules/ticket/back/methods/ticket/specs/filter.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js index 1d050931b..72249fe5d 100644 --- a/modules/ticket/back/methods/ticket/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js @@ -71,7 +71,7 @@ describe('ticket filter()', () => { const filter = {}; const result = await models.Ticket.filter(ctx, filter, options); - expect(result.length).toEqual(10); + expect(result.length).toEqual(11); await tx.rollback(); } catch (e) { From c768fa113ed89c741e55f3384ac662bfae3a1b8f Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 08:20:26 +0200 Subject: [PATCH 071/250] test: fix ticket redirect to lilium --- modules/ticket/front/sale/index.spec.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index 8200d6b89..931776619 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -295,20 +295,26 @@ describe('Ticket', () => { describe('onCreateClaimAccepted()', () => { it('should perform a query and call window open', () => { jest.spyOn(controller, 'resetChanges').mockReturnThis(); - jest.spyOn(controller.$state, 'go').mockReturnThis(); + jest.spyOn(controller.vnApp, 'getUrl').mockReturnThis(); + Object.defineProperty(window, 'location', { + value: { + href: () => {} + }, + }); + jest.spyOn(controller.window.location, 'href'); const newEmptySale = {quantity: 10}; controller.sales.push(newEmptySale); const firstSale = controller.sales[0]; + const claimId = 1; firstSale.checked = true; const expectedParams = {ticketId: 1, sales: [firstSale]}; - $httpBackend.expect('POST', `Claims/createFromSales`, expectedParams).respond(200, {id: 1}); + $httpBackend.expect('POST', `Claims/createFromSales`, expectedParams).respond(200, {id: claimId}); controller.onCreateClaimAccepted(); $httpBackend.flush(); expect(controller.resetChanges).toHaveBeenCalledWith(); - expect(controller.$state.go).toHaveBeenCalledWith('claim.card.basicData', {id: 1}); }); }); From 715439ae386c22afd513eb6e26f05e1b576ccb07 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 08:23:17 +0200 Subject: [PATCH 072/250] test: fix claim descriptor redirect to lilium --- modules/claim/front/descriptor/index.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/claim/front/descriptor/index.spec.js b/modules/claim/front/descriptor/index.spec.js index e6785d3d8..03710b479 100644 --- a/modules/claim/front/descriptor/index.spec.js +++ b/modules/claim/front/descriptor/index.spec.js @@ -53,14 +53,12 @@ describe('Item Component vnClaimDescriptor', () => { describe('deleteClaim()', () => { it('should perform a query and call showSuccess if the response is accept', () => { jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller.$state, 'go'); $httpBackend.expectDELETE(`Claims/${claim.id}`).respond(); controller.deleteClaim(); $httpBackend.flush(); expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.$state.go).toHaveBeenCalledWith('claim.index'); }); }); }); From 41942783aa33b8bd3de5e15be87dfed49262948e Mon Sep 17 00:00:00 2001 From: Pako Date: Thu, 8 Aug 2024 08:27:50 +0200 Subject: [PATCH 073/250] dropOldProc --- db/versions/11180-navyGerbera/01-dropProc.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/versions/11180-navyGerbera/01-dropProc.sql diff --git a/db/versions/11180-navyGerbera/01-dropProc.sql b/db/versions/11180-navyGerbera/01-dropProc.sql new file mode 100644 index 000000000..9b9e37700 --- /dev/null +++ b/db/versions/11180-navyGerbera/01-dropProc.sql @@ -0,0 +1 @@ +DROP PROCEDURE IF EXISTS vn.supplier_statement; \ No newline at end of file From 4fb82dc9448b704af27c454841be1c13f136cca5 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 09:05:08 +0200 Subject: [PATCH 074/250] test: fix ticket sale e2e --- .../05-ticket/01-sale/02_edit_sale.spec.js | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index e0f32fc3a..d9689e31a 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -19,7 +19,9 @@ describe('Ticket Edit sale path', () => { it(`should click on the first sale claim icon to navigate over there`, async() => { await page.waitToClick(selectors.ticketSales.firstSaleClaimIcon); - await page.waitForState('claim.card.basicData'); + await page.waitForNavigation(); + await page.goBack(); + await page.goBack(); }); it('should navigate to the tickets index', async() => { @@ -243,29 +245,13 @@ describe('Ticket Edit sale path', () => { await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim); await page.waitToClick(selectors.globalItems.acceptButton); - await page.waitForState('claim.card.basicData'); - }); - - it('should click on the Claims button of the top bar menu', async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.claimsButton); - await page.waitForState('claim.index'); - }); - - it('should search for the claim with id 4', async() => { - await page.accessToSearchResult('4'); - await page.waitForState('claim.card.summary'); - }); - - it('should click the Tickets button of the top bar menu', async() => { - await page.waitToClick(selectors.globalItems.applicationsMenuButton); - await page.waitForSelector(selectors.globalItems.applicationsMenuVisible); - await page.waitToClick(selectors.globalItems.ticketsButton); - await page.waitForState('ticket.index'); + await page.waitForNavigation(); }); it('should search for a ticket then access to the sales section', async() => { + await page.goBack(); + await page.goBack(); + await page.loginAndModule('salesPerson', 'ticket'); await page.accessToSearchResult('16'); await page.accessToSection('ticket.card.sale'); }); From 8580fa084903f1b3210010b0deb2512388f7d84f Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 10:07:03 +0200 Subject: [PATCH 075/250] hotFix(sendTwoFactor): fix code digits --- back/methods/vn-user/sign-in.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/back/methods/vn-user/sign-in.js b/back/methods/vn-user/sign-in.js index 782046641..775970d55 100644 --- a/back/methods/vn-user/sign-in.js +++ b/back/methods/vn-user/sign-in.js @@ -67,7 +67,9 @@ module.exports = Self => { if (vnUser.twoFactor === 'email') { const $ = Self.app.models; - const code = String(Math.floor(Math.random() * 999999)); + const min = 100000; + const max = 999999; + const code = String(Math.floor(Math.random() * (max - min + 1)) + min); const maxTTL = ((60 * 1000) * 5); // 5 min await $.AuthCode.upsertWithWhere({userFk: vnUser.id}, { userFk: vnUser.id, From c8f1b7c5ff57391c927984c83e1d6eb7e98343ab Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 11:51:46 +0200 Subject: [PATCH 076/250] hotFix(validateCode): username comparation --- back/methods/vn-user/validate-auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/vn-user/validate-auth.js b/back/methods/vn-user/validate-auth.js index beab43417..8fb8b4923 100644 --- a/back/methods/vn-user/validate-auth.js +++ b/back/methods/vn-user/validate-auth.js @@ -58,7 +58,7 @@ module.exports = Self => { fields: ['name', 'twoFactor'] }, myOptions); - if (user.name !== username) + if (user.name.toLowerCase() !== username.toLowerCase()) throw new UserError('Authentication failed'); await authCode.destroy(myOptions); From afc56151401f8a020a977ee612084bb4f93a8412 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:14:44 +0200 Subject: [PATCH 077/250] #6900 fix: #6900 rectificative filter --- modules/invoiceIn/back/methods/invoice-in/filter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index d72d7fc63..a8ffb5f97 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -154,9 +154,10 @@ module.exports = Self => { case 'awbCode': return {'sub.code': value}; case 'correctingFk': + if (!correcteds.length && !args.correctingFk) return; return args.correctingFk - ? {'ii.id': {inq: correcteds.map(x => x.correctingFk)}} - : {'ii.id': {nin: correcteds.map(x => x.correctingFk)}}; + ? {['ii.id']: {inq: correcteds.map(x => x.correctingFk)}} + : {['ii.id']: {nin: correcteds.map(x => x.correctingFk)}}; case 'correctedFk': return {'ii.id': {inq: correctings.map(x => x.correctingFk)}}; case 'supplierActivityFk': From 1ccfd8731fb8cb31ab0f7a4c32692e5f1f642aa4 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:17:56 +0200 Subject: [PATCH 078/250] #6900 feat: empty commit --- modules/invoiceIn/back/methods/invoice-in/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index a8ffb5f97..05e038a61 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -119,6 +119,7 @@ module.exports = Self => { } let correctings; + let correcteds; if (args.correctedFk) { correctings = await models.InvoiceInCorrection.find({ From b4ea7819f8da46f9586095994b2c9779e977be16 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:18:42 +0200 Subject: [PATCH 079/250] #6900 feat: clear empty --- modules/invoiceIn/back/methods/invoice-in/filter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index 05e038a61..a8ffb5f97 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -119,7 +119,6 @@ module.exports = Self => { } let correctings; - let correcteds; if (args.correctedFk) { correctings = await models.InvoiceInCorrection.find({ From 4af881a8d9473f99a7e191b1193941265fcc6aa4 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:35:11 +0200 Subject: [PATCH 080/250] #6900 feat: clear empty --- modules/invoiceIn/back/methods/invoice-in/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index a8ffb5f97..05e038a61 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -119,6 +119,7 @@ module.exports = Self => { } let correctings; + let correcteds; if (args.correctedFk) { correctings = await models.InvoiceInCorrection.find({ From 660ebfbe15078ef630a29bf032f2e66d41409da8 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:36:06 +0200 Subject: [PATCH 081/250] #6900 feat: empty commit --- modules/invoiceIn/back/methods/invoice-in/filter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index 05e038a61..a8ffb5f97 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -119,7 +119,6 @@ module.exports = Self => { } let correctings; - let correcteds; if (args.correctedFk) { correctings = await models.InvoiceInCorrection.find({ From 853a57ec63ffb20a7040bc7b36d4143cc7f3fc43 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 12:37:29 +0200 Subject: [PATCH 082/250] #6900 fix: empty commit --- modules/invoiceIn/back/methods/invoice-in/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index a8ffb5f97..05e038a61 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -119,6 +119,7 @@ module.exports = Self => { } let correctings; + let correcteds; if (args.correctedFk) { correctings = await models.InvoiceInCorrection.find({ From 62cee3a07ab185038b5be7131080a8d0d3b6693d Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 8 Aug 2024 12:49:36 +0200 Subject: [PATCH 083/250] fix: refs #6130 commit lint --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e7040f36..887f20522 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,10 @@ "test:front": "jest --watch", "back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back", "lint": "eslint ./ --cache --ignore-pattern .gitignore", - "watch:db": "node ./db/dbWatcher.js" + "watch:db": "node ./db/dbWatcher.js", + "commitlint": "commitlint --edit", + "prepare": "husky install", + "addReferenceTag": "node .husky/addReferenceTag.js" }, "jest": { "projects": [ From 1c75c429cc721ade14867058c88a730785787403 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 8 Aug 2024 13:29:02 +0200 Subject: [PATCH 084/250] test: husky --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 887f20522..61a9cf46c 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "lint": "eslint ./ --cache --ignore-pattern .gitignore", "watch:db": "node ./db/dbWatcher.js", "commitlint": "commitlint --edit", - "prepare": "husky install", + "prepare": "npx husky install", "addReferenceTag": "node .husky/addReferenceTag.js" }, "jest": { From 98f4cb1de5505f0f35925faaec44a9419d0af6cf Mon Sep 17 00:00:00 2001 From: Pako Date: Fri, 9 Aug 2024 08:04:36 +0200 Subject: [PATCH 085/250] dropping proc --- .../vn/procedures/supplier_statement.sql | 139 ------------------ db/versions/11180-navyGerbera/01-dropProc.sql | 1 - 2 files changed, 140 deletions(-) delete mode 100644 db/routines/vn/procedures/supplier_statement.sql delete mode 100644 db/versions/11180-navyGerbera/01-dropProc.sql diff --git a/db/routines/vn/procedures/supplier_statement.sql b/db/routines/vn/procedures/supplier_statement.sql deleted file mode 100644 index a03a7770c..000000000 --- a/db/routines/vn/procedures/supplier_statement.sql +++ /dev/null @@ -1,139 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_statement`( - vSupplierFk INT, - vCurrencyFk INT, - vCompanyFk INT, - vOrderBy VARCHAR(15), - vIsConciliated BOOL -) -BEGIN -/** - * Crea un estado de cuenta de proveedores calculando - * los saldos en euros y en la moneda especificada. - * - * @param vSupplierFk Id del proveedor - * @param vCurrencyFk Id de la moneda - * @param vCompanyFk Id de la empresa - * @param vOrderBy Criterio de ordenación - * @param vIsConciliated Indica si está conciliado o no - * @return tmp.supplierStatement - */ - SET @euroBalance:= 0; - SET @currencyBalance:= 0; - - CREATE OR REPLACE TEMPORARY TABLE tmp.supplierStatement - ENGINE = MEMORY - SELECT *, - @euroBalance:= ROUND( - @euroBalance + IFNULL(paymentEuros, 0) - - IFNULL(invoiceEuros, 0), 2 - ) euroBalance, - @currencyBalance:= ROUND( - @currencyBalance + IFNULL(paymentCurrency, 0) - - IFNULL(invoiceCurrency, 0), 2 - ) currencyBalance - FROM ( - SELECT * FROM - ( - SELECT NULL bankFk, - ii.companyFk, - ii.serial, - ii.id, - CASE - WHEN vOrderBy = 'issued' THEN ii.issued - WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried - WHEN vOrderBy = 'booked' THEN ii.booked - WHEN vOrderBy = 'dueDate' THEN iid.dueDated - END dated, - CONCAT('S/Fra ', ii.supplierRef) sref, - IF(ii.currencyFk > 1, - ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), - NULL - ) changeValue, - CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, - CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, - NULL paymentEuros, - NULL paymentCurrency, - ii.currencyFk, - ii.isBooked, - c.code, - 'invoiceIn' statementType - FROM invoiceIn ii - JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id - JOIN currency c ON c.id = ii.currencyFk - WHERE ii.issued > '2014-12-31' - AND ii.supplierFk = vSupplierFk - AND vCurrencyFk IN (ii.currencyFk, 0) - AND vCompanyFk IN (ii.companyFk, 0) - AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) - GROUP BY iid.id - UNION ALL - SELECT p.bankFk, - p.companyFk, - NULL, - p.id, - CASE - WHEN vOrderBy = 'issued' THEN p.received - WHEN vOrderBy = 'bookEntried' THEN p.received - WHEN vOrderBy = 'booked' THEN p.received - WHEN vOrderBy = 'dueDate' THEN p.dueDated - END, - CONCAT(IFNULL(pm.name, ''), - IF(pn.concept <> '', - CONCAT(' : ', pn.concept), - '') - ), - IF(p.currencyFk > 1, p.divisa / p.amount, NULL), - NULL, - NULL, - p.amount, - p.divisa, - p.currencyFk, - p.isConciliated, - c.code, - 'payment' - FROM payment p - LEFT JOIN currency c ON c.id = p.currencyFk - LEFT JOIN accounting a ON a.id = p.bankFk - LEFT JOIN payMethod pm ON pm.id = p.payMethodFk - LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id - WHERE p.received > '2014-12-31' - AND p.supplierFk = vSupplierFk - AND vCurrencyFk IN (p.currencyFk, 0) - AND vCompanyFk IN (p.companyFk, 0) - AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) - UNION ALL - SELECT NULL, - companyFk, - NULL, - se.id, - CASE - WHEN vOrderBy = 'issued' THEN se.dated - WHEN vOrderBy = 'bookEntried' THEN se.dated - WHEN vOrderBy = 'booked' THEN se.dated - WHEN vOrderBy = 'dueDate' THEN se.dueDated - END, - se.description, - 1, - amount, - NULL, - NULL, - NULL, - currencyFk, - isConciliated, - c.`code`, - 'expense' - FROM supplierExpense se - JOIN currency c ON c.id = se.currencyFk - WHERE se.supplierFk = vSupplierFk - AND vCurrencyFk IN (se.currencyFk,0) - AND vCompanyFk IN (se.companyFk,0) - AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) - ) sub - ORDER BY (dated IS NULL AND NOT isBooked), - dated, - IF(vOrderBy = 'dueDate', id, NULL) - LIMIT 10000000000000000000 - ) t; -END$$ -DELIMITER ; diff --git a/db/versions/11180-navyGerbera/01-dropProc.sql b/db/versions/11180-navyGerbera/01-dropProc.sql deleted file mode 100644 index 9b9e37700..000000000 --- a/db/versions/11180-navyGerbera/01-dropProc.sql +++ /dev/null @@ -1 +0,0 @@ -DROP PROCEDURE IF EXISTS vn.supplier_statement; \ No newline at end of file From cf13aa917ef8198a491633bd802b99185d9ed524 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 9 Aug 2024 08:18:30 +0200 Subject: [PATCH 086/250] feat: refs #7126 saleQuantity to saleWasteQuantity --- db/dump/fixtures.before.sql | 2 +- db/routines/bs/procedures/waste_addSales.sql | 14 +++++++------- db/versions/11182-redAralia/00-firstScript.sql | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 db/versions/11182-redAralia/00-firstScript.sql diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 60c96abb4..6563292dd 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -1516,7 +1516,7 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed (9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''), (10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''); -INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleQuantity`, `saleInternalWaste`, `saleExternalWaste`) +INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWasteQuantity`, `saleInternalWaste`, `saleExternalWaste`) VALUES ('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 1, 1, '1062', '51', '56.20', '56.20'), ('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 2, 1, '35074', '687', '53.12', '89.69'), diff --git a/db/routines/bs/procedures/waste_addSales.sql b/db/routines/bs/procedures/waste_addSales.sql index 3e189d2e6..b855e8b0d 100644 --- a/db/routines/bs/procedures/waste_addSales.sql +++ b/db/routines/bs/procedures/waste_addSales.sql @@ -1,7 +1,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSales`() BEGIN - DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY; + DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY; DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; CALL cache.last_buy_refresh(FALSE); @@ -12,16 +12,16 @@ BEGIN it.workerFk, it.id, s.itemFk, - SUM(s.quantity), - SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity) `value`, - SUM ( + SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity), + SUM(IF(aw.`type`, s.quantity, 0)), + SUM( IF( aw.`type` = 'internal', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, 0 ) - ) internalWaste, - SUM ( + ), + SUM( IF( aw.`type` = 'external', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, @@ -30,7 +30,7 @@ BEGIN 0 ) ) - ) externalWaste + ) FROM vn.sale s JOIN vn.item i ON i.id = s.itemFk JOIN vn.itemType it ON it.id = i.typeFk diff --git a/db/versions/11182-redAralia/00-firstScript.sql b/db/versions/11182-redAralia/00-firstScript.sql new file mode 100644 index 000000000..72c06de65 --- /dev/null +++ b/db/versions/11182-redAralia/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE bs.waste CHANGE saleQuantity saleWasteQuantity decimal(10,2) DEFAULT NULL NULL AFTER saleTotal; +ALTER TABLE bs.waste MODIFY COLUMN saleTotal decimal(10,2) DEFAULT NULL NULL COMMENT 'Coste'; From 4fc43df11bd9f210be9222e2cdb835472ce11f17 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 9 Aug 2024 11:28:30 +0200 Subject: [PATCH 087/250] feat: refs #6650 new itemShelvingLog --- ...mShelving _afterDelete.sql => itemShelving_afterDelete.sql} | 2 +- db/versions/11183-limePhormium/00-firstScript.sql | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) rename db/routines/vn/triggers/{itemShelving _afterDelete.sql => itemShelving_afterDelete.sql} (88%) create mode 100644 db/versions/11183-limePhormium/00-firstScript.sql diff --git a/db/routines/vn/triggers/itemShelving _afterDelete.sql b/db/routines/vn/triggers/itemShelving_afterDelete.sql similarity index 88% rename from db/routines/vn/triggers/itemShelving _afterDelete.sql rename to db/routines/vn/triggers/itemShelving_afterDelete.sql index 9a1759eff..449ad5530 100644 --- a/db/routines/vn/triggers/itemShelving _afterDelete.sql +++ b/db/routines/vn/triggers/itemShelving_afterDelete.sql @@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_afterDel BEGIN INSERT INTO shelvingLog SET `action` = 'delete', - `changedModel` = 'itemShelving', + `changedModel` = 'ItemShelving', `changedModelId` = OLD.id, `userFk` = account.myUser_getId(); END$$ diff --git a/db/versions/11183-limePhormium/00-firstScript.sql b/db/versions/11183-limePhormium/00-firstScript.sql new file mode 100644 index 000000000..d6d1fc271 --- /dev/null +++ b/db/versions/11183-limePhormium/00-firstScript.sql @@ -0,0 +1,3 @@ +ALTER TABLE vn.shelvingLog MODIFY + COLUMN changedModel enum('Shelving', 'ItemShelving') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Shelving' NOT NULL; +ALTER TABLE vn.shelvingLog MODIFY COLUMN originFk varchar(11) DEFAULT NULL NULL; From 8ab049be0d741a9cac1c4ced0120ea1249c27a9d Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 9 Aug 2024 11:48:22 +0200 Subject: [PATCH 088/250] chore: refs #6900 beautify code --- modules/invoiceIn/back/methods/invoice-in/filter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index 05e038a61..8a884e211 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -157,8 +157,8 @@ module.exports = Self => { case 'correctingFk': if (!correcteds.length && !args.correctingFk) return; return args.correctingFk - ? {['ii.id']: {inq: correcteds.map(x => x.correctingFk)}} - : {['ii.id']: {nin: correcteds.map(x => x.correctingFk)}}; + ? {'ii.id': {inq: correcteds.map(x => x.correctingFk)}} + : {'ii.id': {nin: correcteds.map(x => x.correctingFk)}}; case 'correctedFk': return {'ii.id': {inq: correctings.map(x => x.correctingFk)}}; case 'supplierActivityFk': From af65ef25365de75fd91ab3c815e64f220218b2c2 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 9 Aug 2024 12:54:33 +0200 Subject: [PATCH 089/250] fix(orders_filter): add sourceApp accepts --- modules/order/back/methods/order/filter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 592ed11e6..758e8065c 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -59,6 +59,10 @@ module.exports = Self => { arg: 'showEmpty', type: 'boolean', description: 'Show empty orders' + }, { + arg: 'sourceApp', + type: 'string', + description: 'Application' } ], returns: { From 38dbe6e966953fa5dac469b377ddca2a5edc04f4 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 9 Aug 2024 13:53:28 +0200 Subject: [PATCH 090/250] fix: #7126 waste_addSales --- db/routines/bs/procedures/waste_addSales.sql | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/db/routines/bs/procedures/waste_addSales.sql b/db/routines/bs/procedures/waste_addSales.sql index b855e8b0d..20eee5d49 100644 --- a/db/routines/bs/procedures/waste_addSales.sql +++ b/db/routines/bs/procedures/waste_addSales.sql @@ -25,10 +25,7 @@ BEGIN IF( aw.`type` = 'external', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, - IF(c.code = 'manaClaim', - sc.value * s.quantity, - 0 - ) + 0 ) ) FROM vn.sale s @@ -41,10 +38,8 @@ BEGIN JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = w.id JOIN vn.buy b ON b.id = lb.buy_id - LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id - LEFT JOIN vn.component c ON c.id = sc.componentFk WHERE t.shipped BETWEEN vDateFrom AND vDateTo AND w.isManaged - GROUP BY it.id, i.id; + GROUP BY i.id; END$$ DELIMITER ; From 00845c0534afc25f1a4a3fa1032b76ff6c591b7d Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 12 Aug 2024 08:03:49 +0200 Subject: [PATCH 091/250] refactor: refs #7646 #7646 Deleted scannable* variables productionConfig --- db/versions/11165-grayAralia/00-firstScript.sql | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/db/versions/11165-grayAralia/00-firstScript.sql b/db/versions/11165-grayAralia/00-firstScript.sql index 2e0e2a329..652b2343a 100644 --- a/db/versions/11165-grayAralia/00-firstScript.sql +++ b/db/versions/11165-grayAralia/00-firstScript.sql @@ -1,7 +1,3 @@ --- Place your SQL code here -ALTER TABLE IF EXISTS vn.productionConfig -CHANGE COLUMN IF EXISTS scannableCodeType scannableCodeType__ enum('qr','barcode') - CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'barcode' NOT NULL, -CHANGE COLUMN IF EXISTS scannablePreviusCodeType scannablePreviusCodeType__ enum('qr','barcode') - CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'barcode' NOT NULL; - +ALTER TABLE vn.productionConfig + DROP COLUMN scannableCodeType, + DROP COLUMN scannablePreviusCodeType; From c4e82022611fecada029cfa8614e4c4eceb0f8bf Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 12 Aug 2024 08:53:24 +0200 Subject: [PATCH 092/250] feat: refs #7774 #7774 Changes ticket_cloneWeekly --- .../vn/procedures/ticket_cloneWeekly.sql | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index f689f2600..be19a40bf 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -17,35 +17,33 @@ BEGIN DECLARE vYear INT; DECLARE vSalesPersonFK INT; DECLARE vItemPicker INT; - DECLARE vTicketfailed INT; + DECLARE vEmail VARCHAR(150); + DECLARE vIsDuplicateMail BOOL; + DECLARE vSubject VARCHAR(150); + DECLARE vMessage TEXT; - DECLARE rsTicket CURSOR FOR - SELECT tt.ticketFk, - t.clientFk, - t.warehouseFk, - t.companyFk, - t.addressFk, - tt.agencyModeFk, - ti.dated - FROM ticketWeekly tt - JOIN ticket t ON tt.ticketFk = t.id - JOIN tmp.time ti - WHERE WEEKDAY(ti.dated) = tt.weekDay; + DECLARE vTickets CURSOR FOR + SELECT tt.ticketFk, + t.clientFk, + t.warehouseFk, + t.companyFk, + t.addressFk, + tt.agencyModeFk, + ti.dated + FROM ticketWeekly tt + JOIN ticket t ON tt.ticketFk = t.id + JOIN tmp.time ti + WHERE WEEKDAY(ti.dated) = tt.weekDay; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE; - - CALL `util`.`time_generate`(vDateFrom,vDateTo); - - OPEN rsTicket; - myLoop: LOOP - BEGIN - DECLARE vSalesPersonEmail VARCHAR(150); - DECLARE vIsDuplicateMail BOOL; - DECLARE vSubject VARCHAR(150); - DECLARE vMessage TEXT; + + CALL `util`.`time_generate`(vDateFrom, vDateTo); + + OPEN vTickets; + l: LOOP SET vIsDone = FALSE; - FETCH rsTicket INTO + FETCH vTickets INTO vTicketFk, vClientFk, vWarehouseFk, @@ -55,10 +53,10 @@ BEGIN vShipment; IF vIsDone THEN - LEAVE myLoop; + LEAVE l; END IF; - -- busca si el ticket ya ha sido clonado + -- Busca si el ticket ya ha sido clonado IF EXISTS (SELECT TRUE FROM ticket tOrig JOIN sale saleOrig ON tOrig.id = saleOrig.ticketFk JOIN saleCloned sc ON sc.saleOriginalFk = saleOrig.id @@ -68,7 +66,7 @@ BEGIN AND tClon.isDeleted = FALSE AND DATE(tClon.shipped) = vShipment) THEN - ITERATE myLoop; + ITERATE l; END IF; IF vAgencyModeFk IS NULL THEN @@ -184,9 +182,9 @@ BEGIN ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' '); - IF (vLanding IS NULL) THEN + IF vLanding IS NULL THEN - SELECT IFNULL(d.notificationEmail,e.email) INTO vSalesPersonEmail + SELECT IFNULL(d.notificationEmail, e.email) INTO vEmail FROM client c JOIN worker w ON w.id = c.salesPersonFk JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk @@ -203,21 +201,21 @@ BEGIN SELECT COUNT(*) INTO vIsDuplicateMail FROM mail - WHERE receiver = vSalesPersonEmail + WHERE receiver = vEmail AND subject = vSubject; IF NOT vIsDuplicateMail THEN - CALL mail_insert(vSalesPersonEmail, NULL, vSubject, vMessage); + CALL mail_insert(vEmail, NULL, vSubject, vMessage); END IF; CALL ticket_setState(vNewTicket, 'FIXING'); ELSE CALL ticketCalculateClon(vNewTicket, vTicketFk); END IF; - - END; END LOOP; - CLOSE rsTicket; + CLOSE vTickets; - DROP TEMPORARY TABLE IF EXISTS tmp.time, tmp.zoneGetLanded; + DROP TEMPORARY TABLE IF EXISTS + tmp.time, + tmp.zoneGetLanded; END$$ DELIMITER ; From 3cf2cec94604a4e6e422db029bd58e0576962be3 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 12 Aug 2024 09:02:38 +0200 Subject: [PATCH 093/250] feat: refs #7774 #7774 Changes ticket_cloneWeekly --- .../vn/procedures/ticket_cloneWeekly.sql | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index be19a40bf..d5c9939df 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -4,7 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_cloneWeekly` vDateTo DATE ) BEGIN - DECLARE vIsDone BOOL; DECLARE vLanding DATE; DECLARE vShipment DATE; DECLARE vWarehouseFk INT; @@ -15,12 +14,15 @@ BEGIN DECLARE vAgencyModeFk INT; DECLARE vNewTicket INT; DECLARE vYear INT; - DECLARE vSalesPersonFK INT; - DECLARE vItemPicker INT; - DECLARE vEmail VARCHAR(150); + DECLARE vObservationSalesPersonFk INT + DEFAULT (SELECT id FROM observationType WHERE code = 'salesPerson'); + DECLARE vObservationItemPickerFk INT + DEFAULT (SELECT id FROM observationType WHERE code = 'itemPicker'); + DECLARE vEmail VARCHAR(255); DECLARE vIsDuplicateMail BOOL; - DECLARE vSubject VARCHAR(150); + DECLARE vSubject VARCHAR(100); DECLARE vMessage TEXT; + DECLARE vDone BOOL; DECLARE vTickets CURSOR FOR SELECT tt.ticketFk, @@ -35,14 +37,13 @@ BEGIN JOIN tmp.time ti WHERE WEEKDAY(ti.dated) = tt.weekDay; - DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; CALL `util`.`time_generate`(vDateFrom, vDateTo); OPEN vTickets; l: LOOP - - SET vIsDone = FALSE; + SET vDone = FALSE; FETCH vTickets INTO vTicketFk, vClientFk, @@ -52,7 +53,7 @@ BEGIN vAgencyModeFk, vShipment; - IF vIsDone THEN + IF vDone THEN LEAVE l; END IF; @@ -106,15 +107,15 @@ BEGIN priceFixed, isPriceFixed) SELECT vNewTicket, - saleOrig.itemFk, - saleOrig.concept, - saleOrig.quantity, - saleOrig.price, - saleOrig.discount, - saleOrig.priceFixed, - saleOrig.isPriceFixed - FROM sale saleOrig - WHERE saleOrig.ticketFk = vTicketFk; + itemFk, + concept, + quantity, + price, + discount, + priceFixed, + isPriceFixed + FROM sale + WHERE ticketFk = vTicketFk; INSERT IGNORE INTO saleCloned(saleOriginalFk, saleClonedFk) SELECT saleOriginal.id, saleClon.id @@ -151,15 +152,7 @@ BEGIN attenderFk, vNewTicket FROM ticketRequest - WHERE ticketFk =vTicketFk; - - SELECT id INTO vSalesPersonFK - FROM observationType - WHERE code = 'salesPerson'; - - SELECT id INTO vItemPicker - FROM observationType - WHERE code = 'itemPicker'; + WHERE ticketFk = vTicketFk; INSERT INTO ticketObservation( ticketFk, @@ -167,7 +160,7 @@ BEGIN description) VALUES( vNewTicket, - vSalesPersonFK, + vObservationSalesPersonFk, CONCAT('turno desde ticket: ',vTicketFk)) ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' '); @@ -177,13 +170,12 @@ BEGIN description) VALUES( vNewTicket, - vItemPicker, + vObservationItemPickerFk, 'ATENCION: Contiene lineas de TURNO') ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' '); IF vLanding IS NULL THEN - SELECT IFNULL(d.notificationEmail, e.email) INTO vEmail FROM client c JOIN worker w ON w.id = c.salesPersonFk From 931c13d8ab1fddfd517568b3f5a456f8de6527a0 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 12 Aug 2024 09:06:24 +0200 Subject: [PATCH 094/250] feat: refs #7774 #7774 Changes ticket_cloneWeekly --- db/routines/vn/procedures/ticket_cloneWeekly.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index d5c9939df..e13e7e677 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -178,10 +178,9 @@ BEGIN IF vLanding IS NULL THEN SELECT IFNULL(d.notificationEmail, e.email) INTO vEmail FROM client c - JOIN worker w ON w.id = c.salesPersonFk - JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk - JOIN department d ON d.id = wd.departmentFk JOIN account.emailUser e ON e.userFk = c.salesPersonFk + LEFT JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk + LEFT JOIN department d ON d.id = wd.departmentFk WHERE c.id = vClientFk; SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', From 1602c12200ac71e132aebf1c2c9e7b97b9ac06b1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 12 Aug 2024 09:13:30 +0200 Subject: [PATCH 095/250] fix: refs #7283 sql --- db/routines/vn/procedures/item_getBalance.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 9c609b4c6..46e4bafcc 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -190,7 +190,7 @@ BEGIN UNION ALL SELECT * FROM orders ORDER BY shipped DESC, - (inventorySupplierFk = entityId) ASC, + (inventorySupplierFk = entityId) DESC, alertLevel DESC, isTicket, `order` DESC, From 46abf2f57bafaca090d77e86ede873d40bc027c0 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 12 Aug 2024 10:27:26 +0200 Subject: [PATCH 096/250] fix(defaulter_filter): recovery subquery --- modules/client/back/methods/defaulter/filter.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/client/back/methods/defaulter/filter.js b/modules/client/back/methods/defaulter/filter.js index 40756b236..9f19dee0a 100644 --- a/modules/client/back/methods/defaulter/filter.js +++ b/modules/client/back/methods/defaulter/filter.js @@ -83,9 +83,14 @@ module.exports = Self => { LEFT JOIN account.user u ON u.id = c.salesPersonFk LEFT JOIN account.user uw ON uw.id = co.workerFk LEFT JOIN ( - SELECT MAX(started), clientFk, finished - FROM recovery - GROUP BY clientFk + SELECT r1.started, r1.clientFk, r1.finished + FROM recovery r1 + JOIN ( + SELECT MAX(started) AS maxStarted, clientFk + FROM recovery + GROUP BY clientFk + ) r2 ON r1.clientFk = r2.clientFk + AND r1.started = r2.maxStarted ) r ON r.clientFk = c.id LEFT JOIN workerDepartment wd ON wd.workerFk = u.id JOIN department dp ON dp.id = wd.departmentFk From 3ee9833a701b8e6c270d554b60d84eae3bec2534 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 12 Aug 2024 14:06:02 +0200 Subject: [PATCH 097/250] fix: refs #7355 remove and tests accounts --- .../01_create_and_basic_data.spec.js | 164 ------------ .../02_alias_create_and_basic_data.spec.js | 66 ----- .../03_role_create_and_basic_data.spec.js | 86 ------- e2e/paths/14-account/04_acl.spec.js | 60 ----- e2e/paths/14-account/05_connections.spec.js | 25 -- e2e/paths/14-account/06_accounts.spec.js | 37 --- e2e/paths/14-account/07_ldap.spec.js | 41 --- e2e/paths/14-account/08_samba.spec.js | 42 --- e2e/paths/14-account/09_privileges.spec.js | 112 -------- modules/account/front/accounts/index.html | 75 ------ modules/account/front/accounts/index.js | 19 -- modules/account/front/accounts/locale/es.yml | 14 - modules/account/front/acl/create/index.html | 70 ----- modules/account/front/acl/create/index.js | 33 --- modules/account/front/acl/index.js | 4 - modules/account/front/acl/index/index.html | 51 ---- modules/account/front/acl/index/index.js | 15 -- modules/account/front/acl/index/locale/es.yml | 4 - modules/account/front/acl/locale/es.yml | 4 - modules/account/front/acl/main/index.html | 20 -- modules/account/front/acl/main/index.js | 18 -- .../account/front/acl/search-panel/index.html | 39 --- .../account/front/acl/search-panel/index.js | 26 -- .../account/front/alias/basic-data/index.html | 43 ---- .../account/front/alias/basic-data/index.js | 12 - modules/account/front/alias/card/index.html | 5 - modules/account/front/alias/card/index.js | 14 - modules/account/front/alias/create/index.html | 38 --- modules/account/front/alias/create/index.js | 15 -- .../account/front/alias/descriptor/index.html | 27 -- .../account/front/alias/descriptor/index.js | 26 -- .../front/alias/descriptor/locale/es.yml | 2 - modules/account/front/alias/index.js | 9 - modules/account/front/alias/index/index.html | 39 --- modules/account/front/alias/index/index.js | 14 - .../account/front/alias/index/locale/es.yml | 2 - modules/account/front/alias/locale/es.yml | 1 - modules/account/front/alias/main/index.html | 17 -- modules/account/front/alias/main/index.js | 18 -- .../account/front/alias/summary/index.html | 16 -- modules/account/front/alias/summary/index.js | 25 -- modules/account/front/alias/users/index.html | 26 -- modules/account/front/alias/users/index.js | 31 --- .../account/front/alias/users/index.spec.js | 42 --- .../account/front/alias/users/locale/es.yml | 2 - modules/account/front/aliases/index.html | 64 ----- modules/account/front/aliases/index.js | 51 ---- modules/account/front/aliases/index.spec.js | 53 ---- modules/account/front/aliases/locale/es.yml | 3 - modules/account/front/basic-data/index.html | 51 ---- modules/account/front/basic-data/index.js | 25 -- .../account/front/basic-data/locale/es.yml | 1 - modules/account/front/card/index.html | 8 - modules/account/front/card/index.js | 32 --- modules/account/front/card/index.spec.js | 27 -- modules/account/front/card/style.scss | 10 - modules/account/front/connections/index.html | 45 ---- modules/account/front/connections/index.js | 29 --- .../account/front/connections/locale/es.yml | 5 - modules/account/front/create/index.html | 57 ---- modules/account/front/create/index.js | 20 -- .../front/descriptor-popover/index.html | 4 - .../account/front/descriptor-popover/index.js | 9 - .../__snapshots__/index.spec.js.snap | 5 - modules/account/front/descriptor/index.html | 192 -------------- modules/account/front/descriptor/index.js | 145 ----------- .../account/front/descriptor/index.spec.js | 97 ------- .../account/front/descriptor/locale/es.yml | 35 --- modules/account/front/index.js | 21 -- modules/account/front/index/index.html | 47 ---- modules/account/front/index/index.js | 14 - modules/account/front/index/locale/es.yml | 2 - modules/account/front/ldap/index.html | 66 ----- modules/account/front/ldap/index.js | 14 - modules/account/front/ldap/locale/es.yml | 8 - .../account/front/mail-forwarding/index.html | 49 ---- .../account/front/mail-forwarding/index.js | 12 - .../front/mail-forwarding/locale/es.yml | 7 - modules/account/front/main/index.html | 19 -- modules/account/front/main/index.js | 28 +- modules/account/front/main/index.spec.js | 28 -- modules/account/front/privileges/index.html | 41 --- modules/account/front/privileges/index.js | 21 -- .../account/front/privileges/locale/es.yml | 2 - modules/account/front/role-log/index.html | 1 - modules/account/front/role-log/index.js | 7 - .../account/front/role/basic-data/index.html | 40 --- .../account/front/role/basic-data/index.js | 12 - modules/account/front/role/card/index.html | 5 - modules/account/front/role/card/index.js | 14 - modules/account/front/role/card/index.spec.js | 25 -- modules/account/front/role/create/index.html | 38 --- modules/account/front/role/create/index.js | 15 -- .../account/front/role/descriptor/index.html | 27 -- .../account/front/role/descriptor/index.js | 26 -- .../front/role/descriptor/index.spec.js | 29 --- .../front/role/descriptor/locale/es.yml | 2 - modules/account/front/role/index.js | 10 - modules/account/front/role/index/index.html | 42 --- modules/account/front/role/index/index.js | 14 - .../account/front/role/index/locale/es.yml | 2 - .../account/front/role/inherited/index.html | 21 -- modules/account/front/role/inherited/index.js | 23 -- .../front/role/inherited/index.spec.js | 23 -- modules/account/front/role/locale/es.yml | 1 - modules/account/front/role/main/index.html | 18 -- modules/account/front/role/main/index.js | 24 -- .../front/role/search-panel/index.html | 21 -- .../account/front/role/search-panel/index.js | 7 - .../account/front/role/subroles/index.html | 57 ---- modules/account/front/role/subroles/index.js | 51 ---- .../account/front/role/subroles/index.spec.js | 53 ---- .../account/front/role/subroles/locale/es.yml | 4 - modules/account/front/role/summary/index.html | 20 -- modules/account/front/role/summary/index.js | 24 -- modules/account/front/roles/index.html | 21 -- modules/account/front/roles/index.js | 26 -- modules/account/front/routes.json | 243 ------------------ modules/account/front/samba/index.html | 71 ----- modules/account/front/samba/index.js | 14 - modules/account/front/samba/locale/es.yml | 9 - modules/account/front/search-panel/index.html | 31 --- modules/account/front/search-panel/index.js | 7 - modules/account/front/summary/index.html | 40 --- modules/account/front/summary/index.js | 40 --- modules/account/front/user-log/index.html | 1 - modules/account/front/user-log/index.js | 7 - 127 files changed, 3 insertions(+), 3959 deletions(-) delete mode 100644 e2e/paths/14-account/01_create_and_basic_data.spec.js delete mode 100644 e2e/paths/14-account/02_alias_create_and_basic_data.spec.js delete mode 100644 e2e/paths/14-account/03_role_create_and_basic_data.spec.js delete mode 100644 e2e/paths/14-account/04_acl.spec.js delete mode 100644 e2e/paths/14-account/05_connections.spec.js delete mode 100644 e2e/paths/14-account/06_accounts.spec.js delete mode 100644 e2e/paths/14-account/07_ldap.spec.js delete mode 100644 e2e/paths/14-account/08_samba.spec.js delete mode 100644 e2e/paths/14-account/09_privileges.spec.js delete mode 100644 modules/account/front/accounts/index.html delete mode 100644 modules/account/front/accounts/index.js delete mode 100644 modules/account/front/accounts/locale/es.yml delete mode 100644 modules/account/front/acl/create/index.html delete mode 100644 modules/account/front/acl/create/index.js delete mode 100644 modules/account/front/acl/index.js delete mode 100644 modules/account/front/acl/index/index.html delete mode 100644 modules/account/front/acl/index/index.js delete mode 100644 modules/account/front/acl/index/locale/es.yml delete mode 100644 modules/account/front/acl/locale/es.yml delete mode 100644 modules/account/front/acl/main/index.html delete mode 100644 modules/account/front/acl/main/index.js delete mode 100644 modules/account/front/acl/search-panel/index.html delete mode 100644 modules/account/front/acl/search-panel/index.js delete mode 100644 modules/account/front/alias/basic-data/index.html delete mode 100644 modules/account/front/alias/basic-data/index.js delete mode 100644 modules/account/front/alias/card/index.html delete mode 100644 modules/account/front/alias/card/index.js delete mode 100644 modules/account/front/alias/create/index.html delete mode 100644 modules/account/front/alias/create/index.js delete mode 100644 modules/account/front/alias/descriptor/index.html delete mode 100644 modules/account/front/alias/descriptor/index.js delete mode 100644 modules/account/front/alias/descriptor/locale/es.yml delete mode 100644 modules/account/front/alias/index.js delete mode 100644 modules/account/front/alias/index/index.html delete mode 100644 modules/account/front/alias/index/index.js delete mode 100644 modules/account/front/alias/index/locale/es.yml delete mode 100644 modules/account/front/alias/locale/es.yml delete mode 100644 modules/account/front/alias/main/index.html delete mode 100644 modules/account/front/alias/main/index.js delete mode 100644 modules/account/front/alias/summary/index.html delete mode 100644 modules/account/front/alias/summary/index.js delete mode 100644 modules/account/front/alias/users/index.html delete mode 100644 modules/account/front/alias/users/index.js delete mode 100644 modules/account/front/alias/users/index.spec.js delete mode 100644 modules/account/front/alias/users/locale/es.yml delete mode 100644 modules/account/front/aliases/index.html delete mode 100644 modules/account/front/aliases/index.js delete mode 100644 modules/account/front/aliases/index.spec.js delete mode 100644 modules/account/front/aliases/locale/es.yml delete mode 100644 modules/account/front/basic-data/index.html delete mode 100644 modules/account/front/basic-data/index.js delete mode 100644 modules/account/front/basic-data/locale/es.yml delete mode 100644 modules/account/front/card/index.html delete mode 100644 modules/account/front/card/index.js delete mode 100644 modules/account/front/card/index.spec.js delete mode 100644 modules/account/front/card/style.scss delete mode 100644 modules/account/front/connections/index.html delete mode 100644 modules/account/front/connections/index.js delete mode 100644 modules/account/front/connections/locale/es.yml delete mode 100644 modules/account/front/create/index.html delete mode 100644 modules/account/front/create/index.js delete mode 100644 modules/account/front/descriptor-popover/index.html delete mode 100644 modules/account/front/descriptor-popover/index.js delete mode 100644 modules/account/front/descriptor/__snapshots__/index.spec.js.snap delete mode 100644 modules/account/front/descriptor/index.html delete mode 100644 modules/account/front/descriptor/index.js delete mode 100644 modules/account/front/descriptor/index.spec.js delete mode 100644 modules/account/front/descriptor/locale/es.yml delete mode 100644 modules/account/front/index/index.html delete mode 100644 modules/account/front/index/index.js delete mode 100644 modules/account/front/index/locale/es.yml delete mode 100644 modules/account/front/ldap/index.html delete mode 100644 modules/account/front/ldap/index.js delete mode 100644 modules/account/front/ldap/locale/es.yml delete mode 100644 modules/account/front/mail-forwarding/index.html delete mode 100644 modules/account/front/mail-forwarding/index.js delete mode 100644 modules/account/front/mail-forwarding/locale/es.yml delete mode 100644 modules/account/front/main/index.spec.js delete mode 100644 modules/account/front/privileges/index.html delete mode 100644 modules/account/front/privileges/index.js delete mode 100644 modules/account/front/privileges/locale/es.yml delete mode 100644 modules/account/front/role-log/index.html delete mode 100644 modules/account/front/role-log/index.js delete mode 100644 modules/account/front/role/basic-data/index.html delete mode 100644 modules/account/front/role/basic-data/index.js delete mode 100644 modules/account/front/role/card/index.html delete mode 100644 modules/account/front/role/card/index.js delete mode 100644 modules/account/front/role/card/index.spec.js delete mode 100644 modules/account/front/role/create/index.html delete mode 100644 modules/account/front/role/create/index.js delete mode 100644 modules/account/front/role/descriptor/index.html delete mode 100644 modules/account/front/role/descriptor/index.js delete mode 100644 modules/account/front/role/descriptor/index.spec.js delete mode 100644 modules/account/front/role/descriptor/locale/es.yml delete mode 100644 modules/account/front/role/index.js delete mode 100644 modules/account/front/role/index/index.html delete mode 100644 modules/account/front/role/index/index.js delete mode 100644 modules/account/front/role/index/locale/es.yml delete mode 100644 modules/account/front/role/inherited/index.html delete mode 100644 modules/account/front/role/inherited/index.js delete mode 100644 modules/account/front/role/inherited/index.spec.js delete mode 100644 modules/account/front/role/locale/es.yml delete mode 100644 modules/account/front/role/main/index.html delete mode 100644 modules/account/front/role/main/index.js delete mode 100644 modules/account/front/role/search-panel/index.html delete mode 100644 modules/account/front/role/search-panel/index.js delete mode 100644 modules/account/front/role/subroles/index.html delete mode 100644 modules/account/front/role/subroles/index.js delete mode 100644 modules/account/front/role/subroles/index.spec.js delete mode 100644 modules/account/front/role/subroles/locale/es.yml delete mode 100644 modules/account/front/role/summary/index.html delete mode 100644 modules/account/front/role/summary/index.js delete mode 100644 modules/account/front/roles/index.html delete mode 100644 modules/account/front/roles/index.js delete mode 100644 modules/account/front/samba/index.html delete mode 100644 modules/account/front/samba/index.js delete mode 100644 modules/account/front/samba/locale/es.yml delete mode 100644 modules/account/front/search-panel/index.html delete mode 100644 modules/account/front/search-panel/index.js delete mode 100644 modules/account/front/summary/index.html delete mode 100644 modules/account/front/summary/index.js delete mode 100644 modules/account/front/user-log/index.html delete mode 100644 modules/account/front/user-log/index.js diff --git a/e2e/paths/14-account/01_create_and_basic_data.spec.js b/e2e/paths/14-account/01_create_and_basic_data.spec.js deleted file mode 100644 index e2c069d80..000000000 --- a/e2e/paths/14-account/01_create_and_basic_data.spec.js +++ /dev/null @@ -1,164 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account create and basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('itManagement', 'account'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should open the new account form by clicking the add button', async() => { - await page.waitToClick(selectors.accountIndex.addAccount); - await page.waitForState('account.create'); - }); - - it('should fill the form and then save it by clicking the create button', async() => { - await page.write(selectors.accountIndex.newName, 'remy'); - await page.write(selectors.accountIndex.newNickname, 'Gambit'); - await page.write(selectors.accountIndex.newEmail, 'RemyEtienneLeBeau@verdnatura.es'); - await page.autocompleteSearch(selectors.accountIndex.newRole, 'Trainee'); - await page.write(selectors.accountIndex.newPassword, 'cestlavie'); - await page.waitToClick(selectors.accountIndex.createAccountButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should redirect the user to the created account basic data section', async() => { - await page.waitForState('account.card.basicData'); - }); - - it('should check the name is as expected', async() => { - const result = await page.waitToGetProperty(selectors.accountBasicData.name, 'value'); - - expect(result).toEqual('remy'); - }); - - it('should check the nickname is as expected', async() => { - const result = await page.waitToGetProperty(selectors.accountBasicData.nickname, 'value'); - - expect(result).toEqual('Gambit'); - }); - - it('should check the email is as expected', async() => { - const result = await page.waitToGetProperty(selectors.accountBasicData.email, 'value'); - - expect(result).toEqual('RemyEtienneLeBeau@verdnatura.es'); - }); - - it('should navigate to the roles section to check the roles are correct', async() => { - await page.accessToSection('account.card.roles'); - const rolesCount = await page.countElement(selectors.accountRoles.anyResult); - - expect(rolesCount).toEqual(3); - }); - - describe('Descriptor option', () => { - describe('activate account', () => { - it(`should check the active account icon isn't present in the descriptor`, async() => { - await page.waitForNumberOfElements(selectors.accountDescriptor.activeAccountIcon, 0); - }); - - it('should activate the account using the descriptor menu', async() => { - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.activateAccount); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Account enabled!'); - }); - - it('should check the active account icon is now present in the descriptor', async() => { - await page.waitForSelector(selectors.accountDescriptor.activeAccountIcon, {visible: false}); - }); - }); - - describe('deactivate user', () => { - it(`should check the inactive user icon isn't present in the descriptor just yet`, async() => { - await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0); - }); - - it('should deactivate the user using the descriptor menu', async() => { - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.deactivateUser); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('User deactivated!'); - }); - - it('should check the inactive user icon is now present', async() => { - await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 1); - }); - }); - - describe('activate user', () => { - it('should activate the user using the descriptor menu', async() => { - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.activateUser); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('User activated!'); - }); - - it('should check the inactive user icon is not present anymore', async() => { - await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0); - }); - }); - - describe('mail forwarding', () => { - it('should activate the mail forwarding and set the recipent email', async() => { - await page.accessToSection('account.card.mailForwarding'); - await page.waitToClick(selectors.accountMailForwarding.mailForwardingCheckbox); - await page.write(selectors.accountMailForwarding.email, 'someEmail@someDomain.es'); - await page.waitToClick(selectors.accountMailForwarding.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - }); - - describe('Set password', () => { - it('should set the password using the descriptor menu', async() => { - const newPassword = 'quantum.12345'; - - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.setPassword); - await page.write(selectors.accountDescriptor.newPassword, newPassword); - await page.write(selectors.accountDescriptor.repeatPassword, newPassword); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Password changed succesfully!'); - }); - - // cant log into created account for unknown reasons - // it('should login into the created account with the new password', async() => { - // await page.loginAndModule('Remy', 'quantum.crypt0graphy'); - // }); - }); - - describe('delete account', () => { - // it('should navigate to the account basic data section', async() => { - // }); - - it('should delete the account using the descriptor menu', async() => { - await page.waitToClick(selectors.accountDescriptor.menuButton); - await page.waitToClick(selectors.accountDescriptor.deleteAccount); - await page.waitToClick(selectors.accountDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('User removed'); - }); - }); - }); -}); diff --git a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js b/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js deleted file mode 100644 index 840fb8afe..000000000 --- a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js +++ /dev/null @@ -1,66 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account Alias create and basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('itManagement', 'account'); - await page.accessToSection('account.alias'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should open the new account alias form by clicking the add button', async() => { - await page.waitToClick(selectors.accountAliasIndex.addAlias); - await page.waitForState('account.alias.create'); - }); - - it('should fill the form and then save it by clicking the create alias button', async() => { - await page.write(selectors.accountAliasIndex.newName, 'Boring alias'); - await page.write(selectors.accountAliasIndex.newDescription, 'Boring description'); - await page.waitToClick(selectors.accountAliasIndex.createAliasButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should redirect the user to the created account alias basic data section', async() => { - await page.waitForState('account.alias.card.basicData'); - }); - - it('should edit the alias basic data', async() => { - await page.overwrite(selectors.accountAliasBasicData.name, 'Psykers'); - await page.overwrite(selectors.accountAliasBasicData.description, 'Email group for psykers'); - await page.waitToClick(selectors.accountAliasBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reload the basicData section and check the name was edited successfully', async() => { - await page.reloadSection('account.alias.card.basicData'); - const result = await page.waitToGetProperty(selectors.accountAliasBasicData.name, 'value'); - - expect(result).toEqual('Psykers'); - }); - - it('should check the alias description was edited successfully', async() => { - const result = await page.waitToGetProperty(selectors.accountAliasBasicData.description, 'value'); - - expect(result).toContain('psykers'); - }); - - it('should search IT alias then access the user section to check the role listed is the expected one', async() => { - await page.accessToSearchResult('IT'); - await page.accessToSection('account.alias.card.users'); - const rolesCount = await page.countElement(selectors.accountAliasUsers.anyResult); - - expect(rolesCount).toEqual(1); - }); -}); diff --git a/e2e/paths/14-account/03_role_create_and_basic_data.spec.js b/e2e/paths/14-account/03_role_create_and_basic_data.spec.js deleted file mode 100644 index 6acf82318..000000000 --- a/e2e/paths/14-account/03_role_create_and_basic_data.spec.js +++ /dev/null @@ -1,86 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account Role create and basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('it', 'account'); - await page.accessToSection('account.role'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should open the new account role form by clicking the add button', async() => { - await page.waitToClick(selectors.accountRoleIndex.addRole); - await page.waitForState('account.role.create'); - }); - - it('should fill the form and then save it by clicking the create role button', async() => { - await page.write(selectors.accountRoleIndex.newName, 'boringRole'); - await page.write(selectors.accountRoleIndex.newDescription, 'Boring description'); - await page.waitToClick(selectors.accountRoleIndex.createRoleButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should redirect the user to the created role basic data section', async() => { - await page.waitForState('account.role.card.basicData'); - }); - - it('should edit the role basic data', async() => { - await page.overwrite(selectors.accountRoleBasicData.name, 'psyker'); - await page.overwrite(selectors.accountRoleBasicData.description, 'A role just for psykers'); - await page.waitToClick(selectors.accountRoleBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reload the role basicData section and check the name was edited successfully', async() => { - await page.reloadSection('account.role.card.basicData'); - const result = await page.waitToGetProperty(selectors.accountRoleBasicData.name, 'value'); - - expect(result).toEqual('psyker'); - }); - - it('should check the role description was edited successfully', async() => { - const result = await page.waitToGetProperty(selectors.accountRoleBasicData.description, 'value'); - - expect(result).toContain('psykers'); - }); - - it('should navigate to the subroles section', async() => { - await page.accessToSection('account.role.card.subroles'); - }); - - it('should asign a subrole', async() => { - await page.waitToClick(selectors.accountSubroles.addSubrole); - await page.autocompleteSearch(selectors.accountSubroles.role, 'teamManager'); - await page.waitToClick(selectors.accountSubroles.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Role added!'); - }); - - it('should reload the subroles section and check a role was added', async() => { - await page.reloadSection('account.role.card.subroles'); - const subrolesCount = await page.countElement(selectors.accountSubroles.anyResult); - - expect(subrolesCount).toEqual(1); - }); - - it('should access the employee roles inheritance then check the roles listed are the expected ones', async() => { - await page.accessToSearchResult('employee'); - await page.accessToSection('account.role.card.inherited'); - const rolesCount = await page.countElement(selectors.accountRoleInheritance.anyResult); - - expect(rolesCount).toEqual(7); - }); -}); diff --git a/e2e/paths/14-account/04_acl.spec.js b/e2e/paths/14-account/04_acl.spec.js deleted file mode 100644 index ce2a63b14..000000000 --- a/e2e/paths/14-account/04_acl.spec.js +++ /dev/null @@ -1,60 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account ACL path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('developer', 'account'); - await page.accessToSection('account.acl'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should go to create new acl', async() => { - await page.waitToClick(selectors.accountAcl.addAcl); - await page.waitForState('account.acl.create'); - }); - - it('should create new acl', async() => { - await page.autocompleteSearch(selectors.accountAcl.role, 'sysadmin'); - await page.autocompleteSearch(selectors.accountAcl.model, 'Account'); - await page.autocompleteSearch(selectors.accountAcl.accessType, '*'); - await page.autocompleteSearch(selectors.accountAcl.permission, 'ALLOW'); - await page.waitToClick(selectors.accountAcl.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should navigate to edit', async() => { - await page.doSearch(); - await page.waitToClick(selectors.accountAcl.thirdAcl); - await page.waitForState('account.acl.edit'); - }); - - it('should edit the third acl', async() => { - await page.autocompleteSearch(selectors.accountAcl.model, 'Supplier'); - await page.autocompleteSearch(selectors.accountAcl.accessType, 'READ'); - await page.waitToClick(selectors.accountAcl.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should delete the third result', async() => { - const result = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); - await page.waitToClick(selectors.accountAcl.deleteThirdAcl); - await page.waitToClick(selectors.globalItems.acceptButton); - const message = await page.waitForSnackbar(); - const newResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); - - expect(message.text).toContain('ACL removed'); - expect(result).not.toEqual(newResult); - }); -}); diff --git a/e2e/paths/14-account/05_connections.spec.js b/e2e/paths/14-account/05_connections.spec.js deleted file mode 100644 index 49d5f612d..000000000 --- a/e2e/paths/14-account/05_connections.spec.js +++ /dev/null @@ -1,25 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account Connections path', () => { - let browser; - let page; - const account = 'sysadmin'; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule(account, 'account'); - await page.accessToSection('account.connections'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should check this is the last connection', async() => { - const firstResult = await page.waitToGetProperty(selectors.accountConnections.firstConnection, 'innerText'); - - expect(firstResult).toContain(account); - }); -}); diff --git a/e2e/paths/14-account/06_accounts.spec.js b/e2e/paths/14-account/06_accounts.spec.js deleted file mode 100644 index 8bd6ea7d5..000000000 --- a/e2e/paths/14-account/06_accounts.spec.js +++ /dev/null @@ -1,37 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account Accounts path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('sysadmin', 'account'); - await page.accessToSection('account.accounts'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should sync roles', async() => { - await page.waitToClick(selectors.accountAccounts.syncRoles); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Roles synchronized!'); - }); - - it('should relogin', async() => { - await page.loginAndModule('sysadmin', 'account'); - await page.accessToSection('account.accounts'); - }); - - it('should sync all', async() => { - await page.waitToClick(selectors.accountAccounts.syncAll); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Synchronizing in the background'); - }); -}); diff --git a/e2e/paths/14-account/07_ldap.spec.js b/e2e/paths/14-account/07_ldap.spec.js deleted file mode 100644 index eb22f695c..000000000 --- a/e2e/paths/14-account/07_ldap.spec.js +++ /dev/null @@ -1,41 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account LDAP path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('sysadmin', 'account'); - await page.accessToSection('account.ldap'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should set data and save', async() => { - await page.waitToClick(selectors.accountLdap.checkEnable); - await page.write(selectors.accountLdap.server, '1234'); - await page.write(selectors.accountLdap.rdn, '1234'); - await page.write(selectors.accountLdap.password, 'nightmare'); - await page.write(selectors.accountLdap.userDn, 'sysadmin'); - await page.write(selectors.accountLdap.groupDn, '1234'); - await page.waitToClick(selectors.accountLdap.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reset data', async() => { - await page.waitToClick(selectors.accountLdap.checkEnable); - await page.waitToClick(selectors.accountLdap.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/14-account/08_samba.spec.js b/e2e/paths/14-account/08_samba.spec.js deleted file mode 100644 index a92344acb..000000000 --- a/e2e/paths/14-account/08_samba.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account Samba path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('sysadmin', 'account'); - await page.accessToSection('account.samba'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should set data and save', async() => { - await page.waitToClick(selectors.accountSamba.checkEnable); - await page.write(selectors.accountSamba.adDomain, '1234'); - await page.write(selectors.accountSamba.adController, '1234'); - await page.write(selectors.accountSamba.adUser, 'sysadmin'); - await page.write(selectors.accountSamba.adPassword, 'nightmare'); - await page.write(selectors.accountSamba.userDn, 'testDn'); - await page.waitToClick(selectors.accountSamba.verifyCert); - await page.waitToClick(selectors.accountSamba.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reset data', async() => { - await page.waitToClick(selectors.accountSamba.checkEnable); - await page.waitToClick(selectors.accountSamba.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/14-account/09_privileges.spec.js b/e2e/paths/14-account/09_privileges.spec.js deleted file mode 100644 index e4b8fb24c..000000000 --- a/e2e/paths/14-account/09_privileges.spec.js +++ /dev/null @@ -1,112 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Account privileges path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('developer', 'account'); - await page.accessToSearchResult('1101'); - await page.accessToSection('account.card.privileges'); - }); - - afterAll(async() => { - await browser.close(); - }); - - describe('as developer', () => { - it('should throw error when give privileges', async() => { - await page.waitToClick(selectors.accountPrivileges.checkHasGrant); - await page.waitToClick(selectors.accountPrivileges.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain(`You don't have grant privilege`); - }); - - it('should throw error when change role', async() => { - await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee'); - await page.waitToClick(selectors.accountPrivileges.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain(`You don't have grant privilege`); - }); - }); - - describe('as sysadmin', () => { - beforeAll(async() => { - await page.loginAndModule('sysadmin', 'account'); - await page.accessToSearchResult('9'); - await page.accessToSection('account.card.privileges'); - }); - - it('should give privileges', async() => { - await page.waitToClick(selectors.accountPrivileges.checkHasGrant); - await page.waitToClick(selectors.accountPrivileges.save); - const message = await page.waitForSnackbar(); - - await page.reloadSection('account.card.privileges'); - const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant); - - expect(message.text).toContain(`Data saved!`); - expect(result).toBe('checked'); - }); - - it('should throw error when change role and not own role', async() => { - await page.autocompleteSearch(selectors.accountPrivileges.role, 'itBoss'); - await page.waitToClick(selectors.accountPrivileges.save); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain(`You don't own the role and you can't assign it to another user`); - }); - - it('should change role to employee', async() => { - await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee'); - await page.waitToClick(selectors.accountPrivileges.save); - const message = await page.waitForSnackbar(); - - await page.reloadSection('account.card.privileges'); - const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value'); - - expect(message.text).toContain(`Data saved!`); - expect(result).toContain('employee'); - }); - - it('should return role to developer', async() => { - await page.autocompleteSearch(selectors.accountPrivileges.role, 'developer'); - await page.waitToClick(selectors.accountPrivileges.save); - const message = await page.waitForSnackbar(); - - await page.reloadSection('account.card.privileges'); - const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value'); - - expect(message.text).toContain(`Data saved!`); - expect(result).toContain('developer'); - }); - }); - - describe('as developer again', () => { - it('should remove privileges', async() => { - await page.accessToSearchResult('9'); - await page.accessToSection('account.card.privileges'); - - await page.waitToClick(selectors.accountPrivileges.checkHasGrant); - await page.waitToClick(selectors.accountPrivileges.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain(`Data saved!`); - }); - - it('should logIn in developer', async() => { - await page.reloadSection('account.card.privileges'); - const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant); - - expect(result).toBe('unchecked'); - }); - }); -}); diff --git a/modules/account/front/accounts/index.html b/modules/account/front/accounts/index.html deleted file mode 100644 index 6847e68d1..000000000 --- a/modules/account/front/accounts/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/accounts/index.js b/modules/account/front/accounts/index.js deleted file mode 100644 index ab19126a1..000000000 --- a/modules/account/front/accounts/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onSynchronizeAll() { - this.vnApp.showSuccess(this.$t('Synchronizing in the background')); - this.$http.patch(`Accounts/syncAll`); - } - - onSynchronizeRoles() { - this.$http.patch(`RoleInherits/sync`) - .then(() => this.vnApp.showSuccess(this.$t('Roles synchronized!'))); - } -} - -ngModule.component('vnAccountAccounts', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/accounts/locale/es.yml b/modules/account/front/accounts/locale/es.yml deleted file mode 100644 index 614ade3eb..000000000 --- a/modules/account/front/accounts/locale/es.yml +++ /dev/null @@ -1,14 +0,0 @@ -Accounts: Cuentas -Homedir base: Directorio base para carpetas de usuario -Shell: Intérprete de línea de comandos -User and role base id: Id base usuarios y roles -Synchronize all: Sincronizar todo -Synchronize roles: Sincronizar roles -If password is not specified, just user attributes are synchronized: >- - Si la contraseña no se especifica solo se sincronizarán lo atributos del usuario -Synchronizing in the background: Sincronizando en segundo plano -Users synchronized!: ¡Usuarios sincronizados! -Username: Nombre de usuario -Synchronize: Sincronizar -Please enter the username: Por favor introduce el nombre de usuario -Roles synchronized!: ¡Roles sincronizados! diff --git a/modules/account/front/acl/create/index.html b/modules/account/front/acl/create/index.html deleted file mode 100644 index 14332f737..000000000 --- a/modules/account/front/acl/create/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/acl/create/index.js b/modules/account/front/acl/create/index.js deleted file mode 100644 index fea71991f..000000000 --- a/modules/account/front/acl/create/index.js +++ /dev/null @@ -1,33 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor(...args) { - super(...args); - this.accessTypes = [ - {name: '*'}, - {name: 'READ'}, - {name: 'WRITE'} - ]; - this.permissions = [ - {name: 'ALLOW'}, - {name: 'DENY'} - ]; - - this.models = []; - for (let model in window.validations) - this.models.push({name: model}); - - this.acl = { - property: '*', - principalType: 'ROLE', - accessType: 'READ', - permission: 'ALLOW' - }; - } -} - -ngModule.component('vnAclCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/acl/index.js b/modules/account/front/acl/index.js deleted file mode 100644 index 8393859a5..000000000 --- a/modules/account/front/acl/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import './main'; -import './index/'; -import './create'; -import './search-panel'; diff --git a/modules/account/front/acl/index/index.html b/modules/account/front/acl/index/index.html deleted file mode 100644 index af06ec481..000000000 --- a/modules/account/front/acl/index/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -
{{::row.model}}.{{::row.property}}
- - - - - - -
- - - - -
-
-
-
- - - - - \ No newline at end of file diff --git a/modules/account/front/acl/index/index.js b/modules/account/front/acl/index/index.js deleted file mode 100644 index a2aec534a..000000000 --- a/modules/account/front/acl/index/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onDelete(row) { - return this.$http.delete(`ACLs/${row.id}`) - .then(() => this.$.model.refresh()) - .then(() => this.vnApp.showSuccess(this.$t('ACL removed'))); - } -} - -ngModule.component('vnAclIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/acl/index/locale/es.yml b/modules/account/front/acl/index/locale/es.yml deleted file mode 100644 index 8024f804c..000000000 --- a/modules/account/front/acl/index/locale/es.yml +++ /dev/null @@ -1,4 +0,0 @@ -New ACL: Nuevo ACL -Edit ACL: Editar ACL -ACL will be removed: El ACL será eliminado -ACL removed: ACL eliminado diff --git a/modules/account/front/acl/locale/es.yml b/modules/account/front/acl/locale/es.yml deleted file mode 100644 index ff6a1b41c..000000000 --- a/modules/account/front/acl/locale/es.yml +++ /dev/null @@ -1,4 +0,0 @@ -Model: Modelo -Property: Propiedad -Access type: Tipo de acceso -Permission: Permiso \ No newline at end of file diff --git a/modules/account/front/acl/main/index.html b/modules/account/front/acl/main/index.html deleted file mode 100644 index 7767768d9..000000000 --- a/modules/account/front/acl/main/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/account/front/acl/main/index.js b/modules/account/front/acl/main/index.js deleted file mode 100644 index a91a71cb7..000000000 --- a/modules/account/front/acl/main/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import ngModule from '../../module'; -import ModuleMain from 'salix/components/module-main'; - -export default class ACL extends ModuleMain { - exprBuilder(param, value) { - switch (param) { - case 'search': - return {model: {like: `%${value}%`}}; - default: - return {[param]: value}; - } - } -} - -ngModule.vnComponent('vnAclComponent', { - controller: ACL, - template: require('./index.html') -}); diff --git a/modules/account/front/acl/search-panel/index.html b/modules/account/front/acl/search-panel/index.html deleted file mode 100644 index a3efab440..000000000 --- a/modules/account/front/acl/search-panel/index.html +++ /dev/null @@ -1,39 +0,0 @@ -
-
- - - - - - - - - - - - - - -
-
diff --git a/modules/account/front/acl/search-panel/index.js b/modules/account/front/acl/search-panel/index.js deleted file mode 100644 index 4f571059e..000000000 --- a/modules/account/front/acl/search-panel/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import ngModule from '../../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -export default class Controller extends SearchPanel { - constructor(...args) { - super(...args); - this.accessTypes = [ - {name: '*'}, - {name: 'READ'}, - {name: 'WRITE'} - ]; - this.permissions = [ - {name: 'ALLOW'}, - {name: 'DENY'} - ]; - - this.models = []; - for (let model in window.validations) - this.models.push({name: model}); - } -} - -ngModule.component('vnAclSearchPanel', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/alias/basic-data/index.html b/modules/account/front/alias/basic-data/index.html deleted file mode 100644 index 523c9297a..000000000 --- a/modules/account/front/alias/basic-data/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - -
- - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/modules/account/front/alias/basic-data/index.js b/modules/account/front/alias/basic-data/index.js deleted file mode 100644 index b7c2db089..000000000 --- a/modules/account/front/alias/basic-data/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section {} - -ngModule.component('vnAliasBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - alias: '<' - } -}); diff --git a/modules/account/front/alias/card/index.html b/modules/account/front/alias/card/index.html deleted file mode 100644 index 712147a24..000000000 --- a/modules/account/front/alias/card/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/account/front/alias/card/index.js b/modules/account/front/alias/card/index.js deleted file mode 100644 index fd1a18f6a..000000000 --- a/modules/account/front/alias/card/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - this.$http.get(`MailAliases/${this.$params.id}`) - .then(res => this.alias = res.data); - } -} - -ngModule.vnComponent('vnAliasCard', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/alias/create/index.html b/modules/account/front/alias/create/index.html deleted file mode 100644 index 4dad1b870..000000000 --- a/modules/account/front/alias/create/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -
- - - - - - - - - - - - - - -
diff --git a/modules/account/front/alias/create/index.js b/modules/account/front/alias/create/index.js deleted file mode 100644 index c058c3adf..000000000 --- a/modules/account/front/alias/create/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onSubmit() { - return this.$.watcher.submit().then(res => - this.$state.go('account.alias.card.basicData', {id: res.data.id}) - ); - } -} - -ngModule.component('vnAliasCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/alias/descriptor/index.html b/modules/account/front/alias/descriptor/index.html deleted file mode 100644 index 71b98c6a3..000000000 --- a/modules/account/front/alias/descriptor/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Delete - - - -
- - -
-
-
- - \ No newline at end of file diff --git a/modules/account/front/alias/descriptor/index.js b/modules/account/front/alias/descriptor/index.js deleted file mode 100644 index a21baae5a..000000000 --- a/modules/account/front/alias/descriptor/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import ngModule from '../../module'; -import Descriptor from 'salix/components/descriptor'; - -class Controller extends Descriptor { - get alias() { - return this.entity; - } - - set alias(value) { - this.entity = value; - } - - onDelete() { - return this.$http.delete(`MailAliases/${this.id}`) - .then(() => this.$state.go('account.alias')) - .then(() => this.vnApp.showSuccess(this.$t('Alias removed'))); - } -} - -ngModule.component('vnAliasDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - alias: '<' - } -}); diff --git a/modules/account/front/alias/descriptor/locale/es.yml b/modules/account/front/alias/descriptor/locale/es.yml deleted file mode 100644 index 9c6fa0e73..000000000 --- a/modules/account/front/alias/descriptor/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Alias will be removed: El alias será eliminado -Alias removed: Alias eliminado \ No newline at end of file diff --git a/modules/account/front/alias/index.js b/modules/account/front/alias/index.js deleted file mode 100644 index 8eed3a3d3..000000000 --- a/modules/account/front/alias/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import './main'; -import './index/'; -import './create'; -import './summary'; -import './card'; -import './descriptor'; -import './create'; -import './basic-data'; -import './users'; diff --git a/modules/account/front/alias/index/index.html b/modules/account/front/alias/index/index.html deleted file mode 100644 index 7343cb9bd..000000000 --- a/modules/account/front/alias/index/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -
{{::alias.alias}}
-
{{::alias.description}}
-
- - - - -
-
-
-
- - - - - - \ No newline at end of file diff --git a/modules/account/front/alias/index/index.js b/modules/account/front/alias/index/index.js deleted file mode 100644 index 44e146fb4..000000000 --- a/modules/account/front/alias/index/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(alias) { - this.selectedAlias = alias; - this.$.summary.show(); - } -} - -ngModule.component('vnAliasIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/alias/index/locale/es.yml b/modules/account/front/alias/index/locale/es.yml deleted file mode 100644 index 4df41c0be..000000000 --- a/modules/account/front/alias/index/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -New alias: Nuevo alias -View alias: Ver alias \ No newline at end of file diff --git a/modules/account/front/alias/locale/es.yml b/modules/account/front/alias/locale/es.yml deleted file mode 100644 index ecc856fcf..000000000 --- a/modules/account/front/alias/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -Public: Público \ No newline at end of file diff --git a/modules/account/front/alias/main/index.html b/modules/account/front/alias/main/index.html deleted file mode 100644 index 43f6e2f51..000000000 --- a/modules/account/front/alias/main/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/account/front/alias/main/index.js b/modules/account/front/alias/main/index.js deleted file mode 100644 index 21eed3d85..000000000 --- a/modules/account/front/alias/main/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import ngModule from '../../module'; -import ModuleMain from 'salix/components/module-main'; - -export default class Alias extends ModuleMain { - exprBuilder(param, value) { - switch (param) { - case 'search': - return /^\d+$/.test(value) - ? {id: value} - : {alias: {like: `%${value}%`}}; - } - } -} - -ngModule.vnComponent('vnAlias', { - controller: Alias, - template: require('./index.html') -}); diff --git a/modules/account/front/alias/summary/index.html b/modules/account/front/alias/summary/index.html deleted file mode 100644 index 52ee2813d..000000000 --- a/modules/account/front/alias/summary/index.html +++ /dev/null @@ -1,16 +0,0 @@ - -
{{summary.alias}}
- - -

Basic data

- - - - -
-
-
\ No newline at end of file diff --git a/modules/account/front/alias/summary/index.js b/modules/account/front/alias/summary/index.js deleted file mode 100644 index 21bc8d9ba..000000000 --- a/modules/account/front/alias/summary/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import ngModule from '../../module'; -import Component from 'core/lib/component'; - -class Controller extends Component { - set alias(value) { - this._alias = value; - this.$.summary = null; - if (!value) return; - - this.$http.get(`MailAliases/${value.id}`) - .then(res => this.$.summary = res.data); - } - - get alias() { - return this._alias; - } -} - -ngModule.component('vnAliasSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - alias: '<' - } -}); diff --git a/modules/account/front/alias/users/index.html b/modules/account/front/alias/users/index.html deleted file mode 100644 index 048a702ea..000000000 --- a/modules/account/front/alias/users/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - {{::row.user.name}} - - - - - - - - - - - diff --git a/modules/account/front/alias/users/index.js b/modules/account/front/alias/users/index.js deleted file mode 100644 index b2446d71b..000000000 --- a/modules/account/front/alias/users/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - let filter = { - include: { - relation: 'user', - scope: { - fields: ['id', 'name'] - } - } - }; - this.$http.get(`MailAliases/${this.$params.id}/accounts`, {filter}) - .then(res => this.$.data = res.data); - } - - onRemove(row) { - return this.$http.delete(`MailAliases/${this.$params.id}/accounts/${row.id}`) - .then(() => { - let index = this.$.data.indexOf(row); - if (index !== -1) this.$.data.splice(index, 1); - this.vnApp.showSuccess(this.$t('User removed')); - }); - } -} - -ngModule.component('vnAliasUsers', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/alias/users/index.spec.js b/modules/account/front/alias/users/index.spec.js deleted file mode 100644 index d618f1de1..000000000 --- a/modules/account/front/alias/users/index.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import './index'; - -describe('component vnAliasUsers', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnAliasUsers', {$element: null}); - controller.$params.id = 1; - })); - - describe('$onInit()', () => { - it('should delete entity and go to index', () => { - $httpBackend.expectGET('MailAliases/1/accounts').respond('foo'); - controller.$onInit(); - $httpBackend.flush(); - - expect(controller.$.data).toBe('foo'); - }); - }); - - describe('onRemove()', () => { - it('should call backend method to change role', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - controller.$.data = [ - {id: 1, alias: 'foo'}, - {id: 2, alias: 'bar'} - ]; - - $httpBackend.expectDELETE('MailAliases/1/accounts/1').respond(); - controller.onRemove(controller.$.data[0]); - $httpBackend.flush(); - - expect(controller.$.data).toEqual([{id: 2, alias: 'bar'}]); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); -}); diff --git a/modules/account/front/alias/users/locale/es.yml b/modules/account/front/alias/users/locale/es.yml deleted file mode 100644 index dc24eb318..000000000 --- a/modules/account/front/alias/users/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -User will be removed from alias: El usuario será borrado del alias -User removed: Usuario borrado \ No newline at end of file diff --git a/modules/account/front/aliases/index.html b/modules/account/front/aliases/index.html deleted file mode 100644 index 4a73ec873..000000000 --- a/modules/account/front/aliases/index.html +++ /dev/null @@ -1,64 +0,0 @@ -
- - - - - -
- {{::row.alias.alias}} -
-
- {{::row.alias.description}} -
-
- - - - -
-
- -
-
- - - - - - - - - - - - - - -
-
- Account not enabled -
diff --git a/modules/account/front/aliases/index.js b/modules/account/front/aliases/index.js deleted file mode 100644 index 0fc806a71..000000000 --- a/modules/account/front/aliases/index.js +++ /dev/null @@ -1,51 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - this.refresh(); - } - - refresh() { - let filter = { - where: {account: this.$params.id}, - include: { - relation: 'alias', - scope: { - fields: ['id', 'alias', 'description'] - } - } - }; - return this.$http.get(`MailAliasAccounts`, {filter}) - .then(res => this.$.data = res.data); - } - - onAddClick() { - this.addData = {account: this.$params.id}; - this.$.dialog.show(); - } - - onAddSave() { - return this.$http.post(`MailAliasAccounts`, this.addData) - .then(() => this.refresh()) - .then(() => this.vnApp.showSuccess( - this.$t('Subscribed to alias!')) - ); - } - - onRemove(row) { - return this.$http.delete(`MailAliasAccounts/${row.id}`) - .then(() => { - this.$.data.splice(this.$.data.indexOf(row), 1); - this.vnApp.showSuccess(this.$t('Unsubscribed from alias!')); - }); - } -} - -ngModule.component('vnUserAliases', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnUserCard' - } -}); diff --git a/modules/account/front/aliases/index.spec.js b/modules/account/front/aliases/index.spec.js deleted file mode 100644 index 466f1e1e9..000000000 --- a/modules/account/front/aliases/index.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -import './index'; - -describe('component vnUserAliases', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnUserAliases', {$element: null}); - jest.spyOn(controller.vnApp, 'showSuccess'); - })); - - describe('refresh()', () => { - it('should refresh the controller data', () => { - $httpBackend.expectGET('MailAliasAccounts').respond('foo'); - controller.refresh(); - $httpBackend.flush(); - - expect(controller.$.data).toBe('foo'); - }); - }); - - describe('onAddSave()', () => { - it('should add the new row', () => { - controller.addData = {account: 1}; - - $httpBackend.expectPOST('MailAliasAccounts').respond(); - $httpBackend.expectGET('MailAliasAccounts').respond('foo'); - controller.onAddSave(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('onRemove()', () => { - it('shoud remove the passed row remote and locally', () => { - controller.$.data = [ - {id: 1, alias: 'foo'}, - {id: 2, alias: 'bar'} - ]; - - $httpBackend.expectDELETE('MailAliasAccounts/1').respond(); - controller.onRemove(controller.$.data[0]); - $httpBackend.flush(); - - expect(controller.$.data).toEqual([{id: 2, alias: 'bar'}]); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); -}); diff --git a/modules/account/front/aliases/locale/es.yml b/modules/account/front/aliases/locale/es.yml deleted file mode 100644 index 4d1ad76a7..000000000 --- a/modules/account/front/aliases/locale/es.yml +++ /dev/null @@ -1,3 +0,0 @@ -Unsubscribe: Desuscribir -Subscribed to alias!: ¡Suscrito al alias! -Unsubscribed from alias!: ¡Desuscrito del alias! \ No newline at end of file diff --git a/modules/account/front/basic-data/index.html b/modules/account/front/basic-data/index.html deleted file mode 100644 index 9fd3506fe..000000000 --- a/modules/account/front/basic-data/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/basic-data/index.js b/modules/account/front/basic-data/index.js deleted file mode 100644 index f6b266bbc..000000000 --- a/modules/account/front/basic-data/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - if (this.$params.emailConfirmed) - this.vnApp.showSuccess(this.$t('Email verified successfully!')); - } - - onSubmit() { - this.$.watcher.submit() - .then(() => this.card.reload()); - } -} - -ngModule.component('vnUserBasicData', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnUserCard' - }, - bindings: { - user: '<' - } -}); diff --git a/modules/account/front/basic-data/locale/es.yml b/modules/account/front/basic-data/locale/es.yml deleted file mode 100644 index 2ca7bf698..000000000 --- a/modules/account/front/basic-data/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -Email verified successfully!: Correo verificado correctamente! diff --git a/modules/account/front/card/index.html b/modules/account/front/card/index.html deleted file mode 100644 index cba6b93c6..000000000 --- a/modules/account/front/card/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/modules/account/front/card/index.js b/modules/account/front/card/index.js deleted file mode 100644 index 2c8cc7637..000000000 --- a/modules/account/front/card/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import ngModule from '../module'; -import ModuleCard from 'salix/components/module-card'; -import './style.scss'; - -class Controller extends ModuleCard { - reload() { - const filter = { - where: {id: this.$params.id}, - include: { - relation: 'role', - scope: { - fields: ['id', 'name'] - } - } - }; - - return Promise.all([ - this.$http.get(`VnUsers/preview`, {filter}) - .then(res => { - const [user] = res.data; - this.user = user; - }), - this.$http.get(`Accounts/${this.$params.id}/exists`) - .then(res => this.hasAccount = res.data.exists) - ]); - } -} - -ngModule.vnComponent('vnUserCard', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/card/index.spec.js b/modules/account/front/card/index.spec.js deleted file mode 100644 index 712d3c1d8..000000000 --- a/modules/account/front/card/index.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -import './index'; - -describe('component vnUserCard', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnUserCard', {$element: null}); - })); - - describe('reload()', () => { - it('should reload the controller data', () => { - controller.$params.id = 1; - - $httpBackend.expectGET('VnUsers/preview').respond('foo'); - $httpBackend.expectGET('Accounts/1/exists').respond({exists: true}); - controller.reload(); - $httpBackend.flush(); - - expect(controller.user).toBe('f'); - expect(controller.hasAccount).toBeTruthy(); - }); - }); -}); diff --git a/modules/account/front/card/style.scss b/modules/account/front/card/style.scss deleted file mode 100644 index 4d9d108a0..000000000 --- a/modules/account/front/card/style.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import "variables"; - -.bg-title { - display: block; - text-align: center; - padding: 24px; - box-sizing: border-box; - color: $color-font-secondary; - font-size: 1.375rem; -} diff --git a/modules/account/front/connections/index.html b/modules/account/front/connections/index.html deleted file mode 100644 index d634b7a9f..000000000 --- a/modules/account/front/connections/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -
{{::row.user.username}}
-
{{::row.created | date:'dd/MM HH:mm'}}
-
- - - - -
-
-
-
- - - - \ No newline at end of file diff --git a/modules/account/front/connections/index.js b/modules/account/front/connections/index.js deleted file mode 100644 index c4ddd5615..000000000 --- a/modules/account/front/connections/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor(...args) { - super(...args); - this.filter = { - fields: ['id', 'created', 'userId'], - include: { - relation: 'user', - scope: { - fields: ['username'] - } - }, - order: 'created DESC' - }; - } - - onDisconnect(row) { - return this.$http.delete(`AccessTokens/${row.id}`) - .then(() => this.$.model.refresh()) - .then(() => this.vnApp.showSuccess(this.$t('Session killed'))); - } -} - -ngModule.component('vnConnections', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/connections/locale/es.yml b/modules/account/front/connections/locale/es.yml deleted file mode 100644 index 41ef18b45..000000000 --- a/modules/account/front/connections/locale/es.yml +++ /dev/null @@ -1,5 +0,0 @@ -Go to user: Ir al usuario -Refresh: Actualizar -Session will be killed: Se va a matar la sesión -Kill session: Matar sesión -Session killed: Sesión matada \ No newline at end of file diff --git a/modules/account/front/create/index.html b/modules/account/front/create/index.html deleted file mode 100644 index 70a518885..000000000 --- a/modules/account/front/create/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/create/index.js b/modules/account/front/create/index.js deleted file mode 100644 index 01ba7905b..000000000 --- a/modules/account/front/create/index.js +++ /dev/null @@ -1,20 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - this.user = {active: true}; - } - - onSubmit() { - return this.$.watcher.submit().then(res => { - this.$state.go('account.card.basicData', {id: res.data.id}); - }); - } -} - -ngModule.component('vnUserCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/descriptor-popover/index.html b/modules/account/front/descriptor-popover/index.html deleted file mode 100644 index f3131a84b..000000000 --- a/modules/account/front/descriptor-popover/index.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/account/front/descriptor-popover/index.js b/modules/account/front/descriptor-popover/index.js deleted file mode 100644 index d7b052473..000000000 --- a/modules/account/front/descriptor-popover/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import ngModule from '../module'; -import DescriptorPopover from 'salix/components/descriptor-popover'; - -class Controller extends DescriptorPopover {} - -ngModule.vnComponent('vnAccountDescriptorPopover', { - slotTemplate: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/descriptor/__snapshots__/index.spec.js.snap b/modules/account/front/descriptor/__snapshots__/index.spec.js.snap deleted file mode 100644 index de5f8e8c2..000000000 --- a/modules/account/front/descriptor/__snapshots__/index.spec.js.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`component vnUserDescriptor onPassChange() should throw an error when password is empty 1`] = `"You must enter a new password"`; - -exports[`component vnUserDescriptor onPassChange() should throw an error when repeat password not matches new password 1`] = `"Passwords don't match"`; diff --git a/modules/account/front/descriptor/index.html b/modules/account/front/descriptor/index.html deleted file mode 100644 index 86e78dfce..000000000 --- a/modules/account/front/descriptor/index.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - Delete - - - Change password - - - Set password - - - Enable account - - - Disable account - - - Activate user - - - Deactivate user - - - Synchronize - - - -
- - - - -
-
- - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - Do you want to synchronize user? - - - - - - - - - - - - - - - diff --git a/modules/account/front/descriptor/index.js b/modules/account/front/descriptor/index.js deleted file mode 100644 index de41d619d..000000000 --- a/modules/account/front/descriptor/index.js +++ /dev/null @@ -1,145 +0,0 @@ -import ngModule from '../module'; -import Descriptor from 'salix/components/descriptor'; -import UserError from 'core/lib/user-error'; - -class Controller extends Descriptor { - get user() { - return this.entity; - } - - set user(value) { - this.entity = value; - } - - get entity() { - return super.entity; - } - - set entity(value) { - super.entity = value; - this.hasAccount = null; - if (!value) return; - - this.$http.get(`Accounts/${value.id}/exists`) - .then(res => this.hasAccount = res.data.exists); - } - - loadData() { - const filter = { - where: {id: this.$params.id}, - include: { - relation: 'role', - scope: { - fields: ['id', 'name'] - } - } - }; - - return Promise.all([ - this.$http.get(`VnUsers/preview`, {filter}) - .then(res => { - const [user] = res.data; - this.user = user; - }), - this.$http.get(`Accounts/${this.$params.id}/exists`) - .then(res => this.hasAccount = res.data.exists) - ]); - } - - onDelete() { - return this.$http.delete(`VnUsers/${this.id}`) - .then(() => this.$state.go('account.index')) - .then(() => this.vnApp.showSuccess(this.$t('User removed'))); - } - - onChangePassClick(askOldPass) { - this.$http.get('UserPasswords/findOne') - .then(res => { - this.passRequirements = res.data; - this.askOldPass = askOldPass; - this.$.changePass.show(); - }); - } - - onPassChange() { - if (!this.newPassword) - throw new UserError(`You must enter a new password`); - if (this.newPassword != this.repeatPassword) - throw new UserError(`Passwords don't match`); - - let method; - const params = {newPassword: this.newPassword}; - - if (this.askOldPass) { - method = 'change-password'; - params.oldPassword = this.oldPassword; - } else - method = 'setPassword'; - - return this.$http.patch(`Accounts/${this.id}/${method}`, params) - .then(() => { - this.emit('change'); - this.vnApp.showSuccess(this.$t('Password changed succesfully!')); - }); - } - - onPassClose() { - this.oldPassword = ''; - this.newPassword = ''; - this.repeatPassword = ''; - this.$.$apply(); - } - - onEnableAccount() { - return this.$http.post(`Accounts`, {id: this.id}) - .then(() => this.onSwitchAccount(true)); - } - - onDisableAccount() { - return this.$http.delete(`Accounts/${this.id}`) - .then(() => this.onSwitchAccount(false)); - } - - onSwitchAccount(enable) { - this.hasAccount = enable; - const message = enable - ? 'Account enabled!' - : 'Account disabled!'; - this.emit('change'); - this.vnApp.showSuccess(this.$t(message)); - } - - onSetActive(active) { - return this.$http.patch(`VnUsers/${this.id}`, {active}) - .then(() => { - this.user.active = active; - const message = active - ? 'User activated!' - : 'User deactivated!'; - this.emit('change'); - this.vnApp.showSuccess(this.$t(message)); - }); - } - - onSync() { - const params = {force: true}; - if (this.shouldSyncPassword) - params.password = this.syncPassword; - - return this.$http.patch(`Accounts/${this.user.name}/sync`, params) - .then(() => this.vnApp.showSuccess(this.$t('User synchronized!'))); - } - - onSyncClose() { - this.shouldSyncPassword = false; - this.syncPassword = undefined; - } -} - -ngModule.component('vnUserDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - user: '<' - } -}); diff --git a/modules/account/front/descriptor/index.spec.js b/modules/account/front/descriptor/index.spec.js deleted file mode 100644 index 46c7e376c..000000000 --- a/modules/account/front/descriptor/index.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -import './index'; - -describe('component vnUserDescriptor', () => { - let controller; - let $httpBackend; - - let user = {id: 1, name: 'foo'}; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $httpBackend.whenGET('Accounts/1/exists').respond({exists: true}); - - controller = $componentController('vnUserDescriptor', {$element: null}, {user}); - jest.spyOn(controller, 'emit'); - jest.spyOn(controller.vnApp, 'showSuccess'); - })); - - describe('onDelete()', () => { - it('should delete entity and go to index', () => { - controller.$state.go = jest.fn(); - - $httpBackend.expectDELETE('VnUsers/1').respond(); - controller.onDelete(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('account.index'); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('onPassChange()', () => { - it('should throw an error when password is empty', () => { - expect(() => { - controller.onPassChange(); - }).toThrowErrorMatchingSnapshot(); - }); - - it('should throw an error when repeat password not matches new password', () => { - controller.newPassword = 'foo'; - controller.repeatPassword = 'bar'; - - expect(() => { - controller.onPassChange(); - }).toThrowErrorMatchingSnapshot(); - }); - - it('should make a request when password checks passes', () => { - controller.newPassword = 'foo'; - controller.repeatPassword = 'foo'; - - $httpBackend.expectPATCH('Accounts/1/setPassword').respond(); - controller.onPassChange(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.emit).toHaveBeenCalledWith('change'); - }); - }); - - describe('onEnableAccount()', () => { - it('should make request to enable account', () => { - $httpBackend.expectPOST('Accounts', {id: 1}).respond(); - controller.onEnableAccount(); - $httpBackend.flush(); - - expect(controller.hasAccount).toBeTruthy(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.emit).toHaveBeenCalledWith('change'); - }); - }); - - describe('onDisableAccount()', () => { - it('should make request to disable account', () => { - $httpBackend.expectDELETE('Accounts/1').respond(); - controller.onDisableAccount(); - $httpBackend.flush(); - - expect(controller.hasAccount).toBeFalsy(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.emit).toHaveBeenCalledWith('change'); - }); - }); - - describe('onSetActive()', () => { - it('should make request to activate/deactivate the user', () => { - $httpBackend.expectPATCH('VnUsers/1', {active: true}).respond(); - controller.onSetActive(true); - $httpBackend.flush(); - - expect(controller.user.active).toBeTruthy(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - expect(controller.emit).toHaveBeenCalledWith('change'); - }); - }); -}); diff --git a/modules/account/front/descriptor/locale/es.yml b/modules/account/front/descriptor/locale/es.yml deleted file mode 100644 index 98ced7694..000000000 --- a/modules/account/front/descriptor/locale/es.yml +++ /dev/null @@ -1,35 +0,0 @@ -User will be removed: El usuario será eliminado -User removed: Usuario eliminado -Are you sure you want to continue?: ¿Seguro que quieres continuar? -Account will be enabled: La cuenta será habilitada -Account will be disabled: La cuenta será deshabilitada -Account enabled!: ¡Cuenta habilitada! -Account disabled!: ¡Cuenta deshabilitada! -User will activated: El usuario será activado -User will be deactivated: El usuario será desactivado -User activated!: ¡Usuario activado! -User deactivated!: ¡Usuario desactivado! -Account enabled: Cuenta habilitada -User deactivated: Usuario desactivado -Change role: Modificar rol -Change password: Cambiar contraseña -Set password: Establecer contraseña -Enable account: Habilitar cuenta -Disable account: Deshabilitar cuenta -Activate user: Activar usuario -Deactivate user: Desactivar usuario -Old password: Contraseña antigua -New password: Nueva contraseña -Repeat password: Repetir contraseña -Password changed succesfully!: ¡Contraseña modificada correctamente! -Synchronize: Sincronizar -Do you want to synchronize user?: ¿Quieres sincronizar el usuario? -Synchronize password: Sincronizar contraseña -User synchronized!: ¡Usuario sincronizado! -Role changed succesfully!: ¡Rol modificado correctamente! -Password requirements: > - La contraseña debe tener al menos {{ length }} caracteres de longitud, - {{nAlpha}} caracteres alfabéticos, {{nUpper}} letras mayúsculas, {{nDigits}} - dígitos y {{nPunct}} símbolos (Ej: $%&.) -You must enter a new password: Debes introducir la nueva contraseña -Passwords don't match: Las contraseñas no coinciden diff --git a/modules/account/front/index.js b/modules/account/front/index.js index 4d6aedcae..a7209a0bd 100644 --- a/modules/account/front/index.js +++ b/modules/account/front/index.js @@ -1,24 +1,3 @@ export * from './module'; import './main'; -import './index/'; -import './role'; -import './alias'; -import './connections'; -import './acl'; -import './summary'; -import './card'; -import './descriptor'; -import './descriptor-popover'; -import './search-panel'; -import './create'; -import './basic-data'; -import './mail-forwarding'; -import './aliases'; -import './roles'; -import './ldap'; -import './samba'; -import './accounts'; -import './privileges'; -import './user-log'; -import './role-log'; diff --git a/modules/account/front/index/index.html b/modules/account/front/index/index.html deleted file mode 100644 index 7502c8b3d..000000000 --- a/modules/account/front/index/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/account/front/index/index.js b/modules/account/front/index/index.js deleted file mode 100644 index 9324ca740..000000000 --- a/modules/account/front/index/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(user) { - this.selectedUser = user; - this.$.summary.show(); - } -} - -ngModule.component('vnUserIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/index/locale/es.yml b/modules/account/front/index/locale/es.yml deleted file mode 100644 index 074fb054e..000000000 --- a/modules/account/front/index/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -New user: Nuevo usuario -View user: Ver usuario \ No newline at end of file diff --git a/modules/account/front/ldap/index.html b/modules/account/front/ldap/index.html deleted file mode 100644 index 23356452a..000000000 --- a/modules/account/front/ldap/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/ldap/index.js b/modules/account/front/ldap/index.js deleted file mode 100644 index 40e1e8db1..000000000 --- a/modules/account/front/ldap/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onTestConection() { - this.$http.get(`LdapConfigs/test`) - .then(() => this.vnApp.showSuccess(this.$t('LDAP connection established!'))); - } -} - -ngModule.component('vnAccountLdap', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/ldap/locale/es.yml b/modules/account/front/ldap/locale/es.yml deleted file mode 100644 index 0353d6b72..000000000 --- a/modules/account/front/ldap/locale/es.yml +++ /dev/null @@ -1,8 +0,0 @@ -Enable synchronization: Habilitar sincronización -Server: Servidor -RDN: RDN -User DN: DN usuarios -Filter: Filtro -Group DN: DN grupos -Test connection: Probar conexión -LDAP connection established!: ¡Conexión con LDAP establecida! diff --git a/modules/account/front/mail-forwarding/index.html b/modules/account/front/mail-forwarding/index.html deleted file mode 100644 index df5cd80bf..000000000 --- a/modules/account/front/mail-forwarding/index.html +++ /dev/null @@ -1,49 +0,0 @@ -
- - -
- - - - - - - - - - - - - - -
-
-
- Account not enabled -
diff --git a/modules/account/front/mail-forwarding/index.js b/modules/account/front/mail-forwarding/index.js deleted file mode 100644 index 5118e8eab..000000000 --- a/modules/account/front/mail-forwarding/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section {} - -ngModule.component('vnUserMailForwarding', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnUserCard' - }, -}); diff --git a/modules/account/front/mail-forwarding/locale/es.yml b/modules/account/front/mail-forwarding/locale/es.yml deleted file mode 100644 index 688ace6b5..000000000 --- a/modules/account/front/mail-forwarding/locale/es.yml +++ /dev/null @@ -1,7 +0,0 @@ -Mail forwarding: Reenvío de correo -Forward email: Dirección de reenvío -Enable mail forwarding: Habilitar redirección de correo -All emails will be forwarded to the specified address.: > - Todos los correos serán reenviados a la dirección especificada, no se - mantendrá copia de los mismos en el buzón del usuario. -You don't have enough privileges: No tienes suficientes permisos diff --git a/modules/account/front/main/index.html b/modules/account/front/main/index.html index 36b493ec4..e69de29bb 100644 --- a/modules/account/front/main/index.html +++ b/modules/account/front/main/index.html @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/modules/account/front/main/index.js b/modules/account/front/main/index.js index a43ffb76b..335d71b42 100644 --- a/modules/account/front/main/index.js +++ b/modules/account/front/main/index.js @@ -4,32 +4,10 @@ import ModuleMain from 'salix/components/module-main'; export default class User extends ModuleMain { constructor($element, $) { super($element, $); - this.filter = { - fields: ['id', 'nickname', 'name', 'role'], - include: { - relation: 'role', - scope: { - fields: ['id', 'name'] - } - } - }; } - - exprBuilder(param, value) { - switch (param) { - case 'search': - return /^\d+$/.test(value) - ? {id: value} - : {or: [ - {name: {like: `%${value}%`}}, - {nickname: {like: `%${value}%`}} - ]}; - case 'name': - case 'nickname': - return {[param]: {like: `%${value}%`}}; - case 'roleFk': - return {[param]: value}; - } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`account/`); } } diff --git a/modules/account/front/main/index.spec.js b/modules/account/front/main/index.spec.js deleted file mode 100644 index c232aa849..000000000 --- a/modules/account/front/main/index.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import './index'; - -describe('component vnUser', () => { - let controller; - - beforeEach(ngModule('account')); - - beforeEach(inject($componentController => { - controller = $componentController('vnUser', {$element: null}); - })); - - describe('exprBuilder()', () => { - it('should search by id when only digits string is passed', () => { - let expr = controller.exprBuilder('search', '1'); - - expect(expr).toEqual({id: '1'}); - }); - - it('should search by name when non-only digits string is passed', () => { - let expr = controller.exprBuilder('search', '1foo'); - - expect(expr).toEqual({or: [ - {name: {like: '%1foo%'}}, - {nickname: {like: '%1foo%'}} - ]}); - }); - }); -}); diff --git a/modules/account/front/privileges/index.html b/modules/account/front/privileges/index.html deleted file mode 100644 index 343c179e3..000000000 --- a/modules/account/front/privileges/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/privileges/index.js b/modules/account/front/privileges/index.js deleted file mode 100644 index f69428666..000000000 --- a/modules/account/front/privileges/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - get user() { - return this._user; - } - - set user(value) { - this._user = value; - if (!value) return; - } -} - -ngModule.component('vnUserPrivileges', { - template: require('./index.html'), - controller: Controller, - bindings: { - user: '<' - } -}); diff --git a/modules/account/front/privileges/locale/es.yml b/modules/account/front/privileges/locale/es.yml deleted file mode 100644 index d66a7a6cf..000000000 --- a/modules/account/front/privileges/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Privileges: Privilegios -Has grant: Puede delegar privilegios diff --git a/modules/account/front/role-log/index.html b/modules/account/front/role-log/index.html deleted file mode 100644 index 9e2b151b5..000000000 --- a/modules/account/front/role-log/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/account/front/role-log/index.js b/modules/account/front/role-log/index.js deleted file mode 100644 index 02448ccaa..000000000 --- a/modules/account/front/role-log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnRoleLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/account/front/role/basic-data/index.html b/modules/account/front/role/basic-data/index.html deleted file mode 100644 index 846f8b455..000000000 --- a/modules/account/front/role/basic-data/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - -
- - - - - - - - - - - - - - -
diff --git a/modules/account/front/role/basic-data/index.js b/modules/account/front/role/basic-data/index.js deleted file mode 100644 index 4e26906ee..000000000 --- a/modules/account/front/role/basic-data/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section {} - -ngModule.component('vnRoleBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - role: '<' - } -}); diff --git a/modules/account/front/role/card/index.html b/modules/account/front/role/card/index.html deleted file mode 100644 index 2f51f88b5..000000000 --- a/modules/account/front/role/card/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/account/front/role/card/index.js b/modules/account/front/role/card/index.js deleted file mode 100644 index 3c7c758ef..000000000 --- a/modules/account/front/role/card/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - this.$http.get(`VnRoles/${this.$params.id}`) - .then(res => this.role = res.data); - } -} - -ngModule.vnComponent('vnRoleCard', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/role/card/index.spec.js b/modules/account/front/role/card/index.spec.js deleted file mode 100644 index 569fe487d..000000000 --- a/modules/account/front/role/card/index.spec.js +++ /dev/null @@ -1,25 +0,0 @@ -import './index'; - -describe('component vnRoleCard', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnRoleCard', {$element: null}); - })); - - describe('reload()', () => { - it('should reload the controller data', () => { - controller.$params.id = 1; - - $httpBackend.expectGET('VnRoles/1').respond('foo'); - controller.reload(); - $httpBackend.flush(); - - expect(controller.role).toBe('foo'); - }); - }); -}); diff --git a/modules/account/front/role/create/index.html b/modules/account/front/role/create/index.html deleted file mode 100644 index 77d6fc2c1..000000000 --- a/modules/account/front/role/create/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -
- - - - - - - - - - - - - - -
diff --git a/modules/account/front/role/create/index.js b/modules/account/front/role/create/index.js deleted file mode 100644 index 3f7fcc9cf..000000000 --- a/modules/account/front/role/create/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onSubmit() { - return this.$.watcher.submit().then(res => - this.$state.go('account.role.card.basicData', {id: res.data.id}) - ); - } -} - -ngModule.component('vnRoleCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/role/descriptor/index.html b/modules/account/front/role/descriptor/index.html deleted file mode 100644 index d8bf4857a..000000000 --- a/modules/account/front/role/descriptor/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Delete - - - -
- - -
-
-
- - diff --git a/modules/account/front/role/descriptor/index.js b/modules/account/front/role/descriptor/index.js deleted file mode 100644 index 17b585cb7..000000000 --- a/modules/account/front/role/descriptor/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import ngModule from '../../module'; -import Descriptor from 'salix/components/descriptor'; - -class Controller extends Descriptor { - get role() { - return this.entity; - } - - set role(value) { - this.entity = value; - } - - onDelete() { - return this.$http.delete(`VnRoles/${this.id}`) - .then(() => this.$state.go('account.role')) - .then(() => this.vnApp.showSuccess(this.$t('Role removed'))); - } -} - -ngModule.component('vnRoleDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - role: '<' - } -}); diff --git a/modules/account/front/role/descriptor/index.spec.js b/modules/account/front/role/descriptor/index.spec.js deleted file mode 100644 index f3b2e4763..000000000 --- a/modules/account/front/role/descriptor/index.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import './index'; - -describe('component vnRoleDescriptor', () => { - let controller; - let $httpBackend; - - let role = {id: 1, name: 'foo'}; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnRoleDescriptor', {$element: null}, {role}); - })); - - describe('onDelete()', () => { - it('should delete entity and go to index', () => { - controller.$state.go = jest.fn(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - $httpBackend.expectDELETE('VnRoles/1').respond(); - controller.onDelete(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('account.role'); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); -}); diff --git a/modules/account/front/role/descriptor/locale/es.yml b/modules/account/front/role/descriptor/locale/es.yml deleted file mode 100644 index 1ca512e4f..000000000 --- a/modules/account/front/role/descriptor/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Role will be removed: El rol va a ser eliminado -Role removed: Rol eliminado \ No newline at end of file diff --git a/modules/account/front/role/index.js b/modules/account/front/role/index.js deleted file mode 100644 index 97a20d3bc..000000000 --- a/modules/account/front/role/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import './main'; -import './index/'; -import './summary'; -import './card'; -import './descriptor'; -import './search-panel'; -import './create'; -import './basic-data'; -import './subroles'; -import './inherited'; diff --git a/modules/account/front/role/index/index.html b/modules/account/front/role/index/index.html deleted file mode 100644 index 4c4c6b0ad..000000000 --- a/modules/account/front/role/index/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/account/front/role/index/index.js b/modules/account/front/role/index/index.js deleted file mode 100644 index 40773b23b..000000000 --- a/modules/account/front/role/index/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(role) { - this.selectedRole = role; - this.$.summary.show(); - } -} - -ngModule.component('vnRoleIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/role/index/locale/es.yml b/modules/account/front/role/index/locale/es.yml deleted file mode 100644 index 70932e983..000000000 --- a/modules/account/front/role/index/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -New role: Nuevo rol -View role: Ver rol \ No newline at end of file diff --git a/modules/account/front/role/inherited/index.html b/modules/account/front/role/inherited/index.html deleted file mode 100644 index 83ecbbff4..000000000 --- a/modules/account/front/role/inherited/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -
- {{::row.inherits.name}} -
-
- {{::row.inherits.description}} -
-
-
-
-
-
diff --git a/modules/account/front/role/inherited/index.js b/modules/account/front/role/inherited/index.js deleted file mode 100644 index 5927493ee..000000000 --- a/modules/account/front/role/inherited/index.js +++ /dev/null @@ -1,23 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - let filter = { - where: {role: this.$params.id}, - include: { - relation: 'inherits', - scope: { - fields: ['id', 'name', 'description'] - } - } - }; - this.$http.get('RoleRoles', {filter}) - .then(res => this.$.data = res.data); - } -} - -ngModule.component('vnRoleInherited', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/role/inherited/index.spec.js b/modules/account/front/role/inherited/index.spec.js deleted file mode 100644 index 16b0c53b2..000000000 --- a/modules/account/front/role/inherited/index.spec.js +++ /dev/null @@ -1,23 +0,0 @@ -import './index'; - -describe('component vnRoleInherited', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnRoleInherited', {$element: null}); - })); - - describe('$onInit()', () => { - it('should delete entity and go to index', () => { - $httpBackend.expectGET('RoleRoles').respond('foo'); - controller.$onInit(); - $httpBackend.flush(); - - expect(controller.$.data).toBe('foo'); - }); - }); -}); diff --git a/modules/account/front/role/locale/es.yml b/modules/account/front/role/locale/es.yml deleted file mode 100644 index 159fc7f16..000000000 --- a/modules/account/front/role/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -Subroles: Subroles diff --git a/modules/account/front/role/main/index.html b/modules/account/front/role/main/index.html deleted file mode 100644 index cfef28e57..000000000 --- a/modules/account/front/role/main/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/modules/account/front/role/main/index.js b/modules/account/front/role/main/index.js deleted file mode 100644 index 77d15cf17..000000000 --- a/modules/account/front/role/main/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import ngModule from '../../module'; -import ModuleMain from 'salix/components/module-main'; - -export default class Role extends ModuleMain { - exprBuilder(param, value) { - switch (param) { - case 'search': - return /^\d+$/.test(value) - ? {id: value} - : {or: [ - {name: {like: `%${value}%`}}, - {nickname: {like: `%${value}%`}} - ]}; - case 'name': - case 'description': - return {[param]: {like: `%${value}%`}}; - } - } -} - -ngModule.vnComponent('vnRole', { - controller: Role, - template: require('./index.html') -}); diff --git a/modules/account/front/role/search-panel/index.html b/modules/account/front/role/search-panel/index.html deleted file mode 100644 index dfea9f01c..000000000 --- a/modules/account/front/role/search-panel/index.html +++ /dev/null @@ -1,21 +0,0 @@ -
-
- - - - - - - - - - - -
-
\ No newline at end of file diff --git a/modules/account/front/role/search-panel/index.js b/modules/account/front/role/search-panel/index.js deleted file mode 100644 index 35da591ad..000000000 --- a/modules/account/front/role/search-panel/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -ngModule.component('vnRoleSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/account/front/role/subroles/index.html b/modules/account/front/role/subroles/index.html deleted file mode 100644 index eba1002b0..000000000 --- a/modules/account/front/role/subroles/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - -
- {{::row.inherits.name}} -
-
- {{::row.inherits.description}} -
-
- - - - -
-
-
-
- - - - - - - - - - - - - - diff --git a/modules/account/front/role/subroles/index.js b/modules/account/front/role/subroles/index.js deleted file mode 100644 index b7e1caaa4..000000000 --- a/modules/account/front/role/subroles/index.js +++ /dev/null @@ -1,51 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - this.refresh(); - } - - get path() { - return `RoleInherits`; - } - - refresh() { - let filter = { - where: {role: this.$params.id}, - include: { - relation: 'inherits', - scope: { - fields: ['id', 'name', 'description'] - } - } - }; - this.$http.get(this.path, {filter}) - .then(res => this.$.data = res.data); - } - - onAddClick() { - this.addData = {role: this.$params.id}; - this.$.dialog.show(); - } - - onAddSave() { - return this.$http.post(this.path, this.addData) - .then(() => this.refresh()) - .then(() => this.vnApp.showSuccess(this.$t('Role added! Changes will take a while to fully propagate.'))); - } - - onRemove(row) { - return this.$http.delete(`${this.path}/${row.id}`) - .then(() => { - let index = this.$.data.indexOf(row); - if (index !== -1) this.$.data.splice(index, 1); - this.vnApp.showSuccess(this.$t('Role removed. Changes will take a while to fully propagate.')); - }); - } -} - -ngModule.component('vnRoleSubroles', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/role/subroles/index.spec.js b/modules/account/front/role/subroles/index.spec.js deleted file mode 100644 index e7d9a4d0e..000000000 --- a/modules/account/front/role/subroles/index.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -import './index'; - -describe('component vnRoleSubroles', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('account')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnRoleSubroles', {$element: null}); - jest.spyOn(controller.vnApp, 'showSuccess'); - })); - - describe('refresh()', () => { - it('should delete entity and go to index', () => { - $httpBackend.expectGET('RoleInherits').respond('foo'); - controller.refresh(); - $httpBackend.flush(); - - expect(controller.$.data).toBe('foo'); - }); - }); - - describe('onAddSave()', () => { - it('should add a subrole', () => { - controller.addData = {role: 'foo'}; - - $httpBackend.expectPOST('RoleInherits', {role: 'foo'}).respond(); - $httpBackend.expectGET('RoleInherits').respond(); - controller.onAddSave(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('onRemove()', () => { - it('should remove a subrole', () => { - controller.$.data = [ - {id: 1, name: 'foo'}, - {id: 2, name: 'bar'} - ]; - - $httpBackend.expectDELETE('RoleInherits/1').respond(); - controller.onRemove(controller.$.data[0]); - $httpBackend.flush(); - - expect(controller.$.data).toEqual([{id: 2, name: 'bar'}]); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); -}); diff --git a/modules/account/front/role/subroles/locale/es.yml b/modules/account/front/role/subroles/locale/es.yml deleted file mode 100644 index 170882405..000000000 --- a/modules/account/front/role/subroles/locale/es.yml +++ /dev/null @@ -1,4 +0,0 @@ -Role added! Changes will take a while to fully propagate.: > - ¡Rol añadido! Los cambios tardaran un tiempo en propagarse completamente. -Role removed. Changes will take a while to fully propagate.: > - Rol eliminado. Los cambios tardaran un tiempo en propagarse completamente. diff --git a/modules/account/front/role/summary/index.html b/modules/account/front/role/summary/index.html deleted file mode 100644 index f7971190c..000000000 --- a/modules/account/front/role/summary/index.html +++ /dev/null @@ -1,20 +0,0 @@ - -
{{summary.name}}
- - -

Basic data

- - - - - - -
-
-
\ No newline at end of file diff --git a/modules/account/front/role/summary/index.js b/modules/account/front/role/summary/index.js deleted file mode 100644 index 6c649a68f..000000000 --- a/modules/account/front/role/summary/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import ngModule from '../../module'; -import Component from 'core/lib/component'; - -class Controller extends Component { - set role(value) { - this._role = value; - this.$.summary = null; - if (!value) return; - this.$http.get(`VnRoles/${value.id}`) - .then(res => this.$.summary = res.data); - } - - get role() { - return this._role; - } -} - -ngModule.component('vnRoleSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - role: '<' - } -}); diff --git a/modules/account/front/roles/index.html b/modules/account/front/roles/index.html deleted file mode 100644 index 8c8583929..000000000 --- a/modules/account/front/roles/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -
- {{::row.role.name}} -
-
- {{::row.role.description}} -
-
-
-
-
-
diff --git a/modules/account/front/roles/index.js b/modules/account/front/roles/index.js deleted file mode 100644 index 0982dcf10..000000000 --- a/modules/account/front/roles/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - let filter = { - where: { - prindicpalType: 'USER', - principalId: this.$params.id - }, - include: { - relation: 'role', - scope: { - fields: ['id', 'name', 'description'] - } - } - }; - this.$http.get('RoleMappings', {filter}) - .then(res => this.$.data = res.data); - } -} - -ngModule.component('vnUserRoles', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/routes.json b/modules/account/front/routes.json index d7845090b..9eadf2af2 100644 --- a/modules/account/front/routes.json +++ b/modules/account/front/routes.json @@ -7,31 +7,6 @@ "menus": { "main": [ {"state": "account.index", "icon": "face"}, - {"state": "account.role", "icon": "group"}, - {"state": "account.alias", "icon": "email"}, - {"state": "account.accounts", "icon": "accessibility"}, - {"state": "account.ldap", "icon": "account_tree"}, - {"state": "account.samba", "icon": "preview"}, - {"state": "account.acl", "icon": "check"}, - {"state": "account.connections", "icon": "share"} - ], - "card": [ - {"state": "account.card.basicData", "icon": "settings"}, - {"state": "account.card.roles", "icon": "group"}, - {"state": "account.card.mailForwarding", "icon": "forward"}, - {"state": "account.card.aliases", "icon": "email"}, - {"state": "account.card.privileges", "icon": "badge"}, - {"state": "account.card.log", "icon": "history"} - ], - "role": [ - {"state": "account.role.card.basicData", "icon": "settings"}, - {"state": "account.role.card.subroles", "icon": "groups"}, - {"state": "account.role.card.inherited", "icon": "account_tree"}, - {"state": "account.role.card.log", "icon": "history"} - ], - "alias": [ - {"state": "account.alias.card.basicData", "icon": "settings"}, - {"state": "account.alias.card.users", "icon": "groups"} ] }, "keybindings": [ @@ -50,224 +25,6 @@ "state": "account.index", "component": "vn-user-index", "description": "Users" - }, - { - "url": "/create", - "state": "account.create", - "component": "vn-user-create", - "description": "New user" - }, - { - "url": "/:id", - "state": "account.card", - "component": "vn-user-card", - "abstract": true, - "description": "Detail" - }, - { - "url": "/summary", - "state": "account.card.summary", - "component": "vn-user-summary", - "description": "Summary", - "params": { - "user": "$ctrl.user" - } - }, - { - "url": "/basic-data?emailConfirmed", - "state": "account.card.basicData", - "component": "vn-user-basic-data", - "description": "Basic data", - "params": { - "user": "$ctrl.user" - } - }, - { - "url" : "/log", - "state": "account.card.log", - "component": "vn-user-log", - "description": "Log" - }, - { - "url" : "/log", - "state": "account.role.card.log", - "component": "vn-role-log", - "description": "Log" - }, - { - "url": "/roles", - "state": "account.card.roles", - "component": "vn-user-roles", - "description": "Inherited roles" - }, - { - "url": "/mail-forwarding", - "state": "account.card.mailForwarding", - "component": "vn-user-mail-forwarding", - "description": "Mail forwarding" - }, - { - "url": "/aliases", - "state": "account.card.aliases", - "component": "vn-user-aliases", - "description": "Mail aliases" - }, - { - "url": "/privileges", - "state": "account.card.privileges", - "component": "vn-user-privileges", - "description": "Privileges", - "params": { - "user": "$ctrl.user" - } - }, - { - "url": "/role?q", - "state": "account.role", - "component": "vn-role", - "description": "Roles", - "acl": ["it"] - }, - { - "url": "/create", - "state": "account.role.create", - "component": "vn-role-create", - "description": "New role", - "acl": ["it"] - }, - { - "url": "/:id", - "state": "account.role.card", - "component": "vn-role-card", - "abstract": true, - "description": "Detail" - }, - { - "url": "/summary", - "state": "account.role.card.summary", - "component": "vn-role-summary", - "description": "Summary", - "params": { - "role": "$ctrl.role" - }, - "acl": ["it"] - }, - { - "url": "/basic-data", - "state": "account.role.card.basicData", - "component": "vn-role-basic-data", - "description": "Basic data", - "params": { - "role": "$ctrl.role" - }, - "acl": ["it"] - }, - { - "url": "/subroles", - "state": "account.role.card.subroles", - "component": "vn-role-subroles", - "description": "Subroles", - "acl": ["it"] - }, - { - "url": "/inherited", - "state": "account.role.card.inherited", - "component": "vn-role-inherited", - "description": "Inherited roles", - "acl": ["it"] - }, - { - "url": "/alias?q", - "state": "account.alias", - "component": "vn-alias", - "description": "Mail aliases" - }, - { - "url": "/create", - "state": "account.alias.create", - "component": "vn-alias-create", - "description": "New alias" - }, - { - "url": "/:id", - "state": "account.alias.card", - "component": "vn-alias-card", - "abstract": true, - "description": "Detail" - }, - { - "url": "/summary", - "state": "account.alias.card.summary", - "component": "vn-alias-summary", - "description": "Summary", - "params": { - "alias": "$ctrl.alias" - } - }, - { - "url": "/basic-data", - "state": "account.alias.card.basicData", - "component": "vn-alias-basic-data", - "description": "Basic data", - "params": { - "alias": "$ctrl.alias" - } - }, - { - "url": "/users", - "state": "account.alias.card.users", - "component": "vn-alias-users", - "description": "Users", - "acl": ["it"] - }, - { - "url": "/accounts", - "state": "account.accounts", - "component": "vn-account-accounts", - "description": "Accounts", - "acl": ["sysadmin"] - }, - { - "url": "/ldap", - "state": "account.ldap", - "component": "vn-account-ldap", - "description": "LDAP", - "acl": ["sysadmin"] - }, - { - "url": "/samba", - "state": "account.samba", - "component": "vn-account-samba", - "description": "Samba", - "acl": ["sysadmin"] - }, - { - "url": "/acl?q", - "state": "account.acl", - "component": "vn-acl-component", - "description": "ACLs", - "acl": ["developer"] - }, - { - "url": "/create", - "state": "account.acl.create", - "component": "vn-acl-create", - "description": "New ACL", - "acl": ["developer"] - }, - { - "url": "/:id/edit", - "state": "account.acl.edit", - "component": "vn-acl-create", - "description": "Edit ACL", - "acl": ["developer"] - }, - { - "url": "/connections", - "state": "account.connections", - "component": "vn-connections", - "description": "Connections", - "acl": ["developer"] } ] } diff --git a/modules/account/front/samba/index.html b/modules/account/front/samba/index.html deleted file mode 100644 index 0186cac7c..000000000 --- a/modules/account/front/samba/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/account/front/samba/index.js b/modules/account/front/samba/index.js deleted file mode 100644 index 6a4969893..000000000 --- a/modules/account/front/samba/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - onTestConection() { - this.$http.get(`SambaConfigs/test`) - .then(() => this.vnApp.showSuccess(this.$t('Samba connection established!'))); - } -} - -ngModule.component('vnAccountSamba', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/account/front/samba/locale/es.yml b/modules/account/front/samba/locale/es.yml deleted file mode 100644 index efa3b1597..000000000 --- a/modules/account/front/samba/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Enable synchronization: Habilitar sincronización -Domain controller: Controlador de dominio -AD domain: Dominio AD -AD user: Usuario AD -AD password: Contraseña AD -User DN (without domain part): DN usuarios (sin la parte del dominio) -Verify certificate: Verificar certificado -Test connection: Probar conexión -Samba connection established!: ¡Conexión con Samba establecida! diff --git a/modules/account/front/search-panel/index.html b/modules/account/front/search-panel/index.html deleted file mode 100644 index a539d9657..000000000 --- a/modules/account/front/search-panel/index.html +++ /dev/null @@ -1,31 +0,0 @@ -
-
- - - - - - - - - - - - - - - -
-
diff --git a/modules/account/front/search-panel/index.js b/modules/account/front/search-panel/index.js deleted file mode 100644 index fff3bf7b9..000000000 --- a/modules/account/front/search-panel/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -ngModule.component('vnUserSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html deleted file mode 100644 index 41632aef6..000000000 --- a/modules/account/front/summary/index.html +++ /dev/null @@ -1,40 +0,0 @@ - -
- - - - {{summary.id}} - {{summary.nickname}} -
- - -

- - Basic Data - -

-

- Basic Data -

- - - - - - -
-
-
\ No newline at end of file diff --git a/modules/account/front/summary/index.js b/modules/account/front/summary/index.js deleted file mode 100644 index 53b66dbe2..000000000 --- a/modules/account/front/summary/index.js +++ /dev/null @@ -1,40 +0,0 @@ -import ngModule from '../module'; -import Summary from 'salix/components/summary'; - -class Controller extends Summary { - set user(value) { - this._user = value; - this.$.summary = null; - if (!value) return; - - const filter = { - where: {id: value.id}, - include: { - relation: 'role', - scope: { - fields: ['id', 'name'] - } - } - }; - this.$http.get(`VnUsers/preview`, {filter}) - .then(res => { - const [summary] = res.data; - this.$.summary = summary; - }); - } - get isHr() { - return this.aclService.hasAny(['hr']); - } - - get user() { - return this._user; - } -} - -ngModule.component('vnUserSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - user: '<' - } -}); diff --git a/modules/account/front/user-log/index.html b/modules/account/front/user-log/index.html deleted file mode 100644 index 5a77ed7b9..000000000 --- a/modules/account/front/user-log/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/account/front/user-log/index.js b/modules/account/front/user-log/index.js deleted file mode 100644 index 7cd0bb378..000000000 --- a/modules/account/front/user-log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnUserLog', { - template: require('./index.html'), - controller: Section, -}); From bbe53060886a9f935159f68bee0db0ffb99cf269 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 12 Aug 2024 16:36:43 +0200 Subject: [PATCH 098/250] feat: refs #7524 add default limit --- loopback/common/models/vn-model.js | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 56a4f4dd0..a11bed11d 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -5,7 +5,6 @@ const utils = require('loopback/lib/utils'); module.exports = function(Self) { Self.ParameterizedSQL = ParameterizedSQL; - let isSelect; require('../methods/vn-model/getSetValues')(Self); require('../methods/vn-model/getEnumValues')(Self); @@ -28,7 +27,9 @@ module.exports = function(Self) { }; }); - this.beforeRemote('find', async ctx => { + this.beforeRemote('**', async ctx => { + if (!this.hasFilter(ctx)) return; + const defaultLimit = this.app.orm.selectLimit; const filter = ctx.args.filter || {limit: defaultLimit}; @@ -38,22 +39,10 @@ module.exports = function(Self) { } }); - this.afterRemote('find', async({result}) => { - const length = Array.isArray(result) ? result.length : result ? 1 : 0; - if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); - }); + this.afterRemote('**', async ctx => { + if (!this.hasFilter(ctx)) return; - this.beforeRemote('filter', async ctx => { - const defaultLimit = this.app.orm.selectLimit; - const filter = ctx.args.filter || {limit: defaultLimit}; - - if (filter.limit > defaultLimit) { - filter.limit = defaultLimit; - ctx.args.filter = filter; - } - }); - - this.afterRemote('filter', async({result}) => { + const {result} = ctx; const length = Array.isArray(result) ? result.length : result ? 1 : 0; if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); }); @@ -357,6 +346,12 @@ module.exports = function(Self) { checkInsertAcls(ctx) { return this.checkAcls(ctx, 'insert'); + }, + + hasFilter(ctx) { + return ctx.req.method.toUpperCase() === 'GET' && + ctx.method.accepts.some(x => x.arg === 'filter' && x.type.toLowerCase() === 'object'); } + }); }; From 61d6efaea7f7b261b58b7a0ec7642877715c9ba7 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 09:53:05 +0200 Subject: [PATCH 099/250] refactor: refs #7798 Drop bi.Greuges_comercial_detail --- db/versions/11185-maroonArborvitae/00-firstScript.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/versions/11185-maroonArborvitae/00-firstScript.sql diff --git a/db/versions/11185-maroonArborvitae/00-firstScript.sql b/db/versions/11185-maroonArborvitae/00-firstScript.sql new file mode 100644 index 000000000..b07126e71 --- /dev/null +++ b/db/versions/11185-maroonArborvitae/00-firstScript.sql @@ -0,0 +1 @@ +DROP TABLE bi.Greuges_comercial_detail; \ No newline at end of file From a733560649668beb014784dbbeb98d7639bb1b84 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 10:26:36 +0200 Subject: [PATCH 100/250] feat: refs #7323 add locale --- modules/worker/back/locale/worker-time-control/en.yml | 7 +++++++ modules/worker/back/locale/worker-time-control/es.yml | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 modules/worker/back/locale/worker-time-control/en.yml create mode 100644 modules/worker/back/locale/worker-time-control/es.yml diff --git a/modules/worker/back/locale/worker-time-control/en.yml b/modules/worker/back/locale/worker-time-control/en.yml new file mode 100644 index 000000000..f1de66474 --- /dev/null +++ b/modules/worker/back/locale/worker-time-control/en.yml @@ -0,0 +1,7 @@ +name: time control +columns: + direction: direction + isSendMail: sent mail + logExclude: excluded log + manual: manual + timed: timed diff --git a/modules/worker/back/locale/worker-time-control/es.yml b/modules/worker/back/locale/worker-time-control/es.yml new file mode 100644 index 000000000..1739c487c --- /dev/null +++ b/modules/worker/back/locale/worker-time-control/es.yml @@ -0,0 +1,7 @@ +name: control horario +columns: + direction: dirección + isSendMail: correo enviado + logExclude: registro excluido + manual: manual + timed: fichada \ No newline at end of file From 32d5ca0d5c3324d0e779239555ec5418f230962e Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 13 Aug 2024 11:37:08 +0200 Subject: [PATCH 101/250] fix: refs #6861 refs#6861 bySectorCollection --- .../vn/procedures/itemShelvingSale_addBySectorCollection.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql index c359c7c8d..26e661d9a 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql @@ -12,7 +12,7 @@ BEGIN DECLARE vSaleFk INT; DECLARE vSectorFk INT; DECLARE vSales CURSOR FOR - SELECT s.id + SELECT DISTINCT s.id FROM sectorCollectionSaleGroup sc JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk JOIN sale s ON sg.saleFk = s.id From d9f64dea086e56a5b897b16738a46b09646cbd69 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 12:15:30 +0200 Subject: [PATCH 102/250] fix: refs #7713 ACL Log --- db/routines/salix/triggers/ACL_afterDelete.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/salix/triggers/ACL_afterDelete.sql b/db/routines/salix/triggers/ACL_afterDelete.sql index 18689dfb0..b7e6071fc 100644 --- a/db/routines/salix/triggers/ACL_afterDelete.sql +++ b/db/routines/salix/triggers/ACL_afterDelete.sql @@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_afterDelete` AFTER DELETE ON `ACL` FOR EACH ROW BEGIN - INSERT INTO ACL + INSERT INTO ACLLog SET `action` = 'delete', `changedModel` = 'Acl', `changedModelId` = OLD.id, From 38cf5af23ee3061f0fe935e065aa469ea46388bd Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 12:21:03 +0200 Subject: [PATCH 103/250] feat: refs #7842 Added editorFk in vn.host --- db/routines/vn/triggers/host_beforeInsert.sql | 8 ++++++++ db/routines/vn/triggers/host_beforeUpdate.sql | 1 + db/versions/11187-yellowErica/00-firstScript.sql | 1 + 3 files changed, 10 insertions(+) create mode 100644 db/routines/vn/triggers/host_beforeInsert.sql create mode 100644 db/versions/11187-yellowErica/00-firstScript.sql diff --git a/db/routines/vn/triggers/host_beforeInsert.sql b/db/routines/vn/triggers/host_beforeInsert.sql new file mode 100644 index 000000000..c2cb82334 --- /dev/null +++ b/db/routines/vn/triggers/host_beforeInsert.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert` + BEFORE INSERT ON `host` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/host_beforeUpdate.sql b/db/routines/vn/triggers/host_beforeUpdate.sql index 0b0962e86..dc5a18f3c 100644 --- a/db/routines/vn/triggers/host_beforeUpdate.sql +++ b/db/routines/vn/triggers/host_beforeUpdate.sql @@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate` FOR EACH ROW BEGIN SET new.updated = util.VN_NOW(); + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/versions/11187-yellowErica/00-firstScript.sql b/db/versions/11187-yellowErica/00-firstScript.sql new file mode 100644 index 000000000..fb75b1f2f --- /dev/null +++ b/db/versions/11187-yellowErica/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.host ADD editorFk int(10) unsigned DEFAULT NULL NULL; From 360e20545ae927f67b1d6a7e62e2e7d081bf7a9d Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 12:26:01 +0200 Subject: [PATCH 104/250] feat: refs #7799 Added Fk in vn.item.itemPackingTypeFk --- db/versions/11189-purplePaniculata/00-firstScript.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 db/versions/11189-purplePaniculata/00-firstScript.sql diff --git a/db/versions/11189-purplePaniculata/00-firstScript.sql b/db/versions/11189-purplePaniculata/00-firstScript.sql new file mode 100644 index 000000000..3319bd154 --- /dev/null +++ b/db/versions/11189-purplePaniculata/00-firstScript.sql @@ -0,0 +1,3 @@ +ALTER TABLE vn.item + ADD CONSTRAINT item_itemPackingType_FK FOREIGN KEY (itemPackingTypeFk) + REFERENCES vn.itemPackingType(code) ON DELETE RESTRICT ON UPDATE CASCADE; From 22ee4f18539bd5af31c5a1da49396ec5266472d7 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 13 Aug 2024 12:30:12 +0200 Subject: [PATCH 105/250] refactor: refs #7848 adapt to lilium --- back/models/vn-user.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/back/models/vn-user.js b/back/models/vn-user.js index 6ec5642a2..531561e04 100644 --- a/back/models/vn-user.js +++ b/back/models/vn-user.js @@ -101,9 +101,10 @@ module.exports = function(Self) { const headers = httpRequest.headers; const origin = headers.origin; - const defaultHash = '/reset-password?access_token=$token$'; + const defaultHash = '!/reset-password?access_token=$token$'; const recoverHashes = { - hedera: 'verificationToken=$token$' + hedera: '!verificationToken=$token$', + lilium: '/resetPassword?access_token=$token$' }; const app = info.options?.app; @@ -115,7 +116,7 @@ module.exports = function(Self) { const params = { recipient: info.email, lang: user.lang, - url: origin + '/#!' + recoverHash + url: origin + '/#' + recoverHash }; const options = Object.assign({}, info.options); From ef1b4ef0a4a01558fc9047edd475f732fe426b24 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 13 Aug 2024 12:30:37 +0200 Subject: [PATCH 106/250] feat(update-user): refs #7848 add twoFactor --- back/methods/vn-user/update-user.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/back/methods/vn-user/update-user.js b/back/methods/vn-user/update-user.js index ddaae8548..202b01c65 100644 --- a/back/methods/vn-user/update-user.js +++ b/back/methods/vn-user/update-user.js @@ -24,6 +24,10 @@ module.exports = Self => { arg: 'lang', type: 'string', description: 'The user lang' + }, { + arg: 'twoFactor', + type: 'string', + description: 'The user twoFactor' } ], http: { @@ -32,8 +36,8 @@ module.exports = Self => { } }); - Self.updateUser = async(ctx, id, name, nickname, email, lang) => { + Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => { await Self.userSecurity(ctx, id); - await Self.upsertWithWhere({id}, {name, nickname, email, lang}); + await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor}); }; }; From a178c285c06f154ee3c0698f0a2e4d6db54eb09c Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 13 Aug 2024 10:44:54 +0000 Subject: [PATCH 107/250] fix(salix): #7867 avoid deactivate user when is supplier --- db/routines/vn/procedures/client_userDisable.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql index f2ba65c1c..da3c0efa1 100644 --- a/db/routines/vn/procedures/client_userDisable.sql +++ b/db/routines/vn/procedures/client_userDisable.sql @@ -21,6 +21,9 @@ BEGIN AND a.id IS NULL AND u.active AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH + AND u.role NOT IN ( + SELECT id FROM `role` r WHERE r.name = 'supplier' + ) AND u.id NOT IN ( SELECT DISTINCT c.id FROM client c From dd5845abae6557774cc70a015e3e67ef23579006 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 12:49:56 +0200 Subject: [PATCH 108/250] fix: refs #7800 tpvMerchantEnable PRIMARY KEY --- db/versions/11190-blueLaurel/00-firstScript.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/versions/11190-blueLaurel/00-firstScript.sql diff --git a/db/versions/11190-blueLaurel/00-firstScript.sql b/db/versions/11190-blueLaurel/00-firstScript.sql new file mode 100644 index 000000000..484b77ad8 --- /dev/null +++ b/db/versions/11190-blueLaurel/00-firstScript.sql @@ -0,0 +1,6 @@ +ALTER TABLE hedera.tpvMerchantEnable DROP FOREIGN KEY tpvMerchantEnable_ibfk_1; +ALTER TABLE hedera.tpvMerchantEnable DROP PRIMARY KEY; +ALTER TABLE hedera.tpvMerchantEnable + ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk); +ALTER TABLE hedera.tpvMerchantEnable + ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK FOREIGN KEY (merchantFk) REFERENCES hedera.tpvMerchant(id) ON DELETE RESTRICT ON UPDATE CASCADE; From 68ee5e3549a55b7ec8d48a859d9533ef3377631b Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Aug 2024 12:52:39 +0200 Subject: [PATCH 109/250] fix: refs #7800 tpvMerchantEnable PRIMARY KEY --- db/versions/11190-blueLaurel/00-firstScript.sql | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/db/versions/11190-blueLaurel/00-firstScript.sql b/db/versions/11190-blueLaurel/00-firstScript.sql index 484b77ad8..75e3f8e59 100644 --- a/db/versions/11190-blueLaurel/00-firstScript.sql +++ b/db/versions/11190-blueLaurel/00-firstScript.sql @@ -1,6 +1,9 @@ -ALTER TABLE hedera.tpvMerchantEnable DROP FOREIGN KEY tpvMerchantEnable_ibfk_1; -ALTER TABLE hedera.tpvMerchantEnable DROP PRIMARY KEY; ALTER TABLE hedera.tpvMerchantEnable - ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk); -ALTER TABLE hedera.tpvMerchantEnable - ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK FOREIGN KEY (merchantFk) REFERENCES hedera.tpvMerchant(id) ON DELETE RESTRICT ON UPDATE CASCADE; + DROP FOREIGN KEY tpvMerchantEnable_ibfk_1, + DROP PRIMARY KEY, + ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk), + ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK + FOREIGN KEY (merchantFk) + REFERENCES hedera.tpvMerchant(id) + ON DELETE RESTRICT + ON UPDATE CASCADE; From befcf895342d6d8f57eb3bda53f0d2af9434e9ce Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 13 Aug 2024 11:18:23 +0000 Subject: [PATCH 110/250] fix(salix): #7867 apply SQL conventions --- db/routines/vn/procedures/client_userDisable.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql index da3c0efa1..779ffd688 100644 --- a/db/routines/vn/procedures/client_userDisable.sql +++ b/db/routines/vn/procedures/client_userDisable.sql @@ -21,9 +21,7 @@ BEGIN AND a.id IS NULL AND u.active AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH - AND u.role NOT IN ( - SELECT id FROM `role` r WHERE r.name = 'supplier' - ) + AND NOT u.role = (SELECT id FROM `role` WHERE name = 'supplier') AND u.id NOT IN ( SELECT DISTINCT c.id FROM client c From cf39e944f0802b3d5db5bc2e8ad8fad35b595a11 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 14 Aug 2024 11:00:17 +0200 Subject: [PATCH 111/250] feat: refs #7323 redirect to lilium --- front/salix/components/user-popover/index.html | 2 +- front/salix/components/user-popover/index.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/front/salix/components/user-popover/index.html b/front/salix/components/user-popover/index.html index 06a4af1e0..cedb3383b 100644 --- a/front/salix/components/user-popover/index.html +++ b/front/salix/components/user-popover/index.html @@ -38,7 +38,7 @@ My account diff --git a/front/salix/components/user-popover/index.js b/front/salix/components/user-popover/index.js index 1d88137ff..72cb734e9 100644 --- a/front/salix/components/user-popover/index.js +++ b/front/salix/components/user-popover/index.js @@ -82,6 +82,9 @@ class Controller { ? {id: $search} : {bank: {like: '%' + $search + '%'}}; } + async redirect(id) { + window.location.href = await this.vnConfig.vnApp.getUrl(`worker/${id}`); + } } Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken']; From 79923cc1d380592a56f9f5ee1fec8da80135a5c6 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 14 Aug 2024 12:20:02 +0200 Subject: [PATCH 112/250] feat: refs #6900 drop section --- e2e/paths/09-invoice-in/01_summary.spec.js | 28 -- e2e/paths/09-invoice-in/02_descriptor.spec.js | 52 --- e2e/paths/09-invoice-in/03_basic_data.spec.js | 196 ----------- e2e/paths/09-invoice-in/04_tax.spec.js | 59 ---- e2e/paths/09-invoice-in/05_serial.spec.js | 48 --- modules/invoiceIn/front/basic-data/index.html | 315 ------------------ modules/invoiceIn/front/basic-data/index.js | 187 ----------- .../invoiceIn/front/basic-data/index.spec.js | 102 ------ .../invoiceIn/front/basic-data/locale/en.yml | 1 - .../invoiceIn/front/basic-data/locale/es.yml | 15 - modules/invoiceIn/front/create/index.html | 55 --- modules/invoiceIn/front/create/index.js | 30 -- modules/invoiceIn/front/create/locale/es.yml | 1 - modules/invoiceIn/front/dueDay/index.html | 71 ---- modules/invoiceIn/front/dueDay/index.js | 37 -- modules/invoiceIn/front/dueDay/index.spec.js | 44 --- modules/invoiceIn/front/index.js | 10 - modules/invoiceIn/front/index/index.html | 82 ----- modules/invoiceIn/front/index/index.js | 58 ---- modules/invoiceIn/front/index/locale/es.yml | 6 - modules/invoiceIn/front/intrastat/index.html | 100 ------ modules/invoiceIn/front/intrastat/index.js | 60 ---- .../invoiceIn/front/intrastat/index.spec.js | 85 ----- modules/invoiceIn/front/log/index.html | 1 - modules/invoiceIn/front/log/index.js | 7 - modules/invoiceIn/front/main/index.html | 18 - modules/invoiceIn/front/main/index.js | 11 +- .../invoiceIn/front/search-panel/index.html | 97 ------ modules/invoiceIn/front/search-panel/index.js | 7 - .../front/search-panel/locale/es.yml | 2 - .../front/serial-search-panel/index.html | 27 -- .../front/serial-search-panel/index.js | 44 --- .../front/serial-search-panel/index.spec.js | 43 --- .../front/serial-search-panel/style.scss | 24 -- modules/invoiceIn/front/serial/index.html | 40 --- modules/invoiceIn/front/serial/index.js | 22 -- modules/invoiceIn/front/serial/locale/es.yml | 3 - modules/invoiceIn/front/tax/index.html | 149 --------- modules/invoiceIn/front/tax/index.js | 66 ---- modules/invoiceIn/front/tax/index.spec.js | 113 ------- modules/invoiceIn/front/tax/locale/es.yml | 7 - 41 files changed, 10 insertions(+), 2313 deletions(-) delete mode 100644 e2e/paths/09-invoice-in/01_summary.spec.js delete mode 100644 e2e/paths/09-invoice-in/02_descriptor.spec.js delete mode 100644 e2e/paths/09-invoice-in/03_basic_data.spec.js delete mode 100644 e2e/paths/09-invoice-in/04_tax.spec.js delete mode 100644 e2e/paths/09-invoice-in/05_serial.spec.js delete mode 100644 modules/invoiceIn/front/basic-data/index.html delete mode 100644 modules/invoiceIn/front/basic-data/index.js delete mode 100644 modules/invoiceIn/front/basic-data/index.spec.js delete mode 100644 modules/invoiceIn/front/basic-data/locale/en.yml delete mode 100644 modules/invoiceIn/front/basic-data/locale/es.yml delete mode 100644 modules/invoiceIn/front/create/index.html delete mode 100644 modules/invoiceIn/front/create/index.js delete mode 100644 modules/invoiceIn/front/create/locale/es.yml delete mode 100644 modules/invoiceIn/front/dueDay/index.html delete mode 100644 modules/invoiceIn/front/dueDay/index.js delete mode 100644 modules/invoiceIn/front/dueDay/index.spec.js delete mode 100644 modules/invoiceIn/front/index/index.html delete mode 100644 modules/invoiceIn/front/index/index.js delete mode 100644 modules/invoiceIn/front/index/locale/es.yml delete mode 100644 modules/invoiceIn/front/intrastat/index.html delete mode 100644 modules/invoiceIn/front/intrastat/index.js delete mode 100644 modules/invoiceIn/front/intrastat/index.spec.js delete mode 100644 modules/invoiceIn/front/log/index.html delete mode 100644 modules/invoiceIn/front/log/index.js delete mode 100644 modules/invoiceIn/front/search-panel/index.html delete mode 100644 modules/invoiceIn/front/search-panel/index.js delete mode 100644 modules/invoiceIn/front/search-panel/locale/es.yml delete mode 100644 modules/invoiceIn/front/serial-search-panel/index.html delete mode 100644 modules/invoiceIn/front/serial-search-panel/index.js delete mode 100644 modules/invoiceIn/front/serial-search-panel/index.spec.js delete mode 100644 modules/invoiceIn/front/serial-search-panel/style.scss delete mode 100644 modules/invoiceIn/front/serial/index.html delete mode 100644 modules/invoiceIn/front/serial/index.js delete mode 100644 modules/invoiceIn/front/serial/locale/es.yml delete mode 100644 modules/invoiceIn/front/tax/index.html delete mode 100644 modules/invoiceIn/front/tax/index.js delete mode 100644 modules/invoiceIn/front/tax/index.spec.js delete mode 100644 modules/invoiceIn/front/tax/locale/es.yml diff --git a/e2e/paths/09-invoice-in/01_summary.spec.js b/e2e/paths/09-invoice-in/01_summary.spec.js deleted file mode 100644 index d5932efd0..000000000 --- a/e2e/paths/09-invoice-in/01_summary.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceIn summary path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceIn'); - await page.accessToSearchResult('1'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the summary section', async() => { - await page.waitForState('invoiceIn.card.summary'); - }); - - it('should contain some basic data from the invoice', async() => { - const result = await page.waitToGetProperty(selectors.invoiceInSummary.supplierRef, 'innerText'); - - expect(result).toEqual('1234'); - }); -}); diff --git a/e2e/paths/09-invoice-in/02_descriptor.spec.js b/e2e/paths/09-invoice-in/02_descriptor.spec.js deleted file mode 100644 index 02bbce7ac..000000000 --- a/e2e/paths/09-invoice-in/02_descriptor.spec.js +++ /dev/null @@ -1,52 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceIn descriptor path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceIn'); - await page.accessToSearchResult('10'); - await page.accessToSection('invoiceIn.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should clone the invoiceIn using the descriptor more menu', async() => { - await page.waitToClick(selectors.invoiceInDescriptor.moreMenu); - await page.waitToClick(selectors.invoiceInDescriptor.moreMenuCloneInvoiceIn); - await page.waitToClick(selectors.invoiceInDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('InvoiceIn cloned'); - }); - - it('should have been redirected to the created invoiceIn summary', async() => { - await page.waitForState('invoiceIn.card.summary'); - }); - - it('should delete the cloned invoiceIn using the descriptor more menu', async() => { - await page.waitToClick(selectors.invoiceInDescriptor.moreMenu); - await page.waitToClick(selectors.invoiceInDescriptor.moreMenuDeleteInvoiceIn); - await page.waitToClick(selectors.invoiceInDescriptor.acceptButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('InvoiceIn deleted'); - }); - - it('should have been relocated to the invoiceOut index', async() => { - await page.waitForState('invoiceIn.index'); - }); - - it(`should search for the deleted invouceOut to find no results`, async() => { - await page.doSearch('10'); - const nResults = await page.countElement(selectors.invoiceOutIndex.searchResult); - - expect(nResults).toEqual(0); - }); -}); diff --git a/e2e/paths/09-invoice-in/03_basic_data.spec.js b/e2e/paths/09-invoice-in/03_basic_data.spec.js deleted file mode 100644 index 50fe18830..000000000 --- a/e2e/paths/09-invoice-in/03_basic_data.spec.js +++ /dev/null @@ -1,196 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceIn basic data path', () => { - let browser; - let page; - let newDms; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceIn'); - await page.accessToSearchResult('1'); - await page.accessToSection('invoiceIn.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should edit the invoiceIn basic data`, async() => { - const now = Date.vnNew(); - await page.pickDate(selectors.invoiceInBasicData.issued, now); - await page.pickDate(selectors.invoiceInBasicData.operated, now); - await page.autocompleteSearch(selectors.invoiceInBasicData.supplier, 'Verdnatura'); - await page.clearInput(selectors.invoiceInBasicData.supplierRef); - await page.write(selectors.invoiceInBasicData.supplierRef, '9999'); - await page.clearInput(selectors.invoiceInBasicData.dms); - await page.write(selectors.invoiceInBasicData.dms, '2'); - await page.pickDate(selectors.invoiceInBasicData.bookEntried, now); - await page.pickDate(selectors.invoiceInBasicData.booked, now); - await page.autocompleteSearch(selectors.invoiceInBasicData.currency, 'USD'); - await page.autocompleteSearch(selectors.invoiceInBasicData.company, 'ORN'); - await page.waitToClick(selectors.invoiceInBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should confirm the invoiceIn supplier was edited`, async() => { - await page.reloadSection('invoiceIn.card.basicData'); - const result = await page.waitToGetProperty(selectors.invoiceInBasicData.supplier, 'value'); - - expect(result).toContain('Verdnatura'); - }); - - it(`should confirm the invoiceIn supplierRef was edited`, async() => { - const result = await page - .waitToGetProperty(selectors.invoiceInBasicData.supplierRef, 'value'); - - expect(result).toEqual('9999'); - }); - - it(`should confirm the invoiceIn currency was edited`, async() => { - const result = await page - .waitToGetProperty(selectors.invoiceInBasicData.currency, 'value'); - - expect(result).toEqual('USD'); - }); - - it(`should confirm the invoiceIn company was edited`, async() => { - const result = await page - .waitToGetProperty(selectors.invoiceInBasicData.company, 'value'); - - expect(result).toEqual('ORN'); - }); - - it(`should confirm the invoiceIn dms was edited`, async() => { - const result = await page - .waitToGetProperty(selectors.invoiceInBasicData.dms, 'value'); - - expect(result).toEqual('2'); - }); - - it(`should create a new invoiceIn dms and save the changes`, async() => { - await page.clearInput(selectors.invoiceInBasicData.dms); - await page.waitToClick(selectors.invoiceInBasicData.create); - - await page.clearInput(selectors.invoiceInBasicData.reference); - await page.write(selectors.invoiceInBasicData.reference, 'New Dms'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - let message = await page.waitForSnackbar(); - - await page.clearInput(selectors.invoiceInBasicData.companyId); - await page.autocompleteSearch(selectors.invoiceInBasicData.companyId, 'VNL'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - message = await page.waitForSnackbar(); - - await page.clearInput(selectors.invoiceInBasicData.warehouseId); - await page.autocompleteSearch(selectors.invoiceInBasicData.warehouseId, 'Warehouse One'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - message = await page.waitForSnackbar(); - - await page.clearInput(selectors.invoiceInBasicData.dmsTypeId); - await page.autocompleteSearch(selectors.invoiceInBasicData.dmsTypeId, 'Ticket'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - message = await page.waitForSnackbar(); - - await page.waitToClick(selectors.invoiceInBasicData.description); - await page.write(selectors.invoiceInBasicData.description, 'Dms without edition.'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - message = await page.waitForSnackbar(); - - expect(message.text).toContain('The files can\'t be empty'); - - let currentDir = process.cwd(); - let filePath = `${currentDir}/e2e/assets/thermograph.jpeg`; - - const [fileChooser] = await Promise.all([ - page.waitForFileChooser(), - page.waitToClick(selectors.invoiceInBasicData.inputFile) - ]); - await fileChooser.accept([filePath]); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - - newDms = await page - .waitToGetProperty(selectors.invoiceInBasicData.dms, 'value'); - }); - - it(`should confirm the invoiceIn was edited with the new dms`, async() => { - await page.reloadSection('invoiceIn.card.basicData'); - const result = await page - .waitToGetProperty(selectors.invoiceInBasicData.dms, 'value'); - - expect(result).toEqual(newDms); - }); - - it(`should edit the invoiceIn`, async() => { - await page.waitToClick(selectors.invoiceInBasicData.edit); - - await page.clearInput(selectors.invoiceInBasicData.reference); - await page.write(selectors.invoiceInBasicData.reference, 'Dms Edited'); - await page.clearInput(selectors.invoiceInBasicData.companyId); - await page.autocompleteSearch(selectors.invoiceInBasicData.companyId, 'CCs'); - await page.clearInput(selectors.invoiceInBasicData.warehouseId); - await page.autocompleteSearch(selectors.invoiceInBasicData.warehouseId, 'Algemesi'); - await page.clearInput(selectors.invoiceInBasicData.dmsTypeId); - await page.autocompleteSearch(selectors.invoiceInBasicData.dmsTypeId, 'Basura'); - await page.waitToClick(selectors.invoiceInBasicData.description); - await page.write(selectors.invoiceInBasicData.description, ' Nevermind, now is edited.'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - let message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should confirm the new dms has been edited`, async() => { - await page.reloadSection('invoiceIn.card.basicData'); - await page.waitToClick(selectors.invoiceInBasicData.edit); - - const reference = await page - .waitToGetProperty(selectors.invoiceInBasicData.reference, 'value'); - const companyId = await page - .waitToGetProperty(selectors.invoiceInBasicData.companyId, 'value'); - const warehouseId = await page - .waitToGetProperty(selectors.invoiceInBasicData.warehouseId, 'value'); - const dmsTypeId = await page - .waitToGetProperty(selectors.invoiceInBasicData.dmsTypeId, 'value'); - const description = await page - .waitToGetProperty(selectors.invoiceInBasicData.description, 'value'); - - expect(reference).toEqual('Dms Edited'); - expect(companyId).toEqual('CCs'); - expect(warehouseId).toEqual('Algemesi'); - expect(dmsTypeId).toEqual('Basura'); - expect(description).toEqual('Dms without edition. Nevermind, now is edited.'); - - await page.waitToClick(selectors.invoiceInBasicData.confirm); - }); - - it(`should disable edit and download if dms doesn't exists, and set back the original dms`, async() => { - await page.clearInput(selectors.invoiceInBasicData.dms); - await page.write(selectors.invoiceInBasicData.dms, '9999'); - - await page.waitForSelector(`${selectors.invoiceInBasicData.download}.disabled`); - await page.waitForSelector(`${selectors.invoiceInBasicData.edit}.disabled`); - - await page.clearInput(selectors.invoiceInBasicData.dms); - await page.write(selectors.invoiceInBasicData.dms, '1'); - - await page.waitToClick(selectors.invoiceInBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/09-invoice-in/04_tax.spec.js b/e2e/paths/09-invoice-in/04_tax.spec.js deleted file mode 100644 index d51c39048..000000000 --- a/e2e/paths/09-invoice-in/04_tax.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceIn tax path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('developer', 'invoiceIn'); - await page.accessToSearchResult('2'); - await page.accessToSection('invoiceIn.card.tax'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should add a new tax and check it', async() => { - await page.waitToClick(selectors.invoiceInTax.addTaxButton); - await page.autocompleteSearch(selectors.invoiceInTax.thirdExpense, '6210000567'); - await page.write(selectors.invoiceInTax.thirdTaxableBase, '100'); - await page.autocompleteSearch(selectors.invoiceInTax.thirdTaxType, 'H.P. IVA'); - await page.autocompleteSearch(selectors.invoiceInTax.thirdTransactionType, 'Operaciones exentas'); - await page.waitToClick(selectors.invoiceInTax.saveButton); - const message = await page.waitForSnackbar(); - - await page.waitToClick(selectors.invoiceInDescriptor.summaryIcon); - await page.waitForState('invoiceIn.card.summary'); - const total = await page.waitToGetProperty(selectors.invoiceInSummary.totalTaxableBase, 'innerText'); - - await page.accessToSection('invoiceIn.card.tax'); - - const thirdExpense = await page.waitToGetProperty(selectors.invoiceInTax.thirdExpense, 'value'); - const thirdTaxableBase = await page.waitToGetProperty(selectors.invoiceInTax.thirdTaxableBase, 'value'); - const thirdTaxType = await page.waitToGetProperty(selectors.invoiceInTax.thirdTaxType, 'value'); - const thirdTransactionType = await page.waitToGetProperty(selectors.invoiceInTax.thirdTransactionType, 'value'); - const thirdRate = await page.waitToGetProperty(selectors.invoiceInTax.thirdRate, 'value'); - - expect(message.text).toContain('Data saved!'); - - expect(total).toEqual('Taxable base €1,323.16'); - - expect(thirdExpense).toEqual('6210000567'); - expect(thirdTaxableBase).toEqual('100'); - expect(thirdTaxType).toEqual('H.P. IVA 4% CEE'); - expect(thirdTransactionType).toEqual('Operaciones exentas'); - expect(thirdRate).toEqual('€4.00'); - }); - - it('should delete the added line', async() => { - await page.waitToClick(selectors.invoiceInTax.thirdDeleteButton); - await page.waitToClick(selectors.invoiceInTax.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); -}); diff --git a/e2e/paths/09-invoice-in/05_serial.spec.js b/e2e/paths/09-invoice-in/05_serial.spec.js deleted file mode 100644 index 8be5660da..000000000 --- a/e2e/paths/09-invoice-in/05_serial.spec.js +++ /dev/null @@ -1,48 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('InvoiceIn serial path', () => { - let browser; - let page; - let httpRequest; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('administrative', 'invoiceIn'); - await page.accessToSection('invoiceIn.serial'); - page.on('request', req => { - if (req.url().includes(`InvoiceIns/getSerial`)) - httpRequest = req.url(); - }); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should check that passes the correct params to back', async() => { - await page.overwrite(selectors.invoiceInSerial.daysAgo, '30'); - await page.keyboard.press('Enter'); - - expect(httpRequest).toContain('daysAgo=30'); - - await page.overwrite(selectors.invoiceInSerial.serial, 'R'); - await page.keyboard.press('Enter'); - - expect(httpRequest).toContain('serial=R'); - await page.click(selectors.invoiceInSerial.chip); - }); - - it('should go to index and check if the search-panel has the correct params', async() => { - await page.waitToClick(selectors.invoiceInSerial.goToIndex); - const params = await page.$$(selectors.invoiceInIndex.topbarSearchParams); - const serial = await params[0].getProperty('title'); - const isBooked = await params[1].getProperty('title'); - const from = await params[2].getProperty('title'); - - expect(await serial.jsonValue()).toContain('serial'); - expect(await isBooked.jsonValue()).toContain('not isBooked'); - expect(await from.jsonValue()).toContain('from'); - }); -}); diff --git a/modules/invoiceIn/front/basic-data/index.html b/modules/invoiceIn/front/basic-data/index.html deleted file mode 100644 index fbb9b05a2..000000000 --- a/modules/invoiceIn/front/basic-data/index.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - - -
- - - - - {{::id}} - {{::nickname}} - - - - - - - - - - - - - - - {{id}} - {{name}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/invoiceIn/front/basic-data/index.js b/modules/invoiceIn/front/basic-data/index.js deleted file mode 100644 index 246f1b16f..000000000 --- a/modules/invoiceIn/front/basic-data/index.js +++ /dev/null @@ -1,187 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import UserError from 'core/lib/user-error'; - -class Controller extends Section { - constructor($element, $, vnFile) { - super($element, $, vnFile); - this.dms = { - files: [], - hasFile: false, - hasFileAttached: false - }; - this.vnFile = vnFile; - this.getAllowedContentTypes(); - this._editDownloadDisabled = false; - } - - get contentTypesInfo() { - return this.$t('ContentTypesInfo', { - allowedContentTypes: this.allowedContentTypes - }); - } - - get editDownloadDisabled() { - return this._editDownloadDisabled; - } - - async checkFileExists(dmsId) { - if (!dmsId) return; - let filter = { - fields: ['id'] - }; - await this.$http.get(`Dms/${dmsId}`, {filter}) - .then(() => this._editDownloadDisabled = false) - .catch(() => this._editDownloadDisabled = true); - } - - async getFile(dmsId) { - const path = `Dms/${dmsId}`; - await this.$http.get(path).then(res => { - const dms = res.data && res.data; - this.dms = { - dmsId: dms.id, - reference: dms.reference, - warehouseId: dms.warehouseFk, - companyId: dms.companyFk, - dmsTypeId: dms.dmsTypeFk, - description: dms.description, - hasFile: dms.hasFile, - hasFileAttached: false, - files: [] - }; - }); - } - - getAllowedContentTypes() { - this.$http.get('DmsContainers/allowedContentTypes').then(res => { - if (res.data.length > 0) { - const contentTypes = res.data.join(', '); - this.allowedContentTypes = contentTypes; - } - }); - } - - openEditDialog(dmsId) { - this.getFile(dmsId).then(() => this.$.dmsEditDialog.show()); - } - - openCreateDialog() { - const params = {filter: { - where: {code: 'invoiceIn'} - }}; - this.$http.get('DmsTypes/findOne', {params}).then(res => { - this.dms = { - reference: this.invoiceIn.supplierRef, - warehouseId: this.vnConfig.warehouseFk, - companyId: this.vnConfig.companyFk, - dmsTypeId: res.data.id, - description: this.invoiceIn.supplier.name, - hasFile: true, - hasFileAttached: true, - files: null - }; - this.$.dmsCreateDialog.show(); - }); - } - - downloadFile(dmsId) { - this.vnFile.download(`api/dms/${dmsId}/downloadFile`); - } - - onFileChange(files) { - let hasFileAttached = false; - if (files.length > 0) - hasFileAttached = true; - - this.$.$applyAsync(() => { - this.dms.hasFileAttached = hasFileAttached; - }); - } - - onEdit() { - if (!this.dms.companyId) - throw new UserError(`The company can't be empty`); - if (!this.dms.warehouseId) - throw new UserError(`The warehouse can't be empty`); - if (!this.dms.dmsTypeId) - throw new UserError(`The DMS Type can't be empty`); - if (!this.dms.description) - throw new UserError(`The description can't be empty`); - - const query = `dms/${this.dms.dmsId}/updateFile`; - const options = { - method: 'POST', - url: query, - params: this.dms, - headers: { - 'Content-Type': undefined - }, - transformRequest: files => { - const formData = new FormData(); - - for (let i = 0; i < files.length; i++) - formData.append(files[i].name, files[i]); - - return formData; - }, - data: this.dms.files - }; - - this.$http(options).then(res => { - if (res) { - this.vnApp.showSuccess(this.$t('Data saved!')); - if (res.data.length > 0) this.invoiceIn.dmsFk = res.data[0].id; - } - }); - } - - onCreate() { - if (!this.dms.companyId) - throw new UserError(`The company can't be empty`); - if (!this.dms.warehouseId) - throw new UserError(`The warehouse can't be empty`); - if (!this.dms.dmsTypeId) - throw new UserError(`The DMS Type can't be empty`); - if (!this.dms.description) - throw new UserError(`The description can't be empty`); - if (!this.dms.files) - throw new UserError(`The files can't be empty`); - - const query = `Dms/uploadFile`; - const options = { - method: 'POST', - url: query, - params: this.dms, - headers: { - 'Content-Type': undefined - }, - transformRequest: files => { - const formData = new FormData(); - - for (let i = 0; i < files.length; i++) - formData.append(files[i].name, files[i]); - - return formData; - }, - data: this.dms.files - }; - - this.$http(options).then(res => { - if (res) { - this.vnApp.showSuccess(this.$t('Data saved!')); - if (res.data.length > 0) this.invoiceIn.dmsFk = res.data[0].id; - } - }); - } -} - -Controller.$inject = ['$element', '$scope', 'vnFile']; - -ngModule.vnComponent('vnInvoiceInBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - invoiceIn: '<' - } -}); diff --git a/modules/invoiceIn/front/basic-data/index.spec.js b/modules/invoiceIn/front/basic-data/index.spec.js deleted file mode 100644 index 98710ac35..000000000 --- a/modules/invoiceIn/front/basic-data/index.spec.js +++ /dev/null @@ -1,102 +0,0 @@ -import './index.js'; -import watcher from 'core/mocks/watcher'; - -describe('InvoiceIn', () => { - describe('Component vnInvoiceInBasicData', () => { - let controller; - let $scope; - let $httpBackend; - let $httpParamSerializer; - - beforeEach(ngModule('invoiceIn')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - const $element = angular.element(''); - controller = $componentController('vnInvoiceInBasicData', {$element, $scope}); - controller.$.watcher = watcher; - $httpBackend.expect('GET', `DmsContainers/allowedContentTypes`).respond({}); - })); - - describe('onFileChange()', () => { - it('should set dms hasFileAttached property to true if has any files', () => { - const files = [{id: 1, name: 'MyFile'}]; - controller.onFileChange(files); - - $scope.$apply(); - - expect(controller.dms.hasFileAttached).toBeTruthy(); - }); - }); - - describe('checkFileExists()', () => { - it(`should return false if a file exists`, () => { - const fileIdExists = 1; - controller.checkFileExists(fileIdExists); - - expect(controller.editDownloadDisabled).toBe(false); - }); - }); - - describe('onEdit()', () => { - it(`should perform a POST query to edit the dms properties`, () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - const dms = { - dmsId: 1, - reference: 'Ref1', - warehouseId: 1, - companyId: 442, - dmsTypeId: 20, - description: 'This is a description', - files: [] - }; - - controller.dms = dms; - const serializedParams = $httpParamSerializer(controller.dms); - const query = `dms/${controller.dms.dmsId}/updateFile?${serializedParams}`; - - $httpBackend.expectPOST(query).respond({}); - controller.onEdit(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('onCreate()', () => { - it(`should perform a POST query to create a new dms`, () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - const dms = { - reference: 'Ref1', - warehouseId: 1, - companyId: 442, - dmsTypeId: 20, - description: 'This is a description', - files: [{ - lastModified: 1668673957761, - lastModifiedDate: Date.vnNew(), - name: 'file-example.png', - size: 19653, - type: 'image/png', - webkitRelativePath: '' - }] - }; - - controller.dms = dms; - const serializedParams = $httpParamSerializer(controller.dms); - const query = `Dms/uploadFile?${serializedParams}`; - - $httpBackend.expectPOST(query).respond({}); - controller.onCreate(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - }); -}); - diff --git a/modules/invoiceIn/front/basic-data/locale/en.yml b/modules/invoiceIn/front/basic-data/locale/en.yml deleted file mode 100644 index 19f4dc8c2..000000000 --- a/modules/invoiceIn/front/basic-data/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -ContentTypesInfo: Allowed file types {{allowedContentTypes}} diff --git a/modules/invoiceIn/front/basic-data/locale/es.yml b/modules/invoiceIn/front/basic-data/locale/es.yml deleted file mode 100644 index e2e494fa5..000000000 --- a/modules/invoiceIn/front/basic-data/locale/es.yml +++ /dev/null @@ -1,15 +0,0 @@ -Upload file: Subir fichero -Edit file: Editar fichero -Upload: Subir -Document: Documento -ContentTypesInfo: "Tipos de archivo permitidos: {{allowedContentTypes}}" -Generate identifier for original file: Generar identificador para archivo original -File management: Gestión documental -Hard copy: Copia -This file will be deleted: Este fichero va a ser borrado -Are you sure?: Estas seguro? -File deleted: Fichero eliminado -Remove file: Eliminar fichero -Download file: Descargar fichero -Edit document: Editar documento -Create document: Crear documento diff --git a/modules/invoiceIn/front/create/index.html b/modules/invoiceIn/front/create/index.html deleted file mode 100644 index 16ecf26cf..000000000 --- a/modules/invoiceIn/front/create/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - -
-
- - - {{id}}: {{nif}}: {{name}} - - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/modules/invoiceIn/front/create/index.js b/modules/invoiceIn/front/create/index.js deleted file mode 100644 index 885d55359..000000000 --- a/modules/invoiceIn/front/create/index.js +++ /dev/null @@ -1,30 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - $onInit() { - this.invoiceIn = {}; - if (this.$params && this.$params.supplierFk) - this.invoiceIn.supplierFk = this.$params.supplierFk; - this.invoiceIn.issued = Date.vnNew(); - } - - get companyFk() { - return this.invoiceIn.companyFk || this.vnConfig.companyFk; - } - - set companyFk(value) { - this.invoiceIn.companyFk = value; - } - - onSubmit() { - this.$.watcher.submit().then( - res => this.$state.go('invoiceIn.card.basicData', {id: res.data.id}) - ); - } -} - -ngModule.vnComponent('vnInvoiceInCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceIn/front/create/locale/es.yml b/modules/invoiceIn/front/create/locale/es.yml deleted file mode 100644 index 35bfe3ca4..000000000 --- a/modules/invoiceIn/front/create/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -a:a \ No newline at end of file diff --git a/modules/invoiceIn/front/dueDay/index.html b/modules/invoiceIn/front/dueDay/index.html deleted file mode 100644 index abc91312d..000000000 --- a/modules/invoiceIn/front/dueDay/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -
- - - - - - {{id}}: {{bank}} - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/modules/invoiceIn/front/dueDay/index.js b/modules/invoiceIn/front/dueDay/index.js deleted file mode 100644 index ee9b13e5c..000000000 --- a/modules/invoiceIn/front/dueDay/index.js +++ /dev/null @@ -1,37 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - add() { - this.$.model.insert({ - dueDated: Date.vnNew(), - bankFk: this.vnConfig.local.bankFk - }); - } - - onSubmit() { - this.$.watcher.check(); - this.$.model.save().then(() => { - this.$.watcher.notifySaved(); - this.$.watcher.updateOriginalData(); - this.card.reload(); - }); - } - - bankSearchFunc($search) { - return /^\d+$/.test($search) - ? {id: $search} - : {bank: {like: '%' + $search + '%'}}; - } -} - -ngModule.vnComponent('vnInvoiceInDueDay', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnInvoiceInCard' - }, - bindings: { - invoiceIn: '<' - } -}); diff --git a/modules/invoiceIn/front/dueDay/index.spec.js b/modules/invoiceIn/front/dueDay/index.spec.js deleted file mode 100644 index 7dddd3bb0..000000000 --- a/modules/invoiceIn/front/dueDay/index.spec.js +++ /dev/null @@ -1,44 +0,0 @@ -import './index.js'; -import watcher from 'core/mocks/watcher'; -import crudModel from 'core/mocks/crud-model'; - -describe('InvoiceIn', () => { - describe('Component due day', () => { - let controller; - let $scope; - let vnApp; - - beforeEach(ngModule('invoiceIn')); - - beforeEach(inject(($componentController, $rootScope, _vnApp_) => { - vnApp = _vnApp_; - jest.spyOn(vnApp, 'showError'); - $scope = $rootScope.$new(); - $scope.model = crudModel; - $scope.watcher = watcher; - - const $element = angular.element(''); - controller = $componentController('vnInvoiceInDueDay', {$element, $scope}); - controller.invoiceIn = {id: 1}; - })); - - describe('onSubmit()', () => { - it('should make HTTP POST request to save due day values', () => { - controller.card = {reload: () => {}}; - jest.spyOn($scope.watcher, 'check'); - jest.spyOn($scope.watcher, 'notifySaved'); - jest.spyOn($scope.watcher, 'updateOriginalData'); - jest.spyOn(controller.card, 'reload'); - jest.spyOn($scope.model, 'save'); - - controller.onSubmit(); - - expect($scope.model.save).toHaveBeenCalledWith(); - expect($scope.watcher.updateOriginalData).toHaveBeenCalledWith(); - expect($scope.watcher.check).toHaveBeenCalledWith(); - expect($scope.watcher.notifySaved).toHaveBeenCalledWith(); - expect(controller.card.reload).toHaveBeenCalledWith(); - }); - }); - }); -}); diff --git a/modules/invoiceIn/front/index.js b/modules/invoiceIn/front/index.js index e257cfee3..8155e7089 100644 --- a/modules/invoiceIn/front/index.js +++ b/modules/invoiceIn/front/index.js @@ -1,17 +1,7 @@ export * from './module'; import './main'; -import './index/'; -import './search-panel'; import './card'; import './descriptor'; import './descriptor-popover'; import './summary'; -import './basic-data'; -import './tax'; -import './dueDay'; -import './intrastat'; -import './create'; -import './log'; -import './serial'; -import './serial-search-panel'; diff --git a/modules/invoiceIn/front/index/index.html b/modules/invoiceIn/front/index/index.html deleted file mode 100644 index 008d615b1..000000000 --- a/modules/invoiceIn/front/index/index.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - ID - Supplier - Supplier ref. - Serial number - Serial - File - Issued - Is booked - AWB - Amount - - - - -
- {{::invoiceIn.id}} - - - {{::invoiceIn.supplierName}} - - - {{::invoiceIn.supplierRef | dashIfEmpty}} - {{::invoiceIn.serialNumber}} - {{::invoiceIn.serial}} - - - {{::invoiceIn.file}} - - - {{::invoiceIn.issued | date:'dd/MM/yyyy' | dashIfEmpty}} - - - - - {{::invoiceIn.awbCode}} - {{::invoiceIn.amount | currency:'EUR'}} - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/invoiceIn/front/index/index.js b/modules/invoiceIn/front/index/index.js deleted file mode 100644 index 254e6d3bf..000000000 --- a/modules/invoiceIn/front/index/index.js +++ /dev/null @@ -1,58 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $, vnFile) { - super($element, $, vnFile); - this.vnFile = vnFile; - } - - exprBuilder(param, value) { - switch (param) { - case 'issued': - return {'ii.issued': { - between: this.dateRange(value)} - }; - case 'id': - case 'supplierFk': - case 'supplierRef': - case 'serialNumber': - case 'serial': - case 'created': - case 'isBooked': - return {[`ii.${param}`]: value}; - case 'account': - case 'fi': - return {[`s.${param}`]: value}; - case 'awbCode': - return {'awb.code': value}; - default: - return {[param]: value}; - } - } - - dateRange(value) { - const minHour = new Date(value); - minHour.setHours(0, 0, 0, 0); - const maxHour = new Date(value); - maxHour.setHours(23, 59, 59, 59); - - return [minHour, maxHour]; - } - - preview(invoiceIn) { - this.selectedInvoiceIn = invoiceIn; - this.$.summary.show(); - } - - downloadFile(dmsId) { - this.vnFile.download(`api/dms/${dmsId}/downloadFile`); - } -} - -Controller.$inject = ['$element', '$scope', 'vnFile']; - -ngModule.vnComponent('vnInvoiceInIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceIn/front/index/locale/es.yml b/modules/invoiceIn/front/index/locale/es.yml deleted file mode 100644 index e1b354316..000000000 --- a/modules/invoiceIn/front/index/locale/es.yml +++ /dev/null @@ -1,6 +0,0 @@ -Created: Fecha creación -Issued: Fecha emisión -Supplier ref.: Ref. proveedor -Serial number: Num. serie -Serial: Serie -Is booked: Conciliada \ No newline at end of file diff --git a/modules/invoiceIn/front/intrastat/index.html b/modules/invoiceIn/front/intrastat/index.html deleted file mode 100644 index b15fdf543..000000000 --- a/modules/invoiceIn/front/intrastat/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - -
- - - - {{id}}: {{description}} - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/modules/invoiceIn/front/intrastat/index.js b/modules/invoiceIn/front/intrastat/index.js deleted file mode 100644 index 659929513..000000000 --- a/modules/invoiceIn/front/intrastat/index.js +++ /dev/null @@ -1,60 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - set invoceInIntrastat(value) { - this._invoceInIntrastat = value; - - if (value) this.calculateTotals(); - } - - get invoceInIntrastat() { - return this._invoceInIntrastat; - } - - calculateTotals() { - this.amountTotal = 0.0; - this.netTotal = 0.0; - this.stemsTotal = 0.0; - if (!this.invoceInIntrastat) return; - - this.invoceInIntrastat.forEach(intrastat => { - this.amountTotal += intrastat.amount; - this.netTotal += intrastat.net; - this.stemsTotal += intrastat.stems; - }); - } - - add() { - this.$.model.insert({}); - } - - deleteIntrastat($index) { - this.$.model.remove($index); - this.$.model.save().then(() => { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.calculateTotals(); - }); - } - - onSubmit() { - this.$.watcher.check(); - this.$.model.save().then(() => { - this.$.watcher.notifySaved(); - this.$.watcher.updateOriginalData(); - this.calculateTotals(); - this.card.reload(); - }); - } -} - -ngModule.vnComponent('vnInvoiceInIntrastat', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnInvoiceInCard' - }, - bindings: { - invoiceIn: '<' - } -}); diff --git a/modules/invoiceIn/front/intrastat/index.spec.js b/modules/invoiceIn/front/intrastat/index.spec.js deleted file mode 100644 index d7d50ac5b..000000000 --- a/modules/invoiceIn/front/intrastat/index.spec.js +++ /dev/null @@ -1,85 +0,0 @@ -import './index.js'; -import watcher from 'core/mocks/watcher'; -import crudModel from 'core/mocks/crud-model'; - -describe('InvoiceIn', () => { - describe('Component intrastat', () => { - let controller; - let $scope; - let vnApp; - - beforeEach(ngModule('invoiceIn')); - - beforeEach(inject(($componentController, $rootScope, _vnApp_) => { - vnApp = _vnApp_; - jest.spyOn(vnApp, 'showError'); - $scope = $rootScope.$new(); - $scope.model = crudModel; - $scope.watcher = watcher; - - const $element = angular.element(''); - controller = $componentController('vnInvoiceInIntrastat', {$element, $scope}); - controller.invoiceIn = {id: 1}; - })); - - describe('calculateTotals()', () => { - it('should set amountTotal, netTotal and stemsTotal to 0 if salesClaimed has no data', () => { - controller.invoceInIntrastat = []; - controller.calculateTotals(); - - expect(controller.amountTotal).toEqual(0); - expect(controller.netTotal).toEqual(0); - expect(controller.stemsTotal).toEqual(0); - }); - - it('should set amountTotal, netTotal and stemsTotal', () => { - controller.invoceInIntrastat = [ - { - id: 1, - invoiceInFk: 1, - net: 30.5, - intrastatFk: 5080000, - amount: 10, - stems: 162, - countryFk: 5, - statisticalValue: 0 - }, - { - id: 2, - invoiceInFk: 1, - net: 10, - intrastatFk: 6021010, - amount: 20, - stems: 205, - countryFk: 5, - statisticalValue: 0 - } - ]; - controller.calculateTotals(); - - expect(controller.amountTotal).toEqual(30); - expect(controller.netTotal).toEqual(40.5); - expect(controller.stemsTotal).toEqual(367); - }); - }); - - describe('onSubmit()', () => { - it('should make HTTP POST request to save intrastat values', () => { - controller.card = {reload: () => {}}; - jest.spyOn($scope.watcher, 'check'); - jest.spyOn($scope.watcher, 'notifySaved'); - jest.spyOn($scope.watcher, 'updateOriginalData'); - jest.spyOn(controller.card, 'reload'); - jest.spyOn($scope.model, 'save'); - - controller.onSubmit(); - - expect($scope.model.save).toHaveBeenCalledWith(); - expect($scope.watcher.updateOriginalData).toHaveBeenCalledWith(); - expect($scope.watcher.check).toHaveBeenCalledWith(); - expect($scope.watcher.notifySaved).toHaveBeenCalledWith(); - expect(controller.card.reload).toHaveBeenCalledWith(); - }); - }); - }); -}); diff --git a/modules/invoiceIn/front/log/index.html b/modules/invoiceIn/front/log/index.html deleted file mode 100644 index 2cfc9dfb1..000000000 --- a/modules/invoiceIn/front/log/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/modules/invoiceIn/front/log/index.js b/modules/invoiceIn/front/log/index.js deleted file mode 100644 index 7a018de0f..000000000 --- a/modules/invoiceIn/front/log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnInvoiceInLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/invoiceIn/front/main/index.html b/modules/invoiceIn/front/main/index.html index 2dc87b2ee..e69de29bb 100644 --- a/modules/invoiceIn/front/main/index.html +++ b/modules/invoiceIn/front/main/index.html @@ -1,18 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/invoiceIn/front/main/index.js b/modules/invoiceIn/front/main/index.js index f7b767458..c22b37924 100644 --- a/modules/invoiceIn/front/main/index.js +++ b/modules/invoiceIn/front/main/index.js @@ -1,7 +1,16 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; -export default class InvoiceIn extends ModuleMain {} +export default class InvoiceIn extends ModuleMain { + constructor($element, $) { + super($element, $); + } + + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`invoice-in/`); + } +} ngModule.vnComponent('vnInvoiceIn', { controller: InvoiceIn, diff --git a/modules/invoiceIn/front/search-panel/index.html b/modules/invoiceIn/front/search-panel/index.html deleted file mode 100644 index 609fa56d8..000000000 --- a/modules/invoiceIn/front/search-panel/index.html +++ /dev/null @@ -1,97 +0,0 @@ -
-
- - - - - - - - - - - - - - {{::id}} - {{::nickname}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/invoiceIn/front/search-panel/index.js b/modules/invoiceIn/front/search-panel/index.js deleted file mode 100644 index a8e41b7ef..000000000 --- a/modules/invoiceIn/front/search-panel/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -ngModule.vnComponent('vnInvoiceInSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/invoiceIn/front/search-panel/locale/es.yml b/modules/invoiceIn/front/search-panel/locale/es.yml deleted file mode 100644 index 57e2944ea..000000000 --- a/modules/invoiceIn/front/search-panel/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Supplier fiscal id: CIF proveedor -Search invoices in by id or supplier fiscal name: Buscar facturas recibidas por id o por nombre fiscal del proveedor \ No newline at end of file diff --git a/modules/invoiceIn/front/serial-search-panel/index.html b/modules/invoiceIn/front/serial-search-panel/index.html deleted file mode 100644 index 0dda54852..000000000 --- a/modules/invoiceIn/front/serial-search-panel/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - -
- - {{$ctrl.$t('Serial')}}: {{$ctrl.filter.serial}} - -
-
diff --git a/modules/invoiceIn/front/serial-search-panel/index.js b/modules/invoiceIn/front/serial-search-panel/index.js deleted file mode 100644 index b11911ee3..000000000 --- a/modules/invoiceIn/front/serial-search-panel/index.js +++ /dev/null @@ -1,44 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; -import './style.scss'; - -class Controller extends SearchPanel { - constructor($element, $) { - super($element, $); - this.filter = {}; - const filter = { - fields: ['daysAgo'] - }; - this.$http.get('InvoiceInConfigs', {filter}).then(res => { - if (res.data) { - this.invoiceInConfig = res.data[0]; - this.addFilters(); - } - }); - } - - removeItemFilter(param) { - this.filter[param] = null; - this.addFilters(); - } - - onKeyPress($event) { - if ($event.key === 'Enter') - this.addFilters(); - } - - addFilters() { - if (!this.filter.daysAgo) - this.filter.daysAgo = this.invoiceInConfig.daysAgo; - - return this.model.addFilter({}, this.filter); - } -} - -ngModule.component('vnInvoiceInSerialSearchPanel', { - template: require('./index.html'), - controller: Controller, - bindings: { - model: '<' - } -}); diff --git a/modules/invoiceIn/front/serial-search-panel/index.spec.js b/modules/invoiceIn/front/serial-search-panel/index.spec.js deleted file mode 100644 index b5228e126..000000000 --- a/modules/invoiceIn/front/serial-search-panel/index.spec.js +++ /dev/null @@ -1,43 +0,0 @@ -import './index.js'; - -describe('InvoiceIn', () => { - describe('Component serial-search-panel', () => { - let controller; - let $scope; - - beforeEach(ngModule('invoiceIn')); - - beforeEach(inject(($componentController, $rootScope) => { - $scope = $rootScope.$new(); - const $element = angular.element(''); - controller = $componentController('vnInvoiceInSerialSearchPanel', {$element, $scope}); - controller.model = { - addFilter: jest.fn(), - }; - controller.invoiceInConfig = { - daysAgo: 45, - }; - })); - - describe('addFilters()', () => { - it('should add default daysAgo if it is not already set', () => { - controller.filter = { - serial: 'R', - }; - controller.addFilters(); - - expect(controller.filter.daysAgo).toEqual(controller.invoiceInConfig.daysAgo); - }); - - it('should not add default daysAgo if it is already set', () => { - controller.filter = { - daysAgo: 1, - serial: 'R', - }; - controller.addFilters(); - - expect(controller.filter.daysAgo).toEqual(1); - }); - }); - }); -}); diff --git a/modules/invoiceIn/front/serial-search-panel/style.scss b/modules/invoiceIn/front/serial-search-panel/style.scss deleted file mode 100644 index 4abfcbfa2..000000000 --- a/modules/invoiceIn/front/serial-search-panel/style.scss +++ /dev/null @@ -1,24 +0,0 @@ -@import "variables"; - -vn-invoice-in-serial-search-panel vn-side-menu div { - & > .input { - padding-left: $spacing-md; - padding-right: $spacing-md; - border-color: $color-spacer; - border-bottom: $border-thin; - } - & > .horizontal { - grid-auto-flow: column; - grid-column-gap: $spacing-sm; - align-items: center; - } - & > .chips { - display: flex; - flex-wrap: wrap; - padding: $spacing-md; - overflow: hidden; - max-width: 100%; - border-color: $color-spacer; - border-top: $border-thin; - } -} diff --git a/modules/invoiceIn/front/serial/index.html b/modules/invoiceIn/front/serial/index.html deleted file mode 100644 index 1649ec7d7..000000000 --- a/modules/invoiceIn/front/serial/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - Serial - Pending - Total - - - - - - {{::invoiceIn.serial}} - {{::invoiceIn.pending}} - {{::invoiceIn.total}} - - - - - - - - - diff --git a/modules/invoiceIn/front/serial/index.js b/modules/invoiceIn/front/serial/index.js deleted file mode 100644 index 193a57492..000000000 --- a/modules/invoiceIn/front/serial/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - goToIndex(daysAgo, serial) { - const issued = Date.vnNew(); - issued.setDate(issued.getDate() - daysAgo); - this.$state.go('invoiceIn.index', - {q: `{"serial": "${serial}", "isBooked": false, "from": ${issued.getTime()}}`}); - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnInvoiceInSerial', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/invoiceIn/front/serial/locale/es.yml b/modules/invoiceIn/front/serial/locale/es.yml deleted file mode 100644 index 92a49cc82..000000000 --- a/modules/invoiceIn/front/serial/locale/es.yml +++ /dev/null @@ -1,3 +0,0 @@ -Serial: Serie -Pending: Pendientes -Go to InvoiceIn: Ir al listado de facturas recibidas diff --git a/modules/invoiceIn/front/tax/index.html b/modules/invoiceIn/front/tax/index.html deleted file mode 100644 index e13f769ce..000000000 --- a/modules/invoiceIn/front/tax/index.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -
- - - - {{id}}: {{name}} - - - - - - - - - -
{{::vat}}
-
#{{::id}}
-
-
- - -
{{::transaction}}
-
#{{::id}}
-
-
- - - - - - - - -
- - - - -
- - - - -
- - - - -
-
{{$ctrl.$t('New expense')}}
- - - - - - - - - - -
-
- - - - -
diff --git a/modules/invoiceIn/front/tax/index.js b/modules/invoiceIn/front/tax/index.js deleted file mode 100644 index d05a77f29..000000000 --- a/modules/invoiceIn/front/tax/index.js +++ /dev/null @@ -1,66 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import UserError from 'core/lib/user-error'; - -class Controller extends Section { - constructor($element, $, vnWeekDays) { - super($element, $); - this.expense = {}; - } - taxRate(invoiceInTax, taxRateSelection) { - const taxTypeSage = taxRateSelection && taxRateSelection.rate; - const taxableBase = invoiceInTax && invoiceInTax.taxableBase; - - if (taxTypeSage && taxableBase) - return (taxTypeSage / 100) * taxableBase; - - return 0; - } - - add() { - this.$.model.insert({ - invoiceIn: this.$params.id - }); - } - - onSubmit() { - this.$.watcher.check(); - this.$.model.save().then(() => { - this.$.watcher.notifySaved(); - this.$.watcher.updateOriginalData(); - this.card.reload(); - }); - } - - onResponse() { - try { - if (!this.expense.code) - throw new Error(`The code can't be empty`); - if (!this.expense.description) - throw new UserError(`The description can't be empty`); - - const data = [{ - id: this.expense.code, - isWithheld: this.expense.isWithheld, - name: this.expense.description - }]; - - this.$http.post(`Expenses`, data) .then(() => { - this.vnApp.showSuccess(this.$t('Expense saved!')); - }); - } catch (e) { - this.vnApp.showError(this.$t(e.message)); - } - } -} - -ngModule.vnComponent('vnInvoiceInTax', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnInvoiceInCard' - }, - bindings: { - invoiceIn: '<' - } -}); diff --git a/modules/invoiceIn/front/tax/index.spec.js b/modules/invoiceIn/front/tax/index.spec.js deleted file mode 100644 index 52114afe5..000000000 --- a/modules/invoiceIn/front/tax/index.spec.js +++ /dev/null @@ -1,113 +0,0 @@ -import './index.js'; -import watcher from 'core/mocks/watcher'; -import crudModel from 'core/mocks/crud-model'; - -describe('InvoiceIn', () => { - describe('Component tax', () => { - let controller; - let $scope; - let vnApp; - let $httpBackend; - - beforeEach(ngModule('invoiceIn')); - - beforeEach(inject(($componentController, $rootScope, _vnApp_, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - vnApp = _vnApp_; - jest.spyOn(vnApp, 'showError'); - $scope = $rootScope.$new(); - $scope.model = crudModel; - $scope.watcher = watcher; - - const $element = angular.element(''); - controller = $componentController('vnInvoiceInTax', {$element, $scope}); - controller.$.model = crudModel; - controller.invoiceIn = {id: 1}; - })); - - describe('taxRate()', () => { - it('should set tax rate with the Sage tax type value', () => { - const taxRateSelection = { - rate: 21 - }; - const invoiceInTax = { - taxableBase: 200 - }; - - const taxRate = controller.taxRate(invoiceInTax, taxRateSelection); - - expect(taxRate).toEqual(42); - }); - }); - - describe('onSubmit()', () => { - it('should make HTTP POST request to save tax values', () => { - controller.card = {reload: () => {}}; - jest.spyOn($scope.watcher, 'check'); - jest.spyOn($scope.watcher, 'notifySaved'); - jest.spyOn($scope.watcher, 'updateOriginalData'); - jest.spyOn(controller.card, 'reload'); - jest.spyOn($scope.model, 'save'); - - controller.onSubmit(); - - expect($scope.model.save).toHaveBeenCalledWith(); - expect($scope.watcher.updateOriginalData).toHaveBeenCalledWith(); - expect($scope.watcher.check).toHaveBeenCalledWith(); - expect($scope.watcher.notifySaved).toHaveBeenCalledWith(); - expect(controller.card.reload).toHaveBeenCalledWith(); - }); - }); - - describe('onResponse()', () => { - it('should return success message', () => { - controller.expense = { - code: 7050000005, - isWithheld: 0, - description: 'Test' - }; - - const data = [{ - id: controller.expense.code, - isWithheld: controller.expense.isWithheld, - name: controller.expense.description - }]; - - jest.spyOn(controller.vnApp, 'showSuccess'); - $httpBackend.expect('POST', `Expenses`, data).respond(); - - controller.onResponse(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Expense saved!'); - }); - - it('should return an error if code is empty', () => { - controller.expense = { - code: null, - isWithheld: 0, - description: 'Test' - }; - - jest.spyOn(controller.vnApp, 'showError'); - controller.onResponse(); - - expect(controller.vnApp.showError).toHaveBeenCalledWith(`The code can't be empty`); - }); - - it('should return an error if description is empty', () => { - controller.expense = { - code: 7050000005, - isWithheld: 0, - description: null - }; - - jest.spyOn(controller.vnApp, 'showError'); - controller.onResponse(); - - expect(controller.vnApp.showError).toHaveBeenCalledWith(`The description can't be empty`); - }); - }); - }); -}); - diff --git a/modules/invoiceIn/front/tax/locale/es.yml b/modules/invoiceIn/front/tax/locale/es.yml deleted file mode 100644 index 3ff68ea40..000000000 --- a/modules/invoiceIn/front/tax/locale/es.yml +++ /dev/null @@ -1,7 +0,0 @@ -Create expense: Crear gasto -New expense: Nuevo gasto -It's a withholding: Es una retención -The fields can't be empty: Los campos no pueden estar vacíos -The code can't be empty: El código no puede estar vacío -The description can't be empty: La descripción no puede estar vacía -Expense saved!: Gasto guardado! \ No newline at end of file From 3ee377156b173b6f41d19c9519a12c64d853b165 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 14 Aug 2024 12:38:38 +0200 Subject: [PATCH 113/250] fix: refs #7355 remove and tests accounts --- .../front/descriptor-popover/index.html | 4 + .../account/front/descriptor-popover/index.js | 9 + modules/account/front/descriptor/index.html | 192 ++++++++++++++++++ modules/account/front/descriptor/index.js | 145 +++++++++++++ .../account/front/descriptor/locale/es.yml | 35 ++++ modules/account/front/index.js | 3 + modules/account/front/summary/index.html | 40 ++++ modules/account/front/summary/index.js | 40 ++++ 8 files changed, 468 insertions(+) create mode 100644 modules/account/front/descriptor-popover/index.html create mode 100644 modules/account/front/descriptor-popover/index.js create mode 100644 modules/account/front/descriptor/index.html create mode 100644 modules/account/front/descriptor/index.js create mode 100644 modules/account/front/descriptor/locale/es.yml create mode 100644 modules/account/front/summary/index.html create mode 100644 modules/account/front/summary/index.js diff --git a/modules/account/front/descriptor-popover/index.html b/modules/account/front/descriptor-popover/index.html new file mode 100644 index 000000000..f3131a84b --- /dev/null +++ b/modules/account/front/descriptor-popover/index.html @@ -0,0 +1,4 @@ + + + + diff --git a/modules/account/front/descriptor-popover/index.js b/modules/account/front/descriptor-popover/index.js new file mode 100644 index 000000000..d7b052473 --- /dev/null +++ b/modules/account/front/descriptor-popover/index.js @@ -0,0 +1,9 @@ +import ngModule from '../module'; +import DescriptorPopover from 'salix/components/descriptor-popover'; + +class Controller extends DescriptorPopover {} + +ngModule.vnComponent('vnAccountDescriptorPopover', { + slotTemplate: require('./index.html'), + controller: Controller +}); diff --git a/modules/account/front/descriptor/index.html b/modules/account/front/descriptor/index.html new file mode 100644 index 000000000..86e78dfce --- /dev/null +++ b/modules/account/front/descriptor/index.html @@ -0,0 +1,192 @@ + + + + + + + Delete + + + Change password + + + Set password + + + Enable account + + + Disable account + + + Activate user + + + Deactivate user + + + Synchronize + + + +
+ + + + +
+
+ + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + Do you want to synchronize user? + + + + + + + + + + + + + + + diff --git a/modules/account/front/descriptor/index.js b/modules/account/front/descriptor/index.js new file mode 100644 index 000000000..de41d619d --- /dev/null +++ b/modules/account/front/descriptor/index.js @@ -0,0 +1,145 @@ +import ngModule from '../module'; +import Descriptor from 'salix/components/descriptor'; +import UserError from 'core/lib/user-error'; + +class Controller extends Descriptor { + get user() { + return this.entity; + } + + set user(value) { + this.entity = value; + } + + get entity() { + return super.entity; + } + + set entity(value) { + super.entity = value; + this.hasAccount = null; + if (!value) return; + + this.$http.get(`Accounts/${value.id}/exists`) + .then(res => this.hasAccount = res.data.exists); + } + + loadData() { + const filter = { + where: {id: this.$params.id}, + include: { + relation: 'role', + scope: { + fields: ['id', 'name'] + } + } + }; + + return Promise.all([ + this.$http.get(`VnUsers/preview`, {filter}) + .then(res => { + const [user] = res.data; + this.user = user; + }), + this.$http.get(`Accounts/${this.$params.id}/exists`) + .then(res => this.hasAccount = res.data.exists) + ]); + } + + onDelete() { + return this.$http.delete(`VnUsers/${this.id}`) + .then(() => this.$state.go('account.index')) + .then(() => this.vnApp.showSuccess(this.$t('User removed'))); + } + + onChangePassClick(askOldPass) { + this.$http.get('UserPasswords/findOne') + .then(res => { + this.passRequirements = res.data; + this.askOldPass = askOldPass; + this.$.changePass.show(); + }); + } + + onPassChange() { + if (!this.newPassword) + throw new UserError(`You must enter a new password`); + if (this.newPassword != this.repeatPassword) + throw new UserError(`Passwords don't match`); + + let method; + const params = {newPassword: this.newPassword}; + + if (this.askOldPass) { + method = 'change-password'; + params.oldPassword = this.oldPassword; + } else + method = 'setPassword'; + + return this.$http.patch(`Accounts/${this.id}/${method}`, params) + .then(() => { + this.emit('change'); + this.vnApp.showSuccess(this.$t('Password changed succesfully!')); + }); + } + + onPassClose() { + this.oldPassword = ''; + this.newPassword = ''; + this.repeatPassword = ''; + this.$.$apply(); + } + + onEnableAccount() { + return this.$http.post(`Accounts`, {id: this.id}) + .then(() => this.onSwitchAccount(true)); + } + + onDisableAccount() { + return this.$http.delete(`Accounts/${this.id}`) + .then(() => this.onSwitchAccount(false)); + } + + onSwitchAccount(enable) { + this.hasAccount = enable; + const message = enable + ? 'Account enabled!' + : 'Account disabled!'; + this.emit('change'); + this.vnApp.showSuccess(this.$t(message)); + } + + onSetActive(active) { + return this.$http.patch(`VnUsers/${this.id}`, {active}) + .then(() => { + this.user.active = active; + const message = active + ? 'User activated!' + : 'User deactivated!'; + this.emit('change'); + this.vnApp.showSuccess(this.$t(message)); + }); + } + + onSync() { + const params = {force: true}; + if (this.shouldSyncPassword) + params.password = this.syncPassword; + + return this.$http.patch(`Accounts/${this.user.name}/sync`, params) + .then(() => this.vnApp.showSuccess(this.$t('User synchronized!'))); + } + + onSyncClose() { + this.shouldSyncPassword = false; + this.syncPassword = undefined; + } +} + +ngModule.component('vnUserDescriptor', { + template: require('./index.html'), + controller: Controller, + bindings: { + user: '<' + } +}); diff --git a/modules/account/front/descriptor/locale/es.yml b/modules/account/front/descriptor/locale/es.yml new file mode 100644 index 000000000..98ced7694 --- /dev/null +++ b/modules/account/front/descriptor/locale/es.yml @@ -0,0 +1,35 @@ +User will be removed: El usuario será eliminado +User removed: Usuario eliminado +Are you sure you want to continue?: ¿Seguro que quieres continuar? +Account will be enabled: La cuenta será habilitada +Account will be disabled: La cuenta será deshabilitada +Account enabled!: ¡Cuenta habilitada! +Account disabled!: ¡Cuenta deshabilitada! +User will activated: El usuario será activado +User will be deactivated: El usuario será desactivado +User activated!: ¡Usuario activado! +User deactivated!: ¡Usuario desactivado! +Account enabled: Cuenta habilitada +User deactivated: Usuario desactivado +Change role: Modificar rol +Change password: Cambiar contraseña +Set password: Establecer contraseña +Enable account: Habilitar cuenta +Disable account: Deshabilitar cuenta +Activate user: Activar usuario +Deactivate user: Desactivar usuario +Old password: Contraseña antigua +New password: Nueva contraseña +Repeat password: Repetir contraseña +Password changed succesfully!: ¡Contraseña modificada correctamente! +Synchronize: Sincronizar +Do you want to synchronize user?: ¿Quieres sincronizar el usuario? +Synchronize password: Sincronizar contraseña +User synchronized!: ¡Usuario sincronizado! +Role changed succesfully!: ¡Rol modificado correctamente! +Password requirements: > + La contraseña debe tener al menos {{ length }} caracteres de longitud, + {{nAlpha}} caracteres alfabéticos, {{nUpper}} letras mayúsculas, {{nDigits}} + dígitos y {{nPunct}} símbolos (Ej: $%&.) +You must enter a new password: Debes introducir la nueva contraseña +Passwords don't match: Las contraseñas no coinciden diff --git a/modules/account/front/index.js b/modules/account/front/index.js index a7209a0bd..0f2208862 100644 --- a/modules/account/front/index.js +++ b/modules/account/front/index.js @@ -1,3 +1,6 @@ export * from './module'; import './main'; +import './descriptor'; +import './descriptor-popover'; +import './summary'; diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html new file mode 100644 index 000000000..f3c11f25f --- /dev/null +++ b/modules/account/front/summary/index.html @@ -0,0 +1,40 @@ + +
+ + + + {{summary.id}} - {{summary.nickname}} +
+ + +

+ + Basic Data + +

+

+ Basic Data +

+ + + + + + +
+
+
diff --git a/modules/account/front/summary/index.js b/modules/account/front/summary/index.js new file mode 100644 index 000000000..53b66dbe2 --- /dev/null +++ b/modules/account/front/summary/index.js @@ -0,0 +1,40 @@ +import ngModule from '../module'; +import Summary from 'salix/components/summary'; + +class Controller extends Summary { + set user(value) { + this._user = value; + this.$.summary = null; + if (!value) return; + + const filter = { + where: {id: value.id}, + include: { + relation: 'role', + scope: { + fields: ['id', 'name'] + } + } + }; + this.$http.get(`VnUsers/preview`, {filter}) + .then(res => { + const [summary] = res.data; + this.$.summary = summary; + }); + } + get isHr() { + return this.aclService.hasAny(['hr']); + } + + get user() { + return this._user; + } +} + +ngModule.component('vnUserSummary', { + template: require('./index.html'), + controller: Controller, + bindings: { + user: '<' + } +}); From b268bf5eb76ef9bd4681ca5a1985194aa4929d59 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 14 Aug 2024 12:47:44 +0200 Subject: [PATCH 114/250] feat: refs #7811 Added autorestart param pm2 --- back/process.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/back/process.yml b/back/process.yml index 08fee7a93..94072b57d 100644 --- a/back/process.yml +++ b/back/process.yml @@ -3,4 +3,5 @@ apps: name: salix-back instances: 1 max_restarts: 0 + autorestart: false node_args: --tls-min-v1.0 --openssl-legacy-provider From 575577d29b526cb43cb2d7f0d60d71d1eb896dea Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 16 Aug 2024 10:08:58 +0200 Subject: [PATCH 115/250] feat: refs #7346 add multiple feature --- db/dump/fixtures.before.sql | 2 +- db/routines/vn/functions/invoiceSerial.sql | 2 +- db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql | 2 ++ db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql | 2 +- modules/invoiceIn/back/methods/invoice-in/getSerial.js | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 6563292dd..5e6533b28 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -632,7 +632,7 @@ INSERT INTO `vn`.`invoiceOutSerial` (`code`, `description`, `isTaxed`, `taxAreaF ('A', 'Global nacional', 1, 'NATIONAL', 0, 'global'), ('T', 'Española rapida', 1, 'NATIONAL', 0, 'quick'), ('V', 'Intracomunitaria global', 0, 'CEE', 1, 'global'), - ('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'quick'), + ('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'multiple'), ('R', 'Rectificativa', 1, 'NATIONAL', 0, NULL), ('E', 'Exportación rápida', 0, 'WORLD', 0, 'quick'); diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 5ce20dc8b..0269275b1 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -12,7 +12,7 @@ BEGIN * @param vType Tipo de factura ['global','multiple','quick'] * @return vSerie de la factura */ - DECLARE vTaxArea VARCHAR(25); + DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci; DECLARE vSerie CHAR(2); IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN diff --git a/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql b/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql index db476c4a5..09ac00401 100644 --- a/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql +++ b/db/versions/11142-aquaGerbera/00-invoiceOutSerialColumn.sql @@ -1,2 +1,4 @@ ALTER TABLE vn.invoiceOutSerial MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL; + +CREATE UNIQUE INDEX invoiceOutSerial_taxAreaFk_IDX USING BTREE ON vn.invoiceOutSerial (taxAreaFk,`type`); diff --git a/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql b/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql index 581a6f5f3..fad33b5dc 100644 --- a/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql +++ b/db/versions/11142-aquaGerbera/01-invoiceOutSerialUpdate.sql @@ -1,3 +1,3 @@ UPDATE vn.invoiceOutSerial SET `type`='multiple' - WHERE `description` LIKE '%multiple%'; + WHERE `description` LIKE '%Múltiple%'; diff --git a/modules/invoiceIn/back/methods/invoice-in/getSerial.js b/modules/invoiceIn/back/methods/invoice-in/getSerial.js index dcc1fbc3c..29c7cae2f 100644 --- a/modules/invoiceIn/back/methods/invoice-in/getSerial.js +++ b/modules/invoiceIn/back/methods/invoice-in/getSerial.js @@ -46,7 +46,7 @@ module.exports = Self => { } }); - filter = mergeFilters(args.filter, {where}); + const filter = mergeFilters(args.filter, {where}); const stmt = new ParameterizedSQL( `SELECT i.serial, SUM(IF(i.isBooked, 0,1)) pending, COUNT(*) total From fc1767cab4e8c832ee1e2baadb0b17e00a77dc79 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 08:45:04 +0200 Subject: [PATCH 116/250] refactor: refs #7756 Fix tests --- db/versions/11172-blueFern/15-firstScript.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/versions/11172-blueFern/15-firstScript.sql diff --git a/db/versions/11172-blueFern/15-firstScript.sql b/db/versions/11172-blueFern/15-firstScript.sql new file mode 100644 index 000000000..5d34f1025 --- /dev/null +++ b/db/versions/11172-blueFern/15-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL; \ No newline at end of file From 0fcff01433db61f8af6fe21d601c51682820a47b Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 09:11:30 +0200 Subject: [PATCH 117/250] refactor: refs #7756 Fix tests --- db/versions/11172-blueFern/10-firstScript.sql | 3 +-- db/versions/11172-blueFern/11-firstScript.sql | 4 ++-- db/versions/11172-blueFern/12-firstScript.sql | 4 ++-- db/versions/11172-blueFern/13-firstScript.sql | 4 ++-- db/versions/11172-blueFern/14-firstScript.sql | 2 +- db/versions/11172-blueFern/15-firstScript.sql | 3 ++- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/db/versions/11172-blueFern/10-firstScript.sql b/db/versions/11172-blueFern/10-firstScript.sql index e1847a877..5d34f1025 100644 --- a/db/versions/11172-blueFern/10-firstScript.sql +++ b/db/versions/11172-blueFern/10-firstScript.sql @@ -1,2 +1 @@ -ALTER TABLE vn.ticket ADD CONSTRAINT ticket_invoiceOut_FK - FOREIGN KEY (refFk) REFERENCES vn.invoiceOut(`ref`) ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL; \ No newline at end of file diff --git a/db/versions/11172-blueFern/11-firstScript.sql b/db/versions/11172-blueFern/11-firstScript.sql index 720b7962e..e1847a877 100644 --- a/db/versions/11172-blueFern/11-firstScript.sql +++ b/db/versions/11172-blueFern/11-firstScript.sql @@ -1,2 +1,2 @@ -ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK - FOREIGN KEY (correctingFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE vn.ticket ADD CONSTRAINT ticket_invoiceOut_FK + FOREIGN KEY (refFk) REFERENCES vn.invoiceOut(`ref`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/12-firstScript.sql b/db/versions/11172-blueFern/12-firstScript.sql index 35099bd5d..720b7962e 100644 --- a/db/versions/11172-blueFern/12-firstScript.sql +++ b/db/versions/11172-blueFern/12-firstScript.sql @@ -1,2 +1,2 @@ -ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK_1 - FOREIGN KEY (correctedFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file +ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK + FOREIGN KEY (correctingFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/13-firstScript.sql b/db/versions/11172-blueFern/13-firstScript.sql index f1aa0a216..35099bd5d 100644 --- a/db/versions/11172-blueFern/13-firstScript.sql +++ b/db/versions/11172-blueFern/13-firstScript.sql @@ -1,2 +1,2 @@ -ALTER TABLE vn.invoiceOutExpense ADD CONSTRAINT invoiceOutExpense_invoiceOut_FK - FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK_1 + FOREIGN KEY (correctedFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file diff --git a/db/versions/11172-blueFern/14-firstScript.sql b/db/versions/11172-blueFern/14-firstScript.sql index ba570e20c..f1aa0a216 100644 --- a/db/versions/11172-blueFern/14-firstScript.sql +++ b/db/versions/11172-blueFern/14-firstScript.sql @@ -1,2 +1,2 @@ -ALTER TABLE vn.invoiceOutTax ADD CONSTRAINT invoiceOutTax_invoiceOut_FK +ALTER TABLE vn.invoiceOutExpense ADD CONSTRAINT invoiceOutExpense_invoiceOut_FK FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/db/versions/11172-blueFern/15-firstScript.sql b/db/versions/11172-blueFern/15-firstScript.sql index 5d34f1025..ba570e20c 100644 --- a/db/versions/11172-blueFern/15-firstScript.sql +++ b/db/versions/11172-blueFern/15-firstScript.sql @@ -1 +1,2 @@ -ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL; \ No newline at end of file +ALTER TABLE vn.invoiceOutTax ADD CONSTRAINT invoiceOutTax_invoiceOut_FK + FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE; From cf977ce06d0c5a7919016ed0e03967fc33f1ffdc Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 20 Aug 2024 09:12:10 +0200 Subject: [PATCH 118/250] fix: refs #7831 sql --- db/routines/vn/procedures/item_getBalance.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 46e4bafcc..3a594c81c 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -189,7 +189,7 @@ BEGIN SELECT * FROM sales UNION ALL SELECT * FROM orders - ORDER BY shipped DESC, + ORDER BY shipped, (inventorySupplierFk = entityId) DESC, alertLevel DESC, isTicket, From f9d0afa5da61834c0ac60a5f1b041d9bf90412da Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 09:30:25 +0200 Subject: [PATCH 119/250] feat: refs #7712 Fix --- db/routines/vn/procedures/collection_new.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index f7f342ea7..ee76f3994 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -181,6 +181,7 @@ BEGIN JOIN ticket t ON t.id = pb.ticketfk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk + GROUP BY pb.ticketFk ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() From 1f5145ba9e0a7439ff0165ad8ff0b15cc2ba17aa Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 09:34:02 +0200 Subject: [PATCH 120/250] feat: refs #7712 Unify --- db/versions/11171-maroonMoss/00-firstScript.sql | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/db/versions/11171-maroonMoss/00-firstScript.sql b/db/versions/11171-maroonMoss/00-firstScript.sql index 1bf0d646b..0632239ac 100644 --- a/db/versions/11171-maroonMoss/00-firstScript.sql +++ b/db/versions/11171-maroonMoss/00-firstScript.sql @@ -1,8 +1,3 @@ ALTER TABLE vn.operator - ADD sizeLimit int(10) unsigned DEFAULT 90 NULL - COMMENT 'Límite de altura en una colección para la asignación de pedidos' - AFTER volumeLimit; - -ALTER TABLE vn.operator - MODIFY COLUMN linesLimit int(10) unsigned DEFAULT 20 NULL - COMMENT 'Límite de lineas en una colección para la asignación de pedidos'; + ADD COLUMN sizeLimit int(10) unsigned DEFAULT 90 NULL COMMENT 'Límite de altura en una colección para la asignación de pedidos' AFTER volumeLimit, + MODIFY COLUMN linesLimit int(10) unsigned DEFAULT 20 NULL COMMENT 'Límite de lineas en una colección para la asignación de pedidos'; From 0d8d5d8b3d740325b3b6601e344c31c2daf3c3c5 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 09:57:33 +0200 Subject: [PATCH 121/250] build: dump 2434 --- db/dump/.dump/data.sql | 1721 +++++++++++++++------------------- db/dump/.dump/privileges.sql | 13 +- db/dump/.dump/structure.sql | 904 +++++++++--------- db/dump/.dump/triggers.sql | 74 +- 4 files changed, 1346 insertions(+), 1366 deletions(-) diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql index f6bc84db7..37e7835fc 100644 --- a/db/dump/.dump/data.sql +++ b/db/dump/.dump/data.sql @@ -3,7 +3,7 @@ USE `util`; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -INSERT INTO `version` VALUES ('vn-database','11161','36dee872d62ba2421c05503f374f6b208c40ecfa','2024-08-06 07:53:56','11180'); +INSERT INTO `version` VALUES ('vn-database','11180','2a5588f013dbb6370e15754e03a6d9f1d74188e2','2024-08-20 08:34:44','11191'); INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL); @@ -910,9 +910,15 @@ INSERT INTO `versionLog` VALUES ('vn-database','11159','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11160','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-18 13:46:16',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11161','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11164','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-23 11:03:16',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11165','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11166','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11168','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 08:58:34',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11169','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 12:38:13',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11170','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-09 07:12:38',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11177','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-30 12:42:28',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11179','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11180','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11182','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-08-09 08:19:36',NULL,NULL); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; @@ -1283,6 +1289,7 @@ INSERT INTO `roleInherit` VALUES (371,36,35,NULL); INSERT INTO `roleInherit` VALUES (372,126,13,19295); INSERT INTO `roleInherit` VALUES (373,131,2,19295); INSERT INTO `roleInherit` VALUES (375,120,131,1437); +INSERT INTO `roleInherit` VALUES (376,124,21,19336); INSERT INTO `userPassword` VALUES (1,7,1,0,2,1); @@ -1299,770 +1306,770 @@ USE `salix`; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -INSERT INTO `ACL` VALUES (3,'Address','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (5,'AgencyService','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (9,'ClientObservation','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (11,'ContactChannel','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (13,'Employee','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (14,'PayMethod','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (16,'FakeProduction','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (17,'Warehouse','* ','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (20,'TicketState','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (24,'Delivery','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (25,'Zone','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (26,'ClientCredit','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (27,'ClientCreditLimit','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (30,'GreugeType','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (31,'Mandate','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (32,'MandateType','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (33,'Company','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (34,'Greuge','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (35,'AddressObservation','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (36,'ObservationType','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (37,'Greuge','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (38,'AgencyMode','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (39,'ItemTag','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (40,'ItemBotanical','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (41,'ItemBotanical','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (42,'ItemPlacement','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (43,'ItemPlacement','*','WRITE','ALLOW','ROLE','replenisher'); -INSERT INTO `ACL` VALUES (44,'ItemPlacement','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (45,'ItemBarcode','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (46,'ItemBarcode','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (47,'ItemBarcode','*','WRITE','ALLOW','ROLE','replenisher'); -INSERT INTO `ACL` VALUES (51,'ItemTag','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (53,'Item','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (54,'Item','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (55,'Recovery','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (56,'Recovery','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (58,'CreditClassification','*','*','ALLOW','ROLE','insurance'); -INSERT INTO `ACL` VALUES (60,'CreditInsurance','*','*','ALLOW','ROLE','insurance'); -INSERT INTO `ACL` VALUES (61,'InvoiceOut','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (63,'TicketObservation','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (65,'Sale','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (66,'TicketTracking','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (68,'TicketPackaging','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (69,'Packaging','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (70,'Packaging','*','WRITE','ALLOW','ROLE','logistic'); -INSERT INTO `ACL` VALUES (72,'SaleComponent','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (73,'Expedition','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (74,'Expedition','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (75,'Expedition','*','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (76,'AnnualAverageInvoiced','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (77,'WorkerMana','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (78,'TicketTracking','*','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (79,'Ticket','state','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (80,'Sale','deleteSales','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (81,'Sale','moveToTicket','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (82,'Sale','updateQuantity','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (83,'Sale','updatePrice','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (84,'Sale','updateDiscount','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (85,'SaleTracking','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (86,'Order','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (87,'OrderRow','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (88,'ClientContact','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (89,'Sale','moveToNewTicket','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (90,'Sale','reserve','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (91,'TicketWeekly','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (94,'Agency','landsThatDay','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (96,'ClaimEnd','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (97,'ClaimEnd','*','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (98,'ClaimBeginning','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (102,'Claim','createFromSales','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACL` VALUES (105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACL` VALUES (106,'ItemBotanical','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACL` VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACL` VALUES (109,'UserConfig','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (110,'Accounting','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (111,'ClientLog','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (112,'Defaulter','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (113,'ClientRisk','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (114,'Receipt','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (115,'Receipt','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (116,'BankEntity','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (117,'ClientSample','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (118,'WorkerTeam','*','*','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (119,'Travel','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (120,'Travel','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (121,'Item','regularize','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (122,'TicketRequest','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (124,'Client','confirmTransaction','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (125,'Agency','getAgenciesWithWarehouse','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (127,'TicketLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (129,'TicketService','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (130,'Expedition','*','WRITE','ALLOW','ROLE','packager'); -INSERT INTO `ACL` VALUES (131,'CreditInsurance','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (132,'CreditClassification','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (133,'ItemTag','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACL` VALUES (135,'ZoneGeo','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (136,'ZoneCalendar','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (137,'ZoneIncluded','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (138,'LabourHoliday','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (139,'LabourHolidayLegend','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (140,'LabourHolidayType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (141,'Zone','*','*','ALLOW','ROLE','logisticBoss'); -INSERT INTO `ACL` VALUES (142,'ZoneCalendar','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (143,'ZoneIncluded','*','*','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (144,'Stowaway','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (145,'Ticket','getPossibleStowaways','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (147,'UserConfigView','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (148,'UserConfigView','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (149,'Sip','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (150,'Sip','*','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (151,'Department','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (152,'Department','*','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (154,'Route','*','WRITE','ALLOW','ROLE','delivery'); -INSERT INTO `ACL` VALUES (155,'Calendar','*','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (156,'WorkerLabour','*','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (157,'Calendar','absences','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory'); -INSERT INTO `ACL` VALUES (160,'TicketServiceType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (161,'TicketConfig','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (165,'TicketDms','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (168,'Worker','mySubordinates','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (169,'WorkerTimeControl','filter','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (171,'TicketServiceType','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (172,'Sms','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (173,'Sms','send','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (176,'Device','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (177,'Device','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (179,'ItemLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (180,'RouteLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (181,'Dms','removeFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (182,'Dms','uploadFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (183,'Dms','downloadFile','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (184,'Client','uploadFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (185,'ClientDms','removeFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (186,'ClientDms','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (187,'Ticket','uploadFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (190,'Route','updateVolume','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (191,'Agency','getLanded','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (192,'Agency','getShipped','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (194,'Postcode','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (195,'Ticket','addSale','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (196,'Dms','updateFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (197,'Dms','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (198,'ClaimDms','removeFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (199,'ClaimDms','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (200,'Claim','uploadFile','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (201,'Sale','updateConcept','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (202,'Claim','updateClaimAction','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (203,'UserPhone','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (204,'WorkerDms','removeFile','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (205,'WorkerDms','*','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (206,'Chat','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (207,'Chat','sendMessage','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (208,'Sale','recalculatePrice','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (209,'Ticket','recalculateComponents','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (211,'TravelLog','*','READ','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (212,'Thermograph','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (213,'TravelThermograph','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (214,'Entry','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (216,'TravelThermograph','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (218,'Intrastat','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','guest'); -INSERT INTO `ACL` VALUES (226,'ClientObservation','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (227,'Address','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (228,'AddressObservation','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (230,'ClientCredit','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (231,'ClientContact','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (232,'ClientSample','*','READ','ALLOW','ROLE','trainee'); -INSERT INTO `ACL` VALUES (233,'EntryLog','*','READ','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (234,'WorkerLog','find','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (235,'CustomsAgent','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (236,'Buy','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (237,'WorkerDms','filter','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (238,'Town','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (239,'Province','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (241,'SupplierContact','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (248,'RoleMapping','*','READ','ALLOW','ROLE','account'); -INSERT INTO `ACL` VALUES (249,'UserPassword','*','READ','ALLOW','ROLE','account'); -INSERT INTO `ACL` VALUES (250,'Town','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (251,'Province','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (252,'Supplier','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (253,'Supplier','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (254,'SupplierLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (256,'Image','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (257,'FixedPrice','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (258,'PayDem','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','$authenticated'); -INSERT INTO `ACL` VALUES (265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss'); -INSERT INTO `ACL` VALUES (266,'ZoneLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (267,'Genus','*','WRITE','ALLOW','ROLE','logisticBoss'); -INSERT INTO `ACL` VALUES (268,'Specie','*','WRITE','ALLOW','ROLE','logisticBoss'); -INSERT INTO `ACL` VALUES (269,'InvoiceOut','createPdf','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (270,'SupplierAddress','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (271,'SalesMonitor','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (272,'InvoiceInLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (273,'InvoiceInTax','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (274,'InvoiceInLog','*','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (275,'InvoiceOut','createManualInvoice','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (276,'InvoiceOut','globalInvoicing','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (278,'RoleInherit','*','WRITE','ALLOW','ROLE','grant'); -INSERT INTO `ACL` VALUES (279,'MailAlias','*','READ','ALLOW','ROLE','marketing'); -INSERT INTO `ACL` VALUES (283,'EntryObservation','*','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (284,'LdapConfig','*','*','ALLOW','ROLE','sysadmin'); -INSERT INTO `ACL` VALUES (285,'SambaConfig','*','*','ALLOW','ROLE','sysadmin'); -INSERT INTO `ACL` VALUES (286,'ACL','*','*','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (287,'AccessToken','*','*','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (293,'RoleInherit','*','*','ALLOW','ROLE','it'); -INSERT INTO `ACL` VALUES (294,'RoleRole','*','*','ALLOW','ROLE','it'); -INSERT INTO `ACL` VALUES (295,'AccountConfig','*','*','ALLOW','ROLE','sysadmin'); -INSERT INTO `ACL` VALUES (296,'Collection','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (297,'Sale','clone','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (298,'InvoiceInDueDay','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (299,'Collection','setSaleQuantity','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (302,'AgencyTerm','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (303,'ClaimLog','*','READ','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (304,'Edi','updateData','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (305,'EducationLevel','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (306,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (307,'SupplierAgencyTerm','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (308,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (309,'Zone','getZoneClosing','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (310,'ExpeditionState','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (311,'Expense','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (312,'Expense','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (314,'SupplierActivity','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (315,'SupplierActivity','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (316,'Dms','deleteTrashFiles','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (317,'ClientUnpaid','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (318,'MdbVersion','*','*','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (319,'ItemType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (320,'ItemType','*','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (327,'Sale','clone','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (328,'Sale','clone','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (330,'ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (331,'ClaimObservation','*','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (332,'Client','setPassword','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (333,'Client','updateUser','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (334,'ShelvingLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (335,'ZoneExclusionGeo','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (336,'ZoneExclusionGeo','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (337,'Parking','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (338,'Shelving','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (339,'OsTicket','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (340,'OsTicketConfig','*','*','ALLOW','ROLE','it'); -INSERT INTO `ACL` VALUES (341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (346,'Client','campaignMetricsPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (347,'Client','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (348,'Client','clientWelcomeHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (349,'Client','clientWelcomeEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (350,'Client','creditRequestPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (351,'Client','creditRequestHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (352,'Client','creditRequestEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (353,'Client','printerSetupHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (354,'Client','printerSetupEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (355,'Client','sepaCoreEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (356,'Client','letterDebtorPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (357,'Client','letterDebtorStHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (358,'Client','letterDebtorStEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (359,'Client','letterDebtorNdHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (360,'Client','letterDebtorNdEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (361,'Client','clientDebtStatementPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (362,'Client','clientDebtStatementHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (363,'Client','clientDebtStatementEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (364,'Client','incotermsAuthorizationPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (365,'Client','incotermsAuthorizationHtml','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (366,'Client','incotermsAuthorizationEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (367,'Client','consumptionSendQueued','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (368,'InvoiceOut','invoiceEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (369,'InvoiceOut','exportationPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (370,'InvoiceOut','sendQueued','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (371,'Ticket','invoiceCsvPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (372,'Ticket','invoiceCsvEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (373,'Supplier','campaignMetricsPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (374,'Supplier','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (375,'Travel','extraCommunityPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (376,'Travel','extraCommunityEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (377,'Entry','entryOrderPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (378,'OsTicket','osTicketReportEmail','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (379,'Item','buyerWasteEmail','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (380,'Claim','claimPickupPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (381,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (382,'Item','labelPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (383,'Sector','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (384,'Sector','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (385,'Route','driverRoutePdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','$owner'); -INSERT INTO `ACL` VALUES (388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (389,'ClaimRma','*','READ','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (390,'ClaimRma','*','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (391,'Notification','*','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (392,'Boxing','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (393,'Url','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (394,'Url','*','WRITE','ALLOW','ROLE','it'); -INSERT INTO `ACL` VALUES (395,'ItemShelving','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (396,'ItemShelving','*','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (397,'ItemShelvingPlacementSupplyStock','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (398,'NotificationQueue','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (399,'InvoiceOut','clientsToInvoice','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (400,'InvoiceOut','invoiceClient','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (401,'Sale','editTracked','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (402,'Sale','editFloramondo','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (403,'Receipt','balanceCompensationEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (404,'Receipt','balanceCompensationPdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (405,'Ticket','getTicketsFuture','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (406,'Ticket','merge','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (407,'Sale','editFloramondo','WRITE','ALLOW','ROLE','logistic'); -INSERT INTO `ACL` VALUES (408,'ZipConfig','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (409,'Item','*','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (410,'Sale','editCloned','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (411,'Sale','editCloned','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (414,'MdbVersion','*','READ','ALLOW','ROLE','$everyone'); -INSERT INTO `ACL` VALUES (416,'TicketLog','getChanges','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (417,'Ticket','getTicketsAdvance','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (418,'EntryLog','*','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (419,'Sale','editTracked','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (420,'MdbBranch','*','READ','ALLOW','ROLE','$everyone'); -INSERT INTO `ACL` VALUES (421,'ItemShelvingSale','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (422,'Docuware','checkFile','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (423,'Docuware','download','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (424,'Docuware','upload','WRITE','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (425,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (426,'TpvTransaction','confirm','WRITE','ALLOW','ROLE','$everyone'); -INSERT INTO `ACL` VALUES (427,'TpvTransaction','start','WRITE','ALLOW','ROLE','$authenticated'); -INSERT INTO `ACL` VALUES (428,'TpvTransaction','end','WRITE','ALLOW','ROLE','$authenticated'); -INSERT INTO `ACL` VALUES (429,'ItemConfig','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (431,'Tag','onSubmit','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (432,'Worker','updateAttributes','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (433,'Worker','createAbsence','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (434,'Worker','updateAbsence','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (435,'Worker','deleteAbsence','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (436,'Worker','new','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (438,'Client','getClientOrSupplierReference','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (439,'NotificationSubscription','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (440,'NotificationAcl','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (441,'MdbApp','*','READ','ALLOW','ROLE','$everyone'); -INSERT INTO `ACL` VALUES (442,'MdbApp','*','*','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (443,'ItemConfig','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (444,'DeviceProduction','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (445,'DeviceProductionModels','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (446,'DeviceProductionState','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (447,'DeviceProductionUser','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (448,'DeviceProduction','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (449,'DeviceProductionModels','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (450,'DeviceProductionState','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (451,'DeviceProductionUser','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (452,'Worker','deallocatePDA','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (453,'Worker','allocatePDA','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (454,'Worker','deallocatePDA','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (455,'Worker','allocatePDA','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (456,'Zone','*','*','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (458,'Operator','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (459,'Operator','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (460,'InvoiceIn','getSerial','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (461,'Ticket','saveSign','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (462,'InvoiceOut','negativeBases','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (463,'InvoiceOut','negativeBasesCsv','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (464,'WorkerObservation','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (465,'ClientInforma','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (466,'ClientInforma','*','WRITE','ALLOW','ROLE','financial'); -INSERT INTO `ACL` VALUES (467,'Receipt','receiptEmail','*','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (468,'Client','setRating','WRITE','ALLOW','ROLE','financial'); -INSERT INTO `ACL` VALUES (470,'Client','addressesPropagateRe','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (471,'Client','canBeInvoiced','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (472,'Client','canCreateTicket','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (473,'Client','consumption','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (474,'Client','createAddress','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (475,'Client','createWithUser','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (476,'Client','extendedListFilter','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (477,'Client','getAverageInvoiced','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (478,'Client','getCard','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (479,'Client','getDebt','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (480,'Client','getMana','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (481,'Client','transactions','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (482,'Client','hasCustomerRole','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (483,'Client','isValidClient','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (484,'Client','lastActiveTickets','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (485,'Client','sendSms','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (486,'Client','setPassword','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (487,'Client','summary','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (488,'Client','updateAddress','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (489,'Client','updateFiscalData','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (491,'Client','uploadFile','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (492,'Client','campaignMetricsPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (493,'Client','campaignMetricsEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (494,'Client','clientWelcomeHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (495,'Client','clientWelcomeEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (496,'Client','printerSetupHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (497,'Client','printerSetupEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (498,'Client','sepaCoreEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (499,'Client','letterDebtorPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (500,'Client','letterDebtorStHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (501,'Client','letterDebtorStEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (502,'Client','letterDebtorNdHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (503,'Client','letterDebtorNdEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (504,'Client','clientDebtStatementPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (505,'Client','clientDebtStatementHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (506,'Client','clientDebtStatementEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (507,'Client','creditRequestPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (508,'Client','creditRequestHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (509,'Client','creditRequestEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (510,'Client','incotermsAuthorizationPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (511,'Client','incotermsAuthorizationHtml','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (512,'Client','incotermsAuthorizationEmail','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (513,'Client','consumptionSendQueued','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (514,'Client','filter','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (515,'Client','getClientOrSupplierReference','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (516,'Client','upsert','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (518,'Client','replaceById','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (519,'Client','updateAttributes','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (520,'Client','updateAttributes','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (521,'Client','deleteById','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (522,'Client','replaceOrCreate','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (523,'Client','updateAll','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (527,'VnUser','acl','READ','ALLOW','ROLE','guest'); -INSERT INTO `ACL` VALUES (528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account'); -INSERT INTO `ACL` VALUES (530,'Account','exists','READ','ALLOW','ROLE','account'); -INSERT INTO `ACL` VALUES (531,'Account','exists','READ','ALLOW','ROLE','account'); -INSERT INTO `ACL` VALUES (532,'UserLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (533,'RoleLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (534,'WagonType','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (535,'WagonTypeColor','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (536,'WagonTypeTray','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (537,'WagonConfig','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (538,'CollectionWagon','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (539,'CollectionWagonTicket','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (540,'Wagon','*','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (541,'WagonType','createWagonType','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (542,'WagonType','deleteWagonType','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (543,'WagonType','editWagonType','*','ALLOW','ROLE','productionAssi'); -INSERT INTO `ACL` VALUES (544,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (545,'Agency','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (546,'Agency','seeExpired','READ','ALLOW','ROLE','coolerAssist'); -INSERT INTO `ACL` VALUES (547,'WorkerLog','models','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (548,'Ticket','editDiscount','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (549,'Ticket','editDiscount','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (550,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (551,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (552,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (553,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (554,'Ticket','deleteTicketWithPartPrepared','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (555,'Ticket','editZone','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (556,'State','editableStates','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (557,'State','seeEditableStates','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (558,'State','seeEditableStates','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (559,'State','isSomeEditable','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (560,'State','isAllEditable','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (561,'State','isAllEditable','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (562,'Agency','seeExpired','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (563,'Agency','seeExpired','READ','ALLOW','ROLE','productionBoss'); -INSERT INTO `ACL` VALUES (564,'Claim','createAfterDeadline','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (565,'Client','editAddressLogifloraAllowed','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (566,'Client','editFiscalDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (567,'Client','editVerifiedDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (568,'Client','editCredit','WRITE','ALLOW','ROLE','financialBoss'); -INSERT INTO `ACL` VALUES (569,'Client','zeroCreditEditor','WRITE','ALLOW','ROLE','financialBoss'); -INSERT INTO `ACL` VALUES (570,'InvoiceOut','canCreatePdf','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial'); -INSERT INTO `ACL` VALUES (572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss'); -INSERT INTO `ACL` VALUES (573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (574,'Claim','editPickup','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (581,'Claim','updateClaimDestination','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (582,'Claim','downloadFile','READ','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (583,'Claim','deleteById','WRITE','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (585,'Claim','logs','READ','ALLOW','ROLE','claimManager'); -INSERT INTO `ACL` VALUES (586,'Ticket','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (587,'Ticket','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (588,'Ticket','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (589,'Ticket','getVolume','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (590,'Ticket','getTotalVolume','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (591,'Ticket','summary','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (592,'Ticket','priceDifference','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (593,'Ticket','componentUpdate','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (594,'Ticket','new','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (595,'Ticket','isEditable','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (596,'Ticket','setDeleted','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (597,'Ticket','restore','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (598,'Ticket','getSales','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (599,'Ticket','getSalesPersonMana','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (600,'Ticket','filter','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (601,'Ticket','makeInvoice','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (602,'Ticket','updateEditableTicket','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (603,'Ticket','updateDiscount','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (604,'Ticket','transferSales','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (606,'Ticket','isLocked','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (607,'Ticket','freightCost','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery'); -INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (615,'Worker','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (620,'Worker','activeWithRole','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (621,'Worker','uploadFile','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (622,'Worker','contracts','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (623,'Worker','holidays','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (624,'Worker','activeContract','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (625,'Worker','activeWithInheritedRole','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (626,'Ticket','collectionLabel','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss'); -INSERT INTO `ACL` VALUES (630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss'); -INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss'); -INSERT INTO `ACL` VALUES (639,'Agency','seeExpired','READ','ALLOW','ROLE','logisticAssistant'); -INSERT INTO `ACL` VALUES (654,'Ticket','editZone','WRITE','ALLOW','ROLE','logisticAssistant'); -INSERT INTO `ACL` VALUES (655,'Entry','addFromPackaging','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (656,'Entry','addFromBuy','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (657,'Supplier','getItemsPackaging','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (658,'Ticket','closeAll','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (659,'Account','*','*','ALLOW','ROLE','developerBoss'); -INSERT INTO `ACL` VALUES (664,'MailForward','*','*','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (667,'VnUser','*','*','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (668,'VnUser','__get__preview','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (669,'VnUser','preview','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (670,'VnUser','create','*','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (672,'PackingSiteAdvanced','*','*','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (673,'InvoiceOut','makePdfAndNotify','WRITE','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (674,'InvoiceOutConfig','*','READ','ALLOW','ROLE','invoicing'); -INSERT INTO `ACL` VALUES (676,'Ticket','invoiceTickets','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (680,'MailAliasAccount','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (683,'MailAliasAccount','canEditAlias','WRITE','ALLOW','ROLE','developerBoss'); -INSERT INTO `ACL` VALUES (684,'WorkerDisableExcluded','*','READ','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (685,'WorkerDisableExcluded','*','WRITE','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (686,'MailForward','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (687,'ClientSms','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (688,'ClientSms','create','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (698,'Ticket','canEditWeekly','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (702,'Ticket','docuwareDownload','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (703,'Worker','search','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (704,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery'); -INSERT INTO `ACL` VALUES (705,'SaleGroupDetail','deleteById','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (706,'Ticket','setDeleted','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (707,'DeviceLog','create','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (708,'Collection','getTickets','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (709,'Client','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (710,'Client','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (711,'Client','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (712,'Client','exists','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (713,'Client','__get__addresses','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (714,'ExpeditionMistakeType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (715,'WorkerMistakeType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (716,'ExpeditionMistake','*','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (717,'WorkerMistake','*','WRITE','ALLOW','ROLE','coolerAssist'); -INSERT INTO `ACL` VALUES (718,'MistakesTypes','*','WRITE','ALLOW','ROLE','coolerAssist'); -INSERT INTO `ACL` VALUES (719,'MistakeType','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (720,'MachineWorker','*','READ','ALLOW','ROLE','coolerAssist'); -INSERT INTO `ACL` VALUES (721,'Printer','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (722,'SaleMistake','*','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (723,'Item','setVisibleDiscard','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (724,'Address','getAddress','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (725,'Account','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (726,'Account','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (727,'Account','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (728,'Account','exists','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (729,'Sale','clone','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (730,'Ticket','setDeleted','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (732,'Sale','isInPreparing','*','ALLOW','ROLE','reviewer'); -INSERT INTO `ACL` VALUES (733,'Train','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (734,'WorkerDepartment','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (735,'VnUser','higherPrivileges','*','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (736,'VnUser','mediumPrivileges','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (737,'VnUser','updateUser','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (738,'TicketCollection','*','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (739,'Worker','setPassword','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (740,'Url','getByUser','READ','ALLOW','ROLE','$everyone'); -INSERT INTO `ACL` VALUES (741,'Claim','__get__lines','READ','ALLOW','ROLE','claimViewer'); -INSERT INTO `ACL` VALUES (742,'AddressShortage','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (743,'Claim','filter','READ','ALLOW','ROLE','claimViewer'); -INSERT INTO `ACL` VALUES (744,'Claim','find','READ','ALLOW','ROLE','claimViewer'); -INSERT INTO `ACL` VALUES (745,'Claim','findById','READ','ALLOW','ROLE','claimViewer'); -INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimViewer'); -INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson'); -INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (754,'Route','find','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (755,'Route','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (759,'Route','cmr','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (760,'Route','downloadCmrsZip','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (764,'Route','getDeliveryPoint','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (765,'Route','cmrs','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (766,'Route','getSuggestedTickets','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (767,'Route','getTickets','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (768,'Route','guessPriority','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (769,'Route','insertTicket','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (770,'Route','getDeliveryPoint','READ','ALLOW','ROLE','deliveryBoss'); -INSERT INTO `ACL` VALUES (771,'Route','summary','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (772,'Route','getExpeditionSummary','READ','ALLOW','ROLE','delivery'); -INSERT INTO `ACL` VALUES (773,'WorkerTimeControl','login','READ','ALLOW','ROLE','timeControl'); -INSERT INTO `ACL` VALUES (774,'WorkerTimeControl','getClockIn','READ','ALLOW','ROLE','timeControl'); -INSERT INTO `ACL` VALUES (775,'WorkerTimeControl','clockIn','WRITE','ALLOW','ROLE','timeControl'); -INSERT INTO `ACL` VALUES (776,'WorkerTimeControl','addTimeEntry','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (777,'WorkerTimeControl','deleteTimeEntry','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (778,'WorkerTimeControl','updateTimeEntry','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (779,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (780,'WorkerTimeControl','updateMailState','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (781,'WorkerTimeControl','weeklyHourRecordEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (782,'WorkerTimeControl','getMailStates','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (783,'WorkerTimeControl','resendWeeklyHourEmail','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (784,'VnRole','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (785,'VnRole','*','WRITE','ALLOW','ROLE','it'); -INSERT INTO `ACL` VALUES (786,'State','isAllEditable','READ','ALLOW','ROLE','delivery'); -INSERT INTO `ACL` VALUES (787,'Ticket','makePdfList','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (788,'Ticket','invoiceTicketsAndPdf','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (789,'InvoiceIn','*','READ','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (790,'InvoiceIn','getSerial','READ','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (791,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (792,'InvoiceInCorrection','*','*','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (793,'Supplier','updateAllFiscalData','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (794,'Supplier','updateFiscalData','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (795,'Ticket','myLastModified','*','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (796,'MrwConfig','cancelShipment','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (797,'MrwConfig','createShipment','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (798,'MailAliasAccount','*','*','ALLOW','ROLE','itManagement'); -INSERT INTO `ACL` VALUES (799,'Ticket','saveCmr','*','ALLOW','ROLE','developer'); -INSERT INTO `ACL` VALUES (800,'EntryDms','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (801,'MailAliasAccount','create','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (802,'MailAliasAccount','deleteById','WRITE','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (804,'DeviceProduction','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (805,'Collection','assign','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (806,'ExpeditionPallet','getPallet','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (807,'MachineWorker','updateInTime','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (808,'MobileAppVersionControl','getVersion','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (809,'SaleTracking','delete','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (810,'SaleTracking','updateTracking','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (811,'SaleTracking','setPicked','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (813,'Sale','getFromSectorCollection','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (814,'ItemBarcode','delete','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (815,'WorkerActivityType','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (816,'WorkerActivity','*','*','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (817,'ParkingLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (818,'ExpeditionPallet','*','*','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (819,'Ticket','addSaleByCode','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (820,'TicketCollection','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (821,'Ticket','clone','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (822,'SupplierDms','*','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (823,'MailAlias','*','*','ALLOW','ROLE','developerBoss'); -INSERT INTO `ACL` VALUES (824,'ItemShelving','hasItemOlder','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (825,'Application','getEnumValues','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (826,'Ticket','editZone','WRITE','ALLOW','ROLE','salesAssistant'); -INSERT INTO `ACL` VALUES (827,'TicketWeekly','deleteById','WRITE','ALLOW','ROLE','buyerBoss'); -INSERT INTO `ACL` VALUES (828,'TicketWeekly','upsert','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (830,'InvoiceIn','*','READ','ALLOW','ROLE','deliveryBoss'); -INSERT INTO `ACL` VALUES (831,'InvoiceIn','exchangeRateUpdate','*','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (832,'AgencyLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (833,'AgencyWorkCenter','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (835,'Agency','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (836,'Agency','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (837,'AgencyWorkCenter','*','WRITE','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (838,'Worker','getAvailablePda','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (839,'Locker','__get__codes','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (840,'Locker','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (841,'Locker','*','*','ALLOW','ROLE','productionBoss'); -INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss'); -INSERT INTO `ACL` VALUES (846,'Ticket','refund','WRITE','ALLOW','ROLE','logistic'); -INSERT INTO `ACL` VALUES (847,'RouteConfig','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (848,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (849,'InvoiceIn','clone','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (850,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (851,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (852,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (853,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (854,'InvoiceIn','toUnbook','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (855,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (856,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (857,'InvoiceIn','clone','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (858,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (859,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (860,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (861,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (862,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (863,'InvoiceIn','create','WRITE','ALLOW','ROLE','administrative'); -INSERT INTO `ACL` VALUES (864,'InvoiceIn','create','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (865,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (866,'InvoiceOut','download','READ','ALLOW','ROLE','$owner'); -INSERT INTO `ACL` VALUES (867,'InvoiceIn','*','READ','ALLOW','ROLE','maintenanceBoss'); -INSERT INTO `ACL` VALUES (868,'InvoiceIn','*','READ','ALLOW','ROLE','maintenanceBos'); -INSERT INTO `ACL` VALUES (869,'Ticket','editZone','WRITE','ALLOW','ROLE','buyer'); -INSERT INTO `ACL` VALUES (870,'Entry','find','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (871,'RoadmapAddress','*','WRITE','ALLOW','ROLE','palletizerBoss'); -INSERT INTO `ACL` VALUES (872,'RoadmapAddress','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (873,'Roadmap','*','WRITE','ALLOW','ROLE','palletizerBoss'); -INSERT INTO `ACL` VALUES (874,'Roadmap','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (875,'RoadmapStop','*','WRITE','ALLOW','ROLE','palletizerBoss'); -INSERT INTO `ACL` VALUES (876,'RoadmapStop','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (877,'TravelKgPercentage','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (878,'MrwConfig','getLabel','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (879,'AgencyMode','*','*','ALLOW','ROLE','deliveryAssistant'); -INSERT INTO `ACL` VALUES (880,'Collection','assignCollection','WRITE','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (881,'TrainingCourse','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (882,'TrainingCourseType','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (883,'TrainingCenter','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (884,'Worker','__get__trainingCourse','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (885,'WorkerTimeControl','addTimeEntry','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (886,'WorkerTimeControl','deleteTimeEntry','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (887,'WorkerTimeControl','updateTimeEntry','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (888,'WorkerTimeControl','weeklyHourRecordEmail','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (889,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (890,'WorkerTimeControl','updateMailState','WRITE','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (891,'TravelKgPercentage','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (892,'WorkerIncome','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (893,'PayrollComponent','*','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (894,'Worker','__get__incomes','*','ALLOW','ROLE','hr'); -INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (897,'WorkerLog','*','READ','ALLOW','ROLE','employee'); -INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system'); -INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier'); -INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier'); -INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier'); -INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production'); -INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier'); -INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production'); +INSERT INTO `ACL` VALUES (3,'Address','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (5,'AgencyService','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (9,'ClientObservation','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (11,'ContactChannel','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (13,'Employee','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (14,'PayMethod','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (16,'FakeProduction','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (17,'Warehouse','* ','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (20,'TicketState','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (24,'Delivery','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (25,'Zone','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (26,'ClientCredit','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (27,'ClientCreditLimit','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (30,'GreugeType','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (31,'Mandate','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (32,'MandateType','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (33,'Company','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (34,'Greuge','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (35,'AddressObservation','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (36,'ObservationType','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (37,'Greuge','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (38,'AgencyMode','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (39,'ItemTag','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (40,'ItemBotanical','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (41,'ItemBotanical','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (42,'ItemPlacement','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (43,'ItemPlacement','*','WRITE','ALLOW','ROLE','replenisher',NULL); +INSERT INTO `ACL` VALUES (44,'ItemPlacement','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (45,'ItemBarcode','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (46,'ItemBarcode','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (47,'ItemBarcode','*','WRITE','ALLOW','ROLE','replenisher',NULL); +INSERT INTO `ACL` VALUES (51,'ItemTag','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (53,'Item','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (54,'Item','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (55,'Recovery','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (56,'Recovery','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (58,'CreditClassification','*','*','ALLOW','ROLE','insurance',NULL); +INSERT INTO `ACL` VALUES (60,'CreditInsurance','*','*','ALLOW','ROLE','insurance',NULL); +INSERT INTO `ACL` VALUES (61,'InvoiceOut','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (63,'TicketObservation','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (65,'Sale','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (66,'TicketTracking','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (68,'TicketPackaging','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (69,'Packaging','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (70,'Packaging','*','WRITE','ALLOW','ROLE','logistic',NULL); +INSERT INTO `ACL` VALUES (72,'SaleComponent','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (73,'Expedition','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (74,'Expedition','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (75,'Expedition','*','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (76,'AnnualAverageInvoiced','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (77,'WorkerMana','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (78,'TicketTracking','*','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (79,'Ticket','state','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (80,'Sale','deleteSales','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (81,'Sale','moveToTicket','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (82,'Sale','updateQuantity','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (83,'Sale','updatePrice','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (84,'Sale','updateDiscount','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (85,'SaleTracking','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (86,'Order','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (87,'OrderRow','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (88,'ClientContact','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (89,'Sale','moveToNewTicket','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (90,'Sale','reserve','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (91,'TicketWeekly','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (94,'Agency','landsThatDay','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (96,'ClaimEnd','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (97,'ClaimEnd','*','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (98,'ClaimBeginning','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (102,'Claim','createFromSales','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss',NULL); +INSERT INTO `ACL` VALUES (105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss',NULL); +INSERT INTO `ACL` VALUES (106,'ItemBotanical','*','WRITE','ALLOW','ROLE','marketingBoss',NULL); +INSERT INTO `ACL` VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss',NULL); +INSERT INTO `ACL` VALUES (109,'UserConfig','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (110,'Accounting','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (111,'ClientLog','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (112,'Defaulter','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (113,'ClientRisk','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (114,'Receipt','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (115,'Receipt','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (116,'BankEntity','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (117,'ClientSample','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (118,'WorkerTeam','*','*','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (119,'Travel','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (120,'Travel','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (121,'Item','regularize','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (122,'TicketRequest','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (124,'Client','confirmTransaction','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (125,'Agency','getAgenciesWithWarehouse','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (127,'TicketLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (129,'TicketService','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (130,'Expedition','*','WRITE','ALLOW','ROLE','packager',NULL); +INSERT INTO `ACL` VALUES (131,'CreditInsurance','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (132,'CreditClassification','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (133,'ItemTag','*','WRITE','ALLOW','ROLE','marketingBoss',NULL); +INSERT INTO `ACL` VALUES (135,'ZoneGeo','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (136,'ZoneCalendar','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (137,'ZoneIncluded','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (138,'LabourHoliday','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (139,'LabourHolidayLegend','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (140,'LabourHolidayType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (141,'Zone','*','*','ALLOW','ROLE','logisticBoss',NULL); +INSERT INTO `ACL` VALUES (142,'ZoneCalendar','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (143,'ZoneIncluded','*','*','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (144,'Stowaway','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (145,'Ticket','getPossibleStowaways','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (147,'UserConfigView','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (148,'UserConfigView','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (149,'Sip','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (150,'Sip','*','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (151,'Department','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (152,'Department','*','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (154,'Route','*','WRITE','ALLOW','ROLE','delivery',NULL); +INSERT INTO `ACL` VALUES (155,'Calendar','*','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (156,'WorkerLabour','*','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (157,'Calendar','absences','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory',NULL); +INSERT INTO `ACL` VALUES (160,'TicketServiceType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (161,'TicketConfig','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (165,'TicketDms','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (168,'Worker','mySubordinates','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (169,'WorkerTimeControl','filter','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (171,'TicketServiceType','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (172,'Sms','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (173,'Sms','send','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (176,'Device','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (177,'Device','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (179,'ItemLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (180,'RouteLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (181,'Dms','removeFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (182,'Dms','uploadFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (183,'Dms','downloadFile','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (184,'Client','uploadFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (185,'ClientDms','removeFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (186,'ClientDms','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (187,'Ticket','uploadFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (190,'Route','updateVolume','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (191,'Agency','getLanded','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (192,'Agency','getShipped','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (194,'Postcode','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (195,'Ticket','addSale','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (196,'Dms','updateFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (197,'Dms','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (198,'ClaimDms','removeFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (199,'ClaimDms','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (200,'Claim','uploadFile','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (201,'Sale','updateConcept','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (202,'Claim','updateClaimAction','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (203,'UserPhone','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (204,'WorkerDms','removeFile','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (205,'WorkerDms','*','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (206,'Chat','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (207,'Chat','sendMessage','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (208,'Sale','recalculatePrice','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (209,'Ticket','recalculateComponents','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (211,'TravelLog','*','READ','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (212,'Thermograph','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (213,'TravelThermograph','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (214,'Entry','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (216,'TravelThermograph','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (218,'Intrastat','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','guest',NULL); +INSERT INTO `ACL` VALUES (226,'ClientObservation','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (227,'Address','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (228,'AddressObservation','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (230,'ClientCredit','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (231,'ClientContact','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (232,'ClientSample','*','READ','ALLOW','ROLE','trainee',NULL); +INSERT INTO `ACL` VALUES (233,'EntryLog','*','READ','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (234,'WorkerLog','find','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (235,'CustomsAgent','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (236,'Buy','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (237,'WorkerDms','filter','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (238,'Town','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (239,'Province','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (241,'SupplierContact','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (248,'RoleMapping','*','READ','ALLOW','ROLE','account',NULL); +INSERT INTO `ACL` VALUES (249,'UserPassword','*','READ','ALLOW','ROLE','account',NULL); +INSERT INTO `ACL` VALUES (250,'Town','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (251,'Province','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (252,'Supplier','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (253,'Supplier','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (254,'SupplierLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (256,'Image','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (257,'FixedPrice','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (258,'PayDem','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','$authenticated',NULL); +INSERT INTO `ACL` VALUES (265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss',NULL); +INSERT INTO `ACL` VALUES (266,'ZoneLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (267,'Genus','*','WRITE','ALLOW','ROLE','logisticBoss',NULL); +INSERT INTO `ACL` VALUES (268,'Specie','*','WRITE','ALLOW','ROLE','logisticBoss',NULL); +INSERT INTO `ACL` VALUES (269,'InvoiceOut','createPdf','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (270,'SupplierAddress','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (271,'SalesMonitor','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (272,'InvoiceInLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (273,'InvoiceInTax','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (274,'InvoiceInLog','*','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (275,'InvoiceOut','createManualInvoice','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (276,'InvoiceOut','globalInvoicing','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (278,'RoleInherit','*','WRITE','ALLOW','ROLE','grant',NULL); +INSERT INTO `ACL` VALUES (279,'MailAlias','*','READ','ALLOW','ROLE','marketing',NULL); +INSERT INTO `ACL` VALUES (283,'EntryObservation','*','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (284,'LdapConfig','*','*','ALLOW','ROLE','sysadmin',NULL); +INSERT INTO `ACL` VALUES (285,'SambaConfig','*','*','ALLOW','ROLE','sysadmin',NULL); +INSERT INTO `ACL` VALUES (286,'ACL','*','*','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (287,'AccessToken','*','*','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (293,'RoleInherit','*','*','ALLOW','ROLE','it',NULL); +INSERT INTO `ACL` VALUES (294,'RoleRole','*','*','ALLOW','ROLE','it',NULL); +INSERT INTO `ACL` VALUES (295,'AccountConfig','*','*','ALLOW','ROLE','sysadmin',NULL); +INSERT INTO `ACL` VALUES (296,'Collection','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (297,'Sale','clone','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (298,'InvoiceInDueDay','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (299,'Collection','setSaleQuantity','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (302,'AgencyTerm','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (303,'ClaimLog','*','READ','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (304,'Edi','updateData','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (305,'EducationLevel','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (306,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (307,'SupplierAgencyTerm','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (308,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (309,'Zone','getZoneClosing','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (310,'ExpeditionState','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (311,'Expense','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (312,'Expense','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (314,'SupplierActivity','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (315,'SupplierActivity','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (316,'Dms','deleteTrashFiles','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (317,'ClientUnpaid','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (318,'MdbVersion','*','*','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (319,'ItemType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (320,'ItemType','*','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (327,'Sale','clone','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (328,'Sale','clone','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (330,'ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (331,'ClaimObservation','*','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (332,'Client','setPassword','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (333,'Client','updateUser','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (334,'ShelvingLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (335,'ZoneExclusionGeo','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (336,'ZoneExclusionGeo','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (337,'Parking','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (338,'Shelving','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (339,'OsTicket','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (340,'OsTicketConfig','*','*','ALLOW','ROLE','it',NULL); +INSERT INTO `ACL` VALUES (341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (346,'Client','campaignMetricsPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (347,'Client','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (348,'Client','clientWelcomeHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (349,'Client','clientWelcomeEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (350,'Client','creditRequestPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (351,'Client','creditRequestHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (352,'Client','creditRequestEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (353,'Client','printerSetupHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (354,'Client','printerSetupEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (355,'Client','sepaCoreEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (356,'Client','letterDebtorPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (357,'Client','letterDebtorStHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (358,'Client','letterDebtorStEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (359,'Client','letterDebtorNdHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (360,'Client','letterDebtorNdEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (361,'Client','clientDebtStatementPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (362,'Client','clientDebtStatementHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (363,'Client','clientDebtStatementEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (364,'Client','incotermsAuthorizationPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (365,'Client','incotermsAuthorizationHtml','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (366,'Client','incotermsAuthorizationEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (367,'Client','consumptionSendQueued','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (368,'InvoiceOut','invoiceEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (369,'InvoiceOut','exportationPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (370,'InvoiceOut','sendQueued','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (371,'Ticket','invoiceCsvPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (372,'Ticket','invoiceCsvEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (373,'Supplier','campaignMetricsPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (374,'Supplier','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (375,'Travel','extraCommunityPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (376,'Travel','extraCommunityEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (377,'Entry','entryOrderPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (378,'OsTicket','osTicketReportEmail','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (379,'Item','buyerWasteEmail','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (380,'Claim','claimPickupPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (381,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (382,'Item','labelPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (383,'Sector','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (384,'Sector','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (385,'Route','driverRoutePdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','$owner',NULL); +INSERT INTO `ACL` VALUES (388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (389,'ClaimRma','*','READ','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (390,'ClaimRma','*','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (391,'Notification','*','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (392,'Boxing','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (393,'Url','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (394,'Url','*','WRITE','ALLOW','ROLE','it',NULL); +INSERT INTO `ACL` VALUES (395,'ItemShelving','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (396,'ItemShelving','*','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (397,'ItemShelvingPlacementSupplyStock','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (398,'NotificationQueue','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (399,'InvoiceOut','clientsToInvoice','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (400,'InvoiceOut','invoiceClient','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (401,'Sale','editTracked','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (402,'Sale','editFloramondo','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (403,'Receipt','balanceCompensationEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (404,'Receipt','balanceCompensationPdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (405,'Ticket','getTicketsFuture','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (406,'Ticket','merge','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (407,'Sale','editFloramondo','WRITE','ALLOW','ROLE','logistic',NULL); +INSERT INTO `ACL` VALUES (408,'ZipConfig','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (409,'Item','*','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (410,'Sale','editCloned','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (411,'Sale','editCloned','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (414,'MdbVersion','*','READ','ALLOW','ROLE','$everyone',NULL); +INSERT INTO `ACL` VALUES (416,'TicketLog','getChanges','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (417,'Ticket','getTicketsAdvance','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (418,'EntryLog','*','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (419,'Sale','editTracked','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (420,'MdbBranch','*','READ','ALLOW','ROLE','$everyone',NULL); +INSERT INTO `ACL` VALUES (421,'ItemShelvingSale','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (422,'Docuware','checkFile','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (423,'Docuware','download','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (424,'Docuware','upload','WRITE','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (425,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (426,'TpvTransaction','confirm','WRITE','ALLOW','ROLE','$everyone',NULL); +INSERT INTO `ACL` VALUES (427,'TpvTransaction','start','WRITE','ALLOW','ROLE','$authenticated',NULL); +INSERT INTO `ACL` VALUES (428,'TpvTransaction','end','WRITE','ALLOW','ROLE','$authenticated',NULL); +INSERT INTO `ACL` VALUES (429,'ItemConfig','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (431,'Tag','onSubmit','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (432,'Worker','updateAttributes','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (433,'Worker','createAbsence','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (434,'Worker','updateAbsence','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (435,'Worker','deleteAbsence','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (436,'Worker','new','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (438,'Client','getClientOrSupplierReference','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (439,'NotificationSubscription','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (440,'NotificationAcl','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (441,'MdbApp','*','READ','ALLOW','ROLE','$everyone',NULL); +INSERT INTO `ACL` VALUES (442,'MdbApp','*','*','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (443,'ItemConfig','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (444,'DeviceProduction','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (445,'DeviceProductionModels','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (446,'DeviceProductionState','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (447,'DeviceProductionUser','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (448,'DeviceProduction','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (449,'DeviceProductionModels','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (450,'DeviceProductionState','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (451,'DeviceProductionUser','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (452,'Worker','deallocatePDA','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (453,'Worker','allocatePDA','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (454,'Worker','deallocatePDA','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (455,'Worker','allocatePDA','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (456,'Zone','*','*','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (458,'Operator','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (459,'Operator','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (460,'InvoiceIn','getSerial','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (461,'Ticket','saveSign','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (462,'InvoiceOut','negativeBases','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (463,'InvoiceOut','negativeBasesCsv','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (464,'WorkerObservation','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (465,'ClientInforma','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (466,'ClientInforma','*','WRITE','ALLOW','ROLE','financial',NULL); +INSERT INTO `ACL` VALUES (467,'Receipt','receiptEmail','*','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (468,'Client','setRating','WRITE','ALLOW','ROLE','financial',NULL); +INSERT INTO `ACL` VALUES (470,'Client','addressesPropagateRe','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (471,'Client','canBeInvoiced','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (472,'Client','canCreateTicket','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (473,'Client','consumption','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (474,'Client','createAddress','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (475,'Client','createWithUser','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (476,'Client','extendedListFilter','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (477,'Client','getAverageInvoiced','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (478,'Client','getCard','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (479,'Client','getDebt','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (480,'Client','getMana','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (481,'Client','transactions','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (482,'Client','hasCustomerRole','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (483,'Client','isValidClient','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (484,'Client','lastActiveTickets','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (485,'Client','sendSms','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (486,'Client','setPassword','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (487,'Client','summary','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (488,'Client','updateAddress','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (489,'Client','updateFiscalData','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (491,'Client','uploadFile','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (492,'Client','campaignMetricsPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (493,'Client','campaignMetricsEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (494,'Client','clientWelcomeHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (495,'Client','clientWelcomeEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (496,'Client','printerSetupHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (497,'Client','printerSetupEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (498,'Client','sepaCoreEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (499,'Client','letterDebtorPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (500,'Client','letterDebtorStHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (501,'Client','letterDebtorStEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (502,'Client','letterDebtorNdHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (503,'Client','letterDebtorNdEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (504,'Client','clientDebtStatementPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (505,'Client','clientDebtStatementHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (506,'Client','clientDebtStatementEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (507,'Client','creditRequestPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (508,'Client','creditRequestHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (509,'Client','creditRequestEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (510,'Client','incotermsAuthorizationPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (511,'Client','incotermsAuthorizationHtml','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (512,'Client','incotermsAuthorizationEmail','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (513,'Client','consumptionSendQueued','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (514,'Client','filter','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (515,'Client','getClientOrSupplierReference','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (516,'Client','upsert','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (518,'Client','replaceById','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (519,'Client','updateAttributes','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (520,'Client','updateAttributes','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (521,'Client','deleteById','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (522,'Client','replaceOrCreate','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (523,'Client','updateAll','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (527,'VnUser','acl','READ','ALLOW','ROLE','guest',NULL); +INSERT INTO `ACL` VALUES (528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account',NULL); +INSERT INTO `ACL` VALUES (530,'Account','exists','READ','ALLOW','ROLE','account',NULL); +INSERT INTO `ACL` VALUES (531,'Account','exists','READ','ALLOW','ROLE','account',NULL); +INSERT INTO `ACL` VALUES (532,'UserLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (533,'RoleLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (534,'WagonType','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (535,'WagonTypeColor','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (536,'WagonTypeTray','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (537,'WagonConfig','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (538,'CollectionWagon','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (539,'CollectionWagonTicket','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (540,'Wagon','*','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (541,'WagonType','createWagonType','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (542,'WagonType','deleteWagonType','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (543,'WagonType','editWagonType','*','ALLOW','ROLE','productionAssi',NULL); +INSERT INTO `ACL` VALUES (544,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (545,'Agency','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (546,'Agency','seeExpired','READ','ALLOW','ROLE','coolerAssist',NULL); +INSERT INTO `ACL` VALUES (547,'WorkerLog','models','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (548,'Ticket','editDiscount','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (549,'Ticket','editDiscount','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (550,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (551,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (552,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (553,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (554,'Ticket','deleteTicketWithPartPrepared','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (555,'Ticket','editZone','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (556,'State','editableStates','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (557,'State','seeEditableStates','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (558,'State','seeEditableStates','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (559,'State','isSomeEditable','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (560,'State','isAllEditable','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (561,'State','isAllEditable','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (562,'Agency','seeExpired','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (563,'Agency','seeExpired','READ','ALLOW','ROLE','productionBoss',NULL); +INSERT INTO `ACL` VALUES (564,'Claim','createAfterDeadline','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (565,'Client','editAddressLogifloraAllowed','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (566,'Client','editFiscalDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (567,'Client','editVerifiedDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (568,'Client','editCredit','WRITE','ALLOW','ROLE','financialBoss',NULL); +INSERT INTO `ACL` VALUES (569,'Client','zeroCreditEditor','WRITE','ALLOW','ROLE','financialBoss',NULL); +INSERT INTO `ACL` VALUES (570,'InvoiceOut','canCreatePdf','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial',NULL); +INSERT INTO `ACL` VALUES (572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss',NULL); +INSERT INTO `ACL` VALUES (573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (574,'Claim','editPickup','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (581,'Claim','updateClaimDestination','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (582,'Claim','downloadFile','READ','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (583,'Claim','deleteById','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (585,'Claim','logs','READ','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (586,'Ticket','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (587,'Ticket','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (588,'Ticket','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (589,'Ticket','getVolume','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (590,'Ticket','getTotalVolume','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (591,'Ticket','summary','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (592,'Ticket','priceDifference','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (593,'Ticket','componentUpdate','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (594,'Ticket','new','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (595,'Ticket','isEditable','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (596,'Ticket','setDeleted','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (597,'Ticket','restore','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (598,'Ticket','getSales','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (599,'Ticket','getSalesPersonMana','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (600,'Ticket','filter','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (601,'Ticket','makeInvoice','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (602,'Ticket','updateEditableTicket','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (603,'Ticket','updateDiscount','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (604,'Ticket','transferSales','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (606,'Ticket','isLocked','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (607,'Ticket','freightCost','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery',NULL); +INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (615,'Worker','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (620,'Worker','activeWithRole','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (621,'Worker','uploadFile','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (622,'Worker','contracts','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (623,'Worker','holidays','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (624,'Worker','activeContract','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (625,'Worker','activeWithInheritedRole','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (626,'Ticket','collectionLabel','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss',NULL); +INSERT INTO `ACL` VALUES (630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss',NULL); +INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss',NULL); +INSERT INTO `ACL` VALUES (639,'Agency','seeExpired','READ','ALLOW','ROLE','logisticAssistant',NULL); +INSERT INTO `ACL` VALUES (654,'Ticket','editZone','WRITE','ALLOW','ROLE','logisticAssistant',NULL); +INSERT INTO `ACL` VALUES (655,'Entry','addFromPackaging','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (656,'Entry','addFromBuy','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (657,'Supplier','getItemsPackaging','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (658,'Ticket','closeAll','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (659,'Account','*','*','ALLOW','ROLE','developerBoss',NULL); +INSERT INTO `ACL` VALUES (664,'MailForward','*','*','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (667,'VnUser','*','*','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (668,'VnUser','__get__preview','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (669,'VnUser','preview','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (670,'VnUser','create','*','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (672,'PackingSiteAdvanced','*','*','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (673,'InvoiceOut','makePdfAndNotify','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (674,'InvoiceOutConfig','*','READ','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (676,'Ticket','invoiceTickets','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (680,'MailAliasAccount','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (683,'MailAliasAccount','canEditAlias','WRITE','ALLOW','ROLE','developerBoss',NULL); +INSERT INTO `ACL` VALUES (684,'WorkerDisableExcluded','*','READ','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (685,'WorkerDisableExcluded','*','WRITE','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (686,'MailForward','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (687,'ClientSms','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (688,'ClientSms','create','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (698,'Ticket','canEditWeekly','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (702,'Ticket','docuwareDownload','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (703,'Worker','search','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (704,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery',NULL); +INSERT INTO `ACL` VALUES (705,'SaleGroupDetail','deleteById','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (706,'Ticket','setDeleted','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (707,'DeviceLog','create','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (708,'Collection','getTickets','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (709,'Client','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (710,'Client','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (711,'Client','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (712,'Client','exists','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (713,'Client','__get__addresses','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (714,'ExpeditionMistakeType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (715,'WorkerMistakeType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (716,'ExpeditionMistake','*','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (717,'WorkerMistake','*','WRITE','ALLOW','ROLE','coolerAssist',NULL); +INSERT INTO `ACL` VALUES (718,'MistakesTypes','*','WRITE','ALLOW','ROLE','coolerAssist',NULL); +INSERT INTO `ACL` VALUES (719,'MistakeType','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (720,'MachineWorker','*','READ','ALLOW','ROLE','coolerAssist',NULL); +INSERT INTO `ACL` VALUES (721,'Printer','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (722,'SaleMistake','*','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (723,'Item','setVisibleDiscard','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (724,'Address','getAddress','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (725,'Account','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (726,'Account','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (727,'Account','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (728,'Account','exists','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (729,'Sale','clone','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (730,'Ticket','setDeleted','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (732,'Sale','isInPreparing','*','ALLOW','ROLE','reviewer',NULL); +INSERT INTO `ACL` VALUES (733,'Train','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (734,'WorkerDepartment','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (735,'VnUser','higherPrivileges','*','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (736,'VnUser','mediumPrivileges','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (737,'VnUser','updateUser','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (738,'TicketCollection','*','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (739,'Worker','setPassword','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (740,'Url','getByUser','READ','ALLOW','ROLE','$everyone',NULL); +INSERT INTO `ACL` VALUES (741,'Claim','__get__lines','READ','ALLOW','ROLE','claimViewer',NULL); +INSERT INTO `ACL` VALUES (742,'AddressShortage','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (743,'Claim','filter','READ','ALLOW','ROLE','claimViewer',NULL); +INSERT INTO `ACL` VALUES (744,'Claim','find','READ','ALLOW','ROLE','claimViewer',NULL); +INSERT INTO `ACL` VALUES (745,'Claim','findById','READ','ALLOW','ROLE','claimViewer',NULL); +INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimViewer',NULL); +INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL); +INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (754,'Route','find','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (755,'Route','findById','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (759,'Route','cmr','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (760,'Route','downloadCmrsZip','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (764,'Route','getDeliveryPoint','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (765,'Route','cmrs','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (766,'Route','getSuggestedTickets','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (767,'Route','getTickets','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (768,'Route','guessPriority','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (769,'Route','insertTicket','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (770,'Route','getDeliveryPoint','READ','ALLOW','ROLE','deliveryBoss',NULL); +INSERT INTO `ACL` VALUES (771,'Route','summary','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (772,'Route','getExpeditionSummary','READ','ALLOW','ROLE','delivery',NULL); +INSERT INTO `ACL` VALUES (773,'WorkerTimeControl','login','READ','ALLOW','ROLE','timeControl',NULL); +INSERT INTO `ACL` VALUES (774,'WorkerTimeControl','getClockIn','READ','ALLOW','ROLE','timeControl',NULL); +INSERT INTO `ACL` VALUES (775,'WorkerTimeControl','clockIn','WRITE','ALLOW','ROLE','timeControl',NULL); +INSERT INTO `ACL` VALUES (776,'WorkerTimeControl','addTimeEntry','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (777,'WorkerTimeControl','deleteTimeEntry','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (778,'WorkerTimeControl','updateTimeEntry','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (779,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (780,'WorkerTimeControl','updateMailState','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (781,'WorkerTimeControl','weeklyHourRecordEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (782,'WorkerTimeControl','getMailStates','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (783,'WorkerTimeControl','resendWeeklyHourEmail','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (784,'VnRole','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (785,'VnRole','*','WRITE','ALLOW','ROLE','it',NULL); +INSERT INTO `ACL` VALUES (786,'State','isAllEditable','READ','ALLOW','ROLE','delivery',NULL); +INSERT INTO `ACL` VALUES (787,'Ticket','makePdfList','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (788,'Ticket','invoiceTicketsAndPdf','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (789,'InvoiceIn','*','READ','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (790,'InvoiceIn','getSerial','READ','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (791,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (792,'InvoiceInCorrection','*','*','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (793,'Supplier','updateAllFiscalData','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (794,'Supplier','updateFiscalData','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (795,'Ticket','myLastModified','*','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (796,'MrwConfig','cancelShipment','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (797,'MrwConfig','createShipment','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (798,'MailAliasAccount','*','*','ALLOW','ROLE','itManagement',NULL); +INSERT INTO `ACL` VALUES (799,'Ticket','saveCmr','*','ALLOW','ROLE','developer',NULL); +INSERT INTO `ACL` VALUES (800,'EntryDms','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (801,'MailAliasAccount','create','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (802,'MailAliasAccount','deleteById','WRITE','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (804,'DeviceProduction','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (805,'Collection','assign','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (806,'ExpeditionPallet','getPallet','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (807,'MachineWorker','updateInTime','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (808,'MobileAppVersionControl','getVersion','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (809,'SaleTracking','delete','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (810,'SaleTracking','updateTracking','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (811,'SaleTracking','setPicked','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (813,'Sale','getFromSectorCollection','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (814,'ItemBarcode','delete','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (815,'WorkerActivityType','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (816,'WorkerActivity','*','*','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (817,'ParkingLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (818,'ExpeditionPallet','*','*','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (819,'Ticket','addSaleByCode','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (820,'TicketCollection','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (821,'Ticket','clone','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (822,'SupplierDms','*','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (823,'MailAlias','*','*','ALLOW','ROLE','developerBoss',NULL); +INSERT INTO `ACL` VALUES (824,'ItemShelving','hasItemOlder','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (825,'Application','getEnumValues','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (826,'Ticket','editZone','WRITE','ALLOW','ROLE','salesAssistant',NULL); +INSERT INTO `ACL` VALUES (827,'TicketWeekly','deleteById','WRITE','ALLOW','ROLE','buyerBoss',NULL); +INSERT INTO `ACL` VALUES (828,'TicketWeekly','upsert','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (830,'InvoiceIn','*','READ','ALLOW','ROLE','deliveryBoss',NULL); +INSERT INTO `ACL` VALUES (831,'InvoiceIn','exchangeRateUpdate','*','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (832,'AgencyLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (833,'AgencyWorkCenter','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (835,'Agency','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (836,'Agency','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (837,'AgencyWorkCenter','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (838,'Worker','getAvailablePda','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (839,'Locker','__get__codes','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (840,'Locker','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (841,'Locker','*','*','ALLOW','ROLE','productionBoss',NULL); +INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss',NULL); +INSERT INTO `ACL` VALUES (846,'Ticket','refund','WRITE','ALLOW','ROLE','logistic',NULL); +INSERT INTO `ACL` VALUES (847,'RouteConfig','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (848,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (849,'InvoiceIn','clone','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (850,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (851,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (852,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (853,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (854,'InvoiceIn','toUnbook','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (855,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (856,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (857,'InvoiceIn','clone','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (858,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (859,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (860,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (861,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (862,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (863,'InvoiceIn','create','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (864,'InvoiceIn','create','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (865,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (866,'InvoiceOut','download','READ','ALLOW','ROLE','$owner',NULL); +INSERT INTO `ACL` VALUES (867,'InvoiceIn','*','READ','ALLOW','ROLE','maintenanceBoss',NULL); +INSERT INTO `ACL` VALUES (868,'InvoiceIn','*','READ','ALLOW','ROLE','maintenanceBos',NULL); +INSERT INTO `ACL` VALUES (869,'Ticket','editZone','WRITE','ALLOW','ROLE','buyer',NULL); +INSERT INTO `ACL` VALUES (870,'Entry','find','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (871,'RoadmapAddress','*','WRITE','ALLOW','ROLE','palletizerBoss',NULL); +INSERT INTO `ACL` VALUES (872,'RoadmapAddress','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (873,'Roadmap','*','WRITE','ALLOW','ROLE','palletizerBoss',NULL); +INSERT INTO `ACL` VALUES (874,'Roadmap','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (875,'RoadmapStop','*','WRITE','ALLOW','ROLE','palletizerBoss',NULL); +INSERT INTO `ACL` VALUES (876,'RoadmapStop','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (877,'TravelKgPercentage','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (878,'MrwConfig','getLabel','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (879,'AgencyMode','*','*','ALLOW','ROLE','deliveryAssistant',NULL); +INSERT INTO `ACL` VALUES (880,'Collection','assignCollection','WRITE','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (881,'TrainingCourse','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (882,'TrainingCourseType','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (883,'TrainingCenter','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (884,'Worker','__get__trainingCourse','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (885,'WorkerTimeControl','addTimeEntry','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (886,'WorkerTimeControl','deleteTimeEntry','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (887,'WorkerTimeControl','updateTimeEntry','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (888,'WorkerTimeControl','weeklyHourRecordEmail','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (889,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (890,'WorkerTimeControl','updateMailState','WRITE','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (891,'TravelKgPercentage','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (892,'WorkerIncome','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (893,'PayrollComponent','*','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (894,'Worker','__get__incomes','*','ALLOW','ROLE','hr',NULL); +INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (897,'WorkerLog','*','READ','ALLOW','ROLE','employee',NULL); +INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system',NULL); +INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier',NULL); +INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL); +INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier',NULL); +INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier',NULL); +INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL); INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee'); INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee'); @@ -2395,7 +2402,7 @@ INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1 INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (44,'management','GERENCIA',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); @@ -2408,35 +2415,35 @@ INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0 INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL); INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,1,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (61,NULL,'VNH',92,95,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',98,99,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL); +INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',0,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL); INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (89,NULL,'COORDINACION',102,103,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (90,NULL,'TRAILER',93,94,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); -INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',1,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL); +INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); +INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',0,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL); INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL); +INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',0,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL); INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',87,88,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL); -INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL); +INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',0,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL); +INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',0,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL); INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',106,107,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (137,'sorter','SORTER',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL); +INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',0,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL); INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',69,70,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); @@ -2531,172 +2538,6 @@ INSERT INTO `siiTypeInvoiceOut` VALUES (7,'R3','Factura rectificativa (Art. 80.4 INSERT INTO `siiTypeInvoiceOut` VALUES (8,'R4','Factura rectificativa (Resto)'); INSERT INTO `siiTypeInvoiceOut` VALUES (9,'R5','Factura rectificativa en facturas simplificadas'); -INSERT INTO `silexACL` VALUES (1,'workerTimeControl','clockIn','$everyone'); -INSERT INTO `silexACL` VALUES (2,'workerTimeControl','getClockIn','$everyone'); -INSERT INTO `silexACL` VALUES (3,'workerTimeControl','login','$everyone'); -INSERT INTO `silexACL` VALUES (4,'security','device_checkLogin','employee'); -INSERT INTO `silexACL` VALUES (5,'security','getVersion','employee'); -INSERT INTO `silexACL` VALUES (6,'security','login','employee'); -INSERT INTO `silexACL` VALUES (7,'delivery','addNote','employee'); -INSERT INTO `silexACL` VALUES (8,'delivery','expeditionState_add','employee'); -INSERT INTO `silexACL` VALUES (9,'delivery','expeditionState_addByExpedition','employee'); -INSERT INTO `silexACL` VALUES (10,'delivery','expeditionState_addByExpeditionMulti','employee'); -INSERT INTO `silexACL` VALUES (11,'delivery','expeditionState_addByRoute','employee'); -INSERT INTO `silexACL` VALUES (12,'delivery','expedition_getLog','employee'); -INSERT INTO `silexACL` VALUES (13,'delivery','getExpeditionFromRoute','employee'); -INSERT INTO `silexACL` VALUES (14,'delivery','getInfo','employee'); -INSERT INTO `silexACL` VALUES (15,'delivery','getInfoCompany','employee'); -INSERT INTO `silexACL` VALUES (16,'delivery','getInfoFreelance','employee'); -INSERT INTO `silexACL` VALUES (17,'delivery','getWorkers','employee'); -INSERT INTO `silexACL` VALUES (18,'delivery','get_routes','employee'); -INSERT INTO `silexACL` VALUES (19,'delivery','get_tickets','employee'); -INSERT INTO `silexACL` VALUES (20,'delivery','get_version','employee'); -INSERT INTO `silexACL` VALUES (21,'delivery','saveLoadersWorkers','employee'); -INSERT INTO `silexACL` VALUES (22,'delivery','save_sign','employee'); -INSERT INTO `silexACL` VALUES (23,'delivery','setRouteOk','employee'); -INSERT INTO `silexACL` VALUES (24,'delivery','updateExpeditionChecked','employee'); -INSERT INTO `silexACL` VALUES (25,'delivery','update_routes','employee'); -INSERT INTO `silexACL` VALUES (26,'almacennew','barcodes_edit','employee'); -INSERT INTO `silexACL` VALUES (27,'almacennew','barcodeToItem','employee'); -INSERT INTO `silexACL` VALUES (28,'almacennew','buffer_setTypeByName','employee'); -INSERT INTO `silexACL` VALUES (29,'almacennew','buy_updateGrouping','employee'); -INSERT INTO `silexACL` VALUES (30,'almacennew','buy_updatePacking','employee'); -INSERT INTO `silexACL` VALUES (31,'almacennew','checkRouteExpeditionScanPut','employee'); -INSERT INTO `silexACL` VALUES (32,'almacennew','clearShelvingList','employee'); -INSERT INTO `silexACL` VALUES (33,'almacennew','collectionAddItem','employee'); -INSERT INTO `silexACL` VALUES (34,'almacennew','collectionGet','employee'); -INSERT INTO `silexACL` VALUES (35,'almacennew','collectionIncreaseQuantity','employee'); -INSERT INTO `silexACL` VALUES (36,'almacennew','collectionMissingTrash','employee'); -INSERT INTO `silexACL` VALUES (37,'almacennew','collectionNew','employee'); -INSERT INTO `silexACL` VALUES (38,'almacennew','collectionStickerPrint','employee'); -INSERT INTO `silexACL` VALUES (39,'almacennew','collection_getTickets','employee'); -INSERT INTO `silexACL` VALUES (40,'almacennew','collection_printSticker','employee'); -INSERT INTO `silexACL` VALUES (41,'almacennew','department_getHasMistake','employee'); -INSERT INTO `silexACL` VALUES (42,'almacennew','deviceLog_add','employee'); -INSERT INTO `silexACL` VALUES (43,'almacennew','deviceProductionUser_getWorker','employee'); -INSERT INTO `silexACL` VALUES (44,'almacennew','deviceProduction_getnameDevice','employee'); -INSERT INTO `silexACL` VALUES (45,'almacennew','expeditionLoading_add','employee'); -INSERT INTO `silexACL` VALUES (46,'almacennew','expeditionPalletDel','employee'); -INSERT INTO `silexACL` VALUES (47,'almacennew','expeditionPalletList','employee'); -INSERT INTO `silexACL` VALUES (48,'almacennew','expeditionPalletPrintSet','employee'); -INSERT INTO `silexACL` VALUES (49,'almacennew','expeditionPalletView','employee'); -INSERT INTO `silexACL` VALUES (50,'almacennew','expeditionScanAdd','employee'); -INSERT INTO `silexACL` VALUES (51,'almacennew','expeditionScanDel','employee'); -INSERT INTO `silexACL` VALUES (52,'almacennew','expeditionScanList','employee'); -INSERT INTO `silexACL` VALUES (53,'almacennew','expeditionScanPut','employee'); -INSERT INTO `silexACL` VALUES (54,'almacennew','expeditionState_addByPallet','employee'); -INSERT INTO `silexACL` VALUES (55,'almacennew','expeditionTruckAdd','employee'); -INSERT INTO `silexACL` VALUES (56,'almacennew','expeditionTruckList','employee'); -INSERT INTO `silexACL` VALUES (57,'almacennew','expedition_getState','employee'); -INSERT INTO `silexACL` VALUES (58,'almacennew','expedition_scan','employee'); -INSERT INTO `silexACL` VALUES (59,'almacennew','faultsReview','employee'); -INSERT INTO `silexACL` VALUES (60,'almacennew','faultsReview_isChecked','employee'); -INSERT INTO `silexACL` VALUES (61,'almacennew','getItemUbication','employee'); -INSERT INTO `silexACL` VALUES (62,'almacennew','get_ItemPackingType','employee'); -INSERT INTO `silexACL` VALUES (63,'almacennew','itemDiary','employee'); -INSERT INTO `silexACL` VALUES (64,'almacennew','itemPlacementSupplyAiming','employee'); -INSERT INTO `silexACL` VALUES (65,'almacennew','itemPlacementSupplyCloseOrder','employee'); -INSERT INTO `silexACL` VALUES (66,'almacennew','itemPlacementSupplyGetOrder','employee'); -INSERT INTO `silexACL` VALUES (68,'almacennew','itemShelvingBuyerGet','employee'); -INSERT INTO `silexACL` VALUES (69,'almacennew','itemShelvingBuyerTask','employee'); -INSERT INTO `silexACL` VALUES (70,'almacennew','itemShelvingDelete','employee'); -INSERT INTO `silexACL` VALUES (71,'almacennew','itemShelvingList','employee'); -INSERT INTO `silexACL` VALUES (72,'almacennew','itemShelvingLog_get','employee'); -INSERT INTO `silexACL` VALUES (73,'almacennew','itemShelvingMake','employee'); -INSERT INTO `silexACL` VALUES (74,'almacennew','itemShelvingMakeEdit','employee'); -INSERT INTO `silexACL` VALUES (75,'almacennew','itemShelvingMake_multi','employee'); -INSERT INTO `silexACL` VALUES (76,'almacennew','itemShelvingPlacementSupplyAdd','employee'); -INSERT INTO `silexACL` VALUES (77,'almacennew','itemShelvingSaleSupplyAdd','employee'); -INSERT INTO `silexACL` VALUES (78,'almacennew','itemShelvingStarsUpdate','employee'); -INSERT INTO `silexACL` VALUES (79,'almacennew','itemShelvingTransfer','employee'); -INSERT INTO `silexACL` VALUES (80,'almacennew','itemShelving_addByClaim','employee'); -INSERT INTO `silexACL` VALUES (81,'almacennew','itemShelving_filterBuyer','employee'); -INSERT INTO `silexACL` VALUES (82,'almacennew','itemShelving_getSaleDate','employee'); -INSERT INTO `silexACL` VALUES (83,'almacennew','itemTrash','employee'); -INSERT INTO `silexACL` VALUES (84,'almacennew','item_card','employee'); -INSERT INTO `silexACL` VALUES (85,'almacennew','item_getSimilar','employee'); -INSERT INTO `silexACL` VALUES (86,'almacennew','item_placement_save','employee'); -INSERT INTO `silexACL` VALUES (87,'almacennew','item_saveReference','employee'); -INSERT INTO `silexACL` VALUES (88,'almacennew','item_updatePackingShelve','employee'); -INSERT INTO `silexACL` VALUES (89,'almacennew','machineWorker_add','employee'); -INSERT INTO `silexACL` VALUES (90,'almacennew','machineWorker_getHistorical','employee'); -INSERT INTO `silexACL` VALUES (91,'almacennew','machineWorker_update','employee'); -INSERT INTO `silexACL` VALUES (92,'almacennew','machineWorker_Worker','employee'); -INSERT INTO `silexACL` VALUES (93,'almacennew','machine_checkPlate','employee'); -INSERT INTO `silexACL` VALUES (94,'almacennew','machine_getWorkerPlate','employee'); -INSERT INTO `silexACL` VALUES (95,'almacennew','mistakeType','employee'); -INSERT INTO `silexACL` VALUES (96,'almacennew','printer_get','employee'); -INSERT INTO `silexACL` VALUES (97,'almacennew','qr_getCall','developer'); -INSERT INTO `silexACL` VALUES (98,'almacennew','saleMistakeAdd','employee'); -INSERT INTO `silexACL` VALUES (99,'almacennew','saleMove','employee'); -INSERT INTO `silexACL` VALUES (100,'almacennew','saleParking_add','employee'); -INSERT INTO `silexACL` VALUES (101,'almacennew','saleTrackingDel','employee'); -INSERT INTO `silexACL` VALUES (102,'almacennew','saleTrackingReplace','employee'); -INSERT INTO `silexACL` VALUES (103,'almacennew','saleTracking_add','employee'); -INSERT INTO `silexACL` VALUES (104,'almacennew','saleTracking_addPrevOK','employee'); -INSERT INTO `silexACL` VALUES (105,'almacennew','saleTracking_updateIsChecked','employee'); -INSERT INTO `silexACL` VALUES (106,'almacennew','sectorCollectionSaleGroup_add','employee'); -INSERT INTO `silexACL` VALUES (107,'almacennew','sectorCollection_get','employee'); -INSERT INTO `silexACL` VALUES (108,'almacennew','sectorCollection_getSale','employee'); -INSERT INTO `silexACL` VALUES (109,'almacennew','sectorCollection_new','employee'); -INSERT INTO `silexACL` VALUES (110,'almacennew','sector_get','employee'); -INSERT INTO `silexACL` VALUES (111,'almacennew','shelvingChange','employee'); -INSERT INTO `silexACL` VALUES (112,'almacennew','shelvingLog_get','employee'); -INSERT INTO `silexACL` VALUES (113,'almacennew','shelvingPark','employee'); -INSERT INTO `silexACL` VALUES (114,'almacennew','shelvingParking_get','employee'); -INSERT INTO `silexACL` VALUES (115,'almacennew','shelvingPriorityUpdate','employee'); -INSERT INTO `silexACL` VALUES (116,'almacennew','sip_getExtension','employee'); -INSERT INTO `silexACL` VALUES (117,'almacennew','ticketCollection_setUsedShelves','employee'); -INSERT INTO `silexACL` VALUES (118,'almacennew','ticketOrCollection_checkFullyControlled','employee'); -INSERT INTO `silexACL` VALUES (119,'almacennew','ticketToPrePrepare','employee'); -INSERT INTO `silexACL` VALUES (120,'almacennew','ticket_checkFullyControlled','employee'); -INSERT INTO `silexACL` VALUES (121,'almacennew','ticket_setState','employee'); -INSERT INTO `silexACL` VALUES (122,'almacennew','update_ItemPackingType','employee'); -INSERT INTO `silexACL` VALUES (123,'almacennew','workerMachinery_isRegistered','employee'); -INSERT INTO `silexACL` VALUES (124,'almacennew','workerMistakeType_get','employee'); -INSERT INTO `silexACL` VALUES (125,'almacennew','workerMistake_Add','coolerBoss'); -INSERT INTO `silexACL` VALUES (126,'almacennew','workerShelving_add','employee'); -INSERT INTO `silexACL` VALUES (127,'almacennew','workerShelving_delete','employee'); -INSERT INTO `silexACL` VALUES (128,'almacennew','worker_getFromHasMistake','employee'); -INSERT INTO `silexACL` VALUES (129,'almacennew','worker_getId','employee'); -INSERT INTO `silexACL` VALUES (130,'almacennew','worker_getPrinter','employee'); -INSERT INTO `silexACL` VALUES (131,'almacennew','worker_getSector','employee'); -INSERT INTO `silexACL` VALUES (132,'almacennew','worker_updatePrinter','employee'); -INSERT INTO `silexACL` VALUES (133,'almacennew','worker_updateSector','employee'); -INSERT INTO `silexACL` VALUES (134,'almacennew','itemShelving_updateFromSale','employee'); -INSERT INTO `silexACL` VALUES (135,'almacennew','collection_getUncheckedTicket','employee'); -INSERT INTO `silexACL` VALUES (136,'almacennew','itemShelving_return','employee'); -INSERT INTO `silexACL` VALUES (137,'almacennew','itemShelving_merge','employee'); -INSERT INTO `silexACL` VALUES (139,'delivery','get_expeditionsSummary','employee'); -INSERT INTO `silexACL` VALUES (140,'almacennew','cmrExpeditionPallet_add','employee'); -INSERT INTO `silexACL` VALUES (141,'delivery','route_getExpeditionSummary','employee'); -INSERT INTO `silexACL` VALUES (142,'almacennew','item_saveStems','employee'); -INSERT INTO `silexACL` VALUES (143,'almacennew','debug_add','employee'); -INSERT INTO `silexACL` VALUES (144,'almacennew','operator_getNumberOfWagons','employee'); -INSERT INTO `silexACL` VALUES (145,'almacennew','operator_add','employee'); -INSERT INTO `silexACL` VALUES (146,'almacennew','expeditionPallet_get','employee'); -INSERT INTO `silexACL` VALUES (147,'almacennew','worker_isF11Allowed','employee'); -INSERT INTO `silexACL` VALUES (148,'almacennew','train_get','employee'); -INSERT INTO `silexACL` VALUES (149,'almacennew','saleTracking_mark','employee'); -INSERT INTO `silexACL` VALUES (150,'almacennew','operator_updateItemPackingType','employee'); -INSERT INTO `silexACL` VALUES (151,'almacennew','operator_updateTrain','employee'); -INSERT INTO `silexACL` VALUES (152,'almacennew','operator_getTrain','employee'); -INSERT INTO `silexACL` VALUES (153,'almacennew','operator_getItemPackingType','employee'); -INSERT INTO `silexACL` VALUES (154,'almacennew','collection_assign','employee'); -INSERT INTO `silexACL` VALUES (155,'almacennew','itemPacking_get','employee'); -INSERT INTO `silexACL` VALUES (156,'almacennew','shelvingLog_add','employee'); -INSERT INTO `silexACL` VALUES (157,'almacennew','collection_get','employee'); -INSERT INTO `silexACL` VALUES (158,'delivery','get_routesFromExpedition','employee'); -INSERT INTO `silexACL` VALUES (160,'almacennew','expeditionMistakeType_get','employee'); -INSERT INTO `silexACL` VALUES (161,'almacennew','expeditionMistake_add','employee'); -INSERT INTO `silexACL` VALUES (162,'almacennew','itemShelving_addList','employee'); -INSERT INTO `silexACL` VALUES (163,'almacennew','cmrPallet_add','employee'); -INSERT INTO `silexACL` VALUES (164,'almacennew','ticket_isOutClosureZone','employee'); -INSERT INTO `silexACL` VALUES (165,'almacennew','itemShelving_selfConsumption','employee'); -INSERT INTO `silexACL` VALUES (166,'almacennew','ticket_printLabelPrevious','employee'); -INSERT INTO `silexACL` VALUES (167,'almacennew','travel_updatePacking','employee'); -INSERT INTO `silexACL` VALUES (168,'app','status','$everyone'); - INSERT INTO `state` VALUES (1,'Arreglar',2,0,'FIXING',NULL,1,0,0,0,0,0,0,4,1,'alert'); INSERT INTO `state` VALUES (2,'Libre',2,0,'FREE',NULL,2,0,0,0,0,0,0,4,1,'notice'); INSERT INTO `state` VALUES (3,'OK',3,0,'OK',3,28,1,0,0,0,1,1,3,0,'success'); diff --git a/db/dump/.dump/privileges.sql b/db/dump/.dump/privileges.sql index 7776e6d5a..1af4b446a 100644 --- a/db/dump/.dump/privileges.sql +++ b/db/dump/.dump/privileges.sql @@ -1455,6 +1455,11 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','accountingType','gu INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','bankPolicyDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','bankPolicyReview','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','bankPolicy','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','hedera-web','imapMultiConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','salesAssistant','orderConfig','root@localhost','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryOut','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingSale','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); /*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */; /*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */; @@ -2160,9 +2165,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByAwb' INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','hr','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','financial','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_statement','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplier_statement','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','supplier_statement','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplier_statementWithEntries','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','XDiario_check','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','travel_getDetailFromContinent','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','entry_getTransfer','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); @@ -2193,6 +2196,8 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorCollection_getMyPartial','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana-write','item_ValuateInventory','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','guest','ticketCalculatePurge','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); /*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -2237,7 +2242,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','grafana-write','{\"access\":0,\"ve INSERT IGNORE INTO `global_priv` VALUES ('','greenhouseBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); INSERT IGNORE INTO `global_priv` VALUES ('','guest','{\"access\": 0, \"max_questions\": 40000, \"max_updates\": 1000, \"max_connections\": 150000, \"max_user_connections\": 200, \"max_statement_time\": 0.000000, \"is_role\": true, \"version_id\": 101106}'); INSERT IGNORE INTO `global_priv` VALUES ('','handmadeBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','hedera-web','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','hedera-web','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); INSERT IGNORE INTO `global_priv` VALUES ('','hr','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); INSERT IGNORE INTO `global_priv` VALUES ('','hrBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); INSERT IGNORE INTO `global_priv` VALUES ('','invoicing','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); diff --git a/db/dump/.dump/structure.sql b/db/dump/.dump/structure.sql index 4790e156c..1f04c8e78 100644 --- a/db/dump/.dump/structure.sql +++ b/db/dump/.dump/structure.sql @@ -4504,8 +4504,8 @@ CREATE TABLE `waste` ( `buyerFk` int(10) unsigned NOT NULL, `itemTypeFk` smallint(5) unsigned NOT NULL, `itemFk` int(11) NOT NULL DEFAULT 0, - `saleQuantity` decimal(10,2) DEFAULT NULL, - `saleTotal` decimal(10,2) DEFAULT NULL, + `saleTotal` decimal(10,2) DEFAULT NULL COMMENT 'Coste', + `saleWasteQuantity` decimal(10,2) DEFAULT NULL, `saleInternalWaste` decimal(10,2) DEFAULT NULL, `saleExternalWaste` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`year`,`week`,`buyerFk`,`itemTypeFk`,`itemFk`), @@ -6527,7 +6527,7 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `waste_addSales`() BEGIN - DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY; + DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY; DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; CALL cache.last_buy_refresh(FALSE); @@ -6538,25 +6538,22 @@ BEGIN it.workerFk, it.id, s.itemFk, - SUM(s.quantity), - SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity) `value`, - SUM ( + SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity), + SUM(IF(aw.`type`, s.quantity, 0)), + SUM( IF( aw.`type` = 'internal', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, 0 ) - ) internalWaste, - SUM ( + ), + SUM( IF( aw.`type` = 'external', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, - IF(c.code = 'manaClaim', - sc.value * s.quantity, - 0 - ) + 0 ) - ) externalWaste + ) FROM vn.sale s JOIN vn.item i ON i.id = s.itemFk JOIN vn.itemType it ON it.id = i.typeFk @@ -6567,11 +6564,9 @@ BEGIN JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = w.id JOIN vn.buy b ON b.id = lb.buy_id - LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id - LEFT JOIN vn.component c ON c.id = sc.componentFk WHERE t.shipped BETWEEN vDateFrom AND vDateTo AND w.isManaged - GROUP BY it.id, i.id; + GROUP BY i.id; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -14378,61 +14373,64 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `order_confirmWithUser`(vSelf INT, vUserId INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `order_confirmWithUser`( + vSelf INT, + vUserFk INT +) BEGIN /** - * Confirms an order, creating each of its tickets on the corresponding - * date, store and user. + * Confirms an order, creating each of its tickets + * on the corresponding date, store and user. * * @param vSelf The order identifier * @param vUser The user identifier */ - DECLARE vOk BOOL; - DECLARE vDone BOOL DEFAULT FALSE; - DECLARE vWarehouse INT; + DECLARE vHasRows BOOL; + DECLARE vDone BOOL; + DECLARE vWarehouseFk INT; DECLARE vShipment DATE; - DECLARE vTicket INT; + DECLARE vShipmentDayEnd DATETIME; + DECLARE vTicketFk INT; DECLARE vNotes VARCHAR(255); - DECLARE vItem INT; + DECLARE vItemFk INT; DECLARE vConcept VARCHAR(30); DECLARE vAmount INT; + DECLARE vAvailable INT; DECLARE vPrice DECIMAL(10,2); - DECLARE vSale INT; - DECLARE vRate INT; - DECLARE vRowId INT; + DECLARE vSaleFk INT; + DECLARE vRowFk INT; DECLARE vPriceFixed DECIMAL(10,2); - DECLARE vDelivery DATE; - DECLARE vAddress INT; - DECLARE vIsConfirmed BOOL; - DECLARE vClientId INT; - DECLARE vCompanyId INT; - DECLARE vAgencyModeId INT; - DECLARE TICKET_FREE INT DEFAULT 2; - DECLARE vCalc INT; - DECLARE vIsLogifloraItem BOOL; - DECLARE vOldQuantity INT; - DECLARE vNewQuantity INT; + DECLARE vLanded DATE; + DECLARE vAddressFk INT; + DECLARE vClientFk INT; + DECLARE vCompanyFk INT; + DECLARE vAgencyModeFk INT; + DECLARE vCalcFk INT; DECLARE vIsTaxDataChecked BOOL; - DECLARE cDates CURSOR FOR - SELECT zgs.shipped, r.warehouse_id + DECLARE vDates CURSOR FOR + SELECT zgs.shipped, r.warehouseFk FROM `order` o - JOIN order_row r ON r.order_id = o.id - LEFT JOIN tmp.zoneGetShipped zgs ON zgs.warehouseFk = r.warehouse_id - WHERE o.id = vSelf AND r.amount != 0 - GROUP BY r.warehouse_id; + JOIN orderRow r ON r.orderFk = o.id + LEFT JOIN tmp.zoneGetShipped zgs ON zgs.warehouseFk = r.warehouseFk + WHERE o.id = vSelf + AND r.amount + GROUP BY r.warehouseFk; - DECLARE cRows CURSOR FOR - SELECT r.id, r.item_id, i.name, r.amount, r.price, r.rate, i.isFloramondo - FROM order_row r - JOIN vn.item i ON i.id = r.item_id - WHERE r.amount != 0 - AND r.warehouse_id = vWarehouse - AND r.order_id = vSelf + DECLARE vRows CURSOR FOR + SELECT r.id, + r.itemFk, + i.name, + r.amount, + r.price + FROM orderRow r + JOIN vn.item i ON i.id = r.itemFk + WHERE r.amount + AND r.warehouseFk = vWarehouseFk + AND r.orderFk = vSelf ORDER BY r.rate DESC; - DECLARE CONTINUE HANDLER FOR NOT FOUND - SET vDone = TRUE; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN @@ -14441,26 +14439,36 @@ BEGIN END; -- Carga los datos del pedido - SELECT o.date_send, o.address_id, o.note, a.clientFk, - o.company_id, o.agency_id, c.isTaxDataChecked - INTO vDelivery, vAddress, vNotes, vClientId, - vCompanyId, vAgencyModeId, vIsTaxDataChecked - FROM hedera.`order` o + SELECT o.date_send, + o.address_id, + o.note, + a.clientFk, + o.company_id, + o.agency_id, + c.isTaxDataChecked + INTO vLanded, + vAddressFk, + vNotes, + vClientFk, + vCompanyFk, + vAgencyModeFk, + vIsTaxDataChecked + FROM `order` o JOIN vn.address a ON a.id = o.address_id JOIN vn.client c ON c.id = a.clientFk WHERE o.id = vSelf; -- Verifica si el cliente tiene los datos comprobados IF NOT vIsTaxDataChecked THEN - CALL util.throw ('clientNotVerified'); + CALL util.throw('clientNotVerified'); END IF; -- Carga las fechas de salida de cada almacen - CALL vn.zone_getShipped (vDelivery, vAddress, vAgencyModeId, FALSE); + CALL vn.zone_getShipped(vLanded, vAddressFk, vAgencyModeFk, FALSE); -- Trabajador que realiza la accion - IF vUserId IS NULL THEN - SELECT employeeFk INTO vUserId FROM orderConfig; + IF vUserFk IS NULL THEN + SELECT employeeFk INTO vUserFk FROM orderConfig; END IF; START TRANSACTION; @@ -14468,207 +14476,188 @@ BEGIN CALL order_checkEditable(vSelf); -- Check order is not empty + SELECT COUNT(*) > 0 INTO vHasRows + FROM orderRow + WHERE orderFk = vSelf + AND amount > 0; - SELECT COUNT(*) > 0 INTO vOk - FROM order_row WHERE order_id = vSelf AND amount > 0; - - IF NOT vOk THEN - CALL util.throw ('ORDER_EMPTY'); + IF NOT vHasRows THEN + CALL util.throw('ORDER_EMPTY'); END IF; -- Crea los tickets del pedido - - OPEN cDates; - - lDates: - LOOP - SET vTicket = NULL; + OPEN vDates; + lDates: LOOP + SET vTicketFk = NULL; SET vDone = FALSE; - FETCH cDates INTO vShipment, vWarehouse; + FETCH vDates INTO vShipment, vWarehouseFk; IF vDone THEN LEAVE lDates; END IF; - -- Busca un ticket existente que coincida con los parametros - WITH tPrevia AS - (SELECT DISTINCT s.ticketFk + SET vShipmentDayEnd = util.dayEnd(vShipment); + + -- Busca un ticket libre disponible + WITH tPrevia AS ( + SELECT DISTINCT s.ticketFk FROM vn.sale s JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id JOIN vn.ticket t ON t.id = s.ticketFk - WHERE t.shipped BETWEEN vShipment AND util.dayend(vShipment) - ) - SELECT t.id INTO vTicket + WHERE t.shipped BETWEEN vShipment AND vShipmentDayEnd + ) + SELECT t.id INTO vTicketFk FROM vn.ticket t JOIN vn.alertLevel al ON al.code = 'FREE' LEFT JOIN tPrevia tp ON tp.ticketFk = t.id - LEFT JOIN vn.ticketState tls on tls.ticketFk = t.id - JOIN hedera.`order` o - ON o.address_id = t.addressFk - AND vWarehouse = t.warehouseFk - AND o.date_send = t.landed - AND DATE(t.shipped) = vShipment + LEFT JOIN vn.ticketState tls ON tls.ticketFk = t.id + JOIN hedera.`order` o ON o.address_id = t.addressFk + AND t.shipped BETWEEN vShipment AND vShipmentDayEnd + AND t.warehouseFk = vWarehouseFk + AND o.date_send = t.landed WHERE o.id = vSelf AND t.refFk IS NULL AND tp.ticketFk IS NULL AND (tls.alertLevel IS NULL OR tls.alertLevel = al.id) LIMIT 1; + -- Comprobamos si hay un ticket de previa disponible + IF vTicketFk IS NULL THEN + WITH tItemPackingTypeOrder AS ( + SELECT GROUP_CONCAT( + DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk + ) distinctItemPackingTypes, + o.address_id + FROM vn.item i + JOIN hedera.orderRow oro ON oro.itemFk = i.id + JOIN hedera.`order` o ON o.id = oro.orderFk + WHERE oro.orderFk = vSelf + ), + tItemPackingTypeTicket AS ( + SELECT t.id, + GROUP_CONCAT( + DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk + ) distinctItemPackingTypes + FROM vn.ticket t + JOIN vn.ticketState tls ON tls.ticketFk = t.id + JOIN vn.alertLevel al ON al.id = tls.alertLevel + JOIN vn.sale s ON s.ticketFk = t.id + JOIN vn.item i ON i.id = s.itemFk + JOIN tItemPackingTypeOrder ipto + WHERE t.shipped BETWEEN vShipment AND vShipmentDayEnd + AND t.refFk IS NULL + AND t.warehouseFk = vWarehouseFk + AND t.addressFk = ipto.address_id + AND al.code = 'ON_PREVIOUS' + GROUP BY t.id + ) + SELECT iptt.id INTO vTicketFk + FROM tItemPackingTypeTicket iptt + JOIN tItemPackingTypeOrder ipto + WHERE INSTR(iptt.distinctItemPackingTypes, ipto.distinctItemPackingTypes) + LIMIT 1; + END IF; + -- Crea el ticket en el caso de no existir uno adecuado - IF vTicket IS NULL - THEN - + IF vTicketFk IS NULL THEN SET vShipment = IFNULL(vShipment, util.VN_CURDATE()); - CALL vn.ticket_add( - vClientId, + vClientFk, vShipment, - vWarehouse, - vCompanyId, - vAddress, - vAgencyModeId, + vWarehouseFk, + vCompanyFk, + vAddressFk, + vAgencyModeFk, NULL, - vDelivery, - vUserId, + vLanded, + vUserFk, TRUE, - vTicket + vTicketFk ); ELSE INSERT INTO vn.ticketTracking - SET ticketFk = vTicket, - userFk = vUserId, - stateFk = TICKET_FREE; + SET ticketFk = vTicketFk, + userFk = vUserFk, + stateFk = (SELECT id FROM vn.state WHERE code = 'FREE'); END IF; INSERT IGNORE INTO vn.orderTicket SET orderFk = vSelf, - ticketFk = vTicket; + ticketFk = vTicketFk; -- Añade las notas - - IF vNotes IS NOT NULL AND vNotes != '' - THEN - INSERT INTO vn.ticketObservation SET - ticketFk = vTicket, - observationTypeFk = 4 /* salesperson */ , + IF vNotes IS NOT NULL AND vNotes <> '' THEN + INSERT INTO vn.ticketObservation + SET ticketFk = vTicketFk, + observationTypeFk = (SELECT id FROM vn.observationType WHERE code = 'salesPerson'), `description` = vNotes ON DUPLICATE KEY UPDATE `description` = CONCAT(VALUES(`description`),'. ', `description`); END IF; -- Añade los movimientos y sus componentes - - OPEN cRows; - + OPEN vRows; lRows: LOOP + SET vSaleFk = NULL; SET vDone = FALSE; - FETCH cRows INTO vRowId, vItem, vConcept, vAmount, vPrice, vRate, vIsLogifloraItem; + FETCH vRows INTO vRowFk, vItemFk, vConcept, vAmount, vPrice; IF vDone THEN LEAVE lRows; END IF; - SET vSale = NULL; - - SELECT s.id, s.quantity INTO vSale, vOldQuantity + SELECT s.id INTO vSaleFk FROM vn.sale s - WHERE ticketFk = vTicket + WHERE ticketFk = vTicketFk AND price = vPrice - AND itemFk = vItem + AND itemFk = vItemFk AND discount = 0 LIMIT 1; - IF vSale THEN + IF vSaleFk THEN UPDATE vn.sale SET quantity = quantity + vAmount, originalQuantity = quantity - WHERE id = vSale; - - SELECT s.quantity INTO vNewQuantity - FROM vn.sale s - WHERE id = vSale; + WHERE id = vSaleFk; ELSE -- Obtiene el coste SELECT SUM(rc.`price`) valueSum INTO vPriceFixed FROM orderRowComponent rc JOIN vn.component c ON c.id = rc.componentFk - JOIN vn.componentType ct ON ct.id = c.typeFk AND ct.isBase - WHERE rc.rowFk = vRowId; + JOIN vn.componentType ct ON ct.id = c.typeFk + AND ct.isBase + WHERE rc.rowFk = vRowFk; INSERT INTO vn.sale - SET itemFk = vItem, - ticketFk = vTicket, + SET itemFk = vItemFk, + ticketFk = vTicketFk, concept = vConcept, quantity = vAmount, price = vPrice, priceFixed = vPriceFixed, isPriceFixed = TRUE; - SET vSale = LAST_INSERT_ID(); + SET vSaleFk = LAST_INSERT_ID(); - INSERT INTO vn.saleComponent - (saleFk, componentFk, `value`) - SELECT vSale, rc.componentFk, rc.price + INSERT INTO vn.saleComponent (saleFk, componentFk, `value`) + SELECT vSaleFk, rc.componentFk, rc.price FROM orderRowComponent rc JOIN vn.component c ON c.id = rc.componentFk - WHERE rc.rowFk = vRowId - GROUP BY vSale, rc.componentFk; + WHERE rc.rowFk = vRowFk + GROUP BY vSaleFk, rc.componentFk; END IF; - UPDATE order_row SET Id_Movimiento = vSale - WHERE id = vRowId; - - -- Inserta en putOrder si la compra es de Floramondo - IF vIsLogifloraItem THEN - CALL cache.availableNoRaids_refresh(vCalc,FALSE,vWarehouse,vShipment); - - SET @available := 0; - - SELECT GREATEST(0,available) INTO @available - FROM cache.availableNoRaids - WHERE calc_id = vCalc - AND item_id = vItem; - - UPDATE cache.availableNoRaids - SET available = GREATEST(0,available - vAmount) - WHERE item_id = vItem - AND calc_id = vCalc; - - INSERT INTO edi.putOrder ( - deliveryInformationID, - supplyResponseId, - quantity , - EndUserPartyId, - EndUserPartyGLN, - FHAdminNumber, - saleFk - ) - SELECT di.ID, - i.supplyResponseFk, - CEIL((vAmount - @available)/ sr.NumberOfItemsPerCask), - o.address_id , - vClientId, - IFNULL(ca.fhAdminNumber, fhc.defaultAdminNumber), - vSale - FROM edi.deliveryInformation di - JOIN vn.item i ON i.supplyResponseFk = di.supplyResponseID - JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk - LEFT JOIN edi.clientFHAdminNumber ca ON ca.clientFk = vClientId - JOIN edi.floraHollandConfig fhc - JOIN hedera.`order` o ON o.id = vSelf - WHERE i.id = vItem - AND di.LatestOrderDateTime > util.VN_NOW() - AND vAmount > @available - LIMIT 1; - END IF; + UPDATE orderRow + SET saleFk = vSaleFk + WHERE id = vRowFk; END LOOP; - - CLOSE cRows; + CLOSE vRows; END LOOP; + CLOSE vDates; - CLOSE cDates; - - UPDATE `order` SET confirmed = TRUE, confirm_date = util.VN_NOW() + UPDATE `order` + SET confirmed = TRUE, + confirm_date = util.VN_NOW() WHERE id = vSelf; COMMIT; @@ -18986,6 +18975,7 @@ CREATE TABLE `ACL` ( `permission` set('DENY','ALLOW') DEFAULT 'ALLOW', `principalType` set('ROLE','USER') DEFAULT 'ROLE', `principalId` varchar(512) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `model_ix` (`model`(255)) COMMENT 'ernesto 3.8.2020. Mysql pide indices', KEY `property_ix` (`property`(255)), @@ -18993,6 +18983,34 @@ CREATE TABLE `ACL` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `ACLLog` +-- + +DROP TABLE IF EXISTS `ACLLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ACLLog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `originFk` int(11) DEFAULT NULL, + `userFk` int(10) unsigned DEFAULT NULL, + `action` set('insert','update','delete','select') NOT NULL, + `creationDate` timestamp NULL DEFAULT current_timestamp(), + `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `changedModel` enum('Acl') NOT NULL DEFAULT 'Acl', + `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)), + `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), + `changedModelId` int(11) NOT NULL, + `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `logRateuserFk` (`userFk`), + KEY `ACLLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), + KEY `ACLLog_originFk` (`originFk`,`creationDate`), + CONSTRAINT `aclUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `AccessToken` -- @@ -32114,6 +32132,7 @@ CREATE TABLE `invoiceInConfig` ( `daysAgo` int(10) unsigned DEFAULT 45 COMMENT 'Días en el pasado para mostrar facturas en invoiceIn series en salix', `taxRowLimit` int(11) DEFAULT 4 COMMENT 'Número máximo de líneas de IVA que puede tener una factura', `dueDateMarginDays` int(10) unsigned DEFAULT 2, + `balanceStartingDate` date NOT NULL DEFAULT '2015-01-01', PRIMARY KEY (`id`), KEY `invoiceInConfig_sageWithholdingFk` (`sageFarmerWithholdingFk`), CONSTRAINT `invoiceInConfig_sageWithholdingFk` FOREIGN KEY (`sageFarmerWithholdingFk`) REFERENCES `sage`.`TiposRetencion` (`CodigoRetencion`) ON DELETE CASCADE ON UPDATE CASCADE, @@ -34775,7 +34794,6 @@ CREATE TABLE `packingSite` ( `scannerFk` int(11) DEFAULT NULL, `screenFk` int(11) DEFAULT NULL, `editorFk` int(10) unsigned DEFAULT NULL, - `hasNewLabelMrwMethod` tinyint(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `packingSite_UN` (`code`), UNIQUE KEY `printerRfidFk` (`printerRfidFk`), @@ -35734,13 +35752,12 @@ CREATE TABLE `productionConfig` ( `collection_new_lockname` varchar(100) NOT NULL DEFAULT 'collection_new' COMMENT 'Lockname value for proc vn.collection_new', `collection_assign_lockname` varchar(100) DEFAULT 'collection_assign' COMMENT 'Lockname value for proc vn.collection_new', `defaultSectorFk` int(10) unsigned NOT NULL DEFAULT 37 COMMENT 'Default sector', - `scannableCodeType` enum('qr','barcode') NOT NULL DEFAULT 'barcode', - `scannablePreviusCodeType` enum('qr','barcode') NOT NULL DEFAULT 'barcode', `itemOlderReviewHours` int(11) NOT NULL DEFAULT 0 COMMENT 'Horas que se tienen en cuenta para comprobar si un ítem es más viejo.', `sectorFromCode` varchar(15) DEFAULT NULL COMMENT 'Sector origen que se revisa ítems más nuevos al parkinear', `sectorToCode` varchar(15) DEFAULT NULL COMMENT 'Sector destino que se revisa ítems más nuevos al parkinear', `orderMode` enum('Location','Age') NOT NULL DEFAULT 'Location', `editorFk` int(10) unsigned DEFAULT NULL, + `hasNewLabelMrwMethod` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'column to activate the new mrw integration', PRIMARY KEY (`id`), KEY `productionConfig_FK` (`shortageAddressFk`), KEY `productionConfig_FK_1` (`clientSelfConsumptionFk`), @@ -37197,6 +37214,23 @@ CREATE TABLE `saleTracking` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `saleUnit` +-- + +DROP TABLE IF EXISTS `saleUnit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `saleUnit` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `isVisible` tinyint(1) NOT NULL DEFAULT 1, + `created` timestamp NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Temporary table structure for view `saleValue` -- @@ -37797,20 +37831,20 @@ CREATE TABLE `siiTypeInvoiceOut` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `silexACL` +-- Table structure for table `silexACL__` -- -DROP TABLE IF EXISTS `silexACL`; +DROP TABLE IF EXISTS `silexACL__`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `silexACL` ( +CREATE TABLE `silexACL__` ( `id` int(11) NOT NULL AUTO_INCREMENT, `module` varchar(50) NOT NULL, `method` varchar(50) NOT NULL, `role` varchar(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `module_UNIQUE` (`module`,`method`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2024-08-05 refs #7820'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -38812,9 +38846,9 @@ CREATE TABLE `ticket` ( `weight` decimal(10,2) DEFAULT NULL COMMENT 'En caso de informar, se utilizará su valor para calcular el peso de la factura', `clonedFrom` int(11) DEFAULT NULL, `cmrFk` int(11) DEFAULT NULL, - `editorFk` int(10) unsigned DEFAULT NULL, `problem` set('hasTicketRequest','isFreezed','hasRisk','hasHighRisk','isTaxDataChecked','isTooLittle') NOT NULL DEFAULT '', `risk` decimal(10,2) DEFAULT NULL COMMENT 'cache calculada con el riesgo del cliente', + `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `Id_Cliente` (`clientFk`), KEY `Id_Consigna` (`addressFk`), @@ -47091,8 +47125,8 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `address_updateCoordinates`( vTicketFk INT, - vLongitude INT, - vLatitude INT) + vLongitude DECIMAL(11,7), + vLatitude DECIMAL(11,7)) BEGIN /** * Actualiza las coordenadas de una dirección. @@ -51549,6 +51583,7 @@ BEGIN AND a.id IS NULL AND u.active AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH + AND NOT u.role = (SELECT id FROM `role` WHERE name = 'supplier') AND u.id NOT IN ( SELECT DISTINCT c.id FROM client c @@ -54343,7 +54378,7 @@ BEGIN JOIN duaEntry de ON de.entryFk = e.id JOIN invoiceInConfig iic WHERE de.duaFk = vDuaFk - AND iidd.dueDated <= util.VN_CURDATE() + INTERVAL iic.dueDateMarginDays DAY; + AND iidd.dueDated < util.VN_CURDATE() + INTERVAL iic.dueDateMarginDays DAY; IF vIncorrectInvoiceInDueDay THEN CALL util.throw(CONCAT('Incorrect due date, invoice: ', vIncorrectInvoiceInDueDay)); @@ -55844,7 +55879,7 @@ BEGIN DECLARE cur CURSOR FOR SELECT bb.id buyFk, - FLOOR(ish.visible / ish.packing) ishStickers, + LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers, bb.stickers buyStickers FROM itemShelving ish JOIN (SELECT b.id, b.itemFk, b.stickers @@ -55852,7 +55887,6 @@ BEGIN WHERE b.entryFk = vFromEntryFk ORDER BY b.stickers DESC LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk - AND bb.stickers >= FLOOR(ish.visible / ish.packing) WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci AND NOT ish.isSplit GROUP BY ish.id; @@ -56480,14 +56514,21 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) +CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Put`( + vPalletFk INT, + vExpeditionFk INT +) BEGIN - - REPLACE vn.expeditionScan(expeditionFk, palletFk) - VALUES(vExpeditionFk, vPalletFk); - - SELECT LAST_INSERT_ID() INTO vPalletFk; - + IF NOT (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN + CALL util.throw('Expedition not exists'); + END IF; + + IF NOT (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN + CALL util.throw('Pallet not exists'); + END IF; + + REPLACE expeditionScan(expeditionFk, palletFk) + VALUES(vExpeditionFk, vPalletFk); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -60923,7 +60964,7 @@ BEGIN DECLARE vSaleFk INT; DECLARE vSectorFk INT; DECLARE vSales CURSOR FOR - SELECT s.id + SELECT DISTINCT s.id FROM sectorCollectionSaleGroup sc JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk JOIN sale s ON sg.saleFk = s.id @@ -63909,7 +63950,7 @@ BEGIN SELECT * FROM sales UNION ALL SELECT * FROM orders - ORDER BY shipped, + ORDER BY shipped DESC, (inventorySupplierFk = entityId) DESC, alertLevel DESC, isTicket, @@ -63960,7 +64001,7 @@ BEGIN NULL reference, NULL entityType, NULL entityId, - 'Inventario calculado', + 'Inventario calculado' entityName, @a invalue, NULL `out`, @a balance, @@ -72035,7 +72076,7 @@ DELIMITER ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; -/*!50003 DROP PROCEDURE IF EXISTS `supplier_statement` */; +/*!50003 DROP PROCEDURE IF EXISTS `supplier_statementWithEntries` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -72043,28 +72084,35 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_statement`( +CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_statementWithEntries`( vSupplierFk INT, vCurrencyFk INT, vCompanyFk INT, vOrderBy VARCHAR(15), - vIsConciliated BOOL + vIsConciliated BOOL, + vHasEntries BOOL ) BEGIN /** - * Crea un estado de cuenta de proveedores calculando - * los saldos en euros y en la moneda especificada. - * - * @param vSupplierFk Id del proveedor - * @param vCurrencyFk Id de la moneda - * @param vCompanyFk Id de la empresa - * @param vOrderBy Criterio de ordenación - * @param vIsConciliated Indica si está conciliado o no - * @return tmp.supplierStatement - */ +* Creates a supplier statement, calculating balances in euros and the specified currency. +* +* @param vSupplierFk Supplier ID +* @param vCurrencyFk Currency ID +* @param vCompanyFk Company ID +* @param vOrderBy Order by criteria +* @param vIsConciliated Indicates whether it is reconciled or not +* @param vHasEntries Indicates if future entries must be shown +* @return tmp.supplierStatement +*/ + DECLARE vBalanceStartingDate DATETIME; + SET @euroBalance:= 0; SET @currencyBalance:= 0; + SELECT balanceStartingDate + INTO vBalanceStartingDate + FROM invoiceInConfig; + CREATE OR REPLACE TEMPORARY TABLE tmp.supplierStatement ENGINE = MEMORY SELECT *, @@ -72077,107 +72125,127 @@ BEGIN IFNULL(invoiceCurrency, 0), 2 ) currencyBalance FROM ( - SELECT * FROM - ( - SELECT NULL bankFk, - ii.companyFk, - ii.serial, - ii.id, - CASE - WHEN vOrderBy = 'issued' THEN ii.issued - WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried - WHEN vOrderBy = 'booked' THEN ii.booked - WHEN vOrderBy = 'dueDate' THEN iid.dueDated - END dated, - CONCAT('S/Fra ', ii.supplierRef) sref, - IF(ii.currencyFk > 1, - ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), - NULL - ) changeValue, - CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, - CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, - NULL paymentEuros, - NULL paymentCurrency, - ii.currencyFk, - ii.isBooked, - c.code, - 'invoiceIn' statementType - FROM invoiceIn ii - JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id - JOIN currency c ON c.id = ii.currencyFk - WHERE ii.issued > '2014-12-31' - AND ii.supplierFk = vSupplierFk - AND vCurrencyFk IN (ii.currencyFk, 0) - AND vCompanyFk IN (ii.companyFk, 0) - AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) - GROUP BY iid.id - UNION ALL - SELECT p.bankFk, - p.companyFk, - NULL, - p.id, - CASE - WHEN vOrderBy = 'issued' THEN p.received - WHEN vOrderBy = 'bookEntried' THEN p.received - WHEN vOrderBy = 'booked' THEN p.received - WHEN vOrderBy = 'dueDate' THEN p.dueDated - END, - CONCAT(IFNULL(pm.name, ''), - IF(pn.concept <> '', - CONCAT(' : ', pn.concept), - '') - ), - IF(p.currencyFk > 1, p.divisa / p.amount, NULL), - NULL, - NULL, - p.amount, - p.divisa, - p.currencyFk, - p.isConciliated, - c.code, - 'payment' - FROM payment p - LEFT JOIN currency c ON c.id = p.currencyFk - LEFT JOIN accounting a ON a.id = p.bankFk - LEFT JOIN payMethod pm ON pm.id = p.payMethodFk - LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id - WHERE p.received > '2014-12-31' - AND p.supplierFk = vSupplierFk - AND vCurrencyFk IN (p.currencyFk, 0) - AND vCompanyFk IN (p.companyFk, 0) - AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) - UNION ALL - SELECT NULL, - companyFk, - NULL, - se.id, - CASE - WHEN vOrderBy = 'issued' THEN se.dated - WHEN vOrderBy = 'bookEntried' THEN se.dated - WHEN vOrderBy = 'booked' THEN se.dated - WHEN vOrderBy = 'dueDate' THEN se.dueDated - END, - se.description, - 1, - amount, - NULL, - NULL, - NULL, - currencyFk, - isConciliated, - c.`code`, - 'expense' - FROM supplierExpense se - JOIN currency c ON c.id = se.currencyFk - WHERE se.supplierFk = vSupplierFk - AND vCurrencyFk IN (se.currencyFk,0) - AND vCompanyFk IN (se.companyFk,0) - AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) - ) sub - ORDER BY (dated IS NULL AND NOT isBooked), - dated, - IF(vOrderBy = 'dueDate', id, NULL) - LIMIT 10000000000000000000 + SELECT NULL bankFk, + ii.companyFk, + ii.serial, + ii.id, + CASE + WHEN vOrderBy = 'issued' THEN ii.issued + WHEN vOrderBy = 'bookEntried' THEN ii.bookEntried + WHEN vOrderBy = 'booked' THEN ii.booked + WHEN vOrderBy = 'dueDate' THEN iid.dueDated + END dated, + CONCAT('S/Fra ', ii.supplierRef) sref, + IF(ii.currencyFk > 1, + ROUND(SUM(iid.foreignValue) / SUM(iid.amount), 3), + NULL + ) changeValue, + CAST(SUM(iid.amount) AS DECIMAL(10,2)) invoiceEuros, + CAST(SUM(iid.foreignValue) AS DECIMAL(10,2)) invoiceCurrency, + NULL paymentEuros, + NULL paymentCurrency, + ii.currencyFk, + ii.isBooked, + c.code, + 'invoiceIn' statementType + FROM invoiceIn ii + JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id + JOIN currency c ON c.id = ii.currencyFk + WHERE ii.issued >= vBalanceStartingDate + AND ii.supplierFk = vSupplierFk + AND vCurrencyFk IN (ii.currencyFk, 0) + AND vCompanyFk IN (ii.companyFk, 0) + AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) + GROUP BY iid.id + UNION ALL + SELECT p.bankFk, + p.companyFk, + NULL, + p.id, + CASE + WHEN vOrderBy = 'issued' THEN p.received + WHEN vOrderBy = 'bookEntried' THEN p.received + WHEN vOrderBy = 'booked' THEN p.received + WHEN vOrderBy = 'dueDate' THEN p.dueDated + END, + CONCAT(IFNULL(pm.name, ''), + IF(pn.concept <> '', + CONCAT(' : ', pn.concept), + '') + ), + IF(p.currencyFk > 1, p.divisa / p.amount, NULL), + NULL, + NULL, + p.amount, + p.divisa, + p.currencyFk, + p.isConciliated, + c.code, + 'payment' + FROM payment p + LEFT JOIN currency c ON c.id = p.currencyFk + LEFT JOIN accounting a ON a.id = p.bankFk + LEFT JOIN payMethod pm ON pm.id = p.payMethodFk + LEFT JOIN promissoryNote pn ON pn.paymentFk = p.id + WHERE p.received >= vBalanceStartingDate + AND p.supplierFk = vSupplierFk + AND vCurrencyFk IN (p.currencyFk, 0) + AND vCompanyFk IN (p.companyFk, 0) + AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL, + companyFk, + NULL, + se.id, + CASE + WHEN vOrderBy = 'issued' THEN se.dated + WHEN vOrderBy = 'bookEntried' THEN se.dated + WHEN vOrderBy = 'booked' THEN se.dated + WHEN vOrderBy = 'dueDate' THEN se.dueDated + END, + se.description, + 1, + amount, + NULL, + NULL, + NULL, + currencyFk, + isConciliated, + c.`code`, + 'expense' + FROM supplierExpense se + JOIN currency c ON c.id = se.currencyFk + WHERE se.supplierFk = vSupplierFk + AND vCurrencyFk IN (se.currencyFk,0) + AND vCompanyFk IN (se.companyFk,0) + AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) + UNION ALL + SELECT NULL bankFk, + e.companyFk, + 'E' serial, + e.invoiceNumber id, + tr.landed dated, + CONCAT('Ent. ',e.id) sref, + 1 / ((e.commission/100)+1) changeValue, + e.invoiceAmount * (1 + (e.commission/100)), + e.invoiceAmount, + NULL, + NULL, + e.currencyFk, + FALSE isBooked, + c.code, + 'order' + FROM entry e + JOIN travel tr ON tr.id = e.travelFk + JOIN currency c ON c.id = e.currencyFk + WHERE e.supplierFk = vSupplierFk + AND tr.landed >= CURDATE() + AND e.invoiceInFk IS NULL + AND vHasEntries + ORDER BY (dated IS NULL AND NOT isBooked), + dated, + IF(vOrderBy = 'dueDate', id, NULL) + LIMIT 10000000000000000000 ) t; END ;; DELIMITER ; @@ -74119,7 +74187,6 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_cloneWeekly`( vDateTo DATE ) BEGIN - DECLARE vIsDone BOOL; DECLARE vLanding DATE; DECLARE vShipment DATE; DECLARE vWarehouseFk INT; @@ -74130,36 +74197,37 @@ BEGIN DECLARE vAgencyModeFk INT; DECLARE vNewTicket INT; DECLARE vYear INT; - DECLARE vSalesPersonFK INT; - DECLARE vItemPicker INT; + DECLARE vObservationSalesPersonFk INT + DEFAULT (SELECT id FROM observationType WHERE code = 'salesPerson'); + DECLARE vObservationItemPickerFk INT + DEFAULT (SELECT id FROM observationType WHERE code = 'itemPicker'); + DECLARE vEmail VARCHAR(255); + DECLARE vIsDuplicateMail BOOL; + DECLARE vSubject VARCHAR(100); + DECLARE vMessage TEXT; + DECLARE vDone BOOL; - DECLARE rsTicket CURSOR FOR - SELECT tt.ticketFk, - t.clientFk, - t.warehouseFk, - t.companyFk, - t.addressFk, - tt.agencyModeFk, - ti.dated - FROM ticketWeekly tt - JOIN ticket t ON tt.ticketFk = t.id - JOIN tmp.time ti - WHERE WEEKDAY(ti.dated) = tt.weekDay; + DECLARE vTickets CURSOR FOR + SELECT tt.ticketFk, + t.clientFk, + t.warehouseFk, + t.companyFk, + t.addressFk, + tt.agencyModeFk, + ti.dated + FROM ticketWeekly tt + JOIN ticket t ON tt.ticketFk = t.id + JOIN tmp.time ti + WHERE WEEKDAY(ti.dated) = tt.weekDay; - DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE; - - CALL `util`.`time_generate`(vDateFrom,vDateTo); - - OPEN rsTicket; - myLoop: LOOP - BEGIN - DECLARE vSalesPersonEmail VARCHAR(150); - DECLARE vIsDuplicateMail BOOL; - DECLARE vSubject VARCHAR(150); - DECLARE vMessage TEXT; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - SET vIsDone = FALSE; - FETCH rsTicket INTO + CALL `util`.`time_generate`(vDateFrom, vDateTo); + + OPEN vTickets; + l: LOOP + SET vDone = FALSE; + FETCH vTickets INTO vTicketFk, vClientFk, vWarehouseFk, @@ -74168,11 +74236,11 @@ BEGIN vAgencyModeFk, vShipment; - IF vIsDone THEN - LEAVE myLoop; + IF vDone THEN + LEAVE l; END IF; - -- busca si el ticket ya ha sido clonado + -- Busca si el ticket ya ha sido clonado IF EXISTS (SELECT TRUE FROM ticket tOrig JOIN sale saleOrig ON tOrig.id = saleOrig.ticketFk JOIN saleCloned sc ON sc.saleOriginalFk = saleOrig.id @@ -74182,7 +74250,7 @@ BEGIN AND tClon.isDeleted = FALSE AND DATE(tClon.shipped) = vShipment) THEN - ITERATE myLoop; + ITERATE l; END IF; IF vAgencyModeFk IS NULL THEN @@ -74222,15 +74290,15 @@ BEGIN priceFixed, isPriceFixed) SELECT vNewTicket, - saleOrig.itemFk, - saleOrig.concept, - saleOrig.quantity, - saleOrig.price, - saleOrig.discount, - saleOrig.priceFixed, - saleOrig.isPriceFixed - FROM sale saleOrig - WHERE saleOrig.ticketFk = vTicketFk; + itemFk, + concept, + quantity, + price, + discount, + priceFixed, + isPriceFixed + FROM sale + WHERE ticketFk = vTicketFk; INSERT IGNORE INTO saleCloned(saleOriginalFk, saleClonedFk) SELECT saleOriginal.id, saleClon.id @@ -74267,15 +74335,7 @@ BEGIN attenderFk, vNewTicket FROM ticketRequest - WHERE ticketFk =vTicketFk; - - SELECT id INTO vSalesPersonFK - FROM observationType - WHERE code = 'salesPerson'; - - SELECT id INTO vItemPicker - FROM observationType - WHERE code = 'itemPicker'; + WHERE ticketFk = vTicketFk; INSERT INTO ticketObservation( ticketFk, @@ -74283,7 +74343,7 @@ BEGIN description) VALUES( vNewTicket, - vSalesPersonFK, + vObservationSalesPersonFk, CONCAT('turno desde ticket: ',vTicketFk)) ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' '); @@ -74293,16 +74353,17 @@ BEGIN description) VALUES( vNewTicket, - vItemPicker, + vObservationItemPickerFk, 'ATENCION: Contiene lineas de TURNO') ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' '); - IF (vLanding IS NULL) THEN - - SELECT e.email INTO vSalesPersonEmail + IF vLanding IS NULL THEN + SELECT IFNULL(d.notificationEmail, e.email) INTO vEmail FROM client c JOIN account.emailUser e ON e.userFk = c.salesPersonFk + LEFT JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk + LEFT JOIN department d ON d.id = wd.departmentFk WHERE c.id = vClientFk; SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', @@ -74314,21 +74375,22 @@ BEGIN SELECT COUNT(*) INTO vIsDuplicateMail FROM mail - WHERE receiver = vSalesPersonEmail + WHERE receiver = vEmail AND subject = vSubject; IF NOT vIsDuplicateMail THEN - CALL mail_insert(vSalesPersonEmail, NULL, vSubject, vMessage); + CALL mail_insert(vEmail, NULL, vSubject, vMessage); END IF; CALL ticket_setState(vNewTicket, 'FIXING'); ELSE CALL ticketCalculateClon(vNewTicket, vTicketFk); END IF; - - END; END LOOP; - CLOSE rsTicket; - DROP TEMPORARY TABLE IF EXISTS tmp.time, tmp.zoneGetLanded; + CLOSE vTickets; + + DROP TEMPORARY TABLE IF EXISTS + tmp.time, + tmp.zoneGetLanded; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -81972,55 +82034,57 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAddresses`( vSelf INT, - vLanded DATE + vShipped DATE, + vDepartmentFk INT ) BEGIN /** * Devuelve un listado de todos los clientes activos * con consignatarios a los que se les puede - * vender producto para esa zona y no tiene un ticket - * para ese día. + * vender producto para esa zona. * * @param vSelf Id de zona - * @param vDated Fecha de entrega + * @param vShipped Fecha de envio + * @param vDepartmentFk Id de departamento * @return Un select */ CALL zone_getPostalCode(vSelf); - WITH notHasTicket AS ( - SELECT id - FROM vn.client - WHERE id NOT IN ( - SELECT clientFk - FROM vn.ticket - WHERE landed BETWEEN vLanded AND util.dayEnd(vLanded) - ) + WITH clientWithTicket AS ( + SELECT clientFk + FROM vn.ticket + WHERE shipped BETWEEN vShipped AND util.dayEnd(vShipped) ) - SELECT c.id clientFk, - c.name, - c.phone, - bt.description, - c.salesPersonFk, - u.name username, - aai.invoiced, - cnb.lastShipped - FROM vn.client c - JOIN notHasTicket ON notHasTicket.id = c.id - LEFT JOIN account.`user` u ON u.id = c.salesPersonFk - JOIN vn.`address` a ON a.clientFk = c.id - JOIN vn.postCode pc ON pc.code = a.postalCode - JOIN vn.town t ON t.id = pc.townFk AND t.provinceFk = a.provinceFk - JOIN vn.zoneGeo zg ON zg.name = a.postalCode - JOIN tmp.zoneNodes zn ON zn.geoFk = pc.geoFk - LEFT JOIN bs.clientNewBorn cnb ON cnb.clientFk = c.id - LEFT JOIN vn.annualAverageInvoiced aai ON aai.clientFk = c.id - JOIN vn.clientType ct ON ct.code = c.typeFk - JOIN vn.businessType bt ON bt.code = c.businessTypeFk - WHERE a.isActive - AND c.isActive - AND ct.code = 'normal' - AND bt.code <> 'worker' - GROUP BY c.id; + SELECT c.id, + c.name, + c.phone, + bt.description, + c.salesPersonFk, + u.name username, + aai.invoiced, + cnb.lastShipped, + cwt.clientFk + FROM vn.client c + JOIN vn.worker w ON w.id = c.salesPersonFk + JOIN vn.workerDepartment wd ON wd.workerFk = w.id + JOIN vn.department d ON d.id = wd.departmentFk + LEFT JOIN clientWithTicket cwt ON cwt.clientFk = c.id + LEFT JOIN account.`user` u ON u.id = c.salesPersonFk + JOIN vn.`address` a ON a.clientFk = c.id + JOIN vn.postCode pc ON pc.code = a.postalCode + JOIN vn.town t ON t.id = pc.townFk AND t.provinceFk = a.provinceFk + JOIN vn.zoneGeo zg ON zg.name = a.postalCode + JOIN tmp.zoneNodes zn ON zn.geoFk = pc.geoFk + LEFT JOIN bs.clientNewBorn cnb ON cnb.clientFk = c.id + LEFT JOIN vn.annualAverageInvoiced aai ON aai.clientFk = c.id + JOIN vn.clientType ct ON ct.code = c.typeFk + JOIN vn.businessType bt ON bt.code = c.businessTypeFk + WHERE a.isActive + AND c.isActive + AND ct.code = 'normal' + AND bt.code <> 'worker' + AND (d.id = vDepartmentFk OR NOT vDepartmentFk) + GROUP BY c.id; DROP TEMPORARY TABLE tmp.zoneNodes; END ;; @@ -91355,4 +91419,4 @@ USE `vn2008`; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-08-06 6:02:57 +-- Dump completed on 2024-08-20 7:45:07 diff --git a/db/dump/.dump/triggers.sql b/db/dump/.dump/triggers.sql index 014bce729..a968277b9 100644 --- a/db/dump/.dump/triggers.sql +++ b/db/dump/.dump/triggers.sql @@ -1423,6 +1423,70 @@ DELIMITER ; -- USE `salix`; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `salix`.`ACL_beforeInsert` + BEFORE INSERT ON `ACL` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `salix`.`ACL_beforeUpdate` + BEFORE UPDATE ON `ACL` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `salix`.`ACL_afterDelete` + AFTER DELETE ON `ACL` + FOR EACH ROW +BEGIN + INSERT INTO ACLLog + SET `action` = 'delete', + `changedModel` = 'Acl', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; -- -- Current Database: `srt` @@ -9220,7 +9284,13 @@ BEGIN SET NEW.editorFk = account.myUser_getId(); IF NOT (NEW.routeFk <=> OLD.routeFk) THEN - IF NEW.isSigned THEN + IF NEW.isSigned AND NOT ( + SELECT (COUNT(s.id) = COUNT(cb.saleFk) + AND SUM(s.quantity) = SUM(cb.quantity)) + FROM sale s + LEFT JOIN claimBeginning cb ON cb.saleFk = s.id + WHERE s.ticketFk = NEW.id + ) THEN CALL util.throw('A signed ticket cannot be rerouted'); END IF; INSERT IGNORE INTO routeRecalc(routeFk) @@ -11142,4 +11212,4 @@ USE `vn2008`; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-08-06 6:03:19 +-- Dump completed on 2024-08-20 7:45:23 From 8e63d8596428d41f6189b579139eb1ee89a3119d Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 10:06:10 +0200 Subject: [PATCH 122/250] feat: refs #7759 Changed name --- db/routines/account/functions/myUser_checkLogin.sql | 2 +- db/routines/account/functions/myUser_getId.sql | 2 +- db/routines/account/functions/myUser_getName.sql | 2 +- db/routines/account/functions/myUser_hasPriv.sql | 2 +- db/routines/account/functions/myUser_hasRole.sql | 2 +- db/routines/account/functions/myUser_hasRoleId.sql | 2 +- db/routines/account/functions/myUser_hasRoutinePriv.sql | 2 +- db/routines/account/functions/passwordGenerate.sql | 2 +- db/routines/account/functions/toUnixDays.sql | 2 +- db/routines/account/functions/user_getMysqlRole.sql | 2 +- db/routines/account/functions/user_getNameFromId.sql | 2 +- db/routines/account/functions/user_hasPriv.sql | 2 +- db/routines/account/functions/user_hasRole.sql | 2 +- db/routines/account/functions/user_hasRoleId.sql | 2 +- db/routines/account/functions/user_hasRoutinePriv.sql | 2 +- db/routines/account/procedures/account_enable.sql | 2 +- db/routines/account/procedures/myUser_login.sql | 2 +- db/routines/account/procedures/myUser_loginWithKey.sql | 2 +- db/routines/account/procedures/myUser_loginWithName.sql | 2 +- db/routines/account/procedures/myUser_logout.sql | 2 +- db/routines/account/procedures/role_checkName.sql | 2 +- db/routines/account/procedures/role_getDescendents.sql | 2 +- db/routines/account/procedures/role_sync.sql | 2 +- db/routines/account/procedures/role_syncPrivileges.sql | 2 +- db/routines/account/procedures/user_checkName.sql | 2 +- db/routines/account/procedures/user_checkPassword.sql | 2 +- db/routines/account/triggers/account_afterDelete.sql | 2 +- db/routines/account/triggers/account_afterInsert.sql | 2 +- db/routines/account/triggers/account_beforeInsert.sql | 2 +- db/routines/account/triggers/account_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailAliasAccount_afterDelete.sql | 2 +- .../account/triggers/mailAliasAccount_beforeInsert.sql | 2 +- .../account/triggers/mailAliasAccount_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailAlias_afterDelete.sql | 2 +- db/routines/account/triggers/mailAlias_beforeInsert.sql | 2 +- db/routines/account/triggers/mailAlias_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailForward_afterDelete.sql | 2 +- db/routines/account/triggers/mailForward_beforeInsert.sql | 2 +- db/routines/account/triggers/mailForward_beforeUpdate.sql | 2 +- db/routines/account/triggers/roleInherit_afterDelete.sql | 2 +- db/routines/account/triggers/roleInherit_beforeInsert.sql | 2 +- db/routines/account/triggers/roleInherit_beforeUpdate.sql | 2 +- db/routines/account/triggers/role_afterDelete.sql | 2 +- db/routines/account/triggers/role_beforeInsert.sql | 2 +- db/routines/account/triggers/role_beforeUpdate.sql | 2 +- db/routines/account/triggers/user_afterDelete.sql | 2 +- db/routines/account/triggers/user_afterInsert.sql | 2 +- db/routines/account/triggers/user_afterUpdate.sql | 2 +- db/routines/account/triggers/user_beforeInsert.sql | 2 +- db/routines/account/triggers/user_beforeUpdate.sql | 2 +- db/routines/account/views/accountDovecot.sql | 2 +- db/routines/account/views/emailUser.sql | 2 +- db/routines/account/views/myRole.sql | 2 +- db/routines/account/views/myUser.sql | 2 +- db/routines/bi/procedures/Greuge_Evolution_Add.sql | 2 +- db/routines/bi/procedures/analisis_ventas_evolution_add.sql | 2 +- db/routines/bi/procedures/analisis_ventas_simple.sql | 2 +- db/routines/bi/procedures/analisis_ventas_update.sql | 2 +- db/routines/bi/procedures/clean.sql | 2 +- db/routines/bi/procedures/defaultersFromDate.sql | 2 +- db/routines/bi/procedures/defaulting.sql | 2 +- db/routines/bi/procedures/defaulting_launcher.sql | 2 +- db/routines/bi/procedures/facturacion_media_anual_update.sql | 2 +- db/routines/bi/procedures/greuge_dif_porte_add.sql | 2 +- db/routines/bi/procedures/nigthlyAnalisisVentas.sql | 2 +- db/routines/bi/procedures/rutasAnalyze.sql | 2 +- db/routines/bi/procedures/rutasAnalyze_launcher.sql | 2 +- db/routines/bi/views/analisis_grafico_ventas.sql | 2 +- db/routines/bi/views/analisis_ventas_simple.sql | 2 +- db/routines/bi/views/claims_ratio.sql | 2 +- db/routines/bi/views/customerRiskOverdue.sql | 2 +- db/routines/bi/views/defaulters.sql | 2 +- db/routines/bi/views/facturacion_media_anual.sql | 2 +- db/routines/bi/views/rotacion.sql | 2 +- db/routines/bi/views/tarifa_componentes.sql | 2 +- db/routines/bi/views/tarifa_componentes_series.sql | 2 +- db/routines/bs/events/clientDied_recalc.sql | 2 +- db/routines/bs/events/inventoryDiscrepancy_launch.sql | 2 +- db/routines/bs/events/nightTask_launchAll.sql | 2 +- db/routines/bs/functions/tramo.sql | 2 +- db/routines/bs/procedures/campaignComparative.sql | 2 +- db/routines/bs/procedures/carteras_add.sql | 2 +- db/routines/bs/procedures/clean.sql | 2 +- db/routines/bs/procedures/clientDied_recalc.sql | 2 +- db/routines/bs/procedures/clientNewBorn_recalc.sql | 2 +- db/routines/bs/procedures/compradores_evolution_add.sql | 2 +- db/routines/bs/procedures/fondo_evolution_add.sql | 2 +- db/routines/bs/procedures/fruitsEvolution.sql | 2 +- db/routines/bs/procedures/indicatorsUpdate.sql | 2 +- db/routines/bs/procedures/indicatorsUpdateLauncher.sql | 2 +- .../bs/procedures/inventoryDiscrepancyDetail_replace.sql | 2 +- db/routines/bs/procedures/m3Add.sql | 2 +- db/routines/bs/procedures/manaCustomerUpdate.sql | 2 +- db/routines/bs/procedures/manaSpellers_actualize.sql | 2 +- db/routines/bs/procedures/nightTask_launchAll.sql | 2 +- db/routines/bs/procedures/nightTask_launchTask.sql | 2 +- db/routines/bs/procedures/payMethodClientAdd.sql | 2 +- db/routines/bs/procedures/saleGraphic.sql | 2 +- db/routines/bs/procedures/salePersonEvolutionAdd.sql | 2 +- db/routines/bs/procedures/sale_add.sql | 2 +- db/routines/bs/procedures/salesByItemTypeDay_add.sql | 2 +- db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql | 2 +- db/routines/bs/procedures/salesByclientSalesPerson_add.sql | 2 +- db/routines/bs/procedures/salesPersonEvolution_add.sql | 2 +- db/routines/bs/procedures/sales_addLauncher.sql | 2 +- db/routines/bs/procedures/vendedores_add_launcher.sql | 2 +- db/routines/bs/procedures/ventas_contables_add.sql | 2 +- db/routines/bs/procedures/ventas_contables_add_launcher.sql | 2 +- db/routines/bs/procedures/waste_addSales.sql | 2 +- db/routines/bs/procedures/workerLabour_getData.sql | 2 +- db/routines/bs/procedures/workerProductivity_add.sql | 2 +- db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql | 2 +- db/routines/bs/triggers/nightTask_beforeInsert.sql | 2 +- db/routines/bs/triggers/nightTask_beforeUpdate.sql | 2 +- db/routines/bs/views/lastIndicators.sql | 2 +- db/routines/bs/views/packingSpeed.sql | 2 +- db/routines/bs/views/ventas.sql | 2 +- db/routines/cache/events/cacheCalc_clean.sql | 2 +- db/routines/cache/events/cache_clean.sql | 2 +- db/routines/cache/procedures/addressFriendship_Update.sql | 2 +- db/routines/cache/procedures/availableNoRaids_refresh.sql | 2 +- db/routines/cache/procedures/available_clean.sql | 2 +- db/routines/cache/procedures/available_refresh.sql | 2 +- db/routines/cache/procedures/cacheCalc_clean.sql | 2 +- db/routines/cache/procedures/cache_calc_end.sql | 2 +- db/routines/cache/procedures/cache_calc_start.sql | 2 +- db/routines/cache/procedures/cache_calc_unlock.sql | 2 +- db/routines/cache/procedures/cache_clean.sql | 2 +- db/routines/cache/procedures/clean.sql | 2 +- db/routines/cache/procedures/departure_timing.sql | 2 +- db/routines/cache/procedures/last_buy_refresh.sql | 2 +- db/routines/cache/procedures/stock_refresh.sql | 2 +- db/routines/cache/procedures/visible_clean.sql | 2 +- db/routines/cache/procedures/visible_refresh.sql | 2 +- db/routines/dipole/procedures/clean.sql | 2 +- db/routines/dipole/procedures/expedition_add.sql | 2 +- db/routines/dipole/views/expeditionControl.sql | 2 +- db/routines/edi/events/floramondo.sql | 2 +- db/routines/edi/functions/imageName.sql | 2 +- db/routines/edi/procedures/clean.sql | 2 +- db/routines/edi/procedures/deliveryInformation_Delete.sql | 2 +- db/routines/edi/procedures/ekt_add.sql | 2 +- db/routines/edi/procedures/ekt_load.sql | 2 +- db/routines/edi/procedures/ekt_loadNotBuy.sql | 2 +- db/routines/edi/procedures/ekt_refresh.sql | 2 +- db/routines/edi/procedures/ekt_scan.sql | 2 +- db/routines/edi/procedures/floramondo_offerRefresh.sql | 2 +- db/routines/edi/procedures/item_freeAdd.sql | 2 +- db/routines/edi/procedures/item_getNewByEkt.sql | 2 +- db/routines/edi/procedures/mail_new.sql | 2 +- db/routines/edi/triggers/item_feature_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_afterUpdate.sql | 2 +- db/routines/edi/triggers/putOrder_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_beforeUpdate.sql | 2 +- db/routines/edi/triggers/supplyResponse_afterUpdate.sql | 2 +- db/routines/edi/views/ektK2.sql | 2 +- db/routines/edi/views/ektRecent.sql | 2 +- db/routines/edi/views/errorList.sql | 2 +- db/routines/edi/views/supplyOffer.sql | 2 +- db/routines/floranet/procedures/catalogue_findById.sql | 2 +- db/routines/floranet/procedures/catalogue_get.sql | 2 +- db/routines/floranet/procedures/contact_request.sql | 2 +- db/routines/floranet/procedures/deliveryDate_get.sql | 2 +- db/routines/floranet/procedures/order_confirm.sql | 2 +- db/routines/floranet/procedures/order_put.sql | 2 +- db/routines/floranet/procedures/sliders_get.sql | 2 +- db/routines/hedera/functions/myClient_getDebt.sql | 2 +- db/routines/hedera/functions/myUser_checkRestPriv.sql | 2 +- db/routines/hedera/functions/order_getTotal.sql | 2 +- db/routines/hedera/procedures/catalog_calcFromMyAddress.sql | 2 +- db/routines/hedera/procedures/image_ref.sql | 2 +- db/routines/hedera/procedures/image_unref.sql | 2 +- db/routines/hedera/procedures/item_calcCatalog.sql | 2 +- db/routines/hedera/procedures/item_getVisible.sql | 2 +- db/routines/hedera/procedures/item_listAllocation.sql | 2 +- db/routines/hedera/procedures/myOrder_addItem.sql | 2 +- db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql | 2 +- db/routines/hedera/procedures/myOrder_calcCatalogFull.sql | 2 +- db/routines/hedera/procedures/myOrder_checkConfig.sql | 2 +- db/routines/hedera/procedures/myOrder_checkMine.sql | 2 +- db/routines/hedera/procedures/myOrder_configure.sql | 2 +- db/routines/hedera/procedures/myOrder_configureForGuest.sql | 2 +- db/routines/hedera/procedures/myOrder_confirm.sql | 2 +- db/routines/hedera/procedures/myOrder_create.sql | 2 +- db/routines/hedera/procedures/myOrder_getAvailable.sql | 2 +- db/routines/hedera/procedures/myOrder_getTax.sql | 2 +- db/routines/hedera/procedures/myOrder_newWithAddress.sql | 2 +- db/routines/hedera/procedures/myOrder_newWithDate.sql | 2 +- db/routines/hedera/procedures/myTicket_get.sql | 2 +- db/routines/hedera/procedures/myTicket_getPackages.sql | 2 +- db/routines/hedera/procedures/myTicket_getRows.sql | 2 +- db/routines/hedera/procedures/myTicket_getServices.sql | 2 +- db/routines/hedera/procedures/myTicket_list.sql | 2 +- db/routines/hedera/procedures/myTicket_logAccess.sql | 2 +- db/routines/hedera/procedures/myTpvTransaction_end.sql | 2 +- db/routines/hedera/procedures/myTpvTransaction_start.sql | 2 +- db/routines/hedera/procedures/order_addItem.sql | 2 +- db/routines/hedera/procedures/order_calcCatalog.sql | 2 +- db/routines/hedera/procedures/order_calcCatalogFromItem.sql | 2 +- db/routines/hedera/procedures/order_calcCatalogFull.sql | 2 +- db/routines/hedera/procedures/order_checkConfig.sql | 2 +- db/routines/hedera/procedures/order_checkEditable.sql | 2 +- db/routines/hedera/procedures/order_configure.sql | 2 +- db/routines/hedera/procedures/order_confirm.sql | 2 +- db/routines/hedera/procedures/order_confirmWithUser.sql | 2 +- db/routines/hedera/procedures/order_getAvailable.sql | 2 +- db/routines/hedera/procedures/order_getTax.sql | 2 +- db/routines/hedera/procedures/order_getTotal.sql | 2 +- db/routines/hedera/procedures/order_recalc.sql | 2 +- db/routines/hedera/procedures/order_update.sql | 2 +- db/routines/hedera/procedures/survey_vote.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirm.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirmAll.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirmById.sql | 2 +- .../hedera/procedures/tpvTransaction_confirmFromExport.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_end.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_start.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_undo.sql | 2 +- db/routines/hedera/procedures/visitUser_new.sql | 2 +- db/routines/hedera/procedures/visit_listByBrowser.sql | 2 +- db/routines/hedera/procedures/visit_register.sql | 2 +- db/routines/hedera/triggers/link_afterDelete.sql | 2 +- db/routines/hedera/triggers/link_afterInsert.sql | 2 +- db/routines/hedera/triggers/link_afterUpdate.sql | 2 +- db/routines/hedera/triggers/news_afterDelete.sql | 2 +- db/routines/hedera/triggers/news_afterInsert.sql | 2 +- db/routines/hedera/triggers/news_afterUpdate.sql | 2 +- db/routines/hedera/triggers/orderRow_beforeInsert.sql | 2 +- db/routines/hedera/triggers/order_afterInsert.sql | 2 +- db/routines/hedera/triggers/order_afterUpdate.sql | 2 +- db/routines/hedera/triggers/order_beforeDelete.sql | 2 +- db/routines/hedera/views/mainAccountBank.sql | 2 +- db/routines/hedera/views/messageL10n.sql | 2 +- db/routines/hedera/views/myAddress.sql | 2 +- db/routines/hedera/views/myBasketDefaults.sql | 2 +- db/routines/hedera/views/myClient.sql | 2 +- db/routines/hedera/views/myInvoice.sql | 2 +- db/routines/hedera/views/myMenu.sql | 2 +- db/routines/hedera/views/myOrder.sql | 2 +- db/routines/hedera/views/myOrderRow.sql | 2 +- db/routines/hedera/views/myOrderTicket.sql | 2 +- db/routines/hedera/views/myTicket.sql | 2 +- db/routines/hedera/views/myTicketRow.sql | 2 +- db/routines/hedera/views/myTicketService.sql | 2 +- db/routines/hedera/views/myTicketState.sql | 2 +- db/routines/hedera/views/myTpvTransaction.sql | 2 +- db/routines/hedera/views/orderTicket.sql | 2 +- db/routines/hedera/views/order_component.sql | 2 +- db/routines/hedera/views/order_row.sql | 2 +- db/routines/pbx/functions/clientFromPhone.sql | 2 +- db/routines/pbx/functions/phone_format.sql | 2 +- db/routines/pbx/procedures/phone_isValid.sql | 2 +- db/routines/pbx/procedures/queue_isValid.sql | 2 +- db/routines/pbx/procedures/sip_getExtension.sql | 2 +- db/routines/pbx/procedures/sip_isValid.sql | 2 +- db/routines/pbx/procedures/sip_setPassword.sql | 2 +- db/routines/pbx/triggers/blacklist_beforeInsert.sql | 2 +- db/routines/pbx/triggers/blacklist_berforeUpdate.sql | 2 +- db/routines/pbx/triggers/followme_beforeInsert.sql | 2 +- db/routines/pbx/triggers/followme_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/queuePhone_beforeInsert.sql | 2 +- db/routines/pbx/triggers/queuePhone_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/queue_beforeInsert.sql | 2 +- db/routines/pbx/triggers/queue_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/sip_afterInsert.sql | 2 +- db/routines/pbx/triggers/sip_afterUpdate.sql | 2 +- db/routines/pbx/triggers/sip_beforeInsert.sql | 2 +- db/routines/pbx/triggers/sip_beforeUpdate.sql | 2 +- db/routines/pbx/views/cdrConf.sql | 2 +- db/routines/pbx/views/followmeConf.sql | 2 +- db/routines/pbx/views/followmeNumberConf.sql | 2 +- db/routines/pbx/views/queueConf.sql | 2 +- db/routines/pbx/views/queueMemberConf.sql | 2 +- db/routines/pbx/views/sipConf.sql | 2 +- db/routines/psico/procedures/answerSort.sql | 2 +- db/routines/psico/procedures/examNew.sql | 2 +- db/routines/psico/procedures/getExamQuestions.sql | 2 +- db/routines/psico/procedures/getExamType.sql | 2 +- db/routines/psico/procedures/questionSort.sql | 2 +- db/routines/psico/views/examView.sql | 2 +- db/routines/psico/views/results.sql | 2 +- db/routines/sage/functions/company_getCode.sql | 2 +- db/routines/sage/procedures/accountingMovements_add.sql | 2 +- db/routines/sage/procedures/clean.sql | 2 +- db/routines/sage/procedures/clientSupplier_add.sql | 2 +- db/routines/sage/procedures/importErrorNotification.sql | 2 +- db/routines/sage/procedures/invoiceIn_add.sql | 2 +- db/routines/sage/procedures/invoiceIn_manager.sql | 2 +- db/routines/sage/procedures/invoiceOut_add.sql | 2 +- db/routines/sage/procedures/invoiceOut_manager.sql | 2 +- db/routines/sage/procedures/pgc_add.sql | 2 +- db/routines/sage/triggers/movConta_beforeUpdate.sql | 2 +- db/routines/sage/views/clientLastTwoMonths.sql | 2 +- db/routines/sage/views/supplierLastThreeMonths.sql | 2 +- db/routines/salix/events/accessToken_prune.sql | 2 +- db/routines/salix/procedures/accessToken_prune.sql | 2 +- db/routines/salix/views/Account.sql | 2 +- db/routines/salix/views/Role.sql | 2 +- db/routines/salix/views/RoleMapping.sql | 2 +- db/routines/salix/views/User.sql | 2 +- db/routines/srt/events/moving_clean.sql | 2 +- db/routines/srt/functions/bid.sql | 2 +- db/routines/srt/functions/bufferPool_get.sql | 2 +- db/routines/srt/functions/buffer_get.sql | 2 +- db/routines/srt/functions/buffer_getRandom.sql | 2 +- db/routines/srt/functions/buffer_getState.sql | 2 +- db/routines/srt/functions/buffer_getType.sql | 2 +- db/routines/srt/functions/buffer_isFull.sql | 2 +- db/routines/srt/functions/dayMinute.sql | 2 +- db/routines/srt/functions/expedition_check.sql | 2 +- db/routines/srt/functions/expedition_getDayMinute.sql | 2 +- db/routines/srt/procedures/buffer_getExpCount.sql | 2 +- db/routines/srt/procedures/buffer_getStateType.sql | 2 +- db/routines/srt/procedures/buffer_giveBack.sql | 2 +- db/routines/srt/procedures/buffer_readPhotocell.sql | 2 +- db/routines/srt/procedures/buffer_setEmpty.sql | 2 +- db/routines/srt/procedures/buffer_setState.sql | 2 +- db/routines/srt/procedures/buffer_setStateType.sql | 2 +- db/routines/srt/procedures/buffer_setType.sql | 2 +- db/routines/srt/procedures/buffer_setTypeByName.sql | 2 +- db/routines/srt/procedures/clean.sql | 2 +- db/routines/srt/procedures/expeditionLoading_add.sql | 2 +- db/routines/srt/procedures/expedition_arrived.sql | 2 +- db/routines/srt/procedures/expedition_bufferOut.sql | 2 +- db/routines/srt/procedures/expedition_entering.sql | 2 +- db/routines/srt/procedures/expedition_get.sql | 2 +- db/routines/srt/procedures/expedition_groupOut.sql | 2 +- db/routines/srt/procedures/expedition_in.sql | 2 +- db/routines/srt/procedures/expedition_moving.sql | 2 +- db/routines/srt/procedures/expedition_out.sql | 2 +- db/routines/srt/procedures/expedition_outAll.sql | 2 +- db/routines/srt/procedures/expedition_relocate.sql | 2 +- db/routines/srt/procedures/expedition_reset.sql | 2 +- db/routines/srt/procedures/expedition_routeOut.sql | 2 +- db/routines/srt/procedures/expedition_scan.sql | 2 +- db/routines/srt/procedures/expedition_setDimensions.sql | 2 +- db/routines/srt/procedures/expedition_weighing.sql | 2 +- db/routines/srt/procedures/failureLog_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add_beta.sql | 2 +- db/routines/srt/procedures/moving_CollidingSet.sql | 2 +- db/routines/srt/procedures/moving_between.sql | 2 +- db/routines/srt/procedures/moving_clean.sql | 2 +- db/routines/srt/procedures/moving_delete.sql | 2 +- db/routines/srt/procedures/moving_groupOut.sql | 2 +- db/routines/srt/procedures/moving_next.sql | 2 +- db/routines/srt/procedures/photocell_setActive.sql | 2 +- db/routines/srt/procedures/randomMoving.sql | 2 +- db/routines/srt/procedures/randomMoving_Launch.sql | 2 +- db/routines/srt/procedures/restart.sql | 2 +- db/routines/srt/procedures/start.sql | 2 +- db/routines/srt/procedures/stop.sql | 2 +- db/routines/srt/procedures/test.sql | 2 +- db/routines/srt/triggers/expedition_beforeUpdate.sql | 2 +- db/routines/srt/triggers/moving_afterInsert.sql | 2 +- db/routines/srt/views/bufferDayMinute.sql | 2 +- db/routines/srt/views/bufferFreeLength.sql | 2 +- db/routines/srt/views/bufferStock.sql | 2 +- db/routines/srt/views/routePalletized.sql | 2 +- db/routines/srt/views/ticketPalletized.sql | 2 +- db/routines/srt/views/upperStickers.sql | 2 +- db/routines/stock/events/log_clean.sql | 2 +- db/routines/stock/events/log_syncNoWait.sql | 2 +- db/routines/stock/procedures/inbound_addPick.sql | 2 +- db/routines/stock/procedures/inbound_removePick.sql | 2 +- db/routines/stock/procedures/inbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/inbound_sync.sql | 2 +- db/routines/stock/procedures/log_clean.sql | 2 +- db/routines/stock/procedures/log_delete.sql | 2 +- db/routines/stock/procedures/log_refreshAll.sql | 2 +- db/routines/stock/procedures/log_refreshBuy.sql | 2 +- db/routines/stock/procedures/log_refreshOrder.sql | 2 +- db/routines/stock/procedures/log_refreshSale.sql | 2 +- db/routines/stock/procedures/log_sync.sql | 2 +- db/routines/stock/procedures/log_syncNoWait.sql | 2 +- db/routines/stock/procedures/outbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/outbound_sync.sql | 2 +- db/routines/stock/procedures/visible_log.sql | 2 +- db/routines/stock/triggers/inbound_afterDelete.sql | 2 +- db/routines/stock/triggers/inbound_beforeInsert.sql | 2 +- db/routines/stock/triggers/outbound_afterDelete.sql | 2 +- db/routines/stock/triggers/outbound_beforeInsert.sql | 2 +- db/routines/tmp/events/clean.sql | 2 +- db/routines/tmp/procedures/clean.sql | 2 +- db/routines/util/events/slowLog_prune.sql | 2 +- db/routines/util/functions/VN_CURDATE.sql | 2 +- db/routines/util/functions/VN_CURTIME.sql | 2 +- db/routines/util/functions/VN_NOW.sql | 2 +- db/routines/util/functions/VN_UNIX_TIMESTAMP.sql | 2 +- db/routines/util/functions/VN_UTC_DATE.sql | 2 +- db/routines/util/functions/VN_UTC_TIME.sql | 2 +- db/routines/util/functions/VN_UTC_TIMESTAMP.sql | 2 +- db/routines/util/functions/accountNumberToIban.sql | 2 +- db/routines/util/functions/accountShortToStandard.sql | 2 +- db/routines/util/functions/binlogQueue_getDelay.sql | 2 +- db/routines/util/functions/capitalizeFirst.sql | 2 +- db/routines/util/functions/checkPrintableChars.sql | 2 +- db/routines/util/functions/crypt.sql | 2 +- db/routines/util/functions/cryptOff.sql | 2 +- db/routines/util/functions/dayEnd.sql | 2 +- db/routines/util/functions/firstDayOfMonth.sql | 2 +- db/routines/util/functions/firstDayOfYear.sql | 2 +- db/routines/util/functions/formatRow.sql | 2 +- db/routines/util/functions/formatTable.sql | 2 +- db/routines/util/functions/hasDateOverlapped.sql | 2 +- db/routines/util/functions/hmacSha2.sql | 2 +- db/routines/util/functions/isLeapYear.sql | 2 +- db/routines/util/functions/json_removeNulls.sql | 2 +- db/routines/util/functions/lang.sql | 2 +- db/routines/util/functions/lastDayOfYear.sql | 2 +- db/routines/util/functions/log_formatDate.sql | 2 +- db/routines/util/functions/midnight.sql | 2 +- db/routines/util/functions/mockTime.sql | 2 +- db/routines/util/functions/mockTimeBase.sql | 2 +- db/routines/util/functions/mockUtcTime.sql | 2 +- db/routines/util/functions/nextWeek.sql | 2 +- db/routines/util/functions/notification_send.sql | 2 +- db/routines/util/functions/quarterFirstDay.sql | 2 +- db/routines/util/functions/quoteIdentifier.sql | 2 +- db/routines/util/functions/stringXor.sql | 2 +- db/routines/util/functions/today.sql | 2 +- db/routines/util/functions/tomorrow.sql | 2 +- db/routines/util/functions/twoDaysAgo.sql | 2 +- db/routines/util/functions/yearRelativePosition.sql | 2 +- db/routines/util/functions/yesterday.sql | 2 +- db/routines/util/procedures/checkHex.sql | 2 +- db/routines/util/procedures/connection_kill.sql | 2 +- db/routines/util/procedures/debugAdd.sql | 2 +- db/routines/util/procedures/exec.sql | 2 +- db/routines/util/procedures/log_add.sql | 2 +- db/routines/util/procedures/log_addWithUser.sql | 2 +- db/routines/util/procedures/log_cleanInstances.sql | 2 +- db/routines/util/procedures/procNoOverlap.sql | 2 +- db/routines/util/procedures/proc_changedPrivs.sql | 2 +- db/routines/util/procedures/proc_restorePrivs.sql | 2 +- db/routines/util/procedures/proc_savePrivs.sql | 2 +- db/routines/util/procedures/slowLog_prune.sql | 2 +- db/routines/util/procedures/throw.sql | 2 +- db/routines/util/procedures/time_generate.sql | 2 +- db/routines/util/procedures/tx_commit.sql | 2 +- db/routines/util/procedures/tx_rollback.sql | 2 +- db/routines/util/procedures/tx_start.sql | 2 +- db/routines/util/procedures/warn.sql | 2 +- db/routines/util/views/eventLogGrouped.sql | 2 +- db/routines/vn/events/claim_changeState.sql | 2 +- db/routines/vn/events/client_unassignSalesPerson.sql | 2 +- db/routines/vn/events/client_userDisable.sql | 2 +- db/routines/vn/events/collection_make.sql | 2 +- db/routines/vn/events/department_doCalc.sql | 2 +- db/routines/vn/events/envialiaThreHoldChecker.sql | 2 +- db/routines/vn/events/greuge_notify.sql | 2 +- db/routines/vn/events/itemImageQueue_check.sql | 2 +- db/routines/vn/events/itemShelvingSale_doReserve.sql | 2 +- db/routines/vn/events/mysqlConnectionsSorter_kill.sql | 2 +- db/routines/vn/events/printQueue_check.sql | 2 +- db/routines/vn/events/raidUpdate.sql | 2 +- db/routines/vn/events/route_doRecalc.sql | 2 +- db/routines/vn/events/vehicle_notify.sql | 2 +- db/routines/vn/events/workerJourney_doRecalc.sql | 2 +- db/routines/vn/events/worker_updateChangedBusiness.sql | 2 +- db/routines/vn/events/zoneGeo_doCalc.sql | 2 +- db/routines/vn/functions/MIDNIGHT.sql | 2 +- db/routines/vn/functions/addressTaxArea.sql | 2 +- db/routines/vn/functions/address_getGeo.sql | 2 +- db/routines/vn/functions/barcodeToItem.sql | 2 +- db/routines/vn/functions/buy_getUnitVolume.sql | 2 +- db/routines/vn/functions/buy_getVolume.sql | 2 +- db/routines/vn/functions/catalog_componentReverse.sql | 2 +- db/routines/vn/functions/clientGetMana.sql | 2 +- db/routines/vn/functions/clientGetSalesPerson.sql | 2 +- db/routines/vn/functions/clientTaxArea.sql | 2 +- db/routines/vn/functions/client_getDebt.sql | 2 +- db/routines/vn/functions/client_getFromPhone.sql | 2 +- db/routines/vn/functions/client_getSalesPerson.sql | 2 +- db/routines/vn/functions/client_getSalesPersonByTicket.sql | 2 +- db/routines/vn/functions/client_getSalesPersonCode.sql | 2 +- .../vn/functions/client_getSalesPersonCodeByTicket.sql | 2 +- db/routines/vn/functions/client_hasDifferentCountries.sql | 2 +- db/routines/vn/functions/collection_isPacked.sql | 2 +- db/routines/vn/functions/currency_getCommission.sql | 2 +- db/routines/vn/functions/currentRate.sql | 2 +- .../vn/functions/deviceProductionUser_accessGranted.sql | 2 +- db/routines/vn/functions/duaTax_getRate.sql | 2 +- db/routines/vn/functions/ekt_getEntry.sql | 2 +- db/routines/vn/functions/ekt_getTravel.sql | 2 +- db/routines/vn/functions/entry_getCommission.sql | 2 +- db/routines/vn/functions/entry_getCurrency.sql | 2 +- db/routines/vn/functions/entry_getForLogiflora.sql | 2 +- db/routines/vn/functions/entry_isIntrastat.sql | 2 +- db/routines/vn/functions/entry_isInventoryOrPrevious.sql | 2 +- db/routines/vn/functions/expedition_checkRoute.sql | 2 +- db/routines/vn/functions/firstDayOfWeek.sql | 2 +- db/routines/vn/functions/getAlert3State.sql | 2 +- db/routines/vn/functions/getDueDate.sql | 2 +- db/routines/vn/functions/getInventoryDate.sql | 2 +- db/routines/vn/functions/getNewItemId.sql | 2 +- db/routines/vn/functions/getNextDueDate.sql | 2 +- db/routines/vn/functions/getShipmentHour.sql | 2 +- db/routines/vn/functions/getSpecialPrice.sql | 2 +- db/routines/vn/functions/getTicketTrolleyLabelCount.sql | 2 +- db/routines/vn/functions/getUser.sql | 2 +- db/routines/vn/functions/getUserId.sql | 2 +- db/routines/vn/functions/hasAnyNegativeBase.sql | 2 +- db/routines/vn/functions/hasAnyPositiveBase.sql | 2 +- db/routines/vn/functions/hasItemsInSector.sql | 2 +- db/routines/vn/functions/hasSomeNegativeBase.sql | 2 +- db/routines/vn/functions/intrastat_estimateNet.sql | 2 +- db/routines/vn/functions/invoiceOutAmount.sql | 2 +- db/routines/vn/functions/invoiceOut_getMaxIssued.sql | 2 +- db/routines/vn/functions/invoiceOut_getPath.sql | 2 +- db/routines/vn/functions/invoiceOut_getWeight.sql | 2 +- db/routines/vn/functions/invoiceSerial.sql | 2 +- db/routines/vn/functions/invoiceSerialArea.sql | 2 +- db/routines/vn/functions/isLogifloraDay.sql | 2 +- db/routines/vn/functions/itemPacking.sql | 2 +- .../vn/functions/itemShelvingPlacementSupply_ClosestGet.sql | 2 +- db/routines/vn/functions/itemTag_getIntValue.sql | 2 +- db/routines/vn/functions/item_getFhImage.sql | 2 +- db/routines/vn/functions/item_getPackage.sql | 2 +- db/routines/vn/functions/item_getVolume.sql | 2 +- db/routines/vn/functions/itemsInSector_get.sql | 2 +- db/routines/vn/functions/lastDayOfWeek.sql | 2 +- db/routines/vn/functions/machine_checkPlate.sql | 2 +- db/routines/vn/functions/messageSend.sql | 2 +- db/routines/vn/functions/messageSendWithUser.sql | 2 +- db/routines/vn/functions/orderTotalVolume.sql | 2 +- db/routines/vn/functions/orderTotalVolumeBoxes.sql | 2 +- db/routines/vn/functions/packaging_calculate.sql | 2 +- db/routines/vn/functions/priceFixed_getRate2.sql | 2 +- db/routines/vn/functions/routeProposal.sql | 2 +- db/routines/vn/functions/routeProposal_.sql | 2 +- db/routines/vn/functions/routeProposal_beta.sql | 2 +- db/routines/vn/functions/sale_hasComponentLack.sql | 2 +- db/routines/vn/functions/specie_IsForbidden.sql | 2 +- db/routines/vn/functions/testCIF.sql | 2 +- db/routines/vn/functions/testNIE.sql | 2 +- db/routines/vn/functions/testNIF.sql | 2 +- db/routines/vn/functions/ticketCollection_getNoPacked.sql | 2 +- db/routines/vn/functions/ticketGetTotal.sql | 2 +- db/routines/vn/functions/ticketPositionInPath.sql | 2 +- db/routines/vn/functions/ticketSplitCounter.sql | 2 +- db/routines/vn/functions/ticketTotalVolume.sql | 2 +- db/routines/vn/functions/ticketTotalVolumeBoxes.sql | 2 +- db/routines/vn/functions/ticketWarehouseGet.sql | 2 +- db/routines/vn/functions/ticket_CC_volume.sql | 2 +- db/routines/vn/functions/ticket_HasUbication.sql | 2 +- db/routines/vn/functions/ticket_get.sql | 2 +- db/routines/vn/functions/ticket_getFreightCost.sql | 2 +- db/routines/vn/functions/ticket_getWeight.sql | 2 +- db/routines/vn/functions/ticket_isOutClosureZone.sql | 2 +- db/routines/vn/functions/ticket_isProblemCalcNeeded.sql | 2 +- db/routines/vn/functions/ticket_isTooLittle.sql | 2 +- db/routines/vn/functions/till_new.sql | 2 +- db/routines/vn/functions/timeWorkerControl_getDirection.sql | 2 +- db/routines/vn/functions/time_getSalesYear.sql | 2 +- db/routines/vn/functions/travel_getForLogiflora.sql | 2 +- db/routines/vn/functions/travel_hasUniqueAwb.sql | 2 +- db/routines/vn/functions/validationCode.sql | 2 +- db/routines/vn/functions/validationCode_beta.sql | 2 +- db/routines/vn/functions/workerMachinery_isRegistered.sql | 2 +- db/routines/vn/functions/workerNigthlyHours_calculate.sql | 2 +- db/routines/vn/functions/worker_getCode.sql | 2 +- db/routines/vn/functions/worker_isBoss.sql | 2 +- db/routines/vn/functions/worker_isInDepartment.sql | 2 +- db/routines/vn/functions/worker_isWorking.sql | 2 +- db/routines/vn/functions/zoneGeo_new.sql | 2 +- db/routines/vn/procedures/XDiario_check.sql | 2 +- db/routines/vn/procedures/XDiario_checkDate.sql | 2 +- db/routines/vn/procedures/absoluteInventoryHistory.sql | 2 +- db/routines/vn/procedures/addAccountReconciliation.sql | 2 +- db/routines/vn/procedures/addNoteFromDelivery.sql | 2 +- db/routines/vn/procedures/addressTaxArea.sql | 2 +- db/routines/vn/procedures/address_updateCoordinates.sql | 2 +- db/routines/vn/procedures/agencyHourGetFirstShipped.sql | 2 +- db/routines/vn/procedures/agencyHourGetLanded.sql | 2 +- db/routines/vn/procedures/agencyHourGetWarehouse.sql | 2 +- db/routines/vn/procedures/agencyHourListGetShipped.sql | 2 +- db/routines/vn/procedures/agencyVolume.sql | 2 +- db/routines/vn/procedures/available_calc.sql | 2 +- db/routines/vn/procedures/available_traslate.sql | 2 +- db/routines/vn/procedures/balanceNestTree_addChild.sql | 2 +- db/routines/vn/procedures/balanceNestTree_delete.sql | 2 +- db/routines/vn/procedures/balanceNestTree_move.sql | 2 +- db/routines/vn/procedures/balance_create.sql | 2 +- db/routines/vn/procedures/bankEntity_checkBic.sql | 2 +- db/routines/vn/procedures/bankPolicy_notifyExpired.sql | 2 +- db/routines/vn/procedures/buyUltimate.sql | 2 +- db/routines/vn/procedures/buyUltimateFromInterval.sql | 2 +- db/routines/vn/procedures/buy_afterUpsert.sql | 2 +- db/routines/vn/procedures/buy_checkGrouping.sql | 2 +- db/routines/vn/procedures/buy_chekItem.sql | 2 +- db/routines/vn/procedures/buy_clone.sql | 2 +- db/routines/vn/procedures/buy_getSplit.sql | 2 +- db/routines/vn/procedures/buy_getVolume.sql | 2 +- db/routines/vn/procedures/buy_getVolumeByAgency.sql | 2 +- db/routines/vn/procedures/buy_getVolumeByEntry.sql | 2 +- db/routines/vn/procedures/buy_recalcPrices.sql | 2 +- db/routines/vn/procedures/buy_recalcPricesByAwb.sql | 2 +- db/routines/vn/procedures/buy_recalcPricesByBuy.sql | 2 +- db/routines/vn/procedures/buy_recalcPricesByEntry.sql | 2 +- db/routines/vn/procedures/buy_scan.sql | 2 +- db/routines/vn/procedures/buy_updateGrouping.sql | 2 +- db/routines/vn/procedures/buy_updatePacking.sql | 2 +- db/routines/vn/procedures/catalog_calcFromItem.sql | 2 +- db/routines/vn/procedures/catalog_calculate.sql | 2 +- db/routines/vn/procedures/catalog_componentCalculate.sql | 2 +- db/routines/vn/procedures/catalog_componentPrepare.sql | 2 +- db/routines/vn/procedures/catalog_componentPurge.sql | 2 +- db/routines/vn/procedures/claimRatio_add.sql | 2 +- db/routines/vn/procedures/clean.sql | 2 +- db/routines/vn/procedures/clean_logiflora.sql | 2 +- db/routines/vn/procedures/clearShelvingList.sql | 2 +- db/routines/vn/procedures/clientDebtSpray.sql | 2 +- db/routines/vn/procedures/clientFreeze.sql | 2 +- db/routines/vn/procedures/clientGetDebtDiary.sql | 2 +- db/routines/vn/procedures/clientGreugeSpray.sql | 2 +- db/routines/vn/procedures/clientPackagingOverstock.sql | 2 +- db/routines/vn/procedures/clientPackagingOverstockReturn.sql | 2 +- db/routines/vn/procedures/clientRemoveWorker.sql | 2 +- db/routines/vn/procedures/clientRisk_update.sql | 2 +- db/routines/vn/procedures/client_RandomList.sql | 2 +- db/routines/vn/procedures/client_checkBalance.sql | 2 +- db/routines/vn/procedures/client_create.sql | 2 +- db/routines/vn/procedures/client_getDebt.sql | 2 +- db/routines/vn/procedures/client_getMana.sql | 2 +- db/routines/vn/procedures/client_getRisk.sql | 2 +- db/routines/vn/procedures/client_unassignSalesPerson.sql | 2 +- db/routines/vn/procedures/client_userDisable.sql | 2 +- db/routines/vn/procedures/cmrPallet_add.sql | 2 +- db/routines/vn/procedures/collectionPlacement_get.sql | 2 +- db/routines/vn/procedures/collection_addItem.sql | 2 +- db/routines/vn/procedures/collection_addWithReservation.sql | 2 +- db/routines/vn/procedures/collection_assign.sql | 2 +- db/routines/vn/procedures/collection_get.sql | 2 +- db/routines/vn/procedures/collection_getAssigned.sql | 2 +- db/routines/vn/procedures/collection_getTickets.sql | 2 +- db/routines/vn/procedures/collection_kill.sql | 2 +- db/routines/vn/procedures/collection_make.sql | 2 +- db/routines/vn/procedures/collection_new.sql | 2 +- db/routines/vn/procedures/collection_printSticker.sql | 2 +- db/routines/vn/procedures/collection_setParking.sql | 2 +- db/routines/vn/procedures/collection_setState.sql | 2 +- db/routines/vn/procedures/company_getFiscaldata.sql | 2 +- db/routines/vn/procedures/company_getSuppliersDebt.sql | 2 +- db/routines/vn/procedures/comparative_add.sql | 2 +- db/routines/vn/procedures/confection_controlSource.sql | 2 +- db/routines/vn/procedures/conveyorExpedition_Add.sql | 2 +- db/routines/vn/procedures/copyComponentsFromSaleList.sql | 2 +- db/routines/vn/procedures/createPedidoInterno.sql | 2 +- db/routines/vn/procedures/creditInsurance_getRisk.sql | 2 +- db/routines/vn/procedures/creditRecovery.sql | 2 +- db/routines/vn/procedures/crypt.sql | 2 +- db/routines/vn/procedures/cryptOff.sql | 2 +- db/routines/vn/procedures/department_calcTree.sql | 2 +- db/routines/vn/procedures/department_calcTreeRec.sql | 2 +- db/routines/vn/procedures/department_doCalc.sql | 2 +- db/routines/vn/procedures/department_getHasMistake.sql | 2 +- db/routines/vn/procedures/department_getLeaves.sql | 2 +- db/routines/vn/procedures/deviceLog_add.sql | 2 +- db/routines/vn/procedures/deviceProductionUser_exists.sql | 2 +- db/routines/vn/procedures/deviceProductionUser_getWorker.sql | 2 +- db/routines/vn/procedures/deviceProduction_getnameDevice.sql | 2 +- db/routines/vn/procedures/device_checkLogin.sql | 2 +- db/routines/vn/procedures/duaEntryValueUpdate.sql | 2 +- db/routines/vn/procedures/duaInvoiceInBooking.sql | 2 +- db/routines/vn/procedures/duaParcialMake.sql | 2 +- db/routines/vn/procedures/duaTaxBooking.sql | 2 +- db/routines/vn/procedures/duaTax_doRecalc.sql | 2 +- db/routines/vn/procedures/ediTables_Update.sql | 2 +- db/routines/vn/procedures/ektEntryAssign_setEntry.sql | 2 +- db/routines/vn/procedures/energyMeter_record.sql | 2 +- db/routines/vn/procedures/entryDelivered.sql | 2 +- db/routines/vn/procedures/entryWithItem.sql | 2 +- db/routines/vn/procedures/entry_checkPackaging.sql | 2 +- db/routines/vn/procedures/entry_clone.sql | 2 +- db/routines/vn/procedures/entry_cloneHeader.sql | 2 +- db/routines/vn/procedures/entry_cloneWithoutBuy.sql | 2 +- db/routines/vn/procedures/entry_copyBuys.sql | 2 +- db/routines/vn/procedures/entry_fixMisfit.sql | 2 +- db/routines/vn/procedures/entry_getRate.sql | 2 +- db/routines/vn/procedures/entry_getTransfer.sql | 2 +- db/routines/vn/procedures/entry_isEditable.sql | 2 +- db/routines/vn/procedures/entry_lock.sql | 2 +- db/routines/vn/procedures/entry_moveNotPrinted.sql | 2 +- db/routines/vn/procedures/entry_notifyChanged.sql | 2 +- db/routines/vn/procedures/entry_recalc.sql | 2 +- db/routines/vn/procedures/entry_splitByShelving.sql | 2 +- db/routines/vn/procedures/entry_splitMisfit.sql | 2 +- db/routines/vn/procedures/entry_unlock.sql | 2 +- db/routines/vn/procedures/entry_updateComission.sql | 2 +- db/routines/vn/procedures/expeditionGetFromRoute.sql | 2 +- db/routines/vn/procedures/expeditionPallet_Del.sql | 2 +- db/routines/vn/procedures/expeditionPallet_List.sql | 2 +- db/routines/vn/procedures/expeditionPallet_View.sql | 2 +- db/routines/vn/procedures/expeditionPallet_build.sql | 2 +- db/routines/vn/procedures/expeditionPallet_printLabel.sql | 2 +- db/routines/vn/procedures/expeditionScan_Add.sql | 2 +- db/routines/vn/procedures/expeditionScan_Del.sql | 2 +- db/routines/vn/procedures/expeditionScan_List.sql | 2 +- db/routines/vn/procedures/expeditionScan_Put.sql | 2 +- db/routines/vn/procedures/expeditionState_add.sql | 2 +- db/routines/vn/procedures/expeditionState_addByAdress.sql | 2 +- db/routines/vn/procedures/expeditionState_addByExpedition.sql | 2 +- db/routines/vn/procedures/expeditionState_addByPallet.sql | 2 +- db/routines/vn/procedures/expeditionState_addByRoute.sql | 2 +- db/routines/vn/procedures/expedition_StateGet.sql | 2 +- db/routines/vn/procedures/expedition_getFromRoute.sql | 2 +- db/routines/vn/procedures/expedition_getState.sql | 2 +- db/routines/vn/procedures/freelance_getInfo.sql | 2 +- db/routines/vn/procedures/getDayExpeditions.sql | 2 +- db/routines/vn/procedures/getInfoDelivery.sql | 2 +- db/routines/vn/procedures/getPedidosInternos.sql | 2 +- db/routines/vn/procedures/getTaxBases.sql | 2 +- db/routines/vn/procedures/greuge_add.sql | 2 +- db/routines/vn/procedures/greuge_notifyEvents.sql | 2 +- db/routines/vn/procedures/inventoryFailureAdd.sql | 2 +- db/routines/vn/procedures/inventoryMake.sql | 2 +- db/routines/vn/procedures/inventoryMakeLauncher.sql | 2 +- db/routines/vn/procedures/inventory_repair.sql | 2 +- db/routines/vn/procedures/invoiceExpenseMake.sql | 2 +- db/routines/vn/procedures/invoiceFromAddress.sql | 2 +- db/routines/vn/procedures/invoiceFromClient.sql | 2 +- db/routines/vn/procedures/invoiceFromTicket.sql | 2 +- db/routines/vn/procedures/invoiceInDueDay_calculate.sql | 2 +- db/routines/vn/procedures/invoiceInDueDay_recalc.sql | 2 +- db/routines/vn/procedures/invoiceInTaxMakeByDua.sql | 2 +- db/routines/vn/procedures/invoiceInTax_afterUpsert.sql | 2 +- db/routines/vn/procedures/invoiceInTax_getFromDua.sql | 2 +- db/routines/vn/procedures/invoiceInTax_getFromEntries.sql | 2 +- db/routines/vn/procedures/invoiceInTax_recalc.sql | 2 +- db/routines/vn/procedures/invoiceIn_booking.sql | 2 +- db/routines/vn/procedures/invoiceIn_checkBooked.sql | 2 +- db/routines/vn/procedures/invoiceOutAgain.sql | 2 +- db/routines/vn/procedures/invoiceOutBooking.sql | 2 +- db/routines/vn/procedures/invoiceOutBookingRange.sql | 2 +- db/routines/vn/procedures/invoiceOutListByCompany.sql | 2 +- db/routines/vn/procedures/invoiceOutTaxAndExpense.sql | 2 +- .../vn/procedures/invoiceOut_exportationFromClient.sql | 2 +- db/routines/vn/procedures/invoiceOut_new.sql | 2 +- db/routines/vn/procedures/invoiceOut_newFromClient.sql | 2 +- db/routines/vn/procedures/invoiceOut_newFromTicket.sql | 2 +- db/routines/vn/procedures/invoiceTaxMake.sql | 2 +- db/routines/vn/procedures/itemBarcode_update.sql | 2 +- db/routines/vn/procedures/itemFuentesBalance.sql | 2 +- db/routines/vn/procedures/itemPlacementFromTicket.sql | 2 +- db/routines/vn/procedures/itemPlacementSupplyAiming.sql | 2 +- db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql | 2 +- db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql | 2 +- .../vn/procedures/itemPlacementSupplyStockGetTargetList.sql | 2 +- db/routines/vn/procedures/itemRefreshTags.sql | 2 +- db/routines/vn/procedures/itemSale_byWeek.sql | 2 +- db/routines/vn/procedures/itemSaveMin.sql | 2 +- db/routines/vn/procedures/itemSearchShelving.sql | 2 +- db/routines/vn/procedures/itemShelvingDelete.sql | 2 +- db/routines/vn/procedures/itemShelvingLog_get.sql | 2 +- db/routines/vn/procedures/itemShelvingMakeFromDate.sql | 2 +- db/routines/vn/procedures/itemShelvingMatch.sql | 2 +- db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql | 2 +- db/routines/vn/procedures/itemShelvingProblem.sql | 2 +- db/routines/vn/procedures/itemShelvingRadar.sql | 2 +- db/routines/vn/procedures/itemShelvingRadar_Entry.sql | 2 +- .../vn/procedures/itemShelvingRadar_Entry_State_beta.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_Add.sql | 2 +- .../vn/procedures/itemShelvingSale_addByCollection.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_addBySale.sql | 2 +- .../vn/procedures/itemShelvingSale_addBySectorCollection.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_doReserve.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_reallocate.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_setPicked.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_setQuantity.sql | 2 +- db/routines/vn/procedures/itemShelvingSale_unpicked.sql | 2 +- db/routines/vn/procedures/itemShelving_add.sql | 2 +- db/routines/vn/procedures/itemShelving_addByClaim.sql | 2 +- db/routines/vn/procedures/itemShelving_addList.sql | 2 +- db/routines/vn/procedures/itemShelving_filterBuyer.sql | 2 +- db/routines/vn/procedures/itemShelving_get.sql | 2 +- db/routines/vn/procedures/itemShelving_getAlternatives.sql | 2 +- db/routines/vn/procedures/itemShelving_getInfo.sql | 2 +- db/routines/vn/procedures/itemShelving_getItemDetails.sql | 2 +- db/routines/vn/procedures/itemShelving_getSaleDate.sql | 2 +- db/routines/vn/procedures/itemShelving_inventory.sql | 2 +- db/routines/vn/procedures/itemShelving_selfConsumption.sql | 2 +- db/routines/vn/procedures/itemShelving_transfer.sql | 2 +- db/routines/vn/procedures/itemShelving_update.sql | 2 +- db/routines/vn/procedures/itemTagMake.sql | 2 +- db/routines/vn/procedures/itemTagReorder.sql | 2 +- db/routines/vn/procedures/itemTagReorderByName.sql | 2 +- db/routines/vn/procedures/itemTag_replace.sql | 2 +- db/routines/vn/procedures/itemTopSeller.sql | 2 +- db/routines/vn/procedures/itemUpdateTag.sql | 2 +- db/routines/vn/procedures/item_calcVisible.sql | 2 +- db/routines/vn/procedures/item_cleanFloramondo.sql | 2 +- db/routines/vn/procedures/item_comparative.sql | 2 +- db/routines/vn/procedures/item_deactivateUnused.sql | 2 +- db/routines/vn/procedures/item_devalueA2.sql | 2 +- db/routines/vn/procedures/item_getAtp.sql | 2 +- db/routines/vn/procedures/item_getBalance.sql | 2 +- db/routines/vn/procedures/item_getInfo.sql | 2 +- db/routines/vn/procedures/item_getLack.sql | 2 +- db/routines/vn/procedures/item_getMinETD.sql | 2 +- db/routines/vn/procedures/item_getMinacum.sql | 2 +- db/routines/vn/procedures/item_getSimilar.sql | 2 +- db/routines/vn/procedures/item_getStock.sql | 2 +- db/routines/vn/procedures/item_multipleBuy.sql | 2 +- db/routines/vn/procedures/item_multipleBuyByDate.sql | 2 +- db/routines/vn/procedures/item_refreshFromTags.sql | 2 +- db/routines/vn/procedures/item_refreshTags.sql | 2 +- db/routines/vn/procedures/item_saveReference.sql | 2 +- db/routines/vn/procedures/item_setGeneric.sql | 2 +- db/routines/vn/procedures/item_setVisibleDiscard.sql | 2 +- db/routines/vn/procedures/item_updatePackingType.sql | 2 +- db/routines/vn/procedures/item_valuateInventory.sql | 2 +- db/routines/vn/procedures/item_zoneClosure.sql | 2 +- db/routines/vn/procedures/ledger_doCompensation.sql | 2 +- db/routines/vn/procedures/ledger_next.sql | 2 +- db/routines/vn/procedures/ledger_nextTx.sql | 2 +- db/routines/vn/procedures/logShow.sql | 2 +- db/routines/vn/procedures/lungSize_generator.sql | 2 +- db/routines/vn/procedures/machineWorker_add.sql | 2 +- db/routines/vn/procedures/machineWorker_getHistorical.sql | 2 +- db/routines/vn/procedures/machineWorker_update.sql | 2 +- db/routines/vn/procedures/machine_getWorkerPlate.sql | 2 +- db/routines/vn/procedures/mail_insert.sql | 2 +- db/routines/vn/procedures/makeNewItem.sql | 2 +- db/routines/vn/procedures/makePCSGraf.sql | 2 +- db/routines/vn/procedures/manaSpellersRequery.sql | 2 +- db/routines/vn/procedures/multipleInventory.sql | 2 +- db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql | 2 +- db/routines/vn/procedures/mysqlPreparedCount_check.sql | 2 +- db/routines/vn/procedures/nextShelvingCodeMake.sql | 2 +- db/routines/vn/procedures/observationAdd.sql | 2 +- db/routines/vn/procedures/orderCreate.sql | 2 +- db/routines/vn/procedures/orderDelete.sql | 2 +- db/routines/vn/procedures/orderListCreate.sql | 2 +- db/routines/vn/procedures/orderListVolume.sql | 2 +- db/routines/vn/procedures/packingListSwitch.sql | 2 +- db/routines/vn/procedures/packingSite_startCollection.sql | 2 +- db/routines/vn/procedures/parking_add.sql | 2 +- db/routines/vn/procedures/parking_algemesi.sql | 2 +- db/routines/vn/procedures/parking_new.sql | 2 +- db/routines/vn/procedures/parking_setOrder.sql | 2 +- db/routines/vn/procedures/payment_add.sql | 2 +- db/routines/vn/procedures/prepareClientList.sql | 2 +- db/routines/vn/procedures/prepareTicketList.sql | 2 +- db/routines/vn/procedures/previousSticker_get.sql | 2 +- db/routines/vn/procedures/printer_checkSector.sql | 2 +- db/routines/vn/procedures/productionControl.sql | 2 +- db/routines/vn/procedures/productionError_add.sql | 2 +- .../vn/procedures/productionError_addCheckerPackager.sql | 2 +- db/routines/vn/procedures/productionSectorList.sql | 2 +- db/routines/vn/procedures/raidUpdate.sql | 2 +- db/routines/vn/procedures/rangeDateInfo.sql | 2 +- db/routines/vn/procedures/rateView.sql | 2 +- db/routines/vn/procedures/rate_getPrices.sql | 2 +- db/routines/vn/procedures/recipe_Plaster.sql | 2 +- db/routines/vn/procedures/remittance_calc.sql | 2 +- db/routines/vn/procedures/reportLabelCollection_get.sql | 2 +- db/routines/vn/procedures/report_print.sql | 2 +- db/routines/vn/procedures/routeGuessPriority.sql | 2 +- db/routines/vn/procedures/routeInfo.sql | 2 +- db/routines/vn/procedures/routeMonitor_calculate.sql | 2 +- db/routines/vn/procedures/routeSetOk.sql | 2 +- db/routines/vn/procedures/routeUpdateM3.sql | 2 +- db/routines/vn/procedures/route_calcCommission.sql | 2 +- db/routines/vn/procedures/route_doRecalc.sql | 2 +- db/routines/vn/procedures/route_getTickets.sql | 2 +- db/routines/vn/procedures/route_updateM3.sql | 2 +- db/routines/vn/procedures/saleBuy_Add.sql | 2 +- db/routines/vn/procedures/saleGroup_add.sql | 2 +- db/routines/vn/procedures/saleGroup_setParking.sql | 2 +- db/routines/vn/procedures/saleMistake_Add.sql | 2 +- db/routines/vn/procedures/salePreparingList.sql | 2 +- db/routines/vn/procedures/saleSplit.sql | 2 +- db/routines/vn/procedures/saleTracking_add.sql | 2 +- .../vn/procedures/saleTracking_addPreparedSaleGroup.sql | 2 +- db/routines/vn/procedures/saleTracking_addPrevOK.sql | 2 +- db/routines/vn/procedures/saleTracking_del.sql | 2 +- db/routines/vn/procedures/saleTracking_new.sql | 2 +- db/routines/vn/procedures/saleTracking_updateIsChecked.sql | 2 +- db/routines/vn/procedures/sale_PriceFix.sql | 2 +- db/routines/vn/procedures/sale_boxPickingPrint.sql | 2 +- db/routines/vn/procedures/sale_calculateComponent.sql | 2 +- db/routines/vn/procedures/sale_getBoxPickingList.sql | 2 +- db/routines/vn/procedures/sale_getFromTicketOrCollection.sql | 2 +- db/routines/vn/procedures/sale_getProblems.sql | 2 +- db/routines/vn/procedures/sale_getProblemsByTicket.sql | 2 +- db/routines/vn/procedures/sale_recalcComponent.sql | 2 +- db/routines/vn/procedures/sale_replaceItem.sql | 2 +- db/routines/vn/procedures/sale_setProblem.sql | 2 +- db/routines/vn/procedures/sale_setProblemComponentLack.sql | 2 +- .../vn/procedures/sale_setProblemComponentLackByComponent.sql | 2 +- db/routines/vn/procedures/sale_setProblemRounding.sql | 2 +- db/routines/vn/procedures/sales_merge.sql | 2 +- db/routines/vn/procedures/sales_mergeByCollection.sql | 2 +- db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql | 2 +- db/routines/vn/procedures/sectorCollection_get.sql | 2 +- db/routines/vn/procedures/sectorCollection_getMyPartial.sql | 2 +- db/routines/vn/procedures/sectorCollection_getSale.sql | 2 +- .../vn/procedures/sectorCollection_hasSalesReserved.sql | 2 +- db/routines/vn/procedures/sectorCollection_new.sql | 2 +- db/routines/vn/procedures/sectorProductivity_add.sql | 2 +- db/routines/vn/procedures/sector_getWarehouse.sql | 2 +- db/routines/vn/procedures/setParking.sql | 2 +- db/routines/vn/procedures/shelvingChange.sql | 2 +- db/routines/vn/procedures/shelvingLog_get.sql | 2 +- db/routines/vn/procedures/shelvingParking_get.sql | 2 +- db/routines/vn/procedures/shelvingPriority_update.sql | 2 +- db/routines/vn/procedures/shelving_clean.sql | 2 +- db/routines/vn/procedures/shelving_getSpam.sql | 2 +- db/routines/vn/procedures/shelving_setParking.sql | 2 +- db/routines/vn/procedures/sleep_X_min.sql | 2 +- db/routines/vn/procedures/stockBuyedByWorker.sql | 2 +- db/routines/vn/procedures/stockBuyed_add.sql | 2 +- db/routines/vn/procedures/stockTraslation.sql | 2 +- db/routines/vn/procedures/subordinateGetList.sql | 2 +- db/routines/vn/procedures/supplierExpenses.sql | 2 +- db/routines/vn/procedures/supplierPackaging_ReportSource.sql | 2 +- db/routines/vn/procedures/supplier_checkBalance.sql | 2 +- db/routines/vn/procedures/supplier_checkIsActive.sql | 2 +- .../vn/procedures/supplier_disablePayMethodChecked.sql | 2 +- db/routines/vn/procedures/supplier_statement.sql | 2 +- db/routines/vn/procedures/ticketBoxesView.sql | 2 +- db/routines/vn/procedures/ticketBuiltTime.sql | 2 +- db/routines/vn/procedures/ticketCalculateClon.sql | 2 +- db/routines/vn/procedures/ticketCalculateFromType.sql | 2 +- db/routines/vn/procedures/ticketCalculatePurge.sql | 2 +- db/routines/vn/procedures/ticketClon.sql | 2 +- db/routines/vn/procedures/ticketClon_OneYear.sql | 2 +- db/routines/vn/procedures/ticketCollection_get.sql | 2 +- db/routines/vn/procedures/ticketCollection_setUsedShelves.sql | 2 +- db/routines/vn/procedures/ticketComponentUpdate.sql | 2 +- db/routines/vn/procedures/ticketComponentUpdateSale.sql | 2 +- db/routines/vn/procedures/ticketDown_PrintableSelection.sql | 2 +- db/routines/vn/procedures/ticketGetTaxAdd.sql | 2 +- db/routines/vn/procedures/ticketGetTax_new.sql | 2 +- db/routines/vn/procedures/ticketGetTotal.sql | 2 +- db/routines/vn/procedures/ticketGetVisibleAvailable.sql | 2 +- db/routines/vn/procedures/ticketNotInvoicedByClient.sql | 2 +- db/routines/vn/procedures/ticketObservation_addNewBorn.sql | 2 +- db/routines/vn/procedures/ticketPackaging_add.sql | 2 +- db/routines/vn/procedures/ticketParking_findSkipped.sql | 2 +- db/routines/vn/procedures/ticketStateToday_setState.sql | 2 +- db/routines/vn/procedures/ticketToInvoiceByAddress.sql | 2 +- db/routines/vn/procedures/ticketToInvoiceByDate.sql | 2 +- db/routines/vn/procedures/ticketToInvoiceByRef.sql | 2 +- db/routines/vn/procedures/ticket_Clone.sql | 2 +- db/routines/vn/procedures/ticket_DelayTruck.sql | 2 +- db/routines/vn/procedures/ticket_DelayTruckSplit.sql | 2 +- db/routines/vn/procedures/ticket_WeightDeclaration.sql | 2 +- db/routines/vn/procedures/ticket_add.sql | 2 +- db/routines/vn/procedures/ticket_administrativeCopy.sql | 2 +- db/routines/vn/procedures/ticket_canAdvance.sql | 2 +- db/routines/vn/procedures/ticket_canMerge.sql | 2 +- db/routines/vn/procedures/ticket_canbePostponed.sql | 2 +- db/routines/vn/procedures/ticket_checkNoComponents.sql | 2 +- db/routines/vn/procedures/ticket_cloneAll.sql | 2 +- db/routines/vn/procedures/ticket_cloneWeekly.sql | 2 +- db/routines/vn/procedures/ticket_close.sql | 2 +- db/routines/vn/procedures/ticket_closeByTicket.sql | 2 +- db/routines/vn/procedures/ticket_componentMakeUpdate.sql | 2 +- db/routines/vn/procedures/ticket_componentPreview.sql | 2 +- db/routines/vn/procedures/ticket_doCmr.sql | 2 +- db/routines/vn/procedures/ticket_getFromFloramondo.sql | 2 +- db/routines/vn/procedures/ticket_getMovable.sql | 2 +- db/routines/vn/procedures/ticket_getProblems.sql | 2 +- db/routines/vn/procedures/ticket_getSplitList.sql | 2 +- db/routines/vn/procedures/ticket_getTax.sql | 2 +- db/routines/vn/procedures/ticket_getWarnings.sql | 2 +- db/routines/vn/procedures/ticket_getWithParameters.sql | 2 +- db/routines/vn/procedures/ticket_insertZone.sql | 2 +- db/routines/vn/procedures/ticket_priceDifference.sql | 2 +- db/routines/vn/procedures/ticket_printLabelPrevious.sql | 2 +- db/routines/vn/procedures/ticket_recalc.sql | 2 +- db/routines/vn/procedures/ticket_recalcByScope.sql | 2 +- db/routines/vn/procedures/ticket_recalcComponents.sql | 2 +- db/routines/vn/procedures/ticket_setNextState.sql | 2 +- db/routines/vn/procedures/ticket_setParking.sql | 2 +- db/routines/vn/procedures/ticket_setPreviousState.sql | 2 +- db/routines/vn/procedures/ticket_setProblem.sql | 2 +- db/routines/vn/procedures/ticket_setProblemFreeze.sql | 2 +- db/routines/vn/procedures/ticket_setProblemRequest.sql | 2 +- db/routines/vn/procedures/ticket_setProblemRisk.sql | 2 +- db/routines/vn/procedures/ticket_setProblemRounding.sql | 2 +- db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql | 2 +- db/routines/vn/procedures/ticket_setProblemTooLittle.sql | 2 +- .../vn/procedures/ticket_setProblemTooLittleItemCost.sql | 2 +- db/routines/vn/procedures/ticket_setRisk.sql | 2 +- db/routines/vn/procedures/ticket_setState.sql | 2 +- db/routines/vn/procedures/ticket_split.sql | 2 +- db/routines/vn/procedures/ticket_splitItemPackingType.sql | 2 +- db/routines/vn/procedures/ticket_splitPackingComplete.sql | 2 +- db/routines/vn/procedures/timeBusiness_calculate.sql | 2 +- db/routines/vn/procedures/timeBusiness_calculateAll.sql | 2 +- .../vn/procedures/timeBusiness_calculateByDepartment.sql | 2 +- db/routines/vn/procedures/timeBusiness_calculateByUser.sql | 2 +- db/routines/vn/procedures/timeBusiness_calculateByWorker.sql | 2 +- db/routines/vn/procedures/timeControl_calculate.sql | 2 +- db/routines/vn/procedures/timeControl_calculateAll.sql | 2 +- .../vn/procedures/timeControl_calculateByDepartment.sql | 2 +- db/routines/vn/procedures/timeControl_calculateByUser.sql | 2 +- db/routines/vn/procedures/timeControl_calculateByWorker.sql | 2 +- db/routines/vn/procedures/timeControl_getError.sql | 2 +- db/routines/vn/procedures/tpvTransaction_checkStatus.sql | 2 +- db/routines/vn/procedures/travelVolume.sql | 2 +- db/routines/vn/procedures/travelVolume_get.sql | 2 +- db/routines/vn/procedures/travel_checkDates.sql | 2 +- db/routines/vn/procedures/travel_checkPackaging.sql | 2 +- .../vn/procedures/travel_checkWarehouseIsFeedStock.sql | 2 +- db/routines/vn/procedures/travel_clone.sql | 2 +- db/routines/vn/procedures/travel_cloneWithEntries.sql | 2 +- db/routines/vn/procedures/travel_getDetailFromContinent.sql | 2 +- db/routines/vn/procedures/travel_getEntriesMissingPackage.sql | 2 +- db/routines/vn/procedures/travel_moveRaids.sql | 2 +- db/routines/vn/procedures/travel_recalc.sql | 2 +- db/routines/vn/procedures/travel_throwAwb.sql | 2 +- db/routines/vn/procedures/travel_upcomingArrivals.sql | 2 +- db/routines/vn/procedures/travel_updatePacking.sql | 2 +- db/routines/vn/procedures/travel_weeklyClone.sql | 2 +- db/routines/vn/procedures/typeTagMake.sql | 2 +- db/routines/vn/procedures/updatePedidosInternos.sql | 2 +- db/routines/vn/procedures/vehicle_checkNumberPlate.sql | 2 +- db/routines/vn/procedures/vehicle_notifyEvents.sql | 2 +- db/routines/vn/procedures/visible_getMisfit.sql | 2 +- db/routines/vn/procedures/warehouseFitting.sql | 2 +- db/routines/vn/procedures/warehouseFitting_byTravel.sql | 2 +- db/routines/vn/procedures/workerCalculateBoss.sql | 2 +- .../vn/procedures/workerCalendar_calculateBusiness.sql | 2 +- db/routines/vn/procedures/workerCalendar_calculateYear.sql | 2 +- db/routines/vn/procedures/workerCreateExternal.sql | 2 +- db/routines/vn/procedures/workerDepartmentByDate.sql | 2 +- db/routines/vn/procedures/workerDisable.sql | 2 +- db/routines/vn/procedures/workerDisableAll.sql | 2 +- db/routines/vn/procedures/workerForAllCalculateBoss.sql | 2 +- db/routines/vn/procedures/workerJourney_replace.sql | 2 +- db/routines/vn/procedures/workerMistakeType_get.sql | 2 +- db/routines/vn/procedures/workerMistake_add.sql | 2 +- db/routines/vn/procedures/workerTimeControlSOWP.sql | 2 +- .../vn/procedures/workerTimeControl_calculateOddDays.sql | 2 +- db/routines/vn/procedures/workerTimeControl_check.sql | 2 +- db/routines/vn/procedures/workerTimeControl_checkBreak.sql | 2 +- db/routines/vn/procedures/workerTimeControl_clockIn.sql | 2 +- db/routines/vn/procedures/workerTimeControl_direction.sql | 2 +- db/routines/vn/procedures/workerTimeControl_getClockIn.sql | 2 +- db/routines/vn/procedures/workerTimeControl_login.sql | 2 +- db/routines/vn/procedures/workerTimeControl_remove.sql | 2 +- .../vn/procedures/workerTimeControl_sendMailByDepartment.sql | 2 +- .../workerTimeControl_sendMailByDepartmentLauncher.sql | 2 +- .../vn/procedures/workerTimeControl_weekCheckBreak.sql | 2 +- db/routines/vn/procedures/workerWeekControl.sql | 2 +- db/routines/vn/procedures/worker_checkMultipleDevice.sql | 2 +- db/routines/vn/procedures/worker_getFromHasMistake.sql | 2 +- db/routines/vn/procedures/worker_getHierarchy.sql | 2 +- db/routines/vn/procedures/worker_getSector.sql | 2 +- db/routines/vn/procedures/worker_updateBalance.sql | 2 +- db/routines/vn/procedures/worker_updateBusiness.sql | 2 +- db/routines/vn/procedures/worker_updateChangedBusiness.sql | 2 +- db/routines/vn/procedures/workingHours.sql | 2 +- db/routines/vn/procedures/workingHoursTimeIn.sql | 2 +- db/routines/vn/procedures/workingHoursTimeOut.sql | 2 +- db/routines/vn/procedures/wrongEqualizatedClient.sql | 2 +- db/routines/vn/procedures/xdiario_new.sql | 2 +- db/routines/vn/procedures/zoneClosure_recalc.sql | 2 +- db/routines/vn/procedures/zoneGeo_calcTree.sql | 2 +- db/routines/vn/procedures/zoneGeo_calcTreeRec.sql | 2 +- db/routines/vn/procedures/zoneGeo_checkName.sql | 2 +- db/routines/vn/procedures/zoneGeo_delete.sql | 2 +- db/routines/vn/procedures/zoneGeo_doCalc.sql | 2 +- db/routines/vn/procedures/zoneGeo_setParent.sql | 2 +- db/routines/vn/procedures/zoneGeo_throwNotEditable.sql | 2 +- db/routines/vn/procedures/zone_excludeFromGeo.sql | 2 +- db/routines/vn/procedures/zone_getAddresses.sql | 2 +- db/routines/vn/procedures/zone_getAgency.sql | 2 +- db/routines/vn/procedures/zone_getAvailable.sql | 2 +- db/routines/vn/procedures/zone_getClosed.sql | 2 +- db/routines/vn/procedures/zone_getCollisions.sql | 2 +- db/routines/vn/procedures/zone_getEvents.sql | 2 +- db/routines/vn/procedures/zone_getFromGeo.sql | 2 +- db/routines/vn/procedures/zone_getLanded.sql | 2 +- db/routines/vn/procedures/zone_getLeaves.sql | 2 +- db/routines/vn/procedures/zone_getOptionsForLanding.sql | 2 +- db/routines/vn/procedures/zone_getOptionsForShipment.sql | 2 +- db/routines/vn/procedures/zone_getPostalCode.sql | 2 +- db/routines/vn/procedures/zone_getShipped.sql | 2 +- db/routines/vn/procedures/zone_getState.sql | 2 +- db/routines/vn/procedures/zone_getWarehouse.sql | 2 +- db/routines/vn/procedures/zone_upcomingDeliveries.sql | 2 +- db/routines/vn/triggers/XDiario_beforeInsert.sql | 2 +- db/routines/vn/triggers/XDiario_beforeUpdate.sql | 2 +- .../vn/triggers/accountReconciliation_beforeInsert.sql | 2 +- db/routines/vn/triggers/address_afterDelete.sql | 2 +- db/routines/vn/triggers/address_afterInsert.sql | 2 +- db/routines/vn/triggers/address_afterUpdate.sql | 2 +- db/routines/vn/triggers/address_beforeInsert.sql | 2 +- db/routines/vn/triggers/address_beforeUpdate.sql | 2 +- db/routines/vn/triggers/agency_afterInsert.sql | 2 +- db/routines/vn/triggers/agency_beforeInsert.sql | 2 +- db/routines/vn/triggers/autonomy_afterDelete.sql | 2 +- db/routines/vn/triggers/autonomy_beforeInsert.sql | 2 +- db/routines/vn/triggers/autonomy_beforeUpdate.sql | 2 +- db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql | 2 +- db/routines/vn/triggers/awb_beforeInsert.sql | 2 +- db/routines/vn/triggers/bankEntity_beforeInsert.sql | 2 +- db/routines/vn/triggers/bankEntity_beforeUpdate.sql | 2 +- db/routines/vn/triggers/budgetNotes_beforeInsert.sql | 2 +- db/routines/vn/triggers/business_afterDelete.sql | 2 +- db/routines/vn/triggers/business_afterInsert.sql | 2 +- db/routines/vn/triggers/business_afterUpdate.sql | 2 +- db/routines/vn/triggers/business_beforeInsert.sql | 2 +- db/routines/vn/triggers/business_beforeUpdate.sql | 2 +- db/routines/vn/triggers/buy_afterDelete.sql | 2 +- db/routines/vn/triggers/buy_afterInsert.sql | 2 +- db/routines/vn/triggers/buy_afterUpdate.sql | 2 +- db/routines/vn/triggers/buy_beforeDelete.sql | 2 +- db/routines/vn/triggers/buy_beforeInsert.sql | 2 +- db/routines/vn/triggers/buy_beforeUpdate.sql | 2 +- db/routines/vn/triggers/calendar_afterDelete.sql | 2 +- db/routines/vn/triggers/calendar_beforeInsert.sql | 2 +- db/routines/vn/triggers/calendar_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimBeginning_afterDelete.sql | 2 +- db/routines/vn/triggers/claimBeginning_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimBeginning_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimDevelopment_afterDelete.sql | 2 +- db/routines/vn/triggers/claimDevelopment_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimDms_afterDelete.sql | 2 +- db/routines/vn/triggers/claimDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimEnd_afterDelete.sql | 2 +- db/routines/vn/triggers/claimEnd_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimEnd_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimObservation_afterDelete.sql | 2 +- db/routines/vn/triggers/claimObservation_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claimRatio_afterInsert.sql | 2 +- db/routines/vn/triggers/claimRatio_afterUpdate.sql | 2 +- db/routines/vn/triggers/claimState_afterDelete.sql | 2 +- db/routines/vn/triggers/claimState_beforeInsert.sql | 2 +- db/routines/vn/triggers/claimState_beforeUpdate.sql | 2 +- db/routines/vn/triggers/claim_afterDelete.sql | 2 +- db/routines/vn/triggers/claim_beforeInsert.sql | 2 +- db/routines/vn/triggers/claim_beforeUpdate.sql | 2 +- db/routines/vn/triggers/clientContact_afterDelete.sql | 2 +- db/routines/vn/triggers/clientContact_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientCredit_afterInsert.sql | 2 +- db/routines/vn/triggers/clientDms_afterDelete.sql | 2 +- db/routines/vn/triggers/clientDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/clientObservation_afterDelete.sql | 2 +- db/routines/vn/triggers/clientObservation_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/clientSample_afterDelete.sql | 2 +- db/routines/vn/triggers/clientSample_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientSample_beforeUpdate.sql | 2 +- db/routines/vn/triggers/clientUnpaid_beforeInsert.sql | 2 +- db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql | 2 +- db/routines/vn/triggers/client_afterDelete.sql | 2 +- db/routines/vn/triggers/client_afterInsert.sql | 2 +- db/routines/vn/triggers/client_afterUpdate.sql | 2 +- db/routines/vn/triggers/client_beforeInsert.sql | 2 +- db/routines/vn/triggers/client_beforeUpdate.sql | 2 +- db/routines/vn/triggers/cmr_beforeDelete.sql | 2 +- db/routines/vn/triggers/collectionColors_beforeInsert.sql | 2 +- db/routines/vn/triggers/collectionColors_beforeUpdate.sql | 2 +- db/routines/vn/triggers/collectionVolumetry_afterDelete.sql | 2 +- db/routines/vn/triggers/collectionVolumetry_afterInsert.sql | 2 +- db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql | 2 +- db/routines/vn/triggers/collection_beforeUpdate.sql | 2 +- db/routines/vn/triggers/country_afterDelete.sql | 2 +- db/routines/vn/triggers/country_afterInsert.sql | 2 +- db/routines/vn/triggers/country_afterUpdate.sql | 2 +- db/routines/vn/triggers/country_beforeInsert.sql | 2 +- db/routines/vn/triggers/country_beforeUpdate.sql | 2 +- db/routines/vn/triggers/creditClassification_beforeUpdate.sql | 2 +- db/routines/vn/triggers/creditInsurance_afterInsert.sql | 2 +- db/routines/vn/triggers/creditInsurance_beforeInsert.sql | 2 +- db/routines/vn/triggers/delivery_beforeInsert.sql | 2 +- db/routines/vn/triggers/delivery_beforeUpdate.sql | 2 +- db/routines/vn/triggers/department_afterDelete.sql | 2 +- db/routines/vn/triggers/department_afterUpdate.sql | 2 +- db/routines/vn/triggers/department_beforeDelete.sql | 2 +- db/routines/vn/triggers/department_beforeInsert.sql | 2 +- .../vn/triggers/deviceProductionModels_beforeInsert.sql | 2 +- .../vn/triggers/deviceProductionModels_beforeUpdate.sql | 2 +- .../vn/triggers/deviceProductionState_beforeInsert.sql | 2 +- .../vn/triggers/deviceProductionState_beforeUpdate.sql | 2 +- db/routines/vn/triggers/deviceProductionUser_afterDelete.sql | 2 +- db/routines/vn/triggers/deviceProductionUser_afterInsert.sql | 2 +- db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql | 2 +- db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql | 2 +- db/routines/vn/triggers/deviceProduction_afterDelete.sql | 2 +- db/routines/vn/triggers/deviceProduction_beforeInsert.sql | 2 +- db/routines/vn/triggers/deviceProduction_beforeUpdate.sql | 2 +- db/routines/vn/triggers/dms_beforeDelete.sql | 2 +- db/routines/vn/triggers/dms_beforeInsert.sql | 2 +- db/routines/vn/triggers/dms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/duaTax_beforeInsert.sql | 2 +- db/routines/vn/triggers/duaTax_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ektEntryAssign_afterInsert.sql | 2 +- db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql | 2 +- db/routines/vn/triggers/entryDms_afterDelete.sql | 2 +- db/routines/vn/triggers/entryDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/entryDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/entryObservation_afterDelete.sql | 2 +- db/routines/vn/triggers/entryObservation_beforeInsert.sql | 2 +- db/routines/vn/triggers/entryObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/entry_afterDelete.sql | 2 +- db/routines/vn/triggers/entry_afterUpdate.sql | 2 +- db/routines/vn/triggers/entry_beforeDelete.sql | 2 +- db/routines/vn/triggers/entry_beforeInsert.sql | 2 +- db/routines/vn/triggers/entry_beforeUpdate.sql | 2 +- db/routines/vn/triggers/expeditionPallet_beforeInsert.sql | 2 +- db/routines/vn/triggers/expeditionScan_beforeInsert.sql | 2 +- db/routines/vn/triggers/expeditionState_afterInsert.sql | 2 +- db/routines/vn/triggers/expeditionState_beforeInsert.sql | 2 +- db/routines/vn/triggers/expedition_afterDelete.sql | 2 +- db/routines/vn/triggers/expedition_beforeDelete.sql | 2 +- db/routines/vn/triggers/expedition_beforeInsert.sql | 2 +- db/routines/vn/triggers/expedition_beforeUpdate.sql | 2 +- db/routines/vn/triggers/floramondoConfig_afterInsert.sql | 2 +- db/routines/vn/triggers/gregue_beforeInsert.sql | 2 +- db/routines/vn/triggers/greuge_afterDelete.sql | 2 +- db/routines/vn/triggers/greuge_beforeInsert.sql | 2 +- db/routines/vn/triggers/greuge_beforeUpdate.sql | 2 +- db/routines/vn/triggers/host_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql | 2 +- db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql | 2 +- db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceInTax_afterDelete.sql | 2 +- db/routines/vn/triggers/invoiceInTax_beforeInsert.sql | 2 +- db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceIn_afterDelete.sql | 2 +- db/routines/vn/triggers/invoiceIn_afterUpdate.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeDelete.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeInsert.sql | 2 +- db/routines/vn/triggers/invoiceIn_beforeUpdate.sql | 2 +- db/routines/vn/triggers/invoiceOut_afterInsert.sql | 2 +- db/routines/vn/triggers/invoiceOut_beforeDelete.sql | 2 +- db/routines/vn/triggers/invoiceOut_beforeInsert.sql | 2 +- db/routines/vn/triggers/invoiceOut_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemBarcode_afterDelete.sql | 2 +- db/routines/vn/triggers/itemBarcode_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemBarcode_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemBotanical_afterDelete.sql | 2 +- db/routines/vn/triggers/itemBotanical_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemBotanical_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemCategory_afterInsert.sql | 2 +- db/routines/vn/triggers/itemCost_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemCost_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql | 2 +- db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemShelving _afterDelete.sql | 2 +- db/routines/vn/triggers/itemShelvingSale_afterInsert.sql | 2 +- db/routines/vn/triggers/itemShelving_afterUpdate.sql | 2 +- db/routines/vn/triggers/itemShelving_beforeDelete.sql | 2 +- db/routines/vn/triggers/itemShelving_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemShelving_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemTag_afterDelete.sql | 2 +- db/routines/vn/triggers/itemTag_afterInsert.sql | 2 +- db/routines/vn/triggers/itemTag_afterUpdate.sql | 2 +- db/routines/vn/triggers/itemTag_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemTag_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemTaxCountry_afterDelete.sql | 2 +- db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql | 2 +- db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql | 2 +- db/routines/vn/triggers/itemType_beforeUpdate.sql | 2 +- db/routines/vn/triggers/item_afterDelete.sql | 2 +- db/routines/vn/triggers/item_afterInsert.sql | 2 +- db/routines/vn/triggers/item_afterUpdate.sql | 2 +- db/routines/vn/triggers/item_beforeInsert.sql | 2 +- db/routines/vn/triggers/item_beforeUpdate.sql | 2 +- db/routines/vn/triggers/machine_beforeInsert.sql | 2 +- db/routines/vn/triggers/mail_beforeInsert.sql | 2 +- db/routines/vn/triggers/mandate_beforeInsert.sql | 2 +- db/routines/vn/triggers/operator_beforeInsert.sql | 2 +- db/routines/vn/triggers/operator_beforeUpdate.sql | 2 +- db/routines/vn/triggers/packaging_beforeInsert.sql | 2 +- db/routines/vn/triggers/packaging_beforeUpdate.sql | 2 +- db/routines/vn/triggers/packingSite_afterDelete.sql | 2 +- db/routines/vn/triggers/packingSite_beforeInsert.sql | 2 +- db/routines/vn/triggers/packingSite_beforeUpdate.sql | 2 +- db/routines/vn/triggers/parking_afterDelete.sql | 2 +- db/routines/vn/triggers/parking_beforeInsert.sql | 2 +- db/routines/vn/triggers/parking_beforeUpdate.sql | 2 +- db/routines/vn/triggers/payment_afterInsert.sql | 2 +- db/routines/vn/triggers/payment_beforeInsert.sql | 2 +- db/routines/vn/triggers/payment_beforeUpdate.sql | 2 +- db/routines/vn/triggers/postCode_afterDelete.sql | 2 +- db/routines/vn/triggers/postCode_afterUpdate.sql | 2 +- db/routines/vn/triggers/postCode_beforeInsert.sql | 2 +- db/routines/vn/triggers/postCode_beforeUpdate.sql | 2 +- db/routines/vn/triggers/priceFixed_beforeInsert.sql | 2 +- db/routines/vn/triggers/priceFixed_beforeUpdate.sql | 2 +- db/routines/vn/triggers/productionConfig_afterDelete.sql | 2 +- db/routines/vn/triggers/productionConfig_beforeInsert.sql | 2 +- db/routines/vn/triggers/productionConfig_beforeUpdate.sql | 2 +- db/routines/vn/triggers/projectNotes_beforeInsert.sql | 2 +- db/routines/vn/triggers/province_afterDelete.sql | 2 +- db/routines/vn/triggers/province_afterUpdate.sql | 2 +- db/routines/vn/triggers/province_beforeInsert.sql | 2 +- db/routines/vn/triggers/province_beforeUpdate.sql | 2 +- db/routines/vn/triggers/rate_afterDelete.sql | 2 +- db/routines/vn/triggers/rate_beforeInsert.sql | 2 +- db/routines/vn/triggers/rate_beforeUpdate.sql | 2 +- db/routines/vn/triggers/receipt_afterInsert.sql | 2 +- db/routines/vn/triggers/receipt_afterUpdate.sql | 2 +- db/routines/vn/triggers/receipt_beforeDelete.sql | 2 +- db/routines/vn/triggers/receipt_beforeInsert.sql | 2 +- db/routines/vn/triggers/receipt_beforeUpdate.sql | 2 +- db/routines/vn/triggers/recovery_afterDelete.sql | 2 +- db/routines/vn/triggers/recovery_beforeInsert.sql | 2 +- db/routines/vn/triggers/recovery_beforeUpdate.sql | 2 +- db/routines/vn/triggers/roadmapStop_beforeInsert.sql | 2 +- db/routines/vn/triggers/roadmapStop_beforeUpdate.sql | 2 +- db/routines/vn/triggers/route_afterDelete.sql | 2 +- db/routines/vn/triggers/route_afterInsert.sql | 2 +- db/routines/vn/triggers/route_afterUpdate.sql | 2 +- db/routines/vn/triggers/route_beforeInsert.sql | 2 +- db/routines/vn/triggers/route_beforeUpdate.sql | 2 +- db/routines/vn/triggers/routesMonitor_afterDelete.sql | 2 +- db/routines/vn/triggers/routesMonitor_beforeInsert.sql | 2 +- db/routines/vn/triggers/routesMonitor_beforeUpdate.sql | 2 +- db/routines/vn/triggers/saleBuy_beforeInsert.sql | 2 +- db/routines/vn/triggers/saleGroup_afterDelete.sql | 2 +- db/routines/vn/triggers/saleGroup_beforeInsert.sql | 2 +- db/routines/vn/triggers/saleGroup_beforeUpdate.sql | 2 +- db/routines/vn/triggers/saleLabel_afterUpdate.sql | 2 +- db/routines/vn/triggers/saleTracking_afterInsert.sql | 2 +- db/routines/vn/triggers/sale_afterDelete.sql | 2 +- db/routines/vn/triggers/sale_afterInsert.sql | 2 +- db/routines/vn/triggers/sale_afterUpdate.sql | 2 +- db/routines/vn/triggers/sale_beforeDelete.sql | 2 +- db/routines/vn/triggers/sale_beforeInsert.sql | 2 +- db/routines/vn/triggers/sale_beforeUpdate.sql | 2 +- db/routines/vn/triggers/sharingCart_beforeDelete.sql | 2 +- db/routines/vn/triggers/sharingCart_beforeInsert.sql | 2 +- db/routines/vn/triggers/sharingCart_beforeUpdate.sql | 2 +- db/routines/vn/triggers/sharingClient_beforeInsert.sql | 2 +- db/routines/vn/triggers/sharingClient_beforeUpdate.sql | 2 +- db/routines/vn/triggers/shelving_afterDelete.sql | 2 +- db/routines/vn/triggers/shelving_beforeInsert.sql | 2 +- db/routines/vn/triggers/shelving_beforeUpdate.sql | 2 +- db/routines/vn/triggers/solunionCAP_afterInsert.sql | 2 +- db/routines/vn/triggers/solunionCAP_afterUpdate.sql | 2 +- db/routines/vn/triggers/solunionCAP_beforeDelete.sql | 2 +- db/routines/vn/triggers/specie_beforeInsert.sql | 2 +- db/routines/vn/triggers/specie_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplierAccount_afterDelete.sql | 2 +- db/routines/vn/triggers/supplierAccount_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplierAccount_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplierAddress_afterDelete.sql | 2 +- db/routines/vn/triggers/supplierAddress_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplierAddress_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplierContact_afterDelete.sql | 2 +- db/routines/vn/triggers/supplierContact_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplierContact_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplierDms_afterDelete.sql | 2 +- db/routines/vn/triggers/supplierDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplierDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/supplier_afterDelete.sql | 2 +- db/routines/vn/triggers/supplier_afterUpdate.sql | 2 +- db/routines/vn/triggers/supplier_beforeInsert.sql | 2 +- db/routines/vn/triggers/supplier_beforeUpdate.sql | 2 +- db/routines/vn/triggers/tag_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketCollection_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketDms_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeDelete.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketDms_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketObservation_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketObservation_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketObservation_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketPackaging_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketPackaging_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketParking_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketRefund_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketRefund_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketRefund_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketRequest_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketRequest_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketRequest_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketService_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketService_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketService_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketTracking_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketTracking_afterInsert.sql | 2 +- db/routines/vn/triggers/ticketTracking_afterUpdate.sql | 2 +- db/routines/vn/triggers/ticketTracking_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketTracking_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticketWeekly_afterDelete.sql | 2 +- db/routines/vn/triggers/ticketWeekly_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql | 2 +- db/routines/vn/triggers/ticket_afterDelete.sql | 2 +- db/routines/vn/triggers/ticket_afterInsert.sql | 2 +- db/routines/vn/triggers/ticket_afterUpdate.sql | 2 +- db/routines/vn/triggers/ticket_beforeDelete.sql | 2 +- db/routines/vn/triggers/ticket_beforeInsert.sql | 2 +- db/routines/vn/triggers/ticket_beforeUpdate.sql | 2 +- db/routines/vn/triggers/time_afterUpdate.sql | 2 +- db/routines/vn/triggers/town_afterDelete.sql | 2 +- db/routines/vn/triggers/town_afterUpdate.sql | 2 +- db/routines/vn/triggers/town_beforeInsert.sql | 2 +- db/routines/vn/triggers/town_beforeUpdate.sql | 2 +- db/routines/vn/triggers/travelThermograph_afterDelete.sql | 2 +- db/routines/vn/triggers/travelThermograph_beforeInsert.sql | 2 +- db/routines/vn/triggers/travelThermograph_beforeUpdate.sql | 2 +- db/routines/vn/triggers/travel_afterDelete.sql | 2 +- db/routines/vn/triggers/travel_afterUpdate.sql | 2 +- db/routines/vn/triggers/travel_beforeInsert.sql | 2 +- db/routines/vn/triggers/travel_beforeUpdate.sql | 2 +- db/routines/vn/triggers/vehicle_beforeInsert.sql | 2 +- db/routines/vn/triggers/vehicle_beforeUpdate.sql | 2 +- db/routines/vn/triggers/warehouse_afterInsert.sql | 2 +- db/routines/vn/triggers/workerDocument_afterDelete.sql | 2 +- db/routines/vn/triggers/workerDocument_beforeInsert.sql | 2 +- db/routines/vn/triggers/workerDocument_beforeUpdate.sql | 2 +- db/routines/vn/triggers/workerIncome_afterDelete.sql | 2 +- db/routines/vn/triggers/workerIncome_afterInsert.sql | 2 +- db/routines/vn/triggers/workerIncome_afterUpdate.sql | 2 +- db/routines/vn/triggers/workerTimeControl_afterDelete.sql | 2 +- db/routines/vn/triggers/workerTimeControl_afterInsert.sql | 2 +- db/routines/vn/triggers/workerTimeControl_beforeInsert.sql | 2 +- db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql | 2 +- db/routines/vn/triggers/worker_afterDelete.sql | 2 +- db/routines/vn/triggers/worker_beforeInsert.sql | 2 +- db/routines/vn/triggers/worker_beforeUpdate.sql | 2 +- db/routines/vn/triggers/workingHours_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneEvent_afterDelete.sql | 2 +- db/routines/vn/triggers/zoneEvent_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneEvent_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zoneExclusion_afterDelete.sql | 2 +- db/routines/vn/triggers/zoneExclusion_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zoneGeo_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneGeo_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zoneIncluded_afterDelete.sql | 2 +- db/routines/vn/triggers/zoneIncluded_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zoneWarehouse_afterDelete.sql | 2 +- db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql | 2 +- db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql | 2 +- db/routines/vn/triggers/zone_afterDelete.sql | 2 +- db/routines/vn/triggers/zone_beforeInsert.sql | 2 +- db/routines/vn/triggers/zone_beforeUpdate.sql | 2 +- db/routines/vn/views/NewView.sql | 2 +- db/routines/vn/views/agencyTerm.sql | 2 +- db/routines/vn/views/annualAverageInvoiced.sql | 2 +- db/routines/vn/views/awbVolume.sql | 2 +- db/routines/vn/views/businessCalendar.sql | 2 +- db/routines/vn/views/buyer.sql | 2 +- db/routines/vn/views/buyerSales.sql | 2 +- db/routines/vn/views/clientLost.sql | 2 +- db/routines/vn/views/clientPhoneBook.sql | 2 +- db/routines/vn/views/companyL10n.sql | 2 +- db/routines/vn/views/defaulter.sql | 2 +- db/routines/vn/views/departmentTree.sql | 2 +- db/routines/vn/views/ediGenus.sql | 2 +- db/routines/vn/views/ediSpecie.sql | 2 +- db/routines/vn/views/ektSubAddress.sql | 2 +- db/routines/vn/views/especialPrice.sql | 2 +- db/routines/vn/views/exchangeInsuranceEntry.sql | 2 +- db/routines/vn/views/exchangeInsuranceIn.sql | 2 +- db/routines/vn/views/exchangeInsuranceInPrevious.sql | 2 +- db/routines/vn/views/exchangeInsuranceOut.sql | 2 +- db/routines/vn/views/expeditionCommon.sql | 2 +- db/routines/vn/views/expeditionPallet_Print.sql | 2 +- db/routines/vn/views/expeditionRoute_Monitor.sql | 2 +- db/routines/vn/views/expeditionRoute_freeTickets.sql | 2 +- db/routines/vn/views/expeditionScan_Monitor.sql | 2 +- db/routines/vn/views/expeditionSticker.sql | 2 +- db/routines/vn/views/expeditionTicket_NoBoxes.sql | 2 +- db/routines/vn/views/expeditionTimeExpended.sql | 2 +- db/routines/vn/views/expeditionTruck.sql | 2 +- db/routines/vn/views/firstTicketShipped.sql | 2 +- db/routines/vn/views/floraHollandBuyedItems.sql | 2 +- db/routines/vn/views/inkL10n.sql | 2 +- db/routines/vn/views/invoiceCorrectionDataSource.sql | 2 +- db/routines/vn/views/itemBotanicalWithGenus.sql | 2 +- db/routines/vn/views/itemCategoryL10n.sql | 2 +- db/routines/vn/views/itemColor.sql | 2 +- db/routines/vn/views/itemEntryIn.sql | 2 +- db/routines/vn/views/itemEntryOut.sql | 2 +- db/routines/vn/views/itemInk.sql | 2 +- db/routines/vn/views/itemPlacementSupplyList.sql | 2 +- db/routines/vn/views/itemProductor.sql | 2 +- db/routines/vn/views/itemSearch.sql | 2 +- db/routines/vn/views/itemShelvingAvailable.sql | 2 +- db/routines/vn/views/itemShelvingList.sql | 2 +- db/routines/vn/views/itemShelvingPlacementSupplyStock.sql | 2 +- db/routines/vn/views/itemShelvingSaleSum.sql | 2 +- db/routines/vn/views/itemShelvingStock.sql | 2 +- db/routines/vn/views/itemShelvingStockFull.sql | 2 +- db/routines/vn/views/itemShelvingStockRemoved.sql | 2 +- db/routines/vn/views/itemTagged.sql | 2 +- db/routines/vn/views/itemTaxCountrySpain.sql | 2 +- db/routines/vn/views/itemTicketOut.sql | 2 +- db/routines/vn/views/itemTypeL10n.sql | 2 +- db/routines/vn/views/item_Free_Id.sql | 2 +- db/routines/vn/views/labelInfo.sql | 2 +- db/routines/vn/views/lastHourProduction.sql | 2 +- db/routines/vn/views/lastPurchases.sql | 2 +- db/routines/vn/views/lastTopClaims.sql | 2 +- db/routines/vn/views/mistake.sql | 2 +- db/routines/vn/views/mistakeRatio.sql | 2 +- db/routines/vn/views/newBornSales.sql | 2 +- db/routines/vn/views/operatorWorkerCode.sql | 2 +- db/routines/vn/views/originL10n.sql | 2 +- db/routines/vn/views/packageEquivalentItem.sql | 2 +- db/routines/vn/views/paymentExchangeInsurance.sql | 2 +- db/routines/vn/views/payrollCenter.sql | 2 +- db/routines/vn/views/personMedia.sql | 2 +- db/routines/vn/views/phoneBook.sql | 2 +- db/routines/vn/views/productionVolume.sql | 2 +- db/routines/vn/views/productionVolume_LastHour.sql | 2 +- db/routines/vn/views/role.sql | 2 +- db/routines/vn/views/routesControl.sql | 2 +- db/routines/vn/views/saleCost.sql | 2 +- db/routines/vn/views/saleMistakeList.sql | 2 +- db/routines/vn/views/saleMistake_list__2.sql | 2 +- db/routines/vn/views/saleSaleTracking.sql | 2 +- db/routines/vn/views/saleValue.sql | 2 +- db/routines/vn/views/saleVolume.sql | 2 +- db/routines/vn/views/saleVolume_Today_VNH.sql | 2 +- db/routines/vn/views/sale_freightComponent.sql | 2 +- db/routines/vn/views/salesPersonSince.sql | 2 +- db/routines/vn/views/salesPreparedLastHour.sql | 2 +- db/routines/vn/views/salesPreviousPreparated.sql | 2 +- db/routines/vn/views/supplierPackaging.sql | 2 +- db/routines/vn/views/tagL10n.sql | 2 +- db/routines/vn/views/ticketDownBuffer.sql | 2 +- db/routines/vn/views/ticketLastUpdated.sql | 2 +- db/routines/vn/views/ticketLastUpdatedList.sql | 2 +- db/routines/vn/views/ticketNotInvoiced.sql | 2 +- db/routines/vn/views/ticketPackingList.sql | 2 +- db/routines/vn/views/ticketPreviousPreparingList.sql | 2 +- db/routines/vn/views/ticketState.sql | 2 +- db/routines/vn/views/ticketStateToday.sql | 2 +- db/routines/vn/views/tr2.sql | 2 +- db/routines/vn/views/traceabilityBuy.sql | 2 +- db/routines/vn/views/traceabilitySale.sql | 2 +- db/routines/vn/views/workerBusinessDated.sql | 2 +- db/routines/vn/views/workerDepartment.sql | 2 +- db/routines/vn/views/workerLabour.sql | 2 +- db/routines/vn/views/workerMedia.sql | 2 +- db/routines/vn/views/workerSpeedExpedition.sql | 2 +- db/routines/vn/views/workerSpeedSaleTracking.sql | 2 +- db/routines/vn/views/workerTeamCollegues.sql | 2 +- db/routines/vn/views/workerTimeControlUserInfo.sql | 2 +- db/routines/vn/views/workerTimeJourneyNG.sql | 2 +- db/routines/vn/views/workerWithoutTractor.sql | 2 +- db/routines/vn/views/zoneEstimatedDelivery.sql | 2 +- db/routines/vn2008/views/Agencias.sql | 2 +- db/routines/vn2008/views/Articles.sql | 2 +- db/routines/vn2008/views/Bancos.sql | 2 +- db/routines/vn2008/views/Bancos_poliza.sql | 2 +- db/routines/vn2008/views/Cajas.sql | 2 +- db/routines/vn2008/views/Clientes.sql | 2 +- db/routines/vn2008/views/Comparativa.sql | 2 +- db/routines/vn2008/views/Compres.sql | 2 +- db/routines/vn2008/views/Compres_mark.sql | 2 +- db/routines/vn2008/views/Consignatarios.sql | 2 +- db/routines/vn2008/views/Cubos.sql | 2 +- db/routines/vn2008/views/Cubos_Retorno.sql | 2 +- db/routines/vn2008/views/Entradas.sql | 2 +- db/routines/vn2008/views/Entradas_Auto.sql | 2 +- db/routines/vn2008/views/Entradas_orden.sql | 2 +- db/routines/vn2008/views/Impresoras.sql | 2 +- db/routines/vn2008/views/Monedas.sql | 2 +- db/routines/vn2008/views/Movimientos.sql | 2 +- db/routines/vn2008/views/Movimientos_componentes.sql | 2 +- db/routines/vn2008/views/Movimientos_mark.sql | 2 +- db/routines/vn2008/views/Ordenes.sql | 2 +- db/routines/vn2008/views/Origen.sql | 2 +- db/routines/vn2008/views/Paises.sql | 2 +- db/routines/vn2008/views/PreciosEspeciales.sql | 2 +- db/routines/vn2008/views/Proveedores.sql | 2 +- db/routines/vn2008/views/Proveedores_cargueras.sql | 2 +- db/routines/vn2008/views/Proveedores_gestdoc.sql | 2 +- db/routines/vn2008/views/Recibos.sql | 2 +- db/routines/vn2008/views/Remesas.sql | 2 +- db/routines/vn2008/views/Rutas.sql | 2 +- db/routines/vn2008/views/Split.sql | 2 +- db/routines/vn2008/views/Split_lines.sql | 2 +- db/routines/vn2008/views/Tickets.sql | 2 +- db/routines/vn2008/views/Tickets_state.sql | 2 +- db/routines/vn2008/views/Tickets_turno.sql | 2 +- db/routines/vn2008/views/Tintas.sql | 2 +- db/routines/vn2008/views/Tipos.sql | 2 +- db/routines/vn2008/views/Trabajadores.sql | 2 +- db/routines/vn2008/views/Tramos.sql | 2 +- db/routines/vn2008/views/V_edi_item_track.sql | 2 +- db/routines/vn2008/views/Vehiculos_consumo.sql | 2 +- db/routines/vn2008/views/account_conciliacion.sql | 2 +- db/routines/vn2008/views/account_detail.sql | 2 +- db/routines/vn2008/views/account_detail_type.sql | 2 +- db/routines/vn2008/views/agency.sql | 2 +- db/routines/vn2008/views/airline.sql | 2 +- db/routines/vn2008/views/airport.sql | 2 +- db/routines/vn2008/views/albaran.sql | 2 +- db/routines/vn2008/views/albaran_gestdoc.sql | 2 +- db/routines/vn2008/views/albaran_state.sql | 2 +- db/routines/vn2008/views/awb.sql | 2 +- db/routines/vn2008/views/awb_component.sql | 2 +- db/routines/vn2008/views/awb_component_template.sql | 2 +- db/routines/vn2008/views/awb_component_type.sql | 2 +- db/routines/vn2008/views/awb_gestdoc.sql | 2 +- db/routines/vn2008/views/awb_recibida.sql | 2 +- db/routines/vn2008/views/awb_role.sql | 2 +- db/routines/vn2008/views/awb_unit.sql | 2 +- db/routines/vn2008/views/balance_nest_tree.sql | 2 +- db/routines/vn2008/views/barcodes.sql | 2 +- db/routines/vn2008/views/buySource.sql | 2 +- db/routines/vn2008/views/buy_edi.sql | 2 +- db/routines/vn2008/views/buy_edi_k012.sql | 2 +- db/routines/vn2008/views/buy_edi_k03.sql | 2 +- db/routines/vn2008/views/buy_edi_k04.sql | 2 +- db/routines/vn2008/views/cdr.sql | 2 +- db/routines/vn2008/views/chanel.sql | 2 +- db/routines/vn2008/views/cl_act.sql | 2 +- db/routines/vn2008/views/cl_cau.sql | 2 +- db/routines/vn2008/views/cl_con.sql | 2 +- db/routines/vn2008/views/cl_det.sql | 2 +- db/routines/vn2008/views/cl_main.sql | 2 +- db/routines/vn2008/views/cl_mot.sql | 2 +- db/routines/vn2008/views/cl_res.sql | 2 +- db/routines/vn2008/views/cl_sol.sql | 2 +- db/routines/vn2008/views/config_host.sql | 2 +- db/routines/vn2008/views/consignatarios_observation.sql | 2 +- db/routines/vn2008/views/credit.sql | 2 +- db/routines/vn2008/views/definitivo.sql | 2 +- db/routines/vn2008/views/edi_article.sql | 2 +- db/routines/vn2008/views/edi_bucket.sql | 2 +- db/routines/vn2008/views/edi_bucket_type.sql | 2 +- db/routines/vn2008/views/edi_specie.sql | 2 +- db/routines/vn2008/views/edi_supplier.sql | 2 +- db/routines/vn2008/views/empresa.sql | 2 +- db/routines/vn2008/views/empresa_grupo.sql | 2 +- db/routines/vn2008/views/entrySource.sql | 2 +- db/routines/vn2008/views/financialProductType.sql | 2 +- db/routines/vn2008/views/flight.sql | 2 +- db/routines/vn2008/views/gastos_resumen.sql | 2 +- db/routines/vn2008/views/integra2.sql | 2 +- db/routines/vn2008/views/integra2_province.sql | 2 +- db/routines/vn2008/views/mail.sql | 2 +- db/routines/vn2008/views/mandato.sql | 2 +- db/routines/vn2008/views/mandato_tipo.sql | 2 +- db/routines/vn2008/views/pago.sql | 2 +- db/routines/vn2008/views/pago_sdc.sql | 2 +- db/routines/vn2008/views/pay_dem.sql | 2 +- db/routines/vn2008/views/pay_dem_det.sql | 2 +- db/routines/vn2008/views/pay_met.sql | 2 +- db/routines/vn2008/views/payrollWorker.sql | 2 +- db/routines/vn2008/views/payroll_categorias.sql | 2 +- db/routines/vn2008/views/payroll_centros.sql | 2 +- db/routines/vn2008/views/payroll_conceptos.sql | 2 +- db/routines/vn2008/views/plantpassport.sql | 2 +- db/routines/vn2008/views/plantpassport_authority.sql | 2 +- db/routines/vn2008/views/price_fixed.sql | 2 +- db/routines/vn2008/views/producer.sql | 2 +- db/routines/vn2008/views/promissoryNote.sql | 2 +- db/routines/vn2008/views/proveedores_clientes.sql | 2 +- db/routines/vn2008/views/province.sql | 2 +- db/routines/vn2008/views/recibida.sql | 2 +- db/routines/vn2008/views/recibida_intrastat.sql | 2 +- db/routines/vn2008/views/recibida_iva.sql | 2 +- db/routines/vn2008/views/recibida_vencimiento.sql | 2 +- db/routines/vn2008/views/recovery.sql | 2 +- db/routines/vn2008/views/reference_rate.sql | 2 +- db/routines/vn2008/views/reinos.sql | 2 +- db/routines/vn2008/views/state.sql | 2 +- db/routines/vn2008/views/tag.sql | 2 +- db/routines/vn2008/views/tarifa_componentes.sql | 2 +- db/routines/vn2008/views/tarifa_componentes_series.sql | 2 +- db/routines/vn2008/views/tblContadores.sql | 2 +- db/routines/vn2008/views/thermograph.sql | 2 +- db/routines/vn2008/views/ticket_observation.sql | 2 +- db/routines/vn2008/views/tickets_gestdoc.sql | 2 +- db/routines/vn2008/views/time.sql | 2 +- db/routines/vn2008/views/travel.sql | 2 +- db/routines/vn2008/views/v_Articles_botanical.sql | 2 +- db/routines/vn2008/views/v_compres.sql | 2 +- db/routines/vn2008/views/v_empresa.sql | 2 +- db/routines/vn2008/views/versiones.sql | 2 +- db/routines/vn2008/views/warehouse_pickup.sql | 2 +- db/versions/11163-maroonEucalyptus/00-firstScript.sql | 4 ++-- 1686 files changed, 1687 insertions(+), 1687 deletions(-) diff --git a/db/routines/account/functions/myUser_checkLogin.sql b/db/routines/account/functions/myUser_checkLogin.sql index 4d5db887e..76cf6da04 100644 --- a/db/routines/account/functions/myUser_checkLogin.sql +++ b/db/routines/account/functions/myUser_checkLogin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_checkLogin`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_checkLogin`() RETURNS tinyint(1) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getId.sql b/db/routines/account/functions/myUser_getId.sql index c8264c253..864e798a9 100644 --- a/db/routines/account/functions/myUser_getId.sql +++ b/db/routines/account/functions/myUser_getId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_getId`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_getId`() RETURNS int(11) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getName.sql b/db/routines/account/functions/myUser_getName.sql index e4ea660eb..e91681329 100644 --- a/db/routines/account/functions/myUser_getName.sql +++ b/db/routines/account/functions/myUser_getName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_getName`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_getName`() RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/account/functions/myUser_hasPriv.sql b/db/routines/account/functions/myUser_hasPriv.sql index 05da92827..8105e9baa 100644 --- a/db/routines/account/functions/myUser_hasPriv.sql +++ b/db/routines/account/functions/myUser_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE') ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/myUser_hasRole.sql b/db/routines/account/functions/myUser_hasRole.sql index e245cf1ce..53fd143fd 100644 --- a/db/routines/account/functions/myUser_hasRole.sql +++ b/db/routines/account/functions/myUser_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoleId.sql b/db/routines/account/functions/myUser_hasRoleId.sql index ade2862a2..fd8b3fb19 100644 --- a/db/routines/account/functions/myUser_hasRoleId.sql +++ b/db/routines/account/functions/myUser_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoutinePriv.sql b/db/routines/account/functions/myUser_hasRoutinePriv.sql index 5d5a7fe22..517e36f5c 100644 --- a/db/routines/account/functions/myUser_hasRoutinePriv.sql +++ b/db/routines/account/functions/myUser_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100) ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/passwordGenerate.sql b/db/routines/account/functions/passwordGenerate.sql index 6d8427ad2..a4cff0ab9 100644 --- a/db/routines/account/functions/passwordGenerate.sql +++ b/db/routines/account/functions/passwordGenerate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`passwordGenerate`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`passwordGenerate`() RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/toUnixDays.sql b/db/routines/account/functions/toUnixDays.sql index ea23297d1..931c29cb0 100644 --- a/db/routines/account/functions/toUnixDays.sql +++ b/db/routines/account/functions/toUnixDays.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getMysqlRole.sql b/db/routines/account/functions/user_getMysqlRole.sql index f2038de9a..e50726480 100644 --- a/db/routines/account/functions/user_getMysqlRole.sql +++ b/db/routines/account/functions/user_getMysqlRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getNameFromId.sql b/db/routines/account/functions/user_getNameFromId.sql index 931ba8011..27ea434e8 100644 --- a/db/routines/account/functions/user_getNameFromId.sql +++ b/db/routines/account/functions/user_getNameFromId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasPriv.sql b/db/routines/account/functions/user_hasPriv.sql index 1ba06c25a..fc74b197a 100644 --- a/db/routines/account/functions/user_hasPriv.sql +++ b/db/routines/account/functions/user_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE'), vUserFk INT ) diff --git a/db/routines/account/functions/user_hasRole.sql b/db/routines/account/functions/user_hasRole.sql index b8512c8d9..71bd7bcae 100644 --- a/db/routines/account/functions/user_hasRole.sql +++ b/db/routines/account/functions/user_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoleId.sql b/db/routines/account/functions/user_hasRoleId.sql index f7a265892..1ba5fae75 100644 --- a/db/routines/account/functions/user_hasRoleId.sql +++ b/db/routines/account/functions/user_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoutinePriv.sql b/db/routines/account/functions/user_hasRoutinePriv.sql index 151ccb69c..b19ed6c2a 100644 --- a/db/routines/account/functions/user_hasRoutinePriv.sql +++ b/db/routines/account/functions/user_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100), vUserFk INT ) diff --git a/db/routines/account/procedures/account_enable.sql b/db/routines/account/procedures/account_enable.sql index d73c195d7..9441e46c8 100644 --- a/db/routines/account/procedures/account_enable.sql +++ b/db/routines/account/procedures/account_enable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) BEGIN /** * Enables an account and sets up email configuration. diff --git a/db/routines/account/procedures/myUser_login.sql b/db/routines/account/procedures/myUser_login.sql index 82614006b..013dc55d7 100644 --- a/db/routines/account/procedures/myUser_login.sql +++ b/db/routines/account/procedures/myUser_login.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithKey.sql b/db/routines/account/procedures/myUser_loginWithKey.sql index 69874cbc5..dab21e433 100644 --- a/db/routines/account/procedures/myUser_loginWithKey.sql +++ b/db/routines/account/procedures/myUser_loginWithKey.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithName.sql b/db/routines/account/procedures/myUser_loginWithName.sql index a012d8109..c71b7ae7b 100644 --- a/db/routines/account/procedures/myUser_loginWithName.sql +++ b/db/routines/account/procedures/myUser_loginWithName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_logout.sql b/db/routines/account/procedures/myUser_logout.sql index 5f39b448b..8740a1b25 100644 --- a/db/routines/account/procedures/myUser_logout.sql +++ b/db/routines/account/procedures/myUser_logout.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`myUser_logout`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_logout`() BEGIN /** * Logouts the user. diff --git a/db/routines/account/procedures/role_checkName.sql b/db/routines/account/procedures/role_checkName.sql index 64d783b0d..5f5a8b845 100644 --- a/db/routines/account/procedures/role_checkName.sql +++ b/db/routines/account/procedures/role_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) BEGIN /** * Checks that role name meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/role_getDescendents.sql b/db/routines/account/procedures/role_getDescendents.sql index a0f3acd5f..fcc9536fd 100644 --- a/db/routines/account/procedures/role_getDescendents.sql +++ b/db/routines/account/procedures/role_getDescendents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) BEGIN /** * Gets the identifiers of all the subroles implemented by a role (Including diff --git a/db/routines/account/procedures/role_sync.sql b/db/routines/account/procedures/role_sync.sql index c1ecfc04a..645f1f614 100644 --- a/db/routines/account/procedures/role_sync.sql +++ b/db/routines/account/procedures/role_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_sync`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_sync`() BEGIN /** * Synchronize the @roleRole table with the current role hierarchy. This diff --git a/db/routines/account/procedures/role_syncPrivileges.sql b/db/routines/account/procedures/role_syncPrivileges.sql index 0f5f5825e..cfdb81593 100644 --- a/db/routines/account/procedures/role_syncPrivileges.sql +++ b/db/routines/account/procedures/role_syncPrivileges.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() BEGIN /** * Synchronizes permissions of MySQL role users based on role hierarchy. diff --git a/db/routines/account/procedures/user_checkName.sql b/db/routines/account/procedures/user_checkName.sql index cbc358685..ca12a67a2 100644 --- a/db/routines/account/procedures/user_checkName.sql +++ b/db/routines/account/procedures/user_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) BEGIN /** * Checks that username meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/user_checkPassword.sql b/db/routines/account/procedures/user_checkPassword.sql index e60afd9a5..d696c51cd 100644 --- a/db/routines/account/procedures/user_checkPassword.sql +++ b/db/routines/account/procedures/user_checkPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) BEGIN /** * Comprueba si la contraseña cumple los requisitos de seguridad diff --git a/db/routines/account/triggers/account_afterDelete.sql b/db/routines/account/triggers/account_afterDelete.sql index 4f34f84e5..5249b358d 100644 --- a/db/routines/account/triggers/account_afterDelete.sql +++ b/db/routines/account/triggers/account_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_afterDelete` AFTER DELETE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_afterInsert.sql b/db/routines/account/triggers/account_afterInsert.sql index 4a98b4ec4..0fe35867e 100644 --- a/db/routines/account/triggers/account_afterInsert.sql +++ b/db/routines/account/triggers/account_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_afterInsert` AFTER INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeInsert.sql b/db/routines/account/triggers/account_beforeInsert.sql index c59fafcc9..b4e9f06f7 100644 --- a/db/routines/account/triggers/account_beforeInsert.sql +++ b/db/routines/account/triggers/account_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_beforeInsert` BEFORE INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeUpdate.sql b/db/routines/account/triggers/account_beforeUpdate.sql index cdaa8d225..05d3ec3ae 100644 --- a/db/routines/account/triggers/account_beforeUpdate.sql +++ b/db/routines/account/triggers/account_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`account_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_beforeUpdate` BEFORE UPDATE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql index 705f2b08d..32b5b620e 100644 --- a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql +++ b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` AFTER DELETE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql index eb5322e40..171c7bc7a 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` BEFORE INSERT ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql index eb6f1baea..4d05fc32a 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` BEFORE UPDATE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_afterDelete.sql b/db/routines/account/triggers/mailAlias_afterDelete.sql index 85c3b0bb2..ec01b1a4b 100644 --- a/db/routines/account/triggers/mailAlias_afterDelete.sql +++ b/db/routines/account/triggers/mailAlias_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` AFTER DELETE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeInsert.sql b/db/routines/account/triggers/mailAlias_beforeInsert.sql index c699df647..02f900f56 100644 --- a/db/routines/account/triggers/mailAlias_beforeInsert.sql +++ b/db/routines/account/triggers/mailAlias_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` BEFORE INSERT ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeUpdate.sql b/db/routines/account/triggers/mailAlias_beforeUpdate.sql index c5656bd2d..0f14dcf3f 100644 --- a/db/routines/account/triggers/mailAlias_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAlias_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` BEFORE UPDATE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_afterDelete.sql b/db/routines/account/triggers/mailForward_afterDelete.sql index a248f48eb..c1eef93de 100644 --- a/db/routines/account/triggers/mailForward_afterDelete.sql +++ b/db/routines/account/triggers/mailForward_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_afterDelete` AFTER DELETE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeInsert.sql b/db/routines/account/triggers/mailForward_beforeInsert.sql index 22ec784fd..bf5bd1369 100644 --- a/db/routines/account/triggers/mailForward_beforeInsert.sql +++ b/db/routines/account/triggers/mailForward_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` BEFORE INSERT ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeUpdate.sql b/db/routines/account/triggers/mailForward_beforeUpdate.sql index 4b349d030..590b20347 100644 --- a/db/routines/account/triggers/mailForward_beforeUpdate.sql +++ b/db/routines/account/triggers/mailForward_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` BEFORE UPDATE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_afterDelete.sql b/db/routines/account/triggers/roleInherit_afterDelete.sql index 3b4e26c5e..84e2cbc67 100644 --- a/db/routines/account/triggers/roleInherit_afterDelete.sql +++ b/db/routines/account/triggers/roleInherit_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` AFTER DELETE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeInsert.sql b/db/routines/account/triggers/roleInherit_beforeInsert.sql index f9dbbc115..a964abecb 100644 --- a/db/routines/account/triggers/roleInherit_beforeInsert.sql +++ b/db/routines/account/triggers/roleInherit_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` BEFORE INSERT ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeUpdate.sql b/db/routines/account/triggers/roleInherit_beforeUpdate.sql index 9f549740f..05b2ae8b5 100644 --- a/db/routines/account/triggers/roleInherit_beforeUpdate.sql +++ b/db/routines/account/triggers/roleInherit_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` BEFORE UPDATE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_afterDelete.sql b/db/routines/account/triggers/role_afterDelete.sql index d44e66ce1..731f1c978 100644 --- a/db/routines/account/triggers/role_afterDelete.sql +++ b/db/routines/account/triggers/role_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_afterDelete` AFTER DELETE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeInsert.sql b/db/routines/account/triggers/role_beforeInsert.sql index cbc01ab89..35e493bf7 100644 --- a/db/routines/account/triggers/role_beforeInsert.sql +++ b/db/routines/account/triggers/role_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_beforeInsert` BEFORE INSERT ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeUpdate.sql b/db/routines/account/triggers/role_beforeUpdate.sql index 366731b8f..588d2271d 100644 --- a/db/routines/account/triggers/role_beforeUpdate.sql +++ b/db/routines/account/triggers/role_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`role_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_beforeUpdate` BEFORE UPDATE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterDelete.sql b/db/routines/account/triggers/user_afterDelete.sql index a8e0b01bf..710549cc6 100644 --- a/db/routines/account/triggers/user_afterDelete.sql +++ b/db/routines/account/triggers/user_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterDelete` AFTER DELETE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterInsert.sql b/db/routines/account/triggers/user_afterInsert.sql index 2ff9805d9..2cc4da49b 100644 --- a/db/routines/account/triggers/user_afterInsert.sql +++ b/db/routines/account/triggers/user_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterInsert` AFTER INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterUpdate.sql b/db/routines/account/triggers/user_afterUpdate.sql index 1d6712c99..7e5415ee7 100644 --- a/db/routines/account/triggers/user_afterUpdate.sql +++ b/db/routines/account/triggers/user_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterUpdate` AFTER UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeInsert.sql b/db/routines/account/triggers/user_beforeInsert.sql index 85b4cbd1f..e15f8faa5 100644 --- a/db/routines/account/triggers/user_beforeInsert.sql +++ b/db/routines/account/triggers/user_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_beforeInsert` BEFORE INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeUpdate.sql b/db/routines/account/triggers/user_beforeUpdate.sql index 6405964ff..ae8d648e2 100644 --- a/db/routines/account/triggers/user_beforeUpdate.sql +++ b/db/routines/account/triggers/user_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `account`.`user_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_beforeUpdate` BEFORE UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/views/accountDovecot.sql b/db/routines/account/views/accountDovecot.sql index 61388d5b9..d3d03ca64 100644 --- a/db/routines/account/views/accountDovecot.sql +++ b/db/routines/account/views/accountDovecot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `account`.`accountDovecot` AS SELECT `u`.`name` AS `name`, diff --git a/db/routines/account/views/emailUser.sql b/db/routines/account/views/emailUser.sql index f48656131..d6a66719c 100644 --- a/db/routines/account/views/emailUser.sql +++ b/db/routines/account/views/emailUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `account`.`emailUser` AS SELECT `u`.`id` AS `userFk`, diff --git a/db/routines/account/views/myRole.sql b/db/routines/account/views/myRole.sql index 3273980a1..036300db5 100644 --- a/db/routines/account/views/myRole.sql +++ b/db/routines/account/views/myRole.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myRole` AS SELECT `r`.`inheritsFrom` AS `id` diff --git a/db/routines/account/views/myUser.sql b/db/routines/account/views/myUser.sql index 5d124a0fa..fc1b04d78 100644 --- a/db/routines/account/views/myUser.sql +++ b/db/routines/account/views/myUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myUser` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/bi/procedures/Greuge_Evolution_Add.sql b/db/routines/bi/procedures/Greuge_Evolution_Add.sql index 05f34a0bd..bf5693ad2 100644 --- a/db/routines/bi/procedures/Greuge_Evolution_Add.sql +++ b/db/routines/bi/procedures/Greuge_Evolution_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() BEGIN /* Inserta en la tabla Greuge_Evolution el saldo acumulado de cada cliente, diff --git a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql index ef163e4a3..bbee190ea 100644 --- a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql +++ b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() BEGIN DECLARE vPreviousPeriod INT; DECLARE vCurrentPeriod INT; diff --git a/db/routines/bi/procedures/analisis_ventas_simple.sql b/db/routines/bi/procedures/analisis_ventas_simple.sql index 54f874f14..597d9bcd4 100644 --- a/db/routines/bi/procedures/analisis_ventas_simple.sql +++ b/db/routines/bi/procedures/analisis_ventas_simple.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() BEGIN /** * Vacia y rellena la tabla 'analisis_grafico_simple' desde 'analisis_grafico_ventas' diff --git a/db/routines/bi/procedures/analisis_ventas_update.sql b/db/routines/bi/procedures/analisis_ventas_update.sql index 81afb7243..a7bb46387 100644 --- a/db/routines/bi/procedures/analisis_ventas_update.sql +++ b/db/routines/bi/procedures/analisis_ventas_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() BEGIN DECLARE vLastMonth DATE; diff --git a/db/routines/bi/procedures/clean.sql b/db/routines/bi/procedures/clean.sql index 9443fe6b8..4c3994dd5 100644 --- a/db/routines/bi/procedures/clean.sql +++ b/db/routines/bi/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`clean`() BEGIN DECLARE vDateShort DATETIME; DECLARE vDateLong DATETIME; diff --git a/db/routines/bi/procedures/defaultersFromDate.sql b/db/routines/bi/procedures/defaultersFromDate.sql index a2fcb5cc3..88828a6e1 100644 --- a/db/routines/bi/procedures/defaultersFromDate.sql +++ b/db/routines/bi/procedures/defaultersFromDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) BEGIN SELECT t1.*, c.name Cliente, w.code workerCode, c.payMethodFk pay_met_id, c.dueDay Vencimiento diff --git a/db/routines/bi/procedures/defaulting.sql b/db/routines/bi/procedures/defaulting.sql index ca5d50a53..db030fa0f 100644 --- a/db/routines/bi/procedures/defaulting.sql +++ b/db/routines/bi/procedures/defaulting.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) BEGIN DECLARE vDone BOOLEAN; DECLARE vClient INT; diff --git a/db/routines/bi/procedures/defaulting_launcher.sql b/db/routines/bi/procedures/defaulting_launcher.sql index 3565ca368..a0df72adf 100644 --- a/db/routines/bi/procedures/defaulting_launcher.sql +++ b/db/routines/bi/procedures/defaulting_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() BEGIN /** * Calcula la morosidad de los clientes. diff --git a/db/routines/bi/procedures/facturacion_media_anual_update.sql b/db/routines/bi/procedures/facturacion_media_anual_update.sql index 676bdc53c..62f5d623d 100644 --- a/db/routines/bi/procedures/facturacion_media_anual_update.sql +++ b/db/routines/bi/procedures/facturacion_media_anual_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() BEGIN TRUNCATE TABLE bs.clientAnnualConsumption; diff --git a/db/routines/bi/procedures/greuge_dif_porte_add.sql b/db/routines/bi/procedures/greuge_dif_porte_add.sql index d52e825d0..b86524f59 100644 --- a/db/routines/bi/procedures/greuge_dif_porte_add.sql +++ b/db/routines/bi/procedures/greuge_dif_porte_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() BEGIN /** diff --git a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql index a2b399e04..2568600ae 100644 --- a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql +++ b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() BEGIN CALL analisis_ventas_update; CALL analisis_ventas_simple; diff --git a/db/routines/bi/procedures/rutasAnalyze.sql b/db/routines/bi/procedures/rutasAnalyze.sql index 3f3c17e26..f76ac2dd9 100644 --- a/db/routines/bi/procedures/rutasAnalyze.sql +++ b/db/routines/bi/procedures/rutasAnalyze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( vDatedFrom DATE, vDatedTo DATE ) diff --git a/db/routines/bi/procedures/rutasAnalyze_launcher.sql b/db/routines/bi/procedures/rutasAnalyze_launcher.sql index e27b62bc4..9cc6f0eeb 100644 --- a/db/routines/bi/procedures/rutasAnalyze_launcher.sql +++ b/db/routines/bi/procedures/rutasAnalyze_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() BEGIN /** * Call rutasAnalyze diff --git a/db/routines/bi/views/analisis_grafico_ventas.sql b/db/routines/bi/views/analisis_grafico_ventas.sql index 1993e72e2..566f24c2e 100644 --- a/db/routines/bi/views/analisis_grafico_ventas.sql +++ b/db/routines/bi/views/analisis_grafico_ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_grafico_ventas` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/analisis_ventas_simple.sql b/db/routines/bi/views/analisis_ventas_simple.sql index 4834b39d0..8651f3d05 100644 --- a/db/routines/bi/views/analisis_ventas_simple.sql +++ b/db/routines/bi/views/analisis_ventas_simple.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_ventas_simple` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/claims_ratio.sql b/db/routines/bi/views/claims_ratio.sql index 4cd3c0c9d..39ceae56d 100644 --- a/db/routines/bi/views/claims_ratio.sql +++ b/db/routines/bi/views/claims_ratio.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`claims_ratio` AS SELECT `cr`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/customerRiskOverdue.sql b/db/routines/bi/views/customerRiskOverdue.sql index 0ca26e71f..8b8deb3ca 100644 --- a/db/routines/bi/views/customerRiskOverdue.sql +++ b/db/routines/bi/views/customerRiskOverdue.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`customerRiskOverdue` AS SELECT `cr`.`clientFk` AS `customer_id`, diff --git a/db/routines/bi/views/defaulters.sql b/db/routines/bi/views/defaulters.sql index 701f1e07a..e5922a746 100644 --- a/db/routines/bi/views/defaulters.sql +++ b/db/routines/bi/views/defaulters.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`defaulters` AS SELECT `d`.`clientFk` AS `client`, diff --git a/db/routines/bi/views/facturacion_media_anual.sql b/db/routines/bi/views/facturacion_media_anual.sql index d7521c550..8b1cde492 100644 --- a/db/routines/bi/views/facturacion_media_anual.sql +++ b/db/routines/bi/views/facturacion_media_anual.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`facturacion_media_anual` AS SELECT `cac`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/rotacion.sql b/db/routines/bi/views/rotacion.sql index 0fea399e8..71674fb65 100644 --- a/db/routines/bi/views/rotacion.sql +++ b/db/routines/bi/views/rotacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`rotacion` AS SELECT `ic`.`itemFk` AS `Id_Article`, diff --git a/db/routines/bi/views/tarifa_componentes.sql b/db/routines/bi/views/tarifa_componentes.sql index 32d8fd895..614e84eb9 100644 --- a/db/routines/bi/views/tarifa_componentes.sql +++ b/db/routines/bi/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes` AS SELECT `c`.`id` AS `Id_Componente`, diff --git a/db/routines/bi/views/tarifa_componentes_series.sql b/db/routines/bi/views/tarifa_componentes_series.sql index 0cb25bcf7..508a78fb3 100644 --- a/db/routines/bi/views/tarifa_componentes_series.sql +++ b/db/routines/bi/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes_series` AS SELECT `ct`.`id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/bs/events/clientDied_recalc.sql b/db/routines/bs/events/clientDied_recalc.sql index cc191f65c..9a9a5ebb3 100644 --- a/db/routines/bs/events/clientDied_recalc.sql +++ b/db/routines/bs/events/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`clientDied_recalc` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`clientDied_recalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/inventoryDiscrepancy_launch.sql b/db/routines/bs/events/inventoryDiscrepancy_launch.sql index 3b9497779..015425dfd 100644 --- a/db/routines/bs/events/inventoryDiscrepancy_launch.sql +++ b/db/routines/bs/events/inventoryDiscrepancy_launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` ON SCHEDULE EVERY 15 MINUTE STARTS '2023-07-18 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/nightTask_launchAll.sql b/db/routines/bs/events/nightTask_launchAll.sql index afe04b02e..f1f20f1cc 100644 --- a/db/routines/bs/events/nightTask_launchAll.sql +++ b/db/routines/bs/events/nightTask_launchAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `bs`.`nightTask_launchAll` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`nightTask_launchAll` ON SCHEDULE EVERY 1 DAY STARTS '2022-02-08 04:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/functions/tramo.sql b/db/routines/bs/functions/tramo.sql index 48697295c..a45860409 100644 --- a/db/routines/bs/functions/tramo.sql +++ b/db/routines/bs/functions/tramo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC NO SQL diff --git a/db/routines/bs/procedures/campaignComparative.sql b/db/routines/bs/procedures/campaignComparative.sql index 40af23d54..27957976a 100644 --- a/db/routines/bs/procedures/campaignComparative.sql +++ b/db/routines/bs/procedures/campaignComparative.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) BEGIN SELECT workerName, diff --git a/db/routines/bs/procedures/carteras_add.sql b/db/routines/bs/procedures/carteras_add.sql index ec8803664..8c806e1d9 100644 --- a/db/routines/bs/procedures/carteras_add.sql +++ b/db/routines/bs/procedures/carteras_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`carteras_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`carteras_add`() BEGIN /** * Inserta en la tabla @bs.carteras las ventas desde el año pasado diff --git a/db/routines/bs/procedures/clean.sql b/db/routines/bs/procedures/clean.sql index 4b4751545..a1d393122 100644 --- a/db/routines/bs/procedures/clean.sql +++ b/db/routines/bs/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clean`() BEGIN DECLARE vOneYearAgo DATE DEFAULT util.VN_CURDATE() - INTERVAL 1 YEAR; diff --git a/db/routines/bs/procedures/clientDied_recalc.sql b/db/routines/bs/procedures/clientDied_recalc.sql index f0082433c..d76c61968 100644 --- a/db/routines/bs/procedures/clientDied_recalc.sql +++ b/db/routines/bs/procedures/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( vDays INT, vCountryCode VARCHAR(2) ) diff --git a/db/routines/bs/procedures/clientNewBorn_recalc.sql b/db/routines/bs/procedures/clientNewBorn_recalc.sql index c84648c15..c3913a5f5 100644 --- a/db/routines/bs/procedures/clientNewBorn_recalc.sql +++ b/db/routines/bs/procedures/clientNewBorn_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() BLOCK1: BEGIN DECLARE vClientFk INT; diff --git a/db/routines/bs/procedures/compradores_evolution_add.sql b/db/routines/bs/procedures/compradores_evolution_add.sql index c0af35f8f..1049122a0 100644 --- a/db/routines/bs/procedures/compradores_evolution_add.sql +++ b/db/routines/bs/procedures/compradores_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() BEGIN /** * Inserta en la tabla compradores_evolution las ventas acumuladas en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fondo_evolution_add.sql b/db/routines/bs/procedures/fondo_evolution_add.sql index 1afe6897e..22f73ff8d 100644 --- a/db/routines/bs/procedures/fondo_evolution_add.sql +++ b/db/routines/bs/procedures/fondo_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() BEGIN /** * Inserta en la tabla fondo_maniobra los saldos acumulados en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fruitsEvolution.sql b/db/routines/bs/procedures/fruitsEvolution.sql index 09ef420ce..15ce35ebe 100644 --- a/db/routines/bs/procedures/fruitsEvolution.sql +++ b/db/routines/bs/procedures/fruitsEvolution.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() BEGIN select Id_Cliente, Cliente, count(semana) as semanas, (w.code IS NOT NULL) isWorker diff --git a/db/routines/bs/procedures/indicatorsUpdate.sql b/db/routines/bs/procedures/indicatorsUpdate.sql index 712441d65..958aae017 100644 --- a/db/routines/bs/procedures/indicatorsUpdate.sql +++ b/db/routines/bs/procedures/indicatorsUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) BEGIN DECLARE oneYearBefore DATE DEFAULT TIMESTAMPADD(YEAR,-1, vDated); diff --git a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql index 1dd24d5ab..b4f768522 100644 --- a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql +++ b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() BEGIN DECLARE vDated DATE; diff --git a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql index b1cb77696..62ab85368 100644 --- a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql +++ b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() BEGIN /** * Replace all records in table inventoryDiscrepancyDetail and insert new diff --git a/db/routines/bs/procedures/m3Add.sql b/db/routines/bs/procedures/m3Add.sql index ed57362b4..63159815b 100644 --- a/db/routines/bs/procedures/m3Add.sql +++ b/db/routines/bs/procedures/m3Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`m3Add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`m3Add`() BEGIN DECLARE datSTART DATE; diff --git a/db/routines/bs/procedures/manaCustomerUpdate.sql b/db/routines/bs/procedures/manaCustomerUpdate.sql index ba5f99f4c..f2bcc942e 100644 --- a/db/routines/bs/procedures/manaCustomerUpdate.sql +++ b/db/routines/bs/procedures/manaCustomerUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() BEGIN DECLARE vToDated DATE; DECLARE vFromDated DATE; diff --git a/db/routines/bs/procedures/manaSpellers_actualize.sql b/db/routines/bs/procedures/manaSpellers_actualize.sql index 045727d15..818ef40a6 100644 --- a/db/routines/bs/procedures/manaSpellers_actualize.sql +++ b/db/routines/bs/procedures/manaSpellers_actualize.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() BEGIN /** * Recalcula el valor del campo con el modificador de precio diff --git a/db/routines/bs/procedures/nightTask_launchAll.sql b/db/routines/bs/procedures/nightTask_launchAll.sql index 2e0daeb94..9c3788b50 100644 --- a/db/routines/bs/procedures/nightTask_launchAll.sql +++ b/db/routines/bs/procedures/nightTask_launchAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() BEGIN /** * Runs all nightly tasks. diff --git a/db/routines/bs/procedures/nightTask_launchTask.sql b/db/routines/bs/procedures/nightTask_launchTask.sql index dc2ef2a40..042df9d5d 100644 --- a/db/routines/bs/procedures/nightTask_launchTask.sql +++ b/db/routines/bs/procedures/nightTask_launchTask.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( vSchema VARCHAR(255), vProcedure VARCHAR(255), OUT vError VARCHAR(255), diff --git a/db/routines/bs/procedures/payMethodClientAdd.sql b/db/routines/bs/procedures/payMethodClientAdd.sql index 20c738456..6ed39538a 100644 --- a/db/routines/bs/procedures/payMethodClientAdd.sql +++ b/db/routines/bs/procedures/payMethodClientAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() BEGIN INSERT IGNORE INTO `bs`.`payMethodClient` (dated, payMethodFk, clientFk) SELECT util.VN_CURDATE(), c.payMethodFk, c.id diff --git a/db/routines/bs/procedures/saleGraphic.sql b/db/routines/bs/procedures/saleGraphic.sql index c647ef2fc..cdf04ed19 100644 --- a/db/routines/bs/procedures/saleGraphic.sql +++ b/db/routines/bs/procedures/saleGraphic.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, IN vToDate DATE, IN vProducerFk INT) BEGIN diff --git a/db/routines/bs/procedures/salePersonEvolutionAdd.sql b/db/routines/bs/procedures/salePersonEvolutionAdd.sql index baed201a3..8894e8546 100644 --- a/db/routines/bs/procedures/salePersonEvolutionAdd.sql +++ b/db/routines/bs/procedures/salePersonEvolutionAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) BEGIN DELETE FROM bs.salePersonEvolution WHERE dated <= DATE_SUB(util.VN_CURDATE(), INTERVAL 1 YEAR); diff --git a/db/routines/bs/procedures/sale_add.sql b/db/routines/bs/procedures/sale_add.sql index f82e2e1f4..37f4f41c4 100644 --- a/db/routines/bs/procedures/sale_add.sql +++ b/db/routines/bs/procedures/sale_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`sale_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`sale_add`( IN vStarted DATE, IN vEnded DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_add.sql b/db/routines/bs/procedures/salesByItemTypeDay_add.sql index 2cdc443c4..fe7d36dc8 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_add.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( vDateStart DATE, vDateEnd DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql index b2625a535..c2b3f4b48 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() BEGIN CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); END$$ diff --git a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql index b4b0b2343..4e0af84bf 100644 --- a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql +++ b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) BEGIN /** * Agrupa las ventas por cliente/comercial/fecha en la tabla bs.salesByclientSalesPerson diff --git a/db/routines/bs/procedures/salesPersonEvolution_add.sql b/db/routines/bs/procedures/salesPersonEvolution_add.sql index 578d91494..3474352c3 100644 --- a/db/routines/bs/procedures/salesPersonEvolution_add.sql +++ b/db/routines/bs/procedures/salesPersonEvolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() BEGIN /** * Calcula los datos para los gráficos de evolución agrupado por salesPersonFk y día. diff --git a/db/routines/bs/procedures/sales_addLauncher.sql b/db/routines/bs/procedures/sales_addLauncher.sql index 7b4fb2e87..403e76bd5 100644 --- a/db/routines/bs/procedures/sales_addLauncher.sql +++ b/db/routines/bs/procedures/sales_addLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() BEGIN /** * Añade las ventas a la tabla bs.sale que se realizaron desde hace un mes hasta hoy diff --git a/db/routines/bs/procedures/vendedores_add_launcher.sql b/db/routines/bs/procedures/vendedores_add_launcher.sql index 4513ee0a1..562b02c5c 100644 --- a/db/routines/bs/procedures/vendedores_add_launcher.sql +++ b/db/routines/bs/procedures/vendedores_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() BEGIN CALL bs.salesByclientSalesPerson_add(util.VN_CURDATE()- INTERVAL 45 DAY); diff --git a/db/routines/bs/procedures/ventas_contables_add.sql b/db/routines/bs/procedures/ventas_contables_add.sql index be7f9d87d..ef57d40d7 100644 --- a/db/routines/bs/procedures/ventas_contables_add.sql +++ b/db/routines/bs/procedures/ventas_contables_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) BEGIN /** diff --git a/db/routines/bs/procedures/ventas_contables_add_launcher.sql b/db/routines/bs/procedures/ventas_contables_add_launcher.sql index adda61240..e4b9c89a0 100644 --- a/db/routines/bs/procedures/ventas_contables_add_launcher.sql +++ b/db/routines/bs/procedures/ventas_contables_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() BEGIN /** diff --git a/db/routines/bs/procedures/waste_addSales.sql b/db/routines/bs/procedures/waste_addSales.sql index eaef9b832..ed0b64d77 100644 --- a/db/routines/bs/procedures/waste_addSales.sql +++ b/db/routines/bs/procedures/waste_addSales.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`waste_addSales`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`waste_addSales`() BEGIN DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY; DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; diff --git a/db/routines/bs/procedures/workerLabour_getData.sql b/db/routines/bs/procedures/workerLabour_getData.sql index 71208b32f..28e80365a 100644 --- a/db/routines/bs/procedures/workerLabour_getData.sql +++ b/db/routines/bs/procedures/workerLabour_getData.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() BEGIN /** * Carga los datos de la plantilla de trabajadores, altas y bajas en la tabla workerLabourDataByMonth para facilitar el cálculo del gráfico en grafana. diff --git a/db/routines/bs/procedures/workerProductivity_add.sql b/db/routines/bs/procedures/workerProductivity_add.sql index 9b3d9d2d9..00d8ba9e8 100644 --- a/db/routines/bs/procedures/workerProductivity_add.sql +++ b/db/routines/bs/procedures/workerProductivity_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() BEGIN DECLARE vDateFrom DATE; SELECT DATE_SUB(util.VN_CURDATE(),INTERVAL 30 DAY) INTO vDateFrom; diff --git a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql index 6abfbe0f0..33e5ad3bd 100644 --- a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql +++ b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` BEFORE UPDATE ON `clientNewBorn` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeInsert.sql b/db/routines/bs/triggers/nightTask_beforeInsert.sql index c9c11b84b..6d0313425 100644 --- a/db/routines/bs/triggers/nightTask_beforeInsert.sql +++ b/db/routines/bs/triggers/nightTask_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` BEFORE INSERT ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeUpdate.sql b/db/routines/bs/triggers/nightTask_beforeUpdate.sql index 3828f4c88..70186202c 100644 --- a/db/routines/bs/triggers/nightTask_beforeUpdate.sql +++ b/db/routines/bs/triggers/nightTask_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` BEFORE UPDATE ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/views/lastIndicators.sql b/db/routines/bs/views/lastIndicators.sql index 15329639e..15de2d97f 100644 --- a/db/routines/bs/views/lastIndicators.sql +++ b/db/routines/bs/views/lastIndicators.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`lastIndicators` AS SELECT `i`.`updated` AS `updated`, diff --git a/db/routines/bs/views/packingSpeed.sql b/db/routines/bs/views/packingSpeed.sql index 272c77303..10b70c940 100644 --- a/db/routines/bs/views/packingSpeed.sql +++ b/db/routines/bs/views/packingSpeed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`packingSpeed` AS SELECT HOUR(`e`.`created`) AS `hora`, diff --git a/db/routines/bs/views/ventas.sql b/db/routines/bs/views/ventas.sql index a320d4287..3ebaf67c5 100644 --- a/db/routines/bs/views/ventas.sql +++ b/db/routines/bs/views/ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`ventas` AS SELECT `s`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/cache/events/cacheCalc_clean.sql b/db/routines/cache/events/cacheCalc_clean.sql index 51be0f04f..e201dac3a 100644 --- a/db/routines/cache/events/cacheCalc_clean.sql +++ b/db/routines/cache/events/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `cache`.`cacheCalc_clean` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `cache`.`cacheCalc_clean` ON SCHEDULE EVERY 30 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/events/cache_clean.sql b/db/routines/cache/events/cache_clean.sql index 0ed956282..6b83f71a0 100644 --- a/db/routines/cache/events/cache_clean.sql +++ b/db/routines/cache/events/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `cache`.`cache_clean` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `cache`.`cache_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/procedures/addressFriendship_Update.sql b/db/routines/cache/procedures/addressFriendship_Update.sql index 92912f1a4..5e59d957a 100644 --- a/db/routines/cache/procedures/addressFriendship_Update.sql +++ b/db/routines/cache/procedures/addressFriendship_Update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() BEGIN REPLACE cache.addressFriendship diff --git a/db/routines/cache/procedures/availableNoRaids_refresh.sql b/db/routines/cache/procedures/availableNoRaids_refresh.sql index 6ba2dee8a..7a6294283 100644 --- a/db/routines/cache/procedures/availableNoRaids_refresh.sql +++ b/db/routines/cache/procedures/availableNoRaids_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vEndDate DATETIME; diff --git a/db/routines/cache/procedures/available_clean.sql b/db/routines/cache/procedures/available_clean.sql index 0f12f9126..5a6401dc2 100644 --- a/db/routines/cache/procedures/available_clean.sql +++ b/db/routines/cache/procedures/available_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`available_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`available_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/available_refresh.sql b/db/routines/cache/procedures/available_refresh.sql index d8665122d..11f02404e 100644 --- a/db/routines/cache/procedures/available_refresh.sql +++ b/db/routines/cache/procedures/available_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; diff --git a/db/routines/cache/procedures/cacheCalc_clean.sql b/db/routines/cache/procedures/cacheCalc_clean.sql index 5d0b43c67..ddaf64910 100644 --- a/db/routines/cache/procedures/cacheCalc_clean.sql +++ b/db/routines/cache/procedures/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() BEGIN DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW()); DELETE FROM cache_calc WHERE expires < vCleanTime; diff --git a/db/routines/cache/procedures/cache_calc_end.sql b/db/routines/cache/procedures/cache_calc_end.sql index c5ac91997..eb4ea3207 100644 --- a/db/routines/cache/procedures/cache_calc_end.sql +++ b/db/routines/cache/procedures/cache_calc_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) BEGIN DECLARE v_cache_name VARCHAR(255); DECLARE v_params VARCHAR(255); diff --git a/db/routines/cache/procedures/cache_calc_start.sql b/db/routines/cache/procedures/cache_calc_start.sql index 229fd6f66..74526b36b 100644 --- a/db/routines/cache/procedures/cache_calc_start.sql +++ b/db/routines/cache/procedures/cache_calc_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) proc: BEGIN DECLARE v_valid BOOL; DECLARE v_lock_id VARCHAR(100); diff --git a/db/routines/cache/procedures/cache_calc_unlock.sql b/db/routines/cache/procedures/cache_calc_unlock.sql index 9068f8053..35733b772 100644 --- a/db/routines/cache/procedures/cache_calc_unlock.sql +++ b/db/routines/cache/procedures/cache_calc_unlock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) proc: BEGIN DECLARE v_cache_name VARCHAR(50); DECLARE v_params VARCHAR(100); diff --git a/db/routines/cache/procedures/cache_clean.sql b/db/routines/cache/procedures/cache_clean.sql index f497da3eb..afeea9370 100644 --- a/db/routines/cache/procedures/cache_clean.sql +++ b/db/routines/cache/procedures/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`cache_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_clean`() NO SQL BEGIN CALL available_clean; diff --git a/db/routines/cache/procedures/clean.sql b/db/routines/cache/procedures/clean.sql index a306440d3..3aeafe79a 100644 --- a/db/routines/cache/procedures/clean.sql +++ b/db/routines/cache/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`clean`() BEGIN DELETE FROM cache.departure_limit WHERE Fecha < util.VN_CURDATE() - INTERVAL 1 MONTH; END$$ diff --git a/db/routines/cache/procedures/departure_timing.sql b/db/routines/cache/procedures/departure_timing.sql index 7ed33b042..d683a75d9 100644 --- a/db/routines/cache/procedures/departure_timing.sql +++ b/db/routines/cache/procedures/departure_timing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/cache/procedures/last_buy_refresh.sql b/db/routines/cache/procedures/last_buy_refresh.sql index 41f12b2f7..ee098ee13 100644 --- a/db/routines/cache/procedures/last_buy_refresh.sql +++ b/db/routines/cache/procedures/last_buy_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con la última compra y fecha de cada diff --git a/db/routines/cache/procedures/stock_refresh.sql b/db/routines/cache/procedures/stock_refresh.sql index 52a3e0a50..e68688586 100644 --- a/db/routines/cache/procedures/stock_refresh.sql +++ b/db/routines/cache/procedures/stock_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con el disponible hasta el dí­a de diff --git a/db/routines/cache/procedures/visible_clean.sql b/db/routines/cache/procedures/visible_clean.sql index 3db428c70..5bc0c0fc1 100644 --- a/db/routines/cache/procedures/visible_clean.sql +++ b/db/routines/cache/procedures/visible_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`visible_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`visible_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/visible_refresh.sql b/db/routines/cache/procedures/visible_refresh.sql index 908ae2da9..fa88de1e2 100644 --- a/db/routines/cache/procedures/visible_refresh.sql +++ b/db/routines/cache/procedures/visible_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) proc:BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/dipole/procedures/clean.sql b/db/routines/dipole/procedures/clean.sql index ec667bfb1..9054124b3 100644 --- a/db/routines/dipole/procedures/clean.sql +++ b/db/routines/dipole/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `dipole`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `dipole`.`clean`() BEGIN DECLARE vFromDated DATE; diff --git a/db/routines/dipole/procedures/expedition_add.sql b/db/routines/dipole/procedures/expedition_add.sql index 8337a426f..6d6fb2fd8 100644 --- a/db/routines/dipole/procedures/expedition_add.sql +++ b/db/routines/dipole/procedures/expedition_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) BEGIN /** Insert records to print agency stickers and to inform sorter with new box * diff --git a/db/routines/dipole/views/expeditionControl.sql b/db/routines/dipole/views/expeditionControl.sql index 63c18781d..9a2c0a731 100644 --- a/db/routines/dipole/views/expeditionControl.sql +++ b/db/routines/dipole/views/expeditionControl.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `dipole`.`expeditionControl` AS SELECT cast(`epo`.`created` AS date) AS `fecha`, diff --git a/db/routines/edi/events/floramondo.sql b/db/routines/edi/events/floramondo.sql index 6051b51cd..d2639ac35 100644 --- a/db/routines/edi/events/floramondo.sql +++ b/db/routines/edi/events/floramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `edi`.`floramondo` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `edi`.`floramondo` ON SCHEDULE EVERY 6 MINUTE STARTS '2022-01-28 09:52:45.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/edi/functions/imageName.sql b/db/routines/edi/functions/imageName.sql index 37b88c18f..a5cf33ff8 100644 --- a/db/routines/edi/functions/imageName.sql +++ b/db/routines/edi/functions/imageName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/edi/procedures/clean.sql b/db/routines/edi/procedures/clean.sql index 75f7565fc..ce35b3e1d 100644 --- a/db/routines/edi/procedures/clean.sql +++ b/db/routines/edi/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`clean`() BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/edi/procedures/deliveryInformation_Delete.sql b/db/routines/edi/procedures/deliveryInformation_Delete.sql index fa50e35c5..ac5b67e6f 100644 --- a/db/routines/edi/procedures/deliveryInformation_Delete.sql +++ b/db/routines/edi/procedures/deliveryInformation_Delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() BEGIN DECLARE vID INT; diff --git a/db/routines/edi/procedures/ekt_add.sql b/db/routines/edi/procedures/ekt_add.sql index 2b301e719..377c9b411 100644 --- a/db/routines/edi/procedures/ekt_add.sql +++ b/db/routines/edi/procedures/ekt_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_load.sql b/db/routines/edi/procedures/ekt_load.sql index c9b8d9245..76f530183 100644 --- a/db/routines/edi/procedures/ekt_load.sql +++ b/db/routines/edi/procedures/ekt_load.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) proc:BEGIN /** * Carga los datos esenciales para el sistema EKT. diff --git a/db/routines/edi/procedures/ekt_loadNotBuy.sql b/db/routines/edi/procedures/ekt_loadNotBuy.sql index 02b2a29b6..867c99ab7 100644 --- a/db/routines/edi/procedures/ekt_loadNotBuy.sql +++ b/db/routines/edi/procedures/ekt_loadNotBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() BEGIN /** * Ejecuta ekt_load para aquellos ekt de hoy que no tienen vn.buy diff --git a/db/routines/edi/procedures/ekt_refresh.sql b/db/routines/edi/procedures/ekt_refresh.sql index 0f8c4182b..2df736b0e 100644 --- a/db/routines/edi/procedures/ekt_refresh.sql +++ b/db/routines/edi/procedures/ekt_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_refresh`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_refresh`( `vSelf` INT, vMailFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_scan.sql b/db/routines/edi/procedures/ekt_scan.sql index 4c4c43ea2..c42e57ca4 100644 --- a/db/routines/edi/procedures/ekt_scan.sql +++ b/db/routines/edi/procedures/ekt_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca transaciones a partir de un codigo de barras, las marca como escaneadas diff --git a/db/routines/edi/procedures/floramondo_offerRefresh.sql b/db/routines/edi/procedures/floramondo_offerRefresh.sql index e58a00916..b091ab133 100644 --- a/db/routines/edi/procedures/floramondo_offerRefresh.sql +++ b/db/routines/edi/procedures/floramondo_offerRefresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() proc: BEGIN DECLARE vLanded DATETIME; DECLARE vDone INT DEFAULT FALSE; diff --git a/db/routines/edi/procedures/item_freeAdd.sql b/db/routines/edi/procedures/item_freeAdd.sql index e54b593f2..93842af6e 100644 --- a/db/routines/edi/procedures/item_freeAdd.sql +++ b/db/routines/edi/procedures/item_freeAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`item_freeAdd`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`item_freeAdd`() BEGIN /** * Rellena la tabla item_free con los id ausentes en vn.item diff --git a/db/routines/edi/procedures/item_getNewByEkt.sql b/db/routines/edi/procedures/item_getNewByEkt.sql index ab18dcb25..e169a0f00 100644 --- a/db/routines/edi/procedures/item_getNewByEkt.sql +++ b/db/routines/edi/procedures/item_getNewByEkt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/mail_new.sql b/db/routines/edi/procedures/mail_new.sql index 51f48d443..4ed3d0c37 100644 --- a/db/routines/edi/procedures/mail_new.sql +++ b/db/routines/edi/procedures/mail_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `edi`.`mail_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`mail_new`( vMessageId VARCHAR(100) ,vSender VARCHAR(150) ,OUT vSelf INT diff --git a/db/routines/edi/triggers/item_feature_beforeInsert.sql b/db/routines/edi/triggers/item_feature_beforeInsert.sql index b31eb89c5..f2aabb91f 100644 --- a/db/routines/edi/triggers/item_feature_beforeInsert.sql +++ b/db/routines/edi/triggers/item_feature_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` BEFORE INSERT ON `item_feature` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_afterUpdate.sql b/db/routines/edi/triggers/putOrder_afterUpdate.sql index d39eb97c6..00bb228c5 100644 --- a/db/routines/edi/triggers/putOrder_afterUpdate.sql +++ b/db/routines/edi/triggers/putOrder_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` AFTER UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeInsert.sql b/db/routines/edi/triggers/putOrder_beforeInsert.sql index c0c122fae..13274c33c 100644 --- a/db/routines/edi/triggers/putOrder_beforeInsert.sql +++ b/db/routines/edi/triggers/putOrder_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` BEFORE INSERT ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeUpdate.sql b/db/routines/edi/triggers/putOrder_beforeUpdate.sql index 6f769d0ba..c532f75d1 100644 --- a/db/routines/edi/triggers/putOrder_beforeUpdate.sql +++ b/db/routines/edi/triggers/putOrder_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` BEFORE UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql index bff8c98eb..83c4beb4a 100644 --- a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql +++ b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` AFTER UPDATE ON `supplyResponse` FOR EACH ROW BEGIN diff --git a/db/routines/edi/views/ektK2.sql b/db/routines/edi/views/ektK2.sql index 0556a1dc4..5c06221b1 100644 --- a/db/routines/edi/views/ektK2.sql +++ b/db/routines/edi/views/ektK2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektK2` AS SELECT `eek`.`id` AS `id`, diff --git a/db/routines/edi/views/ektRecent.sql b/db/routines/edi/views/ektRecent.sql index ce30b8ab0..83f839bd9 100644 --- a/db/routines/edi/views/ektRecent.sql +++ b/db/routines/edi/views/ektRecent.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektRecent` AS SELECT `e`.`id` AS `id`, diff --git a/db/routines/edi/views/errorList.sql b/db/routines/edi/views/errorList.sql index a4b206ac2..0273f8110 100644 --- a/db/routines/edi/views/errorList.sql +++ b/db/routines/edi/views/errorList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`errorList` AS SELECT `po`.`id` AS `id`, diff --git a/db/routines/edi/views/supplyOffer.sql b/db/routines/edi/views/supplyOffer.sql index 8cb9c3124..e4e84df74 100644 --- a/db/routines/edi/views/supplyOffer.sql +++ b/db/routines/edi/views/supplyOffer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`supplyOffer` AS SELECT `sr`.`vmpID` AS `vmpID`, diff --git a/db/routines/floranet/procedures/catalogue_findById.sql b/db/routines/floranet/procedures/catalogue_findById.sql index 53d6ebe6e..ab97d1ada 100644 --- a/db/routines/floranet/procedures/catalogue_findById.sql +++ b/db/routines/floranet/procedures/catalogue_findById.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/catalogue_get.sql b/db/routines/floranet/procedures/catalogue_get.sql index 5aaffc326..d4dd0c69f 100644 --- a/db/routines/floranet/procedures/catalogue_get.sql +++ b/db/routines/floranet/procedures/catalogue_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) READS SQL DATA proc:BEGIN /** diff --git a/db/routines/floranet/procedures/contact_request.sql b/db/routines/floranet/procedures/contact_request.sql index 92fbb9cbf..6d05edaf7 100644 --- a/db/routines/floranet/procedures/contact_request.sql +++ b/db/routines/floranet/procedures/contact_request.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.contact_request; DELIMITER $$ $$ -CREATE DEFINER=`vn-admin`@`localhost` +CREATE DEFINER=`vn`@`localhost` PROCEDURE floranet.contact_request( vName VARCHAR(100), vPhone VARCHAR(15), diff --git a/db/routines/floranet/procedures/deliveryDate_get.sql b/db/routines/floranet/procedures/deliveryDate_get.sql index f88f7f6e5..84620dfed 100644 --- a/db/routines/floranet/procedures/deliveryDate_get.sql +++ b/db/routines/floranet/procedures/deliveryDate_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/order_confirm.sql b/db/routines/floranet/procedures/order_confirm.sql index 2e95ffcd3..2e59ed737 100644 --- a/db/routines/floranet/procedures/order_confirm.sql +++ b/db/routines/floranet/procedures/order_confirm.sql @@ -1,7 +1,7 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) READS SQL DATA proc:BEGIN diff --git a/db/routines/floranet/procedures/order_put.sql b/db/routines/floranet/procedures/order_put.sql index 9a2fe02e1..7ab766a8d 100644 --- a/db/routines/floranet/procedures/order_put.sql +++ b/db/routines/floranet/procedures/order_put.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/sliders_get.sql b/db/routines/floranet/procedures/sliders_get.sql index 9708dd82d..096cfbde6 100644 --- a/db/routines/floranet/procedures/sliders_get.sql +++ b/db/routines/floranet/procedures/sliders_get.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.sliders_get; DELIMITER $$ $$ -CREATE DEFINER=`vn-admin`@`localhost` PROCEDURE floranet.sliders_get() +CREATE DEFINER=`vn`@`localhost` PROCEDURE floranet.sliders_get() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/functions/myClient_getDebt.sql b/db/routines/hedera/functions/myClient_getDebt.sql index 5eb057b11..7a3678c62 100644 --- a/db/routines/hedera/functions/myClient_getDebt.sql +++ b/db/routines/hedera/functions/myClient_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/myUser_checkRestPriv.sql b/db/routines/hedera/functions/myUser_checkRestPriv.sql index 032aa0f46..c074a2073 100644 --- a/db/routines/hedera/functions/myUser_checkRestPriv.sql +++ b/db/routines/hedera/functions/myUser_checkRestPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/order_getTotal.sql b/db/routines/hedera/functions/order_getTotal.sql index a6b9f1c68..2a6c90182 100644 --- a/db/routines/hedera/functions/order_getTotal.sql +++ b/db/routines/hedera/functions/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) RETURNS decimal(10,2) DETERMINISTIC READS SQL DATA diff --git a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql index cca806303..d25346f34 100644 --- a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql +++ b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/image_ref.sql b/db/routines/hedera/procedures/image_ref.sql index e60d16679..8fb344c1c 100644 --- a/db/routines/hedera/procedures/image_ref.sql +++ b/db/routines/hedera/procedures/image_ref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`image_ref`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`image_ref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/image_unref.sql b/db/routines/hedera/procedures/image_unref.sql index 3416b7989..95dda1043 100644 --- a/db/routines/hedera/procedures/image_unref.sql +++ b/db/routines/hedera/procedures/image_unref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`image_unref`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`image_unref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/item_calcCatalog.sql b/db/routines/hedera/procedures/item_calcCatalog.sql index 128a0cff5..0afe79d5a 100644 --- a/db/routines/hedera/procedures/item_calcCatalog.sql +++ b/db/routines/hedera/procedures/item_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( vSelf INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/hedera/procedures/item_getVisible.sql b/db/routines/hedera/procedures/item_getVisible.sql index 6a9205f55..3ac6da98a 100644 --- a/db/routines/hedera/procedures/item_getVisible.sql +++ b/db/routines/hedera/procedures/item_getVisible.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_getVisible`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_getVisible`( vWarehouse TINYINT, vDate DATE, vType INT, diff --git a/db/routines/hedera/procedures/item_listAllocation.sql b/db/routines/hedera/procedures/item_listAllocation.sql index 3b9d59498..c7fdf6aa7 100644 --- a/db/routines/hedera/procedures/item_listAllocation.sql +++ b/db/routines/hedera/procedures/item_listAllocation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) BEGIN /** * Lists visible items and it's box sizes of the specified diff --git a/db/routines/hedera/procedures/myOrder_addItem.sql b/db/routines/hedera/procedures/myOrder_addItem.sql index e852e1e20..90804017c 100644 --- a/db/routines/hedera/procedures/myOrder_addItem.sql +++ b/db/routines/hedera/procedures/myOrder_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql index 9fea0f500..dd6e1b476 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql index 92904fbe7..b593b6492 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/myOrder_checkConfig.sql b/db/routines/hedera/procedures/myOrder_checkConfig.sql index d7dfeeb21..ca33db032 100644 --- a/db/routines/hedera/procedures/myOrder_checkConfig.sql +++ b/db/routines/hedera/procedures/myOrder_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) proc: BEGIN /** * Comprueba que la cesta esta creada y que su configuración es diff --git a/db/routines/hedera/procedures/myOrder_checkMine.sql b/db/routines/hedera/procedures/myOrder_checkMine.sql index 95f856245..7ac370cb6 100644 --- a/db/routines/hedera/procedures/myOrder_checkMine.sql +++ b/db/routines/hedera/procedures/myOrder_checkMine.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) proc: BEGIN /** * Check that order is owned by current user, otherwise throws an error. diff --git a/db/routines/hedera/procedures/myOrder_configure.sql b/db/routines/hedera/procedures/myOrder_configure.sql index a524cbf18..c16406ee7 100644 --- a/db/routines/hedera/procedures/myOrder_configure.sql +++ b/db/routines/hedera/procedures/myOrder_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_configureForGuest.sql b/db/routines/hedera/procedures/myOrder_configureForGuest.sql index 5973b1c24..aa4d0fde7 100644 --- a/db/routines/hedera/procedures/myOrder_configureForGuest.sql +++ b/db/routines/hedera/procedures/myOrder_configureForGuest.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) BEGIN DECLARE vMethod VARCHAR(255); DECLARE vAgency INT; diff --git a/db/routines/hedera/procedures/myOrder_confirm.sql b/db/routines/hedera/procedures/myOrder_confirm.sql index f54740aed..4966bbf9f 100644 --- a/db/routines/hedera/procedures/myOrder_confirm.sql +++ b/db/routines/hedera/procedures/myOrder_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) BEGIN CALL myOrder_checkMine(vSelf); CALL order_checkConfig(vSelf); diff --git a/db/routines/hedera/procedures/myOrder_create.sql b/db/routines/hedera/procedures/myOrder_create.sql index 485673249..f945c5af5 100644 --- a/db/routines/hedera/procedures/myOrder_create.sql +++ b/db/routines/hedera/procedures/myOrder_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_create`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_create`( OUT vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_getAvailable.sql b/db/routines/hedera/procedures/myOrder_getAvailable.sql index 5ec0bab33..c94a339a6 100644 --- a/db/routines/hedera/procedures/myOrder_getAvailable.sql +++ b/db/routines/hedera/procedures/myOrder_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/myOrder_getTax.sql b/db/routines/hedera/procedures/myOrder_getTax.sql index 786cf1db9..68b2dd4c8 100644 --- a/db/routines/hedera/procedures/myOrder_getTax.sql +++ b/db/routines/hedera/procedures/myOrder_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/myOrder_newWithAddress.sql b/db/routines/hedera/procedures/myOrder_newWithAddress.sql index 3e9c0f89b..b4ec4aed4 100644 --- a/db/routines/hedera/procedures/myOrder_newWithAddress.sql +++ b/db/routines/hedera/procedures/myOrder_newWithAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( OUT vSelf INT, vLandingDate DATE, vAddressFk INT) diff --git a/db/routines/hedera/procedures/myOrder_newWithDate.sql b/db/routines/hedera/procedures/myOrder_newWithDate.sql index 17ca687e1..a9c4c8f7f 100644 --- a/db/routines/hedera/procedures/myOrder_newWithDate.sql +++ b/db/routines/hedera/procedures/myOrder_newWithDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( OUT vSelf INT, vLandingDate DATE) BEGIN diff --git a/db/routines/hedera/procedures/myTicket_get.sql b/db/routines/hedera/procedures/myTicket_get.sql index c1ec11f73..1c95aea36 100644 --- a/db/routines/hedera/procedures/myTicket_get.sql +++ b/db/routines/hedera/procedures/myTicket_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) BEGIN /** * Returns a current user ticket header. diff --git a/db/routines/hedera/procedures/myTicket_getPackages.sql b/db/routines/hedera/procedures/myTicket_getPackages.sql index 8aa165d9f..8a03a6e35 100644 --- a/db/routines/hedera/procedures/myTicket_getPackages.sql +++ b/db/routines/hedera/procedures/myTicket_getPackages.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) BEGIN /** * Returns a current user ticket packages. diff --git a/db/routines/hedera/procedures/myTicket_getRows.sql b/db/routines/hedera/procedures/myTicket_getRows.sql index c0c1ae18d..53547f2b2 100644 --- a/db/routines/hedera/procedures/myTicket_getRows.sql +++ b/db/routines/hedera/procedures/myTicket_getRows.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) BEGIN SELECT r.itemFk, r.quantity, r.concept, r.price, r.discount, i.category, i.size, i.stems, i.inkFk, diff --git a/db/routines/hedera/procedures/myTicket_getServices.sql b/db/routines/hedera/procedures/myTicket_getServices.sql index 7318d0973..3d982d25a 100644 --- a/db/routines/hedera/procedures/myTicket_getServices.sql +++ b/db/routines/hedera/procedures/myTicket_getServices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) BEGIN /** * Returns a current user ticket services. diff --git a/db/routines/hedera/procedures/myTicket_list.sql b/db/routines/hedera/procedures/myTicket_list.sql index d2e2a5686..cfbc064e3 100644 --- a/db/routines/hedera/procedures/myTicket_list.sql +++ b/db/routines/hedera/procedures/myTicket_list.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) BEGIN /** * Returns the current user list of tickets between two dates reange. diff --git a/db/routines/hedera/procedures/myTicket_logAccess.sql b/db/routines/hedera/procedures/myTicket_logAccess.sql index 866c33b52..aa0a1d380 100644 --- a/db/routines/hedera/procedures/myTicket_logAccess.sql +++ b/db/routines/hedera/procedures/myTicket_logAccess.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) BEGIN /** * Logs an access to a ticket. diff --git a/db/routines/hedera/procedures/myTpvTransaction_end.sql b/db/routines/hedera/procedures/myTpvTransaction_end.sql index 93c55c10a..197207833 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_end.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/myTpvTransaction_start.sql b/db/routines/hedera/procedures/myTpvTransaction_start.sql index f554b28c4..e3d5023b8 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_start.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( vAmount INT, vCompany INT) BEGIN diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index 46cf6848a..74bad2ffc 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_addItem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/order_calcCatalog.sql b/db/routines/hedera/procedures/order_calcCatalog.sql index 16cd03db8..efdb9d190 100644 --- a/db/routines/hedera/procedures/order_calcCatalog.sql +++ b/db/routines/hedera/procedures/order_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) BEGIN /** * Gets the availability and prices for order items. diff --git a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql index 55e2d1416..ae57ad5ba 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/order_calcCatalogFull.sql b/db/routines/hedera/procedures/order_calcCatalogFull.sql index 3d689e188..fedb73903 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/order_checkConfig.sql b/db/routines/hedera/procedures/order_checkConfig.sql index f570333bb..88799b2de 100644 --- a/db/routines/hedera/procedures/order_checkConfig.sql +++ b/db/routines/hedera/procedures/order_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) BEGIN /** * Comprueba que la configuración del pedido es correcta. diff --git a/db/routines/hedera/procedures/order_checkEditable.sql b/db/routines/hedera/procedures/order_checkEditable.sql index 6cf25986a..8ff7e5996 100644 --- a/db/routines/hedera/procedures/order_checkEditable.sql +++ b/db/routines/hedera/procedures/order_checkEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) BEGIN /** * Cheks if order is editable. diff --git a/db/routines/hedera/procedures/order_configure.sql b/db/routines/hedera/procedures/order_configure.sql index 3d4583716..42b403444 100644 --- a/db/routines/hedera/procedures/order_configure.sql +++ b/db/routines/hedera/procedures/order_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_configure`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/order_confirm.sql b/db/routines/hedera/procedures/order_confirm.sql index d4f67f0d6..bf70b4645 100644 --- a/db/routines/hedera/procedures/order_confirm.sql +++ b/db/routines/hedera/procedures/order_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) BEGIN /** * Confirms an order, creating each of its tickets on diff --git a/db/routines/hedera/procedures/order_confirmWithUser.sql b/db/routines/hedera/procedures/order_confirmWithUser.sql index 8a825531d..1b462d656 100644 --- a/db/routines/hedera/procedures/order_confirmWithUser.sql +++ b/db/routines/hedera/procedures/order_confirmWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`(vSelf INT, vUserId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`(vSelf INT, vUserId INT) BEGIN /** * Confirms an order, creating each of its tickets on the corresponding diff --git a/db/routines/hedera/procedures/order_getAvailable.sql b/db/routines/hedera/procedures/order_getAvailable.sql index e5e1c26a1..12a5297d6 100644 --- a/db/routines/hedera/procedures/order_getAvailable.sql +++ b/db/routines/hedera/procedures/order_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/order_getTax.sql b/db/routines/hedera/procedures/order_getTax.sql index 9331135c5..1c0950000 100644 --- a/db/routines/hedera/procedures/order_getTax.sql +++ b/db/routines/hedera/procedures/order_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getTax`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getTax`() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/order_getTotal.sql b/db/routines/hedera/procedures/order_getTotal.sql index 81d8d8f86..a8c872aec 100644 --- a/db/routines/hedera/procedures/order_getTotal.sql +++ b/db/routines/hedera/procedures/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_getTotal`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getTotal`() BEGIN /** * Calcula el total con IVA para un conjunto de orders. diff --git a/db/routines/hedera/procedures/order_recalc.sql b/db/routines/hedera/procedures/order_recalc.sql index 88cee3736..a76c34f2c 100644 --- a/db/routines/hedera/procedures/order_recalc.sql +++ b/db/routines/hedera/procedures/order_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) BEGIN /** * Recalculates the order total. diff --git a/db/routines/hedera/procedures/order_update.sql b/db/routines/hedera/procedures/order_update.sql index 6705cf9c1..0a7981072 100644 --- a/db/routines/hedera/procedures/order_update.sql +++ b/db/routines/hedera/procedures/order_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) proc: BEGIN /** * Actualiza las líneas de un pedido. diff --git a/db/routines/hedera/procedures/survey_vote.sql b/db/routines/hedera/procedures/survey_vote.sql index 3a9c2b9eb..b54ce2736 100644 --- a/db/routines/hedera/procedures/survey_vote.sql +++ b/db/routines/hedera/procedures/survey_vote.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) BEGIN DECLARE vSurvey INT; DECLARE vCount TINYINT; diff --git a/db/routines/hedera/procedures/tpvTransaction_confirm.sql b/db/routines/hedera/procedures/tpvTransaction_confirm.sql index 56ec892b0..e14340b6b 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirm.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( vAmount INT ,vOrder INT ,vMerchant INT diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql index 3cf04f695..d6cfafd6c 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) BEGIN /** * Confirma todas las transacciones confirmadas por el cliente pero no diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql index 52419c022..a6a476e5b 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) BEGIN /** * Confirma manualmente una transacción espedificando su identificador. diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql index 46865caa7..8082f9abc 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() BEGIN /** * Confirms multiple transactions comming from Redsys "canales" exported CSV. diff --git a/db/routines/hedera/procedures/tpvTransaction_end.sql b/db/routines/hedera/procedures/tpvTransaction_end.sql index 20c5fec53..1c03ffe74 100644 --- a/db/routines/hedera/procedures/tpvTransaction_end.sql +++ b/db/routines/hedera/procedures/tpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/tpvTransaction_start.sql b/db/routines/hedera/procedures/tpvTransaction_start.sql index 9bf119cbc..7ed63c124 100644 --- a/db/routines/hedera/procedures/tpvTransaction_start.sql +++ b/db/routines/hedera/procedures/tpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( vAmount INT, vCompany INT, vUser INT) diff --git a/db/routines/hedera/procedures/tpvTransaction_undo.sql b/db/routines/hedera/procedures/tpvTransaction_undo.sql index 828aa4ed5..8eabba3c1 100644 --- a/db/routines/hedera/procedures/tpvTransaction_undo.sql +++ b/db/routines/hedera/procedures/tpvTransaction_undo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) p: BEGIN DECLARE vCustomer INT; DECLARE vAmount DOUBLE; diff --git a/db/routines/hedera/procedures/visitUser_new.sql b/db/routines/hedera/procedures/visitUser_new.sql index 033b71db2..1a4e3a08c 100644 --- a/db/routines/hedera/procedures/visitUser_new.sql +++ b/db/routines/hedera/procedures/visitUser_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visitUser_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visitUser_new`( vAccess INT ,vSsid VARCHAR(64) ) diff --git a/db/routines/hedera/procedures/visit_listByBrowser.sql b/db/routines/hedera/procedures/visit_listByBrowser.sql index 9350f0bc0..dcf3fdad9 100644 --- a/db/routines/hedera/procedures/visit_listByBrowser.sql +++ b/db/routines/hedera/procedures/visit_listByBrowser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) BEGIN /** * Lists visits grouped by browser. diff --git a/db/routines/hedera/procedures/visit_register.sql b/db/routines/hedera/procedures/visit_register.sql index 32b3fbdc5..345527b25 100644 --- a/db/routines/hedera/procedures/visit_register.sql +++ b/db/routines/hedera/procedures/visit_register.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `hedera`.`visit_register`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visit_register`( vVisit INT ,vPlatform VARCHAR(30) ,vBrowser VARCHAR(30) diff --git a/db/routines/hedera/triggers/link_afterDelete.sql b/db/routines/hedera/triggers/link_afterDelete.sql index aa10f0bb9..e9efa7f91 100644 --- a/db/routines/hedera/triggers/link_afterDelete.sql +++ b/db/routines/hedera/triggers/link_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterDelete` AFTER DELETE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterInsert.sql b/db/routines/hedera/triggers/link_afterInsert.sql index 54230ecbd..af6989e44 100644 --- a/db/routines/hedera/triggers/link_afterInsert.sql +++ b/db/routines/hedera/triggers/link_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterInsert` AFTER INSERT ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterUpdate.sql b/db/routines/hedera/triggers/link_afterUpdate.sql index 34790cb91..c10f20b25 100644 --- a/db/routines/hedera/triggers/link_afterUpdate.sql +++ b/db/routines/hedera/triggers/link_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`link_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterUpdate` AFTER UPDATE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterDelete.sql b/db/routines/hedera/triggers/news_afterDelete.sql index 24a61d99f..73a85ba7b 100644 --- a/db/routines/hedera/triggers/news_afterDelete.sql +++ b/db/routines/hedera/triggers/news_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterDelete` AFTER DELETE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterInsert.sql b/db/routines/hedera/triggers/news_afterInsert.sql index 75303340c..7d5c4ded7 100644 --- a/db/routines/hedera/triggers/news_afterInsert.sql +++ b/db/routines/hedera/triggers/news_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterInsert` AFTER INSERT ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterUpdate.sql b/db/routines/hedera/triggers/news_afterUpdate.sql index db4c4aab9..e0a74f1ca 100644 --- a/db/routines/hedera/triggers/news_afterUpdate.sql +++ b/db/routines/hedera/triggers/news_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`news_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterUpdate` AFTER UPDATE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/orderRow_beforeInsert.sql b/db/routines/hedera/triggers/orderRow_beforeInsert.sql index 2fe73c3ef..b35123f4a 100644 --- a/db/routines/hedera/triggers/orderRow_beforeInsert.sql +++ b/db/routines/hedera/triggers/orderRow_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` BEFORE INSERT ON `orderRow` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterInsert.sql b/db/routines/hedera/triggers/order_afterInsert.sql index fb75c2231..7070ede02 100644 --- a/db/routines/hedera/triggers/order_afterInsert.sql +++ b/db/routines/hedera/triggers/order_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_afterInsert` AFTER INSERT ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterUpdate.sql b/db/routines/hedera/triggers/order_afterUpdate.sql index 59ea2bf84..3b1cd9df1 100644 --- a/db/routines/hedera/triggers/order_afterUpdate.sql +++ b/db/routines/hedera/triggers/order_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_afterUpdate` AFTER UPDATE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_beforeDelete.sql b/db/routines/hedera/triggers/order_beforeDelete.sql index 63b324bb0..da6259248 100644 --- a/db/routines/hedera/triggers/order_beforeDelete.sql +++ b/db/routines/hedera/triggers/order_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `hedera`.`order_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_beforeDelete` BEFORE DELETE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/views/mainAccountBank.sql b/db/routines/hedera/views/mainAccountBank.sql index 7adc3abfc..9fc3b3c3a 100644 --- a/db/routines/hedera/views/mainAccountBank.sql +++ b/db/routines/hedera/views/mainAccountBank.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`mainAccountBank` AS SELECT `e`.`name` AS `name`, diff --git a/db/routines/hedera/views/messageL10n.sql b/db/routines/hedera/views/messageL10n.sql index 65aea36e4..80f6638ad 100644 --- a/db/routines/hedera/views/messageL10n.sql +++ b/db/routines/hedera/views/messageL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`messageL10n` AS SELECT `m`.`code` AS `code`, diff --git a/db/routines/hedera/views/myAddress.sql b/db/routines/hedera/views/myAddress.sql index f843e2346..80809c5ea 100644 --- a/db/routines/hedera/views/myAddress.sql +++ b/db/routines/hedera/views/myAddress.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myAddress` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myBasketDefaults.sql b/db/routines/hedera/views/myBasketDefaults.sql index 0db6f83c4..43df18687 100644 --- a/db/routines/hedera/views/myBasketDefaults.sql +++ b/db/routines/hedera/views/myBasketDefaults.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myBasketDefaults` AS SELECT coalesce(`dm`.`code`, `cm`.`code`) AS `deliveryMethod`, diff --git a/db/routines/hedera/views/myClient.sql b/db/routines/hedera/views/myClient.sql index d7aa1e77c..032cc5f5f 100644 --- a/db/routines/hedera/views/myClient.sql +++ b/db/routines/hedera/views/myClient.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myClient` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/hedera/views/myInvoice.sql b/db/routines/hedera/views/myInvoice.sql index bad224e8f..40527ac0c 100644 --- a/db/routines/hedera/views/myInvoice.sql +++ b/db/routines/hedera/views/myInvoice.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myInvoice` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/hedera/views/myMenu.sql b/db/routines/hedera/views/myMenu.sql index c61a7baa1..60f464e7a 100644 --- a/db/routines/hedera/views/myMenu.sql +++ b/db/routines/hedera/views/myMenu.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myMenu` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrder.sql b/db/routines/hedera/views/myOrder.sql index 22ddfaf16..ca9283298 100644 --- a/db/routines/hedera/views/myOrder.sql +++ b/db/routines/hedera/views/myOrder.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrder` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderRow.sql b/db/routines/hedera/views/myOrderRow.sql index ed10ea245..ddf91a24f 100644 --- a/db/routines/hedera/views/myOrderRow.sql +++ b/db/routines/hedera/views/myOrderRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderRow` AS SELECT `orw`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderTicket.sql b/db/routines/hedera/views/myOrderTicket.sql index 2174e7822..5fa541855 100644 --- a/db/routines/hedera/views/myOrderTicket.sql +++ b/db/routines/hedera/views/myOrderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderTicket` AS SELECT `o`.`id` AS `orderFk`, diff --git a/db/routines/hedera/views/myTicket.sql b/db/routines/hedera/views/myTicket.sql index 05ab55720..4edb742c8 100644 --- a/db/routines/hedera/views/myTicket.sql +++ b/db/routines/hedera/views/myTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicket` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketRow.sql b/db/routines/hedera/views/myTicketRow.sql index 19b070aae..69b11625f 100644 --- a/db/routines/hedera/views/myTicketRow.sql +++ b/db/routines/hedera/views/myTicketRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketRow` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketService.sql b/db/routines/hedera/views/myTicketService.sql index 80b55581b..7cb23a862 100644 --- a/db/routines/hedera/views/myTicketService.sql +++ b/db/routines/hedera/views/myTicketService.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketService` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketState.sql b/db/routines/hedera/views/myTicketState.sql index e09c1b656..8d3d276b8 100644 --- a/db/routines/hedera/views/myTicketState.sql +++ b/db/routines/hedera/views/myTicketState.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketState` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTpvTransaction.sql b/db/routines/hedera/views/myTpvTransaction.sql index afd157b1d..a860ed29d 100644 --- a/db/routines/hedera/views/myTpvTransaction.sql +++ b/db/routines/hedera/views/myTpvTransaction.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTpvTransaction` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/orderTicket.sql b/db/routines/hedera/views/orderTicket.sql index ef866356b..b0c55bc7d 100644 --- a/db/routines/hedera/views/orderTicket.sql +++ b/db/routines/hedera/views/orderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`orderTicket` AS SELECT `b`.`orderFk` AS `orderFk`, diff --git a/db/routines/hedera/views/order_component.sql b/db/routines/hedera/views/order_component.sql index 33800327d..e83114724 100644 --- a/db/routines/hedera/views/order_component.sql +++ b/db/routines/hedera/views/order_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_component` AS SELECT `t`.`rowFk` AS `order_row_id`, diff --git a/db/routines/hedera/views/order_row.sql b/db/routines/hedera/views/order_row.sql index 721faafe1..ab25774f6 100644 --- a/db/routines/hedera/views/order_row.sql +++ b/db/routines/hedera/views/order_row.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_row` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/pbx/functions/clientFromPhone.sql b/db/routines/pbx/functions/clientFromPhone.sql index fe7795043..b8186e0e0 100644 --- a/db/routines/pbx/functions/clientFromPhone.sql +++ b/db/routines/pbx/functions/clientFromPhone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/pbx/functions/phone_format.sql b/db/routines/pbx/functions/phone_format.sql index 1f3983ca2..b42dfe96b 100644 --- a/db/routines/pbx/functions/phone_format.sql +++ b/db/routines/pbx/functions/phone_format.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/pbx/procedures/phone_isValid.sql b/db/routines/pbx/procedures/phone_isValid.sql index ea633e2d6..be3d2968a 100644 --- a/db/routines/pbx/procedures/phone_isValid.sql +++ b/db/routines/pbx/procedures/phone_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) BEGIN /** * Check if an phone has the correct format and diff --git a/db/routines/pbx/procedures/queue_isValid.sql b/db/routines/pbx/procedures/queue_isValid.sql index da4b3cf34..a07bc342b 100644 --- a/db/routines/pbx/procedures/queue_isValid.sql +++ b/db/routines/pbx/procedures/queue_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) BEGIN /** * Check if an queue has the correct format and diff --git a/db/routines/pbx/procedures/sip_getExtension.sql b/db/routines/pbx/procedures/sip_getExtension.sql index 31cc361ad..640da5a3e 100644 --- a/db/routines/pbx/procedures/sip_getExtension.sql +++ b/db/routines/pbx/procedures/sip_getExtension.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) BEGIN /* diff --git a/db/routines/pbx/procedures/sip_isValid.sql b/db/routines/pbx/procedures/sip_isValid.sql index 263842c5e..d9c45831d 100644 --- a/db/routines/pbx/procedures/sip_isValid.sql +++ b/db/routines/pbx/procedures/sip_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) BEGIN /** * Check if an extension has the correct format and diff --git a/db/routines/pbx/procedures/sip_setPassword.sql b/db/routines/pbx/procedures/sip_setPassword.sql index a282ad2b7..146e7a502 100644 --- a/db/routines/pbx/procedures/sip_setPassword.sql +++ b/db/routines/pbx/procedures/sip_setPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( vUser VARCHAR(255), vPassword VARCHAR(255) ) diff --git a/db/routines/pbx/triggers/blacklist_beforeInsert.sql b/db/routines/pbx/triggers/blacklist_beforeInsert.sql index bb5a66f91..6bc7909d8 100644 --- a/db/routines/pbx/triggers/blacklist_beforeInsert.sql +++ b/db/routines/pbx/triggers/blacklist_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` BEFORE INSERT ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql index eab203ae4..741b34c0a 100644 --- a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql +++ b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` BEFORE UPDATE ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeInsert.sql b/db/routines/pbx/triggers/followme_beforeInsert.sql index ef8fa61de..38413f53a 100644 --- a/db/routines/pbx/triggers/followme_beforeInsert.sql +++ b/db/routines/pbx/triggers/followme_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` BEFORE INSERT ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeUpdate.sql b/db/routines/pbx/triggers/followme_beforeUpdate.sql index ade655f76..67c243c7f 100644 --- a/db/routines/pbx/triggers/followme_beforeUpdate.sql +++ b/db/routines/pbx/triggers/followme_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` BEFORE UPDATE ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql index 8c7748b5a..015a227ae 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` BEFORE INSERT ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql index 2ac8f7feb..892a10acd 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` BEFORE UPDATE ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeInsert.sql b/db/routines/pbx/triggers/queue_beforeInsert.sql index 53c921203..f601d8688 100644 --- a/db/routines/pbx/triggers/queue_beforeInsert.sql +++ b/db/routines/pbx/triggers/queue_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` BEFORE INSERT ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeUpdate.sql b/db/routines/pbx/triggers/queue_beforeUpdate.sql index cdfab8e8c..22e0afc67 100644 --- a/db/routines/pbx/triggers/queue_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queue_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` BEFORE UPDATE ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterInsert.sql b/db/routines/pbx/triggers/sip_afterInsert.sql index 80be18d48..ab1123106 100644 --- a/db/routines/pbx/triggers/sip_afterInsert.sql +++ b/db/routines/pbx/triggers/sip_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_afterInsert` AFTER INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterUpdate.sql b/db/routines/pbx/triggers/sip_afterUpdate.sql index 651c60c49..2556d574c 100644 --- a/db/routines/pbx/triggers/sip_afterUpdate.sql +++ b/db/routines/pbx/triggers/sip_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` AFTER UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeInsert.sql b/db/routines/pbx/triggers/sip_beforeInsert.sql index b886b8ed3..500f30077 100644 --- a/db/routines/pbx/triggers/sip_beforeInsert.sql +++ b/db/routines/pbx/triggers/sip_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` BEFORE INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeUpdate.sql b/db/routines/pbx/triggers/sip_beforeUpdate.sql index 6dadc25ea..95c943100 100644 --- a/db/routines/pbx/triggers/sip_beforeUpdate.sql +++ b/db/routines/pbx/triggers/sip_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` BEFORE UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/views/cdrConf.sql b/db/routines/pbx/views/cdrConf.sql index b70ad6b0d..e4b8ad60a 100644 --- a/db/routines/pbx/views/cdrConf.sql +++ b/db/routines/pbx/views/cdrConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`cdrConf` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/pbx/views/followmeConf.sql b/db/routines/pbx/views/followmeConf.sql index 29eb44509..7c92301d1 100644 --- a/db/routines/pbx/views/followmeConf.sql +++ b/db/routines/pbx/views/followmeConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/followmeNumberConf.sql b/db/routines/pbx/views/followmeNumberConf.sql index d391170f7..f80dd5a9d 100644 --- a/db/routines/pbx/views/followmeNumberConf.sql +++ b/db/routines/pbx/views/followmeNumberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeNumberConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/queueConf.sql b/db/routines/pbx/views/queueConf.sql index c072f4585..8416bdb52 100644 --- a/db/routines/pbx/views/queueConf.sql +++ b/db/routines/pbx/views/queueConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueConf` AS SELECT `q`.`name` AS `name`, diff --git a/db/routines/pbx/views/queueMemberConf.sql b/db/routines/pbx/views/queueMemberConf.sql index b56b4c2ef..734313c7b 100644 --- a/db/routines/pbx/views/queueMemberConf.sql +++ b/db/routines/pbx/views/queueMemberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueMemberConf` AS SELECT `m`.`id` AS `uniqueid`, diff --git a/db/routines/pbx/views/sipConf.sql b/db/routines/pbx/views/sipConf.sql index 5f090a025..302f967ec 100644 --- a/db/routines/pbx/views/sipConf.sql +++ b/db/routines/pbx/views/sipConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`sipConf` AS SELECT `s`.`user_id` AS `id`, diff --git a/db/routines/psico/procedures/answerSort.sql b/db/routines/psico/procedures/answerSort.sql index 26a4866f5..c7fd7e48d 100644 --- a/db/routines/psico/procedures/answerSort.sql +++ b/db/routines/psico/procedures/answerSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`answerSort`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`answerSort`() BEGIN UPDATE answer diff --git a/db/routines/psico/procedures/examNew.sql b/db/routines/psico/procedures/examNew.sql index a92ea52ee..5b8eada3a 100644 --- a/db/routines/psico/procedures/examNew.sql +++ b/db/routines/psico/procedures/examNew.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/psico/procedures/getExamQuestions.sql b/db/routines/psico/procedures/getExamQuestions.sql index 3af82b029..7545a3e79 100644 --- a/db/routines/psico/procedures/getExamQuestions.sql +++ b/db/routines/psico/procedures/getExamQuestions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) BEGIN SELECT p.text,p.examFk,p.questionFk,p.answerFk,p.id ,a.text AS answerText,a.correct, a.id AS answerFk diff --git a/db/routines/psico/procedures/getExamType.sql b/db/routines/psico/procedures/getExamType.sql index e22f4058b..25bda6682 100644 --- a/db/routines/psico/procedures/getExamType.sql +++ b/db/routines/psico/procedures/getExamType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`getExamType`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`getExamType`() BEGIN SELECT id,name diff --git a/db/routines/psico/procedures/questionSort.sql b/db/routines/psico/procedures/questionSort.sql index 8ce3fc4ea..6e47c1c46 100644 --- a/db/routines/psico/procedures/questionSort.sql +++ b/db/routines/psico/procedures/questionSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `psico`.`questionSort`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`questionSort`() BEGIN UPDATE question diff --git a/db/routines/psico/views/examView.sql b/db/routines/psico/views/examView.sql index 8d5241eee..c8bc1a8ef 100644 --- a/db/routines/psico/views/examView.sql +++ b/db/routines/psico/views/examView.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`examView` AS SELECT `q`.`text` AS `text`, diff --git a/db/routines/psico/views/results.sql b/db/routines/psico/views/results.sql index 161e9869c..ad61099f3 100644 --- a/db/routines/psico/views/results.sql +++ b/db/routines/psico/views/results.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`results` AS SELECT `eq`.`examFk` AS `examFk`, diff --git a/db/routines/sage/functions/company_getCode.sql b/db/routines/sage/functions/company_getCode.sql index f857af597..412552086 100644 --- a/db/routines/sage/functions/company_getCode.sql +++ b/db/routines/sage/functions/company_getCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) RETURNS int(2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/sage/procedures/accountingMovements_add.sql b/db/routines/sage/procedures/accountingMovements_add.sql index f1cfe044b..e0a9abf08 100644 --- a/db/routines/sage/procedures/accountingMovements_add.sql +++ b/db/routines/sage/procedures/accountingMovements_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( vYear INT, vCompanyFk INT ) diff --git a/db/routines/sage/procedures/clean.sql b/db/routines/sage/procedures/clean.sql index 19ba354bb..9e52d787a 100644 --- a/db/routines/sage/procedures/clean.sql +++ b/db/routines/sage/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`clean`() BEGIN /** * Maintains tables over time by removing unnecessary data diff --git a/db/routines/sage/procedures/clientSupplier_add.sql b/db/routines/sage/procedures/clientSupplier_add.sql index dbc761fad..177b0a7cb 100644 --- a/db/routines/sage/procedures/clientSupplier_add.sql +++ b/db/routines/sage/procedures/clientSupplier_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( vCompanyFk INT ) BEGIN diff --git a/db/routines/sage/procedures/importErrorNotification.sql b/db/routines/sage/procedures/importErrorNotification.sql index 1b9f9fd0d..1eae584e9 100644 --- a/db/routines/sage/procedures/importErrorNotification.sql +++ b/db/routines/sage/procedures/importErrorNotification.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`importErrorNotification`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`importErrorNotification`() BEGIN /** * Inserta notificaciones con los errores detectados durante la importación diff --git a/db/routines/sage/procedures/invoiceIn_add.sql b/db/routines/sage/procedures/invoiceIn_add.sql index f65620949..54a7bea6d 100644 --- a/db/routines/sage/procedures/invoiceIn_add.sql +++ b/db/routines/sage/procedures/invoiceIn_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceIn_manager.sql b/db/routines/sage/procedures/invoiceIn_manager.sql index 954193b7b..ba99ae9f2 100644 --- a/db/routines/sage/procedures/invoiceIn_manager.sql +++ b/db/routines/sage/procedures/invoiceIn_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceOut_add.sql b/db/routines/sage/procedures/invoiceOut_add.sql index c0a2adb9b..a71aa19a7 100644 --- a/db/routines/sage/procedures/invoiceOut_add.sql +++ b/db/routines/sage/procedures/invoiceOut_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/invoiceOut_manager.sql b/db/routines/sage/procedures/invoiceOut_manager.sql index 94074d014..cfacc330d 100644 --- a/db/routines/sage/procedures/invoiceOut_manager.sql +++ b/db/routines/sage/procedures/invoiceOut_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/pgc_add.sql b/db/routines/sage/procedures/pgc_add.sql index 7f83f0a51..67e3f59cd 100644 --- a/db/routines/sage/procedures/pgc_add.sql +++ b/db/routines/sage/procedures/pgc_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) BEGIN /** * Añade cuentas del plan general contable para exportarlos a Sage diff --git a/db/routines/sage/triggers/movConta_beforeUpdate.sql b/db/routines/sage/triggers/movConta_beforeUpdate.sql index 578f28d76..f152ebe7f 100644 --- a/db/routines/sage/triggers/movConta_beforeUpdate.sql +++ b/db/routines/sage/triggers/movConta_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` BEFORE UPDATE ON `movConta` FOR EACH ROW BEGIN diff --git a/db/routines/sage/views/clientLastTwoMonths.sql b/db/routines/sage/views/clientLastTwoMonths.sql index 0c90d54c0..24e85796b 100644 --- a/db/routines/sage/views/clientLastTwoMonths.sql +++ b/db/routines/sage/views/clientLastTwoMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`clientLastTwoMonths` AS SELECT `vn`.`invoiceOut`.`clientFk` AS `clientFk`, diff --git a/db/routines/sage/views/supplierLastThreeMonths.sql b/db/routines/sage/views/supplierLastThreeMonths.sql index e8acae5cf..8fff1d42c 100644 --- a/db/routines/sage/views/supplierLastThreeMonths.sql +++ b/db/routines/sage/views/supplierLastThreeMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`supplierLastThreeMonths` AS SELECT `vn`.`invoiceIn`.`supplierFk` AS `supplierFk`, diff --git a/db/routines/salix/events/accessToken_prune.sql b/db/routines/salix/events/accessToken_prune.sql index 7efd7f1ab..adcbb2301 100644 --- a/db/routines/salix/events/accessToken_prune.sql +++ b/db/routines/salix/events/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `salix`.`accessToken_prune` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `salix`.`accessToken_prune` ON SCHEDULE EVERY 1 DAY STARTS '2023-03-14 05:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/salix/procedures/accessToken_prune.sql b/db/routines/salix/procedures/accessToken_prune.sql index 3244c7328..06ccbe96a 100644 --- a/db/routines/salix/procedures/accessToken_prune.sql +++ b/db/routines/salix/procedures/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `salix`.`accessToken_prune`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `salix`.`accessToken_prune`() BEGIN /** * Borra de la tabla salix.AccessToken todos aquellos tokens que hayan caducado diff --git a/db/routines/salix/views/Account.sql b/db/routines/salix/views/Account.sql index 0be7c53ec..0b75ab620 100644 --- a/db/routines/salix/views/Account.sql +++ b/db/routines/salix/views/Account.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Account` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/salix/views/Role.sql b/db/routines/salix/views/Role.sql index 682258d04..8fcd7c6be 100644 --- a/db/routines/salix/views/Role.sql +++ b/db/routines/salix/views/Role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Role` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/salix/views/RoleMapping.sql b/db/routines/salix/views/RoleMapping.sql index 415d4e668..834ec0727 100644 --- a/db/routines/salix/views/RoleMapping.sql +++ b/db/routines/salix/views/RoleMapping.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`RoleMapping` AS SELECT `u`.`id` * 1000 + `r`.`inheritsFrom` AS `id`, diff --git a/db/routines/salix/views/User.sql b/db/routines/salix/views/User.sql index b519af3a2..b7536d6b1 100644 --- a/db/routines/salix/views/User.sql +++ b/db/routines/salix/views/User.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`User` AS SELECT `account`.`user`.`id` AS `id`, diff --git a/db/routines/srt/events/moving_clean.sql b/db/routines/srt/events/moving_clean.sql index aa1bc043d..3ea64963b 100644 --- a/db/routines/srt/events/moving_clean.sql +++ b/db/routines/srt/events/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `srt`.`moving_clean` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `srt`.`moving_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-21 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/srt/functions/bid.sql b/db/routines/srt/functions/bid.sql index 48cc0ede4..84e30ed11 100644 --- a/db/routines/srt/functions/bid.sql +++ b/db/routines/srt/functions/bid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/srt/functions/bufferPool_get.sql b/db/routines/srt/functions/bufferPool_get.sql index 6d70702dd..f3e9d2596 100644 --- a/db/routines/srt/functions/bufferPool_get.sql +++ b/db/routines/srt/functions/bufferPool_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`bufferPool_get`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`bufferPool_get`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_get.sql b/db/routines/srt/functions/buffer_get.sql index d6affd270..b66654839 100644 --- a/db/routines/srt/functions/buffer_get.sql +++ b/db/routines/srt/functions/buffer_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getRandom.sql b/db/routines/srt/functions/buffer_getRandom.sql index 00b51b21d..12134c1e3 100644 --- a/db/routines/srt/functions/buffer_getRandom.sql +++ b/db/routines/srt/functions/buffer_getRandom.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getRandom`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getRandom`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getState.sql b/db/routines/srt/functions/buffer_getState.sql index 909de3959..79d455138 100644 --- a/db/routines/srt/functions/buffer_getState.sql +++ b/db/routines/srt/functions/buffer_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getType.sql b/db/routines/srt/functions/buffer_getType.sql index b9521d42d..0db73a0d3 100644 --- a/db/routines/srt/functions/buffer_getType.sql +++ b/db/routines/srt/functions/buffer_getType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_isFull.sql b/db/routines/srt/functions/buffer_isFull.sql index c02e1dd61..b404a60d6 100644 --- a/db/routines/srt/functions/buffer_isFull.sql +++ b/db/routines/srt/functions/buffer_isFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/dayMinute.sql b/db/routines/srt/functions/dayMinute.sql index dd59b9a71..a10367863 100644 --- a/db/routines/srt/functions/dayMinute.sql +++ b/db/routines/srt/functions/dayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_check.sql b/db/routines/srt/functions/expedition_check.sql index 67940eb01..948ef449a 100644 --- a/db/routines/srt/functions/expedition_check.sql +++ b/db/routines/srt/functions/expedition_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_getDayMinute.sql b/db/routines/srt/functions/expedition_getDayMinute.sql index 395a5a36a..1882dec0f 100644 --- a/db/routines/srt/functions/expedition_getDayMinute.sql +++ b/db/routines/srt/functions/expedition_getDayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/procedures/buffer_getExpCount.sql b/db/routines/srt/procedures/buffer_getExpCount.sql index 5683e1915..d01feee79 100644 --- a/db/routines/srt/procedures/buffer_getExpCount.sql +++ b/db/routines/srt/procedures/buffer_getExpCount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) BEGIN /* Devuelve el número de expediciones de un buffer * diff --git a/db/routines/srt/procedures/buffer_getStateType.sql b/db/routines/srt/procedures/buffer_getStateType.sql index b9a8cd59f..4140cb3a6 100644 --- a/db/routines/srt/procedures/buffer_getStateType.sql +++ b/db/routines/srt/procedures/buffer_getStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_giveBack.sql b/db/routines/srt/procedures/buffer_giveBack.sql index 6066893a4..755951e7b 100644 --- a/db/routines/srt/procedures/buffer_giveBack.sql +++ b/db/routines/srt/procedures/buffer_giveBack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) BEGIN /* Devuelve una caja al celluveyor * diff --git a/db/routines/srt/procedures/buffer_readPhotocell.sql b/db/routines/srt/procedures/buffer_readPhotocell.sql index dd06f03cf..e2e1af8bb 100644 --- a/db/routines/srt/procedures/buffer_readPhotocell.sql +++ b/db/routines/srt/procedures/buffer_readPhotocell.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) BEGIN /** * Establece el estado de un buffer en función del número de fotocélulas activas diff --git a/db/routines/srt/procedures/buffer_setEmpty.sql b/db/routines/srt/procedures/buffer_setEmpty.sql index da495a78e..776b25310 100644 --- a/db/routines/srt/procedures/buffer_setEmpty.sql +++ b/db/routines/srt/procedures/buffer_setEmpty.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setState.sql b/db/routines/srt/procedures/buffer_setState.sql index 2ca06ae44..3ac3c60da 100644 --- a/db/routines/srt/procedures/buffer_setState.sql +++ b/db/routines/srt/procedures/buffer_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setStateType.sql b/db/routines/srt/procedures/buffer_setStateType.sql index 4e826e5da..a9f66509e 100644 --- a/db/routines/srt/procedures/buffer_setStateType.sql +++ b/db/routines/srt/procedures/buffer_setStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setType.sql b/db/routines/srt/procedures/buffer_setType.sql index 4e1618dac..b880262dd 100644 --- a/db/routines/srt/procedures/buffer_setType.sql +++ b/db/routines/srt/procedures/buffer_setType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) BEGIN /** * Cambia el tipo de un buffer, si está permitido diff --git a/db/routines/srt/procedures/buffer_setTypeByName.sql b/db/routines/srt/procedures/buffer_setTypeByName.sql index 54eab19d8..ad6caff42 100644 --- a/db/routines/srt/procedures/buffer_setTypeByName.sql +++ b/db/routines/srt/procedures/buffer_setTypeByName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) BEGIN /** diff --git a/db/routines/srt/procedures/clean.sql b/db/routines/srt/procedures/clean.sql index bb8bac021..3e9053300 100644 --- a/db/routines/srt/procedures/clean.sql +++ b/db/routines/srt/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`clean`() BEGIN DECLARE vLastDated DATE DEFAULT TIMESTAMPADD(WEEK,-2,util.VN_CURDATE()); diff --git a/db/routines/srt/procedures/expeditionLoading_add.sql b/db/routines/srt/procedures/expeditionLoading_add.sql index ed175c13d..bb68e395c 100644 --- a/db/routines/srt/procedures/expeditionLoading_add.sql +++ b/db/routines/srt/procedures/expeditionLoading_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) BEGIN DECLARE vMessage VARCHAR(50) DEFAULT ''; diff --git a/db/routines/srt/procedures/expedition_arrived.sql b/db/routines/srt/procedures/expedition_arrived.sql index 16b1e55e0..03108e90d 100644 --- a/db/routines/srt/procedures/expedition_arrived.sql +++ b/db/routines/srt/procedures/expedition_arrived.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) BEGIN /** * La expedición ha entrado en un buffer, superando fc2 diff --git a/db/routines/srt/procedures/expedition_bufferOut.sql b/db/routines/srt/procedures/expedition_bufferOut.sql index 4bf424439..56d32614b 100644 --- a/db/routines/srt/procedures/expedition_bufferOut.sql +++ b/db/routines/srt/procedures/expedition_bufferOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_entering.sql b/db/routines/srt/procedures/expedition_entering.sql index ee0169c30..2eab7d0e0 100644 --- a/db/routines/srt/procedures/expedition_entering.sql +++ b/db/routines/srt/procedures/expedition_entering.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_get.sql b/db/routines/srt/procedures/expedition_get.sql index da65da800..d0edd4b15 100644 --- a/db/routines/srt/procedures/expedition_get.sql +++ b/db/routines/srt/procedures/expedition_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) BEGIN DECLARE vId INT; diff --git a/db/routines/srt/procedures/expedition_groupOut.sql b/db/routines/srt/procedures/expedition_groupOut.sql index fc6b50549..340049238 100644 --- a/db/routines/srt/procedures/expedition_groupOut.sql +++ b/db/routines/srt/procedures/expedition_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_in.sql b/db/routines/srt/procedures/expedition_in.sql index 73d44b029..ca783e78f 100644 --- a/db/routines/srt/procedures/expedition_in.sql +++ b/db/routines/srt/procedures/expedition_in.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_moving.sql b/db/routines/srt/procedures/expedition_moving.sql index 16e5fa5f1..095c5f6b1 100644 --- a/db/routines/srt/procedures/expedition_moving.sql +++ b/db/routines/srt/procedures/expedition_moving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_out.sql b/db/routines/srt/procedures/expedition_out.sql index c27d79a96..7c5bb8526 100644 --- a/db/routines/srt/procedures/expedition_out.sql +++ b/db/routines/srt/procedures/expedition_out.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) proc:BEGIN /** * Una expedición ha salido de un buffer por el extremo distal diff --git a/db/routines/srt/procedures/expedition_outAll.sql b/db/routines/srt/procedures/expedition_outAll.sql index e5e655abe..109ddc817 100644 --- a/db/routines/srt/procedures/expedition_outAll.sql +++ b/db/routines/srt/procedures/expedition_outAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_relocate.sql b/db/routines/srt/procedures/expedition_relocate.sql index 50422262a..8a5e41ca9 100644 --- a/db/routines/srt/procedures/expedition_relocate.sql +++ b/db/routines/srt/procedures/expedition_relocate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_reset.sql b/db/routines/srt/procedures/expedition_reset.sql index cd7b89701..fd7698145 100644 --- a/db/routines/srt/procedures/expedition_reset.sql +++ b/db/routines/srt/procedures/expedition_reset.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_reset`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_reset`() BEGIN DELETE FROM srt.moving; diff --git a/db/routines/srt/procedures/expedition_routeOut.sql b/db/routines/srt/procedures/expedition_routeOut.sql index 4473b145b..325a6bb94 100644 --- a/db/routines/srt/procedures/expedition_routeOut.sql +++ b/db/routines/srt/procedures/expedition_routeOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_scan.sql b/db/routines/srt/procedures/expedition_scan.sql index d33a67434..81caa4bef 100644 --- a/db/routines/srt/procedures/expedition_scan.sql +++ b/db/routines/srt/procedures/expedition_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) BEGIN /* Actualiza el estado de una expedicion a OUT, al ser escaneada manualmente diff --git a/db/routines/srt/procedures/expedition_setDimensions.sql b/db/routines/srt/procedures/expedition_setDimensions.sql index b48d0c9fa..fba5f373c 100644 --- a/db/routines/srt/procedures/expedition_setDimensions.sql +++ b/db/routines/srt/procedures/expedition_setDimensions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( vExpeditionFk INT, vWeight DECIMAL(10,2), vLength INT, diff --git a/db/routines/srt/procedures/expedition_weighing.sql b/db/routines/srt/procedures/expedition_weighing.sql index d8f060822..372212549 100644 --- a/db/routines/srt/procedures/expedition_weighing.sql +++ b/db/routines/srt/procedures/expedition_weighing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/failureLog_add.sql b/db/routines/srt/procedures/failureLog_add.sql index bb6a86e8e..5ca49a2e0 100644 --- a/db/routines/srt/procedures/failureLog_add.sql +++ b/db/routines/srt/procedures/failureLog_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) BEGIN /* Añade un registro a srt.failureLog diff --git a/db/routines/srt/procedures/lastRFID_add.sql b/db/routines/srt/procedures/lastRFID_add.sql index 3d5981e50..704e1baa8 100644 --- a/db/routines/srt/procedures/lastRFID_add.sql +++ b/db/routines/srt/procedures/lastRFID_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/lastRFID_add_beta.sql b/db/routines/srt/procedures/lastRFID_add_beta.sql index 431937066..01ad90aff 100644 --- a/db/routines/srt/procedures/lastRFID_add_beta.sql +++ b/db/routines/srt/procedures/lastRFID_add_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/moving_CollidingSet.sql b/db/routines/srt/procedures/moving_CollidingSet.sql index 654ab165b..bfaca4bbf 100644 --- a/db/routines/srt/procedures/moving_CollidingSet.sql +++ b/db/routines/srt/procedures/moving_CollidingSet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() BEGIN diff --git a/db/routines/srt/procedures/moving_between.sql b/db/routines/srt/procedures/moving_between.sql index 6fc15e2d9..ccb54353f 100644 --- a/db/routines/srt/procedures/moving_between.sql +++ b/db/routines/srt/procedures/moving_between.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index e5bd27810..bad9edbb5 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_clean`() BEGIN /** * Elimina movimientos por inactividad diff --git a/db/routines/srt/procedures/moving_delete.sql b/db/routines/srt/procedures/moving_delete.sql index 247bb0451..926b4b595 100644 --- a/db/routines/srt/procedures/moving_delete.sql +++ b/db/routines/srt/procedures/moving_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) BEGIN /* Elimina un movimiento diff --git a/db/routines/srt/procedures/moving_groupOut.sql b/db/routines/srt/procedures/moving_groupOut.sql index dbc980859..28556d20d 100644 --- a/db/routines/srt/procedures/moving_groupOut.sql +++ b/db/routines/srt/procedures/moving_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_groupOut`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_groupOut`() proc: BEGIN DECLARE vDayMinute INT; diff --git a/db/routines/srt/procedures/moving_next.sql b/db/routines/srt/procedures/moving_next.sql index e50bf1424..75270aed1 100644 --- a/db/routines/srt/procedures/moving_next.sql +++ b/db/routines/srt/procedures/moving_next.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`moving_next`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_next`() BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/photocell_setActive.sql b/db/routines/srt/procedures/photocell_setActive.sql index 96512a0a8..63858a83c 100644 --- a/db/routines/srt/procedures/photocell_setActive.sql +++ b/db/routines/srt/procedures/photocell_setActive.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) BEGIN REPLACE srt.photocell VALUES (vbufferFk, vPosition, vIsActive); END$$ diff --git a/db/routines/srt/procedures/randomMoving.sql b/db/routines/srt/procedures/randomMoving.sql index 6ae18140a..01a9eaca4 100644 --- a/db/routines/srt/procedures/randomMoving.sql +++ b/db/routines/srt/procedures/randomMoving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) BEGIN DECLARE vBufferOld INT DEFAULT 0; DECLARE vBufferFk INT; diff --git a/db/routines/srt/procedures/randomMoving_Launch.sql b/db/routines/srt/procedures/randomMoving_Launch.sql index e9a50d40f..84003a50a 100644 --- a/db/routines/srt/procedures/randomMoving_Launch.sql +++ b/db/routines/srt/procedures/randomMoving_Launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() BEGIN DECLARE i INT DEFAULT 5; diff --git a/db/routines/srt/procedures/restart.sql b/db/routines/srt/procedures/restart.sql index 3e2a9257b..41871863c 100644 --- a/db/routines/srt/procedures/restart.sql +++ b/db/routines/srt/procedures/restart.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`restart`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`restart`() BEGIN /* diff --git a/db/routines/srt/procedures/start.sql b/db/routines/srt/procedures/start.sql index 04b39f59d..51a0a300b 100644 --- a/db/routines/srt/procedures/start.sql +++ b/db/routines/srt/procedures/start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`start`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`start`() BEGIN /* diff --git a/db/routines/srt/procedures/stop.sql b/db/routines/srt/procedures/stop.sql index 3bef46ae5..d649412aa 100644 --- a/db/routines/srt/procedures/stop.sql +++ b/db/routines/srt/procedures/stop.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`stop`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`stop`() BEGIN /* diff --git a/db/routines/srt/procedures/test.sql b/db/routines/srt/procedures/test.sql index 8f5a90b1b..571e415f2 100644 --- a/db/routines/srt/procedures/test.sql +++ b/db/routines/srt/procedures/test.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `srt`.`test`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`test`() BEGIN SELECT 'procedimiento ejecutado con éxito'; diff --git a/db/routines/srt/triggers/expedition_beforeUpdate.sql b/db/routines/srt/triggers/expedition_beforeUpdate.sql index 3ed1f8df3..335c69bab 100644 --- a/db/routines/srt/triggers/expedition_beforeUpdate.sql +++ b/db/routines/srt/triggers/expedition_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/srt/triggers/moving_afterInsert.sql b/db/routines/srt/triggers/moving_afterInsert.sql index ce2ebfdb5..dcf8a977e 100644 --- a/db/routines/srt/triggers/moving_afterInsert.sql +++ b/db/routines/srt/triggers/moving_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `srt`.`moving_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `srt`.`moving_afterInsert` AFTER INSERT ON `moving` FOR EACH ROW BEGIN diff --git a/db/routines/srt/views/bufferDayMinute.sql b/db/routines/srt/views/bufferDayMinute.sql index 870da7588..0156b74f5 100644 --- a/db/routines/srt/views/bufferDayMinute.sql +++ b/db/routines/srt/views/bufferDayMinute.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferDayMinute` AS SELECT `b`.`id` AS `bufferFk`, diff --git a/db/routines/srt/views/bufferFreeLength.sql b/db/routines/srt/views/bufferFreeLength.sql index ef3c52eef..7035220a0 100644 --- a/db/routines/srt/views/bufferFreeLength.sql +++ b/db/routines/srt/views/bufferFreeLength.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferFreeLength` AS SELECT cast(`b`.`id` AS decimal(10, 0)) AS `bufferFk`, diff --git a/db/routines/srt/views/bufferStock.sql b/db/routines/srt/views/bufferStock.sql index b7c207495..dd0b2f1c2 100644 --- a/db/routines/srt/views/bufferStock.sql +++ b/db/routines/srt/views/bufferStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferStock` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/srt/views/routePalletized.sql b/db/routines/srt/views/routePalletized.sql index 183eff75e..05113242a 100644 --- a/db/routines/srt/views/routePalletized.sql +++ b/db/routines/srt/views/routePalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`routePalletized` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/srt/views/ticketPalletized.sql b/db/routines/srt/views/ticketPalletized.sql index f8ac72fcf..812e3659e 100644 --- a/db/routines/srt/views/ticketPalletized.sql +++ b/db/routines/srt/views/ticketPalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`ticketPalletized` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/srt/views/upperStickers.sql b/db/routines/srt/views/upperStickers.sql index b81ef86f5..fff8890f5 100644 --- a/db/routines/srt/views/upperStickers.sql +++ b/db/routines/srt/views/upperStickers.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`upperStickers` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/stock/events/log_clean.sql b/db/routines/stock/events/log_clean.sql index fab8888e3..68dec7385 100644 --- a/db/routines/stock/events/log_clean.sql +++ b/db/routines/stock/events/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `stock`.`log_clean` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `stock`.`log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:29:18.000' ON COMPLETION PRESERVE diff --git a/db/routines/stock/events/log_syncNoWait.sql b/db/routines/stock/events/log_syncNoWait.sql index 0ac83364b..e8f719ac2 100644 --- a/db/routines/stock/events/log_syncNoWait.sql +++ b/db/routines/stock/events/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `stock`.`log_syncNoWait` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `stock`.`log_syncNoWait` ON SCHEDULE EVERY 5 SECOND STARTS '2017-06-27 17:15:02.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/stock/procedures/inbound_addPick.sql b/db/routines/stock/procedures/inbound_addPick.sql index 72fd91782..136ade6c8 100644 --- a/db/routines/stock/procedures/inbound_addPick.sql +++ b/db/routines/stock/procedures/inbound_addPick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_addPick`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_addPick`( vSelf INT, vOutboundFk INT, vQuantity INT diff --git a/db/routines/stock/procedures/inbound_removePick.sql b/db/routines/stock/procedures/inbound_removePick.sql index 9648a92cd..75883bcb2 100644 --- a/db/routines/stock/procedures/inbound_removePick.sql +++ b/db/routines/stock/procedures/inbound_removePick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_removePick`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_removePick`( vSelf INT, vOutboundFk INT, vQuantity INT, diff --git a/db/routines/stock/procedures/inbound_requestQuantity.sql b/db/routines/stock/procedures/inbound_requestQuantity.sql index 38db462aa..4c6fb4295 100644 --- a/db/routines/stock/procedures/inbound_requestQuantity.sql +++ b/db/routines/stock/procedures/inbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/inbound_sync.sql b/db/routines/stock/procedures/inbound_sync.sql index be5802e3f..7d463e70d 100644 --- a/db/routines/stock/procedures/inbound_sync.sql +++ b/db/routines/stock/procedures/inbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) BEGIN /** * Associates a inbound with their possible outbounds, updating it's available. diff --git a/db/routines/stock/procedures/log_clean.sql b/db/routines/stock/procedures/log_clean.sql index df09166d0..9215246e1 100644 --- a/db/routines/stock/procedures/log_clean.sql +++ b/db/routines/stock/procedures/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_clean`() BEGIN DELETE FROM inbound WHERE dated = vn.getInventoryDate(); DELETE FROM outbound WHERE dated = vn.getInventoryDate(); diff --git a/db/routines/stock/procedures/log_delete.sql b/db/routines/stock/procedures/log_delete.sql index 4d961be3a..8bf2aed56 100644 --- a/db/routines/stock/procedures/log_delete.sql +++ b/db/routines/stock/procedures/log_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) proc: BEGIN /** * Processes orphan transactions. diff --git a/db/routines/stock/procedures/log_refreshAll.sql b/db/routines/stock/procedures/log_refreshAll.sql index 4f37e5355..9415379af 100644 --- a/db/routines/stock/procedures/log_refreshAll.sql +++ b/db/routines/stock/procedures/log_refreshAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshAll`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshAll`() BEGIN /** * Recalculates the entire cache. It takes a considerable time, diff --git a/db/routines/stock/procedures/log_refreshBuy.sql b/db/routines/stock/procedures/log_refreshBuy.sql index 0cfc5457b..68ab1b617 100644 --- a/db/routines/stock/procedures/log_refreshBuy.sql +++ b/db/routines/stock/procedures/log_refreshBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshOrder.sql b/db/routines/stock/procedures/log_refreshOrder.sql index 24f827934..787fb6aa5 100644 --- a/db/routines/stock/procedures/log_refreshOrder.sql +++ b/db/routines/stock/procedures/log_refreshOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshSale.sql b/db/routines/stock/procedures/log_refreshSale.sql index 8ca9a42ad..f982d405e 100644 --- a/db/routines/stock/procedures/log_refreshSale.sql +++ b/db/routines/stock/procedures/log_refreshSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_refreshSale`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshSale`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_sync.sql b/db/routines/stock/procedures/log_sync.sql index 7b56251f5..349e4b3db 100644 --- a/db/routines/stock/procedures/log_sync.sql +++ b/db/routines/stock/procedures/log_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) proc: BEGIN DECLARE vDone BOOL; DECLARE vLogId INT; diff --git a/db/routines/stock/procedures/log_syncNoWait.sql b/db/routines/stock/procedures/log_syncNoWait.sql index bc5d2e5fa..897195f4d 100644 --- a/db/routines/stock/procedures/log_syncNoWait.sql +++ b/db/routines/stock/procedures/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/stock/procedures/outbound_requestQuantity.sql b/db/routines/stock/procedures/outbound_requestQuantity.sql index 57ef3415e..2ee262467 100644 --- a/db/routines/stock/procedures/outbound_requestQuantity.sql +++ b/db/routines/stock/procedures/outbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/outbound_sync.sql b/db/routines/stock/procedures/outbound_sync.sql index abca7ea92..94b65e1b6 100644 --- a/db/routines/stock/procedures/outbound_sync.sql +++ b/db/routines/stock/procedures/outbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) BEGIN /** * Attaches a outbound with available inbounds. diff --git a/db/routines/stock/procedures/visible_log.sql b/db/routines/stock/procedures/visible_log.sql index a92a5d03a..cb11e9d3e 100644 --- a/db/routines/stock/procedures/visible_log.sql +++ b/db/routines/stock/procedures/visible_log.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `stock`.`visible_log`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`visible_log`( vIsPicked BOOL, vWarehouseFk INT, vItemFk INT, diff --git a/db/routines/stock/triggers/inbound_afterDelete.sql b/db/routines/stock/triggers/inbound_afterDelete.sql index b54370742..a436d04a0 100644 --- a/db/routines/stock/triggers/inbound_afterDelete.sql +++ b/db/routines/stock/triggers/inbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`inbound_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`inbound_afterDelete` AFTER DELETE ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/inbound_beforeInsert.sql b/db/routines/stock/triggers/inbound_beforeInsert.sql index fdaa17714..3707a2b2a 100644 --- a/db/routines/stock/triggers/inbound_beforeInsert.sql +++ b/db/routines/stock/triggers/inbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` BEFORE INSERT ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_afterDelete.sql b/db/routines/stock/triggers/outbound_afterDelete.sql index 4f2ef5a61..1c90c3293 100644 --- a/db/routines/stock/triggers/outbound_afterDelete.sql +++ b/db/routines/stock/triggers/outbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`outbound_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`outbound_afterDelete` AFTER DELETE ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_beforeInsert.sql b/db/routines/stock/triggers/outbound_beforeInsert.sql index e98d1ff2d..e0560d8f6 100644 --- a/db/routines/stock/triggers/outbound_beforeInsert.sql +++ b/db/routines/stock/triggers/outbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` BEFORE INSERT ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/tmp/events/clean.sql b/db/routines/tmp/events/clean.sql index b1e3d0f55..75f022362 100644 --- a/db/routines/tmp/events/clean.sql +++ b/db/routines/tmp/events/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `tmp`.`clean` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `tmp`.`clean` ON SCHEDULE EVERY 1 HOUR STARTS '2022-03-01 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/tmp/procedures/clean.sql b/db/routines/tmp/procedures/clean.sql index 72cf38390..90ea69216 100644 --- a/db/routines/tmp/procedures/clean.sql +++ b/db/routines/tmp/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `tmp`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `tmp`.`clean`() BEGIN DECLARE vTableName VARCHAR(255); DECLARE vDone BOOL; diff --git a/db/routines/util/events/slowLog_prune.sql b/db/routines/util/events/slowLog_prune.sql index 2171ecacf..1b339fbcd 100644 --- a/db/routines/util/events/slowLog_prune.sql +++ b/db/routines/util/events/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `util`.`slowLog_prune` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `util`.`slowLog_prune` ON SCHEDULE EVERY 1 DAY STARTS '2021-10-08 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/util/functions/VN_CURDATE.sql b/db/routines/util/functions/VN_CURDATE.sql index fe68671f3..0ceb0c4ed 100644 --- a/db/routines/util/functions/VN_CURDATE.sql +++ b/db/routines/util/functions/VN_CURDATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_CURDATE`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_CURDATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_CURTIME.sql b/db/routines/util/functions/VN_CURTIME.sql index 21dbec141..954ed2273 100644 --- a/db/routines/util/functions/VN_CURTIME.sql +++ b/db/routines/util/functions/VN_CURTIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_CURTIME`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_CURTIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_NOW.sql b/db/routines/util/functions/VN_NOW.sql index f19f8c0d0..44e3ece44 100644 --- a/db/routines/util/functions/VN_NOW.sql +++ b/db/routines/util/functions/VN_NOW.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_NOW`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_NOW`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql index 15177dc4c..c168df9fd 100644 --- a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_DATE.sql b/db/routines/util/functions/VN_UTC_DATE.sql index c89f25230..803b6026f 100644 --- a/db/routines/util/functions/VN_UTC_DATE.sql +++ b/db/routines/util/functions/VN_UTC_DATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIME.sql b/db/routines/util/functions/VN_UTC_TIME.sql index 4900ea228..3eaa7f431 100644 --- a/db/routines/util/functions/VN_UTC_TIME.sql +++ b/db/routines/util/functions/VN_UTC_TIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql index 824ae3d3f..530198cb9 100644 --- a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/accountNumberToIban.sql b/db/routines/util/functions/accountNumberToIban.sql index 9ba98bac2..811954547 100644 --- a/db/routines/util/functions/accountNumberToIban.sql +++ b/db/routines/util/functions/accountNumberToIban.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`accountNumberToIban`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`accountNumberToIban`( vAccount VARCHAR(20) ) RETURNS varchar(4) CHARSET utf8mb3 COLLATE utf8mb3_general_ci diff --git a/db/routines/util/functions/accountShortToStandard.sql b/db/routines/util/functions/accountShortToStandard.sql index 6933d8043..a3379d989 100644 --- a/db/routines/util/functions/accountShortToStandard.sql +++ b/db/routines/util/functions/accountShortToStandard.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/binlogQueue_getDelay.sql b/db/routines/util/functions/binlogQueue_getDelay.sql index 1edb697fc..adbf0e98a 100644 --- a/db/routines/util/functions/binlogQueue_getDelay.sql +++ b/db/routines/util/functions/binlogQueue_getDelay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) RETURNS BIGINT READS SQL DATA NOT DETERMINISTIC diff --git a/db/routines/util/functions/capitalizeFirst.sql b/db/routines/util/functions/capitalizeFirst.sql index af179b526..50e5f508e 100644 --- a/db/routines/util/functions/capitalizeFirst.sql +++ b/db/routines/util/functions/capitalizeFirst.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/checkPrintableChars.sql b/db/routines/util/functions/checkPrintableChars.sql index 5da18775a..a327ed41d 100644 --- a/db/routines/util/functions/checkPrintableChars.sql +++ b/db/routines/util/functions/checkPrintableChars.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`checkPrintableChars`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`checkPrintableChars`( vString VARCHAR(255) ) RETURNS tinyint(1) DETERMINISTIC diff --git a/db/routines/util/functions/crypt.sql b/db/routines/util/functions/crypt.sql index de589d8b6..98308729e 100644 --- a/db/routines/util/functions/crypt.sql +++ b/db/routines/util/functions/crypt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/cryptOff.sql b/db/routines/util/functions/cryptOff.sql index 40919355b..1c268f070 100644 --- a/db/routines/util/functions/cryptOff.sql +++ b/db/routines/util/functions/cryptOff.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/dayEnd.sql b/db/routines/util/functions/dayEnd.sql index f37129906..767e490d8 100644 --- a/db/routines/util/functions/dayEnd.sql +++ b/db/routines/util/functions/dayEnd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) RETURNS datetime DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfMonth.sql b/db/routines/util/functions/firstDayOfMonth.sql index 0e7add4eb..298dba95a 100644 --- a/db/routines/util/functions/firstDayOfMonth.sql +++ b/db/routines/util/functions/firstDayOfMonth.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfYear.sql b/db/routines/util/functions/firstDayOfYear.sql index 7ca8fe3f2..f7a9f8daf 100644 --- a/db/routines/util/functions/firstDayOfYear.sql +++ b/db/routines/util/functions/firstDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/formatRow.sql b/db/routines/util/functions/formatRow.sql index a579c752b..b80e60e9f 100644 --- a/db/routines/util/functions/formatRow.sql +++ b/db/routines/util/functions/formatRow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) RETURNS varchar(512) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/formatTable.sql b/db/routines/util/functions/formatTable.sql index 686f8a910..a717e8c07 100644 --- a/db/routines/util/functions/formatTable.sql +++ b/db/routines/util/functions/formatTable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hasDateOverlapped.sql b/db/routines/util/functions/hasDateOverlapped.sql index cba4a5567..ea73390e6 100644 --- a/db/routines/util/functions/hasDateOverlapped.sql +++ b/db/routines/util/functions/hasDateOverlapped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hmacSha2.sql b/db/routines/util/functions/hmacSha2.sql index 3389356d6..cb36cac87 100644 --- a/db/routines/util/functions/hmacSha2.sql +++ b/db/routines/util/functions/hmacSha2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) RETURNS varchar(128) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/isLeapYear.sql b/db/routines/util/functions/isLeapYear.sql index 98054543a..c51e98cda 100644 --- a/db/routines/util/functions/isLeapYear.sql +++ b/db/routines/util/functions/isLeapYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/json_removeNulls.sql b/db/routines/util/functions/json_removeNulls.sql index 10f4692be..45797e1bf 100644 --- a/db/routines/util/functions/json_removeNulls.sql +++ b/db/routines/util/functions/json_removeNulls.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/lang.sql b/db/routines/util/functions/lang.sql index 20c288c54..e7832993d 100644 --- a/db/routines/util/functions/lang.sql +++ b/db/routines/util/functions/lang.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`lang`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`lang`() RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/lastDayOfYear.sql b/db/routines/util/functions/lastDayOfYear.sql index 56ae28e7e..b60fc2cc7 100644 --- a/db/routines/util/functions/lastDayOfYear.sql +++ b/db/routines/util/functions/lastDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/log_formatDate.sql b/db/routines/util/functions/log_formatDate.sql index cf2618119..0004461d1 100644 --- a/db/routines/util/functions/log_formatDate.sql +++ b/db/routines/util/functions/log_formatDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/midnight.sql b/db/routines/util/functions/midnight.sql index dcf7a71e7..b36a9668c 100644 --- a/db/routines/util/functions/midnight.sql +++ b/db/routines/util/functions/midnight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`midnight`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`midnight`() RETURNS datetime DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/mockTime.sql b/db/routines/util/functions/mockTime.sql index 681840e63..cbdac99e6 100644 --- a/db/routines/util/functions/mockTime.sql +++ b/db/routines/util/functions/mockTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockTime`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockTimeBase.sql b/db/routines/util/functions/mockTimeBase.sql index 6685abaaa..f1cba9e17 100644 --- a/db/routines/util/functions/mockTimeBase.sql +++ b/db/routines/util/functions/mockTimeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockUtcTime.sql b/db/routines/util/functions/mockUtcTime.sql index 1c3de9629..3132760ab 100644 --- a/db/routines/util/functions/mockUtcTime.sql +++ b/db/routines/util/functions/mockUtcTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`mockUtcTime`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/nextWeek.sql b/db/routines/util/functions/nextWeek.sql index 7a496bcf7..fc6abc40d 100644 --- a/db/routines/util/functions/nextWeek.sql +++ b/db/routines/util/functions/nextWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/notification_send.sql b/db/routines/util/functions/notification_send.sql index 5fb9efe3d..87f5ec43a 100644 --- a/db/routines/util/functions/notification_send.sql +++ b/db/routines/util/functions/notification_send.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) RETURNS int(11) NOT DETERMINISTIC MODIFIES SQL DATA diff --git a/db/routines/util/functions/quarterFirstDay.sql b/db/routines/util/functions/quarterFirstDay.sql index 4c45ef5e9..a8d4c35ad 100644 --- a/db/routines/util/functions/quarterFirstDay.sql +++ b/db/routines/util/functions/quarterFirstDay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/quoteIdentifier.sql b/db/routines/util/functions/quoteIdentifier.sql index fe36a8d98..96161b3ef 100644 --- a/db/routines/util/functions/quoteIdentifier.sql +++ b/db/routines/util/functions/quoteIdentifier.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/stringXor.sql b/db/routines/util/functions/stringXor.sql index 5038374dd..e16ca4c43 100644 --- a/db/routines/util/functions/stringXor.sql +++ b/db/routines/util/functions/stringXor.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) RETURNS mediumblob DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/today.sql b/db/routines/util/functions/today.sql index fcc28d08f..5f65fe2e1 100644 --- a/db/routines/util/functions/today.sql +++ b/db/routines/util/functions/today.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`today`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`today`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/tomorrow.sql b/db/routines/util/functions/tomorrow.sql index 27b5f9779..e85af114e 100644 --- a/db/routines/util/functions/tomorrow.sql +++ b/db/routines/util/functions/tomorrow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`tomorrow`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`tomorrow`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/twoDaysAgo.sql b/db/routines/util/functions/twoDaysAgo.sql index 3049f3bd2..e00d965a4 100644 --- a/db/routines/util/functions/twoDaysAgo.sql +++ b/db/routines/util/functions/twoDaysAgo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`twoDaysAgo`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`twoDaysAgo`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yearRelativePosition.sql b/db/routines/util/functions/yearRelativePosition.sql index 1b11f1b88..bede2d809 100644 --- a/db/routines/util/functions/yearRelativePosition.sql +++ b/db/routines/util/functions/yearRelativePosition.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yesterday.sql b/db/routines/util/functions/yesterday.sql index 59160875b..bc21a263a 100644 --- a/db/routines/util/functions/yesterday.sql +++ b/db/routines/util/functions/yesterday.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `util`.`yesterday`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`yesterday`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/procedures/checkHex.sql b/db/routines/util/procedures/checkHex.sql index a6785b613..8fc4003f4 100644 --- a/db/routines/util/procedures/checkHex.sql +++ b/db/routines/util/procedures/checkHex.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) BEGIN /** * Comprueba si vParam es un número hexadecimal que empieza por # y tiene una longitud total de 7 dígitos diff --git a/db/routines/util/procedures/connection_kill.sql b/db/routines/util/procedures/connection_kill.sql index db8488a15..3b9ea17f3 100644 --- a/db/routines/util/procedures/connection_kill.sql +++ b/db/routines/util/procedures/connection_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`connection_kill`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`connection_kill`( vConnectionId BIGINT ) BEGIN diff --git a/db/routines/util/procedures/debugAdd.sql b/db/routines/util/procedures/debugAdd.sql index 7bb7e23b2..cf1c92606 100644 --- a/db/routines/util/procedures/debugAdd.sql +++ b/db/routines/util/procedures/debugAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`debugAdd`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`debugAdd`( vVariable VARCHAR(255), vValue TEXT ) diff --git a/db/routines/util/procedures/exec.sql b/db/routines/util/procedures/exec.sql index 30b33a5fd..5fec91ec7 100644 --- a/db/routines/util/procedures/exec.sql +++ b/db/routines/util/procedures/exec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) SQL SECURITY INVOKER BEGIN /** diff --git a/db/routines/util/procedures/log_add.sql b/db/routines/util/procedures/log_add.sql index 5572e45fd..aa0ec2388 100644 --- a/db/routines/util/procedures/log_add.sql +++ b/db/routines/util/procedures/log_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_add`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_addWithUser.sql b/db/routines/util/procedures/log_addWithUser.sql index b5100e228..50c86eced 100644 --- a/db/routines/util/procedures/log_addWithUser.sql +++ b/db/routines/util/procedures/log_addWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_addWithUser`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_addWithUser`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_cleanInstances.sql b/db/routines/util/procedures/log_cleanInstances.sql index 089fd8b6b..029b50eea 100644 --- a/db/routines/util/procedures/log_cleanInstances.sql +++ b/db/routines/util/procedures/log_cleanInstances.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`log_cleanInstances`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_cleanInstances`( vActionCode VARCHAR(45), INOUT vOldInstance JSON, INOUT vNewInstance JSON) diff --git a/db/routines/util/procedures/procNoOverlap.sql b/db/routines/util/procedures/procNoOverlap.sql index 71ec770c5..2a00138c4 100644 --- a/db/routines/util/procedures/procNoOverlap.sql +++ b/db/routines/util/procedures/procNoOverlap.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) SQL SECURITY INVOKER proc: BEGIN /** diff --git a/db/routines/util/procedures/proc_changedPrivs.sql b/db/routines/util/procedures/proc_changedPrivs.sql index 74aa94f72..69b212599 100644 --- a/db/routines/util/procedures/proc_changedPrivs.sql +++ b/db/routines/util/procedures/proc_changedPrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() BEGIN SELECT s.* FROM proc_privs s diff --git a/db/routines/util/procedures/proc_restorePrivs.sql b/db/routines/util/procedures/proc_restorePrivs.sql index cd6eb09b4..8e7c287c2 100644 --- a/db/routines/util/procedures/proc_restorePrivs.sql +++ b/db/routines/util/procedures/proc_restorePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() BEGIN /** * Restores the privileges saved by proc_savePrivs(). diff --git a/db/routines/util/procedures/proc_savePrivs.sql b/db/routines/util/procedures/proc_savePrivs.sql index 8b77a59b5..25545ca69 100644 --- a/db/routines/util/procedures/proc_savePrivs.sql +++ b/db/routines/util/procedures/proc_savePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`proc_savePrivs`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_savePrivs`() BEGIN /** * Saves routine privileges, used to simplify the task of keeping diff --git a/db/routines/util/procedures/slowLog_prune.sql b/db/routines/util/procedures/slowLog_prune.sql index b77b347d4..59327c1c2 100644 --- a/db/routines/util/procedures/slowLog_prune.sql +++ b/db/routines/util/procedures/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`slowLog_prune`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`slowLog_prune`() BEGIN /** * Prunes MySQL slow query log table deleting all records older than one week. diff --git a/db/routines/util/procedures/throw.sql b/db/routines/util/procedures/throw.sql index bc2ba2b34..b391d3880 100644 --- a/db/routines/util/procedures/throw.sql +++ b/db/routines/util/procedures/throw.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) BEGIN /** * Throws a user-defined exception. diff --git a/db/routines/util/procedures/time_generate.sql b/db/routines/util/procedures/time_generate.sql index 041806929..cc93cd372 100644 --- a/db/routines/util/procedures/time_generate.sql +++ b/db/routines/util/procedures/time_generate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) BEGIN /** * Generate a temporary table between the days passed as parameters diff --git a/db/routines/util/procedures/tx_commit.sql b/db/routines/util/procedures/tx_commit.sql index 6a85203e5..1f708c533 100644 --- a/db/routines/util/procedures/tx_commit.sql +++ b/db/routines/util/procedures/tx_commit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) BEGIN /** * Confirma los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_rollback.sql b/db/routines/util/procedures/tx_rollback.sql index 526a8a0fb..38ee77613 100644 --- a/db/routines/util/procedures/tx_rollback.sql +++ b/db/routines/util/procedures/tx_rollback.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) BEGIN /** * Deshace los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_start.sql b/db/routines/util/procedures/tx_start.sql index 815d901be..ac1a443d3 100644 --- a/db/routines/util/procedures/tx_start.sql +++ b/db/routines/util/procedures/tx_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) BEGIN /** * Inicia una transacción. diff --git a/db/routines/util/procedures/warn.sql b/db/routines/util/procedures/warn.sql index 287c79ccd..92e40a83d 100644 --- a/db/routines/util/procedures/warn.sql +++ b/db/routines/util/procedures/warn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) BEGIN DECLARE w VARCHAR(1) DEFAULT '__'; SET @warn = vCode; diff --git a/db/routines/util/views/eventLogGrouped.sql b/db/routines/util/views/eventLogGrouped.sql index 5e417f6a7..8f3c9f264 100644 --- a/db/routines/util/views/eventLogGrouped.sql +++ b/db/routines/util/views/eventLogGrouped.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `util`.`eventLogGrouped` AS SELECT max(`t`.`date`) AS `lastHappened`, diff --git a/db/routines/vn/events/claim_changeState.sql b/db/routines/vn/events/claim_changeState.sql index 873401a34..2d8968af8 100644 --- a/db/routines/vn/events/claim_changeState.sql +++ b/db/routines/vn/events/claim_changeState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`claim_changeState` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`claim_changeState` ON SCHEDULE EVERY 1 DAY STARTS '2024-06-06 07:52:46.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/client_unassignSalesPerson.sql b/db/routines/vn/events/client_unassignSalesPerson.sql index 6228809b3..ffd83fbf6 100644 --- a/db/routines/vn/events/client_unassignSalesPerson.sql +++ b/db/routines/vn/events/client_unassignSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`client_unassignSalesPerson` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`client_unassignSalesPerson` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:30:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/client_userDisable.sql b/db/routines/vn/events/client_userDisable.sql index 33c73fe2c..6ecc05add 100644 --- a/db/routines/vn/events/client_userDisable.sql +++ b/db/routines/vn/events/client_userDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`client_userDisable` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`client_userDisable` ON SCHEDULE EVERY 1 MONTH STARTS '2023-06-01 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/collection_make.sql b/db/routines/vn/events/collection_make.sql index 0e4b4303e..940b11d93 100644 --- a/db/routines/vn/events/collection_make.sql +++ b/db/routines/vn/events/collection_make.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`collection_make` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`collection_make` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-09-15 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/department_doCalc.sql b/db/routines/vn/events/department_doCalc.sql index 5ccc8c390..09734fbde 100644 --- a/db/routines/vn/events/department_doCalc.sql +++ b/db/routines/vn/events/department_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`department_doCalc` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`department_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-11-15 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/envialiaThreHoldChecker.sql b/db/routines/vn/events/envialiaThreHoldChecker.sql index 3f2e403c3..46f27c2ac 100644 --- a/db/routines/vn/events/envialiaThreHoldChecker.sql +++ b/db/routines/vn/events/envialiaThreHoldChecker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`envialiaThreHoldChecker` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`envialiaThreHoldChecker` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:52:46.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/greuge_notify.sql b/db/routines/vn/events/greuge_notify.sql index c80ba144b..c89373d54 100644 --- a/db/routines/vn/events/greuge_notify.sql +++ b/db/routines/vn/events/greuge_notify.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`greuge_notify` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/itemImageQueue_check.sql b/db/routines/vn/events/itemImageQueue_check.sql index d4c5253e0..01a97613b 100644 --- a/db/routines/vn/events/itemImageQueue_check.sql +++ b/db/routines/vn/events/itemImageQueue_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`itemImageQueue_check` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`itemImageQueue_check` ON SCHEDULE EVERY 1 HOUR STARTS '2023-07-28 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/itemShelvingSale_doReserve.sql b/db/routines/vn/events/itemShelvingSale_doReserve.sql index 10a281549..b8a1a14ec 100644 --- a/db/routines/vn/events/itemShelvingSale_doReserve.sql +++ b/db/routines/vn/events/itemShelvingSale_doReserve.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve` ON SCHEDULE EVERY 15 SECOND STARTS '2023-10-16 00:00:00' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/mysqlConnectionsSorter_kill.sql b/db/routines/vn/events/mysqlConnectionsSorter_kill.sql index a902aa0e4..1d87ceb82 100644 --- a/db/routines/vn/events/mysqlConnectionsSorter_kill.sql +++ b/db/routines/vn/events/mysqlConnectionsSorter_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill` ON SCHEDULE EVERY 1 MINUTE STARTS '2021-10-28 09:56:27.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/printQueue_check.sql b/db/routines/vn/events/printQueue_check.sql index d049cacc8..cddba8cf8 100644 --- a/db/routines/vn/events/printQueue_check.sql +++ b/db/routines/vn/events/printQueue_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`printQueue_check` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2022-01-28 09:52:46.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/raidUpdate.sql b/db/routines/vn/events/raidUpdate.sql index 94a851509..c0c6f03c5 100644 --- a/db/routines/vn/events/raidUpdate.sql +++ b/db/routines/vn/events/raidUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`raidUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`raidUpdate` ON SCHEDULE EVERY 1 DAY STARTS '2017-12-29 00:05:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/route_doRecalc.sql b/db/routines/vn/events/route_doRecalc.sql index 424eae3ce..4e6a77674 100644 --- a/db/routines/vn/events/route_doRecalc.sql +++ b/db/routines/vn/events/route_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`route_doRecalc` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`route_doRecalc` ON SCHEDULE EVERY 10 SECOND STARTS '2021-07-08 07:32:23.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/vehicle_notify.sql b/db/routines/vn/events/vehicle_notify.sql index 1732db4cf..edeecd1f8 100644 --- a/db/routines/vn/events/vehicle_notify.sql +++ b/db/routines/vn/events/vehicle_notify.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`vehicle_notify` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`vehicle_notify` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-01 00:07:00.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/workerJourney_doRecalc.sql b/db/routines/vn/events/workerJourney_doRecalc.sql index 8d6b41cd4..a3f19929d 100644 --- a/db/routines/vn/events/workerJourney_doRecalc.sql +++ b/db/routines/vn/events/workerJourney_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`workerJourney_doRecalc` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`workerJourney_doRecalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-22 04:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/events/worker_updateChangedBusiness.sql b/db/routines/vn/events/worker_updateChangedBusiness.sql index 18714c3a5..6f6c15650 100644 --- a/db/routines/vn/events/worker_updateChangedBusiness.sql +++ b/db/routines/vn/events/worker_updateChangedBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`worker_updateChangedBusiness` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`worker_updateChangedBusiness` ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:05.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/vn/events/zoneGeo_doCalc.sql b/db/routines/vn/events/zoneGeo_doCalc.sql index 82c938de9..ca2a54f94 100644 --- a/db/routines/vn/events/zoneGeo_doCalc.sql +++ b/db/routines/vn/events/zoneGeo_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` EVENT `vn`.`zoneGeo_doCalc` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`zoneGeo_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-09-13 15:30:47.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/functions/MIDNIGHT.sql b/db/routines/vn/functions/MIDNIGHT.sql index 7a024dd9c..d40734fcf 100644 --- a/db/routines/vn/functions/MIDNIGHT.sql +++ b/db/routines/vn/functions/MIDNIGHT.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE) RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/addressTaxArea.sql b/db/routines/vn/functions/addressTaxArea.sql index d297862bd..3cad7a55d 100644 --- a/db/routines/vn/functions/addressTaxArea.sql +++ b/db/routines/vn/functions/addressTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/address_getGeo.sql b/db/routines/vn/functions/address_getGeo.sql index 2fbab94e8..04155c30c 100644 --- a/db/routines/vn/functions/address_getGeo.sql +++ b/db/routines/vn/functions/address_getGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/barcodeToItem.sql b/db/routines/vn/functions/barcodeToItem.sql index 4f55dcbc2..14d19fe4e 100644 --- a/db/routines/vn/functions/barcodeToItem.sql +++ b/db/routines/vn/functions/barcodeToItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/buy_getUnitVolume.sql b/db/routines/vn/functions/buy_getUnitVolume.sql index fbf754663..473ea8fc0 100644 --- a/db/routines/vn/functions/buy_getUnitVolume.sql +++ b/db/routines/vn/functions/buy_getUnitVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/buy_getVolume.sql b/db/routines/vn/functions/buy_getVolume.sql index 3add5dd02..55027d7e5 100644 --- a/db/routines/vn/functions/buy_getVolume.sql +++ b/db/routines/vn/functions/buy_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/catalog_componentReverse.sql b/db/routines/vn/functions/catalog_componentReverse.sql index 9dde8300f..c333654da 100644 --- a/db/routines/vn/functions/catalog_componentReverse.sql +++ b/db/routines/vn/functions/catalog_componentReverse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT, +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT, vCost DECIMAL(10,3), vM3 DECIMAL(10,3), vAddressFk INT, diff --git a/db/routines/vn/functions/clientGetMana.sql b/db/routines/vn/functions/clientGetMana.sql index c2f25adf1..4c26ae79b 100644 --- a/db/routines/vn/functions/clientGetMana.sql +++ b/db/routines/vn/functions/clientGetMana.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/clientGetSalesPerson.sql b/db/routines/vn/functions/clientGetSalesPerson.sql index 2db800efc..2502aa196 100644 --- a/db/routines/vn/functions/clientGetSalesPerson.sql +++ b/db/routines/vn/functions/clientGetSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/clientTaxArea.sql b/db/routines/vn/functions/clientTaxArea.sql index 6d16427f7..1c2f776f1 100644 --- a/db/routines/vn/functions/clientTaxArea.sql +++ b/db/routines/vn/functions/clientTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/client_getDebt.sql b/db/routines/vn/functions/client_getDebt.sql index 81b380507..c35e61c30 100644 --- a/db/routines/vn/functions/client_getDebt.sql +++ b/db/routines/vn/functions/client_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE) RETURNS decimal(10,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/client_getFromPhone.sql b/db/routines/vn/functions/client_getFromPhone.sql index 4fe290b6c..3ddf3419c 100644 --- a/db/routines/vn/functions/client_getFromPhone.sql +++ b/db/routines/vn/functions/client_getFromPhone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPerson.sql b/db/routines/vn/functions/client_getSalesPerson.sql index cff2b81cf..d0152e0aa 100644 --- a/db/routines/vn/functions/client_getSalesPerson.sql +++ b/db/routines/vn/functions/client_getSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonByTicket.sql b/db/routines/vn/functions/client_getSalesPersonByTicket.sql index da911a4d3..4c98ac526 100644 --- a/db/routines/vn/functions/client_getSalesPersonByTicket.sql +++ b/db/routines/vn/functions/client_getSalesPersonByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonCode.sql b/db/routines/vn/functions/client_getSalesPersonCode.sql index 39af86e6a..b238f26bf 100644 --- a/db/routines/vn/functions/client_getSalesPersonCode.sql +++ b/db/routines/vn/functions/client_getSalesPersonCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql b/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql index f752fdf26..9e63708f3 100644 --- a/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql +++ b/db/routines/vn/functions/client_getSalesPersonCodeByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/client_hasDifferentCountries.sql b/db/routines/vn/functions/client_hasDifferentCountries.sql index d561f10ca..5f4831069 100644 --- a/db/routines/vn/functions/client_hasDifferentCountries.sql +++ b/db/routines/vn/functions/client_hasDifferentCountries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/collection_isPacked.sql b/db/routines/vn/functions/collection_isPacked.sql index f3da5dd9a..f7d81b4c0 100644 --- a/db/routines/vn/functions/collection_isPacked.sql +++ b/db/routines/vn/functions/collection_isPacked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/currency_getCommission.sql b/db/routines/vn/functions/currency_getCommission.sql index 4053b7794..1b5d51ee6 100644 --- a/db/routines/vn/functions/currency_getCommission.sql +++ b/db/routines/vn/functions/currency_getCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/currentRate.sql b/db/routines/vn/functions/currentRate.sql index 51ef1ee3d..6d18b9613 100644 --- a/db/routines/vn/functions/currentRate.sql +++ b/db/routines/vn/functions/currentRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE) RETURNS decimal(10,4) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/deviceProductionUser_accessGranted.sql b/db/routines/vn/functions/deviceProductionUser_accessGranted.sql index 5f31e9092..b0c5f0e90 100644 --- a/db/routines/vn/functions/deviceProductionUser_accessGranted.sql +++ b/db/routines/vn/functions/deviceProductionUser_accessGranted.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/duaTax_getRate.sql b/db/routines/vn/functions/duaTax_getRate.sql index efc38ba97..ee74a24fe 100644 --- a/db/routines/vn/functions/duaTax_getRate.sql +++ b/db/routines/vn/functions/duaTax_getRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) RETURNS decimal(5,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ekt_getEntry.sql b/db/routines/vn/functions/ekt_getEntry.sql index 37a492195..4e6824682 100644 --- a/db/routines/vn/functions/ekt_getEntry.sql +++ b/db/routines/vn/functions/ekt_getEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ekt_getTravel.sql b/db/routines/vn/functions/ekt_getTravel.sql index 2a7a5299f..a4466eb84 100644 --- a/db/routines/vn/functions/ekt_getTravel.sql +++ b/db/routines/vn/functions/ekt_getTravel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_getCommission.sql b/db/routines/vn/functions/entry_getCommission.sql index 9928aa335..4a19f4e63 100644 --- a/db/routines/vn/functions/entry_getCommission.sql +++ b/db/routines/vn/functions/entry_getCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT, +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT, vCurrencyFk INT, vSupplierFk INT ) diff --git a/db/routines/vn/functions/entry_getCurrency.sql b/db/routines/vn/functions/entry_getCurrency.sql index 9c663ac69..ffde8e029 100644 --- a/db/routines/vn/functions/entry_getCurrency.sql +++ b/db/routines/vn/functions/entry_getCurrency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT, +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT, vSupplierFk INT ) RETURNS int(11) diff --git a/db/routines/vn/functions/entry_getForLogiflora.sql b/db/routines/vn/functions/entry_getForLogiflora.sql index 4c8a33f9f..57e787afa 100644 --- a/db/routines/vn/functions/entry_getForLogiflora.sql +++ b/db/routines/vn/functions/entry_getForLogiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_isIntrastat.sql b/db/routines/vn/functions/entry_isIntrastat.sql index 0051e3435..79eb7fd86 100644 --- a/db/routines/vn/functions/entry_isIntrastat.sql +++ b/db/routines/vn/functions/entry_isIntrastat.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/entry_isInventoryOrPrevious.sql b/db/routines/vn/functions/entry_isInventoryOrPrevious.sql index 563d50622..7779f7288 100644 --- a/db/routines/vn/functions/entry_isInventoryOrPrevious.sql +++ b/db/routines/vn/functions/entry_isInventoryOrPrevious.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/expedition_checkRoute.sql b/db/routines/vn/functions/expedition_checkRoute.sql index 2874e0c7c..ce27ea391 100644 --- a/db/routines/vn/functions/expedition_checkRoute.sql +++ b/db/routines/vn/functions/expedition_checkRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/firstDayOfWeek.sql b/db/routines/vn/functions/firstDayOfWeek.sql index 82aee70f9..d4742771a 100644 --- a/db/routines/vn/functions/firstDayOfWeek.sql +++ b/db/routines/vn/functions/firstDayOfWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/getAlert3State.sql b/db/routines/vn/functions/getAlert3State.sql index 4036dd183..620ac8d01 100644 --- a/db/routines/vn/functions/getAlert3State.sql +++ b/db/routines/vn/functions/getAlert3State.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT) RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getDueDate.sql b/db/routines/vn/functions/getDueDate.sql index b28beefb0..c2793cb06 100644 --- a/db/routines/vn/functions/getDueDate.sql +++ b/db/routines/vn/functions/getDueDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT) RETURNS date NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/functions/getInventoryDate.sql b/db/routines/vn/functions/getInventoryDate.sql index 7c49a6512..9c1a5349f 100644 --- a/db/routines/vn/functions/getInventoryDate.sql +++ b/db/routines/vn/functions/getInventoryDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getInventoryDate`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getInventoryDate`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/getNewItemId.sql b/db/routines/vn/functions/getNewItemId.sql index c6e0dbf2e..24c13e28c 100644 --- a/db/routines/vn/functions/getNewItemId.sql +++ b/db/routines/vn/functions/getNewItemId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getNewItemId`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getNewItemId`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getNextDueDate.sql b/db/routines/vn/functions/getNextDueDate.sql index 811b47931..d0f923d65 100644 --- a/db/routines/vn/functions/getNextDueDate.sql +++ b/db/routines/vn/functions/getNextDueDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) RETURNS date NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/functions/getShipmentHour.sql b/db/routines/vn/functions/getShipmentHour.sql index 29c4db53d..5fdd8db32 100644 --- a/db/routines/vn/functions/getShipmentHour.sql +++ b/db/routines/vn/functions/getShipmentHour.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getSpecialPrice.sql b/db/routines/vn/functions/getSpecialPrice.sql index 9136fbeae..bcb3251f2 100644 --- a/db/routines/vn/functions/getSpecialPrice.sql +++ b/db/routines/vn/functions/getSpecialPrice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11)) RETURNS decimal(10,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getTicketTrolleyLabelCount.sql b/db/routines/vn/functions/getTicketTrolleyLabelCount.sql index 25b3e00e4..8344e1c69 100644 --- a/db/routines/vn/functions/getTicketTrolleyLabelCount.sql +++ b/db/routines/vn/functions/getTicketTrolleyLabelCount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/getUser.sql b/db/routines/vn/functions/getUser.sql index af59ce823..311394b17 100644 --- a/db/routines/vn/functions/getUser.sql +++ b/db/routines/vn/functions/getUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getUser`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getUser`() RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/getUserId.sql b/db/routines/vn/functions/getUserId.sql index cd85c80a3..d68dabc84 100644 --- a/db/routines/vn/functions/getUserId.sql +++ b/db/routines/vn/functions/getUserId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30)) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/hasAnyNegativeBase.sql b/db/routines/vn/functions/hasAnyNegativeBase.sql index 23a6fe3a4..d3ca25858 100644 --- a/db/routines/vn/functions/hasAnyNegativeBase.sql +++ b/db/routines/vn/functions/hasAnyNegativeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasAnyPositiveBase.sql b/db/routines/vn/functions/hasAnyPositiveBase.sql index d8d83cecb..ea7d8f14b 100644 --- a/db/routines/vn/functions/hasAnyPositiveBase.sql +++ b/db/routines/vn/functions/hasAnyPositiveBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasItemsInSector.sql b/db/routines/vn/functions/hasItemsInSector.sql index a9ed794fd..7a5c4cf60 100644 --- a/db/routines/vn/functions/hasItemsInSector.sql +++ b/db/routines/vn/functions/hasItemsInSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/hasSomeNegativeBase.sql b/db/routines/vn/functions/hasSomeNegativeBase.sql index bd3f90f61..af435a6c5 100644 --- a/db/routines/vn/functions/hasSomeNegativeBase.sql +++ b/db/routines/vn/functions/hasSomeNegativeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/intrastat_estimateNet.sql b/db/routines/vn/functions/intrastat_estimateNet.sql index 82500d0e0..645fb6406 100644 --- a/db/routines/vn/functions/intrastat_estimateNet.sql +++ b/db/routines/vn/functions/intrastat_estimateNet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`( vSelf INT, vStems INT ) diff --git a/db/routines/vn/functions/invoiceOutAmount.sql b/db/routines/vn/functions/invoiceOutAmount.sql index ed3dabd04..447c0883e 100644 --- a/db/routines/vn/functions/invoiceOutAmount.sql +++ b/db/routines/vn/functions/invoiceOutAmount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15)) RETURNS decimal(10,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/invoiceOut_getMaxIssued.sql b/db/routines/vn/functions/invoiceOut_getMaxIssued.sql index c4f0e740b..687f82dfc 100644 --- a/db/routines/vn/functions/invoiceOut_getMaxIssued.sql +++ b/db/routines/vn/functions/invoiceOut_getMaxIssued.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2), vCompanyFk INT, vYear INT ) diff --git a/db/routines/vn/functions/invoiceOut_getPath.sql b/db/routines/vn/functions/invoiceOut_getPath.sql index a145ecc37..7e8850e15 100644 --- a/db/routines/vn/functions/invoiceOut_getPath.sql +++ b/db/routines/vn/functions/invoiceOut_getPath.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/invoiceOut_getWeight.sql b/db/routines/vn/functions/invoiceOut_getWeight.sql index 304e33826..3c16191bb 100644 --- a/db/routines/vn/functions/invoiceOut_getWeight.sql +++ b/db/routines/vn/functions/invoiceOut_getWeight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) ) RETURNS decimal(10,2) NOT DETERMINISTIC diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 1e981414d..c491b5bb9 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/invoiceSerialArea.sql b/db/routines/vn/functions/invoiceSerialArea.sql index 7ab58a75b..ac81996b1 100644 --- a/db/routines/vn/functions/invoiceSerialArea.sql +++ b/db/routines/vn/functions/invoiceSerialArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/isLogifloraDay.sql b/db/routines/vn/functions/isLogifloraDay.sql index fb82e4bd3..27e8e7551 100644 --- a/db/routines/vn/functions/isLogifloraDay.sql +++ b/db/routines/vn/functions/isLogifloraDay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemPacking.sql b/db/routines/vn/functions/itemPacking.sql index c6a32e2ab..cc5dfae7a 100644 --- a/db/routines/vn/functions/itemPacking.sql +++ b/db/routines/vn/functions/itemPacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql b/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql index 36017b118..805045021 100644 --- a/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql +++ b/db/routines/vn/functions/itemShelvingPlacementSupply_ClosestGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/itemTag_getIntValue.sql b/db/routines/vn/functions/itemTag_getIntValue.sql index a5aac88bd..3996f71f8 100644 --- a/db/routines/vn/functions/itemTag_getIntValue.sql +++ b/db/routines/vn/functions/itemTag_getIntValue.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getFhImage.sql b/db/routines/vn/functions/item_getFhImage.sql index 87a092139..d5aef592d 100644 --- a/db/routines/vn/functions/item_getFhImage.sql +++ b/db/routines/vn/functions/item_getFhImage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getPackage.sql b/db/routines/vn/functions/item_getPackage.sql index 2c3574deb..88e40399f 100644 --- a/db/routines/vn/functions/item_getPackage.sql +++ b/db/routines/vn/functions/item_getPackage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT) RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/item_getVolume.sql b/db/routines/vn/functions/item_getVolume.sql index a4f58f618..f4156e5a6 100644 --- a/db/routines/vn/functions/item_getVolume.sql +++ b/db/routines/vn/functions/item_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/itemsInSector_get.sql b/db/routines/vn/functions/itemsInSector_get.sql index 530a32cec..254ebe1b5 100644 --- a/db/routines/vn/functions/itemsInSector_get.sql +++ b/db/routines/vn/functions/itemsInSector_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/lastDayOfWeek.sql b/db/routines/vn/functions/lastDayOfWeek.sql index 5cfd32afc..0aba5ab7b 100644 --- a/db/routines/vn/functions/lastDayOfWeek.sql +++ b/db/routines/vn/functions/lastDayOfWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/machine_checkPlate.sql b/db/routines/vn/functions/machine_checkPlate.sql index 4b83c00dd..8660163e4 100644 --- a/db/routines/vn/functions/machine_checkPlate.sql +++ b/db/routines/vn/functions/machine_checkPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10)) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/messageSend.sql b/db/routines/vn/functions/messageSend.sql index f36a6622b..22cca43ec 100644 --- a/db/routines/vn/functions/messageSend.sql +++ b/db/routines/vn/functions/messageSend.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/messageSendWithUser.sql b/db/routines/vn/functions/messageSendWithUser.sql index a4ba96909..f8bfde2e4 100644 --- a/db/routines/vn/functions/messageSendWithUser.sql +++ b/db/routines/vn/functions/messageSendWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/orderTotalVolume.sql b/db/routines/vn/functions/orderTotalVolume.sql index 76c6b5764..7962a9a73 100644 --- a/db/routines/vn/functions/orderTotalVolume.sql +++ b/db/routines/vn/functions/orderTotalVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/orderTotalVolumeBoxes.sql b/db/routines/vn/functions/orderTotalVolumeBoxes.sql index 935cea615..3474534c4 100644 --- a/db/routines/vn/functions/orderTotalVolumeBoxes.sql +++ b/db/routines/vn/functions/orderTotalVolumeBoxes.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/packaging_calculate.sql b/db/routines/vn/functions/packaging_calculate.sql index ede0e2521..01ec8b843 100644 --- a/db/routines/vn/functions/packaging_calculate.sql +++ b/db/routines/vn/functions/packaging_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1), +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1), packagingReturnFk INT(11), base DECIMAL(10,2), price DECIMAL(10,2), diff --git a/db/routines/vn/functions/priceFixed_getRate2.sql b/db/routines/vn/functions/priceFixed_getRate2.sql index 748d0ec8d..61e5abe9b 100644 --- a/db/routines/vn/functions/priceFixed_getRate2.sql +++ b/db/routines/vn/functions/priceFixed_getRate2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) RETURNS double NOT DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/routeProposal.sql b/db/routines/vn/functions/routeProposal.sql index ed8f081be..14b626a39 100644 --- a/db/routines/vn/functions/routeProposal.sql +++ b/db/routines/vn/functions/routeProposal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/routeProposal_.sql b/db/routines/vn/functions/routeProposal_.sql index e06dd617e..a307d8fc0 100644 --- a/db/routines/vn/functions/routeProposal_.sql +++ b/db/routines/vn/functions/routeProposal_.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/routeProposal_beta.sql b/db/routines/vn/functions/routeProposal_beta.sql index b25144c46..d6db4d361 100644 --- a/db/routines/vn/functions/routeProposal_beta.sql +++ b/db/routines/vn/functions/routeProposal_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/sale_hasComponentLack.sql b/db/routines/vn/functions/sale_hasComponentLack.sql index 7905de674..a7ccfeec6 100644 --- a/db/routines/vn/functions/sale_hasComponentLack.sql +++ b/db/routines/vn/functions/sale_hasComponentLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`( vSelf INT )RETURNS tinyint(1) READS SQL DATA diff --git a/db/routines/vn/functions/specie_IsForbidden.sql b/db/routines/vn/functions/specie_IsForbidden.sql index 3ccb22844..a8ed12a50 100644 --- a/db/routines/vn/functions/specie_IsForbidden.sql +++ b/db/routines/vn/functions/specie_IsForbidden.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/testCIF.sql b/db/routines/vn/functions/testCIF.sql index 015fce534..f6acd8fb9 100644 --- a/db/routines/vn/functions/testCIF.sql +++ b/db/routines/vn/functions/testCIF.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testCIF`(vCIF VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`testCIF`(vCIF VARCHAR(9)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/testNIE.sql b/db/routines/vn/functions/testNIE.sql index 5b80435f5..fdc371233 100644 --- a/db/routines/vn/functions/testNIE.sql +++ b/db/routines/vn/functions/testNIE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testNIE`(vNIE VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`testNIE`(vNIE VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/testNIF.sql b/db/routines/vn/functions/testNIF.sql index 07fa79f37..59e59a456 100644 --- a/db/routines/vn/functions/testNIF.sql +++ b/db/routines/vn/functions/testNIF.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`testNIF`(vNIF VARCHAR(9)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`testNIF`(vNIF VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketCollection_getNoPacked.sql b/db/routines/vn/functions/ticketCollection_getNoPacked.sql index 71770bbd3..10065faf5 100644 --- a/db/routines/vn/functions/ticketCollection_getNoPacked.sql +++ b/db/routines/vn/functions/ticketCollection_getNoPacked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketCollection_getNoPacked`(vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketCollection_getNoPacked`(vCollectionFk INT) RETURNS varchar(100) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketGetTotal.sql b/db/routines/vn/functions/ticketGetTotal.sql index 25db7e4f0..a45cbbec8 100644 --- a/db/routines/vn/functions/ticketGetTotal.sql +++ b/db/routines/vn/functions/ticketGetTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketGetTotal`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketGetTotal`(vTicketId INT) RETURNS decimal(10,2) DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketPositionInPath.sql b/db/routines/vn/functions/ticketPositionInPath.sql index f6a3125b2..c7a6b9094 100644 --- a/db/routines/vn/functions/ticketPositionInPath.sql +++ b/db/routines/vn/functions/ticketPositionInPath.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketPositionInPath`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketPositionInPath`(vTicketId INT) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketSplitCounter.sql b/db/routines/vn/functions/ticketSplitCounter.sql index 1d468ed9e..eb1058a57 100644 --- a/db/routines/vn/functions/ticketSplitCounter.sql +++ b/db/routines/vn/functions/ticketSplitCounter.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketSplitCounter`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketSplitCounter`(vTicketFk INT) RETURNS varchar(15) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketTotalVolume.sql b/db/routines/vn/functions/ticketTotalVolume.sql index 4a1a0e73c..1fe9b3d39 100644 --- a/db/routines/vn/functions/ticketTotalVolume.sql +++ b/db/routines/vn/functions/ticketTotalVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketTotalVolume`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketTotalVolume`(vTicketId INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticketTotalVolumeBoxes.sql b/db/routines/vn/functions/ticketTotalVolumeBoxes.sql index 81de6f041..1fec10977 100644 --- a/db/routines/vn/functions/ticketTotalVolumeBoxes.sql +++ b/db/routines/vn/functions/ticketTotalVolumeBoxes.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketTotalVolumeBoxes`(vTicketId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketTotalVolumeBoxes`(vTicketId INT) RETURNS decimal(10,1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticketWarehouseGet.sql b/db/routines/vn/functions/ticketWarehouseGet.sql index d95e0620b..b1c7b9bc2 100644 --- a/db/routines/vn/functions/ticketWarehouseGet.sql +++ b/db/routines/vn/functions/ticketWarehouseGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticketWarehouseGet`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketWarehouseGet`(vTicketFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_CC_volume.sql b/db/routines/vn/functions/ticket_CC_volume.sql index 515787a7d..f0c65931b 100644 --- a/db/routines/vn/functions/ticket_CC_volume.sql +++ b/db/routines/vn/functions/ticket_CC_volume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_CC_volume`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_CC_volume`(vTicketFk INT) RETURNS decimal(10,1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_HasUbication.sql b/db/routines/vn/functions/ticket_HasUbication.sql index 1d24f01f3..7559cf360 100644 --- a/db/routines/vn/functions/ticket_HasUbication.sql +++ b/db/routines/vn/functions/ticket_HasUbication.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_HasUbication`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_HasUbication`(vTicketFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_get.sql b/db/routines/vn/functions/ticket_get.sql index 3897ed81c..ac8d0c642 100644 --- a/db/routines/vn/functions/ticket_get.sql +++ b/db/routines/vn/functions/ticket_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_get`(vParamFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_get`(vParamFk INT) RETURNS INT(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_getFreightCost.sql b/db/routines/vn/functions/ticket_getFreightCost.sql index dd265ee05..c5ddf561d 100644 --- a/db/routines/vn/functions/ticket_getFreightCost.sql +++ b/db/routines/vn/functions/ticket_getFreightCost.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_getFreightCost`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_getFreightCost`(vTicketFk INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticket_getWeight.sql b/db/routines/vn/functions/ticket_getWeight.sql index a83ee372f..d0298d63f 100644 --- a/db/routines/vn/functions/ticket_getWeight.sql +++ b/db/routines/vn/functions/ticket_getWeight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_getWeight`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_getWeight`(vTicketFk INT) RETURNS decimal(10,3) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/ticket_isOutClosureZone.sql b/db/routines/vn/functions/ticket_isOutClosureZone.sql index 61f617f52..fcd7de858 100644 --- a/db/routines/vn/functions/ticket_isOutClosureZone.sql +++ b/db/routines/vn/functions/ticket_isOutClosureZone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isOutClosureZone`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_isOutClosureZone`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql b/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql index 6c2b75714..aa821a8e5 100644 --- a/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql +++ b/db/routines/vn/functions/ticket_isProblemCalcNeeded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isProblemCalcNeeded`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_isProblemCalcNeeded`( vSelf INT ) RETURNS BOOL diff --git a/db/routines/vn/functions/ticket_isTooLittle.sql b/db/routines/vn/functions/ticket_isTooLittle.sql index 86d7606e0..5432e8477 100644 --- a/db/routines/vn/functions/ticket_isTooLittle.sql +++ b/db/routines/vn/functions/ticket_isTooLittle.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`( vSelf INT ) RETURNS tinyint(1) diff --git a/db/routines/vn/functions/till_new.sql b/db/routines/vn/functions/till_new.sql index 095f2cd8f..2b235a91d 100644 --- a/db/routines/vn/functions/till_new.sql +++ b/db/routines/vn/functions/till_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`till_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`till_new`( vClient INT, vBank INT, vAmount DOUBLE, diff --git a/db/routines/vn/functions/timeWorkerControl_getDirection.sql b/db/routines/vn/functions/timeWorkerControl_getDirection.sql index a631636ea..c0f1e67ea 100644 --- a/db/routines/vn/functions/timeWorkerControl_getDirection.sql +++ b/db/routines/vn/functions/timeWorkerControl_getDirection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/time_getSalesYear.sql b/db/routines/vn/functions/time_getSalesYear.sql index fcef5a1ae..d9022890d 100644 --- a/db/routines/vn/functions/time_getSalesYear.sql +++ b/db/routines/vn/functions/time_getSalesYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`time_getSalesYear`(vMonth INT, vYear INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`time_getSalesYear`(vMonth INT, vYear INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/travel_getForLogiflora.sql b/db/routines/vn/functions/travel_getForLogiflora.sql index 0bf6f2425..39c3086b7 100644 --- a/db/routines/vn/functions/travel_getForLogiflora.sql +++ b/db/routines/vn/functions/travel_getForLogiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/travel_hasUniqueAwb.sql b/db/routines/vn/functions/travel_hasUniqueAwb.sql index 9fbfcb2d1..d98986753 100644 --- a/db/routines/vn/functions/travel_hasUniqueAwb.sql +++ b/db/routines/vn/functions/travel_hasUniqueAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`travel_hasUniqueAwb`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`travel_hasUniqueAwb`( vSelf INT ) RETURNS BOOL diff --git a/db/routines/vn/functions/validationCode.sql b/db/routines/vn/functions/validationCode.sql index 1f19af0c1..ab0acedaa 100644 --- a/db/routines/vn/functions/validationCode.sql +++ b/db/routines/vn/functions/validationCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`validationCode`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`validationCode`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/validationCode_beta.sql b/db/routines/vn/functions/validationCode_beta.sql index 5f09ea637..afeb1273a 100644 --- a/db/routines/vn/functions/validationCode_beta.sql +++ b/db/routines/vn/functions/validationCode_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`validationCode_beta`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`validationCode_beta`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/workerMachinery_isRegistered.sql b/db/routines/vn/functions/workerMachinery_isRegistered.sql index 72263ef4e..60f458e9e 100644 --- a/db/routines/vn/functions/workerMachinery_isRegistered.sql +++ b/db/routines/vn/functions/workerMachinery_isRegistered.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/workerNigthlyHours_calculate.sql b/db/routines/vn/functions/workerNigthlyHours_calculate.sql index a5d990e90..1b4835712 100644 --- a/db/routines/vn/functions/workerNigthlyHours_calculate.sql +++ b/db/routines/vn/functions/workerNigthlyHours_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) RETURNS decimal(5,2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/worker_getCode.sql b/db/routines/vn/functions/worker_getCode.sql index cc8d1e916..76ec94d1b 100644 --- a/db/routines/vn/functions/worker_getCode.sql +++ b/db/routines/vn/functions/worker_getCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_getCode`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`worker_getCode`() RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/worker_isBoss.sql b/db/routines/vn/functions/worker_isBoss.sql index 9a9e1a091..8ab3a1fa9 100644 --- a/db/routines/vn/functions/worker_isBoss.sql +++ b/db/routines/vn/functions/worker_isBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isBoss`(vUserId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`worker_isBoss`(vUserId INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/worker_isInDepartment.sql b/db/routines/vn/functions/worker_isInDepartment.sql index 55802f355..6f6146d0b 100644 --- a/db/routines/vn/functions/worker_isInDepartment.sql +++ b/db/routines/vn/functions/worker_isInDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isInDepartment`(vDepartmentCode VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`worker_isInDepartment`(vDepartmentCode VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/vn/functions/worker_isWorking.sql b/db/routines/vn/functions/worker_isWorking.sql index 788587d30..455b78805 100644 --- a/db/routines/vn/functions/worker_isWorking.sql +++ b/db/routines/vn/functions/worker_isWorking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_isWorking`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`worker_isWorking`(vWorkerFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/vn/functions/zoneGeo_new.sql b/db/routines/vn/functions/zoneGeo_new.sql index 5af1e5f55..47ec3dec7 100644 --- a/db/routines/vn/functions/zoneGeo_new.sql +++ b/db/routines/vn/functions/zoneGeo_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) RETURNS int(11) NOT DETERMINISTIC NO SQL diff --git a/db/routines/vn/procedures/XDiario_check.sql b/db/routines/vn/procedures/XDiario_check.sql index 00bc9dc58..a8f33adde 100644 --- a/db/routines/vn/procedures/XDiario_check.sql +++ b/db/routines/vn/procedures/XDiario_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`XDiario_check`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`XDiario_check`() BEGIN /** * Realiza la revisión diaria de los asientos contables, diff --git a/db/routines/vn/procedures/XDiario_checkDate.sql b/db/routines/vn/procedures/XDiario_checkDate.sql index f21773a0d..8b961a1fa 100644 --- a/db/routines/vn/procedures/XDiario_checkDate.sql +++ b/db/routines/vn/procedures/XDiario_checkDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`XDiario_checkDate`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`XDiario_checkDate`(vDate DATE) proc: BEGIN /** * Comprueba si la fecha pasada esta en el rango diff --git a/db/routines/vn/procedures/absoluteInventoryHistory.sql b/db/routines/vn/procedures/absoluteInventoryHistory.sql index 529bd39b0..d2a2029f0 100644 --- a/db/routines/vn/procedures/absoluteInventoryHistory.sql +++ b/db/routines/vn/procedures/absoluteInventoryHistory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`absoluteInventoryHistory`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`absoluteInventoryHistory`( vItemFk INT, vWarehouseFk INT, vDate DATETIME diff --git a/db/routines/vn/procedures/addAccountReconciliation.sql b/db/routines/vn/procedures/addAccountReconciliation.sql index 7ae558462..1aa3c28fd 100644 --- a/db/routines/vn/procedures/addAccountReconciliation.sql +++ b/db/routines/vn/procedures/addAccountReconciliation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addAccountReconciliation`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`addAccountReconciliation`() BEGIN /** * Updates duplicate records in the accountReconciliation table, diff --git a/db/routines/vn/procedures/addNoteFromDelivery.sql b/db/routines/vn/procedures/addNoteFromDelivery.sql index ef8d1c981..57b7bef24 100644 --- a/db/routines/vn/procedures/addNoteFromDelivery.sql +++ b/db/routines/vn/procedures/addNoteFromDelivery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT) BEGIN DECLARE observationTypeFk INT DEFAULT 3; /*3 = REPARTIDOR*/ diff --git a/db/routines/vn/procedures/addressTaxArea.sql b/db/routines/vn/procedures/addressTaxArea.sql index fb705f84e..a1bb0dec0 100644 --- a/db/routines/vn/procedures/addressTaxArea.sql +++ b/db/routines/vn/procedures/addressTaxArea.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`addressTaxArea`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`addressTaxArea`() READS SQL DATA BEGIN /** diff --git a/db/routines/vn/procedures/address_updateCoordinates.sql b/db/routines/vn/procedures/address_updateCoordinates.sql index e3455996b..5d9cd085e 100644 --- a/db/routines/vn/procedures/address_updateCoordinates.sql +++ b/db/routines/vn/procedures/address_updateCoordinates.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`( vTicketFk INT, vLongitude INT, vLatitude INT) diff --git a/db/routines/vn/procedures/agencyHourGetFirstShipped.sql b/db/routines/vn/procedures/agencyHourGetFirstShipped.sql index 487e37de0..dc584d0f9 100644 --- a/db/routines/vn/procedures/agencyHourGetFirstShipped.sql +++ b/db/routines/vn/procedures/agencyHourGetFirstShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetFirstShipped diff --git a/db/routines/vn/procedures/agencyHourGetLanded.sql b/db/routines/vn/procedures/agencyHourGetLanded.sql index 8c1ef1b27..6e766d739 100644 --- a/db/routines/vn/procedures/agencyHourGetLanded.sql +++ b/db/routines/vn/procedures/agencyHourGetLanded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetLanded diff --git a/db/routines/vn/procedures/agencyHourGetWarehouse.sql b/db/routines/vn/procedures/agencyHourGetWarehouse.sql index 10afec1c7..0e27e4437 100644 --- a/db/routines/vn/procedures/agencyHourGetWarehouse.sql +++ b/db/routines/vn/procedures/agencyHourGetWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetWarehouse diff --git a/db/routines/vn/procedures/agencyHourListGetShipped.sql b/db/routines/vn/procedures/agencyHourListGetShipped.sql index 71ba13945..3a0b0db65 100644 --- a/db/routines/vn/procedures/agencyHourListGetShipped.sql +++ b/db/routines/vn/procedures/agencyHourListGetShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) BEGIN /* * DEPRECATED usar zoneGetShipped */ diff --git a/db/routines/vn/procedures/agencyVolume.sql b/db/routines/vn/procedures/agencyVolume.sql index 6565428df..451b089fc 100644 --- a/db/routines/vn/procedures/agencyVolume.sql +++ b/db/routines/vn/procedures/agencyVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`agencyVolume`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`agencyVolume`() BEGIN /** * Calculates and presents information on shipment and packaging volumes diff --git a/db/routines/vn/procedures/available_calc.sql b/db/routines/vn/procedures/available_calc.sql index 41fec27f0..ddfba8bad 100644 --- a/db/routines/vn/procedures/available_calc.sql +++ b/db/routines/vn/procedures/available_calc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`available_calc`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`available_calc`( vDate DATE, vAddress INT, vAgencyMode INT) diff --git a/db/routines/vn/procedures/available_traslate.sql b/db/routines/vn/procedures/available_traslate.sql index e357dcf42..70fa37d32 100644 --- a/db/routines/vn/procedures/available_traslate.sql +++ b/db/routines/vn/procedures/available_traslate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`available_traslate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`available_traslate`( vWarehouseLanding INT, vDated DATE, vWarehouseShipment INT) diff --git a/db/routines/vn/procedures/balanceNestTree_addChild.sql b/db/routines/vn/procedures/balanceNestTree_addChild.sql index 6911efcec..2bf4157c4 100644 --- a/db/routines/vn/procedures/balanceNestTree_addChild.sql +++ b/db/routines/vn/procedures/balanceNestTree_addChild.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_addChild`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`balanceNestTree_addChild`( vSelf INT, vName VARCHAR(45) ) diff --git a/db/routines/vn/procedures/balanceNestTree_delete.sql b/db/routines/vn/procedures/balanceNestTree_delete.sql index 6b424b24f..bb0b83bf5 100644 --- a/db/routines/vn/procedures/balanceNestTree_delete.sql +++ b/db/routines/vn/procedures/balanceNestTree_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_delete`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`balanceNestTree_delete`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/balanceNestTree_move.sql b/db/routines/vn/procedures/balanceNestTree_move.sql index 060f01c49..a05a618b7 100644 --- a/db/routines/vn/procedures/balanceNestTree_move.sql +++ b/db/routines/vn/procedures/balanceNestTree_move.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balanceNestTree_move`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`balanceNestTree_move`( vSelf INT, vFather INT ) diff --git a/db/routines/vn/procedures/balance_create.sql b/db/routines/vn/procedures/balance_create.sql index 13bb7d6e1..6363b4c00 100644 --- a/db/routines/vn/procedures/balance_create.sql +++ b/db/routines/vn/procedures/balance_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`balance_create`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`balance_create`( vStartingMonth INT, vEndingMonth INT, vCompany INT, diff --git a/db/routines/vn/procedures/bankEntity_checkBic.sql b/db/routines/vn/procedures/bankEntity_checkBic.sql index 8752948b1..069c2a0d7 100644 --- a/db/routines/vn/procedures/bankEntity_checkBic.sql +++ b/db/routines/vn/procedures/bankEntity_checkBic.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`bankEntity_checkBic`(vBic VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`bankEntity_checkBic`(vBic VARCHAR(255)) BEGIN /** * If the bic length is Incorrect throw exception diff --git a/db/routines/vn/procedures/bankPolicy_notifyExpired.sql b/db/routines/vn/procedures/bankPolicy_notifyExpired.sql index 405d19a26..cdcd212f3 100644 --- a/db/routines/vn/procedures/bankPolicy_notifyExpired.sql +++ b/db/routines/vn/procedures/bankPolicy_notifyExpired.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`bankPolicy_notifyExpired`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`bankPolicy_notifyExpired`() BEGIN /** * diff --git a/db/routines/vn/procedures/buyUltimate.sql b/db/routines/vn/procedures/buyUltimate.sql index 8a19b5d2d..1ed8fd93c 100644 --- a/db/routines/vn/procedures/buyUltimate.sql +++ b/db/routines/vn/procedures/buyUltimate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buyUltimate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buyUltimate`( vWarehouseFk SMALLINT, vDated DATE ) diff --git a/db/routines/vn/procedures/buyUltimateFromInterval.sql b/db/routines/vn/procedures/buyUltimateFromInterval.sql index 9685ee28d..fd95bd5f7 100644 --- a/db/routines/vn/procedures/buyUltimateFromInterval.sql +++ b/db/routines/vn/procedures/buyUltimateFromInterval.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buyUltimateFromInterval`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buyUltimateFromInterval`( vWarehouseFk SMALLINT, vStarted DATE, vEnded DATE diff --git a/db/routines/vn/procedures/buy_afterUpsert.sql b/db/routines/vn/procedures/buy_afterUpsert.sql index 031e39159..7ff7dd841 100644 --- a/db/routines/vn/procedures/buy_afterUpsert.sql +++ b/db/routines/vn/procedures/buy_afterUpsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/buy_checkGrouping.sql b/db/routines/vn/procedures/buy_checkGrouping.sql index 365fb9477..7d2830ab2 100644 --- a/db/routines/vn/procedures/buy_checkGrouping.sql +++ b/db/routines/vn/procedures/buy_checkGrouping.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT) BEGIN /** * Checks the buy grouping, throws an error if it's invalid. diff --git a/db/routines/vn/procedures/buy_chekItem.sql b/db/routines/vn/procedures/buy_chekItem.sql index 7777f2fd8..e9e9336b7 100644 --- a/db/routines/vn/procedures/buy_chekItem.sql +++ b/db/routines/vn/procedures/buy_chekItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_checkItem`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_checkItem`() BEGIN /** * Checks if the item has weightByPiece or size null on any buy. diff --git a/db/routines/vn/procedures/buy_clone.sql b/db/routines/vn/procedures/buy_clone.sql index 8a309c0cf..888531746 100644 --- a/db/routines/vn/procedures/buy_clone.sql +++ b/db/routines/vn/procedures/buy_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_clone`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_clone`(vEntryFk INT) BEGIN /** * Clone buys to an entry diff --git a/db/routines/vn/procedures/buy_getSplit.sql b/db/routines/vn/procedures/buy_getSplit.sql index fbf702357..087a4de4d 100644 --- a/db/routines/vn/procedures/buy_getSplit.sql +++ b/db/routines/vn/procedures/buy_getSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getSplit`(vSelf INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getSplit`(vSelf INT, vDated DATE) BEGIN /** * Devuelve tantos registros como etiquetas se necesitan para cada uno de los cubos o cajas de diff --git a/db/routines/vn/procedures/buy_getVolume.sql b/db/routines/vn/procedures/buy_getVolume.sql index ff0e9f9a7..227bfac3c 100644 --- a/db/routines/vn/procedures/buy_getVolume.sql +++ b/db/routines/vn/procedures/buy_getVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolume`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getVolume`() BEGIN /** * Cálculo de volumen en líneas de compra diff --git a/db/routines/vn/procedures/buy_getVolumeByAgency.sql b/db/routines/vn/procedures/buy_getVolumeByAgency.sql index c90962adc..7393d12d8 100644 --- a/db/routines/vn/procedures/buy_getVolumeByAgency.sql +++ b/db/routines/vn/procedures/buy_getVolumeByAgency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; diff --git a/db/routines/vn/procedures/buy_getVolumeByEntry.sql b/db/routines/vn/procedures/buy_getVolumeByEntry.sql index b7fb6f59d..436a49654 100644 --- a/db/routines/vn/procedures/buy_getVolumeByEntry.sql +++ b/db/routines/vn/procedures/buy_getVolumeByEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_getVolumeByEntry`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getVolumeByEntry`(vEntryFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index b43328220..d610a7f09 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() BEGIN /** * Recalcula los precios para las compras insertadas en tmp.buyRecalc diff --git a/db/routines/vn/procedures/buy_recalcPricesByAwb.sql b/db/routines/vn/procedures/buy_recalcPricesByAwb.sql index 05b602840..fafc4763e 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByAwb.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByAwb`(IN awbFk varchar(18)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByAwb`(IN awbFk varchar(18)) BEGIN /** * inserta en tmp.buyRecalc las compras de un awb diff --git a/db/routines/vn/procedures/buy_recalcPricesByBuy.sql b/db/routines/vn/procedures/buy_recalcPricesByBuy.sql index aae7cf37b..0801a9bea 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByBuy.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`( vBuyFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/buy_recalcPricesByEntry.sql b/db/routines/vn/procedures/buy_recalcPricesByEntry.sql index d0694cf58..e13548680 100644 --- a/db/routines/vn/procedures/buy_recalcPricesByEntry.sql +++ b/db/routines/vn/procedures/buy_recalcPricesByEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`( vEntryFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/buy_scan.sql b/db/routines/vn/procedures/buy_scan.sql index fa6097ff0..e0c7c52de 100644 --- a/db/routines/vn/procedures/buy_scan.sql +++ b/db/routines/vn/procedures/buy_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_scan`(vBarcode VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca compras a partir de un código de barras de subasta, las marca como diff --git a/db/routines/vn/procedures/buy_updateGrouping.sql b/db/routines/vn/procedures/buy_updateGrouping.sql index c7f7ed9e6..623d4c1f6 100644 --- a/db/routines/vn/procedures/buy_updateGrouping.sql +++ b/db/routines/vn/procedures/buy_updateGrouping.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT) BEGIN /** * Actualiza el grouping de las últimas compras de un artículo diff --git a/db/routines/vn/procedures/buy_updatePacking.sql b/db/routines/vn/procedures/buy_updatePacking.sql index 2d4bc45e2..e5667d869 100644 --- a/db/routines/vn/procedures/buy_updatePacking.sql +++ b/db/routines/vn/procedures/buy_updatePacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing diff --git a/db/routines/vn/procedures/catalog_calcFromItem.sql b/db/routines/vn/procedures/catalog_calcFromItem.sql index 617a311e2..528cf0403 100644 --- a/db/routines/vn/procedures/catalog_calcFromItem.sql +++ b/db/routines/vn/procedures/catalog_calcFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_calcFromItem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_calcFromItem`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/catalog_calculate.sql b/db/routines/vn/procedures/catalog_calculate.sql index a99d55671..3740044e9 100644 --- a/db/routines/vn/procedures/catalog_calculate.sql +++ b/db/routines/vn/procedures/catalog_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_calculate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_calculate`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/catalog_componentCalculate.sql b/db/routines/vn/procedures/catalog_componentCalculate.sql index 4cc9e9cee..7ac383e8f 100644 --- a/db/routines/vn/procedures/catalog_componentCalculate.sql +++ b/db/routines/vn/procedures/catalog_componentCalculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentCalculate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_componentCalculate`( vZoneFk INT, vAddressFk INT, vShipped DATE, diff --git a/db/routines/vn/procedures/catalog_componentPrepare.sql b/db/routines/vn/procedures/catalog_componentPrepare.sql index 85fafcdd2..b16baf1c2 100644 --- a/db/routines/vn/procedures/catalog_componentPrepare.sql +++ b/db/routines/vn/procedures/catalog_componentPrepare.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentPrepare`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_componentPrepare`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent; diff --git a/db/routines/vn/procedures/catalog_componentPurge.sql b/db/routines/vn/procedures/catalog_componentPurge.sql index ea23b38ba..448396a16 100644 --- a/db/routines/vn/procedures/catalog_componentPurge.sql +++ b/db/routines/vn/procedures/catalog_componentPurge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`catalog_componentPurge`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_componentPurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketComponentPrice, diff --git a/db/routines/vn/procedures/claimRatio_add.sql b/db/routines/vn/procedures/claimRatio_add.sql index 7daf3c8eb..8c3213644 100644 --- a/db/routines/vn/procedures/claimRatio_add.sql +++ b/db/routines/vn/procedures/claimRatio_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`claimRatio_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`claimRatio_add`() BEGIN /* * Añade a la tabla greuges todos los cargos necesario y diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index f3d6a12a6..97cc3ef2a 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clean`() BEGIN /** * Purges outdated data to optimize performance. diff --git a/db/routines/vn/procedures/clean_logiflora.sql b/db/routines/vn/procedures/clean_logiflora.sql index 56f0d8317..fd645a158 100644 --- a/db/routines/vn/procedures/clean_logiflora.sql +++ b/db/routines/vn/procedures/clean_logiflora.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clean_logiflora`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clean_logiflora`() BEGIN /** * Elimina las compras y los artículos residuales de logiflora. diff --git a/db/routines/vn/procedures/clearShelvingList.sql b/db/routines/vn/procedures/clearShelvingList.sql index 03c6e3fc2..1ba726e85 100644 --- a/db/routines/vn/procedures/clearShelvingList.sql +++ b/db/routines/vn/procedures/clearShelvingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clearShelvingList`(vShelvingFk VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clearShelvingList`(vShelvingFk VARCHAR(8)) BEGIN UPDATE vn.itemShelving SET visible = 0 diff --git a/db/routines/vn/procedures/clientDebtSpray.sql b/db/routines/vn/procedures/clientDebtSpray.sql index 1fc490cec..5248432fe 100644 --- a/db/routines/vn/procedures/clientDebtSpray.sql +++ b/db/routines/vn/procedures/clientDebtSpray.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientDebtSpray`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientDebtSpray`(vClientFk INT) BEGIN /* Reparte el saldo de un cliente en greuge en la cartera que corresponde, y desasigna el comercial diff --git a/db/routines/vn/procedures/clientFreeze.sql b/db/routines/vn/procedures/clientFreeze.sql index eae5ebe2b..727311174 100644 --- a/db/routines/vn/procedures/clientFreeze.sql +++ b/db/routines/vn/procedures/clientFreeze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientFreeze`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientFreeze`() BEGIN /** * Congela diariamente aquellos clientes que son morosos sin recobro, diff --git a/db/routines/vn/procedures/clientGetDebtDiary.sql b/db/routines/vn/procedures/clientGetDebtDiary.sql index 2a7d29105..c4a52ab74 100644 --- a/db/routines/vn/procedures/clientGetDebtDiary.sql +++ b/db/routines/vn/procedures/clientGetDebtDiary.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) BEGIN /** * Devuelve el registro de deuda diff --git a/db/routines/vn/procedures/clientGreugeSpray.sql b/db/routines/vn/procedures/clientGreugeSpray.sql index 581eae9ea..2007d13a5 100644 --- a/db/routines/vn/procedures/clientGreugeSpray.sql +++ b/db/routines/vn/procedures/clientGreugeSpray.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) BEGIN DECLARE vGreuge DECIMAL(10,2); diff --git a/db/routines/vn/procedures/clientPackagingOverstock.sql b/db/routines/vn/procedures/clientPackagingOverstock.sql index 9f4213f2d..901236bf8 100644 --- a/db/routines/vn/procedures/clientPackagingOverstock.sql +++ b/db/routines/vn/procedures/clientPackagingOverstock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientPackagingOverstock`(vClientFk INT, vGraceDays INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientPackagingOverstock`(vClientFk INT, vGraceDays INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.clientPackagingOverstock; CREATE TEMPORARY TABLE tmp.clientPackagingOverstock diff --git a/db/routines/vn/procedures/clientPackagingOverstockReturn.sql b/db/routines/vn/procedures/clientPackagingOverstockReturn.sql index efb3e600f..a05e11d1b 100644 --- a/db/routines/vn/procedures/clientPackagingOverstockReturn.sql +++ b/db/routines/vn/procedures/clientPackagingOverstockReturn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) BEGIN DECLARE vNewTicket INT DEFAULT 0; DECLARE vWarehouseFk INT; diff --git a/db/routines/vn/procedures/clientRemoveWorker.sql b/db/routines/vn/procedures/clientRemoveWorker.sql index e4620ecb9..e2a6b8013 100644 --- a/db/routines/vn/procedures/clientRemoveWorker.sql +++ b/db/routines/vn/procedures/clientRemoveWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientRemoveWorker`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientRemoveWorker`() BEGIN DECLARE vDone BOOL DEFAULT FALSE; DECLARE vClientFk INT; diff --git a/db/routines/vn/procedures/clientRisk_update.sql b/db/routines/vn/procedures/clientRisk_update.sql index 596dc0794..2a7644b30 100644 --- a/db/routines/vn/procedures/clientRisk_update.sql +++ b/db/routines/vn/procedures/clientRisk_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) BEGIN IF vAmount IS NOT NULL THEN diff --git a/db/routines/vn/procedures/client_RandomList.sql b/db/routines/vn/procedures/client_RandomList.sql index 83f5967e2..92b460522 100644 --- a/db/routines/vn/procedures/client_RandomList.sql +++ b/db/routines/vn/procedures/client_RandomList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_RandomList`(vNumber INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_RandomList`(vNumber INT) BEGIN DECLARE i INT DEFAULT 0; diff --git a/db/routines/vn/procedures/client_checkBalance.sql b/db/routines/vn/procedures/client_checkBalance.sql index 41ecf9605..c5ea717a2 100644 --- a/db/routines/vn/procedures/client_checkBalance.sql +++ b/db/routines/vn/procedures/client_checkBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros clientes con diff --git a/db/routines/vn/procedures/client_create.sql b/db/routines/vn/procedures/client_create.sql index d99d7847e..3df3df905 100644 --- a/db/routines/vn/procedures/client_create.sql +++ b/db/routines/vn/procedures/client_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_create`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_create`( vFirstname VARCHAR(50), vSurnames VARCHAR(50), vFi VARCHAR(9), diff --git a/db/routines/vn/procedures/client_getDebt.sql b/db/routines/vn/procedures/client_getDebt.sql index 37f30f4b2..e5726f2c1 100644 --- a/db/routines/vn/procedures/client_getDebt.sql +++ b/db/routines/vn/procedures/client_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getDebt`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_getDebt`(vDate DATE) BEGIN /** * Calculates the risk for active clients diff --git a/db/routines/vn/procedures/client_getMana.sql b/db/routines/vn/procedures/client_getMana.sql index fc642b140..7b5e01e38 100644 --- a/db/routines/vn/procedures/client_getMana.sql +++ b/db/routines/vn/procedures/client_getMana.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getMana`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_getMana`() BEGIN /** * Devuelve el mana de los clientes de la tabla tmp.client(id) diff --git a/db/routines/vn/procedures/client_getRisk.sql b/db/routines/vn/procedures/client_getRisk.sql index 3881b74d0..afe34a5e1 100644 --- a/db/routines/vn/procedures/client_getRisk.sql +++ b/db/routines/vn/procedures/client_getRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_getRisk`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_getRisk`( vDate DATE ) BEGIN diff --git a/db/routines/vn/procedures/client_unassignSalesPerson.sql b/db/routines/vn/procedures/client_unassignSalesPerson.sql index e0119d4d5..720a94722 100644 --- a/db/routines/vn/procedures/client_unassignSalesPerson.sql +++ b/db/routines/vn/procedures/client_unassignSalesPerson.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_unassignSalesPerson`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_unassignSalesPerson`() BEGIN /** * Elimina la asignación de salesPersonFk de la ficha del clientes diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql index 0563d5a18..07970ca48 100644 --- a/db/routines/vn/procedures/client_userDisable.sql +++ b/db/routines/vn/procedures/client_userDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`client_userDisable`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`client_userDisable`() BEGIN /** * Desactiva los clientes inactivos en los últimos X meses. diff --git a/db/routines/vn/procedures/cmrPallet_add.sql b/db/routines/vn/procedures/cmrPallet_add.sql index 9f2bac9ec..befd3d09c 100644 --- a/db/routines/vn/procedures/cmrPallet_add.sql +++ b/db/routines/vn/procedures/cmrPallet_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) BEGIN /** * Añade registro a tabla cmrPallet. diff --git a/db/routines/vn/procedures/collectionPlacement_get.sql b/db/routines/vn/procedures/collectionPlacement_get.sql index 64fdfe4a9..d81847375 100644 --- a/db/routines/vn/procedures/collectionPlacement_get.sql +++ b/db/routines/vn/procedures/collectionPlacement_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collectionPlacement_get`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collectionPlacement_get`( vParamFk INT(11), vIsPicker bool) BEGIN diff --git a/db/routines/vn/procedures/collection_addItem.sql b/db/routines/vn/procedures/collection_addItem.sql index 5ea99a866..7cd374181 100644 --- a/db/routines/vn/procedures/collection_addItem.sql +++ b/db/routines/vn/procedures/collection_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_addItem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_addItem`( vBarccodeFk INT, vQuantity INT, vTicketFk INT diff --git a/db/routines/vn/procedures/collection_addWithReservation.sql b/db/routines/vn/procedures/collection_addWithReservation.sql index b6ea9bfe7..cc0b7fd9b 100644 --- a/db/routines/vn/procedures/collection_addWithReservation.sql +++ b/db/routines/vn/procedures/collection_addWithReservation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_addWithReservation`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_addWithReservation`( vItemFk INT, vQuantity INT, vTicketFk INT, diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 24ad6f0ec..cb203b414 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_assign`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_assign`( vUserFk INT, OUT vCollectionFk INT ) diff --git a/db/routines/vn/procedures/collection_get.sql b/db/routines/vn/procedures/collection_get.sql index 32b866168..7da3d364e 100644 --- a/db/routines/vn/procedures/collection_get.sql +++ b/db/routines/vn/procedures/collection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_get`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_get`(vWorkerFk INT) BEGIN /** * Obtiene colección del sacador si tiene líneas pendientes. diff --git a/db/routines/vn/procedures/collection_getAssigned.sql b/db/routines/vn/procedures/collection_getAssigned.sql index 60aa27df9..518e2dd7b 100644 --- a/db/routines/vn/procedures/collection_getAssigned.sql +++ b/db/routines/vn/procedures/collection_getAssigned.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_getAssigned`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_getAssigned`( vUserFk INT, OUT vCollectionFk INT ) diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index f6d959e0d..0f675041a 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_getTickets`(vParamFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_getTickets`(vParamFk INT) BEGIN /** * Selecciona los tickets de una colección/ticket/sectorCollection diff --git a/db/routines/vn/procedures/collection_kill.sql b/db/routines/vn/procedures/collection_kill.sql index 3289a02b4..298e4a7d1 100644 --- a/db/routines/vn/procedures/collection_kill.sql +++ b/db/routines/vn/procedures/collection_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_kill`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_kill`(vSelf INT) BEGIN /** * Elimina una coleccion y coloca sus tickets en OK diff --git a/db/routines/vn/procedures/collection_make.sql b/db/routines/vn/procedures/collection_make.sql index 2d4bc9c08..5deb54f74 100644 --- a/db/routines/vn/procedures/collection_make.sql +++ b/db/routines/vn/procedures/collection_make.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_make`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_make`() proc:BEGIN /** * Genera colecciones de tickets sin asignar trabajador a partir de la tabla diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 8e7d4f093..d94fb235b 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_new`(vUserFk INT, OUT vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_new`(vUserFk INT, OUT vCollectionFk INT) BEGIN /** * Genera colecciones de tickets sin asignar trabajador. diff --git a/db/routines/vn/procedures/collection_printSticker.sql b/db/routines/vn/procedures/collection_printSticker.sql index a82e008f1..a18d4d7d9 100644 --- a/db/routines/vn/procedures/collection_printSticker.sql +++ b/db/routines/vn/procedures/collection_printSticker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_printSticker`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_printSticker`( vSelf INT, vLabelCount INT ) diff --git a/db/routines/vn/procedures/collection_setParking.sql b/db/routines/vn/procedures/collection_setParking.sql index b23e8dd97..68b81ba30 100644 --- a/db/routines/vn/procedures/collection_setParking.sql +++ b/db/routines/vn/procedures/collection_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_setParking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_setParking`( vSelf INT, vParkingFk INT ) diff --git a/db/routines/vn/procedures/collection_setState.sql b/db/routines/vn/procedures/collection_setState.sql index 47d4a6742..5f8a7afa2 100644 --- a/db/routines/vn/procedures/collection_setState.sql +++ b/db/routines/vn/procedures/collection_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) BEGIN /** * Modifica el estado de los tickets de una colección. diff --git a/db/routines/vn/procedures/company_getFiscaldata.sql b/db/routines/vn/procedures/company_getFiscaldata.sql index eafeb8e63..675e19379 100644 --- a/db/routines/vn/procedures/company_getFiscaldata.sql +++ b/db/routines/vn/procedures/company_getFiscaldata.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`company_getFiscaldata`(workerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`company_getFiscaldata`(workerFk INT) BEGIN DECLARE vCompanyFk INT; diff --git a/db/routines/vn/procedures/company_getSuppliersDebt.sql b/db/routines/vn/procedures/company_getSuppliersDebt.sql index 052f43ac8..84d931542 100644 --- a/db/routines/vn/procedures/company_getSuppliersDebt.sql +++ b/db/routines/vn/procedures/company_getSuppliersDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) BEGIN /** * Generates a temporary table containing outstanding payments to suppliers. diff --git a/db/routines/vn/procedures/comparative_add.sql b/db/routines/vn/procedures/comparative_add.sql index b4017e6c4..5aaa440aa 100644 --- a/db/routines/vn/procedures/comparative_add.sql +++ b/db/routines/vn/procedures/comparative_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`comparative_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`comparative_add`() BEGIN /** * Inserts sales records less than one month old in comparative. diff --git a/db/routines/vn/procedures/confection_controlSource.sql b/db/routines/vn/procedures/confection_controlSource.sql index 2db87abc7..837916038 100644 --- a/db/routines/vn/procedures/confection_controlSource.sql +++ b/db/routines/vn/procedures/confection_controlSource.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`confection_controlSource`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`confection_controlSource`( vDated DATE, vScopeDays INT, vMaxAlertLevel INT, diff --git a/db/routines/vn/procedures/conveyorExpedition_Add.sql b/db/routines/vn/procedures/conveyorExpedition_Add.sql index 97eea2516..a63cd4946 100644 --- a/db/routines/vn/procedures/conveyorExpedition_Add.sql +++ b/db/routines/vn/procedures/conveyorExpedition_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) BEGIN diff --git a/db/routines/vn/procedures/copyComponentsFromSaleList.sql b/db/routines/vn/procedures/copyComponentsFromSaleList.sql index 7fb65e758..24d2705d0 100644 --- a/db/routines/vn/procedures/copyComponentsFromSaleList.sql +++ b/db/routines/vn/procedures/copyComponentsFromSaleList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`copyComponentsFromSaleList`(vTargetTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`copyComponentsFromSaleList`(vTargetTicketFk INT) BEGIN /* Copy sales and components to the target ticket diff --git a/db/routines/vn/procedures/createPedidoInterno.sql b/db/routines/vn/procedures/createPedidoInterno.sql index 75017c236..2adf9e9f3 100644 --- a/db/routines/vn/procedures/createPedidoInterno.sql +++ b/db/routines/vn/procedures/createPedidoInterno.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`createPedidoInterno`(vItemFk INT,vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`createPedidoInterno`(vItemFk INT,vQuantity INT) BEGIN diff --git a/db/routines/vn/procedures/creditInsurance_getRisk.sql b/db/routines/vn/procedures/creditInsurance_getRisk.sql index 6bb4bffe5..ea19f8aef 100644 --- a/db/routines/vn/procedures/creditInsurance_getRisk.sql +++ b/db/routines/vn/procedures/creditInsurance_getRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`creditInsurance_getRisk`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`creditInsurance_getRisk`() BEGIN /** * Devuelve el riesgo de los clientes que estan asegurados diff --git a/db/routines/vn/procedures/creditRecovery.sql b/db/routines/vn/procedures/creditRecovery.sql index ec5fd366b..afdb10dc8 100644 --- a/db/routines/vn/procedures/creditRecovery.sql +++ b/db/routines/vn/procedures/creditRecovery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`creditRecovery`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`creditRecovery`() BEGIN /** * Actualiza el crédito de los clientes diff --git a/db/routines/vn/procedures/crypt.sql b/db/routines/vn/procedures/crypt.sql index dbff716e3..54a698f66 100644 --- a/db/routines/vn/procedures/crypt.sql +++ b/db/routines/vn/procedures/crypt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) BEGIN DECLARE vEncryptedText VARCHAR(255) DEFAULT ''; diff --git a/db/routines/vn/procedures/cryptOff.sql b/db/routines/vn/procedures/cryptOff.sql index 6c0a7e33d..1ad33aa6d 100644 --- a/db/routines/vn/procedures/cryptOff.sql +++ b/db/routines/vn/procedures/cryptOff.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) BEGIN DECLARE vUncryptedText VARCHAR(255) DEFAULT ''; diff --git a/db/routines/vn/procedures/department_calcTree.sql b/db/routines/vn/procedures/department_calcTree.sql index 7a80aaeb8..4f67cda86 100644 --- a/db/routines/vn/procedures/department_calcTree.sql +++ b/db/routines/vn/procedures/department_calcTree.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_calcTree`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`department_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of diff --git a/db/routines/vn/procedures/department_calcTreeRec.sql b/db/routines/vn/procedures/department_calcTreeRec.sql index d22fcef23..bae39f4c5 100644 --- a/db/routines/vn/procedures/department_calcTreeRec.sql +++ b/db/routines/vn/procedures/department_calcTreeRec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_calcTreeRec`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`department_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, diff --git a/db/routines/vn/procedures/department_doCalc.sql b/db/routines/vn/procedures/department_doCalc.sql index ec25aac1b..11801a8d1 100644 --- a/db/routines/vn/procedures/department_doCalc.sql +++ b/db/routines/vn/procedures/department_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_doCalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`department_doCalc`() proc: BEGIN /** * Recalculates the department tree. diff --git a/db/routines/vn/procedures/department_getHasMistake.sql b/db/routines/vn/procedures/department_getHasMistake.sql index 7dd71367e..21a89a21d 100644 --- a/db/routines/vn/procedures/department_getHasMistake.sql +++ b/db/routines/vn/procedures/department_getHasMistake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_getHasMistake`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`department_getHasMistake`() BEGIN /** diff --git a/db/routines/vn/procedures/department_getLeaves.sql b/db/routines/vn/procedures/department_getLeaves.sql index f0112f007..ca8641e35 100644 --- a/db/routines/vn/procedures/department_getLeaves.sql +++ b/db/routines/vn/procedures/department_getLeaves.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`department_getLeaves`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`department_getLeaves`( vParentFk INT, vSearch VARCHAR(255) ) diff --git a/db/routines/vn/procedures/deviceLog_add.sql b/db/routines/vn/procedures/deviceLog_add.sql index 2a4614539..5743cd4db 100644 --- a/db/routines/vn/procedures/deviceLog_add.sql +++ b/db/routines/vn/procedures/deviceLog_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64)) BEGIN /** * Inserta registro en tabla devicelog el log del usuario conectado. diff --git a/db/routines/vn/procedures/deviceProductionUser_exists.sql b/db/routines/vn/procedures/deviceProductionUser_exists.sql index 6259a1477..9b2442c4b 100644 --- a/db/routines/vn/procedures/deviceProductionUser_exists.sql +++ b/db/routines/vn/procedures/deviceProductionUser_exists.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProductionUser_exists`(vUserFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`deviceProductionUser_exists`(vUserFk INT) BEGIN /* SELECT COUNT(*) AS UserExists diff --git a/db/routines/vn/procedures/deviceProductionUser_getWorker.sql b/db/routines/vn/procedures/deviceProductionUser_getWorker.sql index dd66299a9..d603405cf 100644 --- a/db/routines/vn/procedures/deviceProductionUser_getWorker.sql +++ b/db/routines/vn/procedures/deviceProductionUser_getWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona si hay registrado un device con un android_id diff --git a/db/routines/vn/procedures/deviceProduction_getnameDevice.sql b/db/routines/vn/procedures/deviceProduction_getnameDevice.sql index 8f05dc194..748798e82 100644 --- a/db/routines/vn/procedures/deviceProduction_getnameDevice.sql +++ b/db/routines/vn/procedures/deviceProduction_getnameDevice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona el id del dispositivo que corresponde al vAndroid_id. diff --git a/db/routines/vn/procedures/device_checkLogin.sql b/db/routines/vn/procedures/device_checkLogin.sql index d68fe0072..7094eb84a 100644 --- a/db/routines/vn/procedures/device_checkLogin.sql +++ b/db/routines/vn/procedures/device_checkLogin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) BEGIN /* diff --git a/db/routines/vn/procedures/duaEntryValueUpdate.sql b/db/routines/vn/procedures/duaEntryValueUpdate.sql index fbb4026b9..c3c57dd45 100644 --- a/db/routines/vn/procedures/duaEntryValueUpdate.sql +++ b/db/routines/vn/procedures/duaEntryValueUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaEntryValueUpdate`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`duaEntryValueUpdate`(vDuaFk INT) BEGIN UPDATE duaEntry de diff --git a/db/routines/vn/procedures/duaInvoiceInBooking.sql b/db/routines/vn/procedures/duaInvoiceInBooking.sql index 6e74ca5d8..546211adc 100644 --- a/db/routines/vn/procedures/duaInvoiceInBooking.sql +++ b/db/routines/vn/procedures/duaInvoiceInBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`( vDuaFk INT ) BEGIN diff --git a/db/routines/vn/procedures/duaParcialMake.sql b/db/routines/vn/procedures/duaParcialMake.sql index 18430a227..063f26468 100644 --- a/db/routines/vn/procedures/duaParcialMake.sql +++ b/db/routines/vn/procedures/duaParcialMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaParcialMake`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`duaParcialMake`(vDuaFk INT) BEGIN DECLARE vNewDuaFk INT; diff --git a/db/routines/vn/procedures/duaTaxBooking.sql b/db/routines/vn/procedures/duaTaxBooking.sql index 2013d5d5d..2c9201231 100644 --- a/db/routines/vn/procedures/duaTaxBooking.sql +++ b/db/routines/vn/procedures/duaTaxBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT) BEGIN DECLARE vBookNumber INT; DECLARE vBookDated DATE; diff --git a/db/routines/vn/procedures/duaTax_doRecalc.sql b/db/routines/vn/procedures/duaTax_doRecalc.sql index 2b6f95224..fedc4c56b 100644 --- a/db/routines/vn/procedures/duaTax_doRecalc.sql +++ b/db/routines/vn/procedures/duaTax_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`duaTax_doRecalc`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`duaTax_doRecalc`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y los vuelve a crear en base a la tabla duaEntry diff --git a/db/routines/vn/procedures/ediTables_Update.sql b/db/routines/vn/procedures/ediTables_Update.sql index 47eefbdeb..9ae759fbd 100644 --- a/db/routines/vn/procedures/ediTables_Update.sql +++ b/db/routines/vn/procedures/ediTables_Update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ediTables_Update`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ediTables_Update`() BEGIN INSERT IGNORE INTO vn.genus(name) diff --git a/db/routines/vn/procedures/ektEntryAssign_setEntry.sql b/db/routines/vn/procedures/ektEntryAssign_setEntry.sql index 0a8cb64fc..eecdb32d4 100644 --- a/db/routines/vn/procedures/ektEntryAssign_setEntry.sql +++ b/db/routines/vn/procedures/ektEntryAssign_setEntry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ektEntryAssign_setEntry`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ektEntryAssign_setEntry`() BEGIN DECLARE done INT DEFAULT FALSE; diff --git a/db/routines/vn/procedures/energyMeter_record.sql b/db/routines/vn/procedures/energyMeter_record.sql index f69f2ca64..07fb7afd0 100644 --- a/db/routines/vn/procedures/energyMeter_record.sql +++ b/db/routines/vn/procedures/energyMeter_record.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`energyMeter_record`(vInput INT, vActiveTime INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`energyMeter_record`(vInput INT, vActiveTime INT) BEGIN DECLARE vConsumption INT; diff --git a/db/routines/vn/procedures/entryDelivered.sql b/db/routines/vn/procedures/entryDelivered.sql index 1d820bfbc..7a6e22b4b 100644 --- a/db/routines/vn/procedures/entryDelivered.sql +++ b/db/routines/vn/procedures/entryDelivered.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entryDelivered`(vDated DATE, vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entryDelivered`(vDated DATE, vEntryFk INT) BEGIN DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/entryWithItem.sql b/db/routines/vn/procedures/entryWithItem.sql index d1600eef6..f28a69f61 100644 --- a/db/routines/vn/procedures/entryWithItem.sql +++ b/db/routines/vn/procedures/entryWithItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) BEGIN DECLARE vTravel INT; diff --git a/db/routines/vn/procedures/entry_checkPackaging.sql b/db/routines/vn/procedures/entry_checkPackaging.sql index f5fa29094..f9ed03212 100644 --- a/db/routines/vn/procedures/entry_checkPackaging.sql +++ b/db/routines/vn/procedures/entry_checkPackaging.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_checkPackaging`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_checkPackaging`(vEntryFk INT) BEGIN /** * Comprueba que los campos package y packaging no sean nulos diff --git a/db/routines/vn/procedures/entry_clone.sql b/db/routines/vn/procedures/entry_clone.sql index 3cd4b4cbe..a0ed39c29 100644 --- a/db/routines/vn/procedures/entry_clone.sql +++ b/db/routines/vn/procedures/entry_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_clone`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_clone`(vSelf INT) BEGIN /** * clones an entry. diff --git a/db/routines/vn/procedures/entry_cloneHeader.sql b/db/routines/vn/procedures/entry_cloneHeader.sql index aa3a8cba5..c988cc592 100644 --- a/db/routines/vn/procedures/entry_cloneHeader.sql +++ b/db/routines/vn/procedures/entry_cloneHeader.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_cloneHeader`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_cloneHeader`( vSelf INT, OUT vNewEntryFk INT, vTravelFk INT diff --git a/db/routines/vn/procedures/entry_cloneWithoutBuy.sql b/db/routines/vn/procedures/entry_cloneWithoutBuy.sql index 4933cd609..af661ce0a 100644 --- a/db/routines/vn/procedures/entry_cloneWithoutBuy.sql +++ b/db/routines/vn/procedures/entry_cloneWithoutBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) BEGIN /** * Clona una entrada sin compras diff --git a/db/routines/vn/procedures/entry_copyBuys.sql b/db/routines/vn/procedures/entry_copyBuys.sql index 7bba8c60f..8446249c7 100644 --- a/db/routines/vn/procedures/entry_copyBuys.sql +++ b/db/routines/vn/procedures/entry_copyBuys.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) BEGIN /** * Copies all buys from an entry to an entry. diff --git a/db/routines/vn/procedures/entry_fixMisfit.sql b/db/routines/vn/procedures/entry_fixMisfit.sql index 928fdf01c..c950f9a95 100644 --- a/db/routines/vn/procedures/entry_fixMisfit.sql +++ b/db/routines/vn/procedures/entry_fixMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_fixMisfit`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_fixMisfit`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_getRate.sql b/db/routines/vn/procedures/entry_getRate.sql index d48f61a64..e715fae9b 100644 --- a/db/routines/vn/procedures/entry_getRate.sql +++ b/db/routines/vn/procedures/entry_getRate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_getRate`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_getRate`(vSelf INT) BEGIN /** * Prepara una tabla con las tarifas aplicables en funcion de la fecha diff --git a/db/routines/vn/procedures/entry_getTransfer.sql b/db/routines/vn/procedures/entry_getTransfer.sql index 2bec79a1d..31d1aff07 100644 --- a/db/routines/vn/procedures/entry_getTransfer.sql +++ b/db/routines/vn/procedures/entry_getTransfer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_getTransfer`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_getTransfer`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_isEditable.sql b/db/routines/vn/procedures/entry_isEditable.sql index fe009ccdd..12b6d0ef6 100644 --- a/db/routines/vn/procedures/entry_isEditable.sql +++ b/db/routines/vn/procedures/entry_isEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_isEditable`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_isEditable`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/entry_lock.sql b/db/routines/vn/procedures/entry_lock.sql index eb0ee2761..51e0f40b4 100644 --- a/db/routines/vn/procedures/entry_lock.sql +++ b/db/routines/vn/procedures/entry_lock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_lock`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_lock`(vSelf INT) BEGIN /** * Lock the indicated entry diff --git a/db/routines/vn/procedures/entry_moveNotPrinted.sql b/db/routines/vn/procedures/entry_moveNotPrinted.sql index b5cc373cb..3d15681ee 100644 --- a/db/routines/vn/procedures/entry_moveNotPrinted.sql +++ b/db/routines/vn/procedures/entry_moveNotPrinted.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_moveNotPrinted`(vSelf INT, +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_moveNotPrinted`(vSelf INT, vDays INT, vChangeEntry BOOL, OUT vNewEntryFk INT) diff --git a/db/routines/vn/procedures/entry_notifyChanged.sql b/db/routines/vn/procedures/entry_notifyChanged.sql index 8c57a7a45..5e48699bf 100644 --- a/db/routines/vn/procedures/entry_notifyChanged.sql +++ b/db/routines/vn/procedures/entry_notifyChanged.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) BEGIN DECLARE vEmail VARCHAR(255); DECLARE vFields VARCHAR(100); diff --git a/db/routines/vn/procedures/entry_recalc.sql b/db/routines/vn/procedures/entry_recalc.sql index 8af72bdda..516c5c193 100644 --- a/db/routines/vn/procedures/entry_recalc.sql +++ b/db/routines/vn/procedures/entry_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_recalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_recalc`() BEGIN /** * Comprueba que las ventas creadas entre un rango de fechas tienen componentes diff --git a/db/routines/vn/procedures/entry_splitByShelving.sql b/db/routines/vn/procedures/entry_splitByShelving.sql index 2dfd54382..997f942cc 100644 --- a/db/routines/vn/procedures/entry_splitByShelving.sql +++ b/db/routines/vn/procedures/entry_splitByShelving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT) BEGIN /** * Divide las compras entre dos entradas de acuerdo con lo ubicado en una matr�cula diff --git a/db/routines/vn/procedures/entry_splitMisfit.sql b/db/routines/vn/procedures/entry_splitMisfit.sql index 60c2a27b1..a21b2c9c4 100644 --- a/db/routines/vn/procedures/entry_splitMisfit.sql +++ b/db/routines/vn/procedures/entry_splitMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_splitMisfit`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitMisfit`(vSelf INT) BEGIN /* Divide una entrada, pasando los registros que ha insertado vn.entry_fixMisfit de la entrada original diff --git a/db/routines/vn/procedures/entry_unlock.sql b/db/routines/vn/procedures/entry_unlock.sql index 33efcfd32..4ecdf2797 100644 --- a/db/routines/vn/procedures/entry_unlock.sql +++ b/db/routines/vn/procedures/entry_unlock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_unlock`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_unlock`(vSelf INT) BEGIN /** * Unlock the indicated entry diff --git a/db/routines/vn/procedures/entry_updateComission.sql b/db/routines/vn/procedures/entry_updateComission.sql index e63a30029..e2de2a4a5 100644 --- a/db/routines/vn/procedures/entry_updateComission.sql +++ b/db/routines/vn/procedures/entry_updateComission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`entry_updateComission`(vCurrency INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_updateComission`(vCurrency INT) BEGIN /** * Actualiza la comision de las entradas de hoy a futuro y las recalcula diff --git a/db/routines/vn/procedures/expeditionGetFromRoute.sql b/db/routines/vn/procedures/expeditionGetFromRoute.sql index 89157d071..6191428e6 100644 --- a/db/routines/vn/procedures/expeditionGetFromRoute.sql +++ b/db/routines/vn/procedures/expeditionGetFromRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionGetFromRoute`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionGetFromRoute`( vExpeditionFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionPallet_Del.sql b/db/routines/vn/procedures/expeditionPallet_Del.sql index ea76d8bf5..e69992032 100644 --- a/db/routines/vn/procedures/expeditionPallet_Del.sql +++ b/db/routines/vn/procedures/expeditionPallet_Del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_Del`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_Del`(vPalletFk INT) BEGIN DELETE FROM vn.expeditionPallet diff --git a/db/routines/vn/procedures/expeditionPallet_List.sql b/db/routines/vn/procedures/expeditionPallet_List.sql index f6ca2fa78..e419f8793 100644 --- a/db/routines/vn/procedures/expeditionPallet_List.sql +++ b/db/routines/vn/procedures/expeditionPallet_List.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_List`(vTruckFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_List`(vTruckFk INT) BEGIN SELECT ep.id Pallet, diff --git a/db/routines/vn/procedures/expeditionPallet_View.sql b/db/routines/vn/procedures/expeditionPallet_View.sql index d5c9e684a..31e0d6c96 100644 --- a/db/routines/vn/procedures/expeditionPallet_View.sql +++ b/db/routines/vn/procedures/expeditionPallet_View.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_View`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_View`(vPalletFk INT) BEGIN SELECT ep.id Pallet, diff --git a/db/routines/vn/procedures/expeditionPallet_build.sql b/db/routines/vn/procedures/expeditionPallet_build.sql index 5496da0ac..2df73bb85 100644 --- a/db/routines/vn/procedures/expeditionPallet_build.sql +++ b/db/routines/vn/procedures/expeditionPallet_build.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_build`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_build`( vExpeditions JSON, vArcId INT, vWorkerFk INT, diff --git a/db/routines/vn/procedures/expeditionPallet_printLabel.sql b/db/routines/vn/procedures/expeditionPallet_printLabel.sql index 1c59c8306..0a35d2a6b 100644 --- a/db/routines/vn/procedures/expeditionPallet_printLabel.sql +++ b/db/routines/vn/procedures/expeditionPallet_printLabel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionPallet_printLabel`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_printLabel`(vSelf INT) BEGIN /** * Calls the report_print procedure and passes it diff --git a/db/routines/vn/procedures/expeditionScan_Add.sql b/db/routines/vn/procedures/expeditionScan_Add.sql index 1dbf3fa46..98eeb265b 100644 --- a/db/routines/vn/procedures/expeditionScan_Add.sql +++ b/db/routines/vn/procedures/expeditionScan_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Add`(vPalletFk INT, vTruckFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_Add`(vPalletFk INT, vTruckFk INT) BEGIN DECLARE vTotal INT DEFAULT 0; diff --git a/db/routines/vn/procedures/expeditionScan_Del.sql b/db/routines/vn/procedures/expeditionScan_Del.sql index 6f3520065..8e082d18c 100644 --- a/db/routines/vn/procedures/expeditionScan_Del.sql +++ b/db/routines/vn/procedures/expeditionScan_Del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Del`(vScanFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_Del`(vScanFk INT) BEGIN DELETE FROM vn.expeditionScan diff --git a/db/routines/vn/procedures/expeditionScan_List.sql b/db/routines/vn/procedures/expeditionScan_List.sql index 651270da8..7f3ddd3fd 100644 --- a/db/routines/vn/procedures/expeditionScan_List.sql +++ b/db/routines/vn/procedures/expeditionScan_List.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_List`(vPalletFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_List`(vPalletFk INT) BEGIN SELECT es.id, diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index 7d196d6dc..cfdda927b 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT) BEGIN REPLACE vn.expeditionScan(expeditionFk, palletFk) diff --git a/db/routines/vn/procedures/expeditionState_add.sql b/db/routines/vn/procedures/expeditionState_add.sql index 6ed41df67..974fc4d3e 100644 --- a/db/routines/vn/procedures/expeditionState_add.sql +++ b/db/routines/vn/procedures/expeditionState_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByAdress.sql b/db/routines/vn/procedures/expeditionState_addByAdress.sql index 3eaae58b2..3925ea000 100644 --- a/db/routines/vn/procedures/expeditionState_addByAdress.sql +++ b/db/routines/vn/procedures/expeditionState_addByAdress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByExpedition.sql b/db/routines/vn/procedures/expeditionState_addByExpedition.sql index 630e14401..fbc075b88 100644 --- a/db/routines/vn/procedures/expeditionState_addByExpedition.sql +++ b/db/routines/vn/procedures/expeditionState_addByExpedition.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expeditionState_addByPallet.sql b/db/routines/vn/procedures/expeditionState_addByPallet.sql index 876249b33..5ebebb748 100644 --- a/db/routines/vn/procedures/expeditionState_addByPallet.sql +++ b/db/routines/vn/procedures/expeditionState_addByPallet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) BEGIN /** * Inserta nuevos registros en la tabla vn.expeditionState diff --git a/db/routines/vn/procedures/expeditionState_addByRoute.sql b/db/routines/vn/procedures/expeditionState_addByRoute.sql index 832a990a8..c375f95a8 100644 --- a/db/routines/vn/procedures/expeditionState_addByRoute.sql +++ b/db/routines/vn/procedures/expeditionState_addByRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** diff --git a/db/routines/vn/procedures/expedition_StateGet.sql b/db/routines/vn/procedures/expedition_StateGet.sql index 25bac8bc1..a871cf3b6 100644 --- a/db/routines/vn/procedures/expedition_StateGet.sql +++ b/db/routines/vn/procedures/expedition_StateGet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_StateGet`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_StateGet`(vExpeditionFk INT) BEGIN /* Devuelve una "ficha" con todos los datos relativos a la expedición diff --git a/db/routines/vn/procedures/expedition_getFromRoute.sql b/db/routines/vn/procedures/expedition_getFromRoute.sql index a60d74df8..f95936413 100644 --- a/db/routines/vn/procedures/expedition_getFromRoute.sql +++ b/db/routines/vn/procedures/expedition_getFromRoute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_getFromRoute`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_getFromRoute`(vRouteFk INT) BEGIN /** * Obtiene las expediciones a partir de una ruta diff --git a/db/routines/vn/procedures/expedition_getState.sql b/db/routines/vn/procedures/expedition_getState.sql index 1866b4345..f2e873a6b 100644 --- a/db/routines/vn/procedures/expedition_getState.sql +++ b/db/routines/vn/procedures/expedition_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`expedition_getState`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_getState`(vExpeditionFk INT) BEGIN DECLARE vTicketsPendientes INT; diff --git a/db/routines/vn/procedures/freelance_getInfo.sql b/db/routines/vn/procedures/freelance_getInfo.sql index 950f09a1c..64d44c347 100644 --- a/db/routines/vn/procedures/freelance_getInfo.sql +++ b/db/routines/vn/procedures/freelance_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`freelance_getInfo`(workerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`freelance_getInfo`(workerFk INT) BEGIN SELECT s.name, s.street, s.city, s.nif, s.postCode FROM route r diff --git a/db/routines/vn/procedures/getDayExpeditions.sql b/db/routines/vn/procedures/getDayExpeditions.sql index 8d0155a1d..5f83937a7 100644 --- a/db/routines/vn/procedures/getDayExpeditions.sql +++ b/db/routines/vn/procedures/getDayExpeditions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getDayExpeditions`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`getDayExpeditions`() BEGIN SELECT diff --git a/db/routines/vn/procedures/getInfoDelivery.sql b/db/routines/vn/procedures/getInfoDelivery.sql index 711725b42..0663cbbc3 100644 --- a/db/routines/vn/procedures/getInfoDelivery.sql +++ b/db/routines/vn/procedures/getInfoDelivery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getInfoDelivery`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`getInfoDelivery`(vRouteFk INT) BEGIN SELECT s.name, s.street, s.city, s.nif, s.postCode FROM vn.route r JOIN vn.agencyMode am ON r.agencyModeFk = am.id diff --git a/db/routines/vn/procedures/getPedidosInternos.sql b/db/routines/vn/procedures/getPedidosInternos.sql index 87f8a7e09..d6efdc364 100644 --- a/db/routines/vn/procedures/getPedidosInternos.sql +++ b/db/routines/vn/procedures/getPedidosInternos.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getPedidosInternos`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`getPedidosInternos`() BEGIN SELECT id,name as description,upToDown as quantity FROM vn.item WHERE upToDown; diff --git a/db/routines/vn/procedures/getTaxBases.sql b/db/routines/vn/procedures/getTaxBases.sql index 8ddf664c8..15a6ce85b 100644 --- a/db/routines/vn/procedures/getTaxBases.sql +++ b/db/routines/vn/procedures/getTaxBases.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`getTaxBases`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`getTaxBases`() BEGIN /** * Calcula y devuelve en número de bases imponibles postivas y negativas diff --git a/db/routines/vn/procedures/greuge_add.sql b/db/routines/vn/procedures/greuge_add.sql index 4b1aea445..f69e97caa 100644 --- a/db/routines/vn/procedures/greuge_add.sql +++ b/db/routines/vn/procedures/greuge_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`greuge_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`greuge_add`() BEGIN /** * Group inserts into vn.greuge and then deletes the records just inserted diff --git a/db/routines/vn/procedures/greuge_notifyEvents.sql b/db/routines/vn/procedures/greuge_notifyEvents.sql index 21d400ec3..bf6755c9a 100644 --- a/db/routines/vn/procedures/greuge_notifyEvents.sql +++ b/db/routines/vn/procedures/greuge_notifyEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`greuge_notifyEvents`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`greuge_notifyEvents`() BEGIN /** * Notify to detect wrong greuges. diff --git a/db/routines/vn/procedures/inventoryFailureAdd.sql b/db/routines/vn/procedures/inventoryFailureAdd.sql index 311e2466c..e2b5fa4a0 100644 --- a/db/routines/vn/procedures/inventoryFailureAdd.sql +++ b/db/routines/vn/procedures/inventoryFailureAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryFailureAdd`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`inventoryFailureAdd`() BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/vn/procedures/inventoryMake.sql b/db/routines/vn/procedures/inventoryMake.sql index 1eca06aa6..91065771a 100644 --- a/db/routines/vn/procedures/inventoryMake.sql +++ b/db/routines/vn/procedures/inventoryMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryMake`(vInventoryDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`inventoryMake`(vInventoryDate DATE) BEGIN /** * Recalculate the inventories diff --git a/db/routines/vn/procedures/inventoryMakeLauncher.sql b/db/routines/vn/procedures/inventoryMakeLauncher.sql index 967c3bb03..1822e1d8d 100644 --- a/db/routines/vn/procedures/inventoryMakeLauncher.sql +++ b/db/routines/vn/procedures/inventoryMakeLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventoryMakeLauncher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`inventoryMakeLauncher`() BEGIN /** * Recalculate the inventories of all warehouses diff --git a/db/routines/vn/procedures/inventory_repair.sql b/db/routines/vn/procedures/inventory_repair.sql index eaf228eda..9c8300321 100644 --- a/db/routines/vn/procedures/inventory_repair.sql +++ b/db/routines/vn/procedures/inventory_repair.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`inventory_repair`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`inventory_repair`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.lastEntry; diff --git a/db/routines/vn/procedures/invoiceExpenseMake.sql b/db/routines/vn/procedures/invoiceExpenseMake.sql index e1b81f85d..ad336e2db 100644 --- a/db/routines/vn/procedures/invoiceExpenseMake.sql +++ b/db/routines/vn/procedures/invoiceExpenseMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceExpenseMake`(IN vInvoice INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceExpenseMake`(IN vInvoice INT) BEGIN /* Inserta las partidas de gasto correspondientes a la factura * REQUIERE tabla tmp.ticketToInvoice diff --git a/db/routines/vn/procedures/invoiceFromAddress.sql b/db/routines/vn/procedures/invoiceFromAddress.sql index 2a0cff866..24b247f5b 100644 --- a/db/routines/vn/procedures/invoiceFromAddress.sql +++ b/db/routines/vn/procedures/invoiceFromAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) BEGIN DECLARE vMinDateTicket DATE DEFAULT TIMESTAMPADD(MONTH, -3, util.VN_CURDATE()); diff --git a/db/routines/vn/procedures/invoiceFromClient.sql b/db/routines/vn/procedures/invoiceFromClient.sql index 4042cdb26..1a0dfa4c3 100644 --- a/db/routines/vn/procedures/invoiceFromClient.sql +++ b/db/routines/vn/procedures/invoiceFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromClient`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceFromClient`( IN vMaxTicketDate datetime, IN vClientFk INT, IN vCompanyFk INT) diff --git a/db/routines/vn/procedures/invoiceFromTicket.sql b/db/routines/vn/procedures/invoiceFromTicket.sql index 044c7406c..c00a9bab4 100644 --- a/db/routines/vn/procedures/invoiceFromTicket.sql +++ b/db/routines/vn/procedures/invoiceFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceFromTicket`(IN vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceFromTicket`(IN vTicket INT) BEGIN DROP TEMPORARY TABLE IF EXISTS `tmp`.`ticketToInvoice`; diff --git a/db/routines/vn/procedures/invoiceInDueDay_calculate.sql b/db/routines/vn/procedures/invoiceInDueDay_calculate.sql index 36f70c3f8..d488b79db 100644 --- a/db/routines/vn/procedures/invoiceInDueDay_calculate.sql +++ b/db/routines/vn/procedures/invoiceInDueDay_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_calculate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_calculate`( vInvoiceInFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceInDueDay_recalc.sql b/db/routines/vn/procedures/invoiceInDueDay_recalc.sql index 69626c746..b3a9f5aef 100644 --- a/db/routines/vn/procedures/invoiceInDueDay_recalc.sql +++ b/db/routines/vn/procedures/invoiceInDueDay_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_recalc`(vInvoiceInFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInDueDay_recalc`(vInvoiceInFk INT) BEGIN DELETE FROM invoiceInDueDay diff --git a/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql b/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql index 52b92ba05..4c16346b2 100644 --- a/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql +++ b/db/routines/vn/procedures/invoiceInTaxMakeByDua.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTaxMakeByDua`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInTaxMakeByDua`( vDuaFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql b/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql index 1f969141f..da3faefbf 100644 --- a/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql +++ b/db/routines/vn/procedures/invoiceInTax_afterUpsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_afterUpsert`(vInvoiceInFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInTax_afterUpsert`(vInvoiceInFk INT) BEGIN /** * Triggered actions when a invoiceInTax is updated or inserted. diff --git a/db/routines/vn/procedures/invoiceInTax_getFromDua.sql b/db/routines/vn/procedures/invoiceInTax_getFromDua.sql index a2eb72483..c3a890ddd 100644 --- a/db/routines/vn/procedures/invoiceInTax_getFromDua.sql +++ b/db/routines/vn/procedures/invoiceInTax_getFromDua.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromDua`(vDuaFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromDua`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y sus vctos. y los vuelve a crear en base a la tabla duaEntry diff --git a/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql b/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql index 31f278e94..186104a73 100644 --- a/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql +++ b/db/routines/vn/procedures/invoiceInTax_getFromEntries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`( IN vInvoiceInFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceInTax_recalc.sql b/db/routines/vn/procedures/invoiceInTax_recalc.sql index 11ad1ca7f..0daf87103 100644 --- a/db/routines/vn/procedures/invoiceInTax_recalc.sql +++ b/db/routines/vn/procedures/invoiceInTax_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceInTax_recalc`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceInTax_recalc`( vInvoiceInFk INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceIn_booking.sql b/db/routines/vn/procedures/invoiceIn_booking.sql index 8afb1b969..356b76b54 100644 --- a/db/routines/vn/procedures/invoiceIn_booking.sql +++ b/db/routines/vn/procedures/invoiceIn_booking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`( vSelf INT, vBookNumber INT ) diff --git a/db/routines/vn/procedures/invoiceIn_checkBooked.sql b/db/routines/vn/procedures/invoiceIn_checkBooked.sql index b0b8b92cd..b9966a9b6 100644 --- a/db/routines/vn/procedures/invoiceIn_checkBooked.sql +++ b/db/routines/vn/procedures/invoiceIn_checkBooked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceIn_checkBooked`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceIn_checkBooked`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/invoiceOutAgain.sql b/db/routines/vn/procedures/invoiceOutAgain.sql index 1643c2fa6..21b43fdf9 100644 --- a/db/routines/vn/procedures/invoiceOutAgain.sql +++ b/db/routines/vn/procedures/invoiceOutAgain.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/invoiceOutBooking.sql b/db/routines/vn/procedures/invoiceOutBooking.sql index 15ea2d7e6..86f64ffcb 100644 --- a/db/routines/vn/procedures/invoiceOutBooking.sql +++ b/db/routines/vn/procedures/invoiceOutBooking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT) BEGIN /** * Asienta una factura emitida diff --git a/db/routines/vn/procedures/invoiceOutBookingRange.sql b/db/routines/vn/procedures/invoiceOutBookingRange.sql index ccacb94de..e053e51eb 100644 --- a/db/routines/vn/procedures/invoiceOutBookingRange.sql +++ b/db/routines/vn/procedures/invoiceOutBookingRange.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutBookingRange`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOutBookingRange`() BEGIN /* Reasentar facturas diff --git a/db/routines/vn/procedures/invoiceOutListByCompany.sql b/db/routines/vn/procedures/invoiceOutListByCompany.sql index 97b1a1828..13145dd6b 100644 --- a/db/routines/vn/procedures/invoiceOutListByCompany.sql +++ b/db/routines/vn/procedures/invoiceOutListByCompany.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) BEGIN SELECT diff --git a/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql b/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql index aef2a08c2..4bae6b245 100644 --- a/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql +++ b/db/routines/vn/procedures/invoiceOutTaxAndExpense.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOutTaxAndExpense`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOutTaxAndExpense`() BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql b/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql index aa1a8ec32..1e870ca75 100644 --- a/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql +++ b/db/routines/vn/procedures/invoiceOut_exportationFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_exportationFromClient`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOut_exportationFromClient`( vMaxTicketDate DATETIME, vClientFk INT, vCompanyFk INT) diff --git a/db/routines/vn/procedures/invoiceOut_new.sql b/db/routines/vn/procedures/invoiceOut_new.sql index 2d8233740..a399dced6 100644 --- a/db/routines/vn/procedures/invoiceOut_new.sql +++ b/db/routines/vn/procedures/invoiceOut_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOut_new`( vSerial VARCHAR(255), vInvoiceDate DATE, vTaxArea VARCHAR(25), diff --git a/db/routines/vn/procedures/invoiceOut_newFromClient.sql b/db/routines/vn/procedures/invoiceOut_newFromClient.sql index f0f644c38..74c4aa71d 100644 --- a/db/routines/vn/procedures/invoiceOut_newFromClient.sql +++ b/db/routines/vn/procedures/invoiceOut_newFromClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromClient`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromClient`( IN vClientFk INT, IN vSerial CHAR(2), IN vMaxShipped DATE, diff --git a/db/routines/vn/procedures/invoiceOut_newFromTicket.sql b/db/routines/vn/procedures/invoiceOut_newFromTicket.sql index 6437a26c3..41919f6ea 100644 --- a/db/routines/vn/procedures/invoiceOut_newFromTicket.sql +++ b/db/routines/vn/procedures/invoiceOut_newFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), IN vRef varchar(25), OUT vInvoiceId int) BEGIN /** diff --git a/db/routines/vn/procedures/invoiceTaxMake.sql b/db/routines/vn/procedures/invoiceTaxMake.sql index 70e7cce64..5b1ba6a95 100644 --- a/db/routines/vn/procedures/invoiceTaxMake.sql +++ b/db/routines/vn/procedures/invoiceTaxMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) BEGIN /** * Factura un conjunto de tickets. diff --git a/db/routines/vn/procedures/itemBarcode_update.sql b/db/routines/vn/procedures/itemBarcode_update.sql index 0e796b8b7..6341d8091 100644 --- a/db/routines/vn/procedures/itemBarcode_update.sql +++ b/db/routines/vn/procedures/itemBarcode_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) BEGIN IF vDelete THEN DELETE FROM vn.itemBarcode WHERE itemFk = vItemFk AND code = vCode; diff --git a/db/routines/vn/procedures/itemFuentesBalance.sql b/db/routines/vn/procedures/itemFuentesBalance.sql index 02c16bb59..d6961a05f 100644 --- a/db/routines/vn/procedures/itemFuentesBalance.sql +++ b/db/routines/vn/procedures/itemFuentesBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemFuentesBalance`(vDaysInFuture INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemFuentesBalance`(vDaysInFuture INT) BEGIN /* Se utiliza para calcular la necesidad de mover mercancia entre el almacén de fuentes y el nuestro diff --git a/db/routines/vn/procedures/itemPlacementFromTicket.sql b/db/routines/vn/procedures/itemPlacementFromTicket.sql index 29b578edf..922bde5d4 100644 --- a/db/routines/vn/procedures/itemPlacementFromTicket.sql +++ b/db/routines/vn/procedures/itemPlacementFromTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementFromTicket`(vTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementFromTicket`(vTicket INT) BEGIN /** * Llama a itemPlacementUpdateVisible diff --git a/db/routines/vn/procedures/itemPlacementSupplyAiming.sql b/db/routines/vn/procedures/itemPlacementSupplyAiming.sql index d7cb11a51..b96860623 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyAiming.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyAiming.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) BEGIN SELECT ish.itemFk, diff --git a/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql b/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql index 731c10c61..935d062a1 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyCloseOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) BEGIN UPDATE vn.itemPlacementSupply diff --git a/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql b/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql index f662d9121..958dc7e78 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyGetOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT ) BEGIN DECLARE vId INT; diff --git a/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql b/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql index 70af69232..cefa64d13 100644 --- a/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql +++ b/db/routines/vn/procedures/itemPlacementSupplyStockGetTargetList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) BEGIN /** * Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa. diff --git a/db/routines/vn/procedures/itemRefreshTags.sql b/db/routines/vn/procedures/itemRefreshTags.sql index 9c4d23d78..cec133ad1 100644 --- a/db/routines/vn/procedures/itemRefreshTags.sql +++ b/db/routines/vn/procedures/itemRefreshTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemRefreshTags`(IN vItem INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemRefreshTags`(IN vItem INT) BEGIN /** * Crea la tabla temporal necesaria para el procedimiento item_refreshTags diff --git a/db/routines/vn/procedures/itemSale_byWeek.sql b/db/routines/vn/procedures/itemSale_byWeek.sql index 348ad2832..31235f89a 100644 --- a/db/routines/vn/procedures/itemSale_byWeek.sql +++ b/db/routines/vn/procedures/itemSale_byWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) BEGIN DECLARE vStarted DATE; diff --git a/db/routines/vn/procedures/itemSaveMin.sql b/db/routines/vn/procedures/itemSaveMin.sql index 75c99efd1..fb7c7d2f8 100644 --- a/db/routines/vn/procedures/itemSaveMin.sql +++ b/db/routines/vn/procedures/itemSaveMin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSaveMin`(min INT,vBarcode VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemSaveMin`(min INT,vBarcode VARCHAR(22)) BEGIN DECLARE vItemFk INT; diff --git a/db/routines/vn/procedures/itemSearchShelving.sql b/db/routines/vn/procedures/itemSearchShelving.sql index 6f805df19..1fef9b2f6 100644 --- a/db/routines/vn/procedures/itemSearchShelving.sql +++ b/db/routines/vn/procedures/itemSearchShelving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemSearchShelving`(`vShelvingFk` VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemSearchShelving`(`vShelvingFk` VARCHAR(3)) BEGIN SELECT p.`column` AS col , p.`row` FROM vn.shelving s diff --git a/db/routines/vn/procedures/itemShelvingDelete.sql b/db/routines/vn/procedures/itemShelvingDelete.sql index 9c204722c..a8799af11 100644 --- a/db/routines/vn/procedures/itemShelvingDelete.sql +++ b/db/routines/vn/procedures/itemShelvingDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingDelete`(vId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingDelete`(vId INT) BEGIN DELETE FROM vn.itemShelving WHERE id = vId; diff --git a/db/routines/vn/procedures/itemShelvingLog_get.sql b/db/routines/vn/procedures/itemShelvingLog_get.sql index ee3fc8b25..52e7a273f 100644 --- a/db/routines/vn/procedures/itemShelvingLog_get.sql +++ b/db/routines/vn/procedures/itemShelvingLog_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) BEGIN /** diff --git a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql b/db/routines/vn/procedures/itemShelvingMakeFromDate.sql index b8a0f3535..4918d55e1 100644 --- a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql +++ b/db/routines/vn/procedures/itemShelvingMakeFromDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingMakeFromDate`(IN `vShelvingFk` VARCHAR(8), IN `vBarcode` VARCHAR(22), IN `vQuantity` INT, IN `vPackagingFk` VARCHAR(10), IN `vGrouping` INT, IN `vPacking` INT, IN `vWarehouseFk` INT, `vCreated` VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingMakeFromDate`(IN `vShelvingFk` VARCHAR(8), IN `vBarcode` VARCHAR(22), IN `vQuantity` INT, IN `vPackagingFk` VARCHAR(10), IN `vGrouping` INT, IN `vPacking` INT, IN `vWarehouseFk` INT, `vCreated` VARCHAR(22)) BEGIN DECLARE vItemFk INT; diff --git a/db/routines/vn/procedures/itemShelvingMatch.sql b/db/routines/vn/procedures/itemShelvingMatch.sql index f94935162..850c7907b 100644 --- a/db/routines/vn/procedures/itemShelvingMatch.sql +++ b/db/routines/vn/procedures/itemShelvingMatch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) BEGIN DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql b/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql index 96fe8b514..085a3fe4b 100644 --- a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql +++ b/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) BEGIN INSERT INTO vn.itemShelvingPlacementSupply( itemShelvingFk, diff --git a/db/routines/vn/procedures/itemShelvingProblem.sql b/db/routines/vn/procedures/itemShelvingProblem.sql index 1a2d0a9aa..bb4725434 100644 --- a/db/routines/vn/procedures/itemShelvingProblem.sql +++ b/db/routines/vn/procedures/itemShelvingProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingProblem`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingProblem`(vSectorFk INT) BEGIN DECLARE vVisibleCache INT; diff --git a/db/routines/vn/procedures/itemShelvingRadar.sql b/db/routines/vn/procedures/itemShelvingRadar.sql index 0eb1d094d..4bdd0873e 100644 --- a/db/routines/vn/procedures/itemShelvingRadar.sql +++ b/db/routines/vn/procedures/itemShelvingRadar.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`( vSectorFk INT ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingRadar_Entry.sql b/db/routines/vn/procedures/itemShelvingRadar_Entry.sql index c6d047699..637b8f77f 100644 --- a/db/routines/vn/procedures/itemShelvingRadar_Entry.sql +++ b/db/routines/vn/procedures/itemShelvingRadar_Entry.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; diff --git a/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql b/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql index ba0ba93ee..3a8a3d297 100644 --- a/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql +++ b/db/routines/vn/procedures/itemShelvingRadar_Entry_State_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry_State_beta`(vEntryFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingRadar_Entry_State_beta`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; diff --git a/db/routines/vn/procedures/itemShelvingSale_Add.sql b/db/routines/vn/procedures/itemShelvingSale_Add.sql index 48193ca83..05b6b9d45 100644 --- a/db/routines/vn/procedures/itemShelvingSale_Add.sql +++ b/db/routines/vn/procedures/itemShelvingSale_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) BEGIN /** * Añade línea a itemShelvingSale y regulariza el carro diff --git a/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql index 0847bdcf6..bb915b99a 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addByCollection.sql @@ -1,6 +1,6 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addByCollection`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addByCollection`( vCollectionFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql index bfab30dbb..fbb93c524 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySale`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySale`( vSaleFk INT, vSectorFk INT ) diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql index 05ab08a63..33d024110 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySectorCollection`(vSectorCollectionFk INT(11)) BEGIN /** diff --git a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql index 8a7fe288f..bbb060934 100644 --- a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql +++ b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_doReserve`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_doReserve`() proc: BEGIN /** * Genera reservas de la tabla vn.itemShelvingSaleReserve diff --git a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql index e4922c096..a6d91c57b 100644 --- a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql +++ b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_reallocate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_reallocate`( vItemShelvingFk INT(10), vItemFk INT(10), vSectorFk INT diff --git a/db/routines/vn/procedures/itemShelvingSale_setPicked.sql b/db/routines/vn/procedures/itemShelvingSale_setPicked.sql index fdeda3046..993ff96f0 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setPicked.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setPicked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setPicked`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setPicked`( vSaleGroupFk INT(10) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql index 7693a6c57..297e74dea 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQuantity`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQuantity`( vItemShelvingSaleFk INT(10), vQuantity DECIMAL(10,0), vIsItemShelvingSaleEmpty BOOLEAN, diff --git a/db/routines/vn/procedures/itemShelvingSale_unpicked.sql b/db/routines/vn/procedures/itemShelvingSale_unpicked.sql index 464a639bf..3b636a7b4 100644 --- a/db/routines/vn/procedures/itemShelvingSale_unpicked.sql +++ b/db/routines/vn/procedures/itemShelvingSale_unpicked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelvingSale_unpicked`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_unpicked`( vSelf INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelving_add.sql b/db/routines/vn/procedures/itemShelving_add.sql index 26437b401..16e7713cd 100644 --- a/db/routines/vn/procedures/itemShelving_add.sql +++ b/db/routines/vn/procedures/itemShelving_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_add`( vShelvingFk VARCHAR(8), vBarcode VARCHAR(22), vQuantity INT, diff --git a/db/routines/vn/procedures/itemShelving_addByClaim.sql b/db/routines/vn/procedures/itemShelving_addByClaim.sql index a0bd6ba77..cdfece652 100644 --- a/db/routines/vn/procedures/itemShelving_addByClaim.sql +++ b/db/routines/vn/procedures/itemShelving_addByClaim.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) BEGIN /** * Insert items of claim into itemShelving. diff --git a/db/routines/vn/procedures/itemShelving_addList.sql b/db/routines/vn/procedures/itemShelving_addList.sql index d7f687659..05b392485 100644 --- a/db/routines/vn/procedures/itemShelving_addList.sql +++ b/db/routines/vn/procedures/itemShelving_addList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT) BEGIN /* Recorre cada elemento en la colección vList. * Si el parámetro isChecking = FALSE, llama a itemShelving_add. diff --git a/db/routines/vn/procedures/itemShelving_filterBuyer.sql b/db/routines/vn/procedures/itemShelving_filterBuyer.sql index a62e64edd..0d67a5f46 100644 --- a/db/routines/vn/procedures/itemShelving_filterBuyer.sql +++ b/db/routines/vn/procedures/itemShelving_filterBuyer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) proc:BEGIN /** * Lista de articulos filtrados por comprador diff --git a/db/routines/vn/procedures/itemShelving_get.sql b/db/routines/vn/procedures/itemShelving_get.sql index d8d24cf97..01aa993bf 100644 --- a/db/routines/vn/procedures/itemShelving_get.sql +++ b/db/routines/vn/procedures/itemShelving_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8)) BEGIN /** * Lista artículos de itemshelving diff --git a/db/routines/vn/procedures/itemShelving_getAlternatives.sql b/db/routines/vn/procedures/itemShelving_getAlternatives.sql index 5b7998ce6..89176c4f5 100644 --- a/db/routines/vn/procedures/itemShelving_getAlternatives.sql +++ b/db/routines/vn/procedures/itemShelving_getAlternatives.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) BEGIN /** * Devuelve un listado de posibles ubicaciones alternativas a ubicar los item de la matricula diff --git a/db/routines/vn/procedures/itemShelving_getInfo.sql b/db/routines/vn/procedures/itemShelving_getInfo.sql index 175ffa5db..f02100e8b 100644 --- a/db/routines/vn/procedures/itemShelving_getInfo.sql +++ b/db/routines/vn/procedures/itemShelving_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22)) BEGIN /** * Muestra información realtiva a la ubicación de un item diff --git a/db/routines/vn/procedures/itemShelving_getItemDetails.sql b/db/routines/vn/procedures/itemShelving_getItemDetails.sql index 6ca17139a..a57139970 100644 --- a/db/routines/vn/procedures/itemShelving_getItemDetails.sql +++ b/db/routines/vn/procedures/itemShelving_getItemDetails.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`( vBarcodeItem INT, vShelvingFK VARCHAR(10) ) diff --git a/db/routines/vn/procedures/itemShelving_getSaleDate.sql b/db/routines/vn/procedures/itemShelving_getSaleDate.sql index fd1096724..d8ab6ed0c 100644 --- a/db/routines/vn/procedures/itemShelving_getSaleDate.sql +++ b/db/routines/vn/procedures/itemShelving_getSaleDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) BEGIN /* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula. diff --git a/db/routines/vn/procedures/itemShelving_inventory.sql b/db/routines/vn/procedures/itemShelving_inventory.sql index f9999467d..b57df02e0 100644 --- a/db/routines/vn/procedures/itemShelving_inventory.sql +++ b/db/routines/vn/procedures/itemShelving_inventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) BEGIN /** * Devuelve un listado de ubicaciones a revisar diff --git a/db/routines/vn/procedures/itemShelving_selfConsumption.sql b/db/routines/vn/procedures/itemShelving_selfConsumption.sql index 8d7319e44..25ff2363c 100644 --- a/db/routines/vn/procedures/itemShelving_selfConsumption.sql +++ b/db/routines/vn/procedures/itemShelving_selfConsumption.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`( vShelvingFk VARCHAR(10) COLLATE utf8_general_ci, vItemFk INT, vQuantity INT diff --git a/db/routines/vn/procedures/itemShelving_transfer.sql b/db/routines/vn/procedures/itemShelving_transfer.sql index f2717ac20..cb8b7ce04 100644 --- a/db/routines/vn/procedures/itemShelving_transfer.sql +++ b/db/routines/vn/procedures/itemShelving_transfer.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`( vItemShelvingFk INT, vShelvingFk VARCHAR(10) ) diff --git a/db/routines/vn/procedures/itemShelving_update.sql b/db/routines/vn/procedures/itemShelving_update.sql index 1931afe0f..28dfc7c12 100644 --- a/db/routines/vn/procedures/itemShelving_update.sql +++ b/db/routines/vn/procedures/itemShelving_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) BEGIN /** * Actualiza itemShelving. diff --git a/db/routines/vn/procedures/itemTagMake.sql b/db/routines/vn/procedures/itemTagMake.sql index 7ee39716d..79120a6c0 100644 --- a/db/routines/vn/procedures/itemTagMake.sql +++ b/db/routines/vn/procedures/itemTagMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagMake`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemTagMake`(vItemFk INT) BEGIN /* * Crea los tags usando la tabla plantilla itemTag diff --git a/db/routines/vn/procedures/itemTagReorder.sql b/db/routines/vn/procedures/itemTagReorder.sql index d6177c67d..6902b1987 100644 --- a/db/routines/vn/procedures/itemTagReorder.sql +++ b/db/routines/vn/procedures/itemTagReorder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagReorder`(itemTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemTagReorder`(itemTypeFk INT) BEGIN SET @isTriggerDisabled = TRUE; diff --git a/db/routines/vn/procedures/itemTagReorderByName.sql b/db/routines/vn/procedures/itemTagReorderByName.sql index ed490d8e8..743667912 100644 --- a/db/routines/vn/procedures/itemTagReorderByName.sql +++ b/db/routines/vn/procedures/itemTagReorderByName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTagReorderByName`(vName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemTagReorderByName`(vName VARCHAR(255)) BEGIN SET @isTriggerDisabled = TRUE; diff --git a/db/routines/vn/procedures/itemTag_replace.sql b/db/routines/vn/procedures/itemTag_replace.sql index 631abe6ea..2db6ef524 100644 --- a/db/routines/vn/procedures/itemTag_replace.sql +++ b/db/routines/vn/procedures/itemTag_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100)) BEGIN /* Reemplaza los tags de un artículo por los de otro, así como su imagen diff --git a/db/routines/vn/procedures/itemTopSeller.sql b/db/routines/vn/procedures/itemTopSeller.sql index 6537a65c3..beccc6765 100644 --- a/db/routines/vn/procedures/itemTopSeller.sql +++ b/db/routines/vn/procedures/itemTopSeller.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemTopSeller`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemTopSeller`() BEGIN DECLARE vCategoryFk INTEGER; DECLARE vDone INT DEFAULT FALSE; diff --git a/db/routines/vn/procedures/itemUpdateTag.sql b/db/routines/vn/procedures/itemUpdateTag.sql index ce88a24fb..2c41ff63d 100644 --- a/db/routines/vn/procedures/itemUpdateTag.sql +++ b/db/routines/vn/procedures/itemUpdateTag.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemUpdateTag`(IN vItem BIGINT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemUpdateTag`(IN vItem BIGINT) BEGIN diff --git a/db/routines/vn/procedures/item_calcVisible.sql b/db/routines/vn/procedures/item_calcVisible.sql index 6328df0ad..814d3add3 100644 --- a/db/routines/vn/procedures/item_calcVisible.sql +++ b/db/routines/vn/procedures/item_calcVisible.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_calcVisible`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_calcVisible`( vSelf INT, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/item_cleanFloramondo.sql b/db/routines/vn/procedures/item_cleanFloramondo.sql index 547c3b9d9..849cfe93d 100644 --- a/db/routines/vn/procedures/item_cleanFloramondo.sql +++ b/db/routines/vn/procedures/item_cleanFloramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_cleanFloramondo`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_cleanFloramondo`() BEGIN /** * Elimina todos los items repetidos de floramondo diff --git a/db/routines/vn/procedures/item_comparative.sql b/db/routines/vn/procedures/item_comparative.sql index cd73eb4f6..298272708 100644 --- a/db/routines/vn/procedures/item_comparative.sql +++ b/db/routines/vn/procedures/item_comparative.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_comparative`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_comparative`( vDate DATETIME, vDayRange TINYINT, vWarehouseFk TINYINT, diff --git a/db/routines/vn/procedures/item_deactivateUnused.sql b/db/routines/vn/procedures/item_deactivateUnused.sql index cbb783aaf..cf8f22500 100644 --- a/db/routines/vn/procedures/item_deactivateUnused.sql +++ b/db/routines/vn/procedures/item_deactivateUnused.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_deactivateUnused`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_deactivateUnused`() BEGIN /** * Cambia a false el campo isActive de la tabla vn.item para todos aquellos diff --git a/db/routines/vn/procedures/item_devalueA2.sql b/db/routines/vn/procedures/item_devalueA2.sql index a0188d019..051c449e5 100644 --- a/db/routines/vn/procedures/item_devalueA2.sql +++ b/db/routines/vn/procedures/item_devalueA2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_devalueA2`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_devalueA2`( vSelf INT, vShelvingFK VARCHAR(10), vBuyingValue DECIMAL(10,4), diff --git a/db/routines/vn/procedures/item_getAtp.sql b/db/routines/vn/procedures/item_getAtp.sql index 4cff99635..3e90a7f58 100644 --- a/db/routines/vn/procedures/item_getAtp.sql +++ b/db/routines/vn/procedures/item_getAtp.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE) BEGIN /** * Calcula el valor mínimo acumulado para cada artículo ordenado por fecha y diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 683553500..a62c51acd 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getBalance`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getBalance`( vItemFk INT, vWarehouseFk INT, vDated DATETIME diff --git a/db/routines/vn/procedures/item_getInfo.sql b/db/routines/vn/procedures/item_getInfo.sql index 6411c2bb1..3b10634f5 100644 --- a/db/routines/vn/procedures/item_getInfo.sql +++ b/db/routines/vn/procedures/item_getInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT) BEGIN /** * Devuelve información relativa al item correspondiente del vBarcode pasado diff --git a/db/routines/vn/procedures/item_getLack.sql b/db/routines/vn/procedures/item_getLack.sql index 70e182a7c..45a6a6260 100644 --- a/db/routines/vn/procedures/item_getLack.sql +++ b/db/routines/vn/procedures/item_getLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getLack`(IN vForce BOOLEAN, IN vDays INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getLack`(IN vForce BOOLEAN, IN vDays INT) BEGIN /** * Calcula una tabla con el máximo negativo visible para cada producto y almacen diff --git a/db/routines/vn/procedures/item_getMinETD.sql b/db/routines/vn/procedures/item_getMinETD.sql index 9ed112375..62710231b 100644 --- a/db/routines/vn/procedures/item_getMinETD.sql +++ b/db/routines/vn/procedures/item_getMinETD.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getMinETD`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getMinETD`() BEGIN /* Devuelve una tabla temporal con la primera ETD, para todos los artículos con salida hoy. diff --git a/db/routines/vn/procedures/item_getMinacum.sql b/db/routines/vn/procedures/item_getMinacum.sql index 6e880b2b9..140b9a9ba 100644 --- a/db/routines/vn/procedures/item_getMinacum.sql +++ b/db/routines/vn/procedures/item_getMinacum.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT) BEGIN /** * Cálculo del mínimo acumulado, para un item/almacén especificado, en caso de diff --git a/db/routines/vn/procedures/item_getSimilar.sql b/db/routines/vn/procedures/item_getSimilar.sql index 2bc0dae20..823625b97 100644 --- a/db/routines/vn/procedures/item_getSimilar.sql +++ b/db/routines/vn/procedures/item_getSimilar.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getSimilar`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getSimilar`( vSelf INT, vWarehouseFk INT, vDated DATE, diff --git a/db/routines/vn/procedures/item_getStock.sql b/db/routines/vn/procedures/item_getStock.sql index 3dc522312..8c0eea251 100644 --- a/db/routines/vn/procedures/item_getStock.sql +++ b/db/routines/vn/procedures/item_getStock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_getStock`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getStock`( vWarehouseFk SMALLINT, vDated DATE, vItemFk INT diff --git a/db/routines/vn/procedures/item_multipleBuy.sql b/db/routines/vn/procedures/item_multipleBuy.sql index 4ff18a048..31909e6f6 100644 --- a/db/routines/vn/procedures/item_multipleBuy.sql +++ b/db/routines/vn/procedures/item_multipleBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_multipleBuy`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_multipleBuy`( vDate DATETIME, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/item_multipleBuyByDate.sql b/db/routines/vn/procedures/item_multipleBuyByDate.sql index 4b6f460b0..115202895 100644 --- a/db/routines/vn/procedures/item_multipleBuyByDate.sql +++ b/db/routines/vn/procedures/item_multipleBuyByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_multipleBuyByDate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_multipleBuyByDate`( vDated DATETIME, vWarehouseFk TINYINT(3) ) diff --git a/db/routines/vn/procedures/item_refreshFromTags.sql b/db/routines/vn/procedures/item_refreshFromTags.sql index f74ee59ab..704224993 100644 --- a/db/routines/vn/procedures/item_refreshFromTags.sql +++ b/db/routines/vn/procedures/item_refreshFromTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_refreshFromTags`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_refreshFromTags`(vSelf INT) BEGIN /** * Updates item attributes with its corresponding tags. diff --git a/db/routines/vn/procedures/item_refreshTags.sql b/db/routines/vn/procedures/item_refreshTags.sql index 7e8279c55..188242866 100644 --- a/db/routines/vn/procedures/item_refreshTags.sql +++ b/db/routines/vn/procedures/item_refreshTags.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_refreshTags`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_refreshTags`() BEGIN /** * Update item table, tag "cache" fields diff --git a/db/routines/vn/procedures/item_saveReference.sql b/db/routines/vn/procedures/item_saveReference.sql index 28cb70f01..4a4a5d1d7 100644 --- a/db/routines/vn/procedures/item_saveReference.sql +++ b/db/routines/vn/procedures/item_saveReference.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) BEGIN /** diff --git a/db/routines/vn/procedures/item_setGeneric.sql b/db/routines/vn/procedures/item_setGeneric.sql index b646fb592..6f6600759 100644 --- a/db/routines/vn/procedures/item_setGeneric.sql +++ b/db/routines/vn/procedures/item_setGeneric.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_setGeneric`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_setGeneric`(vSelf INT) BEGIN /** * Asigna el código genérico a un item, salvo que sea un código de item genérico. diff --git a/db/routines/vn/procedures/item_setVisibleDiscard.sql b/db/routines/vn/procedures/item_setVisibleDiscard.sql index 7c9d24ad8..976cb5014 100644 --- a/db/routines/vn/procedures/item_setVisibleDiscard.sql +++ b/db/routines/vn/procedures/item_setVisibleDiscard.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_setVisibleDiscard`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_setVisibleDiscard`( vItemFk INT, vWarehouseFk INT, vQuantity INT, diff --git a/db/routines/vn/procedures/item_updatePackingType.sql b/db/routines/vn/procedures/item_updatePackingType.sql index 86b437b0d..021bab11c 100644 --- a/db/routines/vn/procedures/item_updatePackingType.sql +++ b/db/routines/vn/procedures/item_updatePackingType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** * Update the packing type of an item diff --git a/db/routines/vn/procedures/item_valuateInventory.sql b/db/routines/vn/procedures/item_valuateInventory.sql index e05de2f1b..5a8d4b9b0 100644 --- a/db/routines/vn/procedures/item_valuateInventory.sql +++ b/db/routines/vn/procedures/item_valuateInventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_valuateInventory`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_valuateInventory`( vDated DATE, vItemTypeFk INT, vItemCategoryFk INT diff --git a/db/routines/vn/procedures/item_zoneClosure.sql b/db/routines/vn/procedures/item_zoneClosure.sql index e50742a85..6b33f1b0a 100644 --- a/db/routines/vn/procedures/item_zoneClosure.sql +++ b/db/routines/vn/procedures/item_zoneClosure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`item_zoneClosure`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_zoneClosure`() BEGIN /* Devuelve una tabla temporal con la hora minima de un ticket sino tiene el de la zoneClosure y diff --git a/db/routines/vn/procedures/ledger_doCompensation.sql b/db/routines/vn/procedures/ledger_doCompensation.sql index 64efcc21b..c2149a1f1 100644 --- a/db/routines/vn/procedures/ledger_doCompensation.sql +++ b/db/routines/vn/procedures/ledger_doCompensation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`( vDated DATE, vCompensationAccount VARCHAR(10), vBankFk VARCHAR(10), diff --git a/db/routines/vn/procedures/ledger_next.sql b/db/routines/vn/procedures/ledger_next.sql index 3e5a3c445..34fbb1cdc 100644 --- a/db/routines/vn/procedures/ledger_next.sql +++ b/db/routines/vn/procedures/ledger_next.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_next`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ledger_next`( IN vFiscalYear INT, OUT vLastBookEntry INT ) diff --git a/db/routines/vn/procedures/ledger_nextTx.sql b/db/routines/vn/procedures/ledger_nextTx.sql index ec6d73e8f..0a32861a3 100644 --- a/db/routines/vn/procedures/ledger_nextTx.sql +++ b/db/routines/vn/procedures/ledger_nextTx.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ledger_nextTx`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ledger_nextTx`( IN vFiscalYear INT, OUT vLastBookEntry INT ) diff --git a/db/routines/vn/procedures/logShow.sql b/db/routines/vn/procedures/logShow.sql index db525937b..0aad86095 100644 --- a/db/routines/vn/procedures/logShow.sql +++ b/db/routines/vn/procedures/logShow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`logShow`(vOriginFk INT, vEntity VARCHAR(45)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`logShow`(vOriginFk INT, vEntity VARCHAR(45)) BEGIN /** * Muestra las acciones realizadas por el usuario diff --git a/db/routines/vn/procedures/lungSize_generator.sql b/db/routines/vn/procedures/lungSize_generator.sql index 91ffd29bc..e3f2009e1 100644 --- a/db/routines/vn/procedures/lungSize_generator.sql +++ b/db/routines/vn/procedures/lungSize_generator.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`lungSize_generator`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`lungSize_generator`(vDate DATE) BEGIN SET @buildingOrder := 0; diff --git a/db/routines/vn/procedures/machineWorker_add.sql b/db/routines/vn/procedures/machineWorker_add.sql index 6e4197f4d..41000f556 100644 --- a/db/routines/vn/procedures/machineWorker_add.sql +++ b/db/routines/vn/procedures/machineWorker_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/machineWorker_getHistorical.sql b/db/routines/vn/procedures/machineWorker_getHistorical.sql index 72fa005ee..67b1971a2 100644 --- a/db/routines/vn/procedures/machineWorker_getHistorical.sql +++ b/db/routines/vn/procedures/machineWorker_getHistorical.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) BEGIN /** * Obtiene historial de la matrícula vPlate que el trabajador vWorkerFk escanea, diff --git a/db/routines/vn/procedures/machineWorker_update.sql b/db/routines/vn/procedures/machineWorker_update.sql index eed51c52c..f1a6e40b5 100644 --- a/db/routines/vn/procedures/machineWorker_update.sql +++ b/db/routines/vn/procedures/machineWorker_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/machine_getWorkerPlate.sql b/db/routines/vn/procedures/machine_getWorkerPlate.sql index ea3e8d963..cbb71c4cf 100644 --- a/db/routines/vn/procedures/machine_getWorkerPlate.sql +++ b/db/routines/vn/procedures/machine_getWorkerPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT) BEGIN /** * Selecciona la matrícula del vehículo del workerfk diff --git a/db/routines/vn/procedures/mail_insert.sql b/db/routines/vn/procedures/mail_insert.sql index d290a1248..8af84e145 100644 --- a/db/routines/vn/procedures/mail_insert.sql +++ b/db/routines/vn/procedures/mail_insert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mail_insert`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`mail_insert`( vReceiver VARCHAR(255), vReplyTo VARCHAR(50), vSubject VARCHAR(100), diff --git a/db/routines/vn/procedures/makeNewItem.sql b/db/routines/vn/procedures/makeNewItem.sql index c96e12868..6e5c5b244 100644 --- a/db/routines/vn/procedures/makeNewItem.sql +++ b/db/routines/vn/procedures/makeNewItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`makeNewItem`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`makeNewItem`() BEGIN DECLARE newItemFk INT; diff --git a/db/routines/vn/procedures/makePCSGraf.sql b/db/routines/vn/procedures/makePCSGraf.sql index 96be6405d..7fbef5ec0 100644 --- a/db/routines/vn/procedures/makePCSGraf.sql +++ b/db/routines/vn/procedures/makePCSGraf.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`makePCSGraf`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`makePCSGraf`(vDated DATE) BEGIN diff --git a/db/routines/vn/procedures/manaSpellersRequery.sql b/db/routines/vn/procedures/manaSpellersRequery.sql index f127e8d2e..4bb64d454 100644 --- a/db/routines/vn/procedures/manaSpellersRequery.sql +++ b/db/routines/vn/procedures/manaSpellersRequery.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`manaSpellersRequery`(vWorkerFk INTEGER) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`manaSpellersRequery`(vWorkerFk INTEGER) `whole_proc`: BEGIN /** diff --git a/db/routines/vn/procedures/multipleInventory.sql b/db/routines/vn/procedures/multipleInventory.sql index f3d4c3ecd..c051706b7 100644 --- a/db/routines/vn/procedures/multipleInventory.sql +++ b/db/routines/vn/procedures/multipleInventory.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`multipleInventory`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`multipleInventory`( vDate DATE, vWarehouseFk TINYINT, vMaxDays TINYINT diff --git a/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql b/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql index 755316bab..0dbe34bdd 100644 --- a/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql +++ b/db/routines/vn/procedures/mysqlConnectionsSorter_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mysqlConnectionsSorter_kill`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`mysqlConnectionsSorter_kill`() BEGIN /** diff --git a/db/routines/vn/procedures/mysqlPreparedCount_check.sql b/db/routines/vn/procedures/mysqlPreparedCount_check.sql index adb40db49..c388036a5 100644 --- a/db/routines/vn/procedures/mysqlPreparedCount_check.sql +++ b/db/routines/vn/procedures/mysqlPreparedCount_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`mysqlPreparedCount_check`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`mysqlPreparedCount_check`() BEGIN DECLARE vPreparedCount INTEGER; diff --git a/db/routines/vn/procedures/nextShelvingCodeMake.sql b/db/routines/vn/procedures/nextShelvingCodeMake.sql index 865c86ec0..5fc90beac 100644 --- a/db/routines/vn/procedures/nextShelvingCodeMake.sql +++ b/db/routines/vn/procedures/nextShelvingCodeMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`nextShelvingCodeMake`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`nextShelvingCodeMake`() BEGIN DECLARE newShelving VARCHAR(3); diff --git a/db/routines/vn/procedures/observationAdd.sql b/db/routines/vn/procedures/observationAdd.sql index 5d3a69385..98935436c 100644 --- a/db/routines/vn/procedures/observationAdd.sql +++ b/db/routines/vn/procedures/observationAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) BEGIN /** * Guarda las observaciones realizadas por el usuario diff --git a/db/routines/vn/procedures/orderCreate.sql b/db/routines/vn/procedures/orderCreate.sql index 9c4139f3e..87f98673b 100644 --- a/db/routines/vn/procedures/orderCreate.sql +++ b/db/routines/vn/procedures/orderCreate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderCreate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`orderCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, diff --git a/db/routines/vn/procedures/orderDelete.sql b/db/routines/vn/procedures/orderDelete.sql index 0b9cadaa3..95f800395 100644 --- a/db/routines/vn/procedures/orderDelete.sql +++ b/db/routines/vn/procedures/orderDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderDelete`(IN vId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`orderDelete`(IN vId INT) BEGIN DELETE FROM hedera.`order` where id = vId; diff --git a/db/routines/vn/procedures/orderListCreate.sql b/db/routines/vn/procedures/orderListCreate.sql index e489b23ea..aa7d1284d 100644 --- a/db/routines/vn/procedures/orderListCreate.sql +++ b/db/routines/vn/procedures/orderListCreate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderListCreate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`orderListCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, diff --git a/db/routines/vn/procedures/orderListVolume.sql b/db/routines/vn/procedures/orderListVolume.sql index de4690271..946f20d95 100644 --- a/db/routines/vn/procedures/orderListVolume.sql +++ b/db/routines/vn/procedures/orderListVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`orderListVolume`(IN vOrderId INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`orderListVolume`(IN vOrderId INT) BEGIN SELECT diff --git a/db/routines/vn/procedures/packingListSwitch.sql b/db/routines/vn/procedures/packingListSwitch.sql index c426b83be..47009b007 100644 --- a/db/routines/vn/procedures/packingListSwitch.sql +++ b/db/routines/vn/procedures/packingListSwitch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`packingListSwitch`(saleFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`packingListSwitch`(saleFk INT) BEGIN DECLARE valueFk INT; diff --git a/db/routines/vn/procedures/packingSite_startCollection.sql b/db/routines/vn/procedures/packingSite_startCollection.sql index c8939bf03..6c613f5db 100644 --- a/db/routines/vn/procedures/packingSite_startCollection.sql +++ b/db/routines/vn/procedures/packingSite_startCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`packingSite_startCollection`(vSelf INT, vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`packingSite_startCollection`(vSelf INT, vTicketFk INT) proc: BEGIN /** * @param vSelf packingSite id diff --git a/db/routines/vn/procedures/parking_add.sql b/db/routines/vn/procedures/parking_add.sql index 0fed6e1a6..38d974eb0 100644 --- a/db/routines/vn/procedures/parking_add.sql +++ b/db/routines/vn/procedures/parking_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) BEGIN DECLARE vColumn INT; diff --git a/db/routines/vn/procedures/parking_algemesi.sql b/db/routines/vn/procedures/parking_algemesi.sql index 004f26a86..b9087f57a 100644 --- a/db/routines/vn/procedures/parking_algemesi.sql +++ b/db/routines/vn/procedures/parking_algemesi.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) BEGIN DECLARE vRow INT; diff --git a/db/routines/vn/procedures/parking_new.sql b/db/routines/vn/procedures/parking_new.sql index b98216a2e..ba7101828 100644 --- a/db/routines/vn/procedures/parking_new.sql +++ b/db/routines/vn/procedures/parking_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_new`(vStart INT, vEnd INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`parking_new`(vStart INT, vEnd INT, vSectorFk INT) BEGIN DECLARE vRow INT; diff --git a/db/routines/vn/procedures/parking_setOrder.sql b/db/routines/vn/procedures/parking_setOrder.sql index 7ef8522e2..26c601abd 100644 --- a/db/routines/vn/procedures/parking_setOrder.sql +++ b/db/routines/vn/procedures/parking_setOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`parking_setOrder`(vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`parking_setOrder`(vWarehouseFk INT) BEGIN /* diff --git a/db/routines/vn/procedures/payment_add.sql b/db/routines/vn/procedures/payment_add.sql index 18e8834d1..769b72241 100644 --- a/db/routines/vn/procedures/payment_add.sql +++ b/db/routines/vn/procedures/payment_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`payment_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`payment_add`( vDated DATE, vSupplierFk INT, vAmount DOUBLE, diff --git a/db/routines/vn/procedures/prepareClientList.sql b/db/routines/vn/procedures/prepareClientList.sql index 457ca4496..d4576999c 100644 --- a/db/routines/vn/procedures/prepareClientList.sql +++ b/db/routines/vn/procedures/prepareClientList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`prepareClientList`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`prepareClientList`() BEGIN /* diff --git a/db/routines/vn/procedures/prepareTicketList.sql b/db/routines/vn/procedures/prepareTicketList.sql index 864d65ddc..7c44bb994 100644 --- a/db/routines/vn/procedures/prepareTicketList.sql +++ b/db/routines/vn/procedures/prepareTicketList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.productionTicket; CREATE TEMPORARY TABLE tmp.productionTicket diff --git a/db/routines/vn/procedures/previousSticker_get.sql b/db/routines/vn/procedures/previousSticker_get.sql index 9cdd3a488..90f2bec37 100644 --- a/db/routines/vn/procedures/previousSticker_get.sql +++ b/db/routines/vn/procedures/previousSticker_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`previousSticker_get`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`previousSticker_get`(vSaleGroupFk INT) BEGIN /** * Devuelve los campos a imprimir en una etiqueta de preparación previa. diff --git a/db/routines/vn/procedures/printer_checkSector.sql b/db/routines/vn/procedures/printer_checkSector.sql index 91323a6d8..bb8ad9d85 100644 --- a/db/routines/vn/procedures/printer_checkSector.sql +++ b/db/routines/vn/procedures/printer_checkSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) BEGIN /** * Comprueba si la impresora pertenece al sector diff --git a/db/routines/vn/procedures/productionControl.sql b/db/routines/vn/procedures/productionControl.sql index 2d427d0cd..f36841e7c 100644 --- a/db/routines/vn/procedures/productionControl.sql +++ b/db/routines/vn/procedures/productionControl.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionControl`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`productionControl`( vWarehouseFk INT, vScopeDays INT ) diff --git a/db/routines/vn/procedures/productionError_add.sql b/db/routines/vn/procedures/productionError_add.sql index 23d9f0436..e86b5ff0d 100644 --- a/db/routines/vn/procedures/productionError_add.sql +++ b/db/routines/vn/procedures/productionError_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionError_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`productionError_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/productionError_addCheckerPackager.sql b/db/routines/vn/procedures/productionError_addCheckerPackager.sql index 408fe8f82..7968aec38 100644 --- a/db/routines/vn/procedures/productionError_addCheckerPackager.sql +++ b/db/routines/vn/procedures/productionError_addCheckerPackager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionError_addCheckerPackager`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`productionError_addCheckerPackager`( vDatedFrom DATETIME, vDatedTo DATETIME, vRol VARCHAR(50)) diff --git a/db/routines/vn/procedures/productionSectorList.sql b/db/routines/vn/procedures/productionSectorList.sql index f104fb916..f61ec7ec9 100644 --- a/db/routines/vn/procedures/productionSectorList.sql +++ b/db/routines/vn/procedures/productionSectorList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`productionSectorList`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`productionSectorList`(vSectorFk INT) BEGIN /** * Devuelve el listado de sale que se puede preparar en previa para ese sector diff --git a/db/routines/vn/procedures/raidUpdate.sql b/db/routines/vn/procedures/raidUpdate.sql index 1f0f6e429..71352868e 100644 --- a/db/routines/vn/procedures/raidUpdate.sql +++ b/db/routines/vn/procedures/raidUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`raidUpdate`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`raidUpdate`() BEGIN /** * Actualiza el travel de las entradas de redadas diff --git a/db/routines/vn/procedures/rangeDateInfo.sql b/db/routines/vn/procedures/rangeDateInfo.sql index 0ce85efbe..a748680b0 100644 --- a/db/routines/vn/procedures/rangeDateInfo.sql +++ b/db/routines/vn/procedures/rangeDateInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rangeDateInfo`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`rangeDateInfo`(vStarted DATE, vEnded DATE) BEGIN /** * Crea una tabla temporal con las fechas diff --git a/db/routines/vn/procedures/rateView.sql b/db/routines/vn/procedures/rateView.sql index e0cef4bb8..a92c2bd5b 100644 --- a/db/routines/vn/procedures/rateView.sql +++ b/db/routines/vn/procedures/rateView.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rateView`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`rateView`() BEGIN /** * Muestra información sobre tasas de cambio de Dolares diff --git a/db/routines/vn/procedures/rate_getPrices.sql b/db/routines/vn/procedures/rate_getPrices.sql index 73051866a..9674dbacf 100644 --- a/db/routines/vn/procedures/rate_getPrices.sql +++ b/db/routines/vn/procedures/rate_getPrices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`rate_getPrices`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`rate_getPrices`( vDated DATE, vWarehouseFk INT ) diff --git a/db/routines/vn/procedures/recipe_Plaster.sql b/db/routines/vn/procedures/recipe_Plaster.sql index 6554bf781..c77c03ef2 100644 --- a/db/routines/vn/procedures/recipe_Plaster.sql +++ b/db/routines/vn/procedures/recipe_Plaster.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) BEGIN DECLARE vLastCost DECIMAL(10,2); diff --git a/db/routines/vn/procedures/remittance_calc.sql b/db/routines/vn/procedures/remittance_calc.sql index 0eab43d68..ee0a65fcd 100644 --- a/db/routines/vn/procedures/remittance_calc.sql +++ b/db/routines/vn/procedures/remittance_calc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`remittance_calc`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`remittance_calc`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/reportLabelCollection_get.sql b/db/routines/vn/procedures/reportLabelCollection_get.sql index dcb899ac3..fc6faf471 100644 --- a/db/routines/vn/procedures/reportLabelCollection_get.sql +++ b/db/routines/vn/procedures/reportLabelCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`reportLabelCollection_get`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`reportLabelCollection_get`( vParam INT, vLabelCount INT ) diff --git a/db/routines/vn/procedures/report_print.sql b/db/routines/vn/procedures/report_print.sql index 9c8192d75..a5e08538e 100644 --- a/db/routines/vn/procedures/report_print.sql +++ b/db/routines/vn/procedures/report_print.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`report_print`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`report_print`( vReportName VARCHAR(100), vPrinterFk INT, vUserFk INT, diff --git a/db/routines/vn/procedures/routeGuessPriority.sql b/db/routines/vn/procedures/routeGuessPriority.sql index b626721a7..b5445bc50 100644 --- a/db/routines/vn/procedures/routeGuessPriority.sql +++ b/db/routines/vn/procedures/routeGuessPriority.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeGuessPriority`(IN vRuta INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`routeGuessPriority`(IN vRuta INT) BEGIN /* Usa los valores del ultimo año para adivinar el orden de los tickets en la ruta * vRuta id ruta diff --git a/db/routines/vn/procedures/routeInfo.sql b/db/routines/vn/procedures/routeInfo.sql index a8f124da0..bcfba3f51 100644 --- a/db/routines/vn/procedures/routeInfo.sql +++ b/db/routines/vn/procedures/routeInfo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeInfo`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`routeInfo`(vRouteFk INT) BEGIN DECLARE vPackages INT; diff --git a/db/routines/vn/procedures/routeMonitor_calculate.sql b/db/routines/vn/procedures/routeMonitor_calculate.sql index 1a21b63cc..c9a7a9ccf 100644 --- a/db/routines/vn/procedures/routeMonitor_calculate.sql +++ b/db/routines/vn/procedures/routeMonitor_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeMonitor_calculate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`routeMonitor_calculate`( vDate DATE, vDaysAgo INT ) diff --git a/db/routines/vn/procedures/routeSetOk.sql b/db/routines/vn/procedures/routeSetOk.sql index 419697956..bd77c7c14 100644 --- a/db/routines/vn/procedures/routeSetOk.sql +++ b/db/routines/vn/procedures/routeSetOk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeSetOk`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`routeSetOk`( vRouteFk INT) BEGIN diff --git a/db/routines/vn/procedures/routeUpdateM3.sql b/db/routines/vn/procedures/routeUpdateM3.sql index 2d21b5a8f..a3f78bfa3 100644 --- a/db/routines/vn/procedures/routeUpdateM3.sql +++ b/db/routines/vn/procedures/routeUpdateM3.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`routeUpdateM3`(vRoute INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`routeUpdateM3`(vRoute INT) BEGIN /** * @deprecated Use vn.route_updateM3() diff --git a/db/routines/vn/procedures/route_calcCommission.sql b/db/routines/vn/procedures/route_calcCommission.sql index 70e6a5cba..7c911a5e2 100644 --- a/db/routines/vn/procedures/route_calcCommission.sql +++ b/db/routines/vn/procedures/route_calcCommission.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_calcCommission`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`route_calcCommission`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/route_doRecalc.sql b/db/routines/vn/procedures/route_doRecalc.sql index 7698d9576..03faa8df1 100644 --- a/db/routines/vn/procedures/route_doRecalc.sql +++ b/db/routines/vn/procedures/route_doRecalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_doRecalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`route_doRecalc`() proc: BEGIN /** * Recalculates modified route. diff --git a/db/routines/vn/procedures/route_getTickets.sql b/db/routines/vn/procedures/route_getTickets.sql index 48a482121..136c8f520 100644 --- a/db/routines/vn/procedures/route_getTickets.sql +++ b/db/routines/vn/procedures/route_getTickets.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_getTickets`(vRouteFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`route_getTickets`(vRouteFk INT) BEGIN /** * Pasado un RouteFk devuelve la información diff --git a/db/routines/vn/procedures/route_updateM3.sql b/db/routines/vn/procedures/route_updateM3.sql index e55671c71..f6842bf1d 100644 --- a/db/routines/vn/procedures/route_updateM3.sql +++ b/db/routines/vn/procedures/route_updateM3.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`route_updateM3`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`route_updateM3`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/saleBuy_Add.sql b/db/routines/vn/procedures/saleBuy_Add.sql index 1ff9b518f..7ad1f051d 100644 --- a/db/routines/vn/procedures/saleBuy_Add.sql +++ b/db/routines/vn/procedures/saleBuy_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleBuy_Add`(vSaleFk INT, vBuyFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleBuy_Add`(vSaleFk INT, vBuyFk INT) BEGIN /* Añade un registro a la tabla saleBuy en el caso de que sea posible mantener la trazabilidad diff --git a/db/routines/vn/procedures/saleGroup_add.sql b/db/routines/vn/procedures/saleGroup_add.sql index 0023214ee..2057c4ac8 100644 --- a/db/routines/vn/procedures/saleGroup_add.sql +++ b/db/routines/vn/procedures/saleGroup_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleGroup_add`(vSectorFk INT,vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleGroup_add`(vSectorFk INT,vTicketFk INT) BEGIN /** * Añade un nuevo registro a la tabla y devuelve su id. diff --git a/db/routines/vn/procedures/saleGroup_setParking.sql b/db/routines/vn/procedures/saleGroup_setParking.sql index 7c6cbcaf1..889583c82 100644 --- a/db/routines/vn/procedures/saleGroup_setParking.sql +++ b/db/routines/vn/procedures/saleGroup_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`( vSaleGroupFk VARCHAR(8), vParkingFk INT ) diff --git a/db/routines/vn/procedures/saleMistake_Add.sql b/db/routines/vn/procedures/saleMistake_Add.sql index 9334080d2..93db28bb9 100644 --- a/db/routines/vn/procedures/saleMistake_Add.sql +++ b/db/routines/vn/procedures/saleMistake_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) BEGIN INSERT INTO vn.saleMistake(saleFk, userFk, typeFk) diff --git a/db/routines/vn/procedures/salePreparingList.sql b/db/routines/vn/procedures/salePreparingList.sql index ed22aba69..9964c3e87 100644 --- a/db/routines/vn/procedures/salePreparingList.sql +++ b/db/routines/vn/procedures/salePreparingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`salePreparingList`(IN vTicketFk BIGINT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`salePreparingList`(IN vTicketFk BIGINT) BEGIN /** * Devuelve un listado con las lineas de vn.sale y los distintos estados de prepacion diff --git a/db/routines/vn/procedures/saleSplit.sql b/db/routines/vn/procedures/saleSplit.sql index 1db171fef..6fa4d48b3 100644 --- a/db/routines/vn/procedures/saleSplit.sql +++ b/db/routines/vn/procedures/saleSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleSplit`(vSaleFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleSplit`(vSaleFk INT, vQuantity INT) BEGIN diff --git a/db/routines/vn/procedures/saleTracking_add.sql b/db/routines/vn/procedures/saleTracking_add.sql index e0c20c1eb..6b7fa5ed3 100644 --- a/db/routines/vn/procedures/saleTracking_add.sql +++ b/db/routines/vn/procedures/saleTracking_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_add`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_add`(vSaleGroupFk INT) BEGIN /** Inserta en vn.saleTracking las lineas de una previa * diff --git a/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql b/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql index 4856749a6..8c5d336ab 100644 --- a/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql +++ b/db/routines/vn/procedures/saleTracking_addPreparedSaleGroup.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) BEGIN /** * Inserta lineas de vn.saleTracking para un saleGroup (previa) que escanea un sacador diff --git a/db/routines/vn/procedures/saleTracking_addPrevOK.sql b/db/routines/vn/procedures/saleTracking_addPrevOK.sql index df4ae7c15..34d1cfac8 100644 --- a/db/routines/vn/procedures/saleTracking_addPrevOK.sql +++ b/db/routines/vn/procedures/saleTracking_addPrevOK.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_addPrevOK`(vSectorCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_addPrevOK`(vSectorCollectionFk INT) BEGIN /** * Inserta los registros de la colección de sector con el estado PREVIA OK diff --git a/db/routines/vn/procedures/saleTracking_del.sql b/db/routines/vn/procedures/saleTracking_del.sql index 0f50ade6c..3c8282b1e 100644 --- a/db/routines/vn/procedures/saleTracking_del.sql +++ b/db/routines/vn/procedures/saleTracking_del.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) BEGIN DELETE FROM itemShelvingSale diff --git a/db/routines/vn/procedures/saleTracking_new.sql b/db/routines/vn/procedures/saleTracking_new.sql index 2f0101308..f43ba53fa 100644 --- a/db/routines/vn/procedures/saleTracking_new.sql +++ b/db/routines/vn/procedures/saleTracking_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_new`( vSaleFK INT, vIsChecked BOOLEAN, vOriginalQuantity INT, diff --git a/db/routines/vn/procedures/saleTracking_updateIsChecked.sql b/db/routines/vn/procedures/saleTracking_updateIsChecked.sql index fdb28ef42..0d4d27f73 100644 --- a/db/routines/vn/procedures/saleTracking_updateIsChecked.sql +++ b/db/routines/vn/procedures/saleTracking_updateIsChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) BEGIN /** diff --git a/db/routines/vn/procedures/sale_PriceFix.sql b/db/routines/vn/procedures/sale_PriceFix.sql index 57db40540..bdd7ad77f 100644 --- a/db/routines/vn/procedures/sale_PriceFix.sql +++ b/db/routines/vn/procedures/sale_PriceFix.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_PriceFix`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_PriceFix`(vTicketFk INT) BEGIN DELETE sc.* diff --git a/db/routines/vn/procedures/sale_boxPickingPrint.sql b/db/routines/vn/procedures/sale_boxPickingPrint.sql index df9afe9ad..acb60ed31 100644 --- a/db/routines/vn/procedures/sale_boxPickingPrint.sql +++ b/db/routines/vn/procedures/sale_boxPickingPrint.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE vn.sale_boxPickingPrint( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE vn.sale_boxPickingPrint( IN vPrinterFk INT, IN vSaleFk INT, IN vPacking INT, diff --git a/db/routines/vn/procedures/sale_calculateComponent.sql b/db/routines/vn/procedures/sale_calculateComponent.sql index d302fb8d6..4264603cd 100644 --- a/db/routines/vn/procedures/sale_calculateComponent.sql +++ b/db/routines/vn/procedures/sale_calculateComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_calculateComponent`(vSelf INT, vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_calculateComponent`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** * Crea tabla temporal para vn.sale_recalcComponent() para recalcular los componentes diff --git a/db/routines/vn/procedures/sale_getBoxPickingList.sql b/db/routines/vn/procedures/sale_getBoxPickingList.sql index fdedee774..f343ab375 100644 --- a/db/routines/vn/procedures/sale_getBoxPickingList.sql +++ b/db/routines/vn/procedures/sale_getBoxPickingList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getBoxPickingList`(vSectorFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_getBoxPickingList`(vSectorFk INT, vDated DATE) BEGIN /** * Returns a suitable boxPicking sales list diff --git a/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql b/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql index 94e601ec5..b395d5bc4 100644 --- a/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql +++ b/db/routines/vn/procedures/sale_getFromTicketOrCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getFromTicketOrCollection`(vParam INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_getFromTicketOrCollection`(vParam INT) BEGIN /** * Visualizar lineas de la tabla sale a través del parámetro vParam que puede diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 339e6c65f..5a68b2351 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1)) BEGIN /** * Calcula los problemas de cada venta para un conjunto de tickets. diff --git a/db/routines/vn/procedures/sale_getProblemsByTicket.sql b/db/routines/vn/procedures/sale_getProblemsByTicket.sql index 3cb004895..8c7c6ae85 100644 --- a/db/routines/vn/procedures/sale_getProblemsByTicket.sql +++ b/db/routines/vn/procedures/sale_getProblemsByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) BEGIN /** * Calcula los problemas de cada venta diff --git a/db/routines/vn/procedures/sale_recalcComponent.sql b/db/routines/vn/procedures/sale_recalcComponent.sql index 99c191b12..e9b32f794 100644 --- a/db/routines/vn/procedures/sale_recalcComponent.sql +++ b/db/routines/vn/procedures/sale_recalcComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_recalcComponent`(vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_recalcComponent`(vOption VARCHAR(25)) proc: BEGIN /** * Este procedimiento recalcula los componentes de un conjunto de sales, diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 6366e6633..f0e9ef8cc 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) BEGIN /** * Añade un nuevo articulo para sustituir a otro, y actualiza la memoria de sustituciones. diff --git a/db/routines/vn/procedures/sale_setProblem.sql b/db/routines/vn/procedures/sale_setProblem.sql index f92caa396..04be4ab81 100644 --- a/db/routines/vn/procedures/sale_setProblem.sql +++ b/db/routines/vn/procedures/sale_setProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_setProblem`( vProblemCode VARCHAR(25) ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemComponentLack.sql b/db/routines/vn/procedures/sale_setProblemComponentLack.sql index caf4312a1..2fca94dd2 100644 --- a/db/routines/vn/procedures/sale_setProblemComponentLack.sql +++ b/db/routines/vn/procedures/sale_setProblemComponentLack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLack`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLack`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql b/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql index cd582749b..fafc663e7 100644 --- a/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql +++ b/db/routines/vn/procedures/sale_setProblemComponentLackByComponent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLackByComponent`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLackByComponent`( vComponentFk INT ) BEGIN diff --git a/db/routines/vn/procedures/sale_setProblemRounding.sql b/db/routines/vn/procedures/sale_setProblemRounding.sql index 19a8cb7bc..8b6188870 100644 --- a/db/routines/vn/procedures/sale_setProblemRounding.sql +++ b/db/routines/vn/procedures/sale_setProblemRounding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sale_setProblemRounding`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sale_setProblemRounding`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/sales_merge.sql b/db/routines/vn/procedures/sales_merge.sql index 86874e2c2..e3fcd275a 100644 --- a/db/routines/vn/procedures/sales_merge.sql +++ b/db/routines/vn/procedures/sales_merge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/vn/procedures/sales_mergeByCollection.sql b/db/routines/vn/procedures/sales_mergeByCollection.sql index 0560ec733..1abb8f25b 100644 --- a/db/routines/vn/procedures/sales_mergeByCollection.sql +++ b/db/routines/vn/procedures/sales_mergeByCollection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sales_mergeByCollection`(vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sales_mergeByCollection`(vCollectionFk INT) BEGIN DECLARE vDone BOOL; diff --git a/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql b/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql index 31ba38913..9ca1227c1 100644 --- a/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql +++ b/db/routines/vn/procedures/sectorCollectionSaleGroup_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) BEGIN /** * Inserta un nuevo registro en vn.sectorCollectionSaleGroup diff --git a/db/routines/vn/procedures/sectorCollection_get.sql b/db/routines/vn/procedures/sectorCollection_get.sql index c8eb21145..97a44b150 100644 --- a/db/routines/vn/procedures/sectorCollection_get.sql +++ b/db/routines/vn/procedures/sectorCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_get`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorCollection_get`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas diff --git a/db/routines/vn/procedures/sectorCollection_getMyPartial.sql b/db/routines/vn/procedures/sectorCollection_getMyPartial.sql index afc82505a..e02455235 100644 --- a/db/routines/vn/procedures/sectorCollection_getMyPartial.sql +++ b/db/routines/vn/procedures/sectorCollection_getMyPartial.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_getMyPartial`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorCollection_getMyPartial`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas diff --git a/db/routines/vn/procedures/sectorCollection_getSale.sql b/db/routines/vn/procedures/sectorCollection_getSale.sql index 360b5e95a..b3b1f0f3f 100644 --- a/db/routines/vn/procedures/sectorCollection_getSale.sql +++ b/db/routines/vn/procedures/sectorCollection_getSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_getSale`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorCollection_getSale`(vSelf INT) BEGIN /** * Devuelve las lineas de venta correspondientes a esa coleccion de sector diff --git a/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql b/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql index 2304bff47..6d0fb8f23 100644 --- a/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql +++ b/db/routines/vn/procedures/sectorCollection_hasSalesReserved.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION vn.sectorCollection_hasSalesReserved(vSelf INT) RETURNS tinyint(1) +CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION vn.sectorCollection_hasSalesReserved(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** diff --git a/db/routines/vn/procedures/sectorCollection_new.sql b/db/routines/vn/procedures/sectorCollection_new.sql index b67d355f1..3f0112015 100644 --- a/db/routines/vn/procedures/sectorCollection_new.sql +++ b/db/routines/vn/procedures/sectorCollection_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorCollection_new`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorCollection_new`(vSectorFk INT) BEGIN /** * Inserta una nueva colección, si el usuario no tiene ninguna vacia. diff --git a/db/routines/vn/procedures/sectorProductivity_add.sql b/db/routines/vn/procedures/sectorProductivity_add.sql index ea5f1b316..8b520e692 100644 --- a/db/routines/vn/procedures/sectorProductivity_add.sql +++ b/db/routines/vn/procedures/sectorProductivity_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sectorProductivity_add`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sectorProductivity_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/sector_getWarehouse.sql b/db/routines/vn/procedures/sector_getWarehouse.sql index 4177e3d26..5a9f1ee5f 100644 --- a/db/routines/vn/procedures/sector_getWarehouse.sql +++ b/db/routines/vn/procedures/sector_getWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sector_getWarehouse`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sector_getWarehouse`(vSectorFk INT) BEGIN SELECT s.warehouseFk diff --git a/db/routines/vn/procedures/setParking.sql b/db/routines/vn/procedures/setParking.sql index 55a14b5bc..96b459031 100644 --- a/db/routines/vn/procedures/setParking.sql +++ b/db/routines/vn/procedures/setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`setParking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`setParking`( vParam VARCHAR(8), vParkingCode VARCHAR(8) ) diff --git a/db/routines/vn/procedures/shelvingChange.sql b/db/routines/vn/procedures/shelvingChange.sql index 8dd71255e..2e7e92082 100644 --- a/db/routines/vn/procedures/shelvingChange.sql +++ b/db/routines/vn/procedures/shelvingChange.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) BEGIN UPDATE vn.itemShelving diff --git a/db/routines/vn/procedures/shelvingLog_get.sql b/db/routines/vn/procedures/shelvingLog_get.sql index 2d662c502..d72d6cf8b 100644 --- a/db/routines/vn/procedures/shelvingLog_get.sql +++ b/db/routines/vn/procedures/shelvingLog_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingLog_get`(shelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingLog_get`(shelvingFk VARCHAR(10)) BEGIN /* Lista el log de un carro diff --git a/db/routines/vn/procedures/shelvingParking_get.sql b/db/routines/vn/procedures/shelvingParking_get.sql index 5e4aa19ec..a9ed9f74a 100644 --- a/db/routines/vn/procedures/shelvingParking_get.sql +++ b/db/routines/vn/procedures/shelvingParking_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) BEGIN diff --git a/db/routines/vn/procedures/shelvingPriority_update.sql b/db/routines/vn/procedures/shelvingPriority_update.sql index 8414ae2a4..87019e9cf 100644 --- a/db/routines/vn/procedures/shelvingPriority_update.sql +++ b/db/routines/vn/procedures/shelvingPriority_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) BEGIN UPDATE vn.shelving SET priority = priority WHERE code=vShelvingFk COLLATE utf8_unicode_ci; diff --git a/db/routines/vn/procedures/shelving_clean.sql b/db/routines/vn/procedures/shelving_clean.sql index a648bec99..d2cb7caad 100644 --- a/db/routines/vn/procedures/shelving_clean.sql +++ b/db/routines/vn/procedures/shelving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_clean`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelving_clean`() BEGIN DELETE FROM shelving diff --git a/db/routines/vn/procedures/shelving_getSpam.sql b/db/routines/vn/procedures/shelving_getSpam.sql index ea3552e98..cef407285 100644 --- a/db/routines/vn/procedures/shelving_getSpam.sql +++ b/db/routines/vn/procedures/shelving_getSpam.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_getSpam`(vDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelving_getSpam`(vDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve las matrículas con productos que no son necesarios para la venta diff --git a/db/routines/vn/procedures/shelving_setParking.sql b/db/routines/vn/procedures/shelving_setParking.sql index f596d47aa..f9acad74d 100644 --- a/db/routines/vn/procedures/shelving_setParking.sql +++ b/db/routines/vn/procedures/shelving_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelving_setParking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelving_setParking`( `vShelvingCode` VARCHAR(8), `vParkingFk` INT ) diff --git a/db/routines/vn/procedures/sleep_X_min.sql b/db/routines/vn/procedures/sleep_X_min.sql index 688895ab9..507432390 100644 --- a/db/routines/vn/procedures/sleep_X_min.sql +++ b/db/routines/vn/procedures/sleep_X_min.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`sleep_X_min`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`sleep_X_min`() BEGIN # Ernesto. 4.8.2020 # Para su uso en las tareas ejecutadas a las 2AM (visibles con: SELECT * FROM bs.nightTask order by started asc;) diff --git a/db/routines/vn/procedures/stockBuyedByWorker.sql b/db/routines/vn/procedures/stockBuyedByWorker.sql index ef532a193..a0bad78d4 100644 --- a/db/routines/vn/procedures/stockBuyedByWorker.sql +++ b/db/routines/vn/procedures/stockBuyedByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`( vDated DATE, vWorker INT ) diff --git a/db/routines/vn/procedures/stockBuyed_add.sql b/db/routines/vn/procedures/stockBuyed_add.sql index 572b15204..104a2d34d 100644 --- a/db/routines/vn/procedures/stockBuyed_add.sql +++ b/db/routines/vn/procedures/stockBuyed_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockBuyed_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyed_add`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/stockTraslation.sql b/db/routines/vn/procedures/stockTraslation.sql index d0d67df08..a23f9a1a5 100644 --- a/db/routines/vn/procedures/stockTraslation.sql +++ b/db/routines/vn/procedures/stockTraslation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`stockTraslation`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockTraslation`( vDated DATE ) BEGIN diff --git a/db/routines/vn/procedures/subordinateGetList.sql b/db/routines/vn/procedures/subordinateGetList.sql index 82b3f157d..9eeddef94 100644 --- a/db/routines/vn/procedures/subordinateGetList.sql +++ b/db/routines/vn/procedures/subordinateGetList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`subordinateGetList`(vBossFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`subordinateGetList`(vBossFk INT) BEGIN -- deprecated usar vn.worker_GetHierarch diff --git a/db/routines/vn/procedures/supplierExpenses.sql b/db/routines/vn/procedures/supplierExpenses.sql index 687845da0..a219ee9e9 100644 --- a/db/routines/vn/procedures/supplierExpenses.sql +++ b/db/routines/vn/procedures/supplierExpenses.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplierExpenses`(vEnded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplierExpenses`(vEnded DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS openingBalance; diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index 84dd11b33..6700a4932 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( vFromDated DATE, vSupplierFk INT ) diff --git a/db/routines/vn/procedures/supplier_checkBalance.sql b/db/routines/vn/procedures/supplier_checkBalance.sql index 1b224d351..5e5cd5aed 100644 --- a/db/routines/vn/procedures/supplier_checkBalance.sql +++ b/db/routines/vn/procedures/supplier_checkBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros proveedores con diff --git a/db/routines/vn/procedures/supplier_checkIsActive.sql b/db/routines/vn/procedures/supplier_checkIsActive.sql index 8e6dd53e5..75118d03a 100644 --- a/db/routines/vn/procedures/supplier_checkIsActive.sql +++ b/db/routines/vn/procedures/supplier_checkIsActive.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_checkIsActive`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplier_checkIsActive`(vSelf INT) BEGIN /** * Comprueba si un proveedor esta activo. diff --git a/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql b/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql index e783e8884..02cbbcb8f 100644 --- a/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql +++ b/db/routines/vn/procedures/supplier_disablePayMethodChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_disablePayMethodChecked`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplier_disablePayMethodChecked`() BEGIN /* diff --git a/db/routines/vn/procedures/supplier_statement.sql b/db/routines/vn/procedures/supplier_statement.sql index 733c01476..0b3aca89d 100644 --- a/db/routines/vn/procedures/supplier_statement.sql +++ b/db/routines/vn/procedures/supplier_statement.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`supplier_statement`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`supplier_statement`( vSupplierFk INT, vCurrencyFk INT, vCompanyFk INT, diff --git a/db/routines/vn/procedures/ticketBoxesView.sql b/db/routines/vn/procedures/ticketBoxesView.sql index 19d612fe9..4f62a3d6c 100644 --- a/db/routines/vn/procedures/ticketBoxesView.sql +++ b/db/routines/vn/procedures/ticketBoxesView.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketBoxesView`(IN vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketBoxesView`(IN vTicketFk INT) BEGIN SELECT s.id, diff --git a/db/routines/vn/procedures/ticketBuiltTime.sql b/db/routines/vn/procedures/ticketBuiltTime.sql index 6fe536eef..0e1938681 100644 --- a/db/routines/vn/procedures/ticketBuiltTime.sql +++ b/db/routines/vn/procedures/ticketBuiltTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketBuiltTime`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketBuiltTime`(vDate DATE) BEGIN DECLARE vDateStart DATETIME DEFAULT DATE(vDate); diff --git a/db/routines/vn/procedures/ticketCalculateClon.sql b/db/routines/vn/procedures/ticketCalculateClon.sql index 94364a79d..872efee10 100644 --- a/db/routines/vn/procedures/ticketCalculateClon.sql +++ b/db/routines/vn/procedures/ticketCalculateClon.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) BEGIN /* * Recalcula los componentes un ticket clonado, diff --git a/db/routines/vn/procedures/ticketCalculateFromType.sql b/db/routines/vn/procedures/ticketCalculateFromType.sql index 7ab042b8f..54d180abd 100644 --- a/db/routines/vn/procedures/ticketCalculateFromType.sql +++ b/db/routines/vn/procedures/ticketCalculateFromType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculateFromType`( vLanded DATE, +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketCalculateFromType`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vTypeFk INT) diff --git a/db/routines/vn/procedures/ticketCalculatePurge.sql b/db/routines/vn/procedures/ticketCalculatePurge.sql index 7afc6f1a7..da126281f 100644 --- a/db/routines/vn/procedures/ticketCalculatePurge.sql +++ b/db/routines/vn/procedures/ticketCalculatePurge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCalculatePurge`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketCalculatePurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketCalculateItem, diff --git a/db/routines/vn/procedures/ticketClon.sql b/db/routines/vn/procedures/ticketClon.sql index 7d0674a68..9d7d1c5b3 100644 --- a/db/routines/vn/procedures/ticketClon.sql +++ b/db/routines/vn/procedures/ticketClon.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketClon`(vTicketFk INT, vNewShipped DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketClon`(vTicketFk INT, vNewShipped DATE) BEGIN DECLARE vNewTicketFk INT; diff --git a/db/routines/vn/procedures/ticketClon_OneYear.sql b/db/routines/vn/procedures/ticketClon_OneYear.sql index efe49688e..31f896a22 100644 --- a/db/routines/vn/procedures/ticketClon_OneYear.sql +++ b/db/routines/vn/procedures/ticketClon_OneYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketClon_OneYear`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketClon_OneYear`(vTicketFk INT) BEGIN DECLARE vShipped DATE; diff --git a/db/routines/vn/procedures/ticketCollection_get.sql b/db/routines/vn/procedures/ticketCollection_get.sql index e01ca0151..6af94fbf2 100644 --- a/db/routines/vn/procedures/ticketCollection_get.sql +++ b/db/routines/vn/procedures/ticketCollection_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCollection_get`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketCollection_get`(vTicketFk INT) BEGIN SELECT tc.collectionFk diff --git a/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql b/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql index 5d9a9cefd..8851fcafb 100644 --- a/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql +++ b/db/routines/vn/procedures/ticketCollection_setUsedShelves.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) BEGIN /* diff --git a/db/routines/vn/procedures/ticketComponentUpdate.sql b/db/routines/vn/procedures/ticketComponentUpdate.sql index 96d8a165a..373bf8fbc 100644 --- a/db/routines/vn/procedures/ticketComponentUpdate.sql +++ b/db/routines/vn/procedures/ticketComponentUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketComponentUpdate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketComponentUpdate`( vTicketFk INT, vClientFk INT, vAgencyModeFk INT, diff --git a/db/routines/vn/procedures/ticketComponentUpdateSale.sql b/db/routines/vn/procedures/ticketComponentUpdateSale.sql index c1a42f771..26ede95c2 100644 --- a/db/routines/vn/procedures/ticketComponentUpdateSale.sql +++ b/db/routines/vn/procedures/ticketComponentUpdateSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketComponentUpdateSale`(vCode VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketComponentUpdateSale`(vCode VARCHAR(25)) BEGIN /** * A partir de la tabla tmp.sale, crea los Movimientos_componentes diff --git a/db/routines/vn/procedures/ticketDown_PrintableSelection.sql b/db/routines/vn/procedures/ticketDown_PrintableSelection.sql index a9c0cfd17..082a890a6 100644 --- a/db/routines/vn/procedures/ticketDown_PrintableSelection.sql +++ b/db/routines/vn/procedures/ticketDown_PrintableSelection.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketDown_PrintableSelection`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketDown_PrintableSelection`(vSectorFk INT) BEGIN UPDATE vn.ticketDown td diff --git a/db/routines/vn/procedures/ticketGetTaxAdd.sql b/db/routines/vn/procedures/ticketGetTaxAdd.sql index c26453e3a..b977ae042 100644 --- a/db/routines/vn/procedures/ticketGetTaxAdd.sql +++ b/db/routines/vn/procedures/ticketGetTaxAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTaxAdd`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketGetTaxAdd`(vTicketFk INT) BEGIN /** * Añade un ticket a la tabla tmp.ticket para calcular diff --git a/db/routines/vn/procedures/ticketGetTax_new.sql b/db/routines/vn/procedures/ticketGetTax_new.sql index 9b2f237dc..b7df8a766 100644 --- a/db/routines/vn/procedures/ticketGetTax_new.sql +++ b/db/routines/vn/procedures/ticketGetTax_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTax_new`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketGetTax_new`() READS SQL DATA BEGIN /** diff --git a/db/routines/vn/procedures/ticketGetTotal.sql b/db/routines/vn/procedures/ticketGetTotal.sql index ec5c6846c..02c824009 100644 --- a/db/routines/vn/procedures/ticketGetTotal.sql +++ b/db/routines/vn/procedures/ticketGetTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetTotal`(vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketGetTotal`(vTaxArea VARCHAR(25)) BEGIN /** * Calcula el total con IVA para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticketGetVisibleAvailable.sql b/db/routines/vn/procedures/ticketGetVisibleAvailable.sql index 54ca2c1bf..01010f548 100644 --- a/db/routines/vn/procedures/ticketGetVisibleAvailable.sql +++ b/db/routines/vn/procedures/ticketGetVisibleAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketGetVisibleAvailable`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketGetVisibleAvailable`( vTicket INT) BEGIN DECLARE vVisibleCalc INT; diff --git a/db/routines/vn/procedures/ticketNotInvoicedByClient.sql b/db/routines/vn/procedures/ticketNotInvoicedByClient.sql index 274eaaa63..7933fda80 100644 --- a/db/routines/vn/procedures/ticketNotInvoicedByClient.sql +++ b/db/routines/vn/procedures/ticketNotInvoicedByClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketNotInvoicedByClient`(vClientFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketNotInvoicedByClient`(vClientFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticket; diff --git a/db/routines/vn/procedures/ticketObservation_addNewBorn.sql b/db/routines/vn/procedures/ticketObservation_addNewBorn.sql index c1a7afad0..3e04c8c4e 100644 --- a/db/routines/vn/procedures/ticketObservation_addNewBorn.sql +++ b/db/routines/vn/procedures/ticketObservation_addNewBorn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketObservation_addNewBorn`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketObservation_addNewBorn`(vTicketFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticketPackaging_add.sql b/db/routines/vn/procedures/ticketPackaging_add.sql index 3d223e601..ed791a5f2 100644 --- a/db/routines/vn/procedures/ticketPackaging_add.sql +++ b/db/routines/vn/procedures/ticketPackaging_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketPackaging_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketPackaging_add`( vClientFk INT, vDated DATE, vCompanyFk INT, diff --git a/db/routines/vn/procedures/ticketParking_findSkipped.sql b/db/routines/vn/procedures/ticketParking_findSkipped.sql index b3d609b76..14ab28a15 100644 --- a/db/routines/vn/procedures/ticketParking_findSkipped.sql +++ b/db/routines/vn/procedures/ticketParking_findSkipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** diff --git a/db/routines/vn/procedures/ticketStateToday_setState.sql b/db/routines/vn/procedures/ticketStateToday_setState.sql index fd54b705c..8802c3d08 100644 --- a/db/routines/vn/procedures/ticketStateToday_setState.sql +++ b/db/routines/vn/procedures/ticketStateToday_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) BEGIN /* Modifica el estado de un ticket de hoy diff --git a/db/routines/vn/procedures/ticketToInvoiceByAddress.sql b/db/routines/vn/procedures/ticketToInvoiceByAddress.sql index 0ebb8426f..5e554d358 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByAddress.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByAddress`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByAddress`( vStarted DATE, vEnded DATETIME, vAddress INT, diff --git a/db/routines/vn/procedures/ticketToInvoiceByDate.sql b/db/routines/vn/procedures/ticketToInvoiceByDate.sql index 38996354a..52e418ee3 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByDate.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByDate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByDate`( vStarted DATE, vEnded DATETIME, vClient INT, diff --git a/db/routines/vn/procedures/ticketToInvoiceByRef.sql b/db/routines/vn/procedures/ticketToInvoiceByRef.sql index f63b8450c..390340143 100644 --- a/db/routines/vn/procedures/ticketToInvoiceByRef.sql +++ b/db/routines/vn/procedures/ticketToInvoiceByRef.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. diff --git a/db/routines/vn/procedures/ticket_Clone.sql b/db/routines/vn/procedures/ticket_Clone.sql index 62fde53c6..f97655007 100644 --- a/db/routines/vn/procedures/ticket_Clone.sql +++ b/db/routines/vn/procedures/ticket_Clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN /** * Clona el contenido de un ticket en otro diff --git a/db/routines/vn/procedures/ticket_DelayTruck.sql b/db/routines/vn/procedures/ticket_DelayTruck.sql index 560f786e8..ebd0e5baf 100644 --- a/db/routines/vn/procedures/ticket_DelayTruck.sql +++ b/db/routines/vn/procedures/ticket_DelayTruck.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) BEGIN DECLARE done INT DEFAULT FALSE; DECLARE vTicketFk INT; diff --git a/db/routines/vn/procedures/ticket_DelayTruckSplit.sql b/db/routines/vn/procedures/ticket_DelayTruckSplit.sql index bd5759cee..1dc45d065 100644 --- a/db/routines/vn/procedures/ticket_DelayTruckSplit.sql +++ b/db/routines/vn/procedures/ticket_DelayTruckSplit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_DelayTruckSplit`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_DelayTruckSplit`( vTicketFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_WeightDeclaration.sql b/db/routines/vn/procedures/ticket_WeightDeclaration.sql index 013c72643..9105cfc61 100644 --- a/db/routines/vn/procedures/ticket_WeightDeclaration.sql +++ b/db/routines/vn/procedures/ticket_WeightDeclaration.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_WeightDeclaration`(vClientFk INT, vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_WeightDeclaration`(vClientFk INT, vDated DATE) BEGIN DECLARE vTheorycalWeight DECIMAL(10,2); diff --git a/db/routines/vn/procedures/ticket_add.sql b/db/routines/vn/procedures/ticket_add.sql index 58f699e9b..03ad7246b 100644 --- a/db/routines/vn/procedures/ticket_add.sql +++ b/db/routines/vn/procedures/ticket_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_add`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_add`( vClientId INT ,vShipped DATE ,vWarehouseFk INT diff --git a/db/routines/vn/procedures/ticket_administrativeCopy.sql b/db/routines/vn/procedures/ticket_administrativeCopy.sql index 9ccc3d5e5..7e8c436a8 100644 --- a/db/routines/vn/procedures/ticket_administrativeCopy.sql +++ b/db/routines/vn/procedures/ticket_administrativeCopy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN INSERT INTO vn.ticket(clientFk, addressFk, shipped, warehouseFk, companyFk, landed) diff --git a/db/routines/vn/procedures/ticket_canAdvance.sql b/db/routines/vn/procedures/ticket_canAdvance.sql index ea772ca17..44149126a 100644 --- a/db/routines/vn/procedures/ticket_canAdvance.sql +++ b/db/routines/vn/procedures/ticket_canAdvance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) BEGIN /** * Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar. diff --git a/db/routines/vn/procedures/ticket_canMerge.sql b/db/routines/vn/procedures/ticket_canMerge.sql index 4db78292f..ce90551db 100644 --- a/db/routines/vn/procedures/ticket_canMerge.sql +++ b/db/routines/vn/procedures/ticket_canMerge.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT) BEGIN /** * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro diff --git a/db/routines/vn/procedures/ticket_canbePostponed.sql b/db/routines/vn/procedures/ticket_canbePostponed.sql index b6c4ac435..871cafddc 100644 --- a/db/routines/vn/procedures/ticket_canbePostponed.sql +++ b/db/routines/vn/procedures/ticket_canbePostponed.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro diff --git a/db/routines/vn/procedures/ticket_checkNoComponents.sql b/db/routines/vn/procedures/ticket_checkNoComponents.sql index bada90838..aa2947763 100644 --- a/db/routines/vn/procedures/ticket_checkNoComponents.sql +++ b/db/routines/vn/procedures/ticket_checkNoComponents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_cloneAll.sql b/db/routines/vn/procedures/ticket_cloneAll.sql index da938854c..30f0431f7 100644 --- a/db/routines/vn/procedures/ticket_cloneAll.sql +++ b/db/routines/vn/procedures/ticket_cloneAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) BEGIN DECLARE vDone BOOLEAN DEFAULT FALSE; diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index 7a5f1a493..f2e4f96de 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_cloneWeekly`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_cloneWeekly`( vDateFrom DATE, vDateTo DATE ) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 1badf21e8..92ddd8d82 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_close`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_close`() BEGIN /** * Realiza el cierre de todos los diff --git a/db/routines/vn/procedures/ticket_closeByTicket.sql b/db/routines/vn/procedures/ticket_closeByTicket.sql index 32a9dbef9..bd0b5b102 100644 --- a/db/routines/vn/procedures/ticket_closeByTicket.sql +++ b/db/routines/vn/procedures/ticket_closeByTicket.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_closeByTicket`(IN vTicketFk int) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_closeByTicket`(IN vTicketFk int) BEGIN /** * Inserta el ticket en la tabla temporal diff --git a/db/routines/vn/procedures/ticket_componentMakeUpdate.sql b/db/routines/vn/procedures/ticket_componentMakeUpdate.sql index 30574b196..fa6b79068 100644 --- a/db/routines/vn/procedures/ticket_componentMakeUpdate.sql +++ b/db/routines/vn/procedures/ticket_componentMakeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_componentMakeUpdate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_componentMakeUpdate`( vTicketFk INT, vClientFk INT, vNickname VARCHAR(50), diff --git a/db/routines/vn/procedures/ticket_componentPreview.sql b/db/routines/vn/procedures/ticket_componentPreview.sql index 93600f276..de76d8a61 100644 --- a/db/routines/vn/procedures/ticket_componentPreview.sql +++ b/db/routines/vn/procedures/ticket_componentPreview.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_componentPreview`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_componentPreview`( vTicketFk INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/vn/procedures/ticket_doCmr.sql b/db/routines/vn/procedures/ticket_doCmr.sql index 16ce2bef8..ba64944f8 100644 --- a/db/routines/vn/procedures/ticket_doCmr.sql +++ b/db/routines/vn/procedures/ticket_doCmr.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(vSelf INT) BEGIN /** * Crea u actualiza la información del CMR asociado con diff --git a/db/routines/vn/procedures/ticket_getFromFloramondo.sql b/db/routines/vn/procedures/ticket_getFromFloramondo.sql index 001a1e33d..05c625653 100644 --- a/db/routines/vn/procedures/ticket_getFromFloramondo.sql +++ b/db/routines/vn/procedures/ticket_getFromFloramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) BEGIN /** * Genera una tabla con la lista de tickets de Floramondo diff --git a/db/routines/vn/procedures/ticket_getMovable.sql b/db/routines/vn/procedures/ticket_getMovable.sql index 90c8eced0..cf56316f1 100644 --- a/db/routines/vn/procedures/ticket_getMovable.sql +++ b/db/routines/vn/procedures/ticket_getMovable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getMovable`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getMovable`( vTicketFk INT, vNewShipped DATETIME, vWarehouseFk INT diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index 95810d6da..321e45730 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1)) BEGIN /** * Calcula los problemas para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticket_getSplitList.sql b/db/routines/vn/procedures/ticket_getSplitList.sql index 260d272d4..988bc2931 100644 --- a/db/routines/vn/procedures/ticket_getSplitList.sql +++ b/db/routines/vn/procedures/ticket_getSplitList.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) BEGIN /** * Devuelve un listado con los tickets posibles para splitar HOY. diff --git a/db/routines/vn/procedures/ticket_getTax.sql b/db/routines/vn/procedures/ticket_getTax.sql index 9f1bcd58d..947c45806 100644 --- a/db/routines/vn/procedures/ticket_getTax.sql +++ b/db/routines/vn/procedures/ticket_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getTax`(IN vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getTax`(IN vTaxArea VARCHAR(25)) BEGIN /** * Calcula la base imponible, el IVA y el recargo de equivalencia para diff --git a/db/routines/vn/procedures/ticket_getWarnings.sql b/db/routines/vn/procedures/ticket_getWarnings.sql index 4481b33d8..d817a92bb 100644 --- a/db/routines/vn/procedures/ticket_getWarnings.sql +++ b/db/routines/vn/procedures/ticket_getWarnings.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getWarnings`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getWarnings`() BEGIN /** * Calcula las adventencias para un conjunto de tickets. diff --git a/db/routines/vn/procedures/ticket_getWithParameters.sql b/db/routines/vn/procedures/ticket_getWithParameters.sql index 8118c91fc..02a6d8a1d 100644 --- a/db/routines/vn/procedures/ticket_getWithParameters.sql +++ b/db/routines/vn/procedures/ticket_getWithParameters.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_getWithParameters`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_getWithParameters`( vClientFk INT, vWarehouseFk INT, vShipped DATE, diff --git a/db/routines/vn/procedures/ticket_insertZone.sql b/db/routines/vn/procedures/ticket_insertZone.sql index 293341091..600bf80ee 100644 --- a/db/routines/vn/procedures/ticket_insertZone.sql +++ b/db/routines/vn/procedures/ticket_insertZone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_insertZone`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_insertZone`() BEGIN DECLARE vDone INT DEFAULT 0; DECLARE vFechedTicket INT; diff --git a/db/routines/vn/procedures/ticket_priceDifference.sql b/db/routines/vn/procedures/ticket_priceDifference.sql index d099f6b32..5e36be8a0 100644 --- a/db/routines/vn/procedures/ticket_priceDifference.sql +++ b/db/routines/vn/procedures/ticket_priceDifference.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_priceDifference`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_priceDifference`( vTicketFk INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/vn/procedures/ticket_printLabelPrevious.sql b/db/routines/vn/procedures/ticket_printLabelPrevious.sql index dc4242d56..e40e125b5 100644 --- a/db/routines/vn/procedures/ticket_printLabelPrevious.sql +++ b/db/routines/vn/procedures/ticket_printLabelPrevious.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_printLabelPrevious`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_printLabelPrevious`(vTicketFk INT) BEGIN /** * Calls the report_print procedure and passes it diff --git a/db/routines/vn/procedures/ticket_recalc.sql b/db/routines/vn/procedures/ticket_recalc.sql index ed78ca2d7..ee408a8ca 100644 --- a/db/routines/vn/procedures/ticket_recalc.sql +++ b/db/routines/vn/procedures/ticket_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) proc:BEGIN /** * Calcula y guarda el total con/sin IVA en un ticket. diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 5917f5d89..833256736 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalcByScope`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_recalcByScope`( vScope VARCHAR(255), vId INT ) diff --git a/db/routines/vn/procedures/ticket_recalcComponents.sql b/db/routines/vn/procedures/ticket_recalcComponents.sql index 070faec32..86a40a4eb 100644 --- a/db/routines/vn/procedures/ticket_recalcComponents.sql +++ b/db/routines/vn/procedures/ticket_recalcComponents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setNextState.sql b/db/routines/vn/procedures/ticket_setNextState.sql index d64a42934..164bf34e4 100644 --- a/db/routines/vn/procedures/ticket_setNextState.sql +++ b/db/routines/vn/procedures/ticket_setNextState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setNextState`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setNextState`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setParking.sql b/db/routines/vn/procedures/ticket_setParking.sql index 4ffd0400d..acc9a2aee 100644 --- a/db/routines/vn/procedures/ticket_setParking.sql +++ b/db/routines/vn/procedures/ticket_setParking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setParking`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setParking`( vSelf INT, vParkingFk INT ) diff --git a/db/routines/vn/procedures/ticket_setPreviousState.sql b/db/routines/vn/procedures/ticket_setPreviousState.sql index 785b3019a..aaf482c30 100644 --- a/db/routines/vn/procedures/ticket_setPreviousState.sql +++ b/db/routines/vn/procedures/ticket_setPreviousState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setPreviousState`(vTicketFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setPreviousState`(vTicketFk INT) BEGIN DECLARE vControlFk INT; diff --git a/db/routines/vn/procedures/ticket_setProblem.sql b/db/routines/vn/procedures/ticket_setProblem.sql index e6b5971f1..acd318e89 100644 --- a/db/routines/vn/procedures/ticket_setProblem.sql +++ b/db/routines/vn/procedures/ticket_setProblem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblem`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblem`( vProblemCode VARCHAR(25) ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemFreeze.sql b/db/routines/vn/procedures/ticket_setProblemFreeze.sql index 1b556be86..622894dfa 100644 --- a/db/routines/vn/procedures/ticket_setProblemFreeze.sql +++ b/db/routines/vn/procedures/ticket_setProblemFreeze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemFreeze`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemFreeze`( vClientFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRequest.sql b/db/routines/vn/procedures/ticket_setProblemRequest.sql index 6202e0d28..f84847b65 100644 --- a/db/routines/vn/procedures/ticket_setProblemRequest.sql +++ b/db/routines/vn/procedures/ticket_setProblemRequest.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRequest`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemRequest`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRisk.sql b/db/routines/vn/procedures/ticket_setProblemRisk.sql index 20bd30c46..60a188d3e 100644 --- a/db/routines/vn/procedures/ticket_setProblemRisk.sql +++ b/db/routines/vn/procedures/ticket_setProblemRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRisk`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemRisk`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemRounding.sql b/db/routines/vn/procedures/ticket_setProblemRounding.sql index 2cedc2dd7..3b924bd62 100644 --- a/db/routines/vn/procedures/ticket_setProblemRounding.sql +++ b/db/routines/vn/procedures/ticket_setProblemRounding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemRounding`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemRounding`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql b/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql index 707b71353..f5c9a88b6 100644 --- a/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql +++ b/db/routines/vn/procedures/ticket_setProblemTaxDataChecked.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemTaxDataChecked`(vClientFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql index a0b89c5e9..062ee4252 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittle`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittle`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql b/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql index 3f59c3316..acbfd22e9 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittleItemCost.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittleItemCost`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittleItemCost`( vItemFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setRisk.sql b/db/routines/vn/procedures/ticket_setRisk.sql index 068532391..ab2784ccb 100644 --- a/db/routines/vn/procedures/ticket_setRisk.sql +++ b/db/routines/vn/procedures/ticket_setRisk.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setRisk`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setRisk`( vClientFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/ticket_setState.sql b/db/routines/vn/procedures/ticket_setState.sql index 9539a5e32..f4906fb11 100644 --- a/db/routines/vn/procedures/ticket_setState.sql +++ b/db/routines/vn/procedures/ticket_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setState`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setState`( vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci ) diff --git a/db/routines/vn/procedures/ticket_split.sql b/db/routines/vn/procedures/ticket_split.sql index 9023cd7b2..c16b7d0df 100644 --- a/db/routines/vn/procedures/ticket_split.sql +++ b/db/routines/vn/procedures/ticket_split.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_split`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_split`( vTicketFk INT, vTicketFutureFk INT, vDated DATE diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index 8e47b5717..e7878acde 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_splitItemPackingType`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPackingType`( vSelf INT, vOriginalItemPackingTypeFk VARCHAR(1) ) diff --git a/db/routines/vn/procedures/ticket_splitPackingComplete.sql b/db/routines/vn/procedures/ticket_splitPackingComplete.sql index 703955816..cc2e4183d 100644 --- a/db/routines/vn/procedures/ticket_splitPackingComplete.sql +++ b/db/routines/vn/procedures/ticket_splitPackingComplete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) BEGIN DECLARE vNeedToSplit BOOLEAN; diff --git a/db/routines/vn/procedures/timeBusiness_calculate.sql b/db/routines/vn/procedures/timeBusiness_calculate.sql index e7b0e3d53..448a061ad 100644 --- a/db/routines/vn/procedures/timeBusiness_calculate.sql +++ b/db/routines/vn/procedures/timeBusiness_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * Horas que debe trabajar un empleado según contrato y día. diff --git a/db/routines/vn/procedures/timeBusiness_calculateAll.sql b/db/routines/vn/procedures/timeBusiness_calculateAll.sql index fbac865a4..6ba9edbd4 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateAll.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql b/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql index eb8a4701e..8253e322f 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk diff --git a/db/routines/vn/procedures/timeBusiness_calculateByUser.sql b/db/routines/vn/procedures/timeBusiness_calculateByUser.sql index efa4b5080..800d21c73 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByUser.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql b/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql index e9f93e7fd..29a9f8f5c 100644 --- a/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql +++ b/db/routines/vn/procedures/timeBusiness_calculateByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculate.sql b/db/routines/vn/procedures/timeControl_calculate.sql index c315d1aa3..f37e0f521 100644 --- a/db/routines/vn/procedures/timeControl_calculate.sql +++ b/db/routines/vn/procedures/timeControl_calculate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_calculate`( vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN diff --git a/db/routines/vn/procedures/timeControl_calculateAll.sql b/db/routines/vn/procedures/timeControl_calculateAll.sql index 78b68acc6..ae085a6a6 100644 --- a/db/routines/vn/procedures/timeControl_calculateAll.sql +++ b/db/routines/vn/procedures/timeControl_calculateAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculateByDepartment.sql b/db/routines/vn/procedures/timeControl_calculateByDepartment.sql index 0088b43b6..bdd096a77 100644 --- a/db/routines/vn/procedures/timeControl_calculateByDepartment.sql +++ b/db/routines/vn/procedures/timeControl_calculateByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk diff --git a/db/routines/vn/procedures/timeControl_calculateByUser.sql b/db/routines/vn/procedures/timeControl_calculateByUser.sql index c650ec658..4c123a840 100644 --- a/db/routines/vn/procedures/timeControl_calculateByUser.sql +++ b/db/routines/vn/procedures/timeControl_calculateByUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_calculateByWorker.sql b/db/routines/vn/procedures/timeControl_calculateByWorker.sql index bfada7635..d4b14efe9 100644 --- a/db/routines/vn/procedures/timeControl_calculateByWorker.sql +++ b/db/routines/vn/procedures/timeControl_calculateByWorker.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** diff --git a/db/routines/vn/procedures/timeControl_getError.sql b/db/routines/vn/procedures/timeControl_getError.sql index 0bcfd2bfd..fa6345b9c 100644 --- a/db/routines/vn/procedures/timeControl_getError.sql +++ b/db/routines/vn/procedures/timeControl_getError.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /* * @param vDatedFrom diff --git a/db/routines/vn/procedures/tpvTransaction_checkStatus.sql b/db/routines/vn/procedures/tpvTransaction_checkStatus.sql index a33300b54..eeea13979 100644 --- a/db/routines/vn/procedures/tpvTransaction_checkStatus.sql +++ b/db/routines/vn/procedures/tpvTransaction_checkStatus.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`tpvTransaction_checkStatus`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`tpvTransaction_checkStatus`() BEGIN /** * diff --git a/db/routines/vn/procedures/travelVolume.sql b/db/routines/vn/procedures/travelVolume.sql index be3c111fb..2e2cdc83b 100644 --- a/db/routines/vn/procedures/travelVolume.sql +++ b/db/routines/vn/procedures/travelVolume.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travelVolume`(vTravelFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travelVolume`(vTravelFk INT) BEGIN SELECT w1.name AS ORI, diff --git a/db/routines/vn/procedures/travelVolume_get.sql b/db/routines/vn/procedures/travelVolume_get.sql index cd444d28d..99c0acbb8 100644 --- a/db/routines/vn/procedures/travelVolume_get.sql +++ b/db/routines/vn/procedures/travelVolume_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) BEGIN SELECT tr.landed Fecha, a.name Agencia, diff --git a/db/routines/vn/procedures/travel_checkDates.sql b/db/routines/vn/procedures/travel_checkDates.sql index d31516466..004fefa64 100644 --- a/db/routines/vn/procedures/travel_checkDates.sql +++ b/db/routines/vn/procedures/travel_checkDates.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkDates`(vShipped DATE, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkDates`(vShipped DATE, vLanded DATE) BEGIN /** * Checks the landing/shipment dates of travel, throws an error diff --git a/db/routines/vn/procedures/travel_checkPackaging.sql b/db/routines/vn/procedures/travel_checkPackaging.sql index 5e69d9dd5..2b67f4d25 100644 --- a/db/routines/vn/procedures/travel_checkPackaging.sql +++ b/db/routines/vn/procedures/travel_checkPackaging.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkPackaging`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkPackaging`(vSelf INT) BEGIN DECLARE vDone BOOL; DECLARE vEntryFk INT; diff --git a/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql b/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql index 8177214c7..27ca9955f 100644 --- a/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql +++ b/db/routines/vn/procedures/travel_checkWarehouseIsFeedStock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) proc: BEGIN /* * Check that the warehouse is not Feed Stock diff --git a/db/routines/vn/procedures/travel_clone.sql b/db/routines/vn/procedures/travel_clone.sql index 4b4d611e9..74a76d477 100644 --- a/db/routines/vn/procedures/travel_clone.sql +++ b/db/routines/vn/procedures/travel_clone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) BEGIN /** * Clona un travel el número de dias indicado y devuelve su id. diff --git a/db/routines/vn/procedures/travel_cloneWithEntries.sql b/db/routines/vn/procedures/travel_cloneWithEntries.sql index 90d59c2a6..ee26aea32 100644 --- a/db/routines/vn/procedures/travel_cloneWithEntries.sql +++ b/db/routines/vn/procedures/travel_cloneWithEntries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_cloneWithEntries`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_cloneWithEntries`( IN vTravelFk INT, IN vDateStart DATE, IN vDateEnd DATE, diff --git a/db/routines/vn/procedures/travel_getDetailFromContinent.sql b/db/routines/vn/procedures/travel_getDetailFromContinent.sql index d39754b65..a9ee0b6ca 100644 --- a/db/routines/vn/procedures/travel_getDetailFromContinent.sql +++ b/db/routines/vn/procedures/travel_getDetailFromContinent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_getDetailFromContinent`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_getDetailFromContinent`( vContinentFk INT ) BEGIN diff --git a/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql b/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql index 793e866d4..dc78f964c 100644 --- a/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql +++ b/db/routines/vn/procedures/travel_getEntriesMissingPackage.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_getEntriesMissingPackage`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_getEntriesMissingPackage`(vSelf INT) BEGIN DECLARE vpackageOrPackingNull INT; DECLARE vTravelFk INT; diff --git a/db/routines/vn/procedures/travel_moveRaids.sql b/db/routines/vn/procedures/travel_moveRaids.sql index f590f836d..95e02ec55 100644 --- a/db/routines/vn/procedures/travel_moveRaids.sql +++ b/db/routines/vn/procedures/travel_moveRaids.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_moveRaids`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_moveRaids`() BEGIN /* diff --git a/db/routines/vn/procedures/travel_recalc.sql b/db/routines/vn/procedures/travel_recalc.sql index c4021bdd0..9aebeaad8 100644 --- a/db/routines/vn/procedures/travel_recalc.sql +++ b/db/routines/vn/procedures/travel_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_recalc`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_recalc`(vSelf INT) proc: BEGIN /** * Updates the number of entries assigned to the travel. diff --git a/db/routines/vn/procedures/travel_throwAwb.sql b/db/routines/vn/procedures/travel_throwAwb.sql index 5fc6ec7c5..a372e4600 100644 --- a/db/routines/vn/procedures/travel_throwAwb.sql +++ b/db/routines/vn/procedures/travel_throwAwb.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT) BEGIN /** * Throws an error if travel does not have a logical AWB diff --git a/db/routines/vn/procedures/travel_upcomingArrivals.sql b/db/routines/vn/procedures/travel_upcomingArrivals.sql index 6fadb0644..f271f55a0 100644 --- a/db/routines/vn/procedures/travel_upcomingArrivals.sql +++ b/db/routines/vn/procedures/travel_upcomingArrivals.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_upcomingArrivals`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_upcomingArrivals`( vWarehouseFk INT, vDate DATETIME ) diff --git a/db/routines/vn/procedures/travel_updatePacking.sql b/db/routines/vn/procedures/travel_updatePacking.sql index 49b5bef0f..dd73bb199 100644 --- a/db/routines/vn/procedures/travel_updatePacking.sql +++ b/db/routines/vn/procedures/travel_updatePacking.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_updatePacking`(vItemFk INT, vPacking INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_updatePacking`(vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing para los movimientos de almacén de la subasta al almacén central diff --git a/db/routines/vn/procedures/travel_weeklyClone.sql b/db/routines/vn/procedures/travel_weeklyClone.sql index c8bec5ae5..182e824af 100644 --- a/db/routines/vn/procedures/travel_weeklyClone.sql +++ b/db/routines/vn/procedures/travel_weeklyClone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`travel_weeklyClone`(vSinceWeek INT, vToWeek INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_weeklyClone`(vSinceWeek INT, vToWeek INT) BEGIN /** * Clona los traslados plantilla para las semanas pasadas por parámetros. diff --git a/db/routines/vn/procedures/typeTagMake.sql b/db/routines/vn/procedures/typeTagMake.sql index f0d1cdc4d..168b3f4ef 100644 --- a/db/routines/vn/procedures/typeTagMake.sql +++ b/db/routines/vn/procedures/typeTagMake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`typeTagMake`(vTypeFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`typeTagMake`(vTypeFk INT) BEGIN /* * Plantilla para modificar reemplazar todos los tags diff --git a/db/routines/vn/procedures/updatePedidosInternos.sql b/db/routines/vn/procedures/updatePedidosInternos.sql index b04f0109f..b2bc25cb9 100644 --- a/db/routines/vn/procedures/updatePedidosInternos.sql +++ b/db/routines/vn/procedures/updatePedidosInternos.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`updatePedidosInternos`(vItemFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`updatePedidosInternos`(vItemFk INT) BEGIN UPDATE vn.item SET upToDown = 0 WHERE item.id = vItemFk; diff --git a/db/routines/vn/procedures/vehicle_checkNumberPlate.sql b/db/routines/vn/procedures/vehicle_checkNumberPlate.sql index 2cae46588..cbbcbec63 100644 --- a/db/routines/vn/procedures/vehicle_checkNumberPlate.sql +++ b/db/routines/vn/procedures/vehicle_checkNumberPlate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) BEGIN /** * Comprueba si la matricula pasada tiene el formato correcto dependiendo del pais del vehiculo diff --git a/db/routines/vn/procedures/vehicle_notifyEvents.sql b/db/routines/vn/procedures/vehicle_notifyEvents.sql index d78f48d0c..756b20bca 100644 --- a/db/routines/vn/procedures/vehicle_notifyEvents.sql +++ b/db/routines/vn/procedures/vehicle_notifyEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`vehicle_notifyEvents`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`vehicle_notifyEvents`() proc:BEGIN /** * Query the vehicleEvent table to see if there are any events that need to be notified. diff --git a/db/routines/vn/procedures/visible_getMisfit.sql b/db/routines/vn/procedures/visible_getMisfit.sql index b565ad5c0..a7abdca9a 100644 --- a/db/routines/vn/procedures/visible_getMisfit.sql +++ b/db/routines/vn/procedures/visible_getMisfit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`visible_getMisfit`(vSectorFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`visible_getMisfit`(vSectorFk INT) BEGIN /* Devuelve una tabla temporal con los descuadres entre el visible teórico y lo ubicado en la práctica diff --git a/db/routines/vn/procedures/warehouseFitting.sql b/db/routines/vn/procedures/warehouseFitting.sql index 7a3ad9e37..10347bebf 100644 --- a/db/routines/vn/procedures/warehouseFitting.sql +++ b/db/routines/vn/procedures/warehouseFitting.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) BEGIN DECLARE vCacheVisibleOriginFk INT; DECLARE vCacheVisibleDestinyFk INT; diff --git a/db/routines/vn/procedures/warehouseFitting_byTravel.sql b/db/routines/vn/procedures/warehouseFitting_byTravel.sql index d71f127e5..9e0a7abc0 100644 --- a/db/routines/vn/procedures/warehouseFitting_byTravel.sql +++ b/db/routines/vn/procedures/warehouseFitting_byTravel.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`warehouseFitting_byTravel`(IN vTravelFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`warehouseFitting_byTravel`(IN vTravelFk INT) BEGIN DECLARE vWhOrigin INT; diff --git a/db/routines/vn/procedures/workerCalculateBoss.sql b/db/routines/vn/procedures/workerCalculateBoss.sql index 65952d022..afbf1f89d 100644 --- a/db/routines/vn/procedures/workerCalculateBoss.sql +++ b/db/routines/vn/procedures/workerCalculateBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalculateBoss`(vWorker INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerCalculateBoss`(vWorker INT) BEGIN /** * Actualiza la tabla workerBosses diff --git a/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql b/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql index 347ea045c..429435e3e 100644 --- a/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql +++ b/db/routines/vn/procedures/workerCalendar_calculateBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) BEGIN /** * Calcula los días y horas de vacaciones en función de un contrato y año diff --git a/db/routines/vn/procedures/workerCalendar_calculateYear.sql b/db/routines/vn/procedures/workerCalendar_calculateYear.sql index cf91ddf79..ccda31ce3 100644 --- a/db/routines/vn/procedures/workerCalendar_calculateYear.sql +++ b/db/routines/vn/procedures/workerCalendar_calculateYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/workerCreateExternal.sql b/db/routines/vn/procedures/workerCreateExternal.sql index f15c586fa..c825e6fc5 100644 --- a/db/routines/vn/procedures/workerCreateExternal.sql +++ b/db/routines/vn/procedures/workerCreateExternal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerCreateExternal`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerCreateExternal`( vFirstName VARCHAR(50), vSurname1 VARCHAR(50), vSurname2 VARCHAR(50), diff --git a/db/routines/vn/procedures/workerDepartmentByDate.sql b/db/routines/vn/procedures/workerDepartmentByDate.sql index 594e2bac5..466fd3ab6 100644 --- a/db/routines/vn/procedures/workerDepartmentByDate.sql +++ b/db/routines/vn/procedures/workerDepartmentByDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDepartmentByDate`(vDate DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerDepartmentByDate`(vDate DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.workerDepartmentByDate; diff --git a/db/routines/vn/procedures/workerDisable.sql b/db/routines/vn/procedures/workerDisable.sql index 7ddd341d5..7760d5de0 100644 --- a/db/routines/vn/procedures/workerDisable.sql +++ b/db/routines/vn/procedures/workerDisable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDisable`(vUserId int) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerDisable`(vUserId int) mainLabel:BEGIN IF (SELECT COUNT(*) FROM workerDisableExcluded WHERE workerFk = vUserId AND (dated > util.VN_CURDATE() OR dated IS NULL)) > 0 THEN diff --git a/db/routines/vn/procedures/workerDisableAll.sql b/db/routines/vn/procedures/workerDisableAll.sql index 2bebe719d..5c1aed342 100644 --- a/db/routines/vn/procedures/workerDisableAll.sql +++ b/db/routines/vn/procedures/workerDisableAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerDisableAll`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerDisableAll`() BEGIN DECLARE done BOOL DEFAULT FALSE; DECLARE vUserFk INT; diff --git a/db/routines/vn/procedures/workerForAllCalculateBoss.sql b/db/routines/vn/procedures/workerForAllCalculateBoss.sql index 1f7d94670..4db97e017 100644 --- a/db/routines/vn/procedures/workerForAllCalculateBoss.sql +++ b/db/routines/vn/procedures/workerForAllCalculateBoss.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerForAllCalculateBoss`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerForAllCalculateBoss`() BEGIN /** * Actualiza la tabla workerBosses utilizando el procedimiento diff --git a/db/routines/vn/procedures/workerJourney_replace.sql b/db/routines/vn/procedures/workerJourney_replace.sql index 61498689e..7156e8658 100644 --- a/db/routines/vn/procedures/workerJourney_replace.sql +++ b/db/routines/vn/procedures/workerJourney_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerJourney_replace`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerJourney_replace`( vDatedFrom DATE, vDatedTo DATE, vWorkerFk INT) diff --git a/db/routines/vn/procedures/workerMistakeType_get.sql b/db/routines/vn/procedures/workerMistakeType_get.sql index ca9b0f655..3429521e5 100644 --- a/db/routines/vn/procedures/workerMistakeType_get.sql +++ b/db/routines/vn/procedures/workerMistakeType_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerMistakeType_get`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerMistakeType_get`() BEGIN /** diff --git a/db/routines/vn/procedures/workerMistake_add.sql b/db/routines/vn/procedures/workerMistake_add.sql index 95bee8c3d..3dfc67046 100644 --- a/db/routines/vn/procedures/workerMistake_add.sql +++ b/db/routines/vn/procedures/workerMistake_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) BEGIN /** * Añade error al trabajador diff --git a/db/routines/vn/procedures/workerTimeControlSOWP.sql b/db/routines/vn/procedures/workerTimeControlSOWP.sql index 4268468d8..80e57d5c3 100644 --- a/db/routines/vn/procedures/workerTimeControlSOWP.sql +++ b/db/routines/vn/procedures/workerTimeControlSOWP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) BEGIN SET @order := 0; diff --git a/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql b/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql index 1e686afa1..57fd3e977 100644 --- a/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql +++ b/db/routines/vn/procedures/workerTimeControl_calculateOddDays.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_calculateOddDays`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_calculateOddDays`() BEGIN /** * Calculo de las fichadas impares por empleado y dia. diff --git a/db/routines/vn/procedures/workerTimeControl_check.sql b/db/routines/vn/procedures/workerTimeControl_check.sql index 176e627b8..30cf5c639 100644 --- a/db/routines/vn/procedures/workerTimeControl_check.sql +++ b/db/routines/vn/procedures/workerTimeControl_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100)) proc: BEGIN /** * Verifica si el empleado puede fichar en el momento actual, si puede fichar llama a workerTimeControlAdd diff --git a/db/routines/vn/procedures/workerTimeControl_checkBreak.sql b/db/routines/vn/procedures/workerTimeControl_checkBreak.sql index 7282275dc..81850df9f 100644 --- a/db/routines/vn/procedures/workerTimeControl_checkBreak.sql +++ b/db/routines/vn/procedures/workerTimeControl_checkBreak.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_checkBreak`(vStarted DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_checkBreak`(vStarted DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas diff --git a/db/routines/vn/procedures/workerTimeControl_clockIn.sql b/db/routines/vn/procedures/workerTimeControl_clockIn.sql index 3a4f0924a..522546918 100644 --- a/db/routines/vn/procedures/workerTimeControl_clockIn.sql +++ b/db/routines/vn/procedures/workerTimeControl_clockIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_clockIn`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_clockIn`( vWorkerFk INT, vTimed DATETIME, vDirection VARCHAR(10), diff --git a/db/routines/vn/procedures/workerTimeControl_direction.sql b/db/routines/vn/procedures/workerTimeControl_direction.sql index 0eeeba43c..84db396cc 100644 --- a/db/routines/vn/procedures/workerTimeControl_direction.sql +++ b/db/routines/vn/procedures/workerTimeControl_direction.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) BEGIN /** * Devuelve que direcciones de fichadas son lógicas a partir de la anterior fichada diff --git a/db/routines/vn/procedures/workerTimeControl_getClockIn.sql b/db/routines/vn/procedures/workerTimeControl_getClockIn.sql index e1b380020..454cd3c77 100644 --- a/db/routines/vn/procedures/workerTimeControl_getClockIn.sql +++ b/db/routines/vn/procedures/workerTimeControl_getClockIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_getClockIn`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_getClockIn`( vUserFk INT, vDated DATE) BEGIN diff --git a/db/routines/vn/procedures/workerTimeControl_login.sql b/db/routines/vn/procedures/workerTimeControl_login.sql index 642c3f6c2..0a138693c 100644 --- a/db/routines/vn/procedures/workerTimeControl_login.sql +++ b/db/routines/vn/procedures/workerTimeControl_login.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_login`(vWorkerFk VARCHAR(10)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_login`(vWorkerFk VARCHAR(10)) BEGIN /** * Consulta la información del usuario y los botones que tiene que activar en la tablet tras hacer login diff --git a/db/routines/vn/procedures/workerTimeControl_remove.sql b/db/routines/vn/procedures/workerTimeControl_remove.sql index 9e973e1ea..b4e55986a 100644 --- a/db/routines/vn/procedures/workerTimeControl_remove.sql +++ b/db/routines/vn/procedures/workerTimeControl_remove.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) BEGIN DECLARE vDirectionRemove VARCHAR(6); diff --git a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql index 74f724222..b8af457d0 100644 --- a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql +++ b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT) BEGIN /** * Inserta el registro de horario semanalmente de PRODUCCION, CAMARA, REPARTO, TALLER NATURAL y TALLER ARTIFICIAL en vn.mail. diff --git a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql index 78dde73df..e1ccb1c78 100644 --- a/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql +++ b/db/routines/vn/procedures/workerTimeControl_sendMailByDepartmentLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartmentLauncher`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_sendMailByDepartmentLauncher`() BEGIN DECLARE vDatedFrom, vDatedTo DATETIME; diff --git a/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql b/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql index edac2c60b..af87a251e 100644 --- a/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql +++ b/db/routines/vn/procedures/workerTimeControl_weekCheckBreak.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas diff --git a/db/routines/vn/procedures/workerWeekControl.sql b/db/routines/vn/procedures/workerWeekControl.sql index 33ab8baec..186b0a35d 100644 --- a/db/routines/vn/procedures/workerWeekControl.sql +++ b/db/routines/vn/procedures/workerWeekControl.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100)) BEGIN /* * Devuelve la cantidad de descansos de 12h y de 36 horas que ha disfrutado el trabajador diff --git a/db/routines/vn/procedures/worker_checkMultipleDevice.sql b/db/routines/vn/procedures/worker_checkMultipleDevice.sql index e932e88a3..71978ca3b 100644 --- a/db/routines/vn/procedures/worker_checkMultipleDevice.sql +++ b/db/routines/vn/procedures/worker_checkMultipleDevice.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_checkMultipleDevice`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_checkMultipleDevice`( vSelf INT ) BEGIN diff --git a/db/routines/vn/procedures/worker_getFromHasMistake.sql b/db/routines/vn/procedures/worker_getFromHasMistake.sql index 313830282..a65558bbb 100644 --- a/db/routines/vn/procedures/worker_getFromHasMistake.sql +++ b/db/routines/vn/procedures/worker_getFromHasMistake.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getFromHasMistake`(vDepartmentFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_getFromHasMistake`(vDepartmentFk INT) BEGIN /** diff --git a/db/routines/vn/procedures/worker_getHierarchy.sql b/db/routines/vn/procedures/worker_getHierarchy.sql index 37e89ae8f..a858c5ff7 100644 --- a/db/routines/vn/procedures/worker_getHierarchy.sql +++ b/db/routines/vn/procedures/worker_getHierarchy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getHierarchy`(vUserFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_getHierarchy`(vUserFk INT) BEGIN /** * Retorna una tabla temporal con los trabajadores que tiene diff --git a/db/routines/vn/procedures/worker_getSector.sql b/db/routines/vn/procedures/worker_getSector.sql index fe6ee8a5a..3d636394d 100644 --- a/db/routines/vn/procedures/worker_getSector.sql +++ b/db/routines/vn/procedures/worker_getSector.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_getSector`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_getSector`() BEGIN /** diff --git a/db/routines/vn/procedures/worker_updateBalance.sql b/db/routines/vn/procedures/worker_updateBalance.sql index 1f5f02882..96357e4d6 100644 --- a/db/routines/vn/procedures/worker_updateBalance.sql +++ b/db/routines/vn/procedures/worker_updateBalance.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) BEGIN /** * Actualiza la columna balance de worker. diff --git a/db/routines/vn/procedures/worker_updateBusiness.sql b/db/routines/vn/procedures/worker_updateBusiness.sql index e3040603c..a160c417a 100644 --- a/db/routines/vn/procedures/worker_updateBusiness.sql +++ b/db/routines/vn/procedures/worker_updateBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateBusiness`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_updateBusiness`(vSelf INT) BEGIN /** * Activates an account and configures its email settings. diff --git a/db/routines/vn/procedures/worker_updateChangedBusiness.sql b/db/routines/vn/procedures/worker_updateChangedBusiness.sql index cc9c1e84d..0bb0e5905 100644 --- a/db/routines/vn/procedures/worker_updateChangedBusiness.sql +++ b/db/routines/vn/procedures/worker_updateChangedBusiness.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`worker_updateChangedBusiness`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`worker_updateChangedBusiness`() BEGIN /** * Actualiza el contrato actual de todos los trabajadores cuyo contracto ha diff --git a/db/routines/vn/procedures/workingHours.sql b/db/routines/vn/procedures/workingHours.sql index 0390efb7d..12b65753f 100644 --- a/db/routines/vn/procedures/workingHours.sql +++ b/db/routines/vn/procedures/workingHours.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHours`(username varchar(255), logon boolean) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workingHours`(username varchar(255), logon boolean) BEGIN DECLARE userid int(11); diff --git a/db/routines/vn/procedures/workingHoursTimeIn.sql b/db/routines/vn/procedures/workingHoursTimeIn.sql index 07e0d7ccd..a8ac07cb4 100644 --- a/db/routines/vn/procedures/workingHoursTimeIn.sql +++ b/db/routines/vn/procedures/workingHoursTimeIn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHoursTimeIn`(vUserId INT(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workingHoursTimeIn`(vUserId INT(11)) BEGIN INSERT INTO vn.workingHours (timeIn, userId) VALUES (util.VN_NOW(),vUserId); diff --git a/db/routines/vn/procedures/workingHoursTimeOut.sql b/db/routines/vn/procedures/workingHoursTimeOut.sql index 0f7ee543b..d44d99f52 100644 --- a/db/routines/vn/procedures/workingHoursTimeOut.sql +++ b/db/routines/vn/procedures/workingHoursTimeOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`workingHoursTimeOut`(vUserId INT(11)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workingHoursTimeOut`(vUserId INT(11)) BEGIN UPDATE vn.workingHours SET timeOut = util.VN_NOW() diff --git a/db/routines/vn/procedures/wrongEqualizatedClient.sql b/db/routines/vn/procedures/wrongEqualizatedClient.sql index 35709b32a..75499b6f1 100644 --- a/db/routines/vn/procedures/wrongEqualizatedClient.sql +++ b/db/routines/vn/procedures/wrongEqualizatedClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`wrongEqualizatedClient`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`wrongEqualizatedClient`() BEGIN SELECT clientFk, c.name, c.isActive, c.isTaxDataChecked, count(ie) as num FROM vn.client c diff --git a/db/routines/vn/procedures/xdiario_new.sql b/db/routines/vn/procedures/xdiario_new.sql index b965cd909..1c73c6bda 100644 --- a/db/routines/vn/procedures/xdiario_new.sql +++ b/db/routines/vn/procedures/xdiario_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`xdiario_new`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`xdiario_new`( vBookNumber INT, vDated DATE, vSubaccount VARCHAR(12), diff --git a/db/routines/vn/procedures/zoneClosure_recalc.sql b/db/routines/vn/procedures/zoneClosure_recalc.sql index 9e7dcc179..b1bc77350 100644 --- a/db/routines/vn/procedures/zoneClosure_recalc.sql +++ b/db/routines/vn/procedures/zoneClosure_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneClosure_recalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneClosure_recalc`() proc: BEGIN /** * Recalculates the delivery time (hour) for every zone in days + scope in future diff --git a/db/routines/vn/procedures/zoneGeo_calcTree.sql b/db/routines/vn/procedures/zoneGeo_calcTree.sql index cf241e82e..0bca0d26f 100644 --- a/db/routines/vn/procedures/zoneGeo_calcTree.sql +++ b/db/routines/vn/procedures/zoneGeo_calcTree.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTree`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of diff --git a/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql b/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql index 195355280..1994f2f8b 100644 --- a/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql +++ b/db/routines/vn/procedures/zoneGeo_calcTreeRec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTreeRec`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, diff --git a/db/routines/vn/procedures/zoneGeo_checkName.sql b/db/routines/vn/procedures/zoneGeo_checkName.sql index 998728120..066209ffd 100644 --- a/db/routines/vn/procedures/zoneGeo_checkName.sql +++ b/db/routines/vn/procedures/zoneGeo_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_checkName`(vName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_checkName`(vName VARCHAR(255)) BEGIN IF vName = '' THEN SIGNAL SQLSTATE '45000' diff --git a/db/routines/vn/procedures/zoneGeo_delete.sql b/db/routines/vn/procedures/zoneGeo_delete.sql index 83055d383..d6f13171b 100644 --- a/db/routines/vn/procedures/zoneGeo_delete.sql +++ b/db/routines/vn/procedures/zoneGeo_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_delete`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_delete`(vSelf INT) BEGIN /** * Deletes a node from the #zoneGeo table. Also sets a mark diff --git a/db/routines/vn/procedures/zoneGeo_doCalc.sql b/db/routines/vn/procedures/zoneGeo_doCalc.sql index 748a33ed0..16f2bd819 100644 --- a/db/routines/vn/procedures/zoneGeo_doCalc.sql +++ b/db/routines/vn/procedures/zoneGeo_doCalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_doCalc`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_doCalc`() proc: BEGIN /** * Recalculates the zones tree. diff --git a/db/routines/vn/procedures/zoneGeo_setParent.sql b/db/routines/vn/procedures/zoneGeo_setParent.sql index 54b56d19f..ad37d69db 100644 --- a/db/routines/vn/procedures/zoneGeo_setParent.sql +++ b/db/routines/vn/procedures/zoneGeo_setParent.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_setParent`(vSelf INT, vParentFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_setParent`(vSelf INT, vParentFk INT) BEGIN /** * Updates the parent of a node. Also sets a mark diff --git a/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql b/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql index 665e14080..2fa6fbf85 100644 --- a/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql +++ b/db/routines/vn/procedures/zoneGeo_throwNotEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zoneGeo_throwNotEditable`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zoneGeo_throwNotEditable`() BEGIN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Column `geoFk` cannot be modified'; diff --git a/db/routines/vn/procedures/zone_excludeFromGeo.sql b/db/routines/vn/procedures/zone_excludeFromGeo.sql index a105a2d84..23a5865fd 100644 --- a/db/routines/vn/procedures/zone_excludeFromGeo.sql +++ b/db/routines/vn/procedures/zone_excludeFromGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_excludeFromGeo`(vZoneGeo INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_excludeFromGeo`(vZoneGeo INT) BEGIN /** * Excluye zonas a partir un geoFk. diff --git a/db/routines/vn/procedures/zone_getAddresses.sql b/db/routines/vn/procedures/zone_getAddresses.sql index 8ea003f35..304a009e1 100644 --- a/db/routines/vn/procedures/zone_getAddresses.sql +++ b/db/routines/vn/procedures/zone_getAddresses.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAddresses`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getAddresses`( vSelf INT, vLanded DATE ) diff --git a/db/routines/vn/procedures/zone_getAgency.sql b/db/routines/vn/procedures/zone_getAgency.sql index 7f6aed3a3..8b3540477 100644 --- a/db/routines/vn/procedures/zone_getAgency.sql +++ b/db/routines/vn/procedures/zone_getAgency.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAgency`(vAddress INT, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getAgency`(vAddress INT, vLanded DATE) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha diff --git a/db/routines/vn/procedures/zone_getAvailable.sql b/db/routines/vn/procedures/zone_getAvailable.sql index 90a8c292f..5362185e6 100644 --- a/db/routines/vn/procedures/zone_getAvailable.sql +++ b/db/routines/vn/procedures/zone_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getAvailable`(vAddress INT, vLanded DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getAvailable`(vAddress INT, vLanded DATE) BEGIN CALL zone_getFromGeo(address_getGeo(vAddress)); CALL zone_getOptionsForLanding(vLanded, FALSE); diff --git a/db/routines/vn/procedures/zone_getClosed.sql b/db/routines/vn/procedures/zone_getClosed.sql index 3e2b7beff..4d22c96bd 100644 --- a/db/routines/vn/procedures/zone_getClosed.sql +++ b/db/routines/vn/procedures/zone_getClosed.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getClosed`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getClosed`() proc:BEGIN /** * Devuelve una tabla con las zonas cerradas para hoy diff --git a/db/routines/vn/procedures/zone_getCollisions.sql b/db/routines/vn/procedures/zone_getCollisions.sql index 87cfbf534..9b57017f7 100644 --- a/db/routines/vn/procedures/zone_getCollisions.sql +++ b/db/routines/vn/procedures/zone_getCollisions.sql @@ -1,6 +1,6 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getCollisions`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getCollisions`() BEGIN /** * Calcula si para un mismo codigo postal y dia diff --git a/db/routines/vn/procedures/zone_getEvents.sql b/db/routines/vn/procedures/zone_getEvents.sql index 417d87959..ce85d1862 100644 --- a/db/routines/vn/procedures/zone_getEvents.sql +++ b/db/routines/vn/procedures/zone_getEvents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getEvents`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getEvents`( vGeoFk INT, vAgencyModeFk INT) BEGIN diff --git a/db/routines/vn/procedures/zone_getFromGeo.sql b/db/routines/vn/procedures/zone_getFromGeo.sql index 52f53c9ad..6ccb8b570 100644 --- a/db/routines/vn/procedures/zone_getFromGeo.sql +++ b/db/routines/vn/procedures/zone_getFromGeo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getFromGeo`(vGeoFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getFromGeo`(vGeoFk INT) BEGIN /** * Returns all zones which have the passed geo included. diff --git a/db/routines/vn/procedures/zone_getLanded.sql b/db/routines/vn/procedures/zone_getLanded.sql index e79f2a7a6..1d6cdcc3f 100644 --- a/db/routines/vn/procedures/zone_getLanded.sql +++ b/db/routines/vn/procedures/zone_getLanded.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve una tabla temporal con el dia de recepcion para vShipped. diff --git a/db/routines/vn/procedures/zone_getLeaves.sql b/db/routines/vn/procedures/zone_getLeaves.sql index 67b4e7042..51ab487ed 100644 --- a/db/routines/vn/procedures/zone_getLeaves.sql +++ b/db/routines/vn/procedures/zone_getLeaves.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getLeaves`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getLeaves`( vSelf INT, vParentFk INT, vSearch VARCHAR(255), diff --git a/db/routines/vn/procedures/zone_getOptionsForLanding.sql b/db/routines/vn/procedures/zone_getOptionsForLanding.sql index 5b4310c40..80ccf7ed1 100644 --- a/db/routines/vn/procedures/zone_getOptionsForLanding.sql +++ b/db/routines/vn/procedures/zone_getOptionsForLanding.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and delivery date. diff --git a/db/routines/vn/procedures/zone_getOptionsForShipment.sql b/db/routines/vn/procedures/zone_getOptionsForShipment.sql index 00f5a593d..fa48b0b0f 100644 --- a/db/routines/vn/procedures/zone_getOptionsForShipment.sql +++ b/db/routines/vn/procedures/zone_getOptionsForShipment.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and shipping date. diff --git a/db/routines/vn/procedures/zone_getPostalCode.sql b/db/routines/vn/procedures/zone_getPostalCode.sql index e733c0640..b768b6e12 100644 --- a/db/routines/vn/procedures/zone_getPostalCode.sql +++ b/db/routines/vn/procedures/zone_getPostalCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getPostalCode`(vSelf INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getPostalCode`(vSelf INT) BEGIN /** * Devuelve los códigos postales incluidos en una zona diff --git a/db/routines/vn/procedures/zone_getShipped.sql b/db/routines/vn/procedures/zone_getShipped.sql index 40013017f..924883b72 100644 --- a/db/routines/vn/procedures/zone_getShipped.sql +++ b/db/routines/vn/procedures/zone_getShipped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve la mínima fecha de envío para cada warehouse diff --git a/db/routines/vn/procedures/zone_getState.sql b/db/routines/vn/procedures/zone_getState.sql index 310280af1..1678be87d 100644 --- a/db/routines/vn/procedures/zone_getState.sql +++ b/db/routines/vn/procedures/zone_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getState`(vDated DATE) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getState`(vDated DATE) BEGIN /** * Devuelve las zonas y el estado para la fecha solicitada diff --git a/db/routines/vn/procedures/zone_getWarehouse.sql b/db/routines/vn/procedures/zone_getWarehouse.sql index 46a7f2eaf..aeeba2867 100644 --- a/db/routines/vn/procedures/zone_getWarehouse.sql +++ b/db/routines/vn/procedures/zone_getWarehouse.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha, diff --git a/db/routines/vn/procedures/zone_upcomingDeliveries.sql b/db/routines/vn/procedures/zone_upcomingDeliveries.sql index 273f71e4e..0c3713175 100644 --- a/db/routines/vn/procedures/zone_upcomingDeliveries.sql +++ b/db/routines/vn/procedures/zone_upcomingDeliveries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`zone_upcomingDeliveries`() +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_upcomingDeliveries`() BEGIN DECLARE vForwardDays INT; diff --git a/db/routines/vn/triggers/XDiario_beforeInsert.sql b/db/routines/vn/triggers/XDiario_beforeInsert.sql index 1fa7ca75c..81f45ef56 100644 --- a/db/routines/vn/triggers/XDiario_beforeInsert.sql +++ b/db/routines/vn/triggers/XDiario_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`XDiario_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`XDiario_beforeInsert` BEFORE INSERT ON `XDiario` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/XDiario_beforeUpdate.sql b/db/routines/vn/triggers/XDiario_beforeUpdate.sql index 1cf9c34e5..1653da4a4 100644 --- a/db/routines/vn/triggers/XDiario_beforeUpdate.sql +++ b/db/routines/vn/triggers/XDiario_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`XDiario_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`XDiario_beforeUpdate` BEFORE UPDATE ON `XDiario` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql b/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql index 5bbd8f273..f37084329 100644 --- a/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql +++ b/db/routines/vn/triggers/accountReconciliation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`accountReconciliation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`accountReconciliation_beforeInsert` BEFORE INSERT ON `accountReconciliation` FOR EACH ROW diff --git a/db/routines/vn/triggers/address_afterDelete.sql b/db/routines/vn/triggers/address_afterDelete.sql index 834caa3ff..92326c302 100644 --- a/db/routines/vn/triggers/address_afterDelete.sql +++ b/db/routines/vn/triggers/address_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_afterDelete` AFTER DELETE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_afterInsert.sql b/db/routines/vn/triggers/address_afterInsert.sql index e4dfb0db9..e97658311 100644 --- a/db/routines/vn/triggers/address_afterInsert.sql +++ b/db/routines/vn/triggers/address_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_afterInsert` BEFORE INSERT ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_afterUpdate.sql b/db/routines/vn/triggers/address_afterUpdate.sql index 6b936e5ef..a4e3e51e0 100644 --- a/db/routines/vn/triggers/address_afterUpdate.sql +++ b/db/routines/vn/triggers/address_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_afterUpdate` AFTER UPDATE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_beforeInsert.sql b/db/routines/vn/triggers/address_beforeInsert.sql index ba85f7a2c..56ef7aa51 100644 --- a/db/routines/vn/triggers/address_beforeInsert.sql +++ b/db/routines/vn/triggers/address_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_beforeInsert` BEFORE INSERT ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/address_beforeUpdate.sql b/db/routines/vn/triggers/address_beforeUpdate.sql index 79fe0fed4..35887912c 100644 --- a/db/routines/vn/triggers/address_beforeUpdate.sql +++ b/db/routines/vn/triggers/address_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`address_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_beforeUpdate` BEFORE UPDATE ON `address` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/agency_afterInsert.sql b/db/routines/vn/triggers/agency_afterInsert.sql index 143e2d4fc..85bde9bb5 100644 --- a/db/routines/vn/triggers/agency_afterInsert.sql +++ b/db/routines/vn/triggers/agency_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`agency_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`agency_afterInsert` AFTER INSERT ON `agency` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/agency_beforeInsert.sql b/db/routines/vn/triggers/agency_beforeInsert.sql index 6c183a603..b08b7b995 100644 --- a/db/routines/vn/triggers/agency_beforeInsert.sql +++ b/db/routines/vn/triggers/agency_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`agency_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`agency_beforeInsert` BEFORE INSERT ON `agency` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_afterDelete.sql b/db/routines/vn/triggers/autonomy_afterDelete.sql index 1d36ca385..3ff27c3dd 100644 --- a/db/routines/vn/triggers/autonomy_afterDelete.sql +++ b/db/routines/vn/triggers/autonomy_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`autonomy_afterDelete` AFTER DELETE ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_beforeInsert.sql b/db/routines/vn/triggers/autonomy_beforeInsert.sql index 9ccdd6972..cdceba0b9 100644 --- a/db/routines/vn/triggers/autonomy_beforeInsert.sql +++ b/db/routines/vn/triggers/autonomy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`autonomy_beforeInsert` BEFORE INSERT ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/autonomy_beforeUpdate.sql b/db/routines/vn/triggers/autonomy_beforeUpdate.sql index f4e082505..7a8b1c838 100644 --- a/db/routines/vn/triggers/autonomy_beforeUpdate.sql +++ b/db/routines/vn/triggers/autonomy_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`autonomy_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`autonomy_beforeUpdate` BEFORE UPDATE ON `autonomy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql b/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql index 99d17805c..d36f6b4f5 100644 --- a/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql +++ b/db/routines/vn/triggers/awbInvoiceIn_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`awbInvoiceIn_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`awbInvoiceIn_afterDelete` AFTER DELETE ON `awbInvoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/awb_beforeInsert.sql b/db/routines/vn/triggers/awb_beforeInsert.sql index f19d1fd3c..e632ca858 100644 --- a/db/routines/vn/triggers/awb_beforeInsert.sql +++ b/db/routines/vn/triggers/awb_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`awb_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`awb_beforeInsert` BEFORE INSERT ON `awb` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/bankEntity_beforeInsert.sql b/db/routines/vn/triggers/bankEntity_beforeInsert.sql index cfbd2bf6a..b18af3d15 100644 --- a/db/routines/vn/triggers/bankEntity_beforeInsert.sql +++ b/db/routines/vn/triggers/bankEntity_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`bankEntity_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`bankEntity_beforeInsert` BEFORE INSERT ON `bankEntity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/bankEntity_beforeUpdate.sql b/db/routines/vn/triggers/bankEntity_beforeUpdate.sql index a24b5f5ce..bd3c746c1 100644 --- a/db/routines/vn/triggers/bankEntity_beforeUpdate.sql +++ b/db/routines/vn/triggers/bankEntity_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`bankEntity_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`bankEntity_beforeUpdate` BEFORE UPDATE ON `bankEntity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/budgetNotes_beforeInsert.sql b/db/routines/vn/triggers/budgetNotes_beforeInsert.sql index c432694d5..aa4ee1f9e 100644 --- a/db/routines/vn/triggers/budgetNotes_beforeInsert.sql +++ b/db/routines/vn/triggers/budgetNotes_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`budgetNotes_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`budgetNotes_beforeInsert` BEFORE INSERT ON `budgetNotes` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterDelete.sql b/db/routines/vn/triggers/business_afterDelete.sql index fab217ab1..9fac90e21 100644 --- a/db/routines/vn/triggers/business_afterDelete.sql +++ b/db/routines/vn/triggers/business_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_afterDelete` AFTER DELETE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterInsert.sql b/db/routines/vn/triggers/business_afterInsert.sql index 599a041f4..7a560d380 100644 --- a/db/routines/vn/triggers/business_afterInsert.sql +++ b/db/routines/vn/triggers/business_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_afterInsert` AFTER INSERT ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_afterUpdate.sql b/db/routines/vn/triggers/business_afterUpdate.sql index 1e6458a56..888308b9a 100644 --- a/db/routines/vn/triggers/business_afterUpdate.sql +++ b/db/routines/vn/triggers/business_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_afterUpdate` AFTER UPDATE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_beforeInsert.sql b/db/routines/vn/triggers/business_beforeInsert.sql index 02d577e71..36156d023 100644 --- a/db/routines/vn/triggers/business_beforeInsert.sql +++ b/db/routines/vn/triggers/business_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_beforeInsert` BEFORE INSERT ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/business_beforeUpdate.sql b/db/routines/vn/triggers/business_beforeUpdate.sql index 33a5a51bb..f0c09edc2 100644 --- a/db/routines/vn/triggers/business_beforeUpdate.sql +++ b/db/routines/vn/triggers/business_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`business_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`business_beforeUpdate` BEFORE UPDATE ON `business` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/buy_afterDelete.sql b/db/routines/vn/triggers/buy_afterDelete.sql index e0f5e238f..26df4655f 100644 --- a/db/routines/vn/triggers/buy_afterDelete.sql +++ b/db/routines/vn/triggers/buy_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_afterDelete` AFTER DELETE ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_afterInsert.sql b/db/routines/vn/triggers/buy_afterInsert.sql index 8c5cdaaa4..7a6608ada 100644 --- a/db/routines/vn/triggers/buy_afterInsert.sql +++ b/db/routines/vn/triggers/buy_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_afterInsert` AFTER INSERT ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_afterUpdate.sql b/db/routines/vn/triggers/buy_afterUpdate.sql index e6b1a8bdc..b82ba1831 100644 --- a/db/routines/vn/triggers/buy_afterUpdate.sql +++ b/db/routines/vn/triggers/buy_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_afterUpdate` AFTER UPDATE ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_beforeDelete.sql b/db/routines/vn/triggers/buy_beforeDelete.sql index 2c58d3e8b..82b7e51d6 100644 --- a/db/routines/vn/triggers/buy_beforeDelete.sql +++ b/db/routines/vn/triggers/buy_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_beforeDelete` BEFORE DELETE ON `buy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/buy_beforeInsert.sql b/db/routines/vn/triggers/buy_beforeInsert.sql index 18d2288c2..9c1059266 100644 --- a/db/routines/vn/triggers/buy_beforeInsert.sql +++ b/db/routines/vn/triggers/buy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_beforeInsert` BEFORE INSERT ON `buy` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/buy_beforeUpdate.sql b/db/routines/vn/triggers/buy_beforeUpdate.sql index df8666381..b14574570 100644 --- a/db/routines/vn/triggers/buy_beforeUpdate.sql +++ b/db/routines/vn/triggers/buy_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`buy_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_beforeUpdate` BEFORE UPDATE ON `buy` FOR EACH ROW trig:BEGIN diff --git a/db/routines/vn/triggers/calendar_afterDelete.sql b/db/routines/vn/triggers/calendar_afterDelete.sql index 53a45788b..d67710a67 100644 --- a/db/routines/vn/triggers/calendar_afterDelete.sql +++ b/db/routines/vn/triggers/calendar_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`calendar_afterDelete` AFTER DELETE ON `calendar` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/calendar_beforeInsert.sql b/db/routines/vn/triggers/calendar_beforeInsert.sql index 3ff6a714e..6351f5391 100644 --- a/db/routines/vn/triggers/calendar_beforeInsert.sql +++ b/db/routines/vn/triggers/calendar_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`calendar_beforeInsert` BEFORE INSERT ON `calendar` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/calendar_beforeUpdate.sql b/db/routines/vn/triggers/calendar_beforeUpdate.sql index b94577035..73618aa2a 100644 --- a/db/routines/vn/triggers/calendar_beforeUpdate.sql +++ b/db/routines/vn/triggers/calendar_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`calendar_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`calendar_beforeUpdate` BEFORE UPDATE ON `calendar` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimBeginning_afterDelete.sql b/db/routines/vn/triggers/claimBeginning_afterDelete.sql index 378ddf3e9..c61abeeb2 100644 --- a/db/routines/vn/triggers/claimBeginning_afterDelete.sql +++ b/db/routines/vn/triggers/claimBeginning_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimBeginning_afterDelete` AFTER DELETE ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimBeginning_beforeInsert.sql b/db/routines/vn/triggers/claimBeginning_beforeInsert.sql index bea886c12..aa67bbdb3 100644 --- a/db/routines/vn/triggers/claimBeginning_beforeInsert.sql +++ b/db/routines/vn/triggers/claimBeginning_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimBeginning_beforeInsert` BEFORE INSERT ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql b/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql index a5b88941d..b4c06a2d7 100644 --- a/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimBeginning_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimBeginning_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimBeginning_beforeUpdate` BEFORE UPDATE ON `claimBeginning` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_afterDelete.sql b/db/routines/vn/triggers/claimDevelopment_afterDelete.sql index 867ab2237..af14b8817 100644 --- a/db/routines/vn/triggers/claimDevelopment_afterDelete.sql +++ b/db/routines/vn/triggers/claimDevelopment_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDevelopment_afterDelete` AFTER DELETE ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql b/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql index ae51ba446..5d1365a43 100644 --- a/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql +++ b/db/routines/vn/triggers/claimDevelopment_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeInsert` BEFORE INSERT ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql b/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql index 04e5156cc..c51c7c6d8 100644 --- a/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimDevelopment_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDevelopment_beforeUpdate` BEFORE UPDATE ON `claimDevelopment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_afterDelete.sql b/db/routines/vn/triggers/claimDms_afterDelete.sql index 7e5f1eeac..1a3630695 100644 --- a/db/routines/vn/triggers/claimDms_afterDelete.sql +++ b/db/routines/vn/triggers/claimDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDms_afterDelete` AFTER DELETE ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_beforeInsert.sql b/db/routines/vn/triggers/claimDms_beforeInsert.sql index 850fa680c..dfaffda36 100644 --- a/db/routines/vn/triggers/claimDms_beforeInsert.sql +++ b/db/routines/vn/triggers/claimDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDms_beforeInsert` BEFORE INSERT ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimDms_beforeUpdate.sql b/db/routines/vn/triggers/claimDms_beforeUpdate.sql index b8047066a..420b4d999 100644 --- a/db/routines/vn/triggers/claimDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimDms_beforeUpdate` BEFORE UPDATE ON `claimDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_afterDelete.sql b/db/routines/vn/triggers/claimEnd_afterDelete.sql index a825fc17c..b63db488f 100644 --- a/db/routines/vn/triggers/claimEnd_afterDelete.sql +++ b/db/routines/vn/triggers/claimEnd_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimEnd_afterDelete` AFTER DELETE ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_beforeInsert.sql b/db/routines/vn/triggers/claimEnd_beforeInsert.sql index 408c66f7b..113fb8179 100644 --- a/db/routines/vn/triggers/claimEnd_beforeInsert.sql +++ b/db/routines/vn/triggers/claimEnd_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimEnd_beforeInsert` BEFORE INSERT ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimEnd_beforeUpdate.sql b/db/routines/vn/triggers/claimEnd_beforeUpdate.sql index ff4e736a2..74d79c240 100644 --- a/db/routines/vn/triggers/claimEnd_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimEnd_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimEnd_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimEnd_beforeUpdate` BEFORE UPDATE ON `claimEnd` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_afterDelete.sql b/db/routines/vn/triggers/claimObservation_afterDelete.sql index c0230c98c..30899b2c5 100644 --- a/db/routines/vn/triggers/claimObservation_afterDelete.sql +++ b/db/routines/vn/triggers/claimObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimObservation_afterDelete` AFTER DELETE ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_beforeInsert.sql b/db/routines/vn/triggers/claimObservation_beforeInsert.sql index 6ea6d84b0..b510f5c7a 100644 --- a/db/routines/vn/triggers/claimObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/claimObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimObservation_beforeInsert` BEFORE INSERT ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimObservation_beforeUpdate.sql b/db/routines/vn/triggers/claimObservation_beforeUpdate.sql index 84e71eb14..a374856d0 100644 --- a/db/routines/vn/triggers/claimObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimObservation_beforeUpdate` BEFORE UPDATE ON `claimObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimRatio_afterInsert.sql b/db/routines/vn/triggers/claimRatio_afterInsert.sql index 5ba1a0893..ff203e9ba 100644 --- a/db/routines/vn/triggers/claimRatio_afterInsert.sql +++ b/db/routines/vn/triggers/claimRatio_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimRatio_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimRatio_afterInsert` AFTER INSERT ON `claimRatio` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimRatio_afterUpdate.sql b/db/routines/vn/triggers/claimRatio_afterUpdate.sql index 0781d1345..5a3272d5c 100644 --- a/db/routines/vn/triggers/claimRatio_afterUpdate.sql +++ b/db/routines/vn/triggers/claimRatio_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate` AFTER UPDATE ON `claimRatio` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_afterDelete.sql b/db/routines/vn/triggers/claimState_afterDelete.sql index 41c103bba..890ef3f73 100644 --- a/db/routines/vn/triggers/claimState_afterDelete.sql +++ b/db/routines/vn/triggers/claimState_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimState_afterDelete` AFTER DELETE ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_beforeInsert.sql b/db/routines/vn/triggers/claimState_beforeInsert.sql index cd2071d7b..fb7460c53 100644 --- a/db/routines/vn/triggers/claimState_beforeInsert.sql +++ b/db/routines/vn/triggers/claimState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimState_beforeInsert` BEFORE INSERT ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claimState_beforeUpdate.sql b/db/routines/vn/triggers/claimState_beforeUpdate.sql index f343d6f73..e113d4ec8 100644 --- a/db/routines/vn/triggers/claimState_beforeUpdate.sql +++ b/db/routines/vn/triggers/claimState_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claimState_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claimState_beforeUpdate` BEFORE UPDATE ON `claimState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_afterDelete.sql b/db/routines/vn/triggers/claim_afterDelete.sql index fb86e2670..57566d400 100644 --- a/db/routines/vn/triggers/claim_afterDelete.sql +++ b/db/routines/vn/triggers/claim_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claim_afterDelete` AFTER DELETE ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_beforeInsert.sql b/db/routines/vn/triggers/claim_beforeInsert.sql index 65eb12c00..dc3ef8c7a 100644 --- a/db/routines/vn/triggers/claim_beforeInsert.sql +++ b/db/routines/vn/triggers/claim_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claim_beforeInsert` BEFORE INSERT ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/claim_beforeUpdate.sql b/db/routines/vn/triggers/claim_beforeUpdate.sql index 995091bd8..2898a0c61 100644 --- a/db/routines/vn/triggers/claim_beforeUpdate.sql +++ b/db/routines/vn/triggers/claim_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`claim_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claim_beforeUpdate` BEFORE UPDATE ON `claim` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientContact_afterDelete.sql b/db/routines/vn/triggers/clientContact_afterDelete.sql index b1ba5044f..5b76d960d 100644 --- a/db/routines/vn/triggers/clientContact_afterDelete.sql +++ b/db/routines/vn/triggers/clientContact_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientContact_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientContact_afterDelete` AFTER DELETE ON `clientContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientContact_beforeInsert.sql b/db/routines/vn/triggers/clientContact_beforeInsert.sql index 6e1421532..fd810e140 100644 --- a/db/routines/vn/triggers/clientContact_beforeInsert.sql +++ b/db/routines/vn/triggers/clientContact_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientContact_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientContact_beforeInsert` BEFORE INSERT ON `clientContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientCredit_afterInsert.sql b/db/routines/vn/triggers/clientCredit_afterInsert.sql index e7f518be4..76ee34d58 100644 --- a/db/routines/vn/triggers/clientCredit_afterInsert.sql +++ b/db/routines/vn/triggers/clientCredit_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientCredit_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientCredit_afterInsert` AFTER INSERT ON `clientCredit` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_afterDelete.sql b/db/routines/vn/triggers/clientDms_afterDelete.sql index afc8db83b..c36632d5c 100644 --- a/db/routines/vn/triggers/clientDms_afterDelete.sql +++ b/db/routines/vn/triggers/clientDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientDms_afterDelete` AFTER DELETE ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_beforeInsert.sql b/db/routines/vn/triggers/clientDms_beforeInsert.sql index 4f9d5d760..42181d5c6 100644 --- a/db/routines/vn/triggers/clientDms_beforeInsert.sql +++ b/db/routines/vn/triggers/clientDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientDms_beforeInsert` BEFORE INSERT ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientDms_beforeUpdate.sql b/db/routines/vn/triggers/clientDms_beforeUpdate.sql index 41dd7abf8..7138caa5f 100644 --- a/db/routines/vn/triggers/clientDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientDms_beforeUpdate` BEFORE UPDATE ON `clientDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_afterDelete.sql b/db/routines/vn/triggers/clientObservation_afterDelete.sql index 8fed5d711..f855dccf8 100644 --- a/db/routines/vn/triggers/clientObservation_afterDelete.sql +++ b/db/routines/vn/triggers/clientObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientObservation_afterDelete` AFTER DELETE ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_beforeInsert.sql b/db/routines/vn/triggers/clientObservation_beforeInsert.sql index 8eb674fce..9767d0e58 100644 --- a/db/routines/vn/triggers/clientObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/clientObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientObservation_beforeInsert` BEFORE INSERT ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientObservation_beforeUpdate.sql b/db/routines/vn/triggers/clientObservation_beforeUpdate.sql index a1f7e0005..d1cb50e80 100644 --- a/db/routines/vn/triggers/clientObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientObservation_beforeUpdate` BEFORE UPDATE ON `clientObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_afterDelete.sql b/db/routines/vn/triggers/clientSample_afterDelete.sql index 846c529fc..5db0ce39e 100644 --- a/db/routines/vn/triggers/clientSample_afterDelete.sql +++ b/db/routines/vn/triggers/clientSample_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientSample_afterDelete` AFTER DELETE ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_beforeInsert.sql b/db/routines/vn/triggers/clientSample_beforeInsert.sql index c8c8ccf3d..956013ba9 100644 --- a/db/routines/vn/triggers/clientSample_beforeInsert.sql +++ b/db/routines/vn/triggers/clientSample_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientSample_beforeInsert` BEFORE INSERT ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientSample_beforeUpdate.sql b/db/routines/vn/triggers/clientSample_beforeUpdate.sql index 33f028f72..d9c7e045f 100644 --- a/db/routines/vn/triggers/clientSample_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientSample_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientSample_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientSample_beforeUpdate` BEFORE UPDATE ON `clientSample` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql b/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql index 5e88d4ec4..de4bf2c20 100644 --- a/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql +++ b/db/routines/vn/triggers/clientUnpaid_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeInsert` BEFORE INSERT ON `clientUnpaid` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql b/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql index 15676f317..f3dfbe356 100644 --- a/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql +++ b/db/routines/vn/triggers/clientUnpaid_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeUpdate` BEFORE UPDATE ON `clientUnpaid` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterDelete.sql b/db/routines/vn/triggers/client_afterDelete.sql index 23b736bd2..c5391d89b 100644 --- a/db/routines/vn/triggers/client_afterDelete.sql +++ b/db/routines/vn/triggers/client_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_afterDelete` AFTER DELETE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterInsert.sql b/db/routines/vn/triggers/client_afterInsert.sql index 2178f5f30..47ab3fb6f 100644 --- a/db/routines/vn/triggers/client_afterInsert.sql +++ b/db/routines/vn/triggers/client_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_afterInsert` AFTER INSERT ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_afterUpdate.sql b/db/routines/vn/triggers/client_afterUpdate.sql index 4c9219ab8..eb977faa3 100644 --- a/db/routines/vn/triggers/client_afterUpdate.sql +++ b/db/routines/vn/triggers/client_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_afterUpdate` AFTER UPDATE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_beforeInsert.sql b/db/routines/vn/triggers/client_beforeInsert.sql index da6d3c02b..45de107f1 100644 --- a/db/routines/vn/triggers/client_beforeInsert.sql +++ b/db/routines/vn/triggers/client_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_beforeInsert` BEFORE INSERT ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/client_beforeUpdate.sql b/db/routines/vn/triggers/client_beforeUpdate.sql index d1cea1be1..7142d6604 100644 --- a/db/routines/vn/triggers/client_beforeUpdate.sql +++ b/db/routines/vn/triggers/client_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`client_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_beforeUpdate` BEFORE UPDATE ON `client` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/cmr_beforeDelete.sql b/db/routines/vn/triggers/cmr_beforeDelete.sql index 85622b86a..566f3a1bc 100644 --- a/db/routines/vn/triggers/cmr_beforeDelete.sql +++ b/db/routines/vn/triggers/cmr_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`cmr_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`cmr_beforeDelete` BEFORE DELETE ON `cmr` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionColors_beforeInsert.sql b/db/routines/vn/triggers/collectionColors_beforeInsert.sql index db1201b6e..96a7d8aa1 100644 --- a/db/routines/vn/triggers/collectionColors_beforeInsert.sql +++ b/db/routines/vn/triggers/collectionColors_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionColors_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collectionColors_beforeInsert` BEFORE INSERT ON `collectionColors` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionColors_beforeUpdate.sql b/db/routines/vn/triggers/collectionColors_beforeUpdate.sql index 5435bca3f..c46460841 100644 --- a/db/routines/vn/triggers/collectionColors_beforeUpdate.sql +++ b/db/routines/vn/triggers/collectionColors_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionColors_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collectionColors_beforeUpdate` BEFORE UPDATE ON `collectionColors` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql b/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql index 49ac2d677..e5461a221 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterDelete` AFTER DELETE ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql b/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql index f76636fe8..1cc9d377d 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterInsert` AFTER INSERT ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql b/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql index c25f23ebb..745cddfbe 100644 --- a/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql +++ b/db/routines/vn/triggers/collectionVolumetry_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collectionVolumetry_afterUpdate` AFTER UPDATE ON `collectionVolumetry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/collection_beforeUpdate.sql b/db/routines/vn/triggers/collection_beforeUpdate.sql index aa3bc0590..d6b2f6b8a 100644 --- a/db/routines/vn/triggers/collection_beforeUpdate.sql +++ b/db/routines/vn/triggers/collection_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`collection_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`collection_beforeUpdate` BEFORE UPDATE ON `collection` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterDelete.sql b/db/routines/vn/triggers/country_afterDelete.sql index 599ca305e..8be887bb8 100644 --- a/db/routines/vn/triggers/country_afterDelete.sql +++ b/db/routines/vn/triggers/country_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`country_afterDelete` AFTER DELETE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterInsert.sql b/db/routines/vn/triggers/country_afterInsert.sql index 337ecfbf9..af9626b9c 100644 --- a/db/routines/vn/triggers/country_afterInsert.sql +++ b/db/routines/vn/triggers/country_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`country_afterInsert` AFTER INSERT ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_afterUpdate.sql b/db/routines/vn/triggers/country_afterUpdate.sql index f0de13169..95d823c60 100644 --- a/db/routines/vn/triggers/country_afterUpdate.sql +++ b/db/routines/vn/triggers/country_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`country_afterUpdate` AFTER UPDATE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_beforeInsert.sql b/db/routines/vn/triggers/country_beforeInsert.sql index b6d73ff64..eb43cf989 100644 --- a/db/routines/vn/triggers/country_beforeInsert.sql +++ b/db/routines/vn/triggers/country_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`country_beforeInsert` BEFORE INSERT ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/country_beforeUpdate.sql b/db/routines/vn/triggers/country_beforeUpdate.sql index 2050bfdad..f63672788 100644 --- a/db/routines/vn/triggers/country_beforeUpdate.sql +++ b/db/routines/vn/triggers/country_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`country_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`country_beforeUpdate` BEFORE UPDATE ON `country` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditClassification_beforeUpdate.sql b/db/routines/vn/triggers/creditClassification_beforeUpdate.sql index 84fd5d0c7..e586e7685 100644 --- a/db/routines/vn/triggers/creditClassification_beforeUpdate.sql +++ b/db/routines/vn/triggers/creditClassification_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditClassification_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditClassification_beforeUpdate` BEFORE UPDATE ON `creditClassification` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditInsurance_afterInsert.sql b/db/routines/vn/triggers/creditInsurance_afterInsert.sql index f5e808ace..c865f31a4 100644 --- a/db/routines/vn/triggers/creditInsurance_afterInsert.sql +++ b/db/routines/vn/triggers/creditInsurance_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditInsurance_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditInsurance_afterInsert` AFTER INSERT ON `creditInsurance` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/creditInsurance_beforeInsert.sql b/db/routines/vn/triggers/creditInsurance_beforeInsert.sql index 413d0d689..8e036d373 100644 --- a/db/routines/vn/triggers/creditInsurance_beforeInsert.sql +++ b/db/routines/vn/triggers/creditInsurance_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`creditInsurance_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditInsurance_beforeInsert` BEFORE INSERT ON `creditInsurance` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/delivery_beforeInsert.sql b/db/routines/vn/triggers/delivery_beforeInsert.sql index 13bf3b513..7996e0aef 100644 --- a/db/routines/vn/triggers/delivery_beforeInsert.sql +++ b/db/routines/vn/triggers/delivery_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`delivery_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`delivery_beforeInsert` BEFORE INSERT ON `delivery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/delivery_beforeUpdate.sql b/db/routines/vn/triggers/delivery_beforeUpdate.sql index 922063fe5..4ddb932e9 100644 --- a/db/routines/vn/triggers/delivery_beforeUpdate.sql +++ b/db/routines/vn/triggers/delivery_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate` BEFORE UPDATE ON `delivery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_afterDelete.sql b/db/routines/vn/triggers/department_afterDelete.sql index 6fe6a5434..09fcf3ea1 100644 --- a/db/routines/vn/triggers/department_afterDelete.sql +++ b/db/routines/vn/triggers/department_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`department_afterDelete` AFTER DELETE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_afterUpdate.sql b/db/routines/vn/triggers/department_afterUpdate.sql index 9c7ee4db3..559fad9a3 100644 --- a/db/routines/vn/triggers/department_afterUpdate.sql +++ b/db/routines/vn/triggers/department_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`department_afterUpdate` AFTER UPDATE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_beforeDelete.sql b/db/routines/vn/triggers/department_beforeDelete.sql index 94389e78b..307af6b72 100644 --- a/db/routines/vn/triggers/department_beforeDelete.sql +++ b/db/routines/vn/triggers/department_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`department_beforeDelete` BEFORE DELETE ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/department_beforeInsert.sql b/db/routines/vn/triggers/department_beforeInsert.sql index 8880f3f04..8fa89fad6 100644 --- a/db/routines/vn/triggers/department_beforeInsert.sql +++ b/db/routines/vn/triggers/department_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`department_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`department_beforeInsert` BEFORE INSERT ON `department` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql index 0b8014ee6..f39ad28db 100644 --- a/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionModels_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeInsert` BEFORE INSERT ON `deviceProductionModels` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql index 8498df0d9..ea43db8a0 100644 --- a/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionModels_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionModels_beforeUpdate` BEFORE UPDATE ON `deviceProductionModels` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql index 5e9fe73a7..6fb4bd67a 100644 --- a/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeInsert` BEFORE INSERT ON `deviceProductionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql index f81753af8..56a1d2aad 100644 --- a/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionState_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionState_beforeUpdate` BEFORE UPDATE ON `deviceProductionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql b/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql index 7824b3403..4e8d7ddf2 100644 --- a/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql +++ b/db/routines/vn/triggers/deviceProductionUser_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterDelete` AFTER DELETE ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql b/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql index 3954292e8..f33241d3b 100644 --- a/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql +++ b/db/routines/vn/triggers/deviceProductionUser_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterInsert` AFTER INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql b/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql index df45cc503..ab9e43cd4 100644 --- a/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProductionUser_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeInsert` BEFORE INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql b/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql index 09799a498..85846fb84 100644 --- a/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProductionUser_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProductionUser_beforeUpdate` BEFORE UPDATE ON `deviceProductionUser` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_afterDelete.sql b/db/routines/vn/triggers/deviceProduction_afterDelete.sql index 5141c23b7..b7cbac9ff 100644 --- a/db/routines/vn/triggers/deviceProduction_afterDelete.sql +++ b/db/routines/vn/triggers/deviceProduction_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProduction_afterDelete` AFTER DELETE ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_beforeInsert.sql b/db/routines/vn/triggers/deviceProduction_beforeInsert.sql index 28878ce3d..022a1fbb9 100644 --- a/db/routines/vn/triggers/deviceProduction_beforeInsert.sql +++ b/db/routines/vn/triggers/deviceProduction_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProduction_beforeInsert` BEFORE INSERT ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql b/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql index 50cabe342..83e26e224 100644 --- a/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql +++ b/db/routines/vn/triggers/deviceProduction_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`deviceProduction_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`deviceProduction_beforeUpdate` BEFORE UPDATE ON `deviceProduction` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeDelete.sql b/db/routines/vn/triggers/dms_beforeDelete.sql index e29074d63..603514afa 100644 --- a/db/routines/vn/triggers/dms_beforeDelete.sql +++ b/db/routines/vn/triggers/dms_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`dms_beforeDelete` BEFORE DELETE ON `dms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeInsert.sql b/db/routines/vn/triggers/dms_beforeInsert.sql index 5d210dae0..c7ed6bb47 100644 --- a/db/routines/vn/triggers/dms_beforeInsert.sql +++ b/db/routines/vn/triggers/dms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`dms_beforeInsert` BEFORE INSERT ON `dms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/dms_beforeUpdate.sql b/db/routines/vn/triggers/dms_beforeUpdate.sql index bb2276f51..12a640c1b 100644 --- a/db/routines/vn/triggers/dms_beforeUpdate.sql +++ b/db/routines/vn/triggers/dms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`dms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`dms_beforeUpdate` BEFORE UPDATE ON `dms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/duaTax_beforeInsert.sql b/db/routines/vn/triggers/duaTax_beforeInsert.sql index 8d19b1e34..8ce66429b 100644 --- a/db/routines/vn/triggers/duaTax_beforeInsert.sql +++ b/db/routines/vn/triggers/duaTax_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`duaTax_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`duaTax_beforeInsert` BEFORE INSERT ON `duaTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/duaTax_beforeUpdate.sql b/db/routines/vn/triggers/duaTax_beforeUpdate.sql index 21ce9d3b9..2d3a59985 100644 --- a/db/routines/vn/triggers/duaTax_beforeUpdate.sql +++ b/db/routines/vn/triggers/duaTax_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`duaTax_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`duaTax_beforeUpdate` BEFORE UPDATE ON `duaTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql b/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql index e1543c2b9..6df9df941 100644 --- a/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql +++ b/db/routines/vn/triggers/ektEntryAssign_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterInsert` AFTER INSERT ON `ektEntryAssign` FOR EACH ROW UPDATE entry SET reference = NEW.`ref` WHERE id = NEW.entryFk$$ diff --git a/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql b/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql index 64289c28e..c85d72e14 100644 --- a/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql +++ b/db/routines/vn/triggers/ektEntryAssign_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ektEntryAssign_afterUpdate` AFTER UPDATE ON `ektEntryAssign` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_afterDelete.sql b/db/routines/vn/triggers/entryDms_afterDelete.sql index 00167d064..3c32fbd26 100644 --- a/db/routines/vn/triggers/entryDms_afterDelete.sql +++ b/db/routines/vn/triggers/entryDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryDms_afterDelete` AFTER DELETE ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_beforeInsert.sql b/db/routines/vn/triggers/entryDms_beforeInsert.sql index 61f78d647..f0712b481 100644 --- a/db/routines/vn/triggers/entryDms_beforeInsert.sql +++ b/db/routines/vn/triggers/entryDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryDms_beforeInsert` BEFORE INSERT ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryDms_beforeUpdate.sql b/db/routines/vn/triggers/entryDms_beforeUpdate.sql index 67ccf3577..d9b548f60 100644 --- a/db/routines/vn/triggers/entryDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/entryDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryDms_beforeUpdate` BEFORE UPDATE ON `entryDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_afterDelete.sql b/db/routines/vn/triggers/entryObservation_afterDelete.sql index 02903707c..d61c678d2 100644 --- a/db/routines/vn/triggers/entryObservation_afterDelete.sql +++ b/db/routines/vn/triggers/entryObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryObservation_afterDelete` AFTER DELETE ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_beforeInsert.sql b/db/routines/vn/triggers/entryObservation_beforeInsert.sql index a8175771e..9a9a8a3ee 100644 --- a/db/routines/vn/triggers/entryObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/entryObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryObservation_beforeInsert` BEFORE INSERT ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entryObservation_beforeUpdate.sql b/db/routines/vn/triggers/entryObservation_beforeUpdate.sql index 3d6909135..3d1b73bec 100644 --- a/db/routines/vn/triggers/entryObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/entryObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entryObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entryObservation_beforeUpdate` BEFORE UPDATE ON `entryObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_afterDelete.sql b/db/routines/vn/triggers/entry_afterDelete.sql index f509a6e62..ebc6cd0e1 100644 --- a/db/routines/vn/triggers/entry_afterDelete.sql +++ b/db/routines/vn/triggers/entry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_afterDelete` AFTER DELETE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_afterUpdate.sql b/db/routines/vn/triggers/entry_afterUpdate.sql index a811bc562..3a0227cf9 100644 --- a/db/routines/vn/triggers/entry_afterUpdate.sql +++ b/db/routines/vn/triggers/entry_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_afterUpdate` AFTER UPDATE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeDelete.sql b/db/routines/vn/triggers/entry_beforeDelete.sql index 6029af7c1..4e933e1f4 100644 --- a/db/routines/vn/triggers/entry_beforeDelete.sql +++ b/db/routines/vn/triggers/entry_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_beforeDelete` BEFORE DELETE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeInsert.sql b/db/routines/vn/triggers/entry_beforeInsert.sql index 6676f17e8..8a114c13f 100644 --- a/db/routines/vn/triggers/entry_beforeInsert.sql +++ b/db/routines/vn/triggers/entry_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_beforeInsert` BEFORE INSERT ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/entry_beforeUpdate.sql b/db/routines/vn/triggers/entry_beforeUpdate.sql index 678cc4540..ee2178024 100644 --- a/db/routines/vn/triggers/entry_beforeUpdate.sql +++ b/db/routines/vn/triggers/entry_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`entry_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_beforeUpdate` BEFORE UPDATE ON `entry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql b/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql index 20bd9d204..d2ea7ef76 100644 --- a/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionPallet_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionPallet_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expeditionPallet_beforeInsert` BEFORE INSERT ON `expeditionPallet` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionScan_beforeInsert.sql b/db/routines/vn/triggers/expeditionScan_beforeInsert.sql index 9b7170992..ec1dbc7c7 100644 --- a/db/routines/vn/triggers/expeditionScan_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionScan_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionScan_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expeditionScan_beforeInsert` BEFORE INSERT ON `expeditionScan` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionState_afterInsert.sql b/db/routines/vn/triggers/expeditionState_afterInsert.sql index 0c5b547a9..6f0e4c622 100644 --- a/db/routines/vn/triggers/expeditionState_afterInsert.sql +++ b/db/routines/vn/triggers/expeditionState_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionState_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expeditionState_afterInsert` AFTER INSERT ON `expeditionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expeditionState_beforeInsert.sql b/db/routines/vn/triggers/expeditionState_beforeInsert.sql index 4d7625a82..c4dd40611 100644 --- a/db/routines/vn/triggers/expeditionState_beforeInsert.sql +++ b/db/routines/vn/triggers/expeditionState_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expeditionState_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expeditionState_beforeInsert` BEFORE INSERT ON `expeditionState` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_afterDelete.sql b/db/routines/vn/triggers/expedition_afterDelete.sql index ee60d8f1d..5d74a71e5 100644 --- a/db/routines/vn/triggers/expedition_afterDelete.sql +++ b/db/routines/vn/triggers/expedition_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expedition_afterDelete` AFTER DELETE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeDelete.sql b/db/routines/vn/triggers/expedition_beforeDelete.sql index fdf2df772..13ba19631 100644 --- a/db/routines/vn/triggers/expedition_beforeDelete.sql +++ b/db/routines/vn/triggers/expedition_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expedition_beforeDelete` BEFORE DELETE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeInsert.sql b/db/routines/vn/triggers/expedition_beforeInsert.sql index d0b86a4cb..42365c28f 100644 --- a/db/routines/vn/triggers/expedition_beforeInsert.sql +++ b/db/routines/vn/triggers/expedition_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expedition_beforeInsert` BEFORE INSERT ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/expedition_beforeUpdate.sql b/db/routines/vn/triggers/expedition_beforeUpdate.sql index e768f5394..49cb6e816 100644 --- a/db/routines/vn/triggers/expedition_beforeUpdate.sql +++ b/db/routines/vn/triggers/expedition_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`expedition_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/floramondoConfig_afterInsert.sql b/db/routines/vn/triggers/floramondoConfig_afterInsert.sql index 8d50846a1..8c94ecbc4 100644 --- a/db/routines/vn/triggers/floramondoConfig_afterInsert.sql +++ b/db/routines/vn/triggers/floramondoConfig_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`floramondoConfig_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`floramondoConfig_afterInsert` AFTER INSERT ON `floramondoConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/gregue_beforeInsert.sql b/db/routines/vn/triggers/gregue_beforeInsert.sql index 3a8b924bb..46e867bc8 100644 --- a/db/routines/vn/triggers/gregue_beforeInsert.sql +++ b/db/routines/vn/triggers/gregue_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`gregue_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`gregue_beforeInsert` BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_afterDelete.sql b/db/routines/vn/triggers/greuge_afterDelete.sql index 0e7f1a2d3..5d6784579 100644 --- a/db/routines/vn/triggers/greuge_afterDelete.sql +++ b/db/routines/vn/triggers/greuge_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`greuge_afterDelete` AFTER DELETE ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_beforeInsert.sql b/db/routines/vn/triggers/greuge_beforeInsert.sql index 6bc0a4767..b37c9d2d0 100644 --- a/db/routines/vn/triggers/greuge_beforeInsert.sql +++ b/db/routines/vn/triggers/greuge_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`greuge_beforeInsert` BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/greuge_beforeUpdate.sql b/db/routines/vn/triggers/greuge_beforeUpdate.sql index 5b1ced296..af9f06206 100644 --- a/db/routines/vn/triggers/greuge_beforeUpdate.sql +++ b/db/routines/vn/triggers/greuge_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`greuge_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`greuge_beforeUpdate` BEFORE UPDATE ON `greuge` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/host_beforeUpdate.sql b/db/routines/vn/triggers/host_beforeUpdate.sql index 65fa0cd43..5a7fce065 100644 --- a/db/routines/vn/triggers/host_beforeUpdate.sql +++ b/db/routines/vn/triggers/host_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`host_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`host_beforeUpdate` BEFORE UPDATE ON `host` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql b/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql index d5b6e4ae7..1e43fb816 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInDueDay_afterDelete` AFTER DELETE ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql b/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql index 5185d89bc..4e859496e 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeInsert` BEFORE INSERT ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql b/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql index 863a28cef..9ca9aae50 100644 --- a/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceInDueDay_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInDueDay_beforeUpdate` BEFORE UPDATE ON `invoiceInDueDay` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_afterDelete.sql b/db/routines/vn/triggers/invoiceInTax_afterDelete.sql index 106f7fc5a..e48135ba6 100644 --- a/db/routines/vn/triggers/invoiceInTax_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceInTax_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInTax_afterDelete` AFTER DELETE ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql b/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql index 432fb0bd3..c20e60b40 100644 --- a/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceInTax_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeInsert` BEFORE INSERT ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql b/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql index cf7d09a50..68450bb5e 100644 --- a/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceInTax_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUpdate` BEFORE UPDATE ON `invoiceInTax` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_afterDelete.sql b/db/routines/vn/triggers/invoiceIn_afterDelete.sql index cd766a361..6b6a05765 100644 --- a/db/routines/vn/triggers/invoiceIn_afterDelete.sql +++ b/db/routines/vn/triggers/invoiceIn_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_afterDelete` AFTER DELETE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_afterUpdate.sql b/db/routines/vn/triggers/invoiceIn_afterUpdate.sql index 7f0eeeb79..95b1d98a9 100644 --- a/db/routines/vn/triggers/invoiceIn_afterUpdate.sql +++ b/db/routines/vn/triggers/invoiceIn_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate` AFTER UPDATE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeDelete.sql b/db/routines/vn/triggers/invoiceIn_beforeDelete.sql index 587d4b764..3f3d48a2a 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeDelete.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_beforeDelete` BEFORE DELETE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeInsert.sql b/db/routines/vn/triggers/invoiceIn_beforeInsert.sql index d14c617ae..f01557b5e 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_beforeInsert` BEFORE INSERT ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql b/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql index d0ab65218..e58fadbdf 100644 --- a/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceIn_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdate` BEFORE UPDATE ON `invoiceIn` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_afterInsert.sql b/db/routines/vn/triggers/invoiceOut_afterInsert.sql index 0c8f762bf..868350f20 100644 --- a/db/routines/vn/triggers/invoiceOut_afterInsert.sql +++ b/db/routines/vn/triggers/invoiceOut_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceOut_afterInsert` AFTER INSERT ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeDelete.sql b/db/routines/vn/triggers/invoiceOut_beforeDelete.sql index a63197a65..5c9839f05 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeDelete.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceOut_beforeDelete` BEFORE DELETE ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeInsert.sql b/db/routines/vn/triggers/invoiceOut_beforeInsert.sql index d50279a95..9fd027ba0 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeInsert.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceOut_beforeInsert` BEFORE INSERT ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql b/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql index bb9c13c40..5efb79c77 100644 --- a/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql +++ b/db/routines/vn/triggers/invoiceOut_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceOut_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceOut_beforeUpdate` BEFORE UPDATE ON `invoiceOut` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_afterDelete.sql b/db/routines/vn/triggers/itemBarcode_afterDelete.sql index a75ffb28f..4efde371d 100644 --- a/db/routines/vn/triggers/itemBarcode_afterDelete.sql +++ b/db/routines/vn/triggers/itemBarcode_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBarcode_afterDelete` AFTER DELETE ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_beforeInsert.sql b/db/routines/vn/triggers/itemBarcode_beforeInsert.sql index 3c272819d..53563b754 100644 --- a/db/routines/vn/triggers/itemBarcode_beforeInsert.sql +++ b/db/routines/vn/triggers/itemBarcode_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBarcode_beforeInsert` BEFORE INSERT ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql b/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql index a47d2bf68..e73fae473 100644 --- a/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemBarcode_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBarcode_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBarcode_beforeUpdate` BEFORE UPDATE ON `itemBarcode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_afterDelete.sql b/db/routines/vn/triggers/itemBotanical_afterDelete.sql index e318f78e8..7858bf1f5 100644 --- a/db/routines/vn/triggers/itemBotanical_afterDelete.sql +++ b/db/routines/vn/triggers/itemBotanical_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBotanical_afterDelete` AFTER DELETE ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_beforeInsert.sql b/db/routines/vn/triggers/itemBotanical_beforeInsert.sql index 98d62a3ea..312c8c9c7 100644 --- a/db/routines/vn/triggers/itemBotanical_beforeInsert.sql +++ b/db/routines/vn/triggers/itemBotanical_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBotanical_beforeInsert` BEFORE INSERT ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql b/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql index 1f0fbbbf7..30a1778a6 100644 --- a/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemBotanical_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemBotanical_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemBotanical_beforeUpdate` BEFORE UPDATE ON `itemBotanical` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCategory_afterInsert.sql b/db/routines/vn/triggers/itemCategory_afterInsert.sql index 20b1deaf4..7f32b4af2 100644 --- a/db/routines/vn/triggers/itemCategory_afterInsert.sql +++ b/db/routines/vn/triggers/itemCategory_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCategory_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemCategory_afterInsert` AFTER INSERT ON `itemCategory` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCost_beforeInsert.sql b/db/routines/vn/triggers/itemCost_beforeInsert.sql index af39ab98d..0c1b92548 100644 --- a/db/routines/vn/triggers/itemCost_beforeInsert.sql +++ b/db/routines/vn/triggers/itemCost_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCost_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemCost_beforeInsert` BEFORE INSERT ON `itemCost` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemCost_beforeUpdate.sql b/db/routines/vn/triggers/itemCost_beforeUpdate.sql index 83f23e58e..bd5fde85a 100644 --- a/db/routines/vn/triggers/itemCost_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemCost_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemCost_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemCost_beforeUpdate` BEFORE UPDATE ON `itemCost` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql b/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql index e12152fcd..41a1c41ef 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_afterDelete` AFTER DELETE ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql b/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql index bf6d8583a..de19b68c7 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeInsert` BEFORE INSERT ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql b/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql index 89b93a66d..42b9d7f22 100644 --- a/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemMinimumQuantity_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemMinimumQuantity_beforeUpdate` BEFORE UPDATE ON `itemMinimumQuantity` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving _afterDelete.sql b/db/routines/vn/triggers/itemShelving _afterDelete.sql index 7ccc74a4a..dc32aa75b 100644 --- a/db/routines/vn/triggers/itemShelving _afterDelete.sql +++ b/db/routines/vn/triggers/itemShelving _afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterDelete` AFTER DELETE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql b/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql index 91f0b0194..3531b094c 100644 --- a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql +++ b/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert` AFTER INSERT ON `itemShelvingSale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_afterUpdate.sql b/db/routines/vn/triggers/itemShelving_afterUpdate.sql index 8756180d9..e5e63db43 100644 --- a/db/routines/vn/triggers/itemShelving_afterUpdate.sql +++ b/db/routines/vn/triggers/itemShelving_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate` AFTER UPDATE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_beforeDelete.sql b/db/routines/vn/triggers/itemShelving_beforeDelete.sql index c9d74ac49..89737a841 100644 --- a/db/routines/vn/triggers/itemShelving_beforeDelete.sql +++ b/db/routines/vn/triggers/itemShelving_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete` BEFORE DELETE ON `itemShelving` FOR EACH ROW INSERT INTO vn.itemShelvingLog(itemShelvingFk, diff --git a/db/routines/vn/triggers/itemShelving_beforeInsert.sql b/db/routines/vn/triggers/itemShelving_beforeInsert.sql index ce91ac35e..484e785f5 100644 --- a/db/routines/vn/triggers/itemShelving_beforeInsert.sql +++ b/db/routines/vn/triggers/itemShelving_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_beforeInsert` BEFORE INSERT ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql index fbe114c12..0d1189278 100644 --- a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemShelving_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_beforeUpdate` BEFORE UPDATE ON `itemShelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterDelete.sql b/db/routines/vn/triggers/itemTag_afterDelete.sql index 4e3bfb226..e79c1ac5a 100644 --- a/db/routines/vn/triggers/itemTag_afterDelete.sql +++ b/db/routines/vn/triggers/itemTag_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTag_afterDelete` AFTER DELETE ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterInsert.sql b/db/routines/vn/triggers/itemTag_afterInsert.sql index fd7c20deb..9e3e9f4e3 100644 --- a/db/routines/vn/triggers/itemTag_afterInsert.sql +++ b/db/routines/vn/triggers/itemTag_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTag_afterInsert` AFTER INSERT ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_afterUpdate.sql b/db/routines/vn/triggers/itemTag_afterUpdate.sql index a1a8cd574..494ffe76c 100644 --- a/db/routines/vn/triggers/itemTag_afterUpdate.sql +++ b/db/routines/vn/triggers/itemTag_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTag_afterUpdate` AFTER UPDATE ON `itemTag` FOR EACH ROW trig: BEGIN diff --git a/db/routines/vn/triggers/itemTag_beforeInsert.sql b/db/routines/vn/triggers/itemTag_beforeInsert.sql index 8c05e73ec..d97d97106 100644 --- a/db/routines/vn/triggers/itemTag_beforeInsert.sql +++ b/db/routines/vn/triggers/itemTag_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTag_beforeInsert` BEFORE INSERT ON `itemTag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTag_beforeUpdate.sql b/db/routines/vn/triggers/itemTag_beforeUpdate.sql index b0ecd54b8..1bdfbad1e 100644 --- a/db/routines/vn/triggers/itemTag_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemTag_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTag_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTag_beforeUpdate` BEFORE UPDATE ON `itemTag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql b/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql index cbc112a54..0cdf01283 100644 --- a/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql +++ b/db/routines/vn/triggers/itemTaxCountry_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTaxCountry_afterDelete` AFTER DELETE ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql b/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql index e853398af..569be2d98 100644 --- a/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql +++ b/db/routines/vn/triggers/itemTaxCountry_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeInsert` BEFORE INSERT ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql b/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql index aca4f519a..ad7d6327b 100644 --- a/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemTaxCountry_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemTaxCountry_beforeUpdate` BEFORE UPDATE ON `itemTaxCountry` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemType_beforeUpdate.sql b/db/routines/vn/triggers/itemType_beforeUpdate.sql index 3498a106c..613ae8bfa 100644 --- a/db/routines/vn/triggers/itemType_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemType_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`itemType_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemType_beforeUpdate` BEFORE UPDATE ON `itemType` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterDelete.sql b/db/routines/vn/triggers/item_afterDelete.sql index 81ad67cb2..175d0ae44 100644 --- a/db/routines/vn/triggers/item_afterDelete.sql +++ b/db/routines/vn/triggers/item_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_afterDelete` AFTER DELETE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterInsert.sql b/db/routines/vn/triggers/item_afterInsert.sql index c3023131d..6c0137a2f 100644 --- a/db/routines/vn/triggers/item_afterInsert.sql +++ b/db/routines/vn/triggers/item_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_afterInsert` AFTER INSERT ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_afterUpdate.sql b/db/routines/vn/triggers/item_afterUpdate.sql index 75d5ddccc..92cc6f78c 100644 --- a/db/routines/vn/triggers/item_afterUpdate.sql +++ b/db/routines/vn/triggers/item_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_afterUpdate` AFTER UPDATE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_beforeInsert.sql b/db/routines/vn/triggers/item_beforeInsert.sql index 4d5f8162d..6f5cdaa71 100644 --- a/db/routines/vn/triggers/item_beforeInsert.sql +++ b/db/routines/vn/triggers/item_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_beforeInsert` BEFORE INSERT ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/item_beforeUpdate.sql b/db/routines/vn/triggers/item_beforeUpdate.sql index aa4630e1f..0db1dbb40 100644 --- a/db/routines/vn/triggers/item_beforeUpdate.sql +++ b/db/routines/vn/triggers/item_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`item_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`item_beforeUpdate` BEFORE UPDATE ON `item` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/machine_beforeInsert.sql b/db/routines/vn/triggers/machine_beforeInsert.sql index 52528b7b5..81f4bb346 100644 --- a/db/routines/vn/triggers/machine_beforeInsert.sql +++ b/db/routines/vn/triggers/machine_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`machine_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`machine_beforeInsert` BEFORE INSERT ON `machine` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/mail_beforeInsert.sql b/db/routines/vn/triggers/mail_beforeInsert.sql index 324710754..04c9db61c 100644 --- a/db/routines/vn/triggers/mail_beforeInsert.sql +++ b/db/routines/vn/triggers/mail_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`mail_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`mail_beforeInsert` BEFORE INSERT ON `mail` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/mandate_beforeInsert.sql b/db/routines/vn/triggers/mandate_beforeInsert.sql index 277d8d236..bfc36cc31 100644 --- a/db/routines/vn/triggers/mandate_beforeInsert.sql +++ b/db/routines/vn/triggers/mandate_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`mandate_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`mandate_beforeInsert` BEFORE INSERT ON `mandate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/operator_beforeInsert.sql b/db/routines/vn/triggers/operator_beforeInsert.sql index af19c4aad..e6d82dcc6 100644 --- a/db/routines/vn/triggers/operator_beforeInsert.sql +++ b/db/routines/vn/triggers/operator_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`operator_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`operator_beforeInsert` BEFORE INSERT ON `operator` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/operator_beforeUpdate.sql b/db/routines/vn/triggers/operator_beforeUpdate.sql index 9fbe5bb99..1294fcb8e 100644 --- a/db/routines/vn/triggers/operator_beforeUpdate.sql +++ b/db/routines/vn/triggers/operator_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`operator_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`operator_beforeUpdate` BEFORE UPDATE ON `operator` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packaging_beforeInsert.sql b/db/routines/vn/triggers/packaging_beforeInsert.sql index 4a2c3809b..abbe24a45 100644 --- a/db/routines/vn/triggers/packaging_beforeInsert.sql +++ b/db/routines/vn/triggers/packaging_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packaging_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`packaging_beforeInsert` BEFORE INSERT ON `packaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packaging_beforeUpdate.sql b/db/routines/vn/triggers/packaging_beforeUpdate.sql index b41f755f5..c11b76902 100644 --- a/db/routines/vn/triggers/packaging_beforeUpdate.sql +++ b/db/routines/vn/triggers/packaging_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packaging_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`packaging_beforeUpdate` BEFORE UPDATE ON `packaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_afterDelete.sql b/db/routines/vn/triggers/packingSite_afterDelete.sql index f9cfe9b01..a1fccf67d 100644 --- a/db/routines/vn/triggers/packingSite_afterDelete.sql +++ b/db/routines/vn/triggers/packingSite_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`packingSite_afterDelete` AFTER DELETE ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_beforeInsert.sql b/db/routines/vn/triggers/packingSite_beforeInsert.sql index e7c854eee..aab2d4b19 100644 --- a/db/routines/vn/triggers/packingSite_beforeInsert.sql +++ b/db/routines/vn/triggers/packingSite_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`packingSite_beforeInsert` BEFORE INSERT ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/packingSite_beforeUpdate.sql b/db/routines/vn/triggers/packingSite_beforeUpdate.sql index 2590ff057..dc365fc41 100644 --- a/db/routines/vn/triggers/packingSite_beforeUpdate.sql +++ b/db/routines/vn/triggers/packingSite_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`packingSite_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`packingSite_beforeUpdate` BEFORE UPDATE ON `packingSite` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_afterDelete.sql b/db/routines/vn/triggers/parking_afterDelete.sql index b5ce29d44..1237b5dc6 100644 --- a/db/routines/vn/triggers/parking_afterDelete.sql +++ b/db/routines/vn/triggers/parking_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`parking_afterDelete` AFTER DELETE ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_beforeInsert.sql b/db/routines/vn/triggers/parking_beforeInsert.sql index f4899b5f7..f55e9c1b2 100644 --- a/db/routines/vn/triggers/parking_beforeInsert.sql +++ b/db/routines/vn/triggers/parking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`parking_beforeInsert` BEFORE INSERT ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/parking_beforeUpdate.sql b/db/routines/vn/triggers/parking_beforeUpdate.sql index 137f869ca..1418abc34 100644 --- a/db/routines/vn/triggers/parking_beforeUpdate.sql +++ b/db/routines/vn/triggers/parking_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`parking_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`parking_beforeUpdate` BEFORE UPDATE ON `parking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_afterInsert.sql b/db/routines/vn/triggers/payment_afterInsert.sql index f84613471..f9c9e2314 100644 --- a/db/routines/vn/triggers/payment_afterInsert.sql +++ b/db/routines/vn/triggers/payment_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`payment_afterInsert` AFTER INSERT ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_beforeInsert.sql b/db/routines/vn/triggers/payment_beforeInsert.sql index 11d2c8ec9..85c6060c0 100644 --- a/db/routines/vn/triggers/payment_beforeInsert.sql +++ b/db/routines/vn/triggers/payment_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`payment_beforeInsert` BEFORE INSERT ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/payment_beforeUpdate.sql b/db/routines/vn/triggers/payment_beforeUpdate.sql index 2c54f1cb1..9a3bbe460 100644 --- a/db/routines/vn/triggers/payment_beforeUpdate.sql +++ b/db/routines/vn/triggers/payment_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`payment_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`payment_beforeUpdate` BEFORE UPDATE ON `payment` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_afterDelete.sql b/db/routines/vn/triggers/postCode_afterDelete.sql index be578ff8e..4afcee770 100644 --- a/db/routines/vn/triggers/postCode_afterDelete.sql +++ b/db/routines/vn/triggers/postCode_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`postCode_afterDelete` AFTER DELETE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_afterUpdate.sql b/db/routines/vn/triggers/postCode_afterUpdate.sql index 497c68f74..f1019342f 100644 --- a/db/routines/vn/triggers/postCode_afterUpdate.sql +++ b/db/routines/vn/triggers/postCode_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`postCode_afterUpdate` AFTER UPDATE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_beforeInsert.sql b/db/routines/vn/triggers/postCode_beforeInsert.sql index 77364ee1a..503d917a8 100644 --- a/db/routines/vn/triggers/postCode_beforeInsert.sql +++ b/db/routines/vn/triggers/postCode_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`postCode_beforeInsert` BEFORE INSERT ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/postCode_beforeUpdate.sql b/db/routines/vn/triggers/postCode_beforeUpdate.sql index da831302c..fa8f03a15 100644 --- a/db/routines/vn/triggers/postCode_beforeUpdate.sql +++ b/db/routines/vn/triggers/postCode_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`postCode_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`postCode_beforeUpdate` BEFORE UPDATE ON `postCode` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/priceFixed_beforeInsert.sql b/db/routines/vn/triggers/priceFixed_beforeInsert.sql index 0189856bb..b278f3749 100644 --- a/db/routines/vn/triggers/priceFixed_beforeInsert.sql +++ b/db/routines/vn/triggers/priceFixed_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`priceFixed_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`priceFixed_beforeInsert` BEFORE INSERT ON `priceFixed` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/priceFixed_beforeUpdate.sql b/db/routines/vn/triggers/priceFixed_beforeUpdate.sql index 231087eed..1b8efa7f5 100644 --- a/db/routines/vn/triggers/priceFixed_beforeUpdate.sql +++ b/db/routines/vn/triggers/priceFixed_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`priceFixed_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`priceFixed_beforeUpdate` BEFORE UPDATE ON `priceFixed` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_afterDelete.sql b/db/routines/vn/triggers/productionConfig_afterDelete.sql index e5f0e0a69..6b6800d4f 100644 --- a/db/routines/vn/triggers/productionConfig_afterDelete.sql +++ b/db/routines/vn/triggers/productionConfig_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`productionConfig_afterDelete` AFTER DELETE ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_beforeInsert.sql b/db/routines/vn/triggers/productionConfig_beforeInsert.sql index 49a6719ed..4ece1297a 100644 --- a/db/routines/vn/triggers/productionConfig_beforeInsert.sql +++ b/db/routines/vn/triggers/productionConfig_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`productionConfig_beforeInsert` BEFORE INSERT ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/productionConfig_beforeUpdate.sql b/db/routines/vn/triggers/productionConfig_beforeUpdate.sql index 9c692b3c3..e8b6bc294 100644 --- a/db/routines/vn/triggers/productionConfig_beforeUpdate.sql +++ b/db/routines/vn/triggers/productionConfig_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`productionConfig_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`productionConfig_beforeUpdate` BEFORE UPDATE ON `productionConfig` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/projectNotes_beforeInsert.sql b/db/routines/vn/triggers/projectNotes_beforeInsert.sql index b03327512..ccc7078d3 100644 --- a/db/routines/vn/triggers/projectNotes_beforeInsert.sql +++ b/db/routines/vn/triggers/projectNotes_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`projectNotes_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`projectNotes_beforeInsert` BEFORE INSERT ON `projectNotes` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_afterDelete.sql b/db/routines/vn/triggers/province_afterDelete.sql index 459860c43..b338340e3 100644 --- a/db/routines/vn/triggers/province_afterDelete.sql +++ b/db/routines/vn/triggers/province_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`province_afterDelete` AFTER DELETE ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_afterUpdate.sql b/db/routines/vn/triggers/province_afterUpdate.sql index 5a1c579d9..4e99cdac4 100644 --- a/db/routines/vn/triggers/province_afterUpdate.sql +++ b/db/routines/vn/triggers/province_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`province_afterUpdate` AFTER UPDATE ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_beforeInsert.sql b/db/routines/vn/triggers/province_beforeInsert.sql index ecfb13088..eff8f397a 100644 --- a/db/routines/vn/triggers/province_beforeInsert.sql +++ b/db/routines/vn/triggers/province_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`province_beforeInsert` BEFORE INSERT ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/province_beforeUpdate.sql b/db/routines/vn/triggers/province_beforeUpdate.sql index a878ae759..ef553b2bc 100644 --- a/db/routines/vn/triggers/province_beforeUpdate.sql +++ b/db/routines/vn/triggers/province_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`province_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`province_beforeUpdate` BEFORE UPDATE ON `province` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_afterDelete.sql b/db/routines/vn/triggers/rate_afterDelete.sql index 20cfcbd84..69787cd81 100644 --- a/db/routines/vn/triggers/rate_afterDelete.sql +++ b/db/routines/vn/triggers/rate_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`rate_afterDelete` AFTER DELETE ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_beforeInsert.sql b/db/routines/vn/triggers/rate_beforeInsert.sql index 45f64c054..c2117e64c 100644 --- a/db/routines/vn/triggers/rate_beforeInsert.sql +++ b/db/routines/vn/triggers/rate_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`rate_beforeInsert` BEFORE INSERT ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/rate_beforeUpdate.sql b/db/routines/vn/triggers/rate_beforeUpdate.sql index d5dab82ea..af63e431e 100644 --- a/db/routines/vn/triggers/rate_beforeUpdate.sql +++ b/db/routines/vn/triggers/rate_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`rate_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`rate_beforeUpdate` BEFORE UPDATE ON `rate` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/receipt_afterInsert.sql b/db/routines/vn/triggers/receipt_afterInsert.sql index 0a709107d..92e458743 100644 --- a/db/routines/vn/triggers/receipt_afterInsert.sql +++ b/db/routines/vn/triggers/receipt_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_afterInsert` AFTER INSERT ON `receipt` FOR EACH ROW CALL clientRisk_update(NEW.clientFk, NEW.companyFk, -NEW.amountPaid)$$ diff --git a/db/routines/vn/triggers/receipt_afterUpdate.sql b/db/routines/vn/triggers/receipt_afterUpdate.sql index c6f2257f2..c17783790 100644 --- a/db/routines/vn/triggers/receipt_afterUpdate.sql +++ b/db/routines/vn/triggers/receipt_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_afterUpdate` AFTER UPDATE ON `receipt` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/receipt_beforeDelete.sql b/db/routines/vn/triggers/receipt_beforeDelete.sql index c5430306d..1c1f0a0b1 100644 --- a/db/routines/vn/triggers/receipt_beforeDelete.sql +++ b/db/routines/vn/triggers/receipt_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_beforeDelete` BEFORE DELETE ON `receipt` FOR EACH ROW CALL clientRisk_update(OLD.clientFk, OLD.companyFk, OLD.amountPaid)$$ diff --git a/db/routines/vn/triggers/receipt_beforeInsert.sql b/db/routines/vn/triggers/receipt_beforeInsert.sql index cb0fbb7bf..85bc2c4a2 100644 --- a/db/routines/vn/triggers/receipt_beforeInsert.sql +++ b/db/routines/vn/triggers/receipt_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_beforeInsert` BEFORE INSERT ON `receipt` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/receipt_beforeUpdate.sql b/db/routines/vn/triggers/receipt_beforeUpdate.sql index 9fac395c9..3c66719a4 100644 --- a/db/routines/vn/triggers/receipt_beforeUpdate.sql +++ b/db/routines/vn/triggers/receipt_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`receipt_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_beforeUpdate` BEFORE UPDATE ON `receipt` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_afterDelete.sql b/db/routines/vn/triggers/recovery_afterDelete.sql index 74c3bfb64..27679a2a5 100644 --- a/db/routines/vn/triggers/recovery_afterDelete.sql +++ b/db/routines/vn/triggers/recovery_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`recovery_afterDelete` AFTER DELETE ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_beforeInsert.sql b/db/routines/vn/triggers/recovery_beforeInsert.sql index a44cd208f..4671e95cc 100644 --- a/db/routines/vn/triggers/recovery_beforeInsert.sql +++ b/db/routines/vn/triggers/recovery_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`recovery_beforeInsert` BEFORE INSERT ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/recovery_beforeUpdate.sql b/db/routines/vn/triggers/recovery_beforeUpdate.sql index e57b1258f..45710b773 100644 --- a/db/routines/vn/triggers/recovery_beforeUpdate.sql +++ b/db/routines/vn/triggers/recovery_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`recovery_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`recovery_beforeUpdate` BEFORE UPDATE ON `recovery` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/roadmapStop_beforeInsert.sql b/db/routines/vn/triggers/roadmapStop_beforeInsert.sql index 2db64d9ea..d71942fea 100644 --- a/db/routines/vn/triggers/roadmapStop_beforeInsert.sql +++ b/db/routines/vn/triggers/roadmapStop_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`roadmapStop_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmapStop_beforeInsert` BEFORE INSERT ON `roadmapStop` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql b/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql index e9a641548..c3cbf2597 100644 --- a/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql +++ b/db/routines/vn/triggers/roadmapStop_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`roadmapStop_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmapStop_beforeUpdate` BEFORE UPDATE ON `roadmapStop` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_afterDelete.sql b/db/routines/vn/triggers/route_afterDelete.sql index 594251db3..2bd1e3ab6 100644 --- a/db/routines/vn/triggers/route_afterDelete.sql +++ b/db/routines/vn/triggers/route_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`route_afterDelete` AFTER DELETE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_afterInsert.sql b/db/routines/vn/triggers/route_afterInsert.sql index 7272d571b..50e14426c 100644 --- a/db/routines/vn/triggers/route_afterInsert.sql +++ b/db/routines/vn/triggers/route_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`route_afterInsert` AFTER INSERT ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_afterUpdate.sql b/db/routines/vn/triggers/route_afterUpdate.sql index 0af7359d9..ec205090e 100644 --- a/db/routines/vn/triggers/route_afterUpdate.sql +++ b/db/routines/vn/triggers/route_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`route_afterUpdate` AFTER UPDATE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_beforeInsert.sql b/db/routines/vn/triggers/route_beforeInsert.sql index 2cede5fcf..788efe662 100644 --- a/db/routines/vn/triggers/route_beforeInsert.sql +++ b/db/routines/vn/triggers/route_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`route_beforeInsert` BEFORE INSERT ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/route_beforeUpdate.sql b/db/routines/vn/triggers/route_beforeUpdate.sql index 98691a5a5..0ea403de3 100644 --- a/db/routines/vn/triggers/route_beforeUpdate.sql +++ b/db/routines/vn/triggers/route_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`route_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`route_beforeUpdate` BEFORE UPDATE ON `route` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_afterDelete.sql b/db/routines/vn/triggers/routesMonitor_afterDelete.sql index 1eef37f3e..aad3ad0ec 100644 --- a/db/routines/vn/triggers/routesMonitor_afterDelete.sql +++ b/db/routines/vn/triggers/routesMonitor_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`routesMonitor_afterDelete` AFTER DELETE ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_beforeInsert.sql b/db/routines/vn/triggers/routesMonitor_beforeInsert.sql index 62e736ebf..731a73b0c 100644 --- a/db/routines/vn/triggers/routesMonitor_beforeInsert.sql +++ b/db/routines/vn/triggers/routesMonitor_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`routesMonitor_beforeInsert` BEFORE INSERT ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql b/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql index 0e413b7c9..31b47f52e 100644 --- a/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql +++ b/db/routines/vn/triggers/routesMonitor_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`routesMonitor_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`routesMonitor_beforeUpdate` BEFORE UPDATE ON `routesMonitor` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleBuy_beforeInsert.sql b/db/routines/vn/triggers/saleBuy_beforeInsert.sql index 6a6f278d4..e00480ad4 100644 --- a/db/routines/vn/triggers/saleBuy_beforeInsert.sql +++ b/db/routines/vn/triggers/saleBuy_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleBuy_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleBuy_beforeInsert` BEFORE INSERT ON `saleBuy` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_afterDelete.sql b/db/routines/vn/triggers/saleGroup_afterDelete.sql index ff72fecff..11d3211af 100644 --- a/db/routines/vn/triggers/saleGroup_afterDelete.sql +++ b/db/routines/vn/triggers/saleGroup_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroup_afterDelete` AFTER DELETE ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_beforeInsert.sql b/db/routines/vn/triggers/saleGroup_beforeInsert.sql index 8e454033c..b50489a07 100644 --- a/db/routines/vn/triggers/saleGroup_beforeInsert.sql +++ b/db/routines/vn/triggers/saleGroup_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroup_beforeInsert` BEFORE INSERT ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroup_beforeUpdate.sql b/db/routines/vn/triggers/saleGroup_beforeUpdate.sql index c6f18c35d..a3358b22c 100644 --- a/db/routines/vn/triggers/saleGroup_beforeUpdate.sql +++ b/db/routines/vn/triggers/saleGroup_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleGroup_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroup_beforeUpdate` BEFORE UPDATE ON `saleGroup` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleLabel_afterUpdate.sql b/db/routines/vn/triggers/saleLabel_afterUpdate.sql index f53d4e50f..38fab771a 100644 --- a/db/routines/vn/triggers/saleLabel_afterUpdate.sql +++ b/db/routines/vn/triggers/saleLabel_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate` AFTER UPDATE ON `vn`.`saleLabel` FOR EACH ROW IF NEW.stem >= (SELECT s.quantity FROM sale s WHERE s.id = NEW.saleFk) THEN diff --git a/db/routines/vn/triggers/saleTracking_afterInsert.sql b/db/routines/vn/triggers/saleTracking_afterInsert.sql index f0a48ab50..e3dce8747 100644 --- a/db/routines/vn/triggers/saleTracking_afterInsert.sql +++ b/db/routines/vn/triggers/saleTracking_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`saleTracking_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleTracking_afterInsert` AFTER INSERT ON `saleTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterDelete.sql b/db/routines/vn/triggers/sale_afterDelete.sql index 75cfe3c36..2751d88c2 100644 --- a/db/routines/vn/triggers/sale_afterDelete.sql +++ b/db/routines/vn/triggers/sale_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_afterDelete` AFTER DELETE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterInsert.sql b/db/routines/vn/triggers/sale_afterInsert.sql index 4f1637b44..f15b17722 100644 --- a/db/routines/vn/triggers/sale_afterInsert.sql +++ b/db/routines/vn/triggers/sale_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_afterInsert` AFTER INSERT ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_afterUpdate.sql b/db/routines/vn/triggers/sale_afterUpdate.sql index c932859d6..82da55486 100644 --- a/db/routines/vn/triggers/sale_afterUpdate.sql +++ b/db/routines/vn/triggers/sale_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_afterUpdate` AFTER UPDATE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeDelete.sql b/db/routines/vn/triggers/sale_beforeDelete.sql index dd1f5e30f..ad97f8b55 100644 --- a/db/routines/vn/triggers/sale_beforeDelete.sql +++ b/db/routines/vn/triggers/sale_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_beforeDelete` BEFORE DELETE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeInsert.sql b/db/routines/vn/triggers/sale_beforeInsert.sql index 1b12caa06..31d5882fc 100644 --- a/db/routines/vn/triggers/sale_beforeInsert.sql +++ b/db/routines/vn/triggers/sale_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_beforeInsert` BEFORE INSERT ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sale_beforeUpdate.sql b/db/routines/vn/triggers/sale_beforeUpdate.sql index 4e038d1ec..fa45dad5c 100644 --- a/db/routines/vn/triggers/sale_beforeUpdate.sql +++ b/db/routines/vn/triggers/sale_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sale_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sale_beforeUpdate` BEFORE UPDATE ON `sale` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeDelete.sql b/db/routines/vn/triggers/sharingCart_beforeDelete.sql index 2a2f1014d..aa3c0c2bf 100644 --- a/db/routines/vn/triggers/sharingCart_beforeDelete.sql +++ b/db/routines/vn/triggers/sharingCart_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sharingCart_beforeDelete` BEFORE DELETE ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeInsert.sql b/db/routines/vn/triggers/sharingCart_beforeInsert.sql index 92795e1f6..0dd59a91a 100644 --- a/db/routines/vn/triggers/sharingCart_beforeInsert.sql +++ b/db/routines/vn/triggers/sharingCart_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sharingCart_beforeInsert` BEFORE INSERT ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingCart_beforeUpdate.sql b/db/routines/vn/triggers/sharingCart_beforeUpdate.sql index 87054f891..e1dd26938 100644 --- a/db/routines/vn/triggers/sharingCart_beforeUpdate.sql +++ b/db/routines/vn/triggers/sharingCart_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingCart_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sharingCart_beforeUpdate` BEFORE UPDATE ON `sharingCart` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingClient_beforeInsert.sql b/db/routines/vn/triggers/sharingClient_beforeInsert.sql index ed2a53919..03a0e0ce0 100644 --- a/db/routines/vn/triggers/sharingClient_beforeInsert.sql +++ b/db/routines/vn/triggers/sharingClient_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingClient_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sharingClient_beforeInsert` BEFORE INSERT ON `sharingClient` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/sharingClient_beforeUpdate.sql b/db/routines/vn/triggers/sharingClient_beforeUpdate.sql index 180fdc510..d3358586b 100644 --- a/db/routines/vn/triggers/sharingClient_beforeUpdate.sql +++ b/db/routines/vn/triggers/sharingClient_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`sharingClient_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`sharingClient_beforeUpdate` BEFORE UPDATE ON `sharingClient` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_afterDelete.sql b/db/routines/vn/triggers/shelving_afterDelete.sql index 088bd4f95..aa3c3bcea 100644 --- a/db/routines/vn/triggers/shelving_afterDelete.sql +++ b/db/routines/vn/triggers/shelving_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`shelving_afterDelete` AFTER DELETE ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_beforeInsert.sql b/db/routines/vn/triggers/shelving_beforeInsert.sql index 39b54f247..21528ef78 100644 --- a/db/routines/vn/triggers/shelving_beforeInsert.sql +++ b/db/routines/vn/triggers/shelving_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`shelving_beforeInsert` BEFORE INSERT ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/shelving_beforeUpdate.sql b/db/routines/vn/triggers/shelving_beforeUpdate.sql index 566e58f6d..23210c4be 100644 --- a/db/routines/vn/triggers/shelving_beforeUpdate.sql +++ b/db/routines/vn/triggers/shelving_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`shelving_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`shelving_beforeUpdate` BEFORE UPDATE ON `shelving` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_afterInsert.sql b/db/routines/vn/triggers/solunionCAP_afterInsert.sql index 1f3b3a2b4..b4df7dc61 100644 --- a/db/routines/vn/triggers/solunionCAP_afterInsert.sql +++ b/db/routines/vn/triggers/solunionCAP_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert` AFTER INSERT ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_afterUpdate.sql b/db/routines/vn/triggers/solunionCAP_afterUpdate.sql index 921c1d5a4..ccfba96f2 100644 --- a/db/routines/vn/triggers/solunionCAP_afterUpdate.sql +++ b/db/routines/vn/triggers/solunionCAP_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`solunionCAP_afterUpdate` AFTER UPDATE ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/solunionCAP_beforeDelete.sql b/db/routines/vn/triggers/solunionCAP_beforeDelete.sql index 520b3c4b4..a8b6732c1 100644 --- a/db/routines/vn/triggers/solunionCAP_beforeDelete.sql +++ b/db/routines/vn/triggers/solunionCAP_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelete` BEFORE DELETE ON `solunionCAP` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/specie_beforeInsert.sql b/db/routines/vn/triggers/specie_beforeInsert.sql index c32530643..8a9f299fd 100644 --- a/db/routines/vn/triggers/specie_beforeInsert.sql +++ b/db/routines/vn/triggers/specie_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`specie_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`specie_beforeInsert` BEFORE INSERT ON `specie` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/specie_beforeUpdate.sql b/db/routines/vn/triggers/specie_beforeUpdate.sql index 0b0572bc8..d859e2cdc 100644 --- a/db/routines/vn/triggers/specie_beforeUpdate.sql +++ b/db/routines/vn/triggers/specie_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`specie_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`specie_beforeUpdate` BEFORE UPDATE ON `specie` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_afterDelete.sql b/db/routines/vn/triggers/supplierAccount_afterDelete.sql index a7da0dc3b..81e936140 100644 --- a/db/routines/vn/triggers/supplierAccount_afterDelete.sql +++ b/db/routines/vn/triggers/supplierAccount_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAccount_afterDelete` AFTER DELETE ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_beforeInsert.sql b/db/routines/vn/triggers/supplierAccount_beforeInsert.sql index 43c449d0c..231479ad6 100644 --- a/db/routines/vn/triggers/supplierAccount_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierAccount_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAccount_beforeInsert` BEFORE INSERT ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql b/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql index 8e73445e4..2937227a4 100644 --- a/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierAccount_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAccount_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAccount_beforeUpdate` BEFORE UPDATE ON `supplierAccount` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_afterDelete.sql b/db/routines/vn/triggers/supplierAddress_afterDelete.sql index b8cbadc8e..0840d6fe9 100644 --- a/db/routines/vn/triggers/supplierAddress_afterDelete.sql +++ b/db/routines/vn/triggers/supplierAddress_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAddress_afterDelete` AFTER DELETE ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_beforeInsert.sql b/db/routines/vn/triggers/supplierAddress_beforeInsert.sql index 75778c961..d66b9d3d2 100644 --- a/db/routines/vn/triggers/supplierAddress_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierAddress_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAddress_beforeInsert` BEFORE INSERT ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql b/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql index beddba628..94d70834e 100644 --- a/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierAddress_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierAddress_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAddress_beforeUpdate` BEFORE UPDATE ON `supplierAddress` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_afterDelete.sql b/db/routines/vn/triggers/supplierContact_afterDelete.sql index c89a2a5d2..18797e383 100644 --- a/db/routines/vn/triggers/supplierContact_afterDelete.sql +++ b/db/routines/vn/triggers/supplierContact_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierContact_afterDelete` AFTER DELETE ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_beforeInsert.sql b/db/routines/vn/triggers/supplierContact_beforeInsert.sql index 6402918b9..444f9e9c8 100644 --- a/db/routines/vn/triggers/supplierContact_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierContact_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierContact_beforeInsert` BEFORE INSERT ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierContact_beforeUpdate.sql b/db/routines/vn/triggers/supplierContact_beforeUpdate.sql index 2a047dec6..194218a91 100644 --- a/db/routines/vn/triggers/supplierContact_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierContact_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierContact_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierContact_beforeUpdate` BEFORE UPDATE ON `supplierContact` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_afterDelete.sql b/db/routines/vn/triggers/supplierDms_afterDelete.sql index 88349cc3c..0dbf8e86b 100644 --- a/db/routines/vn/triggers/supplierDms_afterDelete.sql +++ b/db/routines/vn/triggers/supplierDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierDms_afterDelete` AFTER DELETE ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_beforeInsert.sql b/db/routines/vn/triggers/supplierDms_beforeInsert.sql index e7b6c492d..2098d6a34 100644 --- a/db/routines/vn/triggers/supplierDms_beforeInsert.sql +++ b/db/routines/vn/triggers/supplierDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierDms_beforeInsert` BEFORE INSERT ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplierDms_beforeUpdate.sql b/db/routines/vn/triggers/supplierDms_beforeUpdate.sql index bcb5d48e7..6e38018e5 100644 --- a/db/routines/vn/triggers/supplierDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplierDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplierDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierDms_beforeUpdate` BEFORE UPDATE ON `supplierDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_afterDelete.sql b/db/routines/vn/triggers/supplier_afterDelete.sql index 17ca494c5..d70830423 100644 --- a/db/routines/vn/triggers/supplier_afterDelete.sql +++ b/db/routines/vn/triggers/supplier_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplier_afterDelete` AFTER DELETE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_afterUpdate.sql b/db/routines/vn/triggers/supplier_afterUpdate.sql index a0e3ed210..07f31b5e0 100644 --- a/db/routines/vn/triggers/supplier_afterUpdate.sql +++ b/db/routines/vn/triggers/supplier_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplier_afterUpdate` BEFORE UPDATE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_beforeInsert.sql b/db/routines/vn/triggers/supplier_beforeInsert.sql index 7440ecb6f..b141ec8fb 100644 --- a/db/routines/vn/triggers/supplier_beforeInsert.sql +++ b/db/routines/vn/triggers/supplier_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplier_beforeInsert` BEFORE INSERT ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/supplier_beforeUpdate.sql b/db/routines/vn/triggers/supplier_beforeUpdate.sql index 568556667..af730b49d 100644 --- a/db/routines/vn/triggers/supplier_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplier_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`supplier_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplier_beforeUpdate` BEFORE UPDATE ON `supplier` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/tag_beforeInsert.sql b/db/routines/vn/triggers/tag_beforeInsert.sql index e4a494b81..e24dec000 100644 --- a/db/routines/vn/triggers/tag_beforeInsert.sql +++ b/db/routines/vn/triggers/tag_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`tag_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`tag_beforeInsert` BEFORE INSERT ON `tag` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketCollection_afterDelete.sql b/db/routines/vn/triggers/ticketCollection_afterDelete.sql index fe33dfdf2..0b688022f 100644 --- a/db/routines/vn/triggers/ticketCollection_afterDelete.sql +++ b/db/routines/vn/triggers/ticketCollection_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketCollection_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketCollection_afterDelete` AFTER DELETE ON `ticketCollection` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_afterDelete.sql b/db/routines/vn/triggers/ticketDms_afterDelete.sql index 72dbe94bb..40c10a494 100644 --- a/db/routines/vn/triggers/ticketDms_afterDelete.sql +++ b/db/routines/vn/triggers/ticketDms_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketDms_afterDelete` AFTER DELETE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeDelete.sql b/db/routines/vn/triggers/ticketDms_beforeDelete.sql index 7c7e080e1..93c335be9 100644 --- a/db/routines/vn/triggers/ticketDms_beforeDelete.sql +++ b/db/routines/vn/triggers/ticketDms_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketDms_beforeDelete` BEFORE DELETE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeInsert.sql b/db/routines/vn/triggers/ticketDms_beforeInsert.sql index 0a3da13a7..9b35c6e71 100644 --- a/db/routines/vn/triggers/ticketDms_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketDms_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketDms_beforeInsert` BEFORE INSERT ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketDms_beforeUpdate.sql b/db/routines/vn/triggers/ticketDms_beforeUpdate.sql index 13e6f6817..6f3d1522a 100644 --- a/db/routines/vn/triggers/ticketDms_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketDms_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketDms_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketDms_beforeUpdate` BEFORE UPDATE ON `ticketDms` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_afterDelete.sql b/db/routines/vn/triggers/ticketObservation_afterDelete.sql index e909d43f4..160d3cbdd 100644 --- a/db/routines/vn/triggers/ticketObservation_afterDelete.sql +++ b/db/routines/vn/triggers/ticketObservation_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketObservation_afterDelete` AFTER DELETE ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_beforeInsert.sql b/db/routines/vn/triggers/ticketObservation_beforeInsert.sql index 7988215a5..9915b541b 100644 --- a/db/routines/vn/triggers/ticketObservation_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketObservation_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketObservation_beforeInsert` BEFORE INSERT ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql b/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql index 05a400a19..a94a4160b 100644 --- a/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketObservation_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketObservation_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketObservation_beforeUpdate` BEFORE UPDATE ON `ticketObservation` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_afterDelete.sql b/db/routines/vn/triggers/ticketPackaging_afterDelete.sql index 2bd702595..dfdc2ffe1 100644 --- a/db/routines/vn/triggers/ticketPackaging_afterDelete.sql +++ b/db/routines/vn/triggers/ticketPackaging_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketPackaging_afterDelete` AFTER DELETE ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql b/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql index ed86e94ce..17bf41daa 100644 --- a/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketPackaging_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeInsert` BEFORE INSERT ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql b/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql index 0e2068654..9ce7ca3db 100644 --- a/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketPackaging_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketPackaging_beforeUpdate` BEFORE UPDATE ON `ticketPackaging` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketParking_beforeInsert.sql b/db/routines/vn/triggers/ticketParking_beforeInsert.sql index 6cb3329bf..77c2aeab7 100644 --- a/db/routines/vn/triggers/ticketParking_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketParking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketParking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketParking_beforeInsert` BEFORE INSERT ON `ticketParking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_afterDelete.sql b/db/routines/vn/triggers/ticketRefund_afterDelete.sql index 4f26885a5..677e25905 100644 --- a/db/routines/vn/triggers/ticketRefund_afterDelete.sql +++ b/db/routines/vn/triggers/ticketRefund_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRefund_afterDelete` AFTER DELETE ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql index aa62fad74..61d9fe7a2 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRefund_beforeInsert` BEFORE INSERT ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql index d2b13b516..807695de6 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUpdate` BEFORE UPDATE ON `ticketRefund` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_afterDelete.sql b/db/routines/vn/triggers/ticketRequest_afterDelete.sql index 49ab2c814..051db6b2e 100644 --- a/db/routines/vn/triggers/ticketRequest_afterDelete.sql +++ b/db/routines/vn/triggers/ticketRequest_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRequest_afterDelete` AFTER DELETE ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_beforeInsert.sql b/db/routines/vn/triggers/ticketRequest_beforeInsert.sql index 8416b565d..fcad2f593 100644 --- a/db/routines/vn/triggers/ticketRequest_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRequest_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRequest_beforeInsert` BEFORE INSERT ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql b/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql index 9b875243c..a30b9464f 100644 --- a/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRequest_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketRequest_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRequest_beforeUpdate` BEFORE UPDATE ON `ticketRequest` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_afterDelete.sql b/db/routines/vn/triggers/ticketService_afterDelete.sql index 94125782e..9b1f6e812 100644 --- a/db/routines/vn/triggers/ticketService_afterDelete.sql +++ b/db/routines/vn/triggers/ticketService_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketService_afterDelete` AFTER DELETE ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_beforeInsert.sql b/db/routines/vn/triggers/ticketService_beforeInsert.sql index f16ec9fe9..b886d764e 100644 --- a/db/routines/vn/triggers/ticketService_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketService_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketService_beforeInsert` BEFORE INSERT ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketService_beforeUpdate.sql b/db/routines/vn/triggers/ticketService_beforeUpdate.sql index 111dc80bf..8b706d312 100644 --- a/db/routines/vn/triggers/ticketService_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketService_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketService_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketService_beforeUpdate` BEFORE UPDATE ON `ticketService` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterDelete.sql b/db/routines/vn/triggers/ticketTracking_afterDelete.sql index be35d817f..aee31fe5f 100644 --- a/db/routines/vn/triggers/ticketTracking_afterDelete.sql +++ b/db/routines/vn/triggers/ticketTracking_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketTracking_afterDelete` AFTER DELETE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterInsert.sql b/db/routines/vn/triggers/ticketTracking_afterInsert.sql index 53132b906..c2dca56ef 100644 --- a/db/routines/vn/triggers/ticketTracking_afterInsert.sql +++ b/db/routines/vn/triggers/ticketTracking_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketTracking_afterInsert` AFTER INSERT ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_afterUpdate.sql b/db/routines/vn/triggers/ticketTracking_afterUpdate.sql index 0b350825c..fab8b3d34 100644 --- a/db/routines/vn/triggers/ticketTracking_afterUpdate.sql +++ b/db/routines/vn/triggers/ticketTracking_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketTracking_afterUpdate` AFTER UPDATE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_beforeInsert.sql b/db/routines/vn/triggers/ticketTracking_beforeInsert.sql index 7ee5de7d3..8c0b557ba 100644 --- a/db/routines/vn/triggers/ticketTracking_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketTracking_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketTracking_beforeInsert` BEFORE INSERT ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql b/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql index 4bfea0dc1..3605ca360 100644 --- a/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketTracking_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketTracking_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketTracking_beforeUpdate` BEFORE UPDATE ON `ticketTracking` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_afterDelete.sql b/db/routines/vn/triggers/ticketWeekly_afterDelete.sql index e11808ac8..066ab2d08 100644 --- a/db/routines/vn/triggers/ticketWeekly_afterDelete.sql +++ b/db/routines/vn/triggers/ticketWeekly_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketWeekly_afterDelete` AFTER DELETE ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql b/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql index 36b49a978..a9f2780e4 100644 --- a/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketWeekly_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeInsert` BEFORE INSERT ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql b/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql index 68a5e140a..76a633e23 100644 --- a/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketWeekly_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketWeekly_beforeUpdate` BEFORE UPDATE ON `ticketWeekly` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterDelete.sql b/db/routines/vn/triggers/ticket_afterDelete.sql index 3c4b26663..bcde76e0a 100644 --- a/db/routines/vn/triggers/ticket_afterDelete.sql +++ b/db/routines/vn/triggers/ticket_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_afterDelete` AFTER DELETE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterInsert.sql b/db/routines/vn/triggers/ticket_afterInsert.sql index 3c3985701..d3936af0b 100644 --- a/db/routines/vn/triggers/ticket_afterInsert.sql +++ b/db/routines/vn/triggers/ticket_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_afterInsert` AFTER INSERT ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_afterUpdate.sql b/db/routines/vn/triggers/ticket_afterUpdate.sql index b80f5cd21..f6c5e6523 100644 --- a/db/routines/vn/triggers/ticket_afterUpdate.sql +++ b/db/routines/vn/triggers/ticket_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_afterUpdate` AFTER UPDATE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeDelete.sql b/db/routines/vn/triggers/ticket_beforeDelete.sql index 1e0d2a486..953fa509a 100644 --- a/db/routines/vn/triggers/ticket_beforeDelete.sql +++ b/db/routines/vn/triggers/ticket_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_beforeDelete` BEFORE DELETE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeInsert.sql b/db/routines/vn/triggers/ticket_beforeInsert.sql index a289f7cb2..02b60b6b3 100644 --- a/db/routines/vn/triggers/ticket_beforeInsert.sql +++ b/db/routines/vn/triggers/ticket_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_beforeInsert` BEFORE INSERT ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticket_beforeUpdate.sql b/db/routines/vn/triggers/ticket_beforeUpdate.sql index bc1e1d774..4dca4a9c9 100644 --- a/db/routines/vn/triggers/ticket_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticket_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`ticket_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticket_beforeUpdate` BEFORE UPDATE ON `ticket` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/time_afterUpdate.sql b/db/routines/vn/triggers/time_afterUpdate.sql index 650c3b352..e7f3551c5 100644 --- a/db/routines/vn/triggers/time_afterUpdate.sql +++ b/db/routines/vn/triggers/time_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`time_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`time_afterUpdate` AFTER UPDATE ON `time` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_afterDelete.sql b/db/routines/vn/triggers/town_afterDelete.sql index 4f4eb31f8..51696b633 100644 --- a/db/routines/vn/triggers/town_afterDelete.sql +++ b/db/routines/vn/triggers/town_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_afterDelete` AFTER DELETE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_afterUpdate.sql b/db/routines/vn/triggers/town_afterUpdate.sql index bffc46c1c..dd3fddebd 100644 --- a/db/routines/vn/triggers/town_afterUpdate.sql +++ b/db/routines/vn/triggers/town_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_afterUpdate` AFTER UPDATE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_beforeInsert.sql b/db/routines/vn/triggers/town_beforeInsert.sql index 6b0aa8411..4a1ce887e 100644 --- a/db/routines/vn/triggers/town_beforeInsert.sql +++ b/db/routines/vn/triggers/town_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_beforeInsert` BEFORE INSERT ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/town_beforeUpdate.sql b/db/routines/vn/triggers/town_beforeUpdate.sql index 1e358404f..fc1410d5c 100644 --- a/db/routines/vn/triggers/town_beforeUpdate.sql +++ b/db/routines/vn/triggers/town_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`town_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_beforeUpdate` BEFORE UPDATE ON `town` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_afterDelete.sql b/db/routines/vn/triggers/travelThermograph_afterDelete.sql index 7dbda6250..1e51426ef 100644 --- a/db/routines/vn/triggers/travelThermograph_afterDelete.sql +++ b/db/routines/vn/triggers/travelThermograph_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travelThermograph_afterDelete` AFTER DELETE ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql index ea87b4539..f56109fba 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travelThermograph_beforeInsert` BEFORE INSERT ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql index 45ad83812..49f52f181 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travelThermograph_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travelThermograph_beforeUpdate` BEFORE UPDATE ON `travelThermograph` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_afterDelete.sql b/db/routines/vn/triggers/travel_afterDelete.sql index 2496a01e3..35fdfb4fc 100644 --- a/db/routines/vn/triggers/travel_afterDelete.sql +++ b/db/routines/vn/triggers/travel_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travel_afterDelete` AFTER DELETE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_afterUpdate.sql b/db/routines/vn/triggers/travel_afterUpdate.sql index f4b7f3705..75de5ab4a 100644 --- a/db/routines/vn/triggers/travel_afterUpdate.sql +++ b/db/routines/vn/triggers/travel_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travel_afterUpdate` AFTER UPDATE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_beforeInsert.sql b/db/routines/vn/triggers/travel_beforeInsert.sql index 39711701b..4563c9a81 100644 --- a/db/routines/vn/triggers/travel_beforeInsert.sql +++ b/db/routines/vn/triggers/travel_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travel_beforeInsert` BEFORE INSERT ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/travel_beforeUpdate.sql b/db/routines/vn/triggers/travel_beforeUpdate.sql index f800aed06..33578fea1 100644 --- a/db/routines/vn/triggers/travel_beforeUpdate.sql +++ b/db/routines/vn/triggers/travel_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`travel_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travel_beforeUpdate` BEFORE UPDATE ON `travel` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/vehicle_beforeInsert.sql b/db/routines/vn/triggers/vehicle_beforeInsert.sql index 0e4dd8004..22505ffb0 100644 --- a/db/routines/vn/triggers/vehicle_beforeInsert.sql +++ b/db/routines/vn/triggers/vehicle_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`vehicle_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`vehicle_beforeInsert` BEFORE INSERT ON `vehicle` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/vehicle_beforeUpdate.sql b/db/routines/vn/triggers/vehicle_beforeUpdate.sql index 18c7114c6..b435c90a4 100644 --- a/db/routines/vn/triggers/vehicle_beforeUpdate.sql +++ b/db/routines/vn/triggers/vehicle_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`vehicle_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`vehicle_beforeUpdate` BEFORE UPDATE ON `vehicle` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/warehouse_afterInsert.sql b/db/routines/vn/triggers/warehouse_afterInsert.sql index 9fd2faba6..9063d8e15 100644 --- a/db/routines/vn/triggers/warehouse_afterInsert.sql +++ b/db/routines/vn/triggers/warehouse_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`warehouse_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`warehouse_afterInsert` BEFORE UPDATE ON `warehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_afterDelete.sql b/db/routines/vn/triggers/workerDocument_afterDelete.sql index edfb0e19a..8d4878248 100644 --- a/db/routines/vn/triggers/workerDocument_afterDelete.sql +++ b/db/routines/vn/triggers/workerDocument_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_afterDelete` AFTER DELETE ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_beforeInsert.sql b/db/routines/vn/triggers/workerDocument_beforeInsert.sql index 1dfea3429..f0675e68f 100644 --- a/db/routines/vn/triggers/workerDocument_beforeInsert.sql +++ b/db/routines/vn/triggers/workerDocument_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_beforeInsert` BEFORE INSERT ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerDocument_beforeUpdate.sql b/db/routines/vn/triggers/workerDocument_beforeUpdate.sql index d8976de11..ffb6efd74 100644 --- a/db/routines/vn/triggers/workerDocument_beforeUpdate.sql +++ b/db/routines/vn/triggers/workerDocument_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerDocument_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_beforeUpdate` BEFORE UPDATE ON `workerDocument` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterDelete.sql b/db/routines/vn/triggers/workerIncome_afterDelete.sql index 5b35fd5ee..42580061e 100644 --- a/db/routines/vn/triggers/workerIncome_afterDelete.sql +++ b/db/routines/vn/triggers/workerIncome_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerIncome_afterDelete` AFTER DELETE ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterInsert.sql b/db/routines/vn/triggers/workerIncome_afterInsert.sql index 110b7f156..fcb24e42b 100644 --- a/db/routines/vn/triggers/workerIncome_afterInsert.sql +++ b/db/routines/vn/triggers/workerIncome_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerIncome_afterInsert` AFTER INSERT ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerIncome_afterUpdate.sql b/db/routines/vn/triggers/workerIncome_afterUpdate.sql index 19d111db3..f6b27c761 100644 --- a/db/routines/vn/triggers/workerIncome_afterUpdate.sql +++ b/db/routines/vn/triggers/workerIncome_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerIncome_afterUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerIncome_afterUpdate` AFTER UPDATE ON `workerIncome` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_afterDelete.sql b/db/routines/vn/triggers/workerTimeControl_afterDelete.sql index ee60f0de9..27432fccb 100644 --- a/db/routines/vn/triggers/workerTimeControl_afterDelete.sql +++ b/db/routines/vn/triggers/workerTimeControl_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_afterDelete` AFTER DELETE ON `workerTimeControl` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_afterInsert.sql b/db/routines/vn/triggers/workerTimeControl_afterInsert.sql index 5ea2e711a..84e53a5cd 100644 --- a/db/routines/vn/triggers/workerTimeControl_afterInsert.sql +++ b/db/routines/vn/triggers/workerTimeControl_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_afterInsert` AFTER INSERT ON `workerTimeControl` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql b/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql index e3bf448ad..4112c8de6 100644 --- a/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql +++ b/db/routines/vn/triggers/workerTimeControl_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeInsert` BEFORE INSERT ON `workerTimeControl` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql b/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql index 4ecdeeede..3e673d847 100644 --- a/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql +++ b/db/routines/vn/triggers/workerTimeControl_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_beforeUpdate` BEFORE UPDATE ON `workerTimeControl` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/worker_afterDelete.sql b/db/routines/vn/triggers/worker_afterDelete.sql index bfebe141c..bf21547ac 100644 --- a/db/routines/vn/triggers/worker_afterDelete.sql +++ b/db/routines/vn/triggers/worker_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`worker_afterDelete` AFTER DELETE ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/worker_beforeInsert.sql b/db/routines/vn/triggers/worker_beforeInsert.sql index 8bddf8d4d..24adbdbb6 100644 --- a/db/routines/vn/triggers/worker_beforeInsert.sql +++ b/db/routines/vn/triggers/worker_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`worker_beforeInsert` BEFORE INSERT ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/worker_beforeUpdate.sql b/db/routines/vn/triggers/worker_beforeUpdate.sql index a0302eef4..35b854836 100644 --- a/db/routines/vn/triggers/worker_beforeUpdate.sql +++ b/db/routines/vn/triggers/worker_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`worker_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`worker_beforeUpdate` BEFORE UPDATE ON `worker` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/workingHours_beforeInsert.sql b/db/routines/vn/triggers/workingHours_beforeInsert.sql index c552fdaf5..57fd1e6f8 100644 --- a/db/routines/vn/triggers/workingHours_beforeInsert.sql +++ b/db/routines/vn/triggers/workingHours_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`workingHours_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workingHours_beforeInsert` BEFORE INSERT ON `workingHours` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_afterDelete.sql b/db/routines/vn/triggers/zoneEvent_afterDelete.sql index 5f1637993..aaf477752 100644 --- a/db/routines/vn/triggers/zoneEvent_afterDelete.sql +++ b/db/routines/vn/triggers/zoneEvent_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneEvent_afterDelete` AFTER DELETE ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_beforeInsert.sql b/db/routines/vn/triggers/zoneEvent_beforeInsert.sql index e871182ee..b8f5486f8 100644 --- a/db/routines/vn/triggers/zoneEvent_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneEvent_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneEvent_beforeInsert` BEFORE INSERT ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql b/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql index dc7baacf6..4ba7858d0 100644 --- a/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneEvent_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneEvent_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneEvent_beforeUpdate` BEFORE UPDATE ON `zoneEvent` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_afterDelete.sql b/db/routines/vn/triggers/zoneExclusion_afterDelete.sql index 6725d4e46..b701c0434 100644 --- a/db/routines/vn/triggers/zoneExclusion_afterDelete.sql +++ b/db/routines/vn/triggers/zoneExclusion_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneExclusion_afterDelete` AFTER DELETE ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql b/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql index d4bd22d7c..59bd39ef5 100644 --- a/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneExclusion_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeInsert` BEFORE INSERT ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql b/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql index bc0bebac9..ac7626696 100644 --- a/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneExclusion_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneExclusion_beforeUpdate` BEFORE UPDATE ON `zoneExclusion` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneGeo_beforeInsert.sql b/db/routines/vn/triggers/zoneGeo_beforeInsert.sql index adc3bdf1a..7c9aa5004 100644 --- a/db/routines/vn/triggers/zoneGeo_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneGeo_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneGeo_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneGeo_beforeInsert` BEFORE INSERT ON `zoneGeo` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql b/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql index 2bb5758ff..b916ee366 100644 --- a/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneGeo_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneGeo_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneGeo_beforeUpdate` BEFORE UPDATE ON `zoneGeo` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_afterDelete.sql b/db/routines/vn/triggers/zoneIncluded_afterDelete.sql index df5d41458..2990626ca 100644 --- a/db/routines/vn/triggers/zoneIncluded_afterDelete.sql +++ b/db/routines/vn/triggers/zoneIncluded_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneIncluded_afterDelete` AFTER DELETE ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql b/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql index b2678dcf8..614c153f6 100644 --- a/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert` BEFORE INSERT ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql b/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql index f30e0dad4..a718ca178 100644 --- a/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneIncluded_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUpdate` BEFORE UPDATE ON `zoneIncluded` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql b/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql index c4f93ab6c..b72bc46d4 100644 --- a/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql +++ b/db/routines/vn/triggers/zoneWarehouse_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneWarehouse_afterDelete` AFTER DELETE ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql b/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql index ea405db8e..68218d09b 100644 --- a/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql +++ b/db/routines/vn/triggers/zoneWarehouse_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeInsert` BEFORE INSERT ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql b/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql index efc6ef049..de63c802e 100644 --- a/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql +++ b/db/routines/vn/triggers/zoneWarehouse_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zoneWarehouse_beforeUpdate` BEFORE UPDATE ON `zoneWarehouse` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_afterDelete.sql b/db/routines/vn/triggers/zone_afterDelete.sql index 6272d3675..036f657e6 100644 --- a/db/routines/vn/triggers/zone_afterDelete.sql +++ b/db/routines/vn/triggers/zone_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zone_afterDelete` AFTER DELETE ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_beforeInsert.sql b/db/routines/vn/triggers/zone_beforeInsert.sql index 5a719b138..c87e548d9 100644 --- a/db/routines/vn/triggers/zone_beforeInsert.sql +++ b/db/routines/vn/triggers/zone_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zone_beforeInsert` BEFORE INSERT ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/zone_beforeUpdate.sql b/db/routines/vn/triggers/zone_beforeUpdate.sql index d05b9a492..fe017ce6a 100644 --- a/db/routines/vn/triggers/zone_beforeUpdate.sql +++ b/db/routines/vn/triggers/zone_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`zone_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zone_beforeUpdate` BEFORE UPDATE ON `zone` FOR EACH ROW BEGIN diff --git a/db/routines/vn/views/NewView.sql b/db/routines/vn/views/NewView.sql index cac232071..5276456d1 100644 --- a/db/routines/vn/views/NewView.sql +++ b/db/routines/vn/views/NewView.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`NewView` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/agencyTerm.sql b/db/routines/vn/views/agencyTerm.sql index 8244fc47d..dbd80cad8 100644 --- a/db/routines/vn/views/agencyTerm.sql +++ b/db/routines/vn/views/agencyTerm.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`agencyTerm` AS SELECT `sat`.`agencyFk` AS `agencyFk`, diff --git a/db/routines/vn/views/annualAverageInvoiced.sql b/db/routines/vn/views/annualAverageInvoiced.sql index c48cf7321..4c74572d1 100644 --- a/db/routines/vn/views/annualAverageInvoiced.sql +++ b/db/routines/vn/views/annualAverageInvoiced.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`annualAverageInvoiced` AS SELECT `cec`.`clientFk` AS `clientFk`, diff --git a/db/routines/vn/views/awbVolume.sql b/db/routines/vn/views/awbVolume.sql index 7b59a0cf4..fd0a12ca2 100644 --- a/db/routines/vn/views/awbVolume.sql +++ b/db/routines/vn/views/awbVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`awbVolume` AS SELECT `t`.`awbFk` AS `awbFk`, diff --git a/db/routines/vn/views/businessCalendar.sql b/db/routines/vn/views/businessCalendar.sql index 5640e1bdd..3981a91d2 100644 --- a/db/routines/vn/views/businessCalendar.sql +++ b/db/routines/vn/views/businessCalendar.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`businessCalendar` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/buyer.sql b/db/routines/vn/views/buyer.sql index 91e472ca6..4f668d35d 100644 --- a/db/routines/vn/views/buyer.sql +++ b/db/routines/vn/views/buyer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`buyer` AS SELECT DISTINCT `u`.`id` AS `userFk`, diff --git a/db/routines/vn/views/buyerSales.sql b/db/routines/vn/views/buyerSales.sql index ed605b436..97c181419 100644 --- a/db/routines/vn/views/buyerSales.sql +++ b/db/routines/vn/views/buyerSales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`buyerSales` AS SELECT `v`.`importe` AS `importe`, diff --git a/db/routines/vn/views/clientLost.sql b/db/routines/vn/views/clientLost.sql index df3eaac7d..e445776ce 100644 --- a/db/routines/vn/views/clientLost.sql +++ b/db/routines/vn/views/clientLost.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`clientLost` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/clientPhoneBook.sql b/db/routines/vn/views/clientPhoneBook.sql index 67e42d8c5..6fe2a5a5e 100644 --- a/db/routines/vn/views/clientPhoneBook.sql +++ b/db/routines/vn/views/clientPhoneBook.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`clientPhoneBook` AS SELECT `c`.`id` AS `clientFk`, diff --git a/db/routines/vn/views/companyL10n.sql b/db/routines/vn/views/companyL10n.sql index 0c42de12e..20292c4be 100644 --- a/db/routines/vn/views/companyL10n.sql +++ b/db/routines/vn/views/companyL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`companyL10n` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/defaulter.sql b/db/routines/vn/views/defaulter.sql index c7cb9ecb2..d98d6ccd7 100644 --- a/db/routines/vn/views/defaulter.sql +++ b/db/routines/vn/views/defaulter.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`defaulter` AS SELECT `d`.`clientFk` AS `clientFk`, diff --git a/db/routines/vn/views/departmentTree.sql b/db/routines/vn/views/departmentTree.sql index 829b21854..36a21cb51 100644 --- a/db/routines/vn/views/departmentTree.sql +++ b/db/routines/vn/views/departmentTree.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`departmentTree` AS SELECT `node`.`id` AS `id`, diff --git a/db/routines/vn/views/ediGenus.sql b/db/routines/vn/views/ediGenus.sql index 5a50f7694..bb56d54a8 100644 --- a/db/routines/vn/views/ediGenus.sql +++ b/db/routines/vn/views/ediGenus.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ediGenus` AS SELECT `g`.`genus_id` AS `id`, diff --git a/db/routines/vn/views/ediSpecie.sql b/db/routines/vn/views/ediSpecie.sql index c472dd5b0..9d5893aa8 100644 --- a/db/routines/vn/views/ediSpecie.sql +++ b/db/routines/vn/views/ediSpecie.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ediSpecie` AS SELECT `s`.`specie_id` AS `id`, diff --git a/db/routines/vn/views/ektSubAddress.sql b/db/routines/vn/views/ektSubAddress.sql index 46fc02828..6684a9812 100644 --- a/db/routines/vn/views/ektSubAddress.sql +++ b/db/routines/vn/views/ektSubAddress.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ektSubAddress` AS SELECT `eea`.`sub` AS `sub`, diff --git a/db/routines/vn/views/especialPrice.sql b/db/routines/vn/views/especialPrice.sql index 95615802c..a5631544e 100644 --- a/db/routines/vn/views/especialPrice.sql +++ b/db/routines/vn/views/especialPrice.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`especialPrice` AS SELECT `sp`.`id` AS `id`, diff --git a/db/routines/vn/views/exchangeInsuranceEntry.sql b/db/routines/vn/views/exchangeInsuranceEntry.sql index 3b122712a..dc103eed4 100644 --- a/db/routines/vn/views/exchangeInsuranceEntry.sql +++ b/db/routines/vn/views/exchangeInsuranceEntry.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceEntry` AS SELECT max(`tr`.`landed`) AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceIn.sql b/db/routines/vn/views/exchangeInsuranceIn.sql index 745bc5fd1..93ca8e2da 100644 --- a/db/routines/vn/views/exchangeInsuranceIn.sql +++ b/db/routines/vn/views/exchangeInsuranceIn.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceIn` AS SELECT `exchangeInsuranceInPrevious`.`dated` AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceInPrevious.sql b/db/routines/vn/views/exchangeInsuranceInPrevious.sql index 5fbe8c7e4..afafe76e3 100644 --- a/db/routines/vn/views/exchangeInsuranceInPrevious.sql +++ b/db/routines/vn/views/exchangeInsuranceInPrevious.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceInPrevious` AS SELECT `ei`.`dueDated` AS `dated`, diff --git a/db/routines/vn/views/exchangeInsuranceOut.sql b/db/routines/vn/views/exchangeInsuranceOut.sql index 658552fa0..1975ba594 100644 --- a/db/routines/vn/views/exchangeInsuranceOut.sql +++ b/db/routines/vn/views/exchangeInsuranceOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`exchangeInsuranceOut` AS SELECT `p`.`received` AS `received`, diff --git a/db/routines/vn/views/expeditionCommon.sql b/db/routines/vn/views/expeditionCommon.sql index c79561a7a..5687bc348 100644 --- a/db/routines/vn/views/expeditionCommon.sql +++ b/db/routines/vn/views/expeditionCommon.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionCommon` AS SELECT `rs`.`id` AS `truckFk`, diff --git a/db/routines/vn/views/expeditionPallet_Print.sql b/db/routines/vn/views/expeditionPallet_Print.sql index 0f58d5c50..7b933a0a1 100644 --- a/db/routines/vn/views/expeditionPallet_Print.sql +++ b/db/routines/vn/views/expeditionPallet_Print.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionPallet_Print` AS SELECT `rs2`.`description` AS `truck`, diff --git a/db/routines/vn/views/expeditionRoute_Monitor.sql b/db/routines/vn/views/expeditionRoute_Monitor.sql index cfcdcae01..9b46c8237 100644 --- a/db/routines/vn/views/expeditionRoute_Monitor.sql +++ b/db/routines/vn/views/expeditionRoute_Monitor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionRoute_Monitor` AS SELECT `r`.`id` AS `routeFk`, diff --git a/db/routines/vn/views/expeditionRoute_freeTickets.sql b/db/routines/vn/views/expeditionRoute_freeTickets.sql index 99b09c919..d49cee22e 100644 --- a/db/routines/vn/views/expeditionRoute_freeTickets.sql +++ b/db/routines/vn/views/expeditionRoute_freeTickets.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionRoute_freeTickets` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/vn/views/expeditionScan_Monitor.sql b/db/routines/vn/views/expeditionScan_Monitor.sql index 1eefc8747..6d2e855de 100644 --- a/db/routines/vn/views/expeditionScan_Monitor.sql +++ b/db/routines/vn/views/expeditionScan_Monitor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionScan_Monitor` AS SELECT `rs`.`id` AS `truckFk`, diff --git a/db/routines/vn/views/expeditionSticker.sql b/db/routines/vn/views/expeditionSticker.sql index 05de3f248..f9855d764 100644 --- a/db/routines/vn/views/expeditionSticker.sql +++ b/db/routines/vn/views/expeditionSticker.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionSticker` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/vn/views/expeditionTicket_NoBoxes.sql b/db/routines/vn/views/expeditionTicket_NoBoxes.sql index 76ff021f4..be3619b21 100644 --- a/db/routines/vn/views/expeditionTicket_NoBoxes.sql +++ b/db/routines/vn/views/expeditionTicket_NoBoxes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTicket_NoBoxes` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/vn/views/expeditionTimeExpended.sql b/db/routines/vn/views/expeditionTimeExpended.sql index ebf074f39..3666f51d9 100644 --- a/db/routines/vn/views/expeditionTimeExpended.sql +++ b/db/routines/vn/views/expeditionTimeExpended.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTimeExpended` AS SELECT `e`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/expeditionTruck.sql b/db/routines/vn/views/expeditionTruck.sql index 55596e286..a5e0cf350 100644 --- a/db/routines/vn/views/expeditionTruck.sql +++ b/db/routines/vn/views/expeditionTruck.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`expeditionTruck` AS SELECT `rs`.`id` AS `id`, diff --git a/db/routines/vn/views/firstTicketShipped.sql b/db/routines/vn/views/firstTicketShipped.sql index 65d414d68..c2e9f55e6 100644 --- a/db/routines/vn/views/firstTicketShipped.sql +++ b/db/routines/vn/views/firstTicketShipped.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`firstTicketShipped` AS SELECT min(`vn`.`ticket`.`shipped`) AS `shipped`, diff --git a/db/routines/vn/views/floraHollandBuyedItems.sql b/db/routines/vn/views/floraHollandBuyedItems.sql index 1083d1362..b8699a889 100644 --- a/db/routines/vn/views/floraHollandBuyedItems.sql +++ b/db/routines/vn/views/floraHollandBuyedItems.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`floraHollandBuyedItems` AS SELECT `b`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/inkL10n.sql b/db/routines/vn/views/inkL10n.sql index 39244921b..dfe449d96 100644 --- a/db/routines/vn/views/inkL10n.sql +++ b/db/routines/vn/views/inkL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`inkL10n` AS SELECT `k`.`id` AS `id`, diff --git a/db/routines/vn/views/invoiceCorrectionDataSource.sql b/db/routines/vn/views/invoiceCorrectionDataSource.sql index 50037ba6a..34dc39d85 100644 --- a/db/routines/vn/views/invoiceCorrectionDataSource.sql +++ b/db/routines/vn/views/invoiceCorrectionDataSource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`invoiceCorrectionDataSource` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemBotanicalWithGenus.sql b/db/routines/vn/views/itemBotanicalWithGenus.sql index 3feceaf29..fda6e6cc4 100644 --- a/db/routines/vn/views/itemBotanicalWithGenus.sql +++ b/db/routines/vn/views/itemBotanicalWithGenus.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemBotanicalWithGenus` AS SELECT `ib`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemCategoryL10n.sql b/db/routines/vn/views/itemCategoryL10n.sql index 357638aa1..8d47ca662 100644 --- a/db/routines/vn/views/itemCategoryL10n.sql +++ b/db/routines/vn/views/itemCategoryL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemCategoryL10n` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn/views/itemColor.sql b/db/routines/vn/views/itemColor.sql index 8b9e1100d..f2c3f87e0 100644 --- a/db/routines/vn/views/itemColor.sql +++ b/db/routines/vn/views/itemColor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemColor` AS SELECT `it`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemEntryIn.sql b/db/routines/vn/views/itemEntryIn.sql index 8ebed93fc..4f7855d2b 100644 --- a/db/routines/vn/views/itemEntryIn.sql +++ b/db/routines/vn/views/itemEntryIn.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemEntryIn` AS SELECT `t`.`warehouseInFk` AS `warehouseInFk`, diff --git a/db/routines/vn/views/itemEntryOut.sql b/db/routines/vn/views/itemEntryOut.sql index d9c8d9ec0..1e8718c53 100644 --- a/db/routines/vn/views/itemEntryOut.sql +++ b/db/routines/vn/views/itemEntryOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemEntryOut` AS SELECT `t`.`warehouseOutFk` AS `warehouseOutFk`, diff --git a/db/routines/vn/views/itemInk.sql b/db/routines/vn/views/itemInk.sql index d055806a7..6a5a10388 100644 --- a/db/routines/vn/views/itemInk.sql +++ b/db/routines/vn/views/itemInk.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemInk` AS SELECT `i`.`longName` AS `longName`, diff --git a/db/routines/vn/views/itemPlacementSupplyList.sql b/db/routines/vn/views/itemPlacementSupplyList.sql index fe46ef038..d8d3cc705 100644 --- a/db/routines/vn/views/itemPlacementSupplyList.sql +++ b/db/routines/vn/views/itemPlacementSupplyList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemPlacementSupplyList` AS SELECT `ips`.`id` AS `id`, diff --git a/db/routines/vn/views/itemProductor.sql b/db/routines/vn/views/itemProductor.sql index 93c7ff4c9..8d7833489 100644 --- a/db/routines/vn/views/itemProductor.sql +++ b/db/routines/vn/views/itemProductor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemProductor` AS SELECT `it`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemSearch.sql b/db/routines/vn/views/itemSearch.sql index d246f91c8..0b51b7397 100644 --- a/db/routines/vn/views/itemSearch.sql +++ b/db/routines/vn/views/itemSearch.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemSearch` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingAvailable.sql b/db/routines/vn/views/itemShelvingAvailable.sql index 85aa8154d..561569285 100644 --- a/db/routines/vn/views/itemShelvingAvailable.sql +++ b/db/routines/vn/views/itemShelvingAvailable.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingAvailable` AS SELECT `s`.`id` AS `saleFk`, diff --git a/db/routines/vn/views/itemShelvingList.sql b/db/routines/vn/views/itemShelvingList.sql index d65cf82fa..457d6f28a 100644 --- a/db/routines/vn/views/itemShelvingList.sql +++ b/db/routines/vn/views/itemShelvingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingList` AS SELECT `ish`.`shelvingFk` AS `shelvingFk`, diff --git a/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql b/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql index ed47f02c9..fa1c11314 100644 --- a/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql +++ b/db/routines/vn/views/itemShelvingPlacementSupplyStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingPlacementSupplyStock` AS SELECT `ish`.`id` AS `itemShelvingFk`, diff --git a/db/routines/vn/views/itemShelvingSaleSum.sql b/db/routines/vn/views/itemShelvingSaleSum.sql index 99e335891..9a402d6f4 100644 --- a/db/routines/vn/views/itemShelvingSaleSum.sql +++ b/db/routines/vn/views/itemShelvingSaleSum.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingSaleSum` AS SELECT `iss`.`id` AS `id`, diff --git a/db/routines/vn/views/itemShelvingStock.sql b/db/routines/vn/views/itemShelvingStock.sql index 59b41e801..41777eaec 100644 --- a/db/routines/vn/views/itemShelvingStock.sql +++ b/db/routines/vn/views/itemShelvingStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStock` AS SELECT `ish`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingStockFull.sql b/db/routines/vn/views/itemShelvingStockFull.sql index 85f89a9a3..c767823d6 100644 --- a/db/routines/vn/views/itemShelvingStockFull.sql +++ b/db/routines/vn/views/itemShelvingStockFull.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStockFull` AS SELECT `ish`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/itemShelvingStockRemoved.sql b/db/routines/vn/views/itemShelvingStockRemoved.sql index 48b4aae2f..7baf3a6c6 100644 --- a/db/routines/vn/views/itemShelvingStockRemoved.sql +++ b/db/routines/vn/views/itemShelvingStockRemoved.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemShelvingStockRemoved` AS SELECT `ish`.`id` AS `itemShelvingFk`, diff --git a/db/routines/vn/views/itemTagged.sql b/db/routines/vn/views/itemTagged.sql index 1804ba21e..db7460fcc 100644 --- a/db/routines/vn/views/itemTagged.sql +++ b/db/routines/vn/views/itemTagged.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTagged` AS SELECT DISTINCT `vn`.`itemTag`.`itemFk` AS `itemFk` diff --git a/db/routines/vn/views/itemTaxCountrySpain.sql b/db/routines/vn/views/itemTaxCountrySpain.sql index 5a0fbaf55..992535bdc 100644 --- a/db/routines/vn/views/itemTaxCountrySpain.sql +++ b/db/routines/vn/views/itemTaxCountrySpain.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTaxCountrySpain` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/vn/views/itemTicketOut.sql b/db/routines/vn/views/itemTicketOut.sql index 8638e5797..7a5e17d76 100644 --- a/db/routines/vn/views/itemTicketOut.sql +++ b/db/routines/vn/views/itemTicketOut.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTicketOut` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/itemTypeL10n.sql b/db/routines/vn/views/itemTypeL10n.sql index 4b5b713d1..66ef9ac90 100644 --- a/db/routines/vn/views/itemTypeL10n.sql +++ b/db/routines/vn/views/itemTypeL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`itemTypeL10n` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn/views/item_Free_Id.sql b/db/routines/vn/views/item_Free_Id.sql index fb6414d29..d148a18e6 100644 --- a/db/routines/vn/views/item_Free_Id.sql +++ b/db/routines/vn/views/item_Free_Id.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`item_Free_Id` AS SELECT `i1`.`id` + 1 AS `newId` diff --git a/db/routines/vn/views/labelInfo.sql b/db/routines/vn/views/labelInfo.sql index 32febb94c..eef0145fb 100644 --- a/db/routines/vn/views/labelInfo.sql +++ b/db/routines/vn/views/labelInfo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`labelInfo` AS SELECT `i`.`id` AS `itemId`, diff --git a/db/routines/vn/views/lastHourProduction.sql b/db/routines/vn/views/lastHourProduction.sql index 43042912a..e0b66481d 100644 --- a/db/routines/vn/views/lastHourProduction.sql +++ b/db/routines/vn/views/lastHourProduction.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastHourProduction` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/lastPurchases.sql b/db/routines/vn/views/lastPurchases.sql index 42a7be08d..3099acd00 100644 --- a/db/routines/vn/views/lastPurchases.sql +++ b/db/routines/vn/views/lastPurchases.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastPurchases` AS SELECT `tr`.`landed` AS `landed`, diff --git a/db/routines/vn/views/lastTopClaims.sql b/db/routines/vn/views/lastTopClaims.sql index bb7592df3..93dbc4b45 100644 --- a/db/routines/vn/views/lastTopClaims.sql +++ b/db/routines/vn/views/lastTopClaims.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`lastTopClaims` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/mistake.sql b/db/routines/vn/views/mistake.sql index fdc8791db..ca9223c3b 100644 --- a/db/routines/vn/views/mistake.sql +++ b/db/routines/vn/views/mistake.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`mistake` AS SELECT `wr`.`code` AS `revisador`, diff --git a/db/routines/vn/views/mistakeRatio.sql b/db/routines/vn/views/mistakeRatio.sql index 93662010a..0aa80a966 100644 --- a/db/routines/vn/views/mistakeRatio.sql +++ b/db/routines/vn/views/mistakeRatio.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`mistakeRatio` AS SELECT `wr`.`code` AS `revisador`, diff --git a/db/routines/vn/views/newBornSales.sql b/db/routines/vn/views/newBornSales.sql index 98babfcd6..b4aac208c 100644 --- a/db/routines/vn/views/newBornSales.sql +++ b/db/routines/vn/views/newBornSales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`newBornSales` AS SELECT `v`.`importe` AS `amount`, diff --git a/db/routines/vn/views/operatorWorkerCode.sql b/db/routines/vn/views/operatorWorkerCode.sql index 9a96bfb42..343f74254 100644 --- a/db/routines/vn/views/operatorWorkerCode.sql +++ b/db/routines/vn/views/operatorWorkerCode.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`operatorWorkerCode` AS SELECT `o`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/originL10n.sql b/db/routines/vn/views/originL10n.sql index dc4f2cecf..ffceccd50 100644 --- a/db/routines/vn/views/originL10n.sql +++ b/db/routines/vn/views/originL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`originL10n` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/vn/views/packageEquivalentItem.sql b/db/routines/vn/views/packageEquivalentItem.sql index bca06fae3..767fa326e 100644 --- a/db/routines/vn/views/packageEquivalentItem.sql +++ b/db/routines/vn/views/packageEquivalentItem.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`packageEquivalentItem` AS SELECT `p`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/paymentExchangeInsurance.sql b/db/routines/vn/views/paymentExchangeInsurance.sql index 068c165ee..c5800e48b 100644 --- a/db/routines/vn/views/paymentExchangeInsurance.sql +++ b/db/routines/vn/views/paymentExchangeInsurance.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`paymentExchangeInsurance` AS SELECT `ei`.`id` AS `pago_sdc_id`, diff --git a/db/routines/vn/views/payrollCenter.sql b/db/routines/vn/views/payrollCenter.sql index 566dfa367..f06dc702f 100644 --- a/db/routines/vn/views/payrollCenter.sql +++ b/db/routines/vn/views/payrollCenter.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`payrollCenter` AS SELECT `b`.`workCenterFkA3` AS `codCenter`, diff --git a/db/routines/vn/views/personMedia.sql b/db/routines/vn/views/personMedia.sql index 41cca52d5..367f67c8e 100644 --- a/db/routines/vn/views/personMedia.sql +++ b/db/routines/vn/views/personMedia.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`personMedia` AS SELECT `c`.`id` AS `workerFk`, diff --git a/db/routines/vn/views/phoneBook.sql b/db/routines/vn/views/phoneBook.sql index 1fd0c4641..c51b912aa 100644 --- a/db/routines/vn/views/phoneBook.sql +++ b/db/routines/vn/views/phoneBook.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`phoneBook` AS SELECT 'C' AS `Tipo`, diff --git a/db/routines/vn/views/productionVolume.sql b/db/routines/vn/views/productionVolume.sql index 8e3a14c10..14cf5518b 100644 --- a/db/routines/vn/views/productionVolume.sql +++ b/db/routines/vn/views/productionVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`productionVolume` AS SELECT HOUR(`e`.`created`) AS `hora`, diff --git a/db/routines/vn/views/productionVolume_LastHour.sql b/db/routines/vn/views/productionVolume_LastHour.sql index ad77b3c6f..bafb5a67a 100644 --- a/db/routines/vn/views/productionVolume_LastHour.sql +++ b/db/routines/vn/views/productionVolume_LastHour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`productionVolume_LastHour` AS SELECT cast( diff --git a/db/routines/vn/views/role.sql b/db/routines/vn/views/role.sql index 1aa1482e6..db2fa109e 100644 --- a/db/routines/vn/views/role.sql +++ b/db/routines/vn/views/role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`role` AS SELECT `account`.`role`.`id` AS `id`, diff --git a/db/routines/vn/views/routesControl.sql b/db/routines/vn/views/routesControl.sql index 697d1298d..9f9e23da1 100644 --- a/db/routines/vn/views/routesControl.sql +++ b/db/routines/vn/views/routesControl.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`routesControl` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/vn/views/saleCost.sql b/db/routines/vn/views/saleCost.sql index e9f451f37..27f492abd 100644 --- a/db/routines/vn/views/saleCost.sql +++ b/db/routines/vn/views/saleCost.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleCost` AS SELECT `s`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn/views/saleMistakeList.sql b/db/routines/vn/views/saleMistakeList.sql index 36413406c..0cad951fe 100644 --- a/db/routines/vn/views/saleMistakeList.sql +++ b/db/routines/vn/views/saleMistakeList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleMistakeList` AS SELECT `st`.`saleFk` AS `saleFk`, diff --git a/db/routines/vn/views/saleMistake_list__2.sql b/db/routines/vn/views/saleMistake_list__2.sql index 0f302cbd2..e65761c75 100644 --- a/db/routines/vn/views/saleMistake_list__2.sql +++ b/db/routines/vn/views/saleMistake_list__2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleMistake_list__2` AS SELECT `st`.`saleFk` AS `saleFk`, diff --git a/db/routines/vn/views/saleSaleTracking.sql b/db/routines/vn/views/saleSaleTracking.sql index 20b20569c..7e6531a01 100644 --- a/db/routines/vn/views/saleSaleTracking.sql +++ b/db/routines/vn/views/saleSaleTracking.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleSaleTracking` AS SELECT DISTINCT `st`.`saleFk` AS `saleFk` diff --git a/db/routines/vn/views/saleValue.sql b/db/routines/vn/views/saleValue.sql index 4587143c6..84741990f 100644 --- a/db/routines/vn/views/saleValue.sql +++ b/db/routines/vn/views/saleValue.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleValue` AS SELECT `wh`.`name` AS `warehouse`, diff --git a/db/routines/vn/views/saleVolume.sql b/db/routines/vn/views/saleVolume.sql index 37d27ff77..a1a1b2925 100644 --- a/db/routines/vn/views/saleVolume.sql +++ b/db/routines/vn/views/saleVolume.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleVolume` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/saleVolume_Today_VNH.sql b/db/routines/vn/views/saleVolume_Today_VNH.sql index 31ba77844..f81253a76 100644 --- a/db/routines/vn/views/saleVolume_Today_VNH.sql +++ b/db/routines/vn/views/saleVolume_Today_VNH.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`saleVolume_Today_VNH` AS SELECT `t`.`nickname` AS `Cliente`, diff --git a/db/routines/vn/views/sale_freightComponent.sql b/db/routines/vn/views/sale_freightComponent.sql index 6548b4a84..a76a8666c 100644 --- a/db/routines/vn/views/sale_freightComponent.sql +++ b/db/routines/vn/views/sale_freightComponent.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`sale_freightComponent` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/vn/views/salesPersonSince.sql b/db/routines/vn/views/salesPersonSince.sql index 485bdbf2c..0e1646f1b 100644 --- a/db/routines/vn/views/salesPersonSince.sql +++ b/db/routines/vn/views/salesPersonSince.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPersonSince` AS SELECT `b`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/salesPreparedLastHour.sql b/db/routines/vn/views/salesPreparedLastHour.sql index ec4a2cbef..33e86b29c 100644 --- a/db/routines/vn/views/salesPreparedLastHour.sql +++ b/db/routines/vn/views/salesPreparedLastHour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPreparedLastHour` AS SELECT `t`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/salesPreviousPreparated.sql b/db/routines/vn/views/salesPreviousPreparated.sql index d12a28801..bd55862c9 100644 --- a/db/routines/vn/views/salesPreviousPreparated.sql +++ b/db/routines/vn/views/salesPreviousPreparated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`salesPreviousPreparated` AS SELECT `st`.`saleFk` AS `saleFk` diff --git a/db/routines/vn/views/supplierPackaging.sql b/db/routines/vn/views/supplierPackaging.sql index 319f48d9f..01c9c69e7 100644 --- a/db/routines/vn/views/supplierPackaging.sql +++ b/db/routines/vn/views/supplierPackaging.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`supplierPackaging` AS SELECT `e`.`supplierFk` AS `supplierFk`, diff --git a/db/routines/vn/views/tagL10n.sql b/db/routines/vn/views/tagL10n.sql index 201e07345..68ed9541c 100644 --- a/db/routines/vn/views/tagL10n.sql +++ b/db/routines/vn/views/tagL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`tagL10n` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn/views/ticketDownBuffer.sql b/db/routines/vn/views/ticketDownBuffer.sql index cf46a317b..e951de9e0 100644 --- a/db/routines/vn/views/ticketDownBuffer.sql +++ b/db/routines/vn/views/ticketDownBuffer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketDownBuffer` AS SELECT `td`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketLastUpdated.sql b/db/routines/vn/views/ticketLastUpdated.sql index cdebf34b1..8a6a66c8e 100644 --- a/db/routines/vn/views/ticketLastUpdated.sql +++ b/db/routines/vn/views/ticketLastUpdated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketLastUpdated` AS SELECT `ticketLastUpdatedList`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketLastUpdatedList.sql b/db/routines/vn/views/ticketLastUpdatedList.sql index 4eb672cd0..5d087a596 100644 --- a/db/routines/vn/views/ticketLastUpdatedList.sql +++ b/db/routines/vn/views/ticketLastUpdatedList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketLastUpdatedList` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketNotInvoiced.sql b/db/routines/vn/views/ticketNotInvoiced.sql index dbe35a6fa..f966bf85d 100644 --- a/db/routines/vn/views/ticketNotInvoiced.sql +++ b/db/routines/vn/views/ticketNotInvoiced.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketNotInvoiced` AS SELECT `t`.`companyFk` AS `companyFk`, diff --git a/db/routines/vn/views/ticketPackingList.sql b/db/routines/vn/views/ticketPackingList.sql index 72d9061ff..c185bb7c0 100644 --- a/db/routines/vn/views/ticketPackingList.sql +++ b/db/routines/vn/views/ticketPackingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketPackingList` AS SELECT `t`.`nickname` AS `nickname`, diff --git a/db/routines/vn/views/ticketPreviousPreparingList.sql b/db/routines/vn/views/ticketPreviousPreparingList.sql index ef3065b9e..4e19c0bb8 100644 --- a/db/routines/vn/views/ticketPreviousPreparingList.sql +++ b/db/routines/vn/views/ticketPreviousPreparingList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketPreviousPreparingList` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/ticketState.sql b/db/routines/vn/views/ticketState.sql index a9f2720de..588c5c61a 100644 --- a/db/routines/vn/views/ticketState.sql +++ b/db/routines/vn/views/ticketState.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketState` AS SELECT `tt`.`created` AS `updated`, diff --git a/db/routines/vn/views/ticketStateToday.sql b/db/routines/vn/views/ticketStateToday.sql index b38bd0737..0c9e01188 100644 --- a/db/routines/vn/views/ticketStateToday.sql +++ b/db/routines/vn/views/ticketStateToday.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`ticketStateToday` AS SELECT `ts`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/tr2.sql b/db/routines/vn/views/tr2.sql index 6d963d1c7..525554f04 100644 --- a/db/routines/vn/views/tr2.sql +++ b/db/routines/vn/views/tr2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`tr2` AS SELECT `vn`.`travel`.`id` AS `id`, diff --git a/db/routines/vn/views/traceabilityBuy.sql b/db/routines/vn/views/traceabilityBuy.sql index 9711ffaba..8189a8b0e 100644 --- a/db/routines/vn/views/traceabilityBuy.sql +++ b/db/routines/vn/views/traceabilityBuy.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`traceabilityBuy` AS SELECT `b`.`id` AS `buyFk`, diff --git a/db/routines/vn/views/traceabilitySale.sql b/db/routines/vn/views/traceabilitySale.sql index 7cc7985e1..a251e11d5 100644 --- a/db/routines/vn/views/traceabilitySale.sql +++ b/db/routines/vn/views/traceabilitySale.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`traceabilitySale` AS SELECT `s`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/workerBusinessDated.sql b/db/routines/vn/views/workerBusinessDated.sql index 56bc0f1e9..783c18ffd 100644 --- a/db/routines/vn/views/workerBusinessDated.sql +++ b/db/routines/vn/views/workerBusinessDated.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerBusinessDated` AS SELECT `t`.`dated` AS `dated`, diff --git a/db/routines/vn/views/workerDepartment.sql b/db/routines/vn/views/workerDepartment.sql index c652cd2ae..e4f3bbe90 100644 --- a/db/routines/vn/views/workerDepartment.sql +++ b/db/routines/vn/views/workerDepartment.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerDepartment` AS SELECT `b`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/workerLabour.sql b/db/routines/vn/views/workerLabour.sql index 478eb7504..633d95c4a 100644 --- a/db/routines/vn/views/workerLabour.sql +++ b/db/routines/vn/views/workerLabour.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerLabour` AS SELECT `b`.`id` AS `businessFk`, diff --git a/db/routines/vn/views/workerMedia.sql b/db/routines/vn/views/workerMedia.sql index a2dd9adab..bc6961422 100644 --- a/db/routines/vn/views/workerMedia.sql +++ b/db/routines/vn/views/workerMedia.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerMedia` AS SELECT `w`.`id` AS `workerFk`, diff --git a/db/routines/vn/views/workerSpeedExpedition.sql b/db/routines/vn/views/workerSpeedExpedition.sql index a3c03d497..0bbd250b3 100644 --- a/db/routines/vn/views/workerSpeedExpedition.sql +++ b/db/routines/vn/views/workerSpeedExpedition.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerSpeedExpedition` AS SELECT `sv`.`ticketFk` AS `ticketFk`, diff --git a/db/routines/vn/views/workerSpeedSaleTracking.sql b/db/routines/vn/views/workerSpeedSaleTracking.sql index 8bce49546..d426af3a5 100644 --- a/db/routines/vn/views/workerSpeedSaleTracking.sql +++ b/db/routines/vn/views/workerSpeedSaleTracking.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerSpeedSaleTracking` AS SELECT `salesPreparedLastHour`.`warehouseFk` AS `warehouseFk`, diff --git a/db/routines/vn/views/workerTeamCollegues.sql b/db/routines/vn/views/workerTeamCollegues.sql index 56fa3d7d3..c43bb6a4a 100644 --- a/db/routines/vn/views/workerTeamCollegues.sql +++ b/db/routines/vn/views/workerTeamCollegues.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTeamCollegues` AS SELECT DISTINCT `w`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/workerTimeControlUserInfo.sql b/db/routines/vn/views/workerTimeControlUserInfo.sql index 03457f58c..5d122fc09 100644 --- a/db/routines/vn/views/workerTimeControlUserInfo.sql +++ b/db/routines/vn/views/workerTimeControlUserInfo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTimeControlUserInfo` AS SELECT `u`.`id` AS `userFk`, diff --git a/db/routines/vn/views/workerTimeJourneyNG.sql b/db/routines/vn/views/workerTimeJourneyNG.sql index 2674896da..e55062e64 100644 --- a/db/routines/vn/views/workerTimeJourneyNG.sql +++ b/db/routines/vn/views/workerTimeJourneyNG.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerTimeJourneyNG` AS SELECT `wtc`.`userFk` AS `userFk`, diff --git a/db/routines/vn/views/workerWithoutTractor.sql b/db/routines/vn/views/workerWithoutTractor.sql index fce4e1c11..205c66599 100644 --- a/db/routines/vn/views/workerWithoutTractor.sql +++ b/db/routines/vn/views/workerWithoutTractor.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`workerWithoutTractor` AS SELECT `c`.`workerFk` AS `workerFk`, diff --git a/db/routines/vn/views/zoneEstimatedDelivery.sql b/db/routines/vn/views/zoneEstimatedDelivery.sql index 372e2c5cb..953a2b25a 100644 --- a/db/routines/vn/views/zoneEstimatedDelivery.sql +++ b/db/routines/vn/views/zoneEstimatedDelivery.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`zoneEstimatedDelivery` AS SELECT `t`.`zoneFk` AS `zoneFk`, diff --git a/db/routines/vn2008/views/Agencias.sql b/db/routines/vn2008/views/Agencias.sql index 24964bdd6..ca77395b3 100644 --- a/db/routines/vn2008/views/Agencias.sql +++ b/db/routines/vn2008/views/Agencias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Agencias` AS SELECT `am`.`id` AS `Id_Agencia`, diff --git a/db/routines/vn2008/views/Articles.sql b/db/routines/vn2008/views/Articles.sql index 652c25e84..f8a1e8d43 100644 --- a/db/routines/vn2008/views/Articles.sql +++ b/db/routines/vn2008/views/Articles.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Articles` AS SELECT `i`.`id` AS `Id_Article`, diff --git a/db/routines/vn2008/views/Bancos.sql b/db/routines/vn2008/views/Bancos.sql index b7a86df1c..7f8d289f9 100644 --- a/db/routines/vn2008/views/Bancos.sql +++ b/db/routines/vn2008/views/Bancos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos` AS SELECT `a`.`id` AS `Id_Banco`, diff --git a/db/routines/vn2008/views/Bancos_poliza.sql b/db/routines/vn2008/views/Bancos_poliza.sql index fa4a31c37..915f6a64d 100644 --- a/db/routines/vn2008/views/Bancos_poliza.sql +++ b/db/routines/vn2008/views/Bancos_poliza.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos_poliza` AS SELECT `bp`.`id` AS `poliza_id`, diff --git a/db/routines/vn2008/views/Cajas.sql b/db/routines/vn2008/views/Cajas.sql index a86b65298..59b96a1cc 100644 --- a/db/routines/vn2008/views/Cajas.sql +++ b/db/routines/vn2008/views/Cajas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cajas` AS SELECT `t`.`id` AS `Id_Caja`, diff --git a/db/routines/vn2008/views/Clientes.sql b/db/routines/vn2008/views/Clientes.sql index e031f229d..710df071a 100644 --- a/db/routines/vn2008/views/Clientes.sql +++ b/db/routines/vn2008/views/Clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Clientes` AS SELECT `c`.`id` AS `id_cliente`, diff --git a/db/routines/vn2008/views/Comparativa.sql b/db/routines/vn2008/views/Comparativa.sql index 8e2465699..92e8adf1f 100644 --- a/db/routines/vn2008/views/Comparativa.sql +++ b/db/routines/vn2008/views/Comparativa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Comparativa` AS SELECT `c`.`timePeriod` AS `Periodo`, diff --git a/db/routines/vn2008/views/Compres.sql b/db/routines/vn2008/views/Compres.sql index 62e2496e1..786aef3cb 100644 --- a/db/routines/vn2008/views/Compres.sql +++ b/db/routines/vn2008/views/Compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres` AS SELECT `c`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Compres_mark.sql b/db/routines/vn2008/views/Compres_mark.sql index 803e0bb0c..aac73aa20 100644 --- a/db/routines/vn2008/views/Compres_mark.sql +++ b/db/routines/vn2008/views/Compres_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres_mark` AS SELECT `bm`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Consignatarios.sql b/db/routines/vn2008/views/Consignatarios.sql index d4430d6de..df7d07fb3 100644 --- a/db/routines/vn2008/views/Consignatarios.sql +++ b/db/routines/vn2008/views/Consignatarios.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Consignatarios` AS SELECT `a`.`id` AS `id_consigna`, diff --git a/db/routines/vn2008/views/Cubos.sql b/db/routines/vn2008/views/Cubos.sql index 89df40466..ce28d414a 100644 --- a/db/routines/vn2008/views/Cubos.sql +++ b/db/routines/vn2008/views/Cubos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos` AS SELECT `p`.`id` AS `Id_Cubo`, diff --git a/db/routines/vn2008/views/Cubos_Retorno.sql b/db/routines/vn2008/views/Cubos_Retorno.sql index 3a2d77cb2..152d72c99 100644 --- a/db/routines/vn2008/views/Cubos_Retorno.sql +++ b/db/routines/vn2008/views/Cubos_Retorno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos_Retorno` AS SELECT `rb`.`id` AS `idCubos_Retorno`, diff --git a/db/routines/vn2008/views/Entradas.sql b/db/routines/vn2008/views/Entradas.sql index 4d1e061fb..bca2a759f 100644 --- a/db/routines/vn2008/views/Entradas.sql +++ b/db/routines/vn2008/views/Entradas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas` AS SELECT `e`.`id` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Entradas_Auto.sql b/db/routines/vn2008/views/Entradas_Auto.sql index a755beda3..64f6f8ae6 100644 --- a/db/routines/vn2008/views/Entradas_Auto.sql +++ b/db/routines/vn2008/views/Entradas_Auto.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_Auto` AS SELECT `ev`.`entryFk` AS `Id_Entrada` diff --git a/db/routines/vn2008/views/Entradas_orden.sql b/db/routines/vn2008/views/Entradas_orden.sql index 57dd56d26..ddc294848 100644 --- a/db/routines/vn2008/views/Entradas_orden.sql +++ b/db/routines/vn2008/views/Entradas_orden.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_orden` AS SELECT `eo`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Impresoras.sql b/db/routines/vn2008/views/Impresoras.sql index 9a310da66..76118af1e 100644 --- a/db/routines/vn2008/views/Impresoras.sql +++ b/db/routines/vn2008/views/Impresoras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Impresoras` AS SELECT `vn`.`printer`.`id` AS `Id_impresora`, diff --git a/db/routines/vn2008/views/Monedas.sql b/db/routines/vn2008/views/Monedas.sql index 565401a6c..88a2cf495 100644 --- a/db/routines/vn2008/views/Monedas.sql +++ b/db/routines/vn2008/views/Monedas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Monedas` AS SELECT `c`.`id` AS `Id_Moneda`, diff --git a/db/routines/vn2008/views/Movimientos.sql b/db/routines/vn2008/views/Movimientos.sql index 7ee59260f..458ae4d48 100644 --- a/db/routines/vn2008/views/Movimientos.sql +++ b/db/routines/vn2008/views/Movimientos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos` AS SELECT `m`.`id` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_componentes.sql b/db/routines/vn2008/views/Movimientos_componentes.sql index 24ff3ef59..a88e5f7d1 100644 --- a/db/routines/vn2008/views/Movimientos_componentes.sql +++ b/db/routines/vn2008/views/Movimientos_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_componentes` AS SELECT `sc`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_mark.sql b/db/routines/vn2008/views/Movimientos_mark.sql index bf30e869f..cc42e565e 100644 --- a/db/routines/vn2008/views/Movimientos_mark.sql +++ b/db/routines/vn2008/views/Movimientos_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_mark` AS SELECT `mm`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Ordenes.sql b/db/routines/vn2008/views/Ordenes.sql index 77f00c31a..a8266ab98 100644 --- a/db/routines/vn2008/views/Ordenes.sql +++ b/db/routines/vn2008/views/Ordenes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Ordenes` AS SELECT `tr`.`id` AS `Id_ORDEN`, diff --git a/db/routines/vn2008/views/Origen.sql b/db/routines/vn2008/views/Origen.sql index 776bb12fe..58658a1af 100644 --- a/db/routines/vn2008/views/Origen.sql +++ b/db/routines/vn2008/views/Origen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Origen` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/vn2008/views/Paises.sql b/db/routines/vn2008/views/Paises.sql index 02ea61193..72636de44 100644 --- a/db/routines/vn2008/views/Paises.sql +++ b/db/routines/vn2008/views/Paises.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Paises` AS SELECT `c`.`id` AS `Id`, diff --git a/db/routines/vn2008/views/PreciosEspeciales.sql b/db/routines/vn2008/views/PreciosEspeciales.sql index fe1d09416..a17503533 100644 --- a/db/routines/vn2008/views/PreciosEspeciales.sql +++ b/db/routines/vn2008/views/PreciosEspeciales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`PreciosEspeciales` AS SELECT `sp`.`id` AS `Id_PrecioEspecial`, diff --git a/db/routines/vn2008/views/Proveedores.sql b/db/routines/vn2008/views/Proveedores.sql index 941ed8a68..293732d23 100644 --- a/db/routines/vn2008/views/Proveedores.sql +++ b/db/routines/vn2008/views/Proveedores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores` AS SELECT `s`.`id` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Proveedores_cargueras.sql b/db/routines/vn2008/views/Proveedores_cargueras.sql index e1dab8395..4ff9bd627 100644 --- a/db/routines/vn2008/views/Proveedores_cargueras.sql +++ b/db/routines/vn2008/views/Proveedores_cargueras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_cargueras` AS SELECT `fs`.`supplierFk` AS `Id_Proveedor` diff --git a/db/routines/vn2008/views/Proveedores_gestdoc.sql b/db/routines/vn2008/views/Proveedores_gestdoc.sql index 45ff86aa1..1a27f7a7d 100644 --- a/db/routines/vn2008/views/Proveedores_gestdoc.sql +++ b/db/routines/vn2008/views/Proveedores_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_gestdoc` AS SELECT `sd`.`supplierFk` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Recibos.sql b/db/routines/vn2008/views/Recibos.sql index 51413df39..8b710cb23 100644 --- a/db/routines/vn2008/views/Recibos.sql +++ b/db/routines/vn2008/views/Recibos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Recibos` AS SELECT `r`.`Id` AS `Id`, diff --git a/db/routines/vn2008/views/Remesas.sql b/db/routines/vn2008/views/Remesas.sql index 979adc339..2986ec6f2 100644 --- a/db/routines/vn2008/views/Remesas.sql +++ b/db/routines/vn2008/views/Remesas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Remesas` AS SELECT `r`.`id` AS `Id_Remesa`, diff --git a/db/routines/vn2008/views/Rutas.sql b/db/routines/vn2008/views/Rutas.sql index 38a88cc88..959ef887e 100644 --- a/db/routines/vn2008/views/Rutas.sql +++ b/db/routines/vn2008/views/Rutas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Rutas` AS SELECT `r`.`id` AS `Id_Ruta`, diff --git a/db/routines/vn2008/views/Split.sql b/db/routines/vn2008/views/Split.sql index d977f0af7..812cec8fe 100644 --- a/db/routines/vn2008/views/Split.sql +++ b/db/routines/vn2008/views/Split.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Splits` AS SELECT `s`.`id` AS `Id_Split`, diff --git a/db/routines/vn2008/views/Split_lines.sql b/db/routines/vn2008/views/Split_lines.sql index 48457a927..afde3977f 100644 --- a/db/routines/vn2008/views/Split_lines.sql +++ b/db/routines/vn2008/views/Split_lines.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Split_lines` AS SELECT `sl`.`id` AS `Id_Split_lines`, diff --git a/db/routines/vn2008/views/Tickets.sql b/db/routines/vn2008/views/Tickets.sql index bc0393aac..18646dbab 100644 --- a/db/routines/vn2008/views/Tickets.sql +++ b/db/routines/vn2008/views/Tickets.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets` AS SELECT `t`.`id` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_state.sql b/db/routines/vn2008/views/Tickets_state.sql index 94b59d22b..fbbc00170 100644 --- a/db/routines/vn2008/views/Tickets_state.sql +++ b/db/routines/vn2008/views/Tickets_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_state` AS SELECT `t`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_turno.sql b/db/routines/vn2008/views/Tickets_turno.sql index c7aa363bf..6d16a5780 100644 --- a/db/routines/vn2008/views/Tickets_turno.sql +++ b/db/routines/vn2008/views/Tickets_turno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_turno` AS SELECT `tw`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tintas.sql b/db/routines/vn2008/views/Tintas.sql index 0cbdc4766..729cfa9d6 100644 --- a/db/routines/vn2008/views/Tintas.sql +++ b/db/routines/vn2008/views/Tintas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tintas` AS SELECT `i`.`id` AS `Id_Tinta`, diff --git a/db/routines/vn2008/views/Tipos.sql b/db/routines/vn2008/views/Tipos.sql index d61cabe38..5a99e2aca 100644 --- a/db/routines/vn2008/views/Tipos.sql +++ b/db/routines/vn2008/views/Tipos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tipos` AS SELECT `it`.`id` AS `tipo_id`, diff --git a/db/routines/vn2008/views/Trabajadores.sql b/db/routines/vn2008/views/Trabajadores.sql index 9d36ceed1..a5c8353d2 100644 --- a/db/routines/vn2008/views/Trabajadores.sql +++ b/db/routines/vn2008/views/Trabajadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Trabajadores` AS SELECT `w`.`id` AS `Id_Trabajador`, diff --git a/db/routines/vn2008/views/Tramos.sql b/db/routines/vn2008/views/Tramos.sql index 3ff578291..a9847a1b1 100644 --- a/db/routines/vn2008/views/Tramos.sql +++ b/db/routines/vn2008/views/Tramos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tramos` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/V_edi_item_track.sql b/db/routines/vn2008/views/V_edi_item_track.sql index 0b1da3f6e..8e0182719 100644 --- a/db/routines/vn2008/views/V_edi_item_track.sql +++ b/db/routines/vn2008/views/V_edi_item_track.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`V_edi_item_track` AS SELECT `edi`.`item_track`.`item_id` AS `item_id`, diff --git a/db/routines/vn2008/views/Vehiculos_consumo.sql b/db/routines/vn2008/views/Vehiculos_consumo.sql index 828ee25a8..2808371c7 100644 --- a/db/routines/vn2008/views/Vehiculos_consumo.sql +++ b/db/routines/vn2008/views/Vehiculos_consumo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Vehiculos_consumo` AS SELECT `vc`.`id` AS `Vehiculos_consumo_id`, diff --git a/db/routines/vn2008/views/account_conciliacion.sql b/db/routines/vn2008/views/account_conciliacion.sql index 3d0dc77ac..e652648f5 100644 --- a/db/routines/vn2008/views/account_conciliacion.sql +++ b/db/routines/vn2008/views/account_conciliacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_conciliacion` AS SELECT `ar`.`id` AS `idaccount_conciliacion`, diff --git a/db/routines/vn2008/views/account_detail.sql b/db/routines/vn2008/views/account_detail.sql index 7335adf41..874f1f90c 100644 --- a/db/routines/vn2008/views/account_detail.sql +++ b/db/routines/vn2008/views/account_detail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail` AS SELECT `ac`.`id` AS `account_detail_id`, diff --git a/db/routines/vn2008/views/account_detail_type.sql b/db/routines/vn2008/views/account_detail_type.sql index 62361d979..5f6f22cd9 100644 --- a/db/routines/vn2008/views/account_detail_type.sql +++ b/db/routines/vn2008/views/account_detail_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail_type` AS SELECT `adt`.`id` AS `account_detail_type_id`, diff --git a/db/routines/vn2008/views/agency.sql b/db/routines/vn2008/views/agency.sql index d1160d4a4..015149e60 100644 --- a/db/routines/vn2008/views/agency.sql +++ b/db/routines/vn2008/views/agency.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`agency` AS SELECT `a`.`id` AS `agency_id`, diff --git a/db/routines/vn2008/views/airline.sql b/db/routines/vn2008/views/airline.sql index 6a02852af..364e61ab1 100644 --- a/db/routines/vn2008/views/airline.sql +++ b/db/routines/vn2008/views/airline.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airline` AS SELECT `a`.`id` AS `airline_id`, diff --git a/db/routines/vn2008/views/airport.sql b/db/routines/vn2008/views/airport.sql index 90de84e44..3e4238e51 100644 --- a/db/routines/vn2008/views/airport.sql +++ b/db/routines/vn2008/views/airport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airport` AS SELECT `a`.`id` AS `airport_id`, diff --git a/db/routines/vn2008/views/albaran.sql b/db/routines/vn2008/views/albaran.sql index 86f4b7c39..1851834cd 100644 --- a/db/routines/vn2008/views/albaran.sql +++ b/db/routines/vn2008/views/albaran.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran` AS SELECT `dn`.`id` AS `albaran_id`, diff --git a/db/routines/vn2008/views/albaran_gestdoc.sql b/db/routines/vn2008/views/albaran_gestdoc.sql index 7ec8f154d..d4d0ecbce 100644 --- a/db/routines/vn2008/views/albaran_gestdoc.sql +++ b/db/routines/vn2008/views/albaran_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_gestdoc` AS SELECT `dnd`.`dmsFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/albaran_state.sql b/db/routines/vn2008/views/albaran_state.sql index a191cb07e..03056d7f0 100644 --- a/db/routines/vn2008/views/albaran_state.sql +++ b/db/routines/vn2008/views/albaran_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_state` AS SELECT `dn`.`id` AS `albaran_state_id`, diff --git a/db/routines/vn2008/views/awb.sql b/db/routines/vn2008/views/awb.sql index 94bffabd0..d37ca2167 100644 --- a/db/routines/vn2008/views/awb.sql +++ b/db/routines/vn2008/views/awb.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb` AS SELECT `a`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component.sql b/db/routines/vn2008/views/awb_component.sql index 6097219c1..39eec2733 100644 --- a/db/routines/vn2008/views/awb_component.sql +++ b/db/routines/vn2008/views/awb_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component` AS SELECT `ac`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component_template.sql b/db/routines/vn2008/views/awb_component_template.sql index 2c2fcf8f9..cdf178fe1 100644 --- a/db/routines/vn2008/views/awb_component_template.sql +++ b/db/routines/vn2008/views/awb_component_template.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_template` AS SELECT`act`.`id` AS `awb_component_template_id`, diff --git a/db/routines/vn2008/views/awb_component_type.sql b/db/routines/vn2008/views/awb_component_type.sql index 56626476d..f65df513f 100644 --- a/db/routines/vn2008/views/awb_component_type.sql +++ b/db/routines/vn2008/views/awb_component_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_type` AS SELECT `act`.`id` AS `awb_component_type_id`, diff --git a/db/routines/vn2008/views/awb_gestdoc.sql b/db/routines/vn2008/views/awb_gestdoc.sql index 5f8040714..16715ce6b 100644 --- a/db/routines/vn2008/views/awb_gestdoc.sql +++ b/db/routines/vn2008/views/awb_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_gestdoc` AS SELECT `ad`.`id` AS `awb_gestdoc_id`, diff --git a/db/routines/vn2008/views/awb_recibida.sql b/db/routines/vn2008/views/awb_recibida.sql index 5cea69644..9f04e0e35 100644 --- a/db/routines/vn2008/views/awb_recibida.sql +++ b/db/routines/vn2008/views/awb_recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_recibida` AS SELECT `aii`.`awbFk` AS `awb_id`, diff --git a/db/routines/vn2008/views/awb_role.sql b/db/routines/vn2008/views/awb_role.sql index 86402f14b..3905ee572 100644 --- a/db/routines/vn2008/views/awb_role.sql +++ b/db/routines/vn2008/views/awb_role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_role` AS SELECT `ar`.`id` AS `awb_role_id`, diff --git a/db/routines/vn2008/views/awb_unit.sql b/db/routines/vn2008/views/awb_unit.sql index c50cc4c2f..28ad75204 100644 --- a/db/routines/vn2008/views/awb_unit.sql +++ b/db/routines/vn2008/views/awb_unit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_unit` AS SELECT `au`.`id` AS `awb_unit_id`, diff --git a/db/routines/vn2008/views/balance_nest_tree.sql b/db/routines/vn2008/views/balance_nest_tree.sql index c4007db31..e232edba8 100644 --- a/db/routines/vn2008/views/balance_nest_tree.sql +++ b/db/routines/vn2008/views/balance_nest_tree.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`balance_nest_tree` AS SELECT `bnt`.`lft` AS `lft`, diff --git a/db/routines/vn2008/views/barcodes.sql b/db/routines/vn2008/views/barcodes.sql index a48c5577e..8cf8be064 100644 --- a/db/routines/vn2008/views/barcodes.sql +++ b/db/routines/vn2008/views/barcodes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`barcodes` AS SELECT `b`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buySource.sql b/db/routines/vn2008/views/buySource.sql index 54eddfdd0..d6db662a7 100644 --- a/db/routines/vn2008/views/buySource.sql +++ b/db/routines/vn2008/views/buySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buySource` AS SELECT `b`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/buy_edi.sql b/db/routines/vn2008/views/buy_edi.sql index d26cc587e..85e4a6b28 100644 --- a/db/routines/vn2008/views/buy_edi.sql +++ b/db/routines/vn2008/views/buy_edi.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buy_edi_k012.sql b/db/routines/vn2008/views/buy_edi_k012.sql index bde9ad8b3..790e33079 100644 --- a/db/routines/vn2008/views/buy_edi_k012.sql +++ b/db/routines/vn2008/views/buy_edi_k012.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k012` AS SELECT `eek`.`id` AS `buy_edi_k012_id`, diff --git a/db/routines/vn2008/views/buy_edi_k03.sql b/db/routines/vn2008/views/buy_edi_k03.sql index 7f2265986..aef0fb391 100644 --- a/db/routines/vn2008/views/buy_edi_k03.sql +++ b/db/routines/vn2008/views/buy_edi_k03.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k03` AS SELECT `eek`.`id` AS `buy_edi_k03_id`, diff --git a/db/routines/vn2008/views/buy_edi_k04.sql b/db/routines/vn2008/views/buy_edi_k04.sql index 261077e50..e207e4317 100644 --- a/db/routines/vn2008/views/buy_edi_k04.sql +++ b/db/routines/vn2008/views/buy_edi_k04.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k04` AS SELECT `eek`.`id` AS `buy_edi_k04_id`, diff --git a/db/routines/vn2008/views/cdr.sql b/db/routines/vn2008/views/cdr.sql index 2bcd1877a..d13c7dd32 100644 --- a/db/routines/vn2008/views/cdr.sql +++ b/db/routines/vn2008/views/cdr.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cdr` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/vn2008/views/chanel.sql b/db/routines/vn2008/views/chanel.sql index 5d1274f60..0480ca588 100644 --- a/db/routines/vn2008/views/chanel.sql +++ b/db/routines/vn2008/views/chanel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`chanel` AS SELECT `c`.`id` AS `chanel_id`, diff --git a/db/routines/vn2008/views/cl_act.sql b/db/routines/vn2008/views/cl_act.sql index 312f42a46..9678d2fbb 100644 --- a/db/routines/vn2008/views/cl_act.sql +++ b/db/routines/vn2008/views/cl_act.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_act` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_cau.sql b/db/routines/vn2008/views/cl_cau.sql index 26d1d915c..8bb352710 100644 --- a/db/routines/vn2008/views/cl_cau.sql +++ b/db/routines/vn2008/views/cl_cau.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_cau` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_con.sql b/db/routines/vn2008/views/cl_con.sql index 5730f7cb8..c224a01aa 100644 --- a/db/routines/vn2008/views/cl_con.sql +++ b/db/routines/vn2008/views/cl_con.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_con` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_det.sql b/db/routines/vn2008/views/cl_det.sql index 380b40237..80c87c51e 100644 --- a/db/routines/vn2008/views/cl_det.sql +++ b/db/routines/vn2008/views/cl_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_det` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_main.sql b/db/routines/vn2008/views/cl_main.sql index 703b035ae..04d0e10cd 100644 --- a/db/routines/vn2008/views/cl_main.sql +++ b/db/routines/vn2008/views/cl_main.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_main` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_mot.sql b/db/routines/vn2008/views/cl_mot.sql index f10449f70..6dfdb702a 100644 --- a/db/routines/vn2008/views/cl_mot.sql +++ b/db/routines/vn2008/views/cl_mot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_mot` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_res.sql b/db/routines/vn2008/views/cl_res.sql index fb60e0078..31c1da6c1 100644 --- a/db/routines/vn2008/views/cl_res.sql +++ b/db/routines/vn2008/views/cl_res.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_res` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_sol.sql b/db/routines/vn2008/views/cl_sol.sql index 5dfb8543d..3321ce0e4 100644 --- a/db/routines/vn2008/views/cl_sol.sql +++ b/db/routines/vn2008/views/cl_sol.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_sol` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/config_host.sql b/db/routines/vn2008/views/config_host.sql index 905645d80..b9dbaae35 100644 --- a/db/routines/vn2008/views/config_host.sql +++ b/db/routines/vn2008/views/config_host.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`config_host` AS SELECT `vn`.`host`.`code` AS `config_host_id`, diff --git a/db/routines/vn2008/views/consignatarios_observation.sql b/db/routines/vn2008/views/consignatarios_observation.sql index 424550c82..13bbe431a 100644 --- a/db/routines/vn2008/views/consignatarios_observation.sql +++ b/db/routines/vn2008/views/consignatarios_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`consignatarios_observation` AS SELECT `co`.`id` AS `consignatarios_observation_id`, diff --git a/db/routines/vn2008/views/credit.sql b/db/routines/vn2008/views/credit.sql index fc3f049e1..e1f71e267 100644 --- a/db/routines/vn2008/views/credit.sql +++ b/db/routines/vn2008/views/credit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`credit` AS SELECT diff --git a/db/routines/vn2008/views/definitivo.sql b/db/routines/vn2008/views/definitivo.sql index 076a373d2..397b33dbd 100644 --- a/db/routines/vn2008/views/definitivo.sql +++ b/db/routines/vn2008/views/definitivo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`definitivo` AS SELECT `d`.`id` AS `definitivo_id`, diff --git a/db/routines/vn2008/views/edi_article.sql b/db/routines/vn2008/views/edi_article.sql index b5a75acc7..68c7a581a 100644 --- a/db/routines/vn2008/views/edi_article.sql +++ b/db/routines/vn2008/views/edi_article.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_article` AS SELECT `edi`.`item`.`id` AS `id`, diff --git a/db/routines/vn2008/views/edi_bucket.sql b/db/routines/vn2008/views/edi_bucket.sql index 58c524e4a..0d744e6a7 100644 --- a/db/routines/vn2008/views/edi_bucket.sql +++ b/db/routines/vn2008/views/edi_bucket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket` AS SELECT cast( diff --git a/db/routines/vn2008/views/edi_bucket_type.sql b/db/routines/vn2008/views/edi_bucket_type.sql index bc083559a..845124d49 100644 --- a/db/routines/vn2008/views/edi_bucket_type.sql +++ b/db/routines/vn2008/views/edi_bucket_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket_type` AS SELECT `edi`.`bucket_type`.`bucket_type_id` AS `bucket_type_id`, diff --git a/db/routines/vn2008/views/edi_specie.sql b/db/routines/vn2008/views/edi_specie.sql index 32dda6828..c25a5601c 100644 --- a/db/routines/vn2008/views/edi_specie.sql +++ b/db/routines/vn2008/views/edi_specie.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_specie` AS SELECT `edi`.`specie`.`specie_id` AS `specie_id`, diff --git a/db/routines/vn2008/views/edi_supplier.sql b/db/routines/vn2008/views/edi_supplier.sql index c38a0b113..d7dd6c353 100644 --- a/db/routines/vn2008/views/edi_supplier.sql +++ b/db/routines/vn2008/views/edi_supplier.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_supplier` AS SELECT `edi`.`supplier`.`supplier_id` AS `supplier_id`, diff --git a/db/routines/vn2008/views/empresa.sql b/db/routines/vn2008/views/empresa.sql index 9571f3008..6c93cb910 100644 --- a/db/routines/vn2008/views/empresa.sql +++ b/db/routines/vn2008/views/empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/empresa_grupo.sql b/db/routines/vn2008/views/empresa_grupo.sql index 8a90fc446..a626f2c60 100644 --- a/db/routines/vn2008/views/empresa_grupo.sql +++ b/db/routines/vn2008/views/empresa_grupo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa_grupo` AS SELECT `vn`.`companyGroup`.`id` AS `empresa_grupo_id`, diff --git a/db/routines/vn2008/views/entrySource.sql b/db/routines/vn2008/views/entrySource.sql index 7c3efd0d5..f816a263d 100644 --- a/db/routines/vn2008/views/entrySource.sql +++ b/db/routines/vn2008/views/entrySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`entrySource` AS SELECT `e`.`gestDocFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/financialProductType.sql b/db/routines/vn2008/views/financialProductType.sql index 69196038c..10a8ece21 100644 --- a/db/routines/vn2008/views/financialProductType.sql +++ b/db/routines/vn2008/views/financialProductType.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`financialProductType`AS SELECT * FROM vn.financialProductType; \ No newline at end of file diff --git a/db/routines/vn2008/views/flight.sql b/db/routines/vn2008/views/flight.sql index dcfc6f9d5..194cb5a94 100644 --- a/db/routines/vn2008/views/flight.sql +++ b/db/routines/vn2008/views/flight.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`flight` AS SELECT diff --git a/db/routines/vn2008/views/gastos_resumen.sql b/db/routines/vn2008/views/gastos_resumen.sql index 877780408..8db91c1b6 100644 --- a/db/routines/vn2008/views/gastos_resumen.sql +++ b/db/routines/vn2008/views/gastos_resumen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`gastos_resumen` AS SELECT diff --git a/db/routines/vn2008/views/integra2.sql b/db/routines/vn2008/views/integra2.sql index 63bd27afb..cb0847e8a 100644 --- a/db/routines/vn2008/views/integra2.sql +++ b/db/routines/vn2008/views/integra2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2` AS SELECT diff --git a/db/routines/vn2008/views/integra2_province.sql b/db/routines/vn2008/views/integra2_province.sql index 58a8e9bcb..f0a5e13ee 100644 --- a/db/routines/vn2008/views/integra2_province.sql +++ b/db/routines/vn2008/views/integra2_province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2_province` AS SELECT diff --git a/db/routines/vn2008/views/mail.sql b/db/routines/vn2008/views/mail.sql index 9695bdce6..c0d4de602 100644 --- a/db/routines/vn2008/views/mail.sql +++ b/db/routines/vn2008/views/mail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mail` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato.sql b/db/routines/vn2008/views/mandato.sql index 8f7350fa0..a2dbc4be6 100644 --- a/db/routines/vn2008/views/mandato.sql +++ b/db/routines/vn2008/views/mandato.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato_tipo.sql b/db/routines/vn2008/views/mandato_tipo.sql index dd02aa338..72f306ace 100644 --- a/db/routines/vn2008/views/mandato_tipo.sql +++ b/db/routines/vn2008/views/mandato_tipo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato_tipo` AS SELECT `m`.`id` AS `idmandato_tipo`, diff --git a/db/routines/vn2008/views/pago.sql b/db/routines/vn2008/views/pago.sql index 4530c0645..08506afda 100644 --- a/db/routines/vn2008/views/pago.sql +++ b/db/routines/vn2008/views/pago.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago` AS SELECT `p`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pago_sdc.sql b/db/routines/vn2008/views/pago_sdc.sql index 93e16702f..ef75741fb 100644 --- a/db/routines/vn2008/views/pago_sdc.sql +++ b/db/routines/vn2008/views/pago_sdc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago_sdc` AS SELECT `ei`.`id` AS `pago_sdc_id`, diff --git a/db/routines/vn2008/views/pay_dem.sql b/db/routines/vn2008/views/pay_dem.sql index cb3bc656c..55468d6e3 100644 --- a/db/routines/vn2008/views/pay_dem.sql +++ b/db/routines/vn2008/views/pay_dem.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem` AS SELECT `pd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_dem_det.sql b/db/routines/vn2008/views/pay_dem_det.sql index 51f811d29..b9b4485d9 100644 --- a/db/routines/vn2008/views/pay_dem_det.sql +++ b/db/routines/vn2008/views/pay_dem_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem_det` AS SELECT `pdd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_met.sql b/db/routines/vn2008/views/pay_met.sql index 4f2f1ef1a..c64d01ce4 100644 --- a/db/routines/vn2008/views/pay_met.sql +++ b/db/routines/vn2008/views/pay_met.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_met` AS SELECT `pm`.`id` AS `id`, diff --git a/db/routines/vn2008/views/payrollWorker.sql b/db/routines/vn2008/views/payrollWorker.sql index e77748df3..7557d61ec 100644 --- a/db/routines/vn2008/views/payrollWorker.sql +++ b/db/routines/vn2008/views/payrollWorker.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_employee` AS SELECT diff --git a/db/routines/vn2008/views/payroll_categorias.sql b/db/routines/vn2008/views/payroll_categorias.sql index cc04eeb50..b1eb5f596 100644 --- a/db/routines/vn2008/views/payroll_categorias.sql +++ b/db/routines/vn2008/views/payroll_categorias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_categorias` AS SELECT `pc`.`id` AS `codcategoria`, diff --git a/db/routines/vn2008/views/payroll_centros.sql b/db/routines/vn2008/views/payroll_centros.sql index 70d46bd30..216023467 100644 --- a/db/routines/vn2008/views/payroll_centros.sql +++ b/db/routines/vn2008/views/payroll_centros.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_centros` AS SELECT `pwc`.`workCenterFkA3` AS `cod_centro`, diff --git a/db/routines/vn2008/views/payroll_conceptos.sql b/db/routines/vn2008/views/payroll_conceptos.sql index cc3d0612c..e96ca1d29 100644 --- a/db/routines/vn2008/views/payroll_conceptos.sql +++ b/db/routines/vn2008/views/payroll_conceptos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_conceptos` AS SELECT `pc`.`id` AS `conceptoid`, diff --git a/db/routines/vn2008/views/plantpassport.sql b/db/routines/vn2008/views/plantpassport.sql index 12cfff7a5..c983fab0a 100644 --- a/db/routines/vn2008/views/plantpassport.sql +++ b/db/routines/vn2008/views/plantpassport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport` AS SELECT `pp`.`producerFk` AS `producer_id`, diff --git a/db/routines/vn2008/views/plantpassport_authority.sql b/db/routines/vn2008/views/plantpassport_authority.sql index 31a5c73cb..b8566a8f3 100644 --- a/db/routines/vn2008/views/plantpassport_authority.sql +++ b/db/routines/vn2008/views/plantpassport_authority.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport_authority` AS SELECT `ppa`.`id` AS `plantpassport_authority_id`, diff --git a/db/routines/vn2008/views/price_fixed.sql b/db/routines/vn2008/views/price_fixed.sql index cfb56e500..306e9d887 100644 --- a/db/routines/vn2008/views/price_fixed.sql +++ b/db/routines/vn2008/views/price_fixed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`price_fixed` AS SELECT `pf`.`itemFk` AS `item_id`, diff --git a/db/routines/vn2008/views/producer.sql b/db/routines/vn2008/views/producer.sql index ae28bc9fa..dbf7833ca 100644 --- a/db/routines/vn2008/views/producer.sql +++ b/db/routines/vn2008/views/producer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`producer` AS SELECT `p`.`id` AS `producer_id`, diff --git a/db/routines/vn2008/views/promissoryNote.sql b/db/routines/vn2008/views/promissoryNote.sql index ffcda2893..e8d3b8718 100644 --- a/db/routines/vn2008/views/promissoryNote.sql +++ b/db/routines/vn2008/views/promissoryNote.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Pagares` AS SELECT `p`.`id` AS `Id_Pagare`, diff --git a/db/routines/vn2008/views/proveedores_clientes.sql b/db/routines/vn2008/views/proveedores_clientes.sql index 925f8e6cf..1e5c75f54 100644 --- a/db/routines/vn2008/views/proveedores_clientes.sql +++ b/db/routines/vn2008/views/proveedores_clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`proveedores_clientes` AS SELECT `Proveedores`.`Id_Proveedor` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/province.sql b/db/routines/vn2008/views/province.sql index 3f591a927..1a08497bc 100644 --- a/db/routines/vn2008/views/province.sql +++ b/db/routines/vn2008/views/province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`province` AS SELECT `p`.`id` AS `province_id`, diff --git a/db/routines/vn2008/views/recibida.sql b/db/routines/vn2008/views/recibida.sql index 5c415414a..ae48debb6 100644 --- a/db/routines/vn2008/views/recibida.sql +++ b/db/routines/vn2008/views/recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_intrastat.sql b/db/routines/vn2008/views/recibida_intrastat.sql index 96d1b8832..fd472c55a 100644 --- a/db/routines/vn2008/views/recibida_intrastat.sql +++ b/db/routines/vn2008/views/recibida_intrastat.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_intrastat` AS SELECT `i`.`invoiceInFk` AS `recibida_id`, diff --git a/db/routines/vn2008/views/recibida_iva.sql b/db/routines/vn2008/views/recibida_iva.sql index 7f6c55e43..96f5c1736 100644 --- a/db/routines/vn2008/views/recibida_iva.sql +++ b/db/routines/vn2008/views/recibida_iva.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_iva` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_vencimiento.sql b/db/routines/vn2008/views/recibida_vencimiento.sql index d41686c98..d06230e37 100644 --- a/db/routines/vn2008/views/recibida_vencimiento.sql +++ b/db/routines/vn2008/views/recibida_vencimiento.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_vencimiento` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recovery.sql b/db/routines/vn2008/views/recovery.sql index 781597506..905ffc347 100644 --- a/db/routines/vn2008/views/recovery.sql +++ b/db/routines/vn2008/views/recovery.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recovery` AS SELECT `r`.`id` AS `recovery_id`, diff --git a/db/routines/vn2008/views/reference_rate.sql b/db/routines/vn2008/views/reference_rate.sql index 44f0887e2..e0d09db58 100644 --- a/db/routines/vn2008/views/reference_rate.sql +++ b/db/routines/vn2008/views/reference_rate.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reference_rate` AS SELECT `rr`.`currencyFk` AS `moneda_id`, diff --git a/db/routines/vn2008/views/reinos.sql b/db/routines/vn2008/views/reinos.sql index e34683492..3b1299bb0 100644 --- a/db/routines/vn2008/views/reinos.sql +++ b/db/routines/vn2008/views/reinos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reinos` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/state.sql b/db/routines/vn2008/views/state.sql index ad0681e54..7731eb3cc 100644 --- a/db/routines/vn2008/views/state.sql +++ b/db/routines/vn2008/views/state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`state` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tag.sql b/db/routines/vn2008/views/tag.sql index 1d088446b..9a1c5c675 100644 --- a/db/routines/vn2008/views/tag.sql +++ b/db/routines/vn2008/views/tag.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tag` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tarifa_componentes.sql b/db/routines/vn2008/views/tarifa_componentes.sql index c4baace56..72f15bfee 100644 --- a/db/routines/vn2008/views/tarifa_componentes.sql +++ b/db/routines/vn2008/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes` AS SELECT `tarifa_componentes`.`Id_Componente` AS `Id_Componente`, diff --git a/db/routines/vn2008/views/tarifa_componentes_series.sql b/db/routines/vn2008/views/tarifa_componentes_series.sql index 283171dc8..ecf425b19 100644 --- a/db/routines/vn2008/views/tarifa_componentes_series.sql +++ b/db/routines/vn2008/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes_series` AS SELECT `tarifa_componentes_series`.`tarifa_componentes_series_id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/vn2008/views/tblContadores.sql b/db/routines/vn2008/views/tblContadores.sql index 0f01981f9..360171a8b 100644 --- a/db/routines/vn2008/views/tblContadores.sql +++ b/db/routines/vn2008/views/tblContadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tblContadores` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/thermograph.sql b/db/routines/vn2008/views/thermograph.sql index 8ddabe25f..209d89e91 100644 --- a/db/routines/vn2008/views/thermograph.sql +++ b/db/routines/vn2008/views/thermograph.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`thermograph` AS SELECT `t`.`id` AS `thermograph_id`, diff --git a/db/routines/vn2008/views/ticket_observation.sql b/db/routines/vn2008/views/ticket_observation.sql index bbc0a54b9..d2aa4733b 100644 --- a/db/routines/vn2008/views/ticket_observation.sql +++ b/db/routines/vn2008/views/ticket_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`ticket_observation` AS SELECT `to`.`id` AS `ticket_observation_id`, diff --git a/db/routines/vn2008/views/tickets_gestdoc.sql b/db/routines/vn2008/views/tickets_gestdoc.sql index c130e0420..707ca8ad8 100644 --- a/db/routines/vn2008/views/tickets_gestdoc.sql +++ b/db/routines/vn2008/views/tickets_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tickets_gestdoc` AS SELECT `td`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/time.sql b/db/routines/vn2008/views/time.sql index fc66b19ff..72104e570 100644 --- a/db/routines/vn2008/views/time.sql +++ b/db/routines/vn2008/views/time.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`time` AS SELECT `t`.`dated` AS `date`, diff --git a/db/routines/vn2008/views/travel.sql b/db/routines/vn2008/views/travel.sql index b5e88fdf0..cebde6aae 100644 --- a/db/routines/vn2008/views/travel.sql +++ b/db/routines/vn2008/views/travel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`travel` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/v_Articles_botanical.sql b/db/routines/vn2008/views/v_Articles_botanical.sql index fd0b05f01..18db5bf2e 100644 --- a/db/routines/vn2008/views/v_Articles_botanical.sql +++ b/db/routines/vn2008/views/v_Articles_botanical.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_Articles_botanical` AS SELECT `ib`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn2008/views/v_compres.sql b/db/routines/vn2008/views/v_compres.sql index 5836bf632..34b789cf8 100644 --- a/db/routines/vn2008/views/v_compres.sql +++ b/db/routines/vn2008/views/v_compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_compres` AS SELECT `TP`.`Id_Tipo` AS `Familia`, diff --git a/db/routines/vn2008/views/v_empresa.sql b/db/routines/vn2008/views/v_empresa.sql index 18a4c8153..16c9646c2 100644 --- a/db/routines/vn2008/views/v_empresa.sql +++ b/db/routines/vn2008/views/v_empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_empresa` AS SELECT `e`.`logo` AS `logo`, diff --git a/db/routines/vn2008/views/versiones.sql b/db/routines/vn2008/views/versiones.sql index 5cb9207e1..3066327c9 100644 --- a/db/routines/vn2008/views/versiones.sql +++ b/db/routines/vn2008/views/versiones.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`versiones` AS SELECT `m`.`app` AS `programa`, diff --git a/db/routines/vn2008/views/warehouse_pickup.sql b/db/routines/vn2008/views/warehouse_pickup.sql index b8a625228..739d6d975 100644 --- a/db/routines/vn2008/views/warehouse_pickup.sql +++ b/db/routines/vn2008/views/warehouse_pickup.sql @@ -1,5 +1,5 @@ -CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` +CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`warehouse_pickup` AS SELECT diff --git a/db/versions/11163-maroonEucalyptus/00-firstScript.sql b/db/versions/11163-maroonEucalyptus/00-firstScript.sql index dda7845dc..88e5fc022 100644 --- a/db/versions/11163-maroonEucalyptus/00-firstScript.sql +++ b/db/versions/11163-maroonEucalyptus/00-firstScript.sql @@ -1,2 +1,2 @@ -CREATE USER 'vn-admin'@'localhost'; -GRANT ALL PRIVILEGES ON *.* TO 'vn-admin'@'localhost' WITH GRANT OPTION;; +CREATE USER 'vn'@'localhost'; +GRANT ALL PRIVILEGES ON *.* TO 'vn'@'localhost' WITH GRANT OPTION;; From 6acd3e0b1d4f2481aa01d9458514d89533e46dfb Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 10:10:46 +0200 Subject: [PATCH 123/250] feat: refs #7759 Changed defined only of vn objects --- db/routines/account/functions/myUser_checkLogin.sql | 2 +- db/routines/account/functions/myUser_getId.sql | 2 +- db/routines/account/functions/myUser_getName.sql | 2 +- db/routines/account/functions/myUser_hasPriv.sql | 2 +- db/routines/account/functions/myUser_hasRole.sql | 2 +- db/routines/account/functions/myUser_hasRoleId.sql | 2 +- db/routines/account/functions/myUser_hasRoutinePriv.sql | 2 +- db/routines/account/functions/passwordGenerate.sql | 2 +- db/routines/account/functions/toUnixDays.sql | 2 +- db/routines/account/functions/user_getMysqlRole.sql | 2 +- db/routines/account/functions/user_getNameFromId.sql | 2 +- db/routines/account/functions/user_hasPriv.sql | 2 +- db/routines/account/functions/user_hasRole.sql | 2 +- db/routines/account/functions/user_hasRoleId.sql | 2 +- db/routines/account/functions/user_hasRoutinePriv.sql | 2 +- db/routines/account/procedures/account_enable.sql | 2 +- db/routines/account/procedures/myUser_login.sql | 2 +- db/routines/account/procedures/myUser_loginWithKey.sql | 2 +- db/routines/account/procedures/myUser_loginWithName.sql | 2 +- db/routines/account/procedures/myUser_logout.sql | 2 +- db/routines/account/procedures/role_checkName.sql | 2 +- db/routines/account/procedures/role_getDescendents.sql | 2 +- db/routines/account/procedures/role_sync.sql | 2 +- db/routines/account/procedures/role_syncPrivileges.sql | 2 +- db/routines/account/procedures/user_checkName.sql | 2 +- db/routines/account/procedures/user_checkPassword.sql | 2 +- db/routines/account/triggers/account_afterDelete.sql | 2 +- db/routines/account/triggers/account_afterInsert.sql | 2 +- db/routines/account/triggers/account_beforeInsert.sql | 2 +- db/routines/account/triggers/account_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailAliasAccount_afterDelete.sql | 2 +- db/routines/account/triggers/mailAliasAccount_beforeInsert.sql | 2 +- db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailAlias_afterDelete.sql | 2 +- db/routines/account/triggers/mailAlias_beforeInsert.sql | 2 +- db/routines/account/triggers/mailAlias_beforeUpdate.sql | 2 +- db/routines/account/triggers/mailForward_afterDelete.sql | 2 +- db/routines/account/triggers/mailForward_beforeInsert.sql | 2 +- db/routines/account/triggers/mailForward_beforeUpdate.sql | 2 +- db/routines/account/triggers/roleInherit_afterDelete.sql | 2 +- db/routines/account/triggers/roleInherit_beforeInsert.sql | 2 +- db/routines/account/triggers/roleInherit_beforeUpdate.sql | 2 +- db/routines/account/triggers/role_afterDelete.sql | 2 +- db/routines/account/triggers/role_beforeInsert.sql | 2 +- db/routines/account/triggers/role_beforeUpdate.sql | 2 +- db/routines/account/triggers/user_afterDelete.sql | 2 +- db/routines/account/triggers/user_afterInsert.sql | 2 +- db/routines/account/triggers/user_afterUpdate.sql | 2 +- db/routines/account/triggers/user_beforeInsert.sql | 2 +- db/routines/account/triggers/user_beforeUpdate.sql | 2 +- db/routines/account/views/accountDovecot.sql | 2 +- db/routines/account/views/emailUser.sql | 2 +- db/routines/account/views/myRole.sql | 2 +- db/routines/account/views/myUser.sql | 2 +- db/routines/bi/procedures/Greuge_Evolution_Add.sql | 2 +- db/routines/bi/procedures/analisis_ventas_evolution_add.sql | 2 +- db/routines/bi/procedures/analisis_ventas_simple.sql | 2 +- db/routines/bi/procedures/analisis_ventas_update.sql | 2 +- db/routines/bi/procedures/clean.sql | 2 +- db/routines/bi/procedures/defaultersFromDate.sql | 2 +- db/routines/bi/procedures/defaulting.sql | 2 +- db/routines/bi/procedures/defaulting_launcher.sql | 2 +- db/routines/bi/procedures/facturacion_media_anual_update.sql | 2 +- db/routines/bi/procedures/greuge_dif_porte_add.sql | 2 +- db/routines/bi/procedures/nigthlyAnalisisVentas.sql | 2 +- db/routines/bi/procedures/rutasAnalyze.sql | 2 +- db/routines/bi/procedures/rutasAnalyze_launcher.sql | 2 +- db/routines/bi/views/analisis_grafico_ventas.sql | 2 +- db/routines/bi/views/analisis_ventas_simple.sql | 2 +- db/routines/bi/views/claims_ratio.sql | 2 +- db/routines/bi/views/customerRiskOverdue.sql | 2 +- db/routines/bi/views/defaulters.sql | 2 +- db/routines/bi/views/facturacion_media_anual.sql | 2 +- db/routines/bi/views/rotacion.sql | 2 +- db/routines/bi/views/tarifa_componentes.sql | 2 +- db/routines/bi/views/tarifa_componentes_series.sql | 2 +- db/routines/bs/events/clientDied_recalc.sql | 2 +- db/routines/bs/events/inventoryDiscrepancy_launch.sql | 2 +- db/routines/bs/events/nightTask_launchAll.sql | 2 +- db/routines/bs/functions/tramo.sql | 2 +- db/routines/bs/procedures/campaignComparative.sql | 2 +- db/routines/bs/procedures/carteras_add.sql | 2 +- db/routines/bs/procedures/clean.sql | 2 +- db/routines/bs/procedures/clientDied_recalc.sql | 2 +- db/routines/bs/procedures/clientNewBorn_recalc.sql | 2 +- db/routines/bs/procedures/compradores_evolution_add.sql | 2 +- db/routines/bs/procedures/fondo_evolution_add.sql | 2 +- db/routines/bs/procedures/fruitsEvolution.sql | 2 +- db/routines/bs/procedures/indicatorsUpdate.sql | 2 +- db/routines/bs/procedures/indicatorsUpdateLauncher.sql | 2 +- .../bs/procedures/inventoryDiscrepancyDetail_replace.sql | 2 +- db/routines/bs/procedures/m3Add.sql | 2 +- db/routines/bs/procedures/manaCustomerUpdate.sql | 2 +- db/routines/bs/procedures/manaSpellers_actualize.sql | 2 +- db/routines/bs/procedures/nightTask_launchAll.sql | 2 +- db/routines/bs/procedures/nightTask_launchTask.sql | 2 +- db/routines/bs/procedures/payMethodClientAdd.sql | 2 +- db/routines/bs/procedures/saleGraphic.sql | 2 +- db/routines/bs/procedures/salePersonEvolutionAdd.sql | 2 +- db/routines/bs/procedures/sale_add.sql | 2 +- db/routines/bs/procedures/salesByItemTypeDay_add.sql | 2 +- db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql | 2 +- db/routines/bs/procedures/salesByclientSalesPerson_add.sql | 2 +- db/routines/bs/procedures/salesPersonEvolution_add.sql | 2 +- db/routines/bs/procedures/sales_addLauncher.sql | 2 +- db/routines/bs/procedures/vendedores_add_launcher.sql | 2 +- db/routines/bs/procedures/ventas_contables_add.sql | 2 +- db/routines/bs/procedures/ventas_contables_add_launcher.sql | 2 +- db/routines/bs/procedures/waste_addSales.sql | 2 +- db/routines/bs/procedures/workerLabour_getData.sql | 2 +- db/routines/bs/procedures/workerProductivity_add.sql | 2 +- db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql | 2 +- db/routines/bs/triggers/nightTask_beforeInsert.sql | 2 +- db/routines/bs/triggers/nightTask_beforeUpdate.sql | 2 +- db/routines/bs/views/lastIndicators.sql | 2 +- db/routines/bs/views/packingSpeed.sql | 2 +- db/routines/bs/views/ventas.sql | 2 +- db/routines/cache/events/cacheCalc_clean.sql | 2 +- db/routines/cache/events/cache_clean.sql | 2 +- db/routines/cache/procedures/addressFriendship_Update.sql | 2 +- db/routines/cache/procedures/availableNoRaids_refresh.sql | 2 +- db/routines/cache/procedures/available_clean.sql | 2 +- db/routines/cache/procedures/available_refresh.sql | 2 +- db/routines/cache/procedures/cacheCalc_clean.sql | 2 +- db/routines/cache/procedures/cache_calc_end.sql | 2 +- db/routines/cache/procedures/cache_calc_start.sql | 2 +- db/routines/cache/procedures/cache_calc_unlock.sql | 2 +- db/routines/cache/procedures/cache_clean.sql | 2 +- db/routines/cache/procedures/clean.sql | 2 +- db/routines/cache/procedures/departure_timing.sql | 2 +- db/routines/cache/procedures/last_buy_refresh.sql | 2 +- db/routines/cache/procedures/stock_refresh.sql | 2 +- db/routines/cache/procedures/visible_clean.sql | 2 +- db/routines/cache/procedures/visible_refresh.sql | 2 +- db/routines/dipole/procedures/clean.sql | 2 +- db/routines/dipole/procedures/expedition_add.sql | 2 +- db/routines/dipole/views/expeditionControl.sql | 2 +- db/routines/edi/events/floramondo.sql | 2 +- db/routines/edi/functions/imageName.sql | 2 +- db/routines/edi/procedures/clean.sql | 2 +- db/routines/edi/procedures/deliveryInformation_Delete.sql | 2 +- db/routines/edi/procedures/ekt_add.sql | 2 +- db/routines/edi/procedures/ekt_load.sql | 2 +- db/routines/edi/procedures/ekt_loadNotBuy.sql | 2 +- db/routines/edi/procedures/ekt_refresh.sql | 2 +- db/routines/edi/procedures/ekt_scan.sql | 2 +- db/routines/edi/procedures/floramondo_offerRefresh.sql | 2 +- db/routines/edi/procedures/item_freeAdd.sql | 2 +- db/routines/edi/procedures/item_getNewByEkt.sql | 2 +- db/routines/edi/procedures/mail_new.sql | 2 +- db/routines/edi/triggers/item_feature_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_afterUpdate.sql | 2 +- db/routines/edi/triggers/putOrder_beforeInsert.sql | 2 +- db/routines/edi/triggers/putOrder_beforeUpdate.sql | 2 +- db/routines/edi/triggers/supplyResponse_afterUpdate.sql | 2 +- db/routines/edi/views/ektK2.sql | 2 +- db/routines/edi/views/ektRecent.sql | 2 +- db/routines/edi/views/errorList.sql | 2 +- db/routines/edi/views/supplyOffer.sql | 2 +- db/routines/floranet/procedures/catalogue_findById.sql | 2 +- db/routines/floranet/procedures/catalogue_get.sql | 2 +- db/routines/floranet/procedures/contact_request.sql | 2 +- db/routines/floranet/procedures/deliveryDate_get.sql | 2 +- db/routines/floranet/procedures/order_confirm.sql | 2 +- db/routines/floranet/procedures/order_put.sql | 2 +- db/routines/floranet/procedures/sliders_get.sql | 2 +- db/routines/hedera/functions/myClient_getDebt.sql | 2 +- db/routines/hedera/functions/myUser_checkRestPriv.sql | 2 +- db/routines/hedera/functions/order_getTotal.sql | 2 +- db/routines/hedera/procedures/catalog_calcFromMyAddress.sql | 2 +- db/routines/hedera/procedures/image_ref.sql | 2 +- db/routines/hedera/procedures/image_unref.sql | 2 +- db/routines/hedera/procedures/item_calcCatalog.sql | 2 +- db/routines/hedera/procedures/item_getVisible.sql | 2 +- db/routines/hedera/procedures/item_listAllocation.sql | 2 +- db/routines/hedera/procedures/myOrder_addItem.sql | 2 +- db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql | 2 +- db/routines/hedera/procedures/myOrder_calcCatalogFull.sql | 2 +- db/routines/hedera/procedures/myOrder_checkConfig.sql | 2 +- db/routines/hedera/procedures/myOrder_checkMine.sql | 2 +- db/routines/hedera/procedures/myOrder_configure.sql | 2 +- db/routines/hedera/procedures/myOrder_configureForGuest.sql | 2 +- db/routines/hedera/procedures/myOrder_confirm.sql | 2 +- db/routines/hedera/procedures/myOrder_create.sql | 2 +- db/routines/hedera/procedures/myOrder_getAvailable.sql | 2 +- db/routines/hedera/procedures/myOrder_getTax.sql | 2 +- db/routines/hedera/procedures/myOrder_newWithAddress.sql | 2 +- db/routines/hedera/procedures/myOrder_newWithDate.sql | 2 +- db/routines/hedera/procedures/myTicket_get.sql | 2 +- db/routines/hedera/procedures/myTicket_getPackages.sql | 2 +- db/routines/hedera/procedures/myTicket_getRows.sql | 2 +- db/routines/hedera/procedures/myTicket_getServices.sql | 2 +- db/routines/hedera/procedures/myTicket_list.sql | 2 +- db/routines/hedera/procedures/myTicket_logAccess.sql | 2 +- db/routines/hedera/procedures/myTpvTransaction_end.sql | 2 +- db/routines/hedera/procedures/myTpvTransaction_start.sql | 2 +- db/routines/hedera/procedures/order_addItem.sql | 2 +- db/routines/hedera/procedures/order_calcCatalog.sql | 2 +- db/routines/hedera/procedures/order_calcCatalogFromItem.sql | 2 +- db/routines/hedera/procedures/order_calcCatalogFull.sql | 2 +- db/routines/hedera/procedures/order_checkConfig.sql | 2 +- db/routines/hedera/procedures/order_checkEditable.sql | 2 +- db/routines/hedera/procedures/order_configure.sql | 2 +- db/routines/hedera/procedures/order_confirm.sql | 2 +- db/routines/hedera/procedures/order_confirmWithUser.sql | 2 +- db/routines/hedera/procedures/order_getAvailable.sql | 2 +- db/routines/hedera/procedures/order_getTax.sql | 2 +- db/routines/hedera/procedures/order_getTotal.sql | 2 +- db/routines/hedera/procedures/order_recalc.sql | 2 +- db/routines/hedera/procedures/order_update.sql | 2 +- db/routines/hedera/procedures/survey_vote.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirm.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirmAll.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_confirmById.sql | 2 +- .../hedera/procedures/tpvTransaction_confirmFromExport.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_end.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_start.sql | 2 +- db/routines/hedera/procedures/tpvTransaction_undo.sql | 2 +- db/routines/hedera/procedures/visitUser_new.sql | 2 +- db/routines/hedera/procedures/visit_listByBrowser.sql | 2 +- db/routines/hedera/procedures/visit_register.sql | 2 +- db/routines/hedera/triggers/link_afterDelete.sql | 2 +- db/routines/hedera/triggers/link_afterInsert.sql | 2 +- db/routines/hedera/triggers/link_afterUpdate.sql | 2 +- db/routines/hedera/triggers/news_afterDelete.sql | 2 +- db/routines/hedera/triggers/news_afterInsert.sql | 2 +- db/routines/hedera/triggers/news_afterUpdate.sql | 2 +- db/routines/hedera/triggers/orderRow_beforeInsert.sql | 2 +- db/routines/hedera/triggers/order_afterInsert.sql | 2 +- db/routines/hedera/triggers/order_afterUpdate.sql | 2 +- db/routines/hedera/triggers/order_beforeDelete.sql | 2 +- db/routines/hedera/views/mainAccountBank.sql | 2 +- db/routines/hedera/views/messageL10n.sql | 2 +- db/routines/hedera/views/myAddress.sql | 2 +- db/routines/hedera/views/myBasketDefaults.sql | 2 +- db/routines/hedera/views/myClient.sql | 2 +- db/routines/hedera/views/myInvoice.sql | 2 +- db/routines/hedera/views/myMenu.sql | 2 +- db/routines/hedera/views/myOrder.sql | 2 +- db/routines/hedera/views/myOrderRow.sql | 2 +- db/routines/hedera/views/myOrderTicket.sql | 2 +- db/routines/hedera/views/myTicket.sql | 2 +- db/routines/hedera/views/myTicketRow.sql | 2 +- db/routines/hedera/views/myTicketService.sql | 2 +- db/routines/hedera/views/myTicketState.sql | 2 +- db/routines/hedera/views/myTpvTransaction.sql | 2 +- db/routines/hedera/views/orderTicket.sql | 2 +- db/routines/hedera/views/order_component.sql | 2 +- db/routines/hedera/views/order_row.sql | 2 +- db/routines/pbx/functions/clientFromPhone.sql | 2 +- db/routines/pbx/functions/phone_format.sql | 2 +- db/routines/pbx/procedures/phone_isValid.sql | 2 +- db/routines/pbx/procedures/queue_isValid.sql | 2 +- db/routines/pbx/procedures/sip_getExtension.sql | 2 +- db/routines/pbx/procedures/sip_isValid.sql | 2 +- db/routines/pbx/procedures/sip_setPassword.sql | 2 +- db/routines/pbx/triggers/blacklist_beforeInsert.sql | 2 +- db/routines/pbx/triggers/blacklist_berforeUpdate.sql | 2 +- db/routines/pbx/triggers/followme_beforeInsert.sql | 2 +- db/routines/pbx/triggers/followme_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/queuePhone_beforeInsert.sql | 2 +- db/routines/pbx/triggers/queuePhone_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/queue_beforeInsert.sql | 2 +- db/routines/pbx/triggers/queue_beforeUpdate.sql | 2 +- db/routines/pbx/triggers/sip_afterInsert.sql | 2 +- db/routines/pbx/triggers/sip_afterUpdate.sql | 2 +- db/routines/pbx/triggers/sip_beforeInsert.sql | 2 +- db/routines/pbx/triggers/sip_beforeUpdate.sql | 2 +- db/routines/pbx/views/cdrConf.sql | 2 +- db/routines/pbx/views/followmeConf.sql | 2 +- db/routines/pbx/views/followmeNumberConf.sql | 2 +- db/routines/pbx/views/queueConf.sql | 2 +- db/routines/pbx/views/queueMemberConf.sql | 2 +- db/routines/pbx/views/sipConf.sql | 2 +- db/routines/psico/procedures/answerSort.sql | 2 +- db/routines/psico/procedures/examNew.sql | 2 +- db/routines/psico/procedures/getExamQuestions.sql | 2 +- db/routines/psico/procedures/getExamType.sql | 2 +- db/routines/psico/procedures/questionSort.sql | 2 +- db/routines/psico/views/examView.sql | 2 +- db/routines/psico/views/results.sql | 2 +- db/routines/sage/functions/company_getCode.sql | 2 +- db/routines/sage/procedures/accountingMovements_add.sql | 2 +- db/routines/sage/procedures/clean.sql | 2 +- db/routines/sage/procedures/clientSupplier_add.sql | 2 +- db/routines/sage/procedures/importErrorNotification.sql | 2 +- db/routines/sage/procedures/invoiceIn_add.sql | 2 +- db/routines/sage/procedures/invoiceIn_manager.sql | 2 +- db/routines/sage/procedures/invoiceOut_add.sql | 2 +- db/routines/sage/procedures/invoiceOut_manager.sql | 2 +- db/routines/sage/procedures/pgc_add.sql | 2 +- db/routines/sage/triggers/movConta_beforeUpdate.sql | 2 +- db/routines/sage/views/clientLastTwoMonths.sql | 2 +- db/routines/sage/views/supplierLastThreeMonths.sql | 2 +- db/routines/salix/events/accessToken_prune.sql | 2 +- db/routines/salix/procedures/accessToken_prune.sql | 2 +- db/routines/salix/views/Account.sql | 2 +- db/routines/salix/views/Role.sql | 2 +- db/routines/salix/views/RoleMapping.sql | 2 +- db/routines/salix/views/User.sql | 2 +- db/routines/srt/events/moving_clean.sql | 2 +- db/routines/srt/functions/bid.sql | 2 +- db/routines/srt/functions/bufferPool_get.sql | 2 +- db/routines/srt/functions/buffer_get.sql | 2 +- db/routines/srt/functions/buffer_getRandom.sql | 2 +- db/routines/srt/functions/buffer_getState.sql | 2 +- db/routines/srt/functions/buffer_getType.sql | 2 +- db/routines/srt/functions/buffer_isFull.sql | 2 +- db/routines/srt/functions/dayMinute.sql | 2 +- db/routines/srt/functions/expedition_check.sql | 2 +- db/routines/srt/functions/expedition_getDayMinute.sql | 2 +- db/routines/srt/procedures/buffer_getExpCount.sql | 2 +- db/routines/srt/procedures/buffer_getStateType.sql | 2 +- db/routines/srt/procedures/buffer_giveBack.sql | 2 +- db/routines/srt/procedures/buffer_readPhotocell.sql | 2 +- db/routines/srt/procedures/buffer_setEmpty.sql | 2 +- db/routines/srt/procedures/buffer_setState.sql | 2 +- db/routines/srt/procedures/buffer_setStateType.sql | 2 +- db/routines/srt/procedures/buffer_setType.sql | 2 +- db/routines/srt/procedures/buffer_setTypeByName.sql | 2 +- db/routines/srt/procedures/clean.sql | 2 +- db/routines/srt/procedures/expeditionLoading_add.sql | 2 +- db/routines/srt/procedures/expedition_arrived.sql | 2 +- db/routines/srt/procedures/expedition_bufferOut.sql | 2 +- db/routines/srt/procedures/expedition_entering.sql | 2 +- db/routines/srt/procedures/expedition_get.sql | 2 +- db/routines/srt/procedures/expedition_groupOut.sql | 2 +- db/routines/srt/procedures/expedition_in.sql | 2 +- db/routines/srt/procedures/expedition_moving.sql | 2 +- db/routines/srt/procedures/expedition_out.sql | 2 +- db/routines/srt/procedures/expedition_outAll.sql | 2 +- db/routines/srt/procedures/expedition_relocate.sql | 2 +- db/routines/srt/procedures/expedition_reset.sql | 2 +- db/routines/srt/procedures/expedition_routeOut.sql | 2 +- db/routines/srt/procedures/expedition_scan.sql | 2 +- db/routines/srt/procedures/expedition_setDimensions.sql | 2 +- db/routines/srt/procedures/expedition_weighing.sql | 2 +- db/routines/srt/procedures/failureLog_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add.sql | 2 +- db/routines/srt/procedures/lastRFID_add_beta.sql | 2 +- db/routines/srt/procedures/moving_CollidingSet.sql | 2 +- db/routines/srt/procedures/moving_between.sql | 2 +- db/routines/srt/procedures/moving_clean.sql | 2 +- db/routines/srt/procedures/moving_delete.sql | 2 +- db/routines/srt/procedures/moving_groupOut.sql | 2 +- db/routines/srt/procedures/moving_next.sql | 2 +- db/routines/srt/procedures/photocell_setActive.sql | 2 +- db/routines/srt/procedures/randomMoving.sql | 2 +- db/routines/srt/procedures/randomMoving_Launch.sql | 2 +- db/routines/srt/procedures/restart.sql | 2 +- db/routines/srt/procedures/start.sql | 2 +- db/routines/srt/procedures/stop.sql | 2 +- db/routines/srt/procedures/test.sql | 2 +- db/routines/srt/triggers/expedition_beforeUpdate.sql | 2 +- db/routines/srt/triggers/moving_afterInsert.sql | 2 +- db/routines/srt/views/bufferDayMinute.sql | 2 +- db/routines/srt/views/bufferFreeLength.sql | 2 +- db/routines/srt/views/bufferStock.sql | 2 +- db/routines/srt/views/routePalletized.sql | 2 +- db/routines/srt/views/ticketPalletized.sql | 2 +- db/routines/srt/views/upperStickers.sql | 2 +- db/routines/stock/events/log_clean.sql | 2 +- db/routines/stock/events/log_syncNoWait.sql | 2 +- db/routines/stock/procedures/inbound_addPick.sql | 2 +- db/routines/stock/procedures/inbound_removePick.sql | 2 +- db/routines/stock/procedures/inbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/inbound_sync.sql | 2 +- db/routines/stock/procedures/log_clean.sql | 2 +- db/routines/stock/procedures/log_delete.sql | 2 +- db/routines/stock/procedures/log_refreshAll.sql | 2 +- db/routines/stock/procedures/log_refreshBuy.sql | 2 +- db/routines/stock/procedures/log_refreshOrder.sql | 2 +- db/routines/stock/procedures/log_refreshSale.sql | 2 +- db/routines/stock/procedures/log_sync.sql | 2 +- db/routines/stock/procedures/log_syncNoWait.sql | 2 +- db/routines/stock/procedures/outbound_requestQuantity.sql | 2 +- db/routines/stock/procedures/outbound_sync.sql | 2 +- db/routines/stock/procedures/visible_log.sql | 2 +- db/routines/stock/triggers/inbound_afterDelete.sql | 2 +- db/routines/stock/triggers/inbound_beforeInsert.sql | 2 +- db/routines/stock/triggers/outbound_afterDelete.sql | 2 +- db/routines/stock/triggers/outbound_beforeInsert.sql | 2 +- db/routines/tmp/events/clean.sql | 2 +- db/routines/tmp/procedures/clean.sql | 2 +- db/routines/util/events/slowLog_prune.sql | 2 +- db/routines/util/functions/VN_CURDATE.sql | 2 +- db/routines/util/functions/VN_CURTIME.sql | 2 +- db/routines/util/functions/VN_NOW.sql | 2 +- db/routines/util/functions/VN_UNIX_TIMESTAMP.sql | 2 +- db/routines/util/functions/VN_UTC_DATE.sql | 2 +- db/routines/util/functions/VN_UTC_TIME.sql | 2 +- db/routines/util/functions/VN_UTC_TIMESTAMP.sql | 2 +- db/routines/util/functions/accountNumberToIban.sql | 2 +- db/routines/util/functions/accountShortToStandard.sql | 2 +- db/routines/util/functions/binlogQueue_getDelay.sql | 2 +- db/routines/util/functions/capitalizeFirst.sql | 2 +- db/routines/util/functions/checkPrintableChars.sql | 2 +- db/routines/util/functions/crypt.sql | 2 +- db/routines/util/functions/cryptOff.sql | 2 +- db/routines/util/functions/dayEnd.sql | 2 +- db/routines/util/functions/firstDayOfMonth.sql | 2 +- db/routines/util/functions/firstDayOfYear.sql | 2 +- db/routines/util/functions/formatRow.sql | 2 +- db/routines/util/functions/formatTable.sql | 2 +- db/routines/util/functions/hasDateOverlapped.sql | 2 +- db/routines/util/functions/hmacSha2.sql | 2 +- db/routines/util/functions/isLeapYear.sql | 2 +- db/routines/util/functions/json_removeNulls.sql | 2 +- db/routines/util/functions/lang.sql | 2 +- db/routines/util/functions/lastDayOfYear.sql | 2 +- db/routines/util/functions/log_formatDate.sql | 2 +- db/routines/util/functions/midnight.sql | 2 +- db/routines/util/functions/mockTime.sql | 2 +- db/routines/util/functions/mockTimeBase.sql | 2 +- db/routines/util/functions/mockUtcTime.sql | 2 +- db/routines/util/functions/nextWeek.sql | 2 +- db/routines/util/functions/notification_send.sql | 2 +- db/routines/util/functions/quarterFirstDay.sql | 2 +- db/routines/util/functions/quoteIdentifier.sql | 2 +- db/routines/util/functions/stringXor.sql | 2 +- db/routines/util/functions/today.sql | 2 +- db/routines/util/functions/tomorrow.sql | 2 +- db/routines/util/functions/twoDaysAgo.sql | 2 +- db/routines/util/functions/yearRelativePosition.sql | 2 +- db/routines/util/functions/yesterday.sql | 2 +- db/routines/util/procedures/checkHex.sql | 2 +- db/routines/util/procedures/connection_kill.sql | 2 +- db/routines/util/procedures/debugAdd.sql | 2 +- db/routines/util/procedures/exec.sql | 2 +- db/routines/util/procedures/log_add.sql | 2 +- db/routines/util/procedures/log_addWithUser.sql | 2 +- db/routines/util/procedures/log_cleanInstances.sql | 2 +- db/routines/util/procedures/procNoOverlap.sql | 2 +- db/routines/util/procedures/proc_changedPrivs.sql | 2 +- db/routines/util/procedures/proc_restorePrivs.sql | 2 +- db/routines/util/procedures/proc_savePrivs.sql | 2 +- db/routines/util/procedures/slowLog_prune.sql | 2 +- db/routines/util/procedures/throw.sql | 2 +- db/routines/util/procedures/time_generate.sql | 2 +- db/routines/util/procedures/tx_commit.sql | 2 +- db/routines/util/procedures/tx_rollback.sql | 2 +- db/routines/util/procedures/tx_start.sql | 2 +- db/routines/util/procedures/warn.sql | 2 +- db/routines/util/views/eventLogGrouped.sql | 2 +- db/routines/vn2008/views/Agencias.sql | 2 +- db/routines/vn2008/views/Articles.sql | 2 +- db/routines/vn2008/views/Bancos.sql | 2 +- db/routines/vn2008/views/Bancos_poliza.sql | 2 +- db/routines/vn2008/views/Cajas.sql | 2 +- db/routines/vn2008/views/Clientes.sql | 2 +- db/routines/vn2008/views/Comparativa.sql | 2 +- db/routines/vn2008/views/Compres.sql | 2 +- db/routines/vn2008/views/Compres_mark.sql | 2 +- db/routines/vn2008/views/Consignatarios.sql | 2 +- db/routines/vn2008/views/Cubos.sql | 2 +- db/routines/vn2008/views/Cubos_Retorno.sql | 2 +- db/routines/vn2008/views/Entradas.sql | 2 +- db/routines/vn2008/views/Entradas_Auto.sql | 2 +- db/routines/vn2008/views/Entradas_orden.sql | 2 +- db/routines/vn2008/views/Impresoras.sql | 2 +- db/routines/vn2008/views/Monedas.sql | 2 +- db/routines/vn2008/views/Movimientos.sql | 2 +- db/routines/vn2008/views/Movimientos_componentes.sql | 2 +- db/routines/vn2008/views/Movimientos_mark.sql | 2 +- db/routines/vn2008/views/Ordenes.sql | 2 +- db/routines/vn2008/views/Origen.sql | 2 +- db/routines/vn2008/views/Paises.sql | 2 +- db/routines/vn2008/views/PreciosEspeciales.sql | 2 +- db/routines/vn2008/views/Proveedores.sql | 2 +- db/routines/vn2008/views/Proveedores_cargueras.sql | 2 +- db/routines/vn2008/views/Proveedores_gestdoc.sql | 2 +- db/routines/vn2008/views/Recibos.sql | 2 +- db/routines/vn2008/views/Remesas.sql | 2 +- db/routines/vn2008/views/Rutas.sql | 2 +- db/routines/vn2008/views/Split.sql | 2 +- db/routines/vn2008/views/Split_lines.sql | 2 +- db/routines/vn2008/views/Tickets.sql | 2 +- db/routines/vn2008/views/Tickets_state.sql | 2 +- db/routines/vn2008/views/Tickets_turno.sql | 2 +- db/routines/vn2008/views/Tintas.sql | 2 +- db/routines/vn2008/views/Tipos.sql | 2 +- db/routines/vn2008/views/Trabajadores.sql | 2 +- db/routines/vn2008/views/Tramos.sql | 2 +- db/routines/vn2008/views/V_edi_item_track.sql | 2 +- db/routines/vn2008/views/Vehiculos_consumo.sql | 2 +- db/routines/vn2008/views/account_conciliacion.sql | 2 +- db/routines/vn2008/views/account_detail.sql | 2 +- db/routines/vn2008/views/account_detail_type.sql | 2 +- db/routines/vn2008/views/agency.sql | 2 +- db/routines/vn2008/views/airline.sql | 2 +- db/routines/vn2008/views/airport.sql | 2 +- db/routines/vn2008/views/albaran.sql | 2 +- db/routines/vn2008/views/albaran_gestdoc.sql | 2 +- db/routines/vn2008/views/albaran_state.sql | 2 +- db/routines/vn2008/views/awb.sql | 2 +- db/routines/vn2008/views/awb_component.sql | 2 +- db/routines/vn2008/views/awb_component_template.sql | 2 +- db/routines/vn2008/views/awb_component_type.sql | 2 +- db/routines/vn2008/views/awb_gestdoc.sql | 2 +- db/routines/vn2008/views/awb_recibida.sql | 2 +- db/routines/vn2008/views/awb_role.sql | 2 +- db/routines/vn2008/views/awb_unit.sql | 2 +- db/routines/vn2008/views/balance_nest_tree.sql | 2 +- db/routines/vn2008/views/barcodes.sql | 2 +- db/routines/vn2008/views/buySource.sql | 2 +- db/routines/vn2008/views/buy_edi.sql | 2 +- db/routines/vn2008/views/buy_edi_k012.sql | 2 +- db/routines/vn2008/views/buy_edi_k03.sql | 2 +- db/routines/vn2008/views/buy_edi_k04.sql | 2 +- db/routines/vn2008/views/cdr.sql | 2 +- db/routines/vn2008/views/chanel.sql | 2 +- db/routines/vn2008/views/cl_act.sql | 2 +- db/routines/vn2008/views/cl_cau.sql | 2 +- db/routines/vn2008/views/cl_con.sql | 2 +- db/routines/vn2008/views/cl_det.sql | 2 +- db/routines/vn2008/views/cl_main.sql | 2 +- db/routines/vn2008/views/cl_mot.sql | 2 +- db/routines/vn2008/views/cl_res.sql | 2 +- db/routines/vn2008/views/cl_sol.sql | 2 +- db/routines/vn2008/views/config_host.sql | 2 +- db/routines/vn2008/views/consignatarios_observation.sql | 2 +- db/routines/vn2008/views/credit.sql | 2 +- db/routines/vn2008/views/definitivo.sql | 2 +- db/routines/vn2008/views/edi_article.sql | 2 +- db/routines/vn2008/views/edi_bucket.sql | 2 +- db/routines/vn2008/views/edi_bucket_type.sql | 2 +- db/routines/vn2008/views/edi_specie.sql | 2 +- db/routines/vn2008/views/edi_supplier.sql | 2 +- db/routines/vn2008/views/empresa.sql | 2 +- db/routines/vn2008/views/empresa_grupo.sql | 2 +- db/routines/vn2008/views/entrySource.sql | 2 +- db/routines/vn2008/views/financialProductType.sql | 2 +- db/routines/vn2008/views/flight.sql | 2 +- db/routines/vn2008/views/gastos_resumen.sql | 2 +- db/routines/vn2008/views/integra2.sql | 2 +- db/routines/vn2008/views/integra2_province.sql | 2 +- db/routines/vn2008/views/mail.sql | 2 +- db/routines/vn2008/views/mandato.sql | 2 +- db/routines/vn2008/views/mandato_tipo.sql | 2 +- db/routines/vn2008/views/pago.sql | 2 +- db/routines/vn2008/views/pago_sdc.sql | 2 +- db/routines/vn2008/views/pay_dem.sql | 2 +- db/routines/vn2008/views/pay_dem_det.sql | 2 +- db/routines/vn2008/views/pay_met.sql | 2 +- db/routines/vn2008/views/payrollWorker.sql | 2 +- db/routines/vn2008/views/payroll_categorias.sql | 2 +- db/routines/vn2008/views/payroll_centros.sql | 2 +- db/routines/vn2008/views/payroll_conceptos.sql | 2 +- db/routines/vn2008/views/plantpassport.sql | 2 +- db/routines/vn2008/views/plantpassport_authority.sql | 2 +- db/routines/vn2008/views/price_fixed.sql | 2 +- db/routines/vn2008/views/producer.sql | 2 +- db/routines/vn2008/views/promissoryNote.sql | 2 +- db/routines/vn2008/views/proveedores_clientes.sql | 2 +- db/routines/vn2008/views/province.sql | 2 +- db/routines/vn2008/views/recibida.sql | 2 +- db/routines/vn2008/views/recibida_intrastat.sql | 2 +- db/routines/vn2008/views/recibida_iva.sql | 2 +- db/routines/vn2008/views/recibida_vencimiento.sql | 2 +- db/routines/vn2008/views/recovery.sql | 2 +- db/routines/vn2008/views/reference_rate.sql | 2 +- db/routines/vn2008/views/reinos.sql | 2 +- db/routines/vn2008/views/state.sql | 2 +- db/routines/vn2008/views/tag.sql | 2 +- db/routines/vn2008/views/tarifa_componentes.sql | 2 +- db/routines/vn2008/views/tarifa_componentes_series.sql | 2 +- db/routines/vn2008/views/tblContadores.sql | 2 +- db/routines/vn2008/views/thermograph.sql | 2 +- db/routines/vn2008/views/ticket_observation.sql | 2 +- db/routines/vn2008/views/tickets_gestdoc.sql | 2 +- db/routines/vn2008/views/time.sql | 2 +- db/routines/vn2008/views/travel.sql | 2 +- db/routines/vn2008/views/v_Articles_botanical.sql | 2 +- db/routines/vn2008/views/v_compres.sql | 2 +- db/routines/vn2008/views/v_empresa.sql | 2 +- db/routines/vn2008/views/versiones.sql | 2 +- db/routines/vn2008/views/warehouse_pickup.sql | 2 +- 577 files changed, 577 insertions(+), 577 deletions(-) diff --git a/db/routines/account/functions/myUser_checkLogin.sql b/db/routines/account/functions/myUser_checkLogin.sql index 76cf6da04..ed55f0d13 100644 --- a/db/routines/account/functions/myUser_checkLogin.sql +++ b/db/routines/account/functions/myUser_checkLogin.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_checkLogin`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_checkLogin`() RETURNS tinyint(1) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getId.sql b/db/routines/account/functions/myUser_getId.sql index 864e798a9..bc86c87dc 100644 --- a/db/routines/account/functions/myUser_getId.sql +++ b/db/routines/account/functions/myUser_getId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_getId`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_getId`() RETURNS int(11) DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/myUser_getName.sql b/db/routines/account/functions/myUser_getName.sql index e91681329..541f7c086 100644 --- a/db/routines/account/functions/myUser_getName.sql +++ b/db/routines/account/functions/myUser_getName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_getName`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_getName`() RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/account/functions/myUser_hasPriv.sql b/db/routines/account/functions/myUser_hasPriv.sql index 8105e9baa..b53580d74 100644 --- a/db/routines/account/functions/myUser_hasPriv.sql +++ b/db/routines/account/functions/myUser_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE') ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/myUser_hasRole.sql b/db/routines/account/functions/myUser_hasRole.sql index 53fd143fd..8cc8aafb5 100644 --- a/db/routines/account/functions/myUser_hasRole.sql +++ b/db/routines/account/functions/myUser_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRole`(vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoleId.sql b/db/routines/account/functions/myUser_hasRoleId.sql index fd8b3fb19..d059b095d 100644 --- a/db/routines/account/functions/myUser_hasRoleId.sql +++ b/db/routines/account/functions/myUser_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRoleId`(vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/myUser_hasRoutinePriv.sql b/db/routines/account/functions/myUser_hasRoutinePriv.sql index 517e36f5c..9e9563a5f 100644 --- a/db/routines/account/functions/myUser_hasRoutinePriv.sql +++ b/db/routines/account/functions/myUser_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`myUser_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100) ) RETURNS tinyint(1) diff --git a/db/routines/account/functions/passwordGenerate.sql b/db/routines/account/functions/passwordGenerate.sql index a4cff0ab9..952a8912c 100644 --- a/db/routines/account/functions/passwordGenerate.sql +++ b/db/routines/account/functions/passwordGenerate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`passwordGenerate`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`passwordGenerate`() RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/account/functions/toUnixDays.sql b/db/routines/account/functions/toUnixDays.sql index 931c29cb0..db908060b 100644 --- a/db/routines/account/functions/toUnixDays.sql +++ b/db/routines/account/functions/toUnixDays.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`toUnixDays`(vDate DATE) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getMysqlRole.sql b/db/routines/account/functions/user_getMysqlRole.sql index e50726480..91540bc6b 100644 --- a/db/routines/account/functions/user_getMysqlRole.sql +++ b/db/routines/account/functions/user_getMysqlRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_getMysqlRole`(vUserName VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_getNameFromId.sql b/db/routines/account/functions/user_getNameFromId.sql index 27ea434e8..b06facd7a 100644 --- a/db/routines/account/functions/user_getNameFromId.sql +++ b/db/routines/account/functions/user_getNameFromId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_getNameFromId`(vSelf INT) RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasPriv.sql b/db/routines/account/functions/user_hasPriv.sql index fc74b197a..83bdfaa19 100644 --- a/db/routines/account/functions/user_hasPriv.sql +++ b/db/routines/account/functions/user_hasPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasPriv`(vChain VARCHAR(100), vPrivilege ENUM('SELECT','INSERT','UPDATE','DELETE'), vUserFk INT ) diff --git a/db/routines/account/functions/user_hasRole.sql b/db/routines/account/functions/user_hasRole.sql index 71bd7bcae..fb88efeec 100644 --- a/db/routines/account/functions/user_hasRole.sql +++ b/db/routines/account/functions/user_hasRole.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoleId.sql b/db/routines/account/functions/user_hasRoleId.sql index 1ba5fae75..a35624d3d 100644 --- a/db/routines/account/functions/user_hasRoleId.sql +++ b/db/routines/account/functions/user_hasRoleId.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/account/functions/user_hasRoutinePriv.sql b/db/routines/account/functions/user_hasRoutinePriv.sql index b19ed6c2a..6f87f160c 100644 --- a/db/routines/account/functions/user_hasRoutinePriv.sql +++ b/db/routines/account/functions/user_hasRoutinePriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `account`.`user_hasRoutinePriv`(vType ENUM('PROCEDURE', 'FUNCTION'), vChain VARCHAR(100), vUserFk INT ) diff --git a/db/routines/account/procedures/account_enable.sql b/db/routines/account/procedures/account_enable.sql index 9441e46c8..9f43c97a3 100644 --- a/db/routines/account/procedures/account_enable.sql +++ b/db/routines/account/procedures/account_enable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`account_enable`(vSelf INT) BEGIN /** * Enables an account and sets up email configuration. diff --git a/db/routines/account/procedures/myUser_login.sql b/db/routines/account/procedures/myUser_login.sql index 013dc55d7..be547292e 100644 --- a/db/routines/account/procedures/myUser_login.sql +++ b/db/routines/account/procedures/myUser_login.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithKey.sql b/db/routines/account/procedures/myUser_loginWithKey.sql index dab21e433..67d8c9923 100644 --- a/db/routines/account/procedures/myUser_loginWithKey.sql +++ b/db/routines/account/procedures/myUser_loginWithKey.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_loginWithName.sql b/db/routines/account/procedures/myUser_loginWithName.sql index c71b7ae7b..522da77dd 100644 --- a/db/routines/account/procedures/myUser_loginWithName.sql +++ b/db/routines/account/procedures/myUser_loginWithName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_loginWithName`(vUserName VARCHAR(255)) READS SQL DATA BEGIN /** diff --git a/db/routines/account/procedures/myUser_logout.sql b/db/routines/account/procedures/myUser_logout.sql index 8740a1b25..a1d7db361 100644 --- a/db/routines/account/procedures/myUser_logout.sql +++ b/db/routines/account/procedures/myUser_logout.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`myUser_logout`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`myUser_logout`() BEGIN /** * Logouts the user. diff --git a/db/routines/account/procedures/role_checkName.sql b/db/routines/account/procedures/role_checkName.sql index 5f5a8b845..55d9d80a9 100644 --- a/db/routines/account/procedures/role_checkName.sql +++ b/db/routines/account/procedures/role_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_checkName`(vRoleName VARCHAR(255)) BEGIN /** * Checks that role name meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/role_getDescendents.sql b/db/routines/account/procedures/role_getDescendents.sql index fcc9536fd..ecd4a8790 100644 --- a/db/routines/account/procedures/role_getDescendents.sql +++ b/db/routines/account/procedures/role_getDescendents.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_getDescendents`(vSelf INT) BEGIN /** * Gets the identifiers of all the subroles implemented by a role (Including diff --git a/db/routines/account/procedures/role_sync.sql b/db/routines/account/procedures/role_sync.sql index 645f1f614..139193a31 100644 --- a/db/routines/account/procedures/role_sync.sql +++ b/db/routines/account/procedures/role_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_sync`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_sync`() BEGIN /** * Synchronize the @roleRole table with the current role hierarchy. This diff --git a/db/routines/account/procedures/role_syncPrivileges.sql b/db/routines/account/procedures/role_syncPrivileges.sql index cfdb81593..cf265b4bd 100644 --- a/db/routines/account/procedures/role_syncPrivileges.sql +++ b/db/routines/account/procedures/role_syncPrivileges.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`role_syncPrivileges`() BEGIN /** * Synchronizes permissions of MySQL role users based on role hierarchy. diff --git a/db/routines/account/procedures/user_checkName.sql b/db/routines/account/procedures/user_checkName.sql index ca12a67a2..6fab17361 100644 --- a/db/routines/account/procedures/user_checkName.sql +++ b/db/routines/account/procedures/user_checkName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`user_checkName`(vUserName VARCHAR(255)) BEGIN /** * Checks that username meets the necessary syntax requirements, otherwise it diff --git a/db/routines/account/procedures/user_checkPassword.sql b/db/routines/account/procedures/user_checkPassword.sql index d696c51cd..eb0990533 100644 --- a/db/routines/account/procedures/user_checkPassword.sql +++ b/db/routines/account/procedures/user_checkPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `account`.`user_checkPassword`(vPassword VARCHAR(255)) BEGIN /** * Comprueba si la contraseña cumple los requisitos de seguridad diff --git a/db/routines/account/triggers/account_afterDelete.sql b/db/routines/account/triggers/account_afterDelete.sql index 5249b358d..be0e5901f 100644 --- a/db/routines/account/triggers/account_afterDelete.sql +++ b/db/routines/account/triggers/account_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_afterDelete` AFTER DELETE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_afterInsert.sql b/db/routines/account/triggers/account_afterInsert.sql index 0fe35867e..be2959ab6 100644 --- a/db/routines/account/triggers/account_afterInsert.sql +++ b/db/routines/account/triggers/account_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_afterInsert` AFTER INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeInsert.sql b/db/routines/account/triggers/account_beforeInsert.sql index b4e9f06f7..43b611990 100644 --- a/db/routines/account/triggers/account_beforeInsert.sql +++ b/db/routines/account/triggers/account_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_beforeInsert` BEFORE INSERT ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/account_beforeUpdate.sql b/db/routines/account/triggers/account_beforeUpdate.sql index 05d3ec3ae..bbcea028d 100644 --- a/db/routines/account/triggers/account_beforeUpdate.sql +++ b/db/routines/account/triggers/account_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`account_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_beforeUpdate` BEFORE UPDATE ON `account` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql index 32b5b620e..83af7169c 100644 --- a/db/routines/account/triggers/mailAliasAccount_afterDelete.sql +++ b/db/routines/account/triggers/mailAliasAccount_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_afterDelete` AFTER DELETE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql index 171c7bc7a..a435832f2 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeInsert` BEFORE INSERT ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql index 4d05fc32a..471a34900 100644 --- a/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAliasAccount_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAliasAccount_beforeUpdate` BEFORE UPDATE ON `mailAliasAccount` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_afterDelete.sql b/db/routines/account/triggers/mailAlias_afterDelete.sql index ec01b1a4b..fe944246d 100644 --- a/db/routines/account/triggers/mailAlias_afterDelete.sql +++ b/db/routines/account/triggers/mailAlias_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_afterDelete` AFTER DELETE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeInsert.sql b/db/routines/account/triggers/mailAlias_beforeInsert.sql index 02f900f56..37a9546ca 100644 --- a/db/routines/account/triggers/mailAlias_beforeInsert.sql +++ b/db/routines/account/triggers/mailAlias_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_beforeInsert` BEFORE INSERT ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailAlias_beforeUpdate.sql b/db/routines/account/triggers/mailAlias_beforeUpdate.sql index 0f14dcf3f..e3940cfda 100644 --- a/db/routines/account/triggers/mailAlias_beforeUpdate.sql +++ b/db/routines/account/triggers/mailAlias_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailAlias_beforeUpdate` BEFORE UPDATE ON `mailAlias` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_afterDelete.sql b/db/routines/account/triggers/mailForward_afterDelete.sql index c1eef93de..cb02b746d 100644 --- a/db/routines/account/triggers/mailForward_afterDelete.sql +++ b/db/routines/account/triggers/mailForward_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_afterDelete` AFTER DELETE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeInsert.sql b/db/routines/account/triggers/mailForward_beforeInsert.sql index bf5bd1369..bc4e5ef17 100644 --- a/db/routines/account/triggers/mailForward_beforeInsert.sql +++ b/db/routines/account/triggers/mailForward_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_beforeInsert` BEFORE INSERT ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/mailForward_beforeUpdate.sql b/db/routines/account/triggers/mailForward_beforeUpdate.sql index 590b20347..88594979a 100644 --- a/db/routines/account/triggers/mailForward_beforeUpdate.sql +++ b/db/routines/account/triggers/mailForward_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`mailForward_beforeUpdate` BEFORE UPDATE ON `mailForward` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_afterDelete.sql b/db/routines/account/triggers/roleInherit_afterDelete.sql index 84e2cbc67..c7c82eedb 100644 --- a/db/routines/account/triggers/roleInherit_afterDelete.sql +++ b/db/routines/account/triggers/roleInherit_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_afterDelete` AFTER DELETE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeInsert.sql b/db/routines/account/triggers/roleInherit_beforeInsert.sql index a964abecb..77932c12d 100644 --- a/db/routines/account/triggers/roleInherit_beforeInsert.sql +++ b/db/routines/account/triggers/roleInherit_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_beforeInsert` BEFORE INSERT ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/roleInherit_beforeUpdate.sql b/db/routines/account/triggers/roleInherit_beforeUpdate.sql index 05b2ae8b5..05aef0b95 100644 --- a/db/routines/account/triggers/roleInherit_beforeUpdate.sql +++ b/db/routines/account/triggers/roleInherit_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`roleInherit_beforeUpdate` BEFORE UPDATE ON `roleInherit` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_afterDelete.sql b/db/routines/account/triggers/role_afterDelete.sql index 731f1c978..be382cba6 100644 --- a/db/routines/account/triggers/role_afterDelete.sql +++ b/db/routines/account/triggers/role_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_afterDelete` AFTER DELETE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeInsert.sql b/db/routines/account/triggers/role_beforeInsert.sql index 35e493bf7..f68a211a7 100644 --- a/db/routines/account/triggers/role_beforeInsert.sql +++ b/db/routines/account/triggers/role_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_beforeInsert` BEFORE INSERT ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/role_beforeUpdate.sql b/db/routines/account/triggers/role_beforeUpdate.sql index 588d2271d..a2f471b64 100644 --- a/db/routines/account/triggers/role_beforeUpdate.sql +++ b/db/routines/account/triggers/role_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`role_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`role_beforeUpdate` BEFORE UPDATE ON `role` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterDelete.sql b/db/routines/account/triggers/user_afterDelete.sql index 710549cc6..eabe60d8c 100644 --- a/db/routines/account/triggers/user_afterDelete.sql +++ b/db/routines/account/triggers/user_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterDelete` AFTER DELETE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterInsert.sql b/db/routines/account/triggers/user_afterInsert.sql index 2cc4da49b..31f992c16 100644 --- a/db/routines/account/triggers/user_afterInsert.sql +++ b/db/routines/account/triggers/user_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterInsert` AFTER INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_afterUpdate.sql b/db/routines/account/triggers/user_afterUpdate.sql index 7e5415ee7..7fb4e644f 100644 --- a/db/routines/account/triggers/user_afterUpdate.sql +++ b/db/routines/account/triggers/user_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterUpdate` AFTER UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeInsert.sql b/db/routines/account/triggers/user_beforeInsert.sql index e15f8faa5..6cafa8b3f 100644 --- a/db/routines/account/triggers/user_beforeInsert.sql +++ b/db/routines/account/triggers/user_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_beforeInsert` BEFORE INSERT ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/triggers/user_beforeUpdate.sql b/db/routines/account/triggers/user_beforeUpdate.sql index ae8d648e2..849dfbd91 100644 --- a/db/routines/account/triggers/user_beforeUpdate.sql +++ b/db/routines/account/triggers/user_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `account`.`user_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_beforeUpdate` BEFORE UPDATE ON `user` FOR EACH ROW BEGIN diff --git a/db/routines/account/views/accountDovecot.sql b/db/routines/account/views/accountDovecot.sql index d3d03ca64..1e30946f3 100644 --- a/db/routines/account/views/accountDovecot.sql +++ b/db/routines/account/views/accountDovecot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `account`.`accountDovecot` AS SELECT `u`.`name` AS `name`, diff --git a/db/routines/account/views/emailUser.sql b/db/routines/account/views/emailUser.sql index d6a66719c..dcb435454 100644 --- a/db/routines/account/views/emailUser.sql +++ b/db/routines/account/views/emailUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `account`.`emailUser` AS SELECT `u`.`id` AS `userFk`, diff --git a/db/routines/account/views/myRole.sql b/db/routines/account/views/myRole.sql index 036300db5..68364f0bc 100644 --- a/db/routines/account/views/myRole.sql +++ b/db/routines/account/views/myRole.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myRole` AS SELECT `r`.`inheritsFrom` AS `id` diff --git a/db/routines/account/views/myUser.sql b/db/routines/account/views/myUser.sql index fc1b04d78..f520d893b 100644 --- a/db/routines/account/views/myUser.sql +++ b/db/routines/account/views/myUser.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `account`.`myUser` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/bi/procedures/Greuge_Evolution_Add.sql b/db/routines/bi/procedures/Greuge_Evolution_Add.sql index bf5693ad2..6480155cb 100644 --- a/db/routines/bi/procedures/Greuge_Evolution_Add.sql +++ b/db/routines/bi/procedures/Greuge_Evolution_Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`Greuge_Evolution_Add`() BEGIN /* Inserta en la tabla Greuge_Evolution el saldo acumulado de cada cliente, diff --git a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql index bbee190ea..7c2cc5678 100644 --- a/db/routines/bi/procedures/analisis_ventas_evolution_add.sql +++ b/db/routines/bi/procedures/analisis_ventas_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_evolution_add`() BEGIN DECLARE vPreviousPeriod INT; DECLARE vCurrentPeriod INT; diff --git a/db/routines/bi/procedures/analisis_ventas_simple.sql b/db/routines/bi/procedures/analisis_ventas_simple.sql index 597d9bcd4..5c67584ee 100644 --- a/db/routines/bi/procedures/analisis_ventas_simple.sql +++ b/db/routines/bi/procedures/analisis_ventas_simple.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_simple`() BEGIN /** * Vacia y rellena la tabla 'analisis_grafico_simple' desde 'analisis_grafico_ventas' diff --git a/db/routines/bi/procedures/analisis_ventas_update.sql b/db/routines/bi/procedures/analisis_ventas_update.sql index a7bb46387..ef3e165a0 100644 --- a/db/routines/bi/procedures/analisis_ventas_update.sql +++ b/db/routines/bi/procedures/analisis_ventas_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`analisis_ventas_update`() BEGIN DECLARE vLastMonth DATE; diff --git a/db/routines/bi/procedures/clean.sql b/db/routines/bi/procedures/clean.sql index 4c3994dd5..a1eb99166 100644 --- a/db/routines/bi/procedures/clean.sql +++ b/db/routines/bi/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`clean`() BEGIN DECLARE vDateShort DATETIME; DECLARE vDateLong DATETIME; diff --git a/db/routines/bi/procedures/defaultersFromDate.sql b/db/routines/bi/procedures/defaultersFromDate.sql index 88828a6e1..bfe133750 100644 --- a/db/routines/bi/procedures/defaultersFromDate.sql +++ b/db/routines/bi/procedures/defaultersFromDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaultersFromDate`(IN vDate DATE) BEGIN SELECT t1.*, c.name Cliente, w.code workerCode, c.payMethodFk pay_met_id, c.dueDay Vencimiento diff --git a/db/routines/bi/procedures/defaulting.sql b/db/routines/bi/procedures/defaulting.sql index db030fa0f..d20232b8b 100644 --- a/db/routines/bi/procedures/defaulting.sql +++ b/db/routines/bi/procedures/defaulting.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaulting`(IN `vDate` DATE) BEGIN DECLARE vDone BOOLEAN; DECLARE vClient INT; diff --git a/db/routines/bi/procedures/defaulting_launcher.sql b/db/routines/bi/procedures/defaulting_launcher.sql index a0df72adf..585abdc09 100644 --- a/db/routines/bi/procedures/defaulting_launcher.sql +++ b/db/routines/bi/procedures/defaulting_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`defaulting_launcher`() BEGIN /** * Calcula la morosidad de los clientes. diff --git a/db/routines/bi/procedures/facturacion_media_anual_update.sql b/db/routines/bi/procedures/facturacion_media_anual_update.sql index 62f5d623d..e8810cc21 100644 --- a/db/routines/bi/procedures/facturacion_media_anual_update.sql +++ b/db/routines/bi/procedures/facturacion_media_anual_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() BEGIN TRUNCATE TABLE bs.clientAnnualConsumption; diff --git a/db/routines/bi/procedures/greuge_dif_porte_add.sql b/db/routines/bi/procedures/greuge_dif_porte_add.sql index b86524f59..330ff92b8 100644 --- a/db/routines/bi/procedures/greuge_dif_porte_add.sql +++ b/db/routines/bi/procedures/greuge_dif_porte_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`greuge_dif_porte_add`() BEGIN /** diff --git a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql index 2568600ae..c21a3bae5 100644 --- a/db/routines/bi/procedures/nigthlyAnalisisVentas.sql +++ b/db/routines/bi/procedures/nigthlyAnalisisVentas.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`nigthlyAnalisisVentas`() BEGIN CALL analisis_ventas_update; CALL analisis_ventas_simple; diff --git a/db/routines/bi/procedures/rutasAnalyze.sql b/db/routines/bi/procedures/rutasAnalyze.sql index f76ac2dd9..e277968bf 100644 --- a/db/routines/bi/procedures/rutasAnalyze.sql +++ b/db/routines/bi/procedures/rutasAnalyze.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`rutasAnalyze`( vDatedFrom DATE, vDatedTo DATE ) diff --git a/db/routines/bi/procedures/rutasAnalyze_launcher.sql b/db/routines/bi/procedures/rutasAnalyze_launcher.sql index 9cc6f0eeb..02f5e1b9c 100644 --- a/db/routines/bi/procedures/rutasAnalyze_launcher.sql +++ b/db/routines/bi/procedures/rutasAnalyze_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`rutasAnalyze_launcher`() BEGIN /** * Call rutasAnalyze diff --git a/db/routines/bi/views/analisis_grafico_ventas.sql b/db/routines/bi/views/analisis_grafico_ventas.sql index 566f24c2e..f5956f27a 100644 --- a/db/routines/bi/views/analisis_grafico_ventas.sql +++ b/db/routines/bi/views/analisis_grafico_ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_grafico_ventas` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/analisis_ventas_simple.sql b/db/routines/bi/views/analisis_ventas_simple.sql index 8651f3d05..109378c8a 100644 --- a/db/routines/bi/views/analisis_ventas_simple.sql +++ b/db/routines/bi/views/analisis_ventas_simple.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`analisis_ventas_simple` AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`, diff --git a/db/routines/bi/views/claims_ratio.sql b/db/routines/bi/views/claims_ratio.sql index 39ceae56d..cfd9b6231 100644 --- a/db/routines/bi/views/claims_ratio.sql +++ b/db/routines/bi/views/claims_ratio.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`claims_ratio` AS SELECT `cr`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/customerRiskOverdue.sql b/db/routines/bi/views/customerRiskOverdue.sql index 8b8deb3ca..27ef7ca47 100644 --- a/db/routines/bi/views/customerRiskOverdue.sql +++ b/db/routines/bi/views/customerRiskOverdue.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`customerRiskOverdue` AS SELECT `cr`.`clientFk` AS `customer_id`, diff --git a/db/routines/bi/views/defaulters.sql b/db/routines/bi/views/defaulters.sql index e5922a746..927503245 100644 --- a/db/routines/bi/views/defaulters.sql +++ b/db/routines/bi/views/defaulters.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`defaulters` AS SELECT `d`.`clientFk` AS `client`, diff --git a/db/routines/bi/views/facturacion_media_anual.sql b/db/routines/bi/views/facturacion_media_anual.sql index 8b1cde492..2e0c2ca6e 100644 --- a/db/routines/bi/views/facturacion_media_anual.sql +++ b/db/routines/bi/views/facturacion_media_anual.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`facturacion_media_anual` AS SELECT `cac`.`clientFk` AS `Id_Cliente`, diff --git a/db/routines/bi/views/rotacion.sql b/db/routines/bi/views/rotacion.sql index 71674fb65..65a5db923 100644 --- a/db/routines/bi/views/rotacion.sql +++ b/db/routines/bi/views/rotacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`rotacion` AS SELECT `ic`.`itemFk` AS `Id_Article`, diff --git a/db/routines/bi/views/tarifa_componentes.sql b/db/routines/bi/views/tarifa_componentes.sql index 614e84eb9..42ea9fa81 100644 --- a/db/routines/bi/views/tarifa_componentes.sql +++ b/db/routines/bi/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes` AS SELECT `c`.`id` AS `Id_Componente`, diff --git a/db/routines/bi/views/tarifa_componentes_series.sql b/db/routines/bi/views/tarifa_componentes_series.sql index 508a78fb3..ed2f8e29a 100644 --- a/db/routines/bi/views/tarifa_componentes_series.sql +++ b/db/routines/bi/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bi`.`tarifa_componentes_series` AS SELECT `ct`.`id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/bs/events/clientDied_recalc.sql b/db/routines/bs/events/clientDied_recalc.sql index 9a9a5ebb3..db912658a 100644 --- a/db/routines/bs/events/clientDied_recalc.sql +++ b/db/routines/bs/events/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`clientDied_recalc` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`clientDied_recalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/inventoryDiscrepancy_launch.sql b/db/routines/bs/events/inventoryDiscrepancy_launch.sql index 015425dfd..3ee165846 100644 --- a/db/routines/bs/events/inventoryDiscrepancy_launch.sql +++ b/db/routines/bs/events/inventoryDiscrepancy_launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`inventoryDiscrepancy_launch` ON SCHEDULE EVERY 15 MINUTE STARTS '2023-07-18 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/events/nightTask_launchAll.sql b/db/routines/bs/events/nightTask_launchAll.sql index f1f20f1cc..1a55ca1a3 100644 --- a/db/routines/bs/events/nightTask_launchAll.sql +++ b/db/routines/bs/events/nightTask_launchAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `bs`.`nightTask_launchAll` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `bs`.`nightTask_launchAll` ON SCHEDULE EVERY 1 DAY STARTS '2022-02-08 04:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/bs/functions/tramo.sql b/db/routines/bs/functions/tramo.sql index a45860409..0415cfc92 100644 --- a/db/routines/bs/functions/tramo.sql +++ b/db/routines/bs/functions/tramo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `bs`.`tramo`(vDateTime DATETIME) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC NO SQL diff --git a/db/routines/bs/procedures/campaignComparative.sql b/db/routines/bs/procedures/campaignComparative.sql index 27957976a..6b4b983b5 100644 --- a/db/routines/bs/procedures/campaignComparative.sql +++ b/db/routines/bs/procedures/campaignComparative.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`campaignComparative`(vDateFrom DATE, vDateTo DATE) BEGIN SELECT workerName, diff --git a/db/routines/bs/procedures/carteras_add.sql b/db/routines/bs/procedures/carteras_add.sql index 8c806e1d9..5143b4bb5 100644 --- a/db/routines/bs/procedures/carteras_add.sql +++ b/db/routines/bs/procedures/carteras_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`carteras_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`carteras_add`() BEGIN /** * Inserta en la tabla @bs.carteras las ventas desde el año pasado diff --git a/db/routines/bs/procedures/clean.sql b/db/routines/bs/procedures/clean.sql index a1d393122..eff2faadb 100644 --- a/db/routines/bs/procedures/clean.sql +++ b/db/routines/bs/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clean`() BEGIN DECLARE vOneYearAgo DATE DEFAULT util.VN_CURDATE() - INTERVAL 1 YEAR; diff --git a/db/routines/bs/procedures/clientDied_recalc.sql b/db/routines/bs/procedures/clientDied_recalc.sql index d76c61968..1b5cb5ac8 100644 --- a/db/routines/bs/procedures/clientDied_recalc.sql +++ b/db/routines/bs/procedures/clientDied_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clientDied_recalc`( vDays INT, vCountryCode VARCHAR(2) ) diff --git a/db/routines/bs/procedures/clientNewBorn_recalc.sql b/db/routines/bs/procedures/clientNewBorn_recalc.sql index c3913a5f5..1c89b5745 100644 --- a/db/routines/bs/procedures/clientNewBorn_recalc.sql +++ b/db/routines/bs/procedures/clientNewBorn_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`clientNewBorn_recalc`() BLOCK1: BEGIN DECLARE vClientFk INT; diff --git a/db/routines/bs/procedures/compradores_evolution_add.sql b/db/routines/bs/procedures/compradores_evolution_add.sql index 1049122a0..e9b073e28 100644 --- a/db/routines/bs/procedures/compradores_evolution_add.sql +++ b/db/routines/bs/procedures/compradores_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`compradores_evolution_add`() BEGIN /** * Inserta en la tabla compradores_evolution las ventas acumuladas en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fondo_evolution_add.sql b/db/routines/bs/procedures/fondo_evolution_add.sql index 22f73ff8d..3ca91e647 100644 --- a/db/routines/bs/procedures/fondo_evolution_add.sql +++ b/db/routines/bs/procedures/fondo_evolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`fondo_evolution_add`() BEGIN /** * Inserta en la tabla fondo_maniobra los saldos acumulados en los ultimos 365 dias diff --git a/db/routines/bs/procedures/fruitsEvolution.sql b/db/routines/bs/procedures/fruitsEvolution.sql index 15ce35ebe..c689f4b76 100644 --- a/db/routines/bs/procedures/fruitsEvolution.sql +++ b/db/routines/bs/procedures/fruitsEvolution.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`fruitsEvolution`() BEGIN select Id_Cliente, Cliente, count(semana) as semanas, (w.code IS NOT NULL) isWorker diff --git a/db/routines/bs/procedures/indicatorsUpdate.sql b/db/routines/bs/procedures/indicatorsUpdate.sql index 958aae017..d66e52a61 100644 --- a/db/routines/bs/procedures/indicatorsUpdate.sql +++ b/db/routines/bs/procedures/indicatorsUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`indicatorsUpdate`(vDated DATE) BEGIN DECLARE oneYearBefore DATE DEFAULT TIMESTAMPADD(YEAR,-1, vDated); diff --git a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql index b4f768522..8ede28ec8 100644 --- a/db/routines/bs/procedures/indicatorsUpdateLauncher.sql +++ b/db/routines/bs/procedures/indicatorsUpdateLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`indicatorsUpdateLauncher`() BEGIN DECLARE vDated DATE; diff --git a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql index 62ab85368..863005373 100644 --- a/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql +++ b/db/routines/bs/procedures/inventoryDiscrepancyDetail_replace.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`inventoryDiscrepancyDetail_replace`() BEGIN /** * Replace all records in table inventoryDiscrepancyDetail and insert new diff --git a/db/routines/bs/procedures/m3Add.sql b/db/routines/bs/procedures/m3Add.sql index 63159815b..0ec2c8ce2 100644 --- a/db/routines/bs/procedures/m3Add.sql +++ b/db/routines/bs/procedures/m3Add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`m3Add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`m3Add`() BEGIN DECLARE datSTART DATE; diff --git a/db/routines/bs/procedures/manaCustomerUpdate.sql b/db/routines/bs/procedures/manaCustomerUpdate.sql index f2bcc942e..e9ba70423 100644 --- a/db/routines/bs/procedures/manaCustomerUpdate.sql +++ b/db/routines/bs/procedures/manaCustomerUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`manaCustomerUpdate`() BEGIN DECLARE vToDated DATE; DECLARE vFromDated DATE; diff --git a/db/routines/bs/procedures/manaSpellers_actualize.sql b/db/routines/bs/procedures/manaSpellers_actualize.sql index 818ef40a6..20b0f84f8 100644 --- a/db/routines/bs/procedures/manaSpellers_actualize.sql +++ b/db/routines/bs/procedures/manaSpellers_actualize.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`manaSpellers_actualize`() BEGIN /** * Recalcula el valor del campo con el modificador de precio diff --git a/db/routines/bs/procedures/nightTask_launchAll.sql b/db/routines/bs/procedures/nightTask_launchAll.sql index 9c3788b50..e61e88bb6 100644 --- a/db/routines/bs/procedures/nightTask_launchAll.sql +++ b/db/routines/bs/procedures/nightTask_launchAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() BEGIN /** * Runs all nightly tasks. diff --git a/db/routines/bs/procedures/nightTask_launchTask.sql b/db/routines/bs/procedures/nightTask_launchTask.sql index 042df9d5d..aa4c540e8 100644 --- a/db/routines/bs/procedures/nightTask_launchTask.sql +++ b/db/routines/bs/procedures/nightTask_launchTask.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchTask`( vSchema VARCHAR(255), vProcedure VARCHAR(255), OUT vError VARCHAR(255), diff --git a/db/routines/bs/procedures/payMethodClientAdd.sql b/db/routines/bs/procedures/payMethodClientAdd.sql index 6ed39538a..0c19f453a 100644 --- a/db/routines/bs/procedures/payMethodClientAdd.sql +++ b/db/routines/bs/procedures/payMethodClientAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`payMethodClientAdd`() BEGIN INSERT IGNORE INTO `bs`.`payMethodClient` (dated, payMethodFk, clientFk) SELECT util.VN_CURDATE(), c.payMethodFk, c.id diff --git a/db/routines/bs/procedures/saleGraphic.sql b/db/routines/bs/procedures/saleGraphic.sql index cdf04ed19..e1e387980 100644 --- a/db/routines/bs/procedures/saleGraphic.sql +++ b/db/routines/bs/procedures/saleGraphic.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE, IN vToDate DATE, IN vProducerFk INT) BEGIN diff --git a/db/routines/bs/procedures/salePersonEvolutionAdd.sql b/db/routines/bs/procedures/salePersonEvolutionAdd.sql index 8894e8546..33e31b699 100644 --- a/db/routines/bs/procedures/salePersonEvolutionAdd.sql +++ b/db/routines/bs/procedures/salePersonEvolutionAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salePersonEvolutionAdd`(IN vDateStart DATETIME) BEGIN DELETE FROM bs.salePersonEvolution WHERE dated <= DATE_SUB(util.VN_CURDATE(), INTERVAL 1 YEAR); diff --git a/db/routines/bs/procedures/sale_add.sql b/db/routines/bs/procedures/sale_add.sql index 37f4f41c4..c50d27b81 100644 --- a/db/routines/bs/procedures/sale_add.sql +++ b/db/routines/bs/procedures/sale_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`sale_add`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sale_add`( IN vStarted DATE, IN vEnded DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_add.sql b/db/routines/bs/procedures/salesByItemTypeDay_add.sql index fe7d36dc8..5c12081a0 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_add.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_add`( vDateStart DATE, vDateEnd DATE ) diff --git a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql index c2b3f4b48..63677def6 100644 --- a/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql +++ b/db/routines/bs/procedures/salesByItemTypeDay_addLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() BEGIN CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); END$$ diff --git a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql index 4e0af84bf..eb441c07b 100644 --- a/db/routines/bs/procedures/salesByclientSalesPerson_add.sql +++ b/db/routines/bs/procedures/salesByclientSalesPerson_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByclientSalesPerson_add`(vDatedFrom DATE) BEGIN /** * Agrupa las ventas por cliente/comercial/fecha en la tabla bs.salesByclientSalesPerson diff --git a/db/routines/bs/procedures/salesPersonEvolution_add.sql b/db/routines/bs/procedures/salesPersonEvolution_add.sql index 3474352c3..ea150e182 100644 --- a/db/routines/bs/procedures/salesPersonEvolution_add.sql +++ b/db/routines/bs/procedures/salesPersonEvolution_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesPersonEvolution_add`() BEGIN /** * Calcula los datos para los gráficos de evolución agrupado por salesPersonFk y día. diff --git a/db/routines/bs/procedures/sales_addLauncher.sql b/db/routines/bs/procedures/sales_addLauncher.sql index 403e76bd5..38cb5e219 100644 --- a/db/routines/bs/procedures/sales_addLauncher.sql +++ b/db/routines/bs/procedures/sales_addLauncher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sales_addLauncher`() BEGIN /** * Añade las ventas a la tabla bs.sale que se realizaron desde hace un mes hasta hoy diff --git a/db/routines/bs/procedures/vendedores_add_launcher.sql b/db/routines/bs/procedures/vendedores_add_launcher.sql index 562b02c5c..c0718a659 100644 --- a/db/routines/bs/procedures/vendedores_add_launcher.sql +++ b/db/routines/bs/procedures/vendedores_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`vendedores_add_launcher`() BEGIN CALL bs.salesByclientSalesPerson_add(util.VN_CURDATE()- INTERVAL 45 DAY); diff --git a/db/routines/bs/procedures/ventas_contables_add.sql b/db/routines/bs/procedures/ventas_contables_add.sql index ef57d40d7..72b0c0fee 100644 --- a/db/routines/bs/procedures/ventas_contables_add.sql +++ b/db/routines/bs/procedures/ventas_contables_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`ventas_contables_add`(IN vYear INT, IN vMonth INT) BEGIN /** diff --git a/db/routines/bs/procedures/ventas_contables_add_launcher.sql b/db/routines/bs/procedures/ventas_contables_add_launcher.sql index e4b9c89a0..ac74c47bf 100644 --- a/db/routines/bs/procedures/ventas_contables_add_launcher.sql +++ b/db/routines/bs/procedures/ventas_contables_add_launcher.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`ventas_contables_add_launcher`() BEGIN /** diff --git a/db/routines/bs/procedures/waste_addSales.sql b/db/routines/bs/procedures/waste_addSales.sql index 018a6d516..20eee5d49 100644 --- a/db/routines/bs/procedures/waste_addSales.sql +++ b/db/routines/bs/procedures/waste_addSales.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`waste_addSales`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSales`() BEGIN DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY; DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; diff --git a/db/routines/bs/procedures/workerLabour_getData.sql b/db/routines/bs/procedures/workerLabour_getData.sql index 28e80365a..1f5a39fe0 100644 --- a/db/routines/bs/procedures/workerLabour_getData.sql +++ b/db/routines/bs/procedures/workerLabour_getData.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`workerLabour_getData`() BEGIN /** * Carga los datos de la plantilla de trabajadores, altas y bajas en la tabla workerLabourDataByMonth para facilitar el cálculo del gráfico en grafana. diff --git a/db/routines/bs/procedures/workerProductivity_add.sql b/db/routines/bs/procedures/workerProductivity_add.sql index 00d8ba9e8..3d7dbdca9 100644 --- a/db/routines/bs/procedures/workerProductivity_add.sql +++ b/db/routines/bs/procedures/workerProductivity_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`workerProductivity_add`() BEGIN DECLARE vDateFrom DATE; SELECT DATE_SUB(util.VN_CURDATE(),INTERVAL 30 DAY) INTO vDateFrom; diff --git a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql index 33e5ad3bd..a88567a21 100644 --- a/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql +++ b/db/routines/bs/triggers/clientNewBorn_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`clientNewBorn_beforeUpdate` BEFORE UPDATE ON `clientNewBorn` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeInsert.sql b/db/routines/bs/triggers/nightTask_beforeInsert.sql index 6d0313425..96f2b5291 100644 --- a/db/routines/bs/triggers/nightTask_beforeInsert.sql +++ b/db/routines/bs/triggers/nightTask_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`nightTask_beforeInsert` BEFORE INSERT ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/triggers/nightTask_beforeUpdate.sql b/db/routines/bs/triggers/nightTask_beforeUpdate.sql index 70186202c..1da1da8c3 100644 --- a/db/routines/bs/triggers/nightTask_beforeUpdate.sql +++ b/db/routines/bs/triggers/nightTask_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `bs`.`nightTask_beforeUpdate` BEFORE UPDATE ON `nightTask` FOR EACH ROW BEGIN diff --git a/db/routines/bs/views/lastIndicators.sql b/db/routines/bs/views/lastIndicators.sql index 15de2d97f..3fa04abd3 100644 --- a/db/routines/bs/views/lastIndicators.sql +++ b/db/routines/bs/views/lastIndicators.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`lastIndicators` AS SELECT `i`.`updated` AS `updated`, diff --git a/db/routines/bs/views/packingSpeed.sql b/db/routines/bs/views/packingSpeed.sql index 10b70c940..517706b15 100644 --- a/db/routines/bs/views/packingSpeed.sql +++ b/db/routines/bs/views/packingSpeed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`packingSpeed` AS SELECT HOUR(`e`.`created`) AS `hora`, diff --git a/db/routines/bs/views/ventas.sql b/db/routines/bs/views/ventas.sql index 3ebaf67c5..1fab2e91b 100644 --- a/db/routines/bs/views/ventas.sql +++ b/db/routines/bs/views/ventas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bs`.`ventas` AS SELECT `s`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/cache/events/cacheCalc_clean.sql b/db/routines/cache/events/cacheCalc_clean.sql index e201dac3a..e13bae98b 100644 --- a/db/routines/cache/events/cacheCalc_clean.sql +++ b/db/routines/cache/events/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `cache`.`cacheCalc_clean` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `cache`.`cacheCalc_clean` ON SCHEDULE EVERY 30 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/events/cache_clean.sql b/db/routines/cache/events/cache_clean.sql index 6b83f71a0..c5e247bd4 100644 --- a/db/routines/cache/events/cache_clean.sql +++ b/db/routines/cache/events/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `cache`.`cache_clean` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `cache`.`cache_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-28 09:29:18.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/cache/procedures/addressFriendship_Update.sql b/db/routines/cache/procedures/addressFriendship_Update.sql index 5e59d957a..f7fab8b9b 100644 --- a/db/routines/cache/procedures/addressFriendship_Update.sql +++ b/db/routines/cache/procedures/addressFriendship_Update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`addressFriendship_Update`() BEGIN REPLACE cache.addressFriendship diff --git a/db/routines/cache/procedures/availableNoRaids_refresh.sql b/db/routines/cache/procedures/availableNoRaids_refresh.sql index 7a6294283..37715d270 100644 --- a/db/routines/cache/procedures/availableNoRaids_refresh.sql +++ b/db/routines/cache/procedures/availableNoRaids_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vEndDate DATETIME; diff --git a/db/routines/cache/procedures/available_clean.sql b/db/routines/cache/procedures/available_clean.sql index 5a6401dc2..bb1f7302c 100644 --- a/db/routines/cache/procedures/available_clean.sql +++ b/db/routines/cache/procedures/available_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`available_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/available_refresh.sql b/db/routines/cache/procedures/available_refresh.sql index 11f02404e..abf023a41 100644 --- a/db/routines/cache/procedures/available_refresh.sql +++ b/db/routines/cache/procedures/available_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; diff --git a/db/routines/cache/procedures/cacheCalc_clean.sql b/db/routines/cache/procedures/cacheCalc_clean.sql index ddaf64910..5c588687e 100644 --- a/db/routines/cache/procedures/cacheCalc_clean.sql +++ b/db/routines/cache/procedures/cacheCalc_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cacheCalc_clean`() BEGIN DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW()); DELETE FROM cache_calc WHERE expires < vCleanTime; diff --git a/db/routines/cache/procedures/cache_calc_end.sql b/db/routines/cache/procedures/cache_calc_end.sql index eb4ea3207..b74a1b7fd 100644 --- a/db/routines/cache/procedures/cache_calc_end.sql +++ b/db/routines/cache/procedures/cache_calc_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) BEGIN DECLARE v_cache_name VARCHAR(255); DECLARE v_params VARCHAR(255); diff --git a/db/routines/cache/procedures/cache_calc_start.sql b/db/routines/cache/procedures/cache_calc_start.sql index 74526b36b..933d926ef 100644 --- a/db/routines/cache/procedures/cache_calc_start.sql +++ b/db/routines/cache/procedures/cache_calc_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) proc: BEGIN DECLARE v_valid BOOL; DECLARE v_lock_id VARCHAR(100); diff --git a/db/routines/cache/procedures/cache_calc_unlock.sql b/db/routines/cache/procedures/cache_calc_unlock.sql index 35733b772..5dc46d925 100644 --- a/db/routines/cache/procedures/cache_calc_unlock.sql +++ b/db/routines/cache/procedures/cache_calc_unlock.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_unlock`(IN `v_calc` INT) proc: BEGIN DECLARE v_cache_name VARCHAR(50); DECLARE v_params VARCHAR(100); diff --git a/db/routines/cache/procedures/cache_clean.sql b/db/routines/cache/procedures/cache_clean.sql index afeea9370..0fca75e63 100644 --- a/db/routines/cache/procedures/cache_clean.sql +++ b/db/routines/cache/procedures/cache_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`cache_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_clean`() NO SQL BEGIN CALL available_clean; diff --git a/db/routines/cache/procedures/clean.sql b/db/routines/cache/procedures/clean.sql index 3aeafe79a..5e6628689 100644 --- a/db/routines/cache/procedures/clean.sql +++ b/db/routines/cache/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`clean`() BEGIN DELETE FROM cache.departure_limit WHERE Fecha < util.VN_CURDATE() - INTERVAL 1 MONTH; END$$ diff --git a/db/routines/cache/procedures/departure_timing.sql b/db/routines/cache/procedures/departure_timing.sql index d683a75d9..778c2cd74 100644 --- a/db/routines/cache/procedures/departure_timing.sql +++ b/db/routines/cache/procedures/departure_timing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`departure_timing`(vWarehouseId INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/cache/procedures/last_buy_refresh.sql b/db/routines/cache/procedures/last_buy_refresh.sql index a8f7eae8d..555ae0b8d 100644 --- a/db/routines/cache/procedures/last_buy_refresh.sql +++ b/db/routines/cache/procedures/last_buy_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`last_buy_refresh`(vRefresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con la última compra y fecha de cada diff --git a/db/routines/cache/procedures/stock_refresh.sql b/db/routines/cache/procedures/stock_refresh.sql index e68688586..5ddc6c20e 100644 --- a/db/routines/cache/procedures/stock_refresh.sql +++ b/db/routines/cache/procedures/stock_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`stock_refresh`(v_refresh BOOL) proc: BEGIN /** * Crea o actualiza la cache con el disponible hasta el dí­a de diff --git a/db/routines/cache/procedures/visible_clean.sql b/db/routines/cache/procedures/visible_clean.sql index 5bc0c0fc1..b6f03c563 100644 --- a/db/routines/cache/procedures/visible_clean.sql +++ b/db/routines/cache/procedures/visible_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`visible_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`visible_clean`() BEGIN DROP TEMPORARY TABLE IF EXISTS tCalc; CREATE TEMPORARY TABLE tCalc diff --git a/db/routines/cache/procedures/visible_refresh.sql b/db/routines/cache/procedures/visible_refresh.sql index fa88de1e2..a673969d2 100644 --- a/db/routines/cache/procedures/visible_refresh.sql +++ b/db/routines/cache/procedures/visible_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT) proc:BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/dipole/procedures/clean.sql b/db/routines/dipole/procedures/clean.sql index 9054124b3..a9af64e15 100644 --- a/db/routines/dipole/procedures/clean.sql +++ b/db/routines/dipole/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `dipole`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `dipole`.`clean`() BEGIN DECLARE vFromDated DATE; diff --git a/db/routines/dipole/procedures/expedition_add.sql b/db/routines/dipole/procedures/expedition_add.sql index 6d6fb2fd8..70bc7930e 100644 --- a/db/routines/dipole/procedures/expedition_add.sql +++ b/db/routines/dipole/procedures/expedition_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `dipole`.`expedition_add`(vExpeditionFk INT, vPrinterFk INT, vIsPrinted BOOLEAN) BEGIN /** Insert records to print agency stickers and to inform sorter with new box * diff --git a/db/routines/dipole/views/expeditionControl.sql b/db/routines/dipole/views/expeditionControl.sql index 9a2c0a731..e26e83440 100644 --- a/db/routines/dipole/views/expeditionControl.sql +++ b/db/routines/dipole/views/expeditionControl.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `dipole`.`expeditionControl` AS SELECT cast(`epo`.`created` AS date) AS `fecha`, diff --git a/db/routines/edi/events/floramondo.sql b/db/routines/edi/events/floramondo.sql index d2639ac35..0a38f3537 100644 --- a/db/routines/edi/events/floramondo.sql +++ b/db/routines/edi/events/floramondo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `edi`.`floramondo` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `edi`.`floramondo` ON SCHEDULE EVERY 6 MINUTE STARTS '2022-01-28 09:52:45.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/edi/functions/imageName.sql b/db/routines/edi/functions/imageName.sql index a5cf33ff8..f2e52558f 100644 --- a/db/routines/edi/functions/imageName.sql +++ b/db/routines/edi/functions/imageName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/edi/procedures/clean.sql b/db/routines/edi/procedures/clean.sql index ce35b3e1d..71dd576e9 100644 --- a/db/routines/edi/procedures/clean.sql +++ b/db/routines/edi/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`clean`() BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/edi/procedures/deliveryInformation_Delete.sql b/db/routines/edi/procedures/deliveryInformation_Delete.sql index ac5b67e6f..b4f51515a 100644 --- a/db/routines/edi/procedures/deliveryInformation_Delete.sql +++ b/db/routines/edi/procedures/deliveryInformation_Delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`deliveryInformation_Delete`() BEGIN DECLARE vID INT; diff --git a/db/routines/edi/procedures/ekt_add.sql b/db/routines/edi/procedures/ekt_add.sql index 377c9b411..1cc67bb93 100644 --- a/db/routines/edi/procedures/ekt_add.sql +++ b/db/routines/edi/procedures/ekt_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_add`(vPutOrderFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_load.sql b/db/routines/edi/procedures/ekt_load.sql index 76f530183..190b09a86 100644 --- a/db/routines/edi/procedures/ekt_load.sql +++ b/db/routines/edi/procedures/ekt_load.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_load`(IN `vSelf` INT) proc:BEGIN /** * Carga los datos esenciales para el sistema EKT. diff --git a/db/routines/edi/procedures/ekt_loadNotBuy.sql b/db/routines/edi/procedures/ekt_loadNotBuy.sql index 867c99ab7..52697adc0 100644 --- a/db/routines/edi/procedures/ekt_loadNotBuy.sql +++ b/db/routines/edi/procedures/ekt_loadNotBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_loadNotBuy`() BEGIN /** * Ejecuta ekt_load para aquellos ekt de hoy que no tienen vn.buy diff --git a/db/routines/edi/procedures/ekt_refresh.sql b/db/routines/edi/procedures/ekt_refresh.sql index 2df736b0e..8ba438c0a 100644 --- a/db/routines/edi/procedures/ekt_refresh.sql +++ b/db/routines/edi/procedures/ekt_refresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_refresh`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_refresh`( `vSelf` INT, vMailFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/ekt_scan.sql b/db/routines/edi/procedures/ekt_scan.sql index c42e57ca4..0cf8bb466 100644 --- a/db/routines/edi/procedures/ekt_scan.sql +++ b/db/routines/edi/procedures/ekt_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`ekt_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca transaciones a partir de un codigo de barras, las marca como escaneadas diff --git a/db/routines/edi/procedures/floramondo_offerRefresh.sql b/db/routines/edi/procedures/floramondo_offerRefresh.sql index b091ab133..18d3f8b7e 100644 --- a/db/routines/edi/procedures/floramondo_offerRefresh.sql +++ b/db/routines/edi/procedures/floramondo_offerRefresh.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`() proc: BEGIN DECLARE vLanded DATETIME; DECLARE vDone INT DEFAULT FALSE; diff --git a/db/routines/edi/procedures/item_freeAdd.sql b/db/routines/edi/procedures/item_freeAdd.sql index 93842af6e..cb572e1b1 100644 --- a/db/routines/edi/procedures/item_freeAdd.sql +++ b/db/routines/edi/procedures/item_freeAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`item_freeAdd`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`item_freeAdd`() BEGIN /** * Rellena la tabla item_free con los id ausentes en vn.item diff --git a/db/routines/edi/procedures/item_getNewByEkt.sql b/db/routines/edi/procedures/item_getNewByEkt.sql index e169a0f00..a80d04817 100644 --- a/db/routines/edi/procedures/item_getNewByEkt.sql +++ b/db/routines/edi/procedures/item_getNewByEkt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`item_getNewByEkt`(vEktFk INT, OUT vItemFk INT) BEGIN /** diff --git a/db/routines/edi/procedures/mail_new.sql b/db/routines/edi/procedures/mail_new.sql index 4ed3d0c37..7bbf3f5cf 100644 --- a/db/routines/edi/procedures/mail_new.sql +++ b/db/routines/edi/procedures/mail_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `edi`.`mail_new`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`mail_new`( vMessageId VARCHAR(100) ,vSender VARCHAR(150) ,OUT vSelf INT diff --git a/db/routines/edi/triggers/item_feature_beforeInsert.sql b/db/routines/edi/triggers/item_feature_beforeInsert.sql index f2aabb91f..4e3e9cc0e 100644 --- a/db/routines/edi/triggers/item_feature_beforeInsert.sql +++ b/db/routines/edi/triggers/item_feature_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert` BEFORE INSERT ON `item_feature` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_afterUpdate.sql b/db/routines/edi/triggers/putOrder_afterUpdate.sql index 00bb228c5..b56ae4c66 100644 --- a/db/routines/edi/triggers/putOrder_afterUpdate.sql +++ b/db/routines/edi/triggers/putOrder_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_afterUpdate` AFTER UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeInsert.sql b/db/routines/edi/triggers/putOrder_beforeInsert.sql index 13274c33c..beddd191c 100644 --- a/db/routines/edi/triggers/putOrder_beforeInsert.sql +++ b/db/routines/edi/triggers/putOrder_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_beforeInsert` BEFORE INSERT ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/putOrder_beforeUpdate.sql b/db/routines/edi/triggers/putOrder_beforeUpdate.sql index c532f75d1..f18b77a0c 100644 --- a/db/routines/edi/triggers/putOrder_beforeUpdate.sql +++ b/db/routines/edi/triggers/putOrder_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`putOrder_beforeUpdate` BEFORE UPDATE ON `putOrder` FOR EACH ROW BEGIN diff --git a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql index 83c4beb4a..389ef9f1c 100644 --- a/db/routines/edi/triggers/supplyResponse_afterUpdate.sql +++ b/db/routines/edi/triggers/supplyResponse_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`supplyResponse_afterUpdate` AFTER UPDATE ON `supplyResponse` FOR EACH ROW BEGIN diff --git a/db/routines/edi/views/ektK2.sql b/db/routines/edi/views/ektK2.sql index 5c06221b1..299d26b01 100644 --- a/db/routines/edi/views/ektK2.sql +++ b/db/routines/edi/views/ektK2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektK2` AS SELECT `eek`.`id` AS `id`, diff --git a/db/routines/edi/views/ektRecent.sql b/db/routines/edi/views/ektRecent.sql index 83f839bd9..66ff7875e 100644 --- a/db/routines/edi/views/ektRecent.sql +++ b/db/routines/edi/views/ektRecent.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`ektRecent` AS SELECT `e`.`id` AS `id`, diff --git a/db/routines/edi/views/errorList.sql b/db/routines/edi/views/errorList.sql index 0273f8110..4e7cbc840 100644 --- a/db/routines/edi/views/errorList.sql +++ b/db/routines/edi/views/errorList.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`errorList` AS SELECT `po`.`id` AS `id`, diff --git a/db/routines/edi/views/supplyOffer.sql b/db/routines/edi/views/supplyOffer.sql index e4e84df74..c4a8582a1 100644 --- a/db/routines/edi/views/supplyOffer.sql +++ b/db/routines/edi/views/supplyOffer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `edi`.`supplyOffer` AS SELECT `sr`.`vmpID` AS `vmpID`, diff --git a/db/routines/floranet/procedures/catalogue_findById.sql b/db/routines/floranet/procedures/catalogue_findById.sql index ab97d1ada..aca6ca4d6 100644 --- a/db/routines/floranet/procedures/catalogue_findById.sql +++ b/db/routines/floranet/procedures/catalogue_findById.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.catalogue_findById(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/catalogue_get.sql b/db/routines/floranet/procedures/catalogue_get.sql index d4dd0c69f..1e224c810 100644 --- a/db/routines/floranet/procedures/catalogue_get.sql +++ b/db/routines/floranet/procedures/catalogue_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.catalogue_get(vLanded DATE, vPostalCode VARCHAR(15)) READS SQL DATA proc:BEGIN /** diff --git a/db/routines/floranet/procedures/contact_request.sql b/db/routines/floranet/procedures/contact_request.sql index 6d05edaf7..2132a86fc 100644 --- a/db/routines/floranet/procedures/contact_request.sql +++ b/db/routines/floranet/procedures/contact_request.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.contact_request; DELIMITER $$ $$ -CREATE DEFINER=`vn`@`localhost` +CREATE DEFINER=`root`@`localhost` PROCEDURE floranet.contact_request( vName VARCHAR(100), vPhone VARCHAR(15), diff --git a/db/routines/floranet/procedures/deliveryDate_get.sql b/db/routines/floranet/procedures/deliveryDate_get.sql index 84620dfed..70cb48818 100644 --- a/db/routines/floranet/procedures/deliveryDate_get.sql +++ b/db/routines/floranet/procedures/deliveryDate_get.sql @@ -1,6 +1,6 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `floranet`.`deliveryDate_get`(vPostalCode VARCHAR(15)) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/order_confirm.sql b/db/routines/floranet/procedures/order_confirm.sql index 2e59ed737..98e15bbab 100644 --- a/db/routines/floranet/procedures/order_confirm.sql +++ b/db/routines/floranet/procedures/order_confirm.sql @@ -1,7 +1,7 @@ DELIMITER $$ $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT) READS SQL DATA proc:BEGIN diff --git a/db/routines/floranet/procedures/order_put.sql b/db/routines/floranet/procedures/order_put.sql index 7ab766a8d..c5eb71472 100644 --- a/db/routines/floranet/procedures/order_put.sql +++ b/db/routines/floranet/procedures/order_put.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE floranet.order_put(vJsonData JSON) READS SQL DATA BEGIN /** diff --git a/db/routines/floranet/procedures/sliders_get.sql b/db/routines/floranet/procedures/sliders_get.sql index 096cfbde6..bafda4732 100644 --- a/db/routines/floranet/procedures/sliders_get.sql +++ b/db/routines/floranet/procedures/sliders_get.sql @@ -2,7 +2,7 @@ DROP PROCEDURE IF EXISTS floranet.sliders_get; DELIMITER $$ $$ -CREATE DEFINER=`vn`@`localhost` PROCEDURE floranet.sliders_get() +CREATE DEFINER=`root`@`localhost` PROCEDURE floranet.sliders_get() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/functions/myClient_getDebt.sql b/db/routines/hedera/functions/myClient_getDebt.sql index 7a3678c62..7f981904e 100644 --- a/db/routines/hedera/functions/myClient_getDebt.sql +++ b/db/routines/hedera/functions/myClient_getDebt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`myClient_getDebt`(vDate DATE) RETURNS decimal(10,2) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/myUser_checkRestPriv.sql b/db/routines/hedera/functions/myUser_checkRestPriv.sql index c074a2073..874499ce9 100644 --- a/db/routines/hedera/functions/myUser_checkRestPriv.sql +++ b/db/routines/hedera/functions/myUser_checkRestPriv.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`myUser_checkRestPriv`(vMethodPath VARCHAR(255)) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/hedera/functions/order_getTotal.sql b/db/routines/hedera/functions/order_getTotal.sql index 2a6c90182..2edb6340d 100644 --- a/db/routines/hedera/functions/order_getTotal.sql +++ b/db/routines/hedera/functions/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `hedera`.`order_getTotal`(vSelf INT) RETURNS decimal(10,2) DETERMINISTIC READS SQL DATA diff --git a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql index d25346f34..c9fa54f36 100644 --- a/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql +++ b/db/routines/hedera/procedures/catalog_calcFromMyAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/image_ref.sql b/db/routines/hedera/procedures/image_ref.sql index 8fb344c1c..4c6e925fe 100644 --- a/db/routines/hedera/procedures/image_ref.sql +++ b/db/routines/hedera/procedures/image_ref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`image_ref`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`image_ref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/image_unref.sql b/db/routines/hedera/procedures/image_unref.sql index 95dda1043..146fc486b 100644 --- a/db/routines/hedera/procedures/image_unref.sql +++ b/db/routines/hedera/procedures/image_unref.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`image_unref`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`image_unref`( vCollection VARCHAR(255), vName VARCHAR(255) ) diff --git a/db/routines/hedera/procedures/item_calcCatalog.sql b/db/routines/hedera/procedures/item_calcCatalog.sql index 0afe79d5a..fae89bd5c 100644 --- a/db/routines/hedera/procedures/item_calcCatalog.sql +++ b/db/routines/hedera/procedures/item_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_calcCatalog`( vSelf INT, vLanded DATE, vAddressFk INT, diff --git a/db/routines/hedera/procedures/item_getVisible.sql b/db/routines/hedera/procedures/item_getVisible.sql index 3ac6da98a..2f4ef32ab 100644 --- a/db/routines/hedera/procedures/item_getVisible.sql +++ b/db/routines/hedera/procedures/item_getVisible.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_getVisible`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_getVisible`( vWarehouse TINYINT, vDate DATE, vType INT, diff --git a/db/routines/hedera/procedures/item_listAllocation.sql b/db/routines/hedera/procedures/item_listAllocation.sql index c7fdf6aa7..4a9c723f5 100644 --- a/db/routines/hedera/procedures/item_listAllocation.sql +++ b/db/routines/hedera/procedures/item_listAllocation.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN) BEGIN /** * Lists visible items and it's box sizes of the specified diff --git a/db/routines/hedera/procedures/myOrder_addItem.sql b/db/routines/hedera/procedures/myOrder_addItem.sql index 90804017c..b5ea34ea2 100644 --- a/db/routines/hedera/procedures/myOrder_addItem.sql +++ b/db/routines/hedera/procedures/myOrder_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql index dd6e1b476..05c2a41f2 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql index b593b6492..b83286a2b 100644 --- a/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/myOrder_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/myOrder_checkConfig.sql b/db/routines/hedera/procedures/myOrder_checkConfig.sql index ca33db032..ca810805c 100644 --- a/db/routines/hedera/procedures/myOrder_checkConfig.sql +++ b/db/routines/hedera/procedures/myOrder_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_checkConfig`(vSelf INT) proc: BEGIN /** * Comprueba que la cesta esta creada y que su configuración es diff --git a/db/routines/hedera/procedures/myOrder_checkMine.sql b/db/routines/hedera/procedures/myOrder_checkMine.sql index 7ac370cb6..7e00b2f7f 100644 --- a/db/routines/hedera/procedures/myOrder_checkMine.sql +++ b/db/routines/hedera/procedures/myOrder_checkMine.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_checkMine`(vSelf INT) proc: BEGIN /** * Check that order is owned by current user, otherwise throws an error. diff --git a/db/routines/hedera/procedures/myOrder_configure.sql b/db/routines/hedera/procedures/myOrder_configure.sql index c16406ee7..185384fc0 100644 --- a/db/routines/hedera/procedures/myOrder_configure.sql +++ b/db/routines/hedera/procedures/myOrder_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_configureForGuest.sql b/db/routines/hedera/procedures/myOrder_configureForGuest.sql index aa4d0fde7..9d4ede5e0 100644 --- a/db/routines/hedera/procedures/myOrder_configureForGuest.sql +++ b/db/routines/hedera/procedures/myOrder_configureForGuest.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_configureForGuest`(OUT vSelf INT) BEGIN DECLARE vMethod VARCHAR(255); DECLARE vAgency INT; diff --git a/db/routines/hedera/procedures/myOrder_confirm.sql b/db/routines/hedera/procedures/myOrder_confirm.sql index 4966bbf9f..2117ea448 100644 --- a/db/routines/hedera/procedures/myOrder_confirm.sql +++ b/db/routines/hedera/procedures/myOrder_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_confirm`(vSelf INT) BEGIN CALL myOrder_checkMine(vSelf); CALL order_checkConfig(vSelf); diff --git a/db/routines/hedera/procedures/myOrder_create.sql b/db/routines/hedera/procedures/myOrder_create.sql index f945c5af5..251948bc6 100644 --- a/db/routines/hedera/procedures/myOrder_create.sql +++ b/db/routines/hedera/procedures/myOrder_create.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_create`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_create`( OUT vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/myOrder_getAvailable.sql b/db/routines/hedera/procedures/myOrder_getAvailable.sql index c94a339a6..00ac60563 100644 --- a/db/routines/hedera/procedures/myOrder_getAvailable.sql +++ b/db/routines/hedera/procedures/myOrder_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/myOrder_getTax.sql b/db/routines/hedera/procedures/myOrder_getTax.sql index 68b2dd4c8..826a37efd 100644 --- a/db/routines/hedera/procedures/myOrder_getTax.sql +++ b/db/routines/hedera/procedures/myOrder_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT) READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/myOrder_newWithAddress.sql b/db/routines/hedera/procedures/myOrder_newWithAddress.sql index b4ec4aed4..ec3f07d9f 100644 --- a/db/routines/hedera/procedures/myOrder_newWithAddress.sql +++ b/db/routines/hedera/procedures/myOrder_newWithAddress.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_newWithAddress`( OUT vSelf INT, vLandingDate DATE, vAddressFk INT) diff --git a/db/routines/hedera/procedures/myOrder_newWithDate.sql b/db/routines/hedera/procedures/myOrder_newWithDate.sql index a9c4c8f7f..4d1837e2b 100644 --- a/db/routines/hedera/procedures/myOrder_newWithDate.sql +++ b/db/routines/hedera/procedures/myOrder_newWithDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_newWithDate`( OUT vSelf INT, vLandingDate DATE) BEGIN diff --git a/db/routines/hedera/procedures/myTicket_get.sql b/db/routines/hedera/procedures/myTicket_get.sql index 1c95aea36..7d203aca6 100644 --- a/db/routines/hedera/procedures/myTicket_get.sql +++ b/db/routines/hedera/procedures/myTicket_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_get`(vSelf INT) BEGIN /** * Returns a current user ticket header. diff --git a/db/routines/hedera/procedures/myTicket_getPackages.sql b/db/routines/hedera/procedures/myTicket_getPackages.sql index 8a03a6e35..8ed486dff 100644 --- a/db/routines/hedera/procedures/myTicket_getPackages.sql +++ b/db/routines/hedera/procedures/myTicket_getPackages.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getPackages`(vSelf INT) BEGIN /** * Returns a current user ticket packages. diff --git a/db/routines/hedera/procedures/myTicket_getRows.sql b/db/routines/hedera/procedures/myTicket_getRows.sql index 53547f2b2..0a99ce892 100644 --- a/db/routines/hedera/procedures/myTicket_getRows.sql +++ b/db/routines/hedera/procedures/myTicket_getRows.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getRows`(vSelf INT) BEGIN SELECT r.itemFk, r.quantity, r.concept, r.price, r.discount, i.category, i.size, i.stems, i.inkFk, diff --git a/db/routines/hedera/procedures/myTicket_getServices.sql b/db/routines/hedera/procedures/myTicket_getServices.sql index 3d982d25a..56ca52c19 100644 --- a/db/routines/hedera/procedures/myTicket_getServices.sql +++ b/db/routines/hedera/procedures/myTicket_getServices.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_getServices`(vSelf INT) BEGIN /** * Returns a current user ticket services. diff --git a/db/routines/hedera/procedures/myTicket_list.sql b/db/routines/hedera/procedures/myTicket_list.sql index cfbc064e3..b063ce25c 100644 --- a/db/routines/hedera/procedures/myTicket_list.sql +++ b/db/routines/hedera/procedures/myTicket_list.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_list`(vFrom DATE, vTo DATE) BEGIN /** * Returns the current user list of tickets between two dates reange. diff --git a/db/routines/hedera/procedures/myTicket_logAccess.sql b/db/routines/hedera/procedures/myTicket_logAccess.sql index aa0a1d380..1dcee8dd6 100644 --- a/db/routines/hedera/procedures/myTicket_logAccess.sql +++ b/db/routines/hedera/procedures/myTicket_logAccess.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTicket_logAccess`(vSelf INT) BEGIN /** * Logs an access to a ticket. diff --git a/db/routines/hedera/procedures/myTpvTransaction_end.sql b/db/routines/hedera/procedures/myTpvTransaction_end.sql index 197207833..3884f0e37 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_end.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/myTpvTransaction_start.sql b/db/routines/hedera/procedures/myTpvTransaction_start.sql index e3d5023b8..71bae97fa 100644 --- a/db/routines/hedera/procedures/myTpvTransaction_start.sql +++ b/db/routines/hedera/procedures/myTpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_start`( vAmount INT, vCompany INT) BEGIN diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index 74bad2ffc..f690f9aa6 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_addItem`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_addItem`( vSelf INT, vWarehouse INT, vItem INT, diff --git a/db/routines/hedera/procedures/order_calcCatalog.sql b/db/routines/hedera/procedures/order_calcCatalog.sql index efdb9d190..239e01788 100644 --- a/db/routines/hedera/procedures/order_calcCatalog.sql +++ b/db/routines/hedera/procedures/order_calcCatalog.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalog`(vSelf INT) BEGIN /** * Gets the availability and prices for order items. diff --git a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql index ae57ad5ba..517e9dab9 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFromItem.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFromItem.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFromItem`(vSelf INT, vItem INT) BEGIN /** * Gets the availability and prices for the given item diff --git a/db/routines/hedera/procedures/order_calcCatalogFull.sql b/db/routines/hedera/procedures/order_calcCatalogFull.sql index fedb73903..41408c5e8 100644 --- a/db/routines/hedera/procedures/order_calcCatalogFull.sql +++ b/db/routines/hedera/procedures/order_calcCatalogFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_calcCatalogFull`(vSelf INT) BEGIN /** * Gets the availability and prices for the given items diff --git a/db/routines/hedera/procedures/order_checkConfig.sql b/db/routines/hedera/procedures/order_checkConfig.sql index 88799b2de..9dbea1a76 100644 --- a/db/routines/hedera/procedures/order_checkConfig.sql +++ b/db/routines/hedera/procedures/order_checkConfig.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_checkConfig`(vSelf INT) BEGIN /** * Comprueba que la configuración del pedido es correcta. diff --git a/db/routines/hedera/procedures/order_checkEditable.sql b/db/routines/hedera/procedures/order_checkEditable.sql index 8ff7e5996..512e6e6f1 100644 --- a/db/routines/hedera/procedures/order_checkEditable.sql +++ b/db/routines/hedera/procedures/order_checkEditable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT) BEGIN /** * Cheks if order is editable. diff --git a/db/routines/hedera/procedures/order_configure.sql b/db/routines/hedera/procedures/order_configure.sql index 42b403444..b03acec08 100644 --- a/db/routines/hedera/procedures/order_configure.sql +++ b/db/routines/hedera/procedures/order_configure.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_configure`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_configure`( vSelf INT, vDelivery DATE, vDeliveryMethod VARCHAR(45), diff --git a/db/routines/hedera/procedures/order_confirm.sql b/db/routines/hedera/procedures/order_confirm.sql index bf70b4645..6fd53b4ea 100644 --- a/db/routines/hedera/procedures/order_confirm.sql +++ b/db/routines/hedera/procedures/order_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_confirm`(vSelf INT) BEGIN /** * Confirms an order, creating each of its tickets on diff --git a/db/routines/hedera/procedures/order_confirmWithUser.sql b/db/routines/hedera/procedures/order_confirmWithUser.sql index a08f415cd..2b033b704 100644 --- a/db/routines/hedera/procedures/order_confirmWithUser.sql +++ b/db/routines/hedera/procedures/order_confirmWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_confirmWithUser`( vSelf INT, vUserFk INT ) diff --git a/db/routines/hedera/procedures/order_getAvailable.sql b/db/routines/hedera/procedures/order_getAvailable.sql index 12a5297d6..2b7d60e33 100644 --- a/db/routines/hedera/procedures/order_getAvailable.sql +++ b/db/routines/hedera/procedures/order_getAvailable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getAvailable`(vSelf INT) BEGIN /** * Gets the available items list. diff --git a/db/routines/hedera/procedures/order_getTax.sql b/db/routines/hedera/procedures/order_getTax.sql index 1c0950000..d24ffe7ef 100644 --- a/db/routines/hedera/procedures/order_getTax.sql +++ b/db/routines/hedera/procedures/order_getTax.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getTax`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getTax`() READS SQL DATA BEGIN /** diff --git a/db/routines/hedera/procedures/order_getTotal.sql b/db/routines/hedera/procedures/order_getTotal.sql index a8c872aec..c0b8d40ae 100644 --- a/db/routines/hedera/procedures/order_getTotal.sql +++ b/db/routines/hedera/procedures/order_getTotal.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_getTotal`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_getTotal`() BEGIN /** * Calcula el total con IVA para un conjunto de orders. diff --git a/db/routines/hedera/procedures/order_recalc.sql b/db/routines/hedera/procedures/order_recalc.sql index a76c34f2c..1398b49f6 100644 --- a/db/routines/hedera/procedures/order_recalc.sql +++ b/db/routines/hedera/procedures/order_recalc.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_recalc`(vSelf INT) BEGIN /** * Recalculates the order total. diff --git a/db/routines/hedera/procedures/order_update.sql b/db/routines/hedera/procedures/order_update.sql index 0a7981072..207cad09f 100644 --- a/db/routines/hedera/procedures/order_update.sql +++ b/db/routines/hedera/procedures/order_update.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_update`(vSelf INT) proc: BEGIN /** * Actualiza las líneas de un pedido. diff --git a/db/routines/hedera/procedures/survey_vote.sql b/db/routines/hedera/procedures/survey_vote.sql index b54ce2736..46c31393a 100644 --- a/db/routines/hedera/procedures/survey_vote.sql +++ b/db/routines/hedera/procedures/survey_vote.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`survey_vote`(vAnswer INT) BEGIN DECLARE vSurvey INT; DECLARE vCount TINYINT; diff --git a/db/routines/hedera/procedures/tpvTransaction_confirm.sql b/db/routines/hedera/procedures/tpvTransaction_confirm.sql index e14340b6b..60a6d8452 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirm.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirm.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirm`( vAmount INT ,vOrder INT ,vMerchant INT diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql index d6cfafd6c..b6a71af01 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmAll`(vDate DATE) BEGIN /** * Confirma todas las transacciones confirmadas por el cliente pero no diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql index a6a476e5b..7cbdb65c6 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmById.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmById.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT) BEGIN /** * Confirma manualmente una transacción espedificando su identificador. diff --git a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql index 8082f9abc..7ca0e44e2 100644 --- a/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql +++ b/db/routines/hedera/procedures/tpvTransaction_confirmFromExport.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmFromExport`() BEGIN /** * Confirms multiple transactions comming from Redsys "canales" exported CSV. diff --git a/db/routines/hedera/procedures/tpvTransaction_end.sql b/db/routines/hedera/procedures/tpvTransaction_end.sql index 1c03ffe74..ec0a0224d 100644 --- a/db/routines/hedera/procedures/tpvTransaction_end.sql +++ b/db/routines/hedera/procedures/tpvTransaction_end.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN diff --git a/db/routines/hedera/procedures/tpvTransaction_start.sql b/db/routines/hedera/procedures/tpvTransaction_start.sql index 7ed63c124..55fd922da 100644 --- a/db/routines/hedera/procedures/tpvTransaction_start.sql +++ b/db/routines/hedera/procedures/tpvTransaction_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_start`( vAmount INT, vCompany INT, vUser INT) diff --git a/db/routines/hedera/procedures/tpvTransaction_undo.sql b/db/routines/hedera/procedures/tpvTransaction_undo.sql index 8eabba3c1..f31ba6a80 100644 --- a/db/routines/hedera/procedures/tpvTransaction_undo.sql +++ b/db/routines/hedera/procedures/tpvTransaction_undo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_undo`(vSelf INT) p: BEGIN DECLARE vCustomer INT; DECLARE vAmount DOUBLE; diff --git a/db/routines/hedera/procedures/visitUser_new.sql b/db/routines/hedera/procedures/visitUser_new.sql index 1a4e3a08c..3c299f209 100644 --- a/db/routines/hedera/procedures/visitUser_new.sql +++ b/db/routines/hedera/procedures/visitUser_new.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visitUser_new`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visitUser_new`( vAccess INT ,vSsid VARCHAR(64) ) diff --git a/db/routines/hedera/procedures/visit_listByBrowser.sql b/db/routines/hedera/procedures/visit_listByBrowser.sql index dcf3fdad9..2fa45b8f2 100644 --- a/db/routines/hedera/procedures/visit_listByBrowser.sql +++ b/db/routines/hedera/procedures/visit_listByBrowser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visit_listByBrowser`(vFrom DATE, vTo DATE) BEGIN /** * Lists visits grouped by browser. diff --git a/db/routines/hedera/procedures/visit_register.sql b/db/routines/hedera/procedures/visit_register.sql index 345527b25..80b6f16a9 100644 --- a/db/routines/hedera/procedures/visit_register.sql +++ b/db/routines/hedera/procedures/visit_register.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `hedera`.`visit_register`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`visit_register`( vVisit INT ,vPlatform VARCHAR(30) ,vBrowser VARCHAR(30) diff --git a/db/routines/hedera/triggers/link_afterDelete.sql b/db/routines/hedera/triggers/link_afterDelete.sql index e9efa7f91..571540cba 100644 --- a/db/routines/hedera/triggers/link_afterDelete.sql +++ b/db/routines/hedera/triggers/link_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterDelete` AFTER DELETE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterInsert.sql b/db/routines/hedera/triggers/link_afterInsert.sql index af6989e44..e3f163a9e 100644 --- a/db/routines/hedera/triggers/link_afterInsert.sql +++ b/db/routines/hedera/triggers/link_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterInsert` AFTER INSERT ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/link_afterUpdate.sql b/db/routines/hedera/triggers/link_afterUpdate.sql index c10f20b25..7ffe2a335 100644 --- a/db/routines/hedera/triggers/link_afterUpdate.sql +++ b/db/routines/hedera/triggers/link_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`link_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`link_afterUpdate` AFTER UPDATE ON `link` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterDelete.sql b/db/routines/hedera/triggers/news_afterDelete.sql index 73a85ba7b..07a0403e0 100644 --- a/db/routines/hedera/triggers/news_afterDelete.sql +++ b/db/routines/hedera/triggers/news_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterDelete` AFTER DELETE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterInsert.sql b/db/routines/hedera/triggers/news_afterInsert.sql index 7d5c4ded7..61e6078ef 100644 --- a/db/routines/hedera/triggers/news_afterInsert.sql +++ b/db/routines/hedera/triggers/news_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterInsert` AFTER INSERT ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/news_afterUpdate.sql b/db/routines/hedera/triggers/news_afterUpdate.sql index e0a74f1ca..15ea32f1d 100644 --- a/db/routines/hedera/triggers/news_afterUpdate.sql +++ b/db/routines/hedera/triggers/news_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`news_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`news_afterUpdate` AFTER UPDATE ON `news` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/orderRow_beforeInsert.sql b/db/routines/hedera/triggers/orderRow_beforeInsert.sql index b35123f4a..0c9f31bab 100644 --- a/db/routines/hedera/triggers/orderRow_beforeInsert.sql +++ b/db/routines/hedera/triggers/orderRow_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`orderRow_beforeInsert` BEFORE INSERT ON `orderRow` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterInsert.sql b/db/routines/hedera/triggers/order_afterInsert.sql index 7070ede02..2fe83ee8f 100644 --- a/db/routines/hedera/triggers/order_afterInsert.sql +++ b/db/routines/hedera/triggers/order_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_afterInsert` AFTER INSERT ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_afterUpdate.sql b/db/routines/hedera/triggers/order_afterUpdate.sql index 3b1cd9df1..25f51b3f0 100644 --- a/db/routines/hedera/triggers/order_afterUpdate.sql +++ b/db/routines/hedera/triggers/order_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_afterUpdate` AFTER UPDATE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/triggers/order_beforeDelete.sql b/db/routines/hedera/triggers/order_beforeDelete.sql index da6259248..eb602be89 100644 --- a/db/routines/hedera/triggers/order_beforeDelete.sql +++ b/db/routines/hedera/triggers/order_beforeDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `hedera`.`order_beforeDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_beforeDelete` BEFORE DELETE ON `order` FOR EACH ROW BEGIN diff --git a/db/routines/hedera/views/mainAccountBank.sql b/db/routines/hedera/views/mainAccountBank.sql index 9fc3b3c3a..3130a1614 100644 --- a/db/routines/hedera/views/mainAccountBank.sql +++ b/db/routines/hedera/views/mainAccountBank.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`mainAccountBank` AS SELECT `e`.`name` AS `name`, diff --git a/db/routines/hedera/views/messageL10n.sql b/db/routines/hedera/views/messageL10n.sql index 80f6638ad..6488de6a9 100644 --- a/db/routines/hedera/views/messageL10n.sql +++ b/db/routines/hedera/views/messageL10n.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`messageL10n` AS SELECT `m`.`code` AS `code`, diff --git a/db/routines/hedera/views/myAddress.sql b/db/routines/hedera/views/myAddress.sql index 80809c5ea..ee8d87759 100644 --- a/db/routines/hedera/views/myAddress.sql +++ b/db/routines/hedera/views/myAddress.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myAddress` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myBasketDefaults.sql b/db/routines/hedera/views/myBasketDefaults.sql index 43df18687..475212da1 100644 --- a/db/routines/hedera/views/myBasketDefaults.sql +++ b/db/routines/hedera/views/myBasketDefaults.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myBasketDefaults` AS SELECT coalesce(`dm`.`code`, `cm`.`code`) AS `deliveryMethod`, diff --git a/db/routines/hedera/views/myClient.sql b/db/routines/hedera/views/myClient.sql index 032cc5f5f..ef7159549 100644 --- a/db/routines/hedera/views/myClient.sql +++ b/db/routines/hedera/views/myClient.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myClient` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/hedera/views/myInvoice.sql b/db/routines/hedera/views/myInvoice.sql index 40527ac0c..dd1a917ad 100644 --- a/db/routines/hedera/views/myInvoice.sql +++ b/db/routines/hedera/views/myInvoice.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myInvoice` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/hedera/views/myMenu.sql b/db/routines/hedera/views/myMenu.sql index 60f464e7a..94e58835d 100644 --- a/db/routines/hedera/views/myMenu.sql +++ b/db/routines/hedera/views/myMenu.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myMenu` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrder.sql b/db/routines/hedera/views/myOrder.sql index ca9283298..78becd884 100644 --- a/db/routines/hedera/views/myOrder.sql +++ b/db/routines/hedera/views/myOrder.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrder` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderRow.sql b/db/routines/hedera/views/myOrderRow.sql index ddf91a24f..af42b0745 100644 --- a/db/routines/hedera/views/myOrderRow.sql +++ b/db/routines/hedera/views/myOrderRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderRow` AS SELECT `orw`.`id` AS `id`, diff --git a/db/routines/hedera/views/myOrderTicket.sql b/db/routines/hedera/views/myOrderTicket.sql index 5fa541855..fa8220b55 100644 --- a/db/routines/hedera/views/myOrderTicket.sql +++ b/db/routines/hedera/views/myOrderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myOrderTicket` AS SELECT `o`.`id` AS `orderFk`, diff --git a/db/routines/hedera/views/myTicket.sql b/db/routines/hedera/views/myTicket.sql index 4edb742c8..f17cda9a4 100644 --- a/db/routines/hedera/views/myTicket.sql +++ b/db/routines/hedera/views/myTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicket` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketRow.sql b/db/routines/hedera/views/myTicketRow.sql index 69b11625f..5afff812b 100644 --- a/db/routines/hedera/views/myTicketRow.sql +++ b/db/routines/hedera/views/myTicketRow.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketRow` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketService.sql b/db/routines/hedera/views/myTicketService.sql index 7cb23a862..feb839873 100644 --- a/db/routines/hedera/views/myTicketService.sql +++ b/db/routines/hedera/views/myTicketService.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketService` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTicketState.sql b/db/routines/hedera/views/myTicketState.sql index 8d3d276b8..530441e3b 100644 --- a/db/routines/hedera/views/myTicketState.sql +++ b/db/routines/hedera/views/myTicketState.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTicketState` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/myTpvTransaction.sql b/db/routines/hedera/views/myTpvTransaction.sql index a860ed29d..98694065f 100644 --- a/db/routines/hedera/views/myTpvTransaction.sql +++ b/db/routines/hedera/views/myTpvTransaction.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`myTpvTransaction` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/hedera/views/orderTicket.sql b/db/routines/hedera/views/orderTicket.sql index b0c55bc7d..c35077935 100644 --- a/db/routines/hedera/views/orderTicket.sql +++ b/db/routines/hedera/views/orderTicket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`orderTicket` AS SELECT `b`.`orderFk` AS `orderFk`, diff --git a/db/routines/hedera/views/order_component.sql b/db/routines/hedera/views/order_component.sql index e83114724..b3eb7522b 100644 --- a/db/routines/hedera/views/order_component.sql +++ b/db/routines/hedera/views/order_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_component` AS SELECT `t`.`rowFk` AS `order_row_id`, diff --git a/db/routines/hedera/views/order_row.sql b/db/routines/hedera/views/order_row.sql index ab25774f6..f69fd98a3 100644 --- a/db/routines/hedera/views/order_row.sql +++ b/db/routines/hedera/views/order_row.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hedera`.`order_row` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/pbx/functions/clientFromPhone.sql b/db/routines/pbx/functions/clientFromPhone.sql index b8186e0e0..dc18810aa 100644 --- a/db/routines/pbx/functions/clientFromPhone.sql +++ b/db/routines/pbx/functions/clientFromPhone.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `pbx`.`clientFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/pbx/functions/phone_format.sql b/db/routines/pbx/functions/phone_format.sql index b42dfe96b..dc697386a 100644 --- a/db/routines/pbx/functions/phone_format.sql +++ b/db/routines/pbx/functions/phone_format.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `pbx`.`phone_format`(vPhone VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/pbx/procedures/phone_isValid.sql b/db/routines/pbx/procedures/phone_isValid.sql index be3d2968a..083a3e54b 100644 --- a/db/routines/pbx/procedures/phone_isValid.sql +++ b/db/routines/pbx/procedures/phone_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`phone_isValid`(vPhone VARCHAR(255)) BEGIN /** * Check if an phone has the correct format and diff --git a/db/routines/pbx/procedures/queue_isValid.sql b/db/routines/pbx/procedures/queue_isValid.sql index a07bc342b..52c752e09 100644 --- a/db/routines/pbx/procedures/queue_isValid.sql +++ b/db/routines/pbx/procedures/queue_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`queue_isValid`(vQueue VARCHAR(255)) BEGIN /** * Check if an queue has the correct format and diff --git a/db/routines/pbx/procedures/sip_getExtension.sql b/db/routines/pbx/procedures/sip_getExtension.sql index 640da5a3e..25047fa1f 100644 --- a/db/routines/pbx/procedures/sip_getExtension.sql +++ b/db/routines/pbx/procedures/sip_getExtension.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_getExtension`(vUserId INT(10)) BEGIN /* diff --git a/db/routines/pbx/procedures/sip_isValid.sql b/db/routines/pbx/procedures/sip_isValid.sql index d9c45831d..4a0182bcc 100644 --- a/db/routines/pbx/procedures/sip_isValid.sql +++ b/db/routines/pbx/procedures/sip_isValid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_isValid`(vExtension VARCHAR(255)) BEGIN /** * Check if an extension has the correct format and diff --git a/db/routines/pbx/procedures/sip_setPassword.sql b/db/routines/pbx/procedures/sip_setPassword.sql index 146e7a502..14e0b05c5 100644 --- a/db/routines/pbx/procedures/sip_setPassword.sql +++ b/db/routines/pbx/procedures/sip_setPassword.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `pbx`.`sip_setPassword`( vUser VARCHAR(255), vPassword VARCHAR(255) ) diff --git a/db/routines/pbx/triggers/blacklist_beforeInsert.sql b/db/routines/pbx/triggers/blacklist_beforeInsert.sql index 6bc7909d8..ff55c2647 100644 --- a/db/routines/pbx/triggers/blacklist_beforeInsert.sql +++ b/db/routines/pbx/triggers/blacklist_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`blacklist_beforeInsert` BEFORE INSERT ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql index 741b34c0a..84f2c4bbb 100644 --- a/db/routines/pbx/triggers/blacklist_berforeUpdate.sql +++ b/db/routines/pbx/triggers/blacklist_berforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`blacklist_berforeUpdate` BEFORE UPDATE ON `blacklist` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeInsert.sql b/db/routines/pbx/triggers/followme_beforeInsert.sql index 38413f53a..69f11c5e6 100644 --- a/db/routines/pbx/triggers/followme_beforeInsert.sql +++ b/db/routines/pbx/triggers/followme_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`followme_beforeInsert` BEFORE INSERT ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/followme_beforeUpdate.sql b/db/routines/pbx/triggers/followme_beforeUpdate.sql index 67c243c7f..697c18974 100644 --- a/db/routines/pbx/triggers/followme_beforeUpdate.sql +++ b/db/routines/pbx/triggers/followme_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`followme_beforeUpdate` BEFORE UPDATE ON `followme` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql index 015a227ae..debe9c201 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeInsert.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queuePhone_beforeInsert` BEFORE INSERT ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql index 892a10acd..9734cc277 100644 --- a/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queuePhone_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queuePhone_beforeUpdate` BEFORE UPDATE ON `queuePhone` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeInsert.sql b/db/routines/pbx/triggers/queue_beforeInsert.sql index f601d8688..4644dea89 100644 --- a/db/routines/pbx/triggers/queue_beforeInsert.sql +++ b/db/routines/pbx/triggers/queue_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queue_beforeInsert` BEFORE INSERT ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/queue_beforeUpdate.sql b/db/routines/pbx/triggers/queue_beforeUpdate.sql index 22e0afc67..a2923045e 100644 --- a/db/routines/pbx/triggers/queue_beforeUpdate.sql +++ b/db/routines/pbx/triggers/queue_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`queue_beforeUpdate` BEFORE UPDATE ON `queue` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterInsert.sql b/db/routines/pbx/triggers/sip_afterInsert.sql index ab1123106..7f0643a98 100644 --- a/db/routines/pbx/triggers/sip_afterInsert.sql +++ b/db/routines/pbx/triggers/sip_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_afterInsert` AFTER INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_afterUpdate.sql b/db/routines/pbx/triggers/sip_afterUpdate.sql index 2556d574c..d14df040c 100644 --- a/db/routines/pbx/triggers/sip_afterUpdate.sql +++ b/db/routines/pbx/triggers/sip_afterUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_afterUpdate` AFTER UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeInsert.sql b/db/routines/pbx/triggers/sip_beforeInsert.sql index 500f30077..832232119 100644 --- a/db/routines/pbx/triggers/sip_beforeInsert.sql +++ b/db/routines/pbx/triggers/sip_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_beforeInsert` BEFORE INSERT ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/triggers/sip_beforeUpdate.sql b/db/routines/pbx/triggers/sip_beforeUpdate.sql index 95c943100..e23b8e22e 100644 --- a/db/routines/pbx/triggers/sip_beforeUpdate.sql +++ b/db/routines/pbx/triggers/sip_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_beforeUpdate` BEFORE UPDATE ON `sip` FOR EACH ROW BEGIN diff --git a/db/routines/pbx/views/cdrConf.sql b/db/routines/pbx/views/cdrConf.sql index e4b8ad60a..adf24c87d 100644 --- a/db/routines/pbx/views/cdrConf.sql +++ b/db/routines/pbx/views/cdrConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`cdrConf` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/pbx/views/followmeConf.sql b/db/routines/pbx/views/followmeConf.sql index 7c92301d1..75eb25ff2 100644 --- a/db/routines/pbx/views/followmeConf.sql +++ b/db/routines/pbx/views/followmeConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/followmeNumberConf.sql b/db/routines/pbx/views/followmeNumberConf.sql index f80dd5a9d..c83b639a8 100644 --- a/db/routines/pbx/views/followmeNumberConf.sql +++ b/db/routines/pbx/views/followmeNumberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`followmeNumberConf` AS SELECT `f`.`extension` AS `name`, diff --git a/db/routines/pbx/views/queueConf.sql b/db/routines/pbx/views/queueConf.sql index 8416bdb52..107989801 100644 --- a/db/routines/pbx/views/queueConf.sql +++ b/db/routines/pbx/views/queueConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueConf` AS SELECT `q`.`name` AS `name`, diff --git a/db/routines/pbx/views/queueMemberConf.sql b/db/routines/pbx/views/queueMemberConf.sql index 734313c7b..7007daa1e 100644 --- a/db/routines/pbx/views/queueMemberConf.sql +++ b/db/routines/pbx/views/queueMemberConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`queueMemberConf` AS SELECT `m`.`id` AS `uniqueid`, diff --git a/db/routines/pbx/views/sipConf.sql b/db/routines/pbx/views/sipConf.sql index 302f967ec..0765264bc 100644 --- a/db/routines/pbx/views/sipConf.sql +++ b/db/routines/pbx/views/sipConf.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pbx`.`sipConf` AS SELECT `s`.`user_id` AS `id`, diff --git a/db/routines/psico/procedures/answerSort.sql b/db/routines/psico/procedures/answerSort.sql index c7fd7e48d..75a317b37 100644 --- a/db/routines/psico/procedures/answerSort.sql +++ b/db/routines/psico/procedures/answerSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`answerSort`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`answerSort`() BEGIN UPDATE answer diff --git a/db/routines/psico/procedures/examNew.sql b/db/routines/psico/procedures/examNew.sql index 5b8eada3a..4f27212f6 100644 --- a/db/routines/psico/procedures/examNew.sql +++ b/db/routines/psico/procedures/examNew.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`examNew`(vFellow VARCHAR(50), vType INT, vQuestionsNumber INT, OUT vExamFk INT) BEGIN DECLARE done BOOL DEFAULT FALSE; diff --git a/db/routines/psico/procedures/getExamQuestions.sql b/db/routines/psico/procedures/getExamQuestions.sql index 7545a3e79..9ab1eb6d0 100644 --- a/db/routines/psico/procedures/getExamQuestions.sql +++ b/db/routines/psico/procedures/getExamQuestions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`getExamQuestions`(vExamFk INT) BEGIN SELECT p.text,p.examFk,p.questionFk,p.answerFk,p.id ,a.text AS answerText,a.correct, a.id AS answerFk diff --git a/db/routines/psico/procedures/getExamType.sql b/db/routines/psico/procedures/getExamType.sql index 25bda6682..d829950e6 100644 --- a/db/routines/psico/procedures/getExamType.sql +++ b/db/routines/psico/procedures/getExamType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`getExamType`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`getExamType`() BEGIN SELECT id,name diff --git a/db/routines/psico/procedures/questionSort.sql b/db/routines/psico/procedures/questionSort.sql index 6e47c1c46..56c5ef4a9 100644 --- a/db/routines/psico/procedures/questionSort.sql +++ b/db/routines/psico/procedures/questionSort.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `psico`.`questionSort`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `psico`.`questionSort`() BEGIN UPDATE question diff --git a/db/routines/psico/views/examView.sql b/db/routines/psico/views/examView.sql index c8bc1a8ef..1aa768919 100644 --- a/db/routines/psico/views/examView.sql +++ b/db/routines/psico/views/examView.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`examView` AS SELECT `q`.`text` AS `text`, diff --git a/db/routines/psico/views/results.sql b/db/routines/psico/views/results.sql index ad61099f3..1d7945d32 100644 --- a/db/routines/psico/views/results.sql +++ b/db/routines/psico/views/results.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `psico`.`results` AS SELECT `eq`.`examFk` AS `examFk`, diff --git a/db/routines/sage/functions/company_getCode.sql b/db/routines/sage/functions/company_getCode.sql index 412552086..bdb8c17fb 100644 --- a/db/routines/sage/functions/company_getCode.sql +++ b/db/routines/sage/functions/company_getCode.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `sage`.`company_getCode`(vCompanyFk INT) RETURNS int(2) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/sage/procedures/accountingMovements_add.sql b/db/routines/sage/procedures/accountingMovements_add.sql index e0a9abf08..8c129beb2 100644 --- a/db/routines/sage/procedures/accountingMovements_add.sql +++ b/db/routines/sage/procedures/accountingMovements_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`accountingMovements_add`( vYear INT, vCompanyFk INT ) diff --git a/db/routines/sage/procedures/clean.sql b/db/routines/sage/procedures/clean.sql index 9e52d787a..f1175c4dc 100644 --- a/db/routines/sage/procedures/clean.sql +++ b/db/routines/sage/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`clean`() BEGIN /** * Maintains tables over time by removing unnecessary data diff --git a/db/routines/sage/procedures/clientSupplier_add.sql b/db/routines/sage/procedures/clientSupplier_add.sql index 177b0a7cb..2d1a51882 100644 --- a/db/routines/sage/procedures/clientSupplier_add.sql +++ b/db/routines/sage/procedures/clientSupplier_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`clientSupplier_add`( vCompanyFk INT ) BEGIN diff --git a/db/routines/sage/procedures/importErrorNotification.sql b/db/routines/sage/procedures/importErrorNotification.sql index 1eae584e9..75b0cffc8 100644 --- a/db/routines/sage/procedures/importErrorNotification.sql +++ b/db/routines/sage/procedures/importErrorNotification.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`importErrorNotification`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`importErrorNotification`() BEGIN /** * Inserta notificaciones con los errores detectados durante la importación diff --git a/db/routines/sage/procedures/invoiceIn_add.sql b/db/routines/sage/procedures/invoiceIn_add.sql index 54a7bea6d..0898d6810 100644 --- a/db/routines/sage/procedures/invoiceIn_add.sql +++ b/db/routines/sage/procedures/invoiceIn_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceIn_manager.sql b/db/routines/sage/procedures/invoiceIn_manager.sql index ba99ae9f2..f9bf0e92f 100644 --- a/db/routines/sage/procedures/invoiceIn_manager.sql +++ b/db/routines/sage/procedures/invoiceIn_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceIn_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas recibidas diff --git a/db/routines/sage/procedures/invoiceOut_add.sql b/db/routines/sage/procedures/invoiceOut_add.sql index a71aa19a7..95d6a56dd 100644 --- a/db/routines/sage/procedures/invoiceOut_add.sql +++ b/db/routines/sage/procedures/invoiceOut_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/invoiceOut_manager.sql b/db/routines/sage/procedures/invoiceOut_manager.sql index cfacc330d..58c0f2a21 100644 --- a/db/routines/sage/procedures/invoiceOut_manager.sql +++ b/db/routines/sage/procedures/invoiceOut_manager.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`invoiceOut_manager`(vYear INT, vCompanyFk INT) BEGIN /** * Traslada la info de contabilidad relacionada con las facturas emitidas diff --git a/db/routines/sage/procedures/pgc_add.sql b/db/routines/sage/procedures/pgc_add.sql index 67e3f59cd..78d80a9fe 100644 --- a/db/routines/sage/procedures/pgc_add.sql +++ b/db/routines/sage/procedures/pgc_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `sage`.`pgc_add`(vCompanyFk INT) BEGIN /** * Añade cuentas del plan general contable para exportarlos a Sage diff --git a/db/routines/sage/triggers/movConta_beforeUpdate.sql b/db/routines/sage/triggers/movConta_beforeUpdate.sql index f152ebe7f..316b28b7f 100644 --- a/db/routines/sage/triggers/movConta_beforeUpdate.sql +++ b/db/routines/sage/triggers/movConta_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `sage`.`movConta_beforeUpdate` BEFORE UPDATE ON `movConta` FOR EACH ROW BEGIN diff --git a/db/routines/sage/views/clientLastTwoMonths.sql b/db/routines/sage/views/clientLastTwoMonths.sql index 24e85796b..059cb0780 100644 --- a/db/routines/sage/views/clientLastTwoMonths.sql +++ b/db/routines/sage/views/clientLastTwoMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`clientLastTwoMonths` AS SELECT `vn`.`invoiceOut`.`clientFk` AS `clientFk`, diff --git a/db/routines/sage/views/supplierLastThreeMonths.sql b/db/routines/sage/views/supplierLastThreeMonths.sql index 8fff1d42c..f841fd98c 100644 --- a/db/routines/sage/views/supplierLastThreeMonths.sql +++ b/db/routines/sage/views/supplierLastThreeMonths.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sage`.`supplierLastThreeMonths` AS SELECT `vn`.`invoiceIn`.`supplierFk` AS `supplierFk`, diff --git a/db/routines/salix/events/accessToken_prune.sql b/db/routines/salix/events/accessToken_prune.sql index adcbb2301..28b04699f 100644 --- a/db/routines/salix/events/accessToken_prune.sql +++ b/db/routines/salix/events/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `salix`.`accessToken_prune` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `salix`.`accessToken_prune` ON SCHEDULE EVERY 1 DAY STARTS '2023-03-14 05:14:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/salix/procedures/accessToken_prune.sql b/db/routines/salix/procedures/accessToken_prune.sql index 06ccbe96a..f1a8a0fe8 100644 --- a/db/routines/salix/procedures/accessToken_prune.sql +++ b/db/routines/salix/procedures/accessToken_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `salix`.`accessToken_prune`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `salix`.`accessToken_prune`() BEGIN /** * Borra de la tabla salix.AccessToken todos aquellos tokens que hayan caducado diff --git a/db/routines/salix/views/Account.sql b/db/routines/salix/views/Account.sql index 0b75ab620..080e3e50b 100644 --- a/db/routines/salix/views/Account.sql +++ b/db/routines/salix/views/Account.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Account` AS SELECT `u`.`id` AS `id`, diff --git a/db/routines/salix/views/Role.sql b/db/routines/salix/views/Role.sql index 8fcd7c6be..b04ad82a6 100644 --- a/db/routines/salix/views/Role.sql +++ b/db/routines/salix/views/Role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`Role` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/salix/views/RoleMapping.sql b/db/routines/salix/views/RoleMapping.sql index 834ec0727..48500a05e 100644 --- a/db/routines/salix/views/RoleMapping.sql +++ b/db/routines/salix/views/RoleMapping.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`RoleMapping` AS SELECT `u`.`id` * 1000 + `r`.`inheritsFrom` AS `id`, diff --git a/db/routines/salix/views/User.sql b/db/routines/salix/views/User.sql index b7536d6b1..e03803870 100644 --- a/db/routines/salix/views/User.sql +++ b/db/routines/salix/views/User.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `salix`.`User` AS SELECT `account`.`user`.`id` AS `id`, diff --git a/db/routines/srt/events/moving_clean.sql b/db/routines/srt/events/moving_clean.sql index 3ea64963b..a6f7792a2 100644 --- a/db/routines/srt/events/moving_clean.sql +++ b/db/routines/srt/events/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `srt`.`moving_clean` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `srt`.`moving_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-21 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/srt/functions/bid.sql b/db/routines/srt/functions/bid.sql index 84e30ed11..ee4ffc7d3 100644 --- a/db/routines/srt/functions/bid.sql +++ b/db/routines/srt/functions/bid.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`bid`(vCode VARCHAR(3)) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/srt/functions/bufferPool_get.sql b/db/routines/srt/functions/bufferPool_get.sql index f3e9d2596..1576381f5 100644 --- a/db/routines/srt/functions/bufferPool_get.sql +++ b/db/routines/srt/functions/bufferPool_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`bufferPool_get`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`bufferPool_get`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_get.sql b/db/routines/srt/functions/buffer_get.sql index b66654839..55150bd99 100644 --- a/db/routines/srt/functions/buffer_get.sql +++ b/db/routines/srt/functions/buffer_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_get`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getRandom.sql b/db/routines/srt/functions/buffer_getRandom.sql index 12134c1e3..bc7229594 100644 --- a/db/routines/srt/functions/buffer_getRandom.sql +++ b/db/routines/srt/functions/buffer_getRandom.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getRandom`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getRandom`() RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getState.sql b/db/routines/srt/functions/buffer_getState.sql index 79d455138..b5c4ac2e4 100644 --- a/db/routines/srt/functions/buffer_getState.sql +++ b/db/routines/srt/functions/buffer_getState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getState`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_getType.sql b/db/routines/srt/functions/buffer_getType.sql index 0db73a0d3..4b4194b3c 100644 --- a/db/routines/srt/functions/buffer_getType.sql +++ b/db/routines/srt/functions/buffer_getType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_getType`(vSelf INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/buffer_isFull.sql b/db/routines/srt/functions/buffer_isFull.sql index b404a60d6..a1ae08484 100644 --- a/db/routines/srt/functions/buffer_isFull.sql +++ b/db/routines/srt/functions/buffer_isFull.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`buffer_isFull`(vBufferFk INT) RETURNS tinyint(1) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/dayMinute.sql b/db/routines/srt/functions/dayMinute.sql index a10367863..ab66dd7d2 100644 --- a/db/routines/srt/functions/dayMinute.sql +++ b/db/routines/srt/functions/dayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`dayMinute`(vDateTime DATETIME) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_check.sql b/db/routines/srt/functions/expedition_check.sql index 948ef449a..314cafd96 100644 --- a/db/routines/srt/functions/expedition_check.sql +++ b/db/routines/srt/functions/expedition_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`expedition_check`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/functions/expedition_getDayMinute.sql b/db/routines/srt/functions/expedition_getDayMinute.sql index 1882dec0f..01ff534f5 100644 --- a/db/routines/srt/functions/expedition_getDayMinute.sql +++ b/db/routines/srt/functions/expedition_getDayMinute.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `srt`.`expedition_getDayMinute`(vExpeditionFk INT) RETURNS int(11) NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/srt/procedures/buffer_getExpCount.sql b/db/routines/srt/procedures/buffer_getExpCount.sql index d01feee79..5ead3d421 100644 --- a/db/routines/srt/procedures/buffer_getExpCount.sql +++ b/db/routines/srt/procedures/buffer_getExpCount.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT) BEGIN /* Devuelve el número de expediciones de un buffer * diff --git a/db/routines/srt/procedures/buffer_getStateType.sql b/db/routines/srt/procedures/buffer_getStateType.sql index 4140cb3a6..bba8202db 100644 --- a/db/routines/srt/procedures/buffer_getStateType.sql +++ b/db/routines/srt/procedures/buffer_getStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_getStateType`(vBufferFk INT, OUT vStateFk INT, OUT vTypeFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_giveBack.sql b/db/routines/srt/procedures/buffer_giveBack.sql index 755951e7b..f8d349914 100644 --- a/db/routines/srt/procedures/buffer_giveBack.sql +++ b/db/routines/srt/procedures/buffer_giveBack.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_giveBack`(vSelf INT) BEGIN /* Devuelve una caja al celluveyor * diff --git a/db/routines/srt/procedures/buffer_readPhotocell.sql b/db/routines/srt/procedures/buffer_readPhotocell.sql index e2e1af8bb..2bf2cfa1d 100644 --- a/db/routines/srt/procedures/buffer_readPhotocell.sql +++ b/db/routines/srt/procedures/buffer_readPhotocell.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_readPhotocell`(vSelf INT, vNumber INT) BEGIN /** * Establece el estado de un buffer en función del número de fotocélulas activas diff --git a/db/routines/srt/procedures/buffer_setEmpty.sql b/db/routines/srt/procedures/buffer_setEmpty.sql index 776b25310..e97d397ed 100644 --- a/db/routines/srt/procedures/buffer_setEmpty.sql +++ b/db/routines/srt/procedures/buffer_setEmpty.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setEmpty`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setState.sql b/db/routines/srt/procedures/buffer_setState.sql index 3ac3c60da..f0f136942 100644 --- a/db/routines/srt/procedures/buffer_setState.sql +++ b/db/routines/srt/procedures/buffer_setState.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setState`(vBufferFk INT(11), vStateFk INT(11)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setStateType.sql b/db/routines/srt/procedures/buffer_setStateType.sql index a9f66509e..954a380ac 100644 --- a/db/routines/srt/procedures/buffer_setStateType.sql +++ b/db/routines/srt/procedures/buffer_setStateType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setStateType`(vBufferFk INT, vState VARCHAR(25), vType VARCHAR(25)) BEGIN /** diff --git a/db/routines/srt/procedures/buffer_setType.sql b/db/routines/srt/procedures/buffer_setType.sql index b880262dd..7d6c508dc 100644 --- a/db/routines/srt/procedures/buffer_setType.sql +++ b/db/routines/srt/procedures/buffer_setType.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setType`(vBufferFk INT(11), vTypeFk INT(11)) BEGIN /** * Cambia el tipo de un buffer, si está permitido diff --git a/db/routines/srt/procedures/buffer_setTypeByName.sql b/db/routines/srt/procedures/buffer_setTypeByName.sql index ad6caff42..9365d5399 100644 --- a/db/routines/srt/procedures/buffer_setTypeByName.sql +++ b/db/routines/srt/procedures/buffer_setTypeByName.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_setTypeByName`(vBufferFk INT(11), vTypeName VARCHAR(100)) BEGIN /** diff --git a/db/routines/srt/procedures/clean.sql b/db/routines/srt/procedures/clean.sql index 3e9053300..3d02ae0cd 100644 --- a/db/routines/srt/procedures/clean.sql +++ b/db/routines/srt/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`clean`() BEGIN DECLARE vLastDated DATE DEFAULT TIMESTAMPADD(WEEK,-2,util.VN_CURDATE()); diff --git a/db/routines/srt/procedures/expeditionLoading_add.sql b/db/routines/srt/procedures/expeditionLoading_add.sql index bb68e395c..7fb53c2c6 100644 --- a/db/routines/srt/procedures/expeditionLoading_add.sql +++ b/db/routines/srt/procedures/expeditionLoading_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expeditionLoading_add`(vExpeditionFk INT, vBufferFk INT) BEGIN DECLARE vMessage VARCHAR(50) DEFAULT ''; diff --git a/db/routines/srt/procedures/expedition_arrived.sql b/db/routines/srt/procedures/expedition_arrived.sql index 03108e90d..2d2c093bc 100644 --- a/db/routines/srt/procedures/expedition_arrived.sql +++ b/db/routines/srt/procedures/expedition_arrived.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_arrived`(vExpeditionFk INT, vBufferFk INT, OUT vTypeFk INT) BEGIN /** * La expedición ha entrado en un buffer, superando fc2 diff --git a/db/routines/srt/procedures/expedition_bufferOut.sql b/db/routines/srt/procedures/expedition_bufferOut.sql index 56d32614b..69e1fb791 100644 --- a/db/routines/srt/procedures/expedition_bufferOut.sql +++ b/db/routines/srt/procedures/expedition_bufferOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_bufferOut`(vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_entering.sql b/db/routines/srt/procedures/expedition_entering.sql index 2eab7d0e0..f1b773edb 100644 --- a/db/routines/srt/procedures/expedition_entering.sql +++ b/db/routines/srt/procedures/expedition_entering.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_entering`(vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_get.sql b/db/routines/srt/procedures/expedition_get.sql index d0edd4b15..91a0e2ace 100644 --- a/db/routines/srt/procedures/expedition_get.sql +++ b/db/routines/srt/procedures/expedition_get.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_get`(vAntennaFk INT, OUT vExpeditionOutFk INT ) BEGIN DECLARE vId INT; diff --git a/db/routines/srt/procedures/expedition_groupOut.sql b/db/routines/srt/procedures/expedition_groupOut.sql index 340049238..5c4540ff6 100644 --- a/db/routines/srt/procedures/expedition_groupOut.sql +++ b/db/routines/srt/procedures/expedition_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_groupOut`(vDayMinute INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_in.sql b/db/routines/srt/procedures/expedition_in.sql index ca783e78f..c6f75876c 100644 --- a/db/routines/srt/procedures/expedition_in.sql +++ b/db/routines/srt/procedures/expedition_in.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_in`(vBufferFk INT, OUT vExpeditionFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_moving.sql b/db/routines/srt/procedures/expedition_moving.sql index 095c5f6b1..1277ed2bd 100644 --- a/db/routines/srt/procedures/expedition_moving.sql +++ b/db/routines/srt/procedures/expedition_moving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_moving`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_out.sql b/db/routines/srt/procedures/expedition_out.sql index 7c5bb8526..5e6608561 100644 --- a/db/routines/srt/procedures/expedition_out.sql +++ b/db/routines/srt/procedures/expedition_out.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_out`(vBufferFk INT, OUT vTypeFk INT) proc:BEGIN /** * Una expedición ha salido de un buffer por el extremo distal diff --git a/db/routines/srt/procedures/expedition_outAll.sql b/db/routines/srt/procedures/expedition_outAll.sql index 109ddc817..ffe925c9d 100644 --- a/db/routines/srt/procedures/expedition_outAll.sql +++ b/db/routines/srt/procedures/expedition_outAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_outAll`(vBufferFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_relocate.sql b/db/routines/srt/procedures/expedition_relocate.sql index 8a5e41ca9..0f940beff 100644 --- a/db/routines/srt/procedures/expedition_relocate.sql +++ b/db/routines/srt/procedures/expedition_relocate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_relocate`(vExpeditionFk INT, vBufferToFk INT) proc:BEGIN /** diff --git a/db/routines/srt/procedures/expedition_reset.sql b/db/routines/srt/procedures/expedition_reset.sql index fd7698145..153edfad2 100644 --- a/db/routines/srt/procedures/expedition_reset.sql +++ b/db/routines/srt/procedures/expedition_reset.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_reset`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_reset`() BEGIN DELETE FROM srt.moving; diff --git a/db/routines/srt/procedures/expedition_routeOut.sql b/db/routines/srt/procedures/expedition_routeOut.sql index 325a6bb94..d40384e1f 100644 --- a/db/routines/srt/procedures/expedition_routeOut.sql +++ b/db/routines/srt/procedures/expedition_routeOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_routeOut`(vRouteFk INT, vBufferToFk INT) BEGIN /** diff --git a/db/routines/srt/procedures/expedition_scan.sql b/db/routines/srt/procedures/expedition_scan.sql index 81caa4bef..e3fcfddef 100644 --- a/db/routines/srt/procedures/expedition_scan.sql +++ b/db/routines/srt/procedures/expedition_scan.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_scan`(vSelf INT) BEGIN /* Actualiza el estado de una expedicion a OUT, al ser escaneada manualmente diff --git a/db/routines/srt/procedures/expedition_setDimensions.sql b/db/routines/srt/procedures/expedition_setDimensions.sql index fba5f373c..0b4fea28f 100644 --- a/db/routines/srt/procedures/expedition_setDimensions.sql +++ b/db/routines/srt/procedures/expedition_setDimensions.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_setDimensions`( vExpeditionFk INT, vWeight DECIMAL(10,2), vLength INT, diff --git a/db/routines/srt/procedures/expedition_weighing.sql b/db/routines/srt/procedures/expedition_weighing.sql index 372212549..bb35edb27 100644 --- a/db/routines/srt/procedures/expedition_weighing.sql +++ b/db/routines/srt/procedures/expedition_weighing.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`expedition_weighing`(vWeight DECIMAL(10,2), vExpeditionFk INT, OUT vExpeditionOutFk INT ) BEGIN /** diff --git a/db/routines/srt/procedures/failureLog_add.sql b/db/routines/srt/procedures/failureLog_add.sql index 5ca49a2e0..b572e8503 100644 --- a/db/routines/srt/procedures/failureLog_add.sql +++ b/db/routines/srt/procedures/failureLog_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`failureLog_add`(vDescription VARCHAR(100)) BEGIN /* Añade un registro a srt.failureLog diff --git a/db/routines/srt/procedures/lastRFID_add.sql b/db/routines/srt/procedures/lastRFID_add.sql index 704e1baa8..ec3c83d98 100644 --- a/db/routines/srt/procedures/lastRFID_add.sql +++ b/db/routines/srt/procedures/lastRFID_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`lastRFID_add`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/lastRFID_add_beta.sql b/db/routines/srt/procedures/lastRFID_add_beta.sql index 01ad90aff..bbeb32410 100644 --- a/db/routines/srt/procedures/lastRFID_add_beta.sql +++ b/db/routines/srt/procedures/lastRFID_add_beta.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`lastRFID_add_beta`(vCode VARCHAR(20), vAntennaFk INT, vAntennaPortFk INT, vPeakRssi INT, vSeenCount INT) BEGIN /* Insert a new record in lastRFID table diff --git a/db/routines/srt/procedures/moving_CollidingSet.sql b/db/routines/srt/procedures/moving_CollidingSet.sql index bfaca4bbf..69c4f9d9e 100644 --- a/db/routines/srt/procedures/moving_CollidingSet.sql +++ b/db/routines/srt/procedures/moving_CollidingSet.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_CollidingSet`() BEGIN diff --git a/db/routines/srt/procedures/moving_between.sql b/db/routines/srt/procedures/moving_between.sql index ccb54353f..41822d341 100644 --- a/db/routines/srt/procedures/moving_between.sql +++ b/db/routines/srt/procedures/moving_between.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_between`(vBufferA INT, vBufferB INT) BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index bad9edbb5..b8fae7ff4 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_clean`() BEGIN /** * Elimina movimientos por inactividad diff --git a/db/routines/srt/procedures/moving_delete.sql b/db/routines/srt/procedures/moving_delete.sql index 926b4b595..38491105a 100644 --- a/db/routines/srt/procedures/moving_delete.sql +++ b/db/routines/srt/procedures/moving_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_delete`(vExpeditionFk INT) BEGIN /* Elimina un movimiento diff --git a/db/routines/srt/procedures/moving_groupOut.sql b/db/routines/srt/procedures/moving_groupOut.sql index 28556d20d..d901f0ca9 100644 --- a/db/routines/srt/procedures/moving_groupOut.sql +++ b/db/routines/srt/procedures/moving_groupOut.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_groupOut`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_groupOut`() proc: BEGIN DECLARE vDayMinute INT; diff --git a/db/routines/srt/procedures/moving_next.sql b/db/routines/srt/procedures/moving_next.sql index 75270aed1..6c76b8373 100644 --- a/db/routines/srt/procedures/moving_next.sql +++ b/db/routines/srt/procedures/moving_next.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`moving_next`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_next`() BEGIN DECLARE vExpeditionFk INT; diff --git a/db/routines/srt/procedures/photocell_setActive.sql b/db/routines/srt/procedures/photocell_setActive.sql index 63858a83c..c89e9dc9d 100644 --- a/db/routines/srt/procedures/photocell_setActive.sql +++ b/db/routines/srt/procedures/photocell_setActive.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`photocell_setActive`(vBufferFk int, vPosition int, vIsActive bool) BEGIN REPLACE srt.photocell VALUES (vbufferFk, vPosition, vIsActive); END$$ diff --git a/db/routines/srt/procedures/randomMoving.sql b/db/routines/srt/procedures/randomMoving.sql index 01a9eaca4..b4bdd6591 100644 --- a/db/routines/srt/procedures/randomMoving.sql +++ b/db/routines/srt/procedures/randomMoving.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`randomMoving`(vBufferMin INT, vBufferMax INT) BEGIN DECLARE vBufferOld INT DEFAULT 0; DECLARE vBufferFk INT; diff --git a/db/routines/srt/procedures/randomMoving_Launch.sql b/db/routines/srt/procedures/randomMoving_Launch.sql index 84003a50a..031e54873 100644 --- a/db/routines/srt/procedures/randomMoving_Launch.sql +++ b/db/routines/srt/procedures/randomMoving_Launch.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`randomMoving_Launch`() BEGIN DECLARE i INT DEFAULT 5; diff --git a/db/routines/srt/procedures/restart.sql b/db/routines/srt/procedures/restart.sql index 41871863c..96adb3bfa 100644 --- a/db/routines/srt/procedures/restart.sql +++ b/db/routines/srt/procedures/restart.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`restart`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`restart`() BEGIN /* diff --git a/db/routines/srt/procedures/start.sql b/db/routines/srt/procedures/start.sql index 51a0a300b..8e5250796 100644 --- a/db/routines/srt/procedures/start.sql +++ b/db/routines/srt/procedures/start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`start`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`start`() BEGIN /* diff --git a/db/routines/srt/procedures/stop.sql b/db/routines/srt/procedures/stop.sql index d649412aa..a6fd12bb2 100644 --- a/db/routines/srt/procedures/stop.sql +++ b/db/routines/srt/procedures/stop.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`stop`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`stop`() BEGIN /* diff --git a/db/routines/srt/procedures/test.sql b/db/routines/srt/procedures/test.sql index 571e415f2..59a76eb81 100644 --- a/db/routines/srt/procedures/test.sql +++ b/db/routines/srt/procedures/test.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `srt`.`test`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`test`() BEGIN SELECT 'procedimiento ejecutado con éxito'; diff --git a/db/routines/srt/triggers/expedition_beforeUpdate.sql b/db/routines/srt/triggers/expedition_beforeUpdate.sql index 335c69bab..b8933aaf5 100644 --- a/db/routines/srt/triggers/expedition_beforeUpdate.sql +++ b/db/routines/srt/triggers/expedition_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN diff --git a/db/routines/srt/triggers/moving_afterInsert.sql b/db/routines/srt/triggers/moving_afterInsert.sql index dcf8a977e..aaa09c99c 100644 --- a/db/routines/srt/triggers/moving_afterInsert.sql +++ b/db/routines/srt/triggers/moving_afterInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `srt`.`moving_afterInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`moving_afterInsert` AFTER INSERT ON `moving` FOR EACH ROW BEGIN diff --git a/db/routines/srt/views/bufferDayMinute.sql b/db/routines/srt/views/bufferDayMinute.sql index 0156b74f5..d2108e513 100644 --- a/db/routines/srt/views/bufferDayMinute.sql +++ b/db/routines/srt/views/bufferDayMinute.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferDayMinute` AS SELECT `b`.`id` AS `bufferFk`, diff --git a/db/routines/srt/views/bufferFreeLength.sql b/db/routines/srt/views/bufferFreeLength.sql index 7035220a0..4edf1db47 100644 --- a/db/routines/srt/views/bufferFreeLength.sql +++ b/db/routines/srt/views/bufferFreeLength.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferFreeLength` AS SELECT cast(`b`.`id` AS decimal(10, 0)) AS `bufferFk`, diff --git a/db/routines/srt/views/bufferStock.sql b/db/routines/srt/views/bufferStock.sql index dd0b2f1c2..ca04d3c01 100644 --- a/db/routines/srt/views/bufferStock.sql +++ b/db/routines/srt/views/bufferStock.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`bufferStock` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/srt/views/routePalletized.sql b/db/routines/srt/views/routePalletized.sql index 05113242a..15b493c6a 100644 --- a/db/routines/srt/views/routePalletized.sql +++ b/db/routines/srt/views/routePalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`routePalletized` AS SELECT `t`.`routeFk` AS `routeFk`, diff --git a/db/routines/srt/views/ticketPalletized.sql b/db/routines/srt/views/ticketPalletized.sql index 812e3659e..04ac24291 100644 --- a/db/routines/srt/views/ticketPalletized.sql +++ b/db/routines/srt/views/ticketPalletized.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`ticketPalletized` AS SELECT `t`.`id` AS `ticketFk`, diff --git a/db/routines/srt/views/upperStickers.sql b/db/routines/srt/views/upperStickers.sql index fff8890f5..1cd72c12b 100644 --- a/db/routines/srt/views/upperStickers.sql +++ b/db/routines/srt/views/upperStickers.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `srt`.`upperStickers` AS SELECT `e`.`id` AS `expeditionFk`, diff --git a/db/routines/stock/events/log_clean.sql b/db/routines/stock/events/log_clean.sql index 68dec7385..973561a89 100644 --- a/db/routines/stock/events/log_clean.sql +++ b/db/routines/stock/events/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `stock`.`log_clean` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `stock`.`log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:29:18.000' ON COMPLETION PRESERVE diff --git a/db/routines/stock/events/log_syncNoWait.sql b/db/routines/stock/events/log_syncNoWait.sql index e8f719ac2..954d37219 100644 --- a/db/routines/stock/events/log_syncNoWait.sql +++ b/db/routines/stock/events/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `stock`.`log_syncNoWait` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `stock`.`log_syncNoWait` ON SCHEDULE EVERY 5 SECOND STARTS '2017-06-27 17:15:02.000' ON COMPLETION NOT PRESERVE diff --git a/db/routines/stock/procedures/inbound_addPick.sql b/db/routines/stock/procedures/inbound_addPick.sql index 136ade6c8..41b93a986 100644 --- a/db/routines/stock/procedures/inbound_addPick.sql +++ b/db/routines/stock/procedures/inbound_addPick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_addPick`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_addPick`( vSelf INT, vOutboundFk INT, vQuantity INT diff --git a/db/routines/stock/procedures/inbound_removePick.sql b/db/routines/stock/procedures/inbound_removePick.sql index 75883bcb2..e183e1171 100644 --- a/db/routines/stock/procedures/inbound_removePick.sql +++ b/db/routines/stock/procedures/inbound_removePick.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_removePick`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_removePick`( vSelf INT, vOutboundFk INT, vQuantity INT, diff --git a/db/routines/stock/procedures/inbound_requestQuantity.sql b/db/routines/stock/procedures/inbound_requestQuantity.sql index 4c6fb4295..1cbc1908b 100644 --- a/db/routines/stock/procedures/inbound_requestQuantity.sql +++ b/db/routines/stock/procedures/inbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/inbound_sync.sql b/db/routines/stock/procedures/inbound_sync.sql index 7d463e70d..77d3e42f7 100644 --- a/db/routines/stock/procedures/inbound_sync.sql +++ b/db/routines/stock/procedures/inbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_sync`(vSelf INT) BEGIN /** * Associates a inbound with their possible outbounds, updating it's available. diff --git a/db/routines/stock/procedures/log_clean.sql b/db/routines/stock/procedures/log_clean.sql index 9215246e1..56634b371 100644 --- a/db/routines/stock/procedures/log_clean.sql +++ b/db/routines/stock/procedures/log_clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_clean`() BEGIN DELETE FROM inbound WHERE dated = vn.getInventoryDate(); DELETE FROM outbound WHERE dated = vn.getInventoryDate(); diff --git a/db/routines/stock/procedures/log_delete.sql b/db/routines/stock/procedures/log_delete.sql index 8bf2aed56..e3b631b4e 100644 --- a/db/routines/stock/procedures/log_delete.sql +++ b/db/routines/stock/procedures/log_delete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_delete`(vTableName VARCHAR(255), vTableId INT) proc: BEGIN /** * Processes orphan transactions. diff --git a/db/routines/stock/procedures/log_refreshAll.sql b/db/routines/stock/procedures/log_refreshAll.sql index 9415379af..3eaad07f2 100644 --- a/db/routines/stock/procedures/log_refreshAll.sql +++ b/db/routines/stock/procedures/log_refreshAll.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshAll`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshAll`() BEGIN /** * Recalculates the entire cache. It takes a considerable time, diff --git a/db/routines/stock/procedures/log_refreshBuy.sql b/db/routines/stock/procedures/log_refreshBuy.sql index 68ab1b617..488c00a28 100644 --- a/db/routines/stock/procedures/log_refreshBuy.sql +++ b/db/routines/stock/procedures/log_refreshBuy.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshBuy`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshOrder.sql b/db/routines/stock/procedures/log_refreshOrder.sql index 787fb6aa5..ce5b31cc8 100644 --- a/db/routines/stock/procedures/log_refreshOrder.sql +++ b/db/routines/stock/procedures/log_refreshOrder.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshOrder`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_refreshSale.sql b/db/routines/stock/procedures/log_refreshSale.sql index f982d405e..3054f8ecb 100644 --- a/db/routines/stock/procedures/log_refreshSale.sql +++ b/db/routines/stock/procedures/log_refreshSale.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_refreshSale`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_refreshSale`( `vTableName` VARCHAR(255), `vTableId` INT) BEGIN diff --git a/db/routines/stock/procedures/log_sync.sql b/db/routines/stock/procedures/log_sync.sql index 349e4b3db..5b03b6ab0 100644 --- a/db/routines/stock/procedures/log_sync.sql +++ b/db/routines/stock/procedures/log_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_sync`(vSync BOOL) proc: BEGIN DECLARE vDone BOOL; DECLARE vLogId INT; diff --git a/db/routines/stock/procedures/log_syncNoWait.sql b/db/routines/stock/procedures/log_syncNoWait.sql index 897195f4d..00cc215fd 100644 --- a/db/routines/stock/procedures/log_syncNoWait.sql +++ b/db/routines/stock/procedures/log_syncNoWait.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`log_syncNoWait`() BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN diff --git a/db/routines/stock/procedures/outbound_requestQuantity.sql b/db/routines/stock/procedures/outbound_requestQuantity.sql index 2ee262467..7ddc3545c 100644 --- a/db/routines/stock/procedures/outbound_requestQuantity.sql +++ b/db/routines/stock/procedures/outbound_requestQuantity.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`outbound_requestQuantity`( vSelf INT, vRequested INT, vDated DATETIME, diff --git a/db/routines/stock/procedures/outbound_sync.sql b/db/routines/stock/procedures/outbound_sync.sql index 94b65e1b6..0de352176 100644 --- a/db/routines/stock/procedures/outbound_sync.sql +++ b/db/routines/stock/procedures/outbound_sync.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`outbound_sync`(vSelf INT) BEGIN /** * Attaches a outbound with available inbounds. diff --git a/db/routines/stock/procedures/visible_log.sql b/db/routines/stock/procedures/visible_log.sql index cb11e9d3e..cc88d3205 100644 --- a/db/routines/stock/procedures/visible_log.sql +++ b/db/routines/stock/procedures/visible_log.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `stock`.`visible_log`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`visible_log`( vIsPicked BOOL, vWarehouseFk INT, vItemFk INT, diff --git a/db/routines/stock/triggers/inbound_afterDelete.sql b/db/routines/stock/triggers/inbound_afterDelete.sql index a436d04a0..451dcc599 100644 --- a/db/routines/stock/triggers/inbound_afterDelete.sql +++ b/db/routines/stock/triggers/inbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`inbound_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`inbound_afterDelete` AFTER DELETE ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/inbound_beforeInsert.sql b/db/routines/stock/triggers/inbound_beforeInsert.sql index 3707a2b2a..723cb3222 100644 --- a/db/routines/stock/triggers/inbound_beforeInsert.sql +++ b/db/routines/stock/triggers/inbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`inbound_beforeInsert` BEFORE INSERT ON `inbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_afterDelete.sql b/db/routines/stock/triggers/outbound_afterDelete.sql index 1c90c3293..e7d756871 100644 --- a/db/routines/stock/triggers/outbound_afterDelete.sql +++ b/db/routines/stock/triggers/outbound_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`outbound_afterDelete` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`outbound_afterDelete` AFTER DELETE ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/stock/triggers/outbound_beforeInsert.sql b/db/routines/stock/triggers/outbound_beforeInsert.sql index e0560d8f6..86546413e 100644 --- a/db/routines/stock/triggers/outbound_beforeInsert.sql +++ b/db/routines/stock/triggers/outbound_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`outbound_beforeInsert` BEFORE INSERT ON `outbound` FOR EACH ROW BEGIN diff --git a/db/routines/tmp/events/clean.sql b/db/routines/tmp/events/clean.sql index 75f022362..34b7139cc 100644 --- a/db/routines/tmp/events/clean.sql +++ b/db/routines/tmp/events/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `tmp`.`clean` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `tmp`.`clean` ON SCHEDULE EVERY 1 HOUR STARTS '2022-03-01 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/tmp/procedures/clean.sql b/db/routines/tmp/procedures/clean.sql index 90ea69216..a15f98311 100644 --- a/db/routines/tmp/procedures/clean.sql +++ b/db/routines/tmp/procedures/clean.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `tmp`.`clean`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `tmp`.`clean`() BEGIN DECLARE vTableName VARCHAR(255); DECLARE vDone BOOL; diff --git a/db/routines/util/events/slowLog_prune.sql b/db/routines/util/events/slowLog_prune.sql index 1b339fbcd..aa9b0c184 100644 --- a/db/routines/util/events/slowLog_prune.sql +++ b/db/routines/util/events/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `util`.`slowLog_prune` +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `util`.`slowLog_prune` ON SCHEDULE EVERY 1 DAY STARTS '2021-10-08 00:00:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/util/functions/VN_CURDATE.sql b/db/routines/util/functions/VN_CURDATE.sql index 0ceb0c4ed..692f097a0 100644 --- a/db/routines/util/functions/VN_CURDATE.sql +++ b/db/routines/util/functions/VN_CURDATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_CURDATE`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_CURDATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_CURTIME.sql b/db/routines/util/functions/VN_CURTIME.sql index 954ed2273..ae66ea500 100644 --- a/db/routines/util/functions/VN_CURTIME.sql +++ b/db/routines/util/functions/VN_CURTIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_CURTIME`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_CURTIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_NOW.sql b/db/routines/util/functions/VN_NOW.sql index 44e3ece44..47b1bb4fd 100644 --- a/db/routines/util/functions/VN_NOW.sql +++ b/db/routines/util/functions/VN_NOW.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_NOW`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_NOW`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql index c168df9fd..717459862 100644 --- a/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UNIX_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UNIX_TIMESTAMP`() RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_DATE.sql b/db/routines/util/functions/VN_UTC_DATE.sql index 803b6026f..2b40b7dc2 100644 --- a/db/routines/util/functions/VN_UTC_DATE.sql +++ b/db/routines/util/functions/VN_UTC_DATE.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_DATE`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIME.sql b/db/routines/util/functions/VN_UTC_TIME.sql index 3eaa7f431..930333d23 100644 --- a/db/routines/util/functions/VN_UTC_TIME.sql +++ b/db/routines/util/functions/VN_UTC_TIME.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_TIME`() RETURNS time DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql index 530198cb9..97d125874 100644 --- a/db/routines/util/functions/VN_UTC_TIMESTAMP.sql +++ b/db/routines/util/functions/VN_UTC_TIMESTAMP.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`VN_UTC_TIMESTAMP`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/accountNumberToIban.sql b/db/routines/util/functions/accountNumberToIban.sql index 811954547..49d3c917e 100644 --- a/db/routines/util/functions/accountNumberToIban.sql +++ b/db/routines/util/functions/accountNumberToIban.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`accountNumberToIban`( +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`accountNumberToIban`( vAccount VARCHAR(20) ) RETURNS varchar(4) CHARSET utf8mb3 COLLATE utf8mb3_general_ci diff --git a/db/routines/util/functions/accountShortToStandard.sql b/db/routines/util/functions/accountShortToStandard.sql index a3379d989..71e360bf3 100644 --- a/db/routines/util/functions/accountShortToStandard.sql +++ b/db/routines/util/functions/accountShortToStandard.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/binlogQueue_getDelay.sql b/db/routines/util/functions/binlogQueue_getDelay.sql index adbf0e98a..d6cf49377 100644 --- a/db/routines/util/functions/binlogQueue_getDelay.sql +++ b/db/routines/util/functions/binlogQueue_getDelay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) RETURNS BIGINT READS SQL DATA NOT DETERMINISTIC diff --git a/db/routines/util/functions/capitalizeFirst.sql b/db/routines/util/functions/capitalizeFirst.sql index 50e5f508e..859777de2 100644 --- a/db/routines/util/functions/capitalizeFirst.sql +++ b/db/routines/util/functions/capitalizeFirst.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`capitalizeFirst`(vString VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/checkPrintableChars.sql b/db/routines/util/functions/checkPrintableChars.sql index a327ed41d..a4addce24 100644 --- a/db/routines/util/functions/checkPrintableChars.sql +++ b/db/routines/util/functions/checkPrintableChars.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`checkPrintableChars`( +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`checkPrintableChars`( vString VARCHAR(255) ) RETURNS tinyint(1) DETERMINISTIC diff --git a/db/routines/util/functions/crypt.sql b/db/routines/util/functions/crypt.sql index 98308729e..664563cd0 100644 --- a/db/routines/util/functions/crypt.sql +++ b/db/routines/util/functions/crypt.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`crypt`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/cryptOff.sql b/db/routines/util/functions/cryptOff.sql index 1c268f070..bc281e4ec 100644 --- a/db/routines/util/functions/cryptOff.sql +++ b/db/routines/util/functions/cryptOff.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci NOT DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/dayEnd.sql b/db/routines/util/functions/dayEnd.sql index 767e490d8..1da4dcfe6 100644 --- a/db/routines/util/functions/dayEnd.sql +++ b/db/routines/util/functions/dayEnd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE) RETURNS datetime DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfMonth.sql b/db/routines/util/functions/firstDayOfMonth.sql index 298dba95a..77971c7b8 100644 --- a/db/routines/util/functions/firstDayOfMonth.sql +++ b/db/routines/util/functions/firstDayOfMonth.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`firstDayOfMonth`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/firstDayOfYear.sql b/db/routines/util/functions/firstDayOfYear.sql index f7a9f8daf..710c3a688 100644 --- a/db/routines/util/functions/firstDayOfYear.sql +++ b/db/routines/util/functions/firstDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`firstDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/formatRow.sql b/db/routines/util/functions/formatRow.sql index b80e60e9f..b119df015 100644 --- a/db/routines/util/functions/formatRow.sql +++ b/db/routines/util/functions/formatRow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) RETURNS varchar(512) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/formatTable.sql b/db/routines/util/functions/formatTable.sql index a717e8c07..00a2b50bf 100644 --- a/db/routines/util/functions/formatTable.sql +++ b/db/routines/util/functions/formatTable.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hasDateOverlapped.sql b/db/routines/util/functions/hasDateOverlapped.sql index ea73390e6..9441e201c 100644 --- a/db/routines/util/functions/hasDateOverlapped.sql +++ b/db/routines/util/functions/hasDateOverlapped.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/hmacSha2.sql b/db/routines/util/functions/hmacSha2.sql index cb36cac87..78611c118 100644 --- a/db/routines/util/functions/hmacSha2.sql +++ b/db/routines/util/functions/hmacSha2.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) RETURNS varchar(128) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/isLeapYear.sql b/db/routines/util/functions/isLeapYear.sql index c51e98cda..2c7c96f3d 100644 --- a/db/routines/util/functions/isLeapYear.sql +++ b/db/routines/util/functions/isLeapYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`isLeapYear`(vYear INT) RETURNS tinyint(1) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/json_removeNulls.sql b/db/routines/util/functions/json_removeNulls.sql index 45797e1bf..5fa741380 100644 --- a/db/routines/util/functions/json_removeNulls.sql +++ b/db/routines/util/functions/json_removeNulls.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`json_removeNulls`(vObject JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/lang.sql b/db/routines/util/functions/lang.sql index e7832993d..3431cdcc7 100644 --- a/db/routines/util/functions/lang.sql +++ b/db/routines/util/functions/lang.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`lang`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`lang`() RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/lastDayOfYear.sql b/db/routines/util/functions/lastDayOfYear.sql index b60fc2cc7..52607ae21 100644 --- a/db/routines/util/functions/lastDayOfYear.sql +++ b/db/routines/util/functions/lastDayOfYear.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`lastDayOfYear`(vDate DATE) RETURNS date DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/log_formatDate.sql b/db/routines/util/functions/log_formatDate.sql index 0004461d1..84c269027 100644 --- a/db/routines/util/functions/log_formatDate.sql +++ b/db/routines/util/functions/log_formatDate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`log_formatDate`(vInstance JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/midnight.sql b/db/routines/util/functions/midnight.sql index b36a9668c..b37415682 100644 --- a/db/routines/util/functions/midnight.sql +++ b/db/routines/util/functions/midnight.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`midnight`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`midnight`() RETURNS datetime DETERMINISTIC READS SQL DATA diff --git a/db/routines/util/functions/mockTime.sql b/db/routines/util/functions/mockTime.sql index cbdac99e6..ab7859e7d 100644 --- a/db/routines/util/functions/mockTime.sql +++ b/db/routines/util/functions/mockTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockTime`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockTimeBase.sql b/db/routines/util/functions/mockTimeBase.sql index f1cba9e17..7b3ea1a4a 100644 --- a/db/routines/util/functions/mockTimeBase.sql +++ b/db/routines/util/functions/mockTimeBase.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/mockUtcTime.sql b/db/routines/util/functions/mockUtcTime.sql index 3132760ab..e79c3b241 100644 --- a/db/routines/util/functions/mockUtcTime.sql +++ b/db/routines/util/functions/mockUtcTime.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`mockUtcTime`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/nextWeek.sql b/db/routines/util/functions/nextWeek.sql index fc6abc40d..f764201aa 100644 --- a/db/routines/util/functions/nextWeek.sql +++ b/db/routines/util/functions/nextWeek.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`nextWeek`(vYearWeek INT) RETURNS int(11) DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/notification_send.sql b/db/routines/util/functions/notification_send.sql index 87f5ec43a..981cde2d6 100644 --- a/db/routines/util/functions/notification_send.sql +++ b/db/routines/util/functions/notification_send.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) RETURNS int(11) NOT DETERMINISTIC MODIFIES SQL DATA diff --git a/db/routines/util/functions/quarterFirstDay.sql b/db/routines/util/functions/quarterFirstDay.sql index a8d4c35ad..b8239ffc8 100644 --- a/db/routines/util/functions/quarterFirstDay.sql +++ b/db/routines/util/functions/quarterFirstDay.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`quarterFirstDay`(vYear INT, vQuarter INT) RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/quoteIdentifier.sql b/db/routines/util/functions/quoteIdentifier.sql index 96161b3ef..1c0c4c543 100644 --- a/db/routines/util/functions/quoteIdentifier.sql +++ b/db/routines/util/functions/quoteIdentifier.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`quoteIdentifier`(vString TEXT) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/stringXor.sql b/db/routines/util/functions/stringXor.sql index e16ca4c43..252cd0040 100644 --- a/db/routines/util/functions/stringXor.sql +++ b/db/routines/util/functions/stringXor.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) RETURNS mediumblob DETERMINISTIC NO SQL diff --git a/db/routines/util/functions/today.sql b/db/routines/util/functions/today.sql index 5f65fe2e1..d57b04071 100644 --- a/db/routines/util/functions/today.sql +++ b/db/routines/util/functions/today.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`today`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`today`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/tomorrow.sql b/db/routines/util/functions/tomorrow.sql index e85af114e..71fbcf8f5 100644 --- a/db/routines/util/functions/tomorrow.sql +++ b/db/routines/util/functions/tomorrow.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`tomorrow`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`tomorrow`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/twoDaysAgo.sql b/db/routines/util/functions/twoDaysAgo.sql index e00d965a4..2612ed689 100644 --- a/db/routines/util/functions/twoDaysAgo.sql +++ b/db/routines/util/functions/twoDaysAgo.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`twoDaysAgo`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`twoDaysAgo`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yearRelativePosition.sql b/db/routines/util/functions/yearRelativePosition.sql index bede2d809..e62e50eb4 100644 --- a/db/routines/util/functions/yearRelativePosition.sql +++ b/db/routines/util/functions/yearRelativePosition.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`yearRelativePosition`(vYear INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN diff --git a/db/routines/util/functions/yesterday.sql b/db/routines/util/functions/yesterday.sql index bc21a263a..a1938ab10 100644 --- a/db/routines/util/functions/yesterday.sql +++ b/db/routines/util/functions/yesterday.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `util`.`yesterday`() +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`yesterday`() RETURNS date DETERMINISTIC BEGIN diff --git a/db/routines/util/procedures/checkHex.sql b/db/routines/util/procedures/checkHex.sql index 8fc4003f4..3cd5452e8 100644 --- a/db/routines/util/procedures/checkHex.sql +++ b/db/routines/util/procedures/checkHex.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`checkHex`(vParam VARCHAR(255)) BEGIN /** * Comprueba si vParam es un número hexadecimal que empieza por # y tiene una longitud total de 7 dígitos diff --git a/db/routines/util/procedures/connection_kill.sql b/db/routines/util/procedures/connection_kill.sql index 3b9ea17f3..b38509d1b 100644 --- a/db/routines/util/procedures/connection_kill.sql +++ b/db/routines/util/procedures/connection_kill.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`connection_kill`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`( vConnectionId BIGINT ) BEGIN diff --git a/db/routines/util/procedures/debugAdd.sql b/db/routines/util/procedures/debugAdd.sql index cf1c92606..a8f7b3aa2 100644 --- a/db/routines/util/procedures/debugAdd.sql +++ b/db/routines/util/procedures/debugAdd.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`debugAdd`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`debugAdd`( vVariable VARCHAR(255), vValue TEXT ) diff --git a/db/routines/util/procedures/exec.sql b/db/routines/util/procedures/exec.sql index 5fec91ec7..ca66884a5 100644 --- a/db/routines/util/procedures/exec.sql +++ b/db/routines/util/procedures/exec.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`exec`(vSqlQuery TEXT) SQL SECURITY INVOKER BEGIN /** diff --git a/db/routines/util/procedures/log_add.sql b/db/routines/util/procedures/log_add.sql index aa0ec2388..a5b1519c4 100644 --- a/db/routines/util/procedures/log_add.sql +++ b/db/routines/util/procedures/log_add.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_add`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_add`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_addWithUser.sql b/db/routines/util/procedures/log_addWithUser.sql index 50c86eced..2e20821a6 100644 --- a/db/routines/util/procedures/log_addWithUser.sql +++ b/db/routines/util/procedures/log_addWithUser.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_addWithUser`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_addWithUser`( vSchema VARCHAR(45), vEntity VARCHAR(45), vChangedModel VARCHAR(45), diff --git a/db/routines/util/procedures/log_cleanInstances.sql b/db/routines/util/procedures/log_cleanInstances.sql index 029b50eea..756a8d1f3 100644 --- a/db/routines/util/procedures/log_cleanInstances.sql +++ b/db/routines/util/procedures/log_cleanInstances.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`log_cleanInstances`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_cleanInstances`( vActionCode VARCHAR(45), INOUT vOldInstance JSON, INOUT vNewInstance JSON) diff --git a/db/routines/util/procedures/procNoOverlap.sql b/db/routines/util/procedures/procNoOverlap.sql index 2a00138c4..9bb2f109e 100644 --- a/db/routines/util/procedures/procNoOverlap.sql +++ b/db/routines/util/procedures/procNoOverlap.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`procNoOverlap`(procName VARCHAR(255)) SQL SECURITY INVOKER proc: BEGIN /** diff --git a/db/routines/util/procedures/proc_changedPrivs.sql b/db/routines/util/procedures/proc_changedPrivs.sql index 69b212599..220652d1a 100644 --- a/db/routines/util/procedures/proc_changedPrivs.sql +++ b/db/routines/util/procedures/proc_changedPrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_changedPrivs`() BEGIN SELECT s.* FROM proc_privs s diff --git a/db/routines/util/procedures/proc_restorePrivs.sql b/db/routines/util/procedures/proc_restorePrivs.sql index 8e7c287c2..0d502a6db 100644 --- a/db/routines/util/procedures/proc_restorePrivs.sql +++ b/db/routines/util/procedures/proc_restorePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_restorePrivs`() BEGIN /** * Restores the privileges saved by proc_savePrivs(). diff --git a/db/routines/util/procedures/proc_savePrivs.sql b/db/routines/util/procedures/proc_savePrivs.sql index 25545ca69..75c289f7b 100644 --- a/db/routines/util/procedures/proc_savePrivs.sql +++ b/db/routines/util/procedures/proc_savePrivs.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`proc_savePrivs`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_savePrivs`() BEGIN /** * Saves routine privileges, used to simplify the task of keeping diff --git a/db/routines/util/procedures/slowLog_prune.sql b/db/routines/util/procedures/slowLog_prune.sql index 59327c1c2..d676ae3d9 100644 --- a/db/routines/util/procedures/slowLog_prune.sql +++ b/db/routines/util/procedures/slowLog_prune.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`slowLog_prune`() +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`slowLog_prune`() BEGIN /** * Prunes MySQL slow query log table deleting all records older than one week. diff --git a/db/routines/util/procedures/throw.sql b/db/routines/util/procedures/throw.sql index b391d3880..260915e0d 100644 --- a/db/routines/util/procedures/throw.sql +++ b/db/routines/util/procedures/throw.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`throw`(vMessage CHAR(55)) BEGIN /** * Throws a user-defined exception. diff --git a/db/routines/util/procedures/time_generate.sql b/db/routines/util/procedures/time_generate.sql index cc93cd372..14cc1edc5 100644 --- a/db/routines/util/procedures/time_generate.sql +++ b/db/routines/util/procedures/time_generate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`time_generate`(vStarted DATE, vEnded DATE) BEGIN /** * Generate a temporary table between the days passed as parameters diff --git a/db/routines/util/procedures/tx_commit.sql b/db/routines/util/procedures/tx_commit.sql index 1f708c533..35f96df8d 100644 --- a/db/routines/util/procedures/tx_commit.sql +++ b/db/routines/util/procedures/tx_commit.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_commit`(vIsTx BOOL) BEGIN /** * Confirma los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_rollback.sql b/db/routines/util/procedures/tx_rollback.sql index 38ee77613..4b00f9ec1 100644 --- a/db/routines/util/procedures/tx_rollback.sql +++ b/db/routines/util/procedures/tx_rollback.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_rollback`(vIsTx BOOL) BEGIN /** * Deshace los cambios asociados a una transacción. diff --git a/db/routines/util/procedures/tx_start.sql b/db/routines/util/procedures/tx_start.sql index ac1a443d3..41f8c94ee 100644 --- a/db/routines/util/procedures/tx_start.sql +++ b/db/routines/util/procedures/tx_start.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_start`(vIsTx BOOL) BEGIN /** * Inicia una transacción. diff --git a/db/routines/util/procedures/warn.sql b/db/routines/util/procedures/warn.sql index 92e40a83d..e1dd33c9c 100644 --- a/db/routines/util/procedures/warn.sql +++ b/db/routines/util/procedures/warn.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`warn`(vCode CHAR(35)) BEGIN DECLARE w VARCHAR(1) DEFAULT '__'; SET @warn = vCode; diff --git a/db/routines/util/views/eventLogGrouped.sql b/db/routines/util/views/eventLogGrouped.sql index 8f3c9f264..8615458b5 100644 --- a/db/routines/util/views/eventLogGrouped.sql +++ b/db/routines/util/views/eventLogGrouped.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `util`.`eventLogGrouped` AS SELECT max(`t`.`date`) AS `lastHappened`, diff --git a/db/routines/vn2008/views/Agencias.sql b/db/routines/vn2008/views/Agencias.sql index ca77395b3..d70ec73f4 100644 --- a/db/routines/vn2008/views/Agencias.sql +++ b/db/routines/vn2008/views/Agencias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Agencias` AS SELECT `am`.`id` AS `Id_Agencia`, diff --git a/db/routines/vn2008/views/Articles.sql b/db/routines/vn2008/views/Articles.sql index f8a1e8d43..385bf310b 100644 --- a/db/routines/vn2008/views/Articles.sql +++ b/db/routines/vn2008/views/Articles.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Articles` AS SELECT `i`.`id` AS `Id_Article`, diff --git a/db/routines/vn2008/views/Bancos.sql b/db/routines/vn2008/views/Bancos.sql index 7f8d289f9..6e850f365 100644 --- a/db/routines/vn2008/views/Bancos.sql +++ b/db/routines/vn2008/views/Bancos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos` AS SELECT `a`.`id` AS `Id_Banco`, diff --git a/db/routines/vn2008/views/Bancos_poliza.sql b/db/routines/vn2008/views/Bancos_poliza.sql index 915f6a64d..4cd443545 100644 --- a/db/routines/vn2008/views/Bancos_poliza.sql +++ b/db/routines/vn2008/views/Bancos_poliza.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Bancos_poliza` AS SELECT `bp`.`id` AS `poliza_id`, diff --git a/db/routines/vn2008/views/Cajas.sql b/db/routines/vn2008/views/Cajas.sql index 59b96a1cc..54b9ee189 100644 --- a/db/routines/vn2008/views/Cajas.sql +++ b/db/routines/vn2008/views/Cajas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cajas` AS SELECT `t`.`id` AS `Id_Caja`, diff --git a/db/routines/vn2008/views/Clientes.sql b/db/routines/vn2008/views/Clientes.sql index 710df071a..153d875bc 100644 --- a/db/routines/vn2008/views/Clientes.sql +++ b/db/routines/vn2008/views/Clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Clientes` AS SELECT `c`.`id` AS `id_cliente`, diff --git a/db/routines/vn2008/views/Comparativa.sql b/db/routines/vn2008/views/Comparativa.sql index 92e8adf1f..875a5c370 100644 --- a/db/routines/vn2008/views/Comparativa.sql +++ b/db/routines/vn2008/views/Comparativa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Comparativa` AS SELECT `c`.`timePeriod` AS `Periodo`, diff --git a/db/routines/vn2008/views/Compres.sql b/db/routines/vn2008/views/Compres.sql index 786aef3cb..b99dd2b73 100644 --- a/db/routines/vn2008/views/Compres.sql +++ b/db/routines/vn2008/views/Compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres` AS SELECT `c`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Compres_mark.sql b/db/routines/vn2008/views/Compres_mark.sql index aac73aa20..7138c4e4c 100644 --- a/db/routines/vn2008/views/Compres_mark.sql +++ b/db/routines/vn2008/views/Compres_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Compres_mark` AS SELECT `bm`.`id` AS `Id_Compra`, diff --git a/db/routines/vn2008/views/Consignatarios.sql b/db/routines/vn2008/views/Consignatarios.sql index df7d07fb3..13a426f4d 100644 --- a/db/routines/vn2008/views/Consignatarios.sql +++ b/db/routines/vn2008/views/Consignatarios.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Consignatarios` AS SELECT `a`.`id` AS `id_consigna`, diff --git a/db/routines/vn2008/views/Cubos.sql b/db/routines/vn2008/views/Cubos.sql index ce28d414a..4ece9c435 100644 --- a/db/routines/vn2008/views/Cubos.sql +++ b/db/routines/vn2008/views/Cubos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos` AS SELECT `p`.`id` AS `Id_Cubo`, diff --git a/db/routines/vn2008/views/Cubos_Retorno.sql b/db/routines/vn2008/views/Cubos_Retorno.sql index 152d72c99..bc56f275b 100644 --- a/db/routines/vn2008/views/Cubos_Retorno.sql +++ b/db/routines/vn2008/views/Cubos_Retorno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Cubos_Retorno` AS SELECT `rb`.`id` AS `idCubos_Retorno`, diff --git a/db/routines/vn2008/views/Entradas.sql b/db/routines/vn2008/views/Entradas.sql index bca2a759f..63fbaa728 100644 --- a/db/routines/vn2008/views/Entradas.sql +++ b/db/routines/vn2008/views/Entradas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas` AS SELECT `e`.`id` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Entradas_Auto.sql b/db/routines/vn2008/views/Entradas_Auto.sql index 64f6f8ae6..5d1266965 100644 --- a/db/routines/vn2008/views/Entradas_Auto.sql +++ b/db/routines/vn2008/views/Entradas_Auto.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_Auto` AS SELECT `ev`.`entryFk` AS `Id_Entrada` diff --git a/db/routines/vn2008/views/Entradas_orden.sql b/db/routines/vn2008/views/Entradas_orden.sql index ddc294848..66f46a929 100644 --- a/db/routines/vn2008/views/Entradas_orden.sql +++ b/db/routines/vn2008/views/Entradas_orden.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Entradas_orden` AS SELECT `eo`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/Impresoras.sql b/db/routines/vn2008/views/Impresoras.sql index 76118af1e..c4782ab72 100644 --- a/db/routines/vn2008/views/Impresoras.sql +++ b/db/routines/vn2008/views/Impresoras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Impresoras` AS SELECT `vn`.`printer`.`id` AS `Id_impresora`, diff --git a/db/routines/vn2008/views/Monedas.sql b/db/routines/vn2008/views/Monedas.sql index 88a2cf495..3693885be 100644 --- a/db/routines/vn2008/views/Monedas.sql +++ b/db/routines/vn2008/views/Monedas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Monedas` AS SELECT `c`.`id` AS `Id_Moneda`, diff --git a/db/routines/vn2008/views/Movimientos.sql b/db/routines/vn2008/views/Movimientos.sql index 458ae4d48..da41c51bb 100644 --- a/db/routines/vn2008/views/Movimientos.sql +++ b/db/routines/vn2008/views/Movimientos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos` AS SELECT `m`.`id` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_componentes.sql b/db/routines/vn2008/views/Movimientos_componentes.sql index a88e5f7d1..440fbfb6a 100644 --- a/db/routines/vn2008/views/Movimientos_componentes.sql +++ b/db/routines/vn2008/views/Movimientos_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_componentes` AS SELECT `sc`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Movimientos_mark.sql b/db/routines/vn2008/views/Movimientos_mark.sql index cc42e565e..10ef2fc08 100644 --- a/db/routines/vn2008/views/Movimientos_mark.sql +++ b/db/routines/vn2008/views/Movimientos_mark.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Movimientos_mark` AS SELECT `mm`.`saleFk` AS `Id_Movimiento`, diff --git a/db/routines/vn2008/views/Ordenes.sql b/db/routines/vn2008/views/Ordenes.sql index a8266ab98..de31f8f99 100644 --- a/db/routines/vn2008/views/Ordenes.sql +++ b/db/routines/vn2008/views/Ordenes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Ordenes` AS SELECT `tr`.`id` AS `Id_ORDEN`, diff --git a/db/routines/vn2008/views/Origen.sql b/db/routines/vn2008/views/Origen.sql index 58658a1af..5bb1d9b7f 100644 --- a/db/routines/vn2008/views/Origen.sql +++ b/db/routines/vn2008/views/Origen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Origen` AS SELECT `o`.`id` AS `id`, diff --git a/db/routines/vn2008/views/Paises.sql b/db/routines/vn2008/views/Paises.sql index 72636de44..99d2835f0 100644 --- a/db/routines/vn2008/views/Paises.sql +++ b/db/routines/vn2008/views/Paises.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Paises` AS SELECT `c`.`id` AS `Id`, diff --git a/db/routines/vn2008/views/PreciosEspeciales.sql b/db/routines/vn2008/views/PreciosEspeciales.sql index a17503533..cea9f87fd 100644 --- a/db/routines/vn2008/views/PreciosEspeciales.sql +++ b/db/routines/vn2008/views/PreciosEspeciales.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`PreciosEspeciales` AS SELECT `sp`.`id` AS `Id_PrecioEspecial`, diff --git a/db/routines/vn2008/views/Proveedores.sql b/db/routines/vn2008/views/Proveedores.sql index 293732d23..203d4295f 100644 --- a/db/routines/vn2008/views/Proveedores.sql +++ b/db/routines/vn2008/views/Proveedores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores` AS SELECT `s`.`id` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Proveedores_cargueras.sql b/db/routines/vn2008/views/Proveedores_cargueras.sql index 4ff9bd627..c1dc6ad23 100644 --- a/db/routines/vn2008/views/Proveedores_cargueras.sql +++ b/db/routines/vn2008/views/Proveedores_cargueras.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_cargueras` AS SELECT `fs`.`supplierFk` AS `Id_Proveedor` diff --git a/db/routines/vn2008/views/Proveedores_gestdoc.sql b/db/routines/vn2008/views/Proveedores_gestdoc.sql index 1a27f7a7d..c25623b8b 100644 --- a/db/routines/vn2008/views/Proveedores_gestdoc.sql +++ b/db/routines/vn2008/views/Proveedores_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Proveedores_gestdoc` AS SELECT `sd`.`supplierFk` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/Recibos.sql b/db/routines/vn2008/views/Recibos.sql index 8b710cb23..93ec7bc6f 100644 --- a/db/routines/vn2008/views/Recibos.sql +++ b/db/routines/vn2008/views/Recibos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Recibos` AS SELECT `r`.`Id` AS `Id`, diff --git a/db/routines/vn2008/views/Remesas.sql b/db/routines/vn2008/views/Remesas.sql index 2986ec6f2..9e8c18ada 100644 --- a/db/routines/vn2008/views/Remesas.sql +++ b/db/routines/vn2008/views/Remesas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Remesas` AS SELECT `r`.`id` AS `Id_Remesa`, diff --git a/db/routines/vn2008/views/Rutas.sql b/db/routines/vn2008/views/Rutas.sql index 959ef887e..78b3bb471 100644 --- a/db/routines/vn2008/views/Rutas.sql +++ b/db/routines/vn2008/views/Rutas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Rutas` AS SELECT `r`.`id` AS `Id_Ruta`, diff --git a/db/routines/vn2008/views/Split.sql b/db/routines/vn2008/views/Split.sql index 812cec8fe..eec90a5f8 100644 --- a/db/routines/vn2008/views/Split.sql +++ b/db/routines/vn2008/views/Split.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Splits` AS SELECT `s`.`id` AS `Id_Split`, diff --git a/db/routines/vn2008/views/Split_lines.sql b/db/routines/vn2008/views/Split_lines.sql index afde3977f..0b7897be7 100644 --- a/db/routines/vn2008/views/Split_lines.sql +++ b/db/routines/vn2008/views/Split_lines.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Split_lines` AS SELECT `sl`.`id` AS `Id_Split_lines`, diff --git a/db/routines/vn2008/views/Tickets.sql b/db/routines/vn2008/views/Tickets.sql index 18646dbab..59dcb9100 100644 --- a/db/routines/vn2008/views/Tickets.sql +++ b/db/routines/vn2008/views/Tickets.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets` AS SELECT `t`.`id` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_state.sql b/db/routines/vn2008/views/Tickets_state.sql index fbbc00170..be59a750f 100644 --- a/db/routines/vn2008/views/Tickets_state.sql +++ b/db/routines/vn2008/views/Tickets_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_state` AS SELECT `t`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tickets_turno.sql b/db/routines/vn2008/views/Tickets_turno.sql index 6d16a5780..28bc2d55f 100644 --- a/db/routines/vn2008/views/Tickets_turno.sql +++ b/db/routines/vn2008/views/Tickets_turno.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tickets_turno` AS SELECT `tw`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/Tintas.sql b/db/routines/vn2008/views/Tintas.sql index 729cfa9d6..2299aa759 100644 --- a/db/routines/vn2008/views/Tintas.sql +++ b/db/routines/vn2008/views/Tintas.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tintas` AS SELECT `i`.`id` AS `Id_Tinta`, diff --git a/db/routines/vn2008/views/Tipos.sql b/db/routines/vn2008/views/Tipos.sql index 5a99e2aca..5b96c1766 100644 --- a/db/routines/vn2008/views/Tipos.sql +++ b/db/routines/vn2008/views/Tipos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tipos` AS SELECT `it`.`id` AS `tipo_id`, diff --git a/db/routines/vn2008/views/Trabajadores.sql b/db/routines/vn2008/views/Trabajadores.sql index a5c8353d2..72b53e54e 100644 --- a/db/routines/vn2008/views/Trabajadores.sql +++ b/db/routines/vn2008/views/Trabajadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Trabajadores` AS SELECT `w`.`id` AS `Id_Trabajador`, diff --git a/db/routines/vn2008/views/Tramos.sql b/db/routines/vn2008/views/Tramos.sql index a9847a1b1..6919a610b 100644 --- a/db/routines/vn2008/views/Tramos.sql +++ b/db/routines/vn2008/views/Tramos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Tramos` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/V_edi_item_track.sql b/db/routines/vn2008/views/V_edi_item_track.sql index 8e0182719..64cfdc1c5 100644 --- a/db/routines/vn2008/views/V_edi_item_track.sql +++ b/db/routines/vn2008/views/V_edi_item_track.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`V_edi_item_track` AS SELECT `edi`.`item_track`.`item_id` AS `item_id`, diff --git a/db/routines/vn2008/views/Vehiculos_consumo.sql b/db/routines/vn2008/views/Vehiculos_consumo.sql index 2808371c7..422a77499 100644 --- a/db/routines/vn2008/views/Vehiculos_consumo.sql +++ b/db/routines/vn2008/views/Vehiculos_consumo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Vehiculos_consumo` AS SELECT `vc`.`id` AS `Vehiculos_consumo_id`, diff --git a/db/routines/vn2008/views/account_conciliacion.sql b/db/routines/vn2008/views/account_conciliacion.sql index e652648f5..66db78eee 100644 --- a/db/routines/vn2008/views/account_conciliacion.sql +++ b/db/routines/vn2008/views/account_conciliacion.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_conciliacion` AS SELECT `ar`.`id` AS `idaccount_conciliacion`, diff --git a/db/routines/vn2008/views/account_detail.sql b/db/routines/vn2008/views/account_detail.sql index 874f1f90c..74d35ae41 100644 --- a/db/routines/vn2008/views/account_detail.sql +++ b/db/routines/vn2008/views/account_detail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail` AS SELECT `ac`.`id` AS `account_detail_id`, diff --git a/db/routines/vn2008/views/account_detail_type.sql b/db/routines/vn2008/views/account_detail_type.sql index 5f6f22cd9..6def86a9a 100644 --- a/db/routines/vn2008/views/account_detail_type.sql +++ b/db/routines/vn2008/views/account_detail_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`account_detail_type` AS SELECT `adt`.`id` AS `account_detail_type_id`, diff --git a/db/routines/vn2008/views/agency.sql b/db/routines/vn2008/views/agency.sql index 015149e60..637bb0910 100644 --- a/db/routines/vn2008/views/agency.sql +++ b/db/routines/vn2008/views/agency.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`agency` AS SELECT `a`.`id` AS `agency_id`, diff --git a/db/routines/vn2008/views/airline.sql b/db/routines/vn2008/views/airline.sql index 364e61ab1..786206b1c 100644 --- a/db/routines/vn2008/views/airline.sql +++ b/db/routines/vn2008/views/airline.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airline` AS SELECT `a`.`id` AS `airline_id`, diff --git a/db/routines/vn2008/views/airport.sql b/db/routines/vn2008/views/airport.sql index 3e4238e51..0e8ab39d2 100644 --- a/db/routines/vn2008/views/airport.sql +++ b/db/routines/vn2008/views/airport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`airport` AS SELECT `a`.`id` AS `airport_id`, diff --git a/db/routines/vn2008/views/albaran.sql b/db/routines/vn2008/views/albaran.sql index 1851834cd..b1055ff56 100644 --- a/db/routines/vn2008/views/albaran.sql +++ b/db/routines/vn2008/views/albaran.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran` AS SELECT `dn`.`id` AS `albaran_id`, diff --git a/db/routines/vn2008/views/albaran_gestdoc.sql b/db/routines/vn2008/views/albaran_gestdoc.sql index d4d0ecbce..ffde86937 100644 --- a/db/routines/vn2008/views/albaran_gestdoc.sql +++ b/db/routines/vn2008/views/albaran_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_gestdoc` AS SELECT `dnd`.`dmsFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/albaran_state.sql b/db/routines/vn2008/views/albaran_state.sql index 03056d7f0..a15938f45 100644 --- a/db/routines/vn2008/views/albaran_state.sql +++ b/db/routines/vn2008/views/albaran_state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`albaran_state` AS SELECT `dn`.`id` AS `albaran_state_id`, diff --git a/db/routines/vn2008/views/awb.sql b/db/routines/vn2008/views/awb.sql index d37ca2167..010596288 100644 --- a/db/routines/vn2008/views/awb.sql +++ b/db/routines/vn2008/views/awb.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb` AS SELECT `a`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component.sql b/db/routines/vn2008/views/awb_component.sql index 39eec2733..8053c4a59 100644 --- a/db/routines/vn2008/views/awb_component.sql +++ b/db/routines/vn2008/views/awb_component.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component` AS SELECT `ac`.`id` AS `id`, diff --git a/db/routines/vn2008/views/awb_component_template.sql b/db/routines/vn2008/views/awb_component_template.sql index cdf178fe1..bc8fd1cd8 100644 --- a/db/routines/vn2008/views/awb_component_template.sql +++ b/db/routines/vn2008/views/awb_component_template.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_template` AS SELECT`act`.`id` AS `awb_component_template_id`, diff --git a/db/routines/vn2008/views/awb_component_type.sql b/db/routines/vn2008/views/awb_component_type.sql index f65df513f..45921e11c 100644 --- a/db/routines/vn2008/views/awb_component_type.sql +++ b/db/routines/vn2008/views/awb_component_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_component_type` AS SELECT `act`.`id` AS `awb_component_type_id`, diff --git a/db/routines/vn2008/views/awb_gestdoc.sql b/db/routines/vn2008/views/awb_gestdoc.sql index 16715ce6b..6b5c58d56 100644 --- a/db/routines/vn2008/views/awb_gestdoc.sql +++ b/db/routines/vn2008/views/awb_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_gestdoc` AS SELECT `ad`.`id` AS `awb_gestdoc_id`, diff --git a/db/routines/vn2008/views/awb_recibida.sql b/db/routines/vn2008/views/awb_recibida.sql index 9f04e0e35..c7586214d 100644 --- a/db/routines/vn2008/views/awb_recibida.sql +++ b/db/routines/vn2008/views/awb_recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_recibida` AS SELECT `aii`.`awbFk` AS `awb_id`, diff --git a/db/routines/vn2008/views/awb_role.sql b/db/routines/vn2008/views/awb_role.sql index 3905ee572..5ef004244 100644 --- a/db/routines/vn2008/views/awb_role.sql +++ b/db/routines/vn2008/views/awb_role.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_role` AS SELECT `ar`.`id` AS `awb_role_id`, diff --git a/db/routines/vn2008/views/awb_unit.sql b/db/routines/vn2008/views/awb_unit.sql index 28ad75204..7d1193105 100644 --- a/db/routines/vn2008/views/awb_unit.sql +++ b/db/routines/vn2008/views/awb_unit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`awb_unit` AS SELECT `au`.`id` AS `awb_unit_id`, diff --git a/db/routines/vn2008/views/balance_nest_tree.sql b/db/routines/vn2008/views/balance_nest_tree.sql index e232edba8..66d048d7f 100644 --- a/db/routines/vn2008/views/balance_nest_tree.sql +++ b/db/routines/vn2008/views/balance_nest_tree.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`balance_nest_tree` AS SELECT `bnt`.`lft` AS `lft`, diff --git a/db/routines/vn2008/views/barcodes.sql b/db/routines/vn2008/views/barcodes.sql index 8cf8be064..f366e15fa 100644 --- a/db/routines/vn2008/views/barcodes.sql +++ b/db/routines/vn2008/views/barcodes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`barcodes` AS SELECT `b`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buySource.sql b/db/routines/vn2008/views/buySource.sql index d6db662a7..850483833 100644 --- a/db/routines/vn2008/views/buySource.sql +++ b/db/routines/vn2008/views/buySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buySource` AS SELECT `b`.`entryFk` AS `Id_Entrada`, diff --git a/db/routines/vn2008/views/buy_edi.sql b/db/routines/vn2008/views/buy_edi.sql index 85e4a6b28..d00196e95 100644 --- a/db/routines/vn2008/views/buy_edi.sql +++ b/db/routines/vn2008/views/buy_edi.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/buy_edi_k012.sql b/db/routines/vn2008/views/buy_edi_k012.sql index 790e33079..8ef89e5c9 100644 --- a/db/routines/vn2008/views/buy_edi_k012.sql +++ b/db/routines/vn2008/views/buy_edi_k012.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k012` AS SELECT `eek`.`id` AS `buy_edi_k012_id`, diff --git a/db/routines/vn2008/views/buy_edi_k03.sql b/db/routines/vn2008/views/buy_edi_k03.sql index aef0fb391..04ca10ef5 100644 --- a/db/routines/vn2008/views/buy_edi_k03.sql +++ b/db/routines/vn2008/views/buy_edi_k03.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k03` AS SELECT `eek`.`id` AS `buy_edi_k03_id`, diff --git a/db/routines/vn2008/views/buy_edi_k04.sql b/db/routines/vn2008/views/buy_edi_k04.sql index e207e4317..3c32e3b88 100644 --- a/db/routines/vn2008/views/buy_edi_k04.sql +++ b/db/routines/vn2008/views/buy_edi_k04.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`buy_edi_k04` AS SELECT `eek`.`id` AS `buy_edi_k04_id`, diff --git a/db/routines/vn2008/views/cdr.sql b/db/routines/vn2008/views/cdr.sql index d13c7dd32..9d0d2f172 100644 --- a/db/routines/vn2008/views/cdr.sql +++ b/db/routines/vn2008/views/cdr.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cdr` AS SELECT `c`.`call_date` AS `calldate`, diff --git a/db/routines/vn2008/views/chanel.sql b/db/routines/vn2008/views/chanel.sql index 0480ca588..9d2ed0d9c 100644 --- a/db/routines/vn2008/views/chanel.sql +++ b/db/routines/vn2008/views/chanel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`chanel` AS SELECT `c`.`id` AS `chanel_id`, diff --git a/db/routines/vn2008/views/cl_act.sql b/db/routines/vn2008/views/cl_act.sql index 9678d2fbb..a62ac3efe 100644 --- a/db/routines/vn2008/views/cl_act.sql +++ b/db/routines/vn2008/views/cl_act.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_act` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_cau.sql b/db/routines/vn2008/views/cl_cau.sql index 8bb352710..a835a94c9 100644 --- a/db/routines/vn2008/views/cl_cau.sql +++ b/db/routines/vn2008/views/cl_cau.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_cau` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_con.sql b/db/routines/vn2008/views/cl_con.sql index c224a01aa..b4f596d56 100644 --- a/db/routines/vn2008/views/cl_con.sql +++ b/db/routines/vn2008/views/cl_con.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_con` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_det.sql b/db/routines/vn2008/views/cl_det.sql index 80c87c51e..cef5c821d 100644 --- a/db/routines/vn2008/views/cl_det.sql +++ b/db/routines/vn2008/views/cl_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_det` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_main.sql b/db/routines/vn2008/views/cl_main.sql index 04d0e10cd..ef0c2cb8a 100644 --- a/db/routines/vn2008/views/cl_main.sql +++ b/db/routines/vn2008/views/cl_main.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_main` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_mot.sql b/db/routines/vn2008/views/cl_mot.sql index 6dfdb702a..60fb27041 100644 --- a/db/routines/vn2008/views/cl_mot.sql +++ b/db/routines/vn2008/views/cl_mot.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_mot` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_res.sql b/db/routines/vn2008/views/cl_res.sql index 31c1da6c1..e82ee73b0 100644 --- a/db/routines/vn2008/views/cl_res.sql +++ b/db/routines/vn2008/views/cl_res.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_res` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/cl_sol.sql b/db/routines/vn2008/views/cl_sol.sql index 3321ce0e4..23f2b8594 100644 --- a/db/routines/vn2008/views/cl_sol.sql +++ b/db/routines/vn2008/views/cl_sol.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`cl_sol` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/config_host.sql b/db/routines/vn2008/views/config_host.sql index b9dbaae35..2d4d6fa4c 100644 --- a/db/routines/vn2008/views/config_host.sql +++ b/db/routines/vn2008/views/config_host.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`config_host` AS SELECT `vn`.`host`.`code` AS `config_host_id`, diff --git a/db/routines/vn2008/views/consignatarios_observation.sql b/db/routines/vn2008/views/consignatarios_observation.sql index 13bbe431a..1f4c2eeb2 100644 --- a/db/routines/vn2008/views/consignatarios_observation.sql +++ b/db/routines/vn2008/views/consignatarios_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`consignatarios_observation` AS SELECT `co`.`id` AS `consignatarios_observation_id`, diff --git a/db/routines/vn2008/views/credit.sql b/db/routines/vn2008/views/credit.sql index e1f71e267..0de60b967 100644 --- a/db/routines/vn2008/views/credit.sql +++ b/db/routines/vn2008/views/credit.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`credit` AS SELECT diff --git a/db/routines/vn2008/views/definitivo.sql b/db/routines/vn2008/views/definitivo.sql index 397b33dbd..1bc554161 100644 --- a/db/routines/vn2008/views/definitivo.sql +++ b/db/routines/vn2008/views/definitivo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`definitivo` AS SELECT `d`.`id` AS `definitivo_id`, diff --git a/db/routines/vn2008/views/edi_article.sql b/db/routines/vn2008/views/edi_article.sql index 68c7a581a..34bb64149 100644 --- a/db/routines/vn2008/views/edi_article.sql +++ b/db/routines/vn2008/views/edi_article.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_article` AS SELECT `edi`.`item`.`id` AS `id`, diff --git a/db/routines/vn2008/views/edi_bucket.sql b/db/routines/vn2008/views/edi_bucket.sql index 0d744e6a7..1af487a6c 100644 --- a/db/routines/vn2008/views/edi_bucket.sql +++ b/db/routines/vn2008/views/edi_bucket.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket` AS SELECT cast( diff --git a/db/routines/vn2008/views/edi_bucket_type.sql b/db/routines/vn2008/views/edi_bucket_type.sql index 845124d49..8e3af2080 100644 --- a/db/routines/vn2008/views/edi_bucket_type.sql +++ b/db/routines/vn2008/views/edi_bucket_type.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_bucket_type` AS SELECT `edi`.`bucket_type`.`bucket_type_id` AS `bucket_type_id`, diff --git a/db/routines/vn2008/views/edi_specie.sql b/db/routines/vn2008/views/edi_specie.sql index c25a5601c..33e38482e 100644 --- a/db/routines/vn2008/views/edi_specie.sql +++ b/db/routines/vn2008/views/edi_specie.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_specie` AS SELECT `edi`.`specie`.`specie_id` AS `specie_id`, diff --git a/db/routines/vn2008/views/edi_supplier.sql b/db/routines/vn2008/views/edi_supplier.sql index d7dd6c353..51f96b83d 100644 --- a/db/routines/vn2008/views/edi_supplier.sql +++ b/db/routines/vn2008/views/edi_supplier.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`edi_supplier` AS SELECT `edi`.`supplier`.`supplier_id` AS `supplier_id`, diff --git a/db/routines/vn2008/views/empresa.sql b/db/routines/vn2008/views/empresa.sql index 6c93cb910..8c80a06e8 100644 --- a/db/routines/vn2008/views/empresa.sql +++ b/db/routines/vn2008/views/empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/empresa_grupo.sql b/db/routines/vn2008/views/empresa_grupo.sql index a626f2c60..35ba27279 100644 --- a/db/routines/vn2008/views/empresa_grupo.sql +++ b/db/routines/vn2008/views/empresa_grupo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`empresa_grupo` AS SELECT `vn`.`companyGroup`.`id` AS `empresa_grupo_id`, diff --git a/db/routines/vn2008/views/entrySource.sql b/db/routines/vn2008/views/entrySource.sql index f816a263d..3a8df41bf 100644 --- a/db/routines/vn2008/views/entrySource.sql +++ b/db/routines/vn2008/views/entrySource.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`entrySource` AS SELECT `e`.`gestDocFk` AS `gestdoc_id`, diff --git a/db/routines/vn2008/views/financialProductType.sql b/db/routines/vn2008/views/financialProductType.sql index 10a8ece21..89a063856 100644 --- a/db/routines/vn2008/views/financialProductType.sql +++ b/db/routines/vn2008/views/financialProductType.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`financialProductType`AS SELECT * FROM vn.financialProductType; \ No newline at end of file diff --git a/db/routines/vn2008/views/flight.sql b/db/routines/vn2008/views/flight.sql index 194cb5a94..2df5362f7 100644 --- a/db/routines/vn2008/views/flight.sql +++ b/db/routines/vn2008/views/flight.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`flight` AS SELECT diff --git a/db/routines/vn2008/views/gastos_resumen.sql b/db/routines/vn2008/views/gastos_resumen.sql index 8db91c1b6..d40d6d229 100644 --- a/db/routines/vn2008/views/gastos_resumen.sql +++ b/db/routines/vn2008/views/gastos_resumen.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`gastos_resumen` AS SELECT diff --git a/db/routines/vn2008/views/integra2.sql b/db/routines/vn2008/views/integra2.sql index cb0847e8a..05840d6bb 100644 --- a/db/routines/vn2008/views/integra2.sql +++ b/db/routines/vn2008/views/integra2.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2` AS SELECT diff --git a/db/routines/vn2008/views/integra2_province.sql b/db/routines/vn2008/views/integra2_province.sql index f0a5e13ee..bc099adb3 100644 --- a/db/routines/vn2008/views/integra2_province.sql +++ b/db/routines/vn2008/views/integra2_province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`integra2_province` AS SELECT diff --git a/db/routines/vn2008/views/mail.sql b/db/routines/vn2008/views/mail.sql index c0d4de602..3074dfa95 100644 --- a/db/routines/vn2008/views/mail.sql +++ b/db/routines/vn2008/views/mail.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mail` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato.sql b/db/routines/vn2008/views/mandato.sql index a2dbc4be6..dde43b48d 100644 --- a/db/routines/vn2008/views/mandato.sql +++ b/db/routines/vn2008/views/mandato.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato` AS SELECT `m`.`id` AS `id`, diff --git a/db/routines/vn2008/views/mandato_tipo.sql b/db/routines/vn2008/views/mandato_tipo.sql index 72f306ace..a1b5b0a9f 100644 --- a/db/routines/vn2008/views/mandato_tipo.sql +++ b/db/routines/vn2008/views/mandato_tipo.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato_tipo` AS SELECT `m`.`id` AS `idmandato_tipo`, diff --git a/db/routines/vn2008/views/pago.sql b/db/routines/vn2008/views/pago.sql index 08506afda..546496070 100644 --- a/db/routines/vn2008/views/pago.sql +++ b/db/routines/vn2008/views/pago.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago` AS SELECT `p`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pago_sdc.sql b/db/routines/vn2008/views/pago_sdc.sql index ef75741fb..29480e376 100644 --- a/db/routines/vn2008/views/pago_sdc.sql +++ b/db/routines/vn2008/views/pago_sdc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pago_sdc` AS SELECT `ei`.`id` AS `pago_sdc_id`, diff --git a/db/routines/vn2008/views/pay_dem.sql b/db/routines/vn2008/views/pay_dem.sql index 55468d6e3..1ef00d645 100644 --- a/db/routines/vn2008/views/pay_dem.sql +++ b/db/routines/vn2008/views/pay_dem.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem` AS SELECT `pd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_dem_det.sql b/db/routines/vn2008/views/pay_dem_det.sql index b9b4485d9..822897ed8 100644 --- a/db/routines/vn2008/views/pay_dem_det.sql +++ b/db/routines/vn2008/views/pay_dem_det.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_dem_det` AS SELECT `pdd`.`id` AS `id`, diff --git a/db/routines/vn2008/views/pay_met.sql b/db/routines/vn2008/views/pay_met.sql index c64d01ce4..63e2b30e0 100644 --- a/db/routines/vn2008/views/pay_met.sql +++ b/db/routines/vn2008/views/pay_met.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`pay_met` AS SELECT `pm`.`id` AS `id`, diff --git a/db/routines/vn2008/views/payrollWorker.sql b/db/routines/vn2008/views/payrollWorker.sql index 7557d61ec..6199e98b8 100644 --- a/db/routines/vn2008/views/payrollWorker.sql +++ b/db/routines/vn2008/views/payrollWorker.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_employee` AS SELECT diff --git a/db/routines/vn2008/views/payroll_categorias.sql b/db/routines/vn2008/views/payroll_categorias.sql index b1eb5f596..b71e69019 100644 --- a/db/routines/vn2008/views/payroll_categorias.sql +++ b/db/routines/vn2008/views/payroll_categorias.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_categorias` AS SELECT `pc`.`id` AS `codcategoria`, diff --git a/db/routines/vn2008/views/payroll_centros.sql b/db/routines/vn2008/views/payroll_centros.sql index 216023467..b7e162f90 100644 --- a/db/routines/vn2008/views/payroll_centros.sql +++ b/db/routines/vn2008/views/payroll_centros.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_centros` AS SELECT `pwc`.`workCenterFkA3` AS `cod_centro`, diff --git a/db/routines/vn2008/views/payroll_conceptos.sql b/db/routines/vn2008/views/payroll_conceptos.sql index e96ca1d29..a7c6ece5b 100644 --- a/db/routines/vn2008/views/payroll_conceptos.sql +++ b/db/routines/vn2008/views/payroll_conceptos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`payroll_conceptos` AS SELECT `pc`.`id` AS `conceptoid`, diff --git a/db/routines/vn2008/views/plantpassport.sql b/db/routines/vn2008/views/plantpassport.sql index c983fab0a..b1be6a80b 100644 --- a/db/routines/vn2008/views/plantpassport.sql +++ b/db/routines/vn2008/views/plantpassport.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport` AS SELECT `pp`.`producerFk` AS `producer_id`, diff --git a/db/routines/vn2008/views/plantpassport_authority.sql b/db/routines/vn2008/views/plantpassport_authority.sql index b8566a8f3..4548bbede 100644 --- a/db/routines/vn2008/views/plantpassport_authority.sql +++ b/db/routines/vn2008/views/plantpassport_authority.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`plantpassport_authority` AS SELECT `ppa`.`id` AS `plantpassport_authority_id`, diff --git a/db/routines/vn2008/views/price_fixed.sql b/db/routines/vn2008/views/price_fixed.sql index 306e9d887..ce8170e7c 100644 --- a/db/routines/vn2008/views/price_fixed.sql +++ b/db/routines/vn2008/views/price_fixed.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`price_fixed` AS SELECT `pf`.`itemFk` AS `item_id`, diff --git a/db/routines/vn2008/views/producer.sql b/db/routines/vn2008/views/producer.sql index dbf7833ca..babfb887e 100644 --- a/db/routines/vn2008/views/producer.sql +++ b/db/routines/vn2008/views/producer.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`producer` AS SELECT `p`.`id` AS `producer_id`, diff --git a/db/routines/vn2008/views/promissoryNote.sql b/db/routines/vn2008/views/promissoryNote.sql index e8d3b8718..0db0fa86f 100644 --- a/db/routines/vn2008/views/promissoryNote.sql +++ b/db/routines/vn2008/views/promissoryNote.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`Pagares` AS SELECT `p`.`id` AS `Id_Pagare`, diff --git a/db/routines/vn2008/views/proveedores_clientes.sql b/db/routines/vn2008/views/proveedores_clientes.sql index 1e5c75f54..e08f4a3a7 100644 --- a/db/routines/vn2008/views/proveedores_clientes.sql +++ b/db/routines/vn2008/views/proveedores_clientes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`proveedores_clientes` AS SELECT `Proveedores`.`Id_Proveedor` AS `Id_Proveedor`, diff --git a/db/routines/vn2008/views/province.sql b/db/routines/vn2008/views/province.sql index 1a08497bc..1477ec803 100644 --- a/db/routines/vn2008/views/province.sql +++ b/db/routines/vn2008/views/province.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`province` AS SELECT `p`.`id` AS `province_id`, diff --git a/db/routines/vn2008/views/recibida.sql b/db/routines/vn2008/views/recibida.sql index ae48debb6..76b86505e 100644 --- a/db/routines/vn2008/views/recibida.sql +++ b/db/routines/vn2008/views/recibida.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_intrastat.sql b/db/routines/vn2008/views/recibida_intrastat.sql index fd472c55a..402781931 100644 --- a/db/routines/vn2008/views/recibida_intrastat.sql +++ b/db/routines/vn2008/views/recibida_intrastat.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_intrastat` AS SELECT `i`.`invoiceInFk` AS `recibida_id`, diff --git a/db/routines/vn2008/views/recibida_iva.sql b/db/routines/vn2008/views/recibida_iva.sql index 96f5c1736..7d948a6ff 100644 --- a/db/routines/vn2008/views/recibida_iva.sql +++ b/db/routines/vn2008/views/recibida_iva.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_iva` AS SELECT `i`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recibida_vencimiento.sql b/db/routines/vn2008/views/recibida_vencimiento.sql index d06230e37..813ae40d7 100644 --- a/db/routines/vn2008/views/recibida_vencimiento.sql +++ b/db/routines/vn2008/views/recibida_vencimiento.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recibida_vencimiento` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/recovery.sql b/db/routines/vn2008/views/recovery.sql index 905ffc347..5bbff3124 100644 --- a/db/routines/vn2008/views/recovery.sql +++ b/db/routines/vn2008/views/recovery.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`recovery` AS SELECT `r`.`id` AS `recovery_id`, diff --git a/db/routines/vn2008/views/reference_rate.sql b/db/routines/vn2008/views/reference_rate.sql index e0d09db58..eb0f1c25e 100644 --- a/db/routines/vn2008/views/reference_rate.sql +++ b/db/routines/vn2008/views/reference_rate.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reference_rate` AS SELECT `rr`.`currencyFk` AS `moneda_id`, diff --git a/db/routines/vn2008/views/reinos.sql b/db/routines/vn2008/views/reinos.sql index 3b1299bb0..4d98d1f09 100644 --- a/db/routines/vn2008/views/reinos.sql +++ b/db/routines/vn2008/views/reinos.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`reinos` AS SELECT `r`.`id` AS `id`, diff --git a/db/routines/vn2008/views/state.sql b/db/routines/vn2008/views/state.sql index 7731eb3cc..63f6589af 100644 --- a/db/routines/vn2008/views/state.sql +++ b/db/routines/vn2008/views/state.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`state` AS SELECT `s`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tag.sql b/db/routines/vn2008/views/tag.sql index 9a1c5c675..25b3ab82e 100644 --- a/db/routines/vn2008/views/tag.sql +++ b/db/routines/vn2008/views/tag.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tag` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/tarifa_componentes.sql b/db/routines/vn2008/views/tarifa_componentes.sql index 72f15bfee..bec53abd9 100644 --- a/db/routines/vn2008/views/tarifa_componentes.sql +++ b/db/routines/vn2008/views/tarifa_componentes.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes` AS SELECT `tarifa_componentes`.`Id_Componente` AS `Id_Componente`, diff --git a/db/routines/vn2008/views/tarifa_componentes_series.sql b/db/routines/vn2008/views/tarifa_componentes_series.sql index ecf425b19..a1d188709 100644 --- a/db/routines/vn2008/views/tarifa_componentes_series.sql +++ b/db/routines/vn2008/views/tarifa_componentes_series.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tarifa_componentes_series` AS SELECT `tarifa_componentes_series`.`tarifa_componentes_series_id` AS `tarifa_componentes_series_id`, diff --git a/db/routines/vn2008/views/tblContadores.sql b/db/routines/vn2008/views/tblContadores.sql index 360171a8b..129d3ce8b 100644 --- a/db/routines/vn2008/views/tblContadores.sql +++ b/db/routines/vn2008/views/tblContadores.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tblContadores` AS SELECT `c`.`id` AS `id`, diff --git a/db/routines/vn2008/views/thermograph.sql b/db/routines/vn2008/views/thermograph.sql index 209d89e91..f51b83d24 100644 --- a/db/routines/vn2008/views/thermograph.sql +++ b/db/routines/vn2008/views/thermograph.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`thermograph` AS SELECT `t`.`id` AS `thermograph_id`, diff --git a/db/routines/vn2008/views/ticket_observation.sql b/db/routines/vn2008/views/ticket_observation.sql index d2aa4733b..deb85e4b6 100644 --- a/db/routines/vn2008/views/ticket_observation.sql +++ b/db/routines/vn2008/views/ticket_observation.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`ticket_observation` AS SELECT `to`.`id` AS `ticket_observation_id`, diff --git a/db/routines/vn2008/views/tickets_gestdoc.sql b/db/routines/vn2008/views/tickets_gestdoc.sql index 707ca8ad8..a8682db57 100644 --- a/db/routines/vn2008/views/tickets_gestdoc.sql +++ b/db/routines/vn2008/views/tickets_gestdoc.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`tickets_gestdoc` AS SELECT `td`.`ticketFk` AS `Id_Ticket`, diff --git a/db/routines/vn2008/views/time.sql b/db/routines/vn2008/views/time.sql index 72104e570..f3bbc8607 100644 --- a/db/routines/vn2008/views/time.sql +++ b/db/routines/vn2008/views/time.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`time` AS SELECT `t`.`dated` AS `date`, diff --git a/db/routines/vn2008/views/travel.sql b/db/routines/vn2008/views/travel.sql index cebde6aae..b55dbf9b6 100644 --- a/db/routines/vn2008/views/travel.sql +++ b/db/routines/vn2008/views/travel.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`travel` AS SELECT `t`.`id` AS `id`, diff --git a/db/routines/vn2008/views/v_Articles_botanical.sql b/db/routines/vn2008/views/v_Articles_botanical.sql index 18db5bf2e..8640bb638 100644 --- a/db/routines/vn2008/views/v_Articles_botanical.sql +++ b/db/routines/vn2008/views/v_Articles_botanical.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_Articles_botanical` AS SELECT `ib`.`itemFk` AS `itemFk`, diff --git a/db/routines/vn2008/views/v_compres.sql b/db/routines/vn2008/views/v_compres.sql index 34b789cf8..8bd6a4a64 100644 --- a/db/routines/vn2008/views/v_compres.sql +++ b/db/routines/vn2008/views/v_compres.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_compres` AS SELECT `TP`.`Id_Tipo` AS `Familia`, diff --git a/db/routines/vn2008/views/v_empresa.sql b/db/routines/vn2008/views/v_empresa.sql index 16c9646c2..5a6d6e0f5 100644 --- a/db/routines/vn2008/views/v_empresa.sql +++ b/db/routines/vn2008/views/v_empresa.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`v_empresa` AS SELECT `e`.`logo` AS `logo`, diff --git a/db/routines/vn2008/views/versiones.sql b/db/routines/vn2008/views/versiones.sql index 3066327c9..3d27f4f92 100644 --- a/db/routines/vn2008/views/versiones.sql +++ b/db/routines/vn2008/views/versiones.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`versiones` AS SELECT `m`.`app` AS `programa`, diff --git a/db/routines/vn2008/views/warehouse_pickup.sql b/db/routines/vn2008/views/warehouse_pickup.sql index 739d6d975..c3a7268a1 100644 --- a/db/routines/vn2008/views/warehouse_pickup.sql +++ b/db/routines/vn2008/views/warehouse_pickup.sql @@ -1,5 +1,5 @@ -CREATE OR REPLACE DEFINER=`vn`@`localhost` +CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`warehouse_pickup` AS SELECT From 340348a38e4b91d22c4c2e8708a0f6e5830a4701 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 20 Aug 2024 10:11:42 +0200 Subject: [PATCH 124/250] feat: refs #7346 backTest checks new implementation --- db/routines/vn/functions/invoiceSerial.sql | 4 +- .../back/methods/invoiceOut/invoiceClient.js | 8 +- .../invoiceOut/specs/clientsToInvoice.spec.js | 75 +++++++++++++++++ .../invoiceOut/specs/invoiceClient.spec.js | 80 ++++++++++++++++--- 4 files changed, 151 insertions(+), 16 deletions(-) create mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/clientsToInvoice.spec.js diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 0269275b1..9df887cf5 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -1,10 +1,10 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(15)) - RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci + RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** - * Obtiene la serie de de una factura + * Obtiene la serie de una factura * dependiendo del area del cliente. * * @param vClientFk Id del cliente diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index ef8a26efc..2c44cef34 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -31,7 +31,7 @@ module.exports = Self => { }, { arg: 'serialType', type: 'string', - description: 'Type of serial', + description: 'Invoice serial number type (see vn.invoiceOutSerial.type enum)', required: true } ], @@ -44,12 +44,10 @@ module.exports = Self => { verb: 'POST' } }); - Self.invoiceClient = async(ctx, options) => { const args = ctx.args; const models = Self.app.models; - options = typeof options == 'object' - ? Object.assign({}, options) : {}; + options = typeof options === 'object' ? {...options} : {}; options.userId = ctx.req.accessToken.userId; let tx; @@ -81,7 +79,7 @@ module.exports = Self => { const invoiceId = await models.Ticket.makeInvoice( ctx, - serialType, + args.serialType, args.companyFk, args.invoiceDate, null, diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/clientsToInvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/clientsToInvoice.spec.js new file mode 100644 index 000000000..470690c5a --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/clientsToInvoice.spec.js @@ -0,0 +1,75 @@ +const models = require('vn-loopback/server/server').models; + +describe('InvoiceOut clientsToInvoice()', () => { + const userId = 1; + const clientId = 1101; + const companyFk = 442; + const maxShipped = new Date(); + maxShipped.setMonth(11); + maxShipped.setDate(31); + maxShipped.setHours(23, 59, 59, 999); + const invoiceDate = new Date(); + const activeCtx = { + getLocale: () => { + return 'en'; + }, + accessToken: {userId: userId}, + __: value => { + return value; + }, + headers: {origin: 'http://localhost'} + }; + const ctx = {req: activeCtx}; + + it('should return a list of clients to invoice', async() => { + spyOn(models.InvoiceOut, 'rawSql').and.callFake(query => { + if (query.includes('ticketPackaging_add')) + return Promise.resolve(true); + else if (query.includes('SELECT c.id clientId')) { + return Promise.resolve([ + { + clientId: clientId, + clientName: 'Test Client', + id: 1, + nickname: 'Address 1' + } + ]); + } + }); + + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + const addresses = await models.InvoiceOut.clientsToInvoice( + ctx, clientId, invoiceDate, maxShipped, companyFk, options); + + expect(addresses.length).toBeGreaterThan(0); + expect(addresses[0].clientId).toBe(clientId); + expect(addresses[0].clientName).toBe('Test Client'); + expect(addresses[0].id).toBe(1); + expect(addresses[0].nickname).toBe('Address 1'); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); + + it('should handle errors and rollback transaction', async() => { + spyOn(models.InvoiceOut, 'rawSql').and.callFake(() => { + return Promise.reject(new Error('Test Error')); + }); + + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + await models.InvoiceOut.clientsToInvoice(ctx, clientId, invoiceDate, maxShipped, companyFk, options); + } catch (e) { + expect(e.message).toBe('Test Error'); + await tx.rollback(); + } + }); +}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js index 0faa8fe1a..cffae394f 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js @@ -3,14 +3,13 @@ const models = require('vn-loopback/server/server').models; describe('InvoiceOut invoiceClient()', () => { const userId = 1; const clientId = 1101; - const addressId = 121; + const addressFk = 121; const companyFk = 442; const minShipped = Date.vnNew(); minShipped.setFullYear(minShipped.getFullYear() - 1); minShipped.setMonth(1); minShipped.setDate(1); minShipped.setHours(0, 0, 0, 0); - const invoiceSerial = 'A'; const activeCtx = { getLocale: () => { return 'en'; @@ -24,8 +23,8 @@ describe('InvoiceOut invoiceClient()', () => { }; const ctx = {req: activeCtx}; - it('should make a global invoicing', async() => { - spyOn(models.InvoiceOut, 'makePdf').and.returnValue(new Promise(resolve => resolve(true))); + it('should make a global invoicing by address and verify billing status', async() => { + spyOn(models.InvoiceOut, 'makePdf').and.returnValue(Promise.resolve(true)); spyOn(models.InvoiceOut, 'invoiceEmail'); const tx = await models.InvoiceOut.beginTransaction({}); @@ -34,20 +33,42 @@ describe('InvoiceOut invoiceClient()', () => { try { ctx.args = { clientId: clientId, - addressId: addressId, + addressId: addressFk, invoiceDate: Date.vnNew(), maxShipped: Date.vnNew(), companyFk: companyFk, - minShipped: minShipped + serialType: 'global' }; + const invoiceOutId = await models.InvoiceOut.invoiceClient(ctx, options); + const invoiceOut = await models.InvoiceOut.findById(invoiceOutId, null, options); - const [firstTicket] = await models.Ticket.find({ + + expect(invoiceOutId).toBeGreaterThan(0); + + const allClientTickets = await models.Ticket.find({ + where: { + clientFk: clientId, + or: [ + {refFk: null}, + {refFk: invoiceOut.ref} + ] + } + }, options); + + const billedTickets = await models.Ticket.find({ where: {refFk: invoiceOut.ref} }, options); - expect(invoiceOutId).toBeGreaterThan(0); - expect(firstTicket.refFk).toContain(invoiceSerial); + const allBilledTicketsHaveCorrectAddress = billedTickets.every(ticket => ticket.addressFk === addressFk); + + expect(allBilledTicketsHaveCorrectAddress).toBe(true); + + const addressTickets = allClientTickets.filter(ticket => ticket.addressFk === addressFk); + + const allAddressTicketsBilled = addressTickets.every(ticket => ticket.refFk === invoiceOut.ref); + + expect(allAddressTicketsBilled).toBe(true); await tx.rollback(); } catch (e) { @@ -55,4 +76,45 @@ describe('InvoiceOut invoiceClient()', () => { throw e; } }); + jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000; + fit('should invoice all tickets regardless of address when hasToInvoiceByAddress is false', async() => { + spyOn(models.InvoiceOut, 'makePdf').and.returnValue(Promise.resolve(true)); + spyOn(models.InvoiceOut, 'invoiceEmail'); + + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + console.log('Searching for client with ID:', clientId); + const client = await models.Client.findById(clientId, options); + console.log('Found client:', JSON.stringify(client, null, 2)); + + if (!client) + throw new Error(`Client with id ${clientId} not found`); + + console.log('Client before update:', JSON.stringify(client, null, 2)); + console.log('Current hasToInvoiceByAddress value:', client.hasToInvoiceByAddress); + + try { + console.log('Attempting to update hasToInvoiceByAddress'); + await client.updateAttribute('hasToInvoiceByAddress', false, options); + console.log('Update successful'); + } catch (updateError) { + console.error('Error updating hasToInvoiceByAddress:', updateError); + console.error('Error stack:', updateError.stack); + throw updateError; + } + + console.log('Client after update:', JSON.stringify(client, null, 2)); + console.log('New hasToInvoiceByAddress value:', client.hasToInvoiceByAddress); + + console.log('Test completed successfully'); + await tx.rollback(); + } catch (e) { + console.error('Test failed:', e); + console.error('Error stack:', e.stack); + await tx.rollback(); + throw e; + } + }); }); From 65ba1d466453e9848ea1197f46808a4b35e2a18d Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 20 Aug 2024 10:11:56 +0200 Subject: [PATCH 125/250] feat: refs #7346 backTest checks new implementation --- .../invoiceOut/specs/invoiceClient.spec.js | 61 ++++++++++++------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js index cffae394f..369257ebe 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js @@ -1,4 +1,5 @@ const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); describe('InvoiceOut invoiceClient()', () => { const userId = 1; @@ -22,6 +23,11 @@ describe('InvoiceOut invoiceClient()', () => { }; const ctx = {req: activeCtx}; + beforeAll(() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ + active: activeCtx + }); + }); it('should make a global invoicing by address and verify billing status', async() => { spyOn(models.InvoiceOut, 'makePdf').and.returnValue(Promise.resolve(true)); @@ -85,34 +91,47 @@ describe('InvoiceOut invoiceClient()', () => { const options = {transaction: tx}; try { - console.log('Searching for client with ID:', clientId); - const client = await models.Client.findById(clientId, options); - console.log('Found client:', JSON.stringify(client, null, 2)); + const client = await models.Client.findById(clientId, null, options); + await client.updateAttribute('hasToInvoiceByAddress', false, options); - if (!client) - throw new Error(`Client with id ${clientId} not found`); + ctx.args = { + clientId: clientId, + invoiceDate: Date.vnNew(), + maxShipped: Date.vnNew(), + companyFk: companyFk, + serialType: 'global' + }; - console.log('Client before update:', JSON.stringify(client, null, 2)); - console.log('Current hasToInvoiceByAddress value:', client.hasToInvoiceByAddress); + const invoiceOutId = await models.InvoiceOut.invoiceClient(ctx, options); - try { - console.log('Attempting to update hasToInvoiceByAddress'); - await client.updateAttribute('hasToInvoiceByAddress', false, options); - console.log('Update successful'); - } catch (updateError) { - console.error('Error updating hasToInvoiceByAddress:', updateError); - console.error('Error stack:', updateError.stack); - throw updateError; - } + const invoiceOut = await models.InvoiceOut.findById(invoiceOutId, null, options); - console.log('Client after update:', JSON.stringify(client, null, 2)); - console.log('New hasToInvoiceByAddress value:', client.hasToInvoiceByAddress); + expect(invoiceOutId).toBeGreaterThan(0); + + const allClientTickets = await models.Ticket.find({ + where: { + clientFk: clientId, + or: [ + {refFk: null}, + {refFk: invoiceOut.ref} + ] + } + }, options); + + const billedTickets = await models.Ticket.find({ + where: {refFk: invoiceOut.ref} + }, options); + + const allTicketsBilled = allClientTickets.every(ticket => ticket.refFk === invoiceOut.ref); + + expect(allTicketsBilled).toBe(true); + + const billedAddresses = new Set(billedTickets.map(ticket => ticket.addressFk)); + + expect(billedAddresses.size).toBeGreaterThan(1); - console.log('Test completed successfully'); await tx.rollback(); } catch (e) { - console.error('Test failed:', e); - console.error('Error stack:', e.stack); await tx.rollback(); throw e; } From 55799719aec7f4565ad207122a04ea4472d7fac0 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 20 Aug 2024 10:16:59 +0200 Subject: [PATCH 126/250] fix: refs #7346 minor error --- .../back/methods/invoiceOut/specs/invoiceClient.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js index 369257ebe..c731912ec 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/invoiceClient.spec.js @@ -82,8 +82,8 @@ describe('InvoiceOut invoiceClient()', () => { throw e; } }); - jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000; - fit('should invoice all tickets regardless of address when hasToInvoiceByAddress is false', async() => { + + it('should invoice all tickets regardless of address when hasToInvoiceByAddress is false', async() => { spyOn(models.InvoiceOut, 'makePdf').and.returnValue(Promise.resolve(true)); spyOn(models.InvoiceOut, 'invoiceEmail'); From 09f1637064f03f294b92068648c1d746f7080c10 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 10:19:46 +0200 Subject: [PATCH 127/250] fix: refs #212295 ticket 212295 Fixed claim link --- modules/claim/back/methods/claim/updateClaim.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/claim/back/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js index 326192385..10d304496 100644 --- a/modules/claim/back/methods/claim/updateClaim.js +++ b/modules/claim/back/methods/claim/updateClaim.js @@ -108,7 +108,7 @@ module.exports = Self => { async function notifyStateChange(ctx, workerId, claim, newState) { const models = Self.app.models; - const url = await models.Url.getUrl(); + const url = await models.Url.getUrl('lilium'); const $t = ctx.req.__; const message = $t(`Claim state has changed to`, { @@ -122,7 +122,7 @@ module.exports = Self => { async function notifyPickUp(ctx, workerId, claim) { const models = Self.app.models; - const url = await models.Url.getUrl(); + const url = await models.Url.getUrl('lilium'); const $t = ctx.req.__; // $translate const message = $t('Claim will be picked', { From a995d80b46270d82e76f841f648f0f35c8222c6a Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 10:58:26 +0200 Subject: [PATCH 128/250] feat: refs #3199 Requested changes --- .../vn/procedures/ticket_recalcByScope.sql | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 1541b532e..9199325ee 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -14,22 +14,26 @@ BEGIN DECLARE vTicketFk INT; DECLARE cTickets CURSOR FOR + SELECT DISTINCT t.id + FROM ticket t + LEFT JOIN tItemCalc tic ON tic.id = t.id + WHERE t.refFk IS NULL + AND ((vScope = 'client' AND t.clientFk = vId) + OR (vScope = 'address' AND t.addressFk = vId) + OR (vScope = 'item' AND tic.id) + ); + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + CREATE OR REPLACE TEMPORARY TABLE tItemCalc SELECT DISTINCT t.id FROM ticket t JOIN sale s ON s.ticketFk = t.id JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk WHERE t.refFk IS NULL - AND ( - (vScope = 'client' AND t.clientFk = vId) - OR (vScope = 'address' AND t.addressFk = vId) - OR (vScope = 'item' AND itc.itemFk = vId) - ); - - DECLARE CONTINUE HANDLER FOR NOT FOUND - SET vDone = TRUE; + AND (vScope = 'item' AND itc.itemFk = vId); OPEN cTickets; - myLoop: LOOP SET vDone = FALSE; FETCH cTickets INTO vTicketFk; @@ -40,7 +44,8 @@ BEGIN CALL ticket_recalc(vTicketFk, NULL); END LOOP; - CLOSE cTickets; + + DROP TEMPORARY TABLE tItemCalc; END$$ DELIMITER ; From d0f1362f85a534ad7e365f9b33060fc8fb36ee47 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 10:59:05 +0200 Subject: [PATCH 129/250] feat: refs #3199 Requested changes --- db/routines/vn/procedures/ticket_recalcByScope.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index 9199325ee..b872d3163 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -16,16 +16,16 @@ BEGIN DECLARE cTickets CURSOR FOR SELECT DISTINCT t.id FROM ticket t - LEFT JOIN tItemCalc tic ON tic.id = t.id + LEFT JOIN tItems ti ON ti.id = t.id WHERE t.refFk IS NULL AND ((vScope = 'client' AND t.clientFk = vId) OR (vScope = 'address' AND t.addressFk = vId) - OR (vScope = 'item' AND tic.id) + OR (vScope = 'item' AND ti.id) ); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - CREATE OR REPLACE TEMPORARY TABLE tItemCalc + CREATE OR REPLACE TEMPORARY TABLE tItems SELECT DISTINCT t.id FROM ticket t JOIN sale s ON s.ticketFk = t.id @@ -46,6 +46,6 @@ BEGIN END LOOP; CLOSE cTickets; - DROP TEMPORARY TABLE tItemCalc; + DROP TEMPORARY TABLE tItems; END$$ DELIMITER ; From 7fc47f05060be40dbd747c6ddc1fe8ee9710d6cc Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 11:43:08 +0200 Subject: [PATCH 130/250] feat: refs #7564 Requested changes --- .../vn/procedures/ticket_setVolumeItemCost.sql | 9 +++------ db/versions/11124-greenBamboo/01-firstScript.sql | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 db/versions/11124-greenBamboo/01-firstScript.sql diff --git a/db/routines/vn/procedures/ticket_setVolumeItemCost.sql b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql index c00fc63dc..f266cd769 100644 --- a/db/routines/vn/procedures/ticket_setVolumeItemCost.sql +++ b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql @@ -16,17 +16,14 @@ BEGIN JOIN ticket t ON t.id = s.ticketFk JOIN itemCost ic ON ic.itemFk = s.itemFk AND ic.warehouseFk = t.warehouseFk - WHERE t.id IN ( - SELECT DISTINCT ticketFk - FROM sale - WHERE itemFk = vItemFk - ) + WHERE s.itemFk = vItemFk + AND t.shipped >= util.VN_CURDATE() GROUP BY t.id; UPDATE ticket t JOIN tTicket tt ON tt.id = t.id SET t.volume = tt.volume; - + DROP TEMPORARY TABLE tTicket; END$$ DELIMITER ; diff --git a/db/versions/11124-greenBamboo/01-firstScript.sql b/db/versions/11124-greenBamboo/01-firstScript.sql new file mode 100644 index 000000000..0398e8a13 --- /dev/null +++ b/db/versions/11124-greenBamboo/01-firstScript.sql @@ -0,0 +1,16 @@ +-- Calculamos todos los volumenes de todos los tickets una sola vez +CREATE OR REPLACE TEMPORARY TABLE tTicketVolume + (PRIMARY KEY (id)) + ENGINE = MEMORY + SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN itemCost ic ON ic.itemFk = s.itemFk + AND ic.warehouseFk = t.warehouseFk + GROUP BY t.id; + +UPDATE ticket t + JOIN tTicketVolume tv ON tv.id = t.id + SET t.volume = tv.volume; + +DROP TEMPORARY TABLE tTicketVolume; From 8a03650eca59a06f412637d03a89c61f7bcce7ef Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 11:44:38 +0200 Subject: [PATCH 131/250] feat: refs #7564 Requested changes --- db/versions/11124-greenBamboo/01-firstScript.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/versions/11124-greenBamboo/01-firstScript.sql b/db/versions/11124-greenBamboo/01-firstScript.sql index 0398e8a13..ff1177455 100644 --- a/db/versions/11124-greenBamboo/01-firstScript.sql +++ b/db/versions/11124-greenBamboo/01-firstScript.sql @@ -3,13 +3,13 @@ CREATE OR REPLACE TEMPORARY TABLE tTicketVolume (PRIMARY KEY (id)) ENGINE = MEMORY SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume - FROM sale s - JOIN ticket t ON t.id = s.ticketFk - JOIN itemCost ic ON ic.itemFk = s.itemFk + FROM vn.sale s + JOIN vn.ticket t ON t.id = s.ticketFk + JOIN vn.itemCost ic ON ic.itemFk = s.itemFk AND ic.warehouseFk = t.warehouseFk GROUP BY t.id; -UPDATE ticket t +UPDATE vn.ticket t JOIN tTicketVolume tv ON tv.id = t.id SET t.volume = tv.volume; From 2b12e046e4d4b28081c2f05b4750574ad32cea88 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 11:45:50 +0200 Subject: [PATCH 132/250] feat: refs #7564 Fix version --- db/versions/11124-greenBamboo/01-firstScript.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/versions/11124-greenBamboo/01-firstScript.sql b/db/versions/11124-greenBamboo/01-firstScript.sql index ff1177455..06c6918be 100644 --- a/db/versions/11124-greenBamboo/01-firstScript.sql +++ b/db/versions/11124-greenBamboo/01-firstScript.sql @@ -1,5 +1,5 @@ -- Calculamos todos los volumenes de todos los tickets una sola vez -CREATE OR REPLACE TEMPORARY TABLE tTicketVolume +CREATE OR REPLACE TEMPORARY TABLE tmp.tTicketVolume (PRIMARY KEY (id)) ENGINE = MEMORY SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume @@ -13,4 +13,4 @@ UPDATE vn.ticket t JOIN tTicketVolume tv ON tv.id = t.id SET t.volume = tv.volume; -DROP TEMPORARY TABLE tTicketVolume; +DROP TEMPORARY TABLE tmp.tTicketVolume; From c991f32f5a737069ea398270ad05e710a70ef3da Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 12:01:28 +0200 Subject: [PATCH 133/250] feat: refs #7564 Fix version --- db/versions/11124-greenBamboo/01-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11124-greenBamboo/01-firstScript.sql b/db/versions/11124-greenBamboo/01-firstScript.sql index 06c6918be..9cacbd5ff 100644 --- a/db/versions/11124-greenBamboo/01-firstScript.sql +++ b/db/versions/11124-greenBamboo/01-firstScript.sql @@ -10,7 +10,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tTicketVolume GROUP BY t.id; UPDATE vn.ticket t - JOIN tTicketVolume tv ON tv.id = t.id + JOIN tmp.tTicketVolume tv ON tv.id = t.id SET t.volume = tv.volume; DROP TEMPORARY TABLE tmp.tTicketVolume; From d2bd408e316cb4b593f6711989ed9486123e339d Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 12:59:28 +0200 Subject: [PATCH 134/250] feat: refs #3199 Requested changes --- db/routines/vn/procedures/ticket_recalcByScope.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index b872d3163..ede755187 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -26,6 +26,8 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; CREATE OR REPLACE TEMPORARY TABLE tItems + (PRIMARY KEY (id)) + ENGINE = MEMORY SELECT DISTINCT t.id FROM ticket t JOIN sale s ON s.ticketFk = t.id From 92f01f79d336e175b0c2613d0b05dadf4b5082e1 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 13:11:04 +0200 Subject: [PATCH 135/250] feat: refs #7800 Added company Fk --- db/versions/11192-maroonSalal/00-firstScript.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 db/versions/11192-maroonSalal/00-firstScript.sql diff --git a/db/versions/11192-maroonSalal/00-firstScript.sql b/db/versions/11192-maroonSalal/00-firstScript.sql new file mode 100644 index 000000000..ac35a3db3 --- /dev/null +++ b/db/versions/11192-maroonSalal/00-firstScript.sql @@ -0,0 +1,3 @@ +ALTER TABLE hedera.tpvMerchantEnable + MODIFY COLUMN companyFk int(10) unsigned NOT NULL, + ADD CONSTRAINT tpvMerchantEnable_company_FK FOREIGN KEY (companyFk) REFERENCES vn.company(id) ON DELETE RESTRICT ON UPDATE CASCADE; From 2d4acd0f0097bd35f23415a8e796f9a7a2fc5510 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 20 Aug 2024 15:03:34 +0200 Subject: [PATCH 136/250] feat: refs #7784 Changes in entry-order-pdf --- .../reports/entry-order/assets/css/style.css | 14 +++-- .../reports/entry-order/entry-order.html | 58 ++++++++++++------- .../reports/entry-order/entry-order.js | 18 +++--- .../reports/entry-order/locale/es.yml | 6 +- .../reports/entry-order/sql/buys.sql | 33 ++++++----- .../reports/entry-order/sql/entry.sql | 17 +++--- .../reports/entry-order/sql/supplier.sql | 21 ++++--- 7 files changed, 96 insertions(+), 71 deletions(-) diff --git a/print/templates/reports/entry-order/assets/css/style.css b/print/templates/reports/entry-order/assets/css/style.css index cabdadf9f..767b1185a 100644 --- a/print/templates/reports/entry-order/assets/css/style.css +++ b/print/templates/reports/entry-order/assets/css/style.css @@ -1,14 +1,20 @@ - - h3 { font-weight: 100; color: #555 } - .report-info { font-size: 20px } - .description strong { text-transform: uppercase; +} +.nowrap { + white-space: nowrap; +} +.padding { + padding: 16px; +} +.tags { + font-size: 10px; + margin: 0; } \ No newline at end of file diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html index ddf0e9b5d..420ccee9b 100644 --- a/print/templates/reports/entry-order/entry-order.html +++ b/print/templates/reports/entry-order/entry-order.html @@ -4,23 +4,23 @@
-
+

{{$t('title')}}

+
-

{{$t('title')}}

- + - + - - + +
{{$t('entryId')}}{{$t('entryId')}} {{entry.id}}
{{$t('date')}}{{$t('date')}} {{formatDate(entry.landed,'%d-%m-%Y')}}
{{$t('ref')}}{{entry.invoiceNumber}}{{$t('ref')}}{{entry.invoiceNumber || '---'}}
@@ -38,42 +38,56 @@
- +
+ - + + + + + - + + - + + + + + - - - - - - + + + + + + + + + + + +
{{$t('boxes')}} {{$t('packing')}}{{$t('concept')}}{{$t('concept')}}{{$t('reference')}}{{$t('tags')}} {{$t('quantity')}} {{$t('price')}} {{$t('amount')}}
{{buy.box}}{{buy.stickers}}x {{buy.packing}}{{buy.itemName}}{{buy.itemName}}{{buy.comment}} + {{buy.tag5}} → {{buy.value5}} + {{buy.tag6}} → {{buy.value6}} + {{buy.tag7}} → {{buy.value7}} + {{buy.quantity | number($i18n.locale)}}x {{buy.buyingValue | currency('EUR', $i18n.locale)}}= {{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
- {{buy.tag5}} {{buy.value5}} - {{buy.tag6}} {{buy.value6}} - {{buy.tag7}} {{buy.value7}} -
- {{$t('total')}} - {{getTotal() | currency('EUR', $i18n.locale)}}
{{getTotalBy('stickers')}}{{getTotalBy('quantity') | number($i18n.locale)}}{{getTotalBy('amount') | currency('EUR', $i18n.locale)}}
diff --git a/print/templates/reports/entry-order/entry-order.js b/print/templates/reports/entry-order/entry-order.js index d31ad1a36..56356e068 100755 --- a/print/templates/reports/entry-order/entry-order.js +++ b/print/templates/reports/entry-order/entry-order.js @@ -13,13 +13,17 @@ module.exports = { return {totalBalance: 0.00}; }, methods: { - getTotal() { - let total = 0.00; - this.buys.forEach(buy => { - total += buy.quantity * buy.buyingValue; - }); - - return total; + getTotalBy(property) { + return this.buys.reduce((total, buy) => { + switch (property) { + case 'amount': + return total + buy.quantity * buy.buyingValue; + case 'quantity': + return total + buy.quantity; + case 'stickers': + return total + buy.stickers; + } + }, 0); } }, props: { diff --git a/print/templates/reports/entry-order/locale/es.yml b/print/templates/reports/entry-order/locale/es.yml index 5c633aeaa..5a6716ba1 100644 --- a/print/templates/reports/entry-order/locale/es.yml +++ b/print/templates/reports/entry-order/locale/es.yml @@ -2,7 +2,7 @@ reportName: pedido-de-entrada title: Pedido supplierName: Proveedor supplierStreet: Dirección -entryId: Referencia interna +entryId: Nº Entrada date: Fecha ref: Nº Factura boxes: Cajas @@ -14,4 +14,6 @@ concept: Descripción total: Total entry: Entrada {0} supplierData: Datos del proveedor -notes: Notas \ No newline at end of file +notes: Notas +reference: Referencia +tags: Tags \ No newline at end of file diff --git a/print/templates/reports/entry-order/sql/buys.sql b/print/templates/reports/entry-order/sql/buys.sql index 5bf9f2dfe..b0f414a9d 100644 --- a/print/templates/reports/entry-order/sql/buys.sql +++ b/print/templates/reports/entry-order/sql/buys.sql @@ -1,16 +1,17 @@ -SELECT - b.itemFk, - b.quantity, - b.buyingValue, - b.stickers box, - b.packing, - i.name itemName, - i.tag5, - i.value5, - i.tag6, - i.value6, - i.tag7, - i.value7 -FROM buy b - JOIN item i ON i.id = b.itemFk -WHERE b.entryFk = ? \ No newline at end of file +SELECT b.itemFk, + b.quantity, + b.buyingValue, + b.stickers, + b.packing, + i.name itemName, + IF(i2.id, i2.comment, i.comment) comment, + i.tag5, + i.value5, + i.tag6, + i.value6, + i.tag7, + i.value7 + FROM buy b + JOIN item i ON i.id = b.itemFk + LEFT JOIN item i2 ON i2.id = b.itemOriginalFk + WHERE b.entryFk = ? diff --git a/print/templates/reports/entry-order/sql/entry.sql b/print/templates/reports/entry-order/sql/entry.sql index c30eebca8..2ab599123 100644 --- a/print/templates/reports/entry-order/sql/entry.sql +++ b/print/templates/reports/entry-order/sql/entry.sql @@ -1,9 +1,8 @@ -SELECT - e.id, - e.invoiceNumber, - c.code companyCode, - t.landed -FROM entry e - JOIN travel t ON t.id = e.travelFk - JOIN company c ON c.id = e.companyFk -WHERE e.id = ? +SELECT e.id, + e.invoiceNumber, + c.code companyCode, + t.landed + FROM entry e + JOIN travel t ON t.id = e.travelFk + JOIN company c ON c.id = e.companyFk + WHERE e.id = ? diff --git a/print/templates/reports/entry-order/sql/supplier.sql b/print/templates/reports/entry-order/sql/supplier.sql index 81ed7e883..214f7913f 100644 --- a/print/templates/reports/entry-order/sql/supplier.sql +++ b/print/templates/reports/entry-order/sql/supplier.sql @@ -1,11 +1,10 @@ -SELECT - s.name, - s.street, - s.nif, - s.postCode, - s.city, - p.name province -FROM supplier s - JOIN entry e ON e.supplierFk = s.id - LEFT JOIN province p ON p.id = s.provinceFk -WHERE e.id = ? +SELECT s.name, + s.street, + s.nif, + s.postCode, + s.city, + p.name province + FROM supplier s + JOIN entry e ON e.supplierFk = s.id + LEFT JOIN province p ON p.id = s.provinceFk + WHERE e.id = ? From cf7ee3d990973918ec74325956569e7ea392f870 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 08:05:45 +0200 Subject: [PATCH 137/250] feat: refs #7784 Requested changes --- print/templates/reports/buy-label/sql/buy.sql | 2 +- print/templates/reports/entry-order/entry-order.html | 4 ++-- print/templates/reports/entry-order/sql/buys.sql | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/print/templates/reports/buy-label/sql/buy.sql b/print/templates/reports/buy-label/sql/buy.sql index 72765baa9..26efeb06e 100644 --- a/print/templates/reports/buy-label/sql/buy.sql +++ b/print/templates/reports/buy-label/sql/buy.sql @@ -22,7 +22,7 @@ labels AS ( b.id, b.itemFk, p.name producer, - IF(i2.id, i2.comment, i.comment) comment + IFNULL(i2.comment, i.comment) comment FROM buy b JOIN item i ON i.id = b.itemFk LEFT JOIN producer p ON p.id = i.producerFk diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html index 420ccee9b..e5d3bfb6d 100644 --- a/print/templates/reports/entry-order/entry-order.html +++ b/print/templates/reports/entry-order/entry-order.html @@ -20,7 +20,7 @@ {{$t('ref')}} - {{entry.invoiceNumber || '---'}} + {{entry.invoiceNumber | dashIfEmpty}} @@ -59,7 +59,7 @@ {{buy.stickers}} x {{buy.packing}} - {{buy.itemName}} + {{buy.name}} {{buy.comment}} {{buy.tag5}} → {{buy.value5}} diff --git a/print/templates/reports/entry-order/sql/buys.sql b/print/templates/reports/entry-order/sql/buys.sql index b0f414a9d..92c055483 100644 --- a/print/templates/reports/entry-order/sql/buys.sql +++ b/print/templates/reports/entry-order/sql/buys.sql @@ -3,8 +3,8 @@ SELECT b.itemFk, b.buyingValue, b.stickers, b.packing, - i.name itemName, - IF(i2.id, i2.comment, i.comment) comment, + i.name, + IFNULL(i2.comment, i.comment) comment, i.tag5, i.value5, i.tag6, From d2709a871c171b723ef02118b1b0a142312bd79c Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 08:29:32 +0200 Subject: [PATCH 138/250] feat: refs #7514 Changes to put srt log --- .../srt/triggers/buffer_afterDelete.sql | 12 ++++++++++++ .../srt/triggers/buffer_beforeInsert.sql | 8 ++++++++ .../srt/triggers/buffer_beforeUpdate.sql | 8 ++++++++ .../srt/triggers/config_afterDelete.sql | 12 ++++++++++++ .../srt/triggers/config_beforeInsert.sql | 8 ++++++++ .../srt/triggers/config_beforeUpdate.sql | 8 ++++++++ .../11193-bronzeAspidistra/00-firstScript.sql | 19 +++++++++++++++++++ .../11193-bronzeAspidistra/01-firstScript.sql | 1 + .../11193-bronzeAspidistra/02-firstScript.sql | 1 + 9 files changed, 77 insertions(+) create mode 100644 db/routines/srt/triggers/buffer_afterDelete.sql create mode 100644 db/routines/srt/triggers/buffer_beforeInsert.sql create mode 100644 db/routines/srt/triggers/buffer_beforeUpdate.sql create mode 100644 db/routines/srt/triggers/config_afterDelete.sql create mode 100644 db/routines/srt/triggers/config_beforeInsert.sql create mode 100644 db/routines/srt/triggers/config_beforeUpdate.sql create mode 100644 db/versions/11193-bronzeAspidistra/00-firstScript.sql create mode 100644 db/versions/11193-bronzeAspidistra/01-firstScript.sql create mode 100644 db/versions/11193-bronzeAspidistra/02-firstScript.sql diff --git a/db/routines/srt/triggers/buffer_afterDelete.sql b/db/routines/srt/triggers/buffer_afterDelete.sql new file mode 100644 index 000000000..d554e6364 --- /dev/null +++ b/db/routines/srt/triggers/buffer_afterDelete.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_afterDelete` + AFTER DELETE ON `buffer` + FOR EACH ROW +BEGIN + INSERT INTO buffer + SET `action` = 'delete', + `changedModel` = 'Buffer', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/srt/triggers/buffer_beforeInsert.sql b/db/routines/srt/triggers/buffer_beforeInsert.sql new file mode 100644 index 000000000..6b1e05362 --- /dev/null +++ b/db/routines/srt/triggers/buffer_beforeInsert.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_beforeInsert` + BEFORE INSERT ON `buffer` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/srt/triggers/buffer_beforeUpdate.sql b/db/routines/srt/triggers/buffer_beforeUpdate.sql new file mode 100644 index 000000000..86418a551 --- /dev/null +++ b/db/routines/srt/triggers/buffer_beforeUpdate.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_beforeUpdate` + BEFORE UPDATE ON `buffer` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/srt/triggers/config_afterDelete.sql b/db/routines/srt/triggers/config_afterDelete.sql new file mode 100644 index 000000000..1e4af9104 --- /dev/null +++ b/db/routines/srt/triggers/config_afterDelete.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_afterDelete` + AFTER DELETE ON `config` + FOR EACH ROW +BEGIN + INSERT INTO config + SET `action` = 'delete', + `changedModel` = 'Config', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/srt/triggers/config_beforeInsert.sql b/db/routines/srt/triggers/config_beforeInsert.sql new file mode 100644 index 000000000..7d8389646 --- /dev/null +++ b/db/routines/srt/triggers/config_beforeInsert.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_beforeInsert` + BEFORE INSERT ON `config` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/srt/triggers/config_beforeUpdate.sql b/db/routines/srt/triggers/config_beforeUpdate.sql new file mode 100644 index 000000000..0002fb4d6 --- /dev/null +++ b/db/routines/srt/triggers/config_beforeUpdate.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_beforeUpdate` + BEFORE UPDATE ON `config` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/versions/11193-bronzeAspidistra/00-firstScript.sql b/db/versions/11193-bronzeAspidistra/00-firstScript.sql new file mode 100644 index 000000000..cc837d007 --- /dev/null +++ b/db/versions/11193-bronzeAspidistra/00-firstScript.sql @@ -0,0 +1,19 @@ +CREATE OR REPLACE TABLE `srt`.`bufferLog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `originFk` int(11) DEFAULT NULL, + `userFk` int(10) unsigned DEFAULT NULL, + `action` set('insert','update','delete','select') NOT NULL, + `creationDate` timestamp NULL DEFAULT current_timestamp(), + `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `changedModel` enum('Buffer', 'Config') NOT NULL DEFAULT 'Buffer', + `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)), + `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), + `changedModelId` int(11) NOT NULL, + `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `logBufferUserFk` (`userFk`), + KEY `bufferLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), + KEY `bufferLog_originFk` (`originFk`,`creationDate`), + CONSTRAINT `bufferUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; diff --git a/db/versions/11193-bronzeAspidistra/01-firstScript.sql b/db/versions/11193-bronzeAspidistra/01-firstScript.sql new file mode 100644 index 000000000..748056f3a --- /dev/null +++ b/db/versions/11193-bronzeAspidistra/01-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE srt.buffer ADD editorFk int(10) unsigned DEFAULT NULL NULL; diff --git a/db/versions/11193-bronzeAspidistra/02-firstScript.sql b/db/versions/11193-bronzeAspidistra/02-firstScript.sql new file mode 100644 index 000000000..36aa938d5 --- /dev/null +++ b/db/versions/11193-bronzeAspidistra/02-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE srt.config ADD editorFk int(10) unsigned DEFAULT NULL NULL; From 62176b8517c83481070681b6b6953bb223262a79 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 09:35:42 +0200 Subject: [PATCH 139/250] feat: refs #7567 Changed time to call event --- db/routines/srt/events/moving_clean.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/srt/events/moving_clean.sql b/db/routines/srt/events/moving_clean.sql index 650c15c62..18644a9f8 100644 --- a/db/routines/srt/events/moving_clean.sql +++ b/db/routines/srt/events/moving_clean.sql @@ -1,6 +1,6 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `srt`.`moving_clean` - ON SCHEDULE EVERY 5 MINUTE + ON SCHEDULE EVERY 15 MINUTE STARTS '2022-01-21 00:00:00.000' ON COMPLETION PRESERVE ENABLE From 29b779d6ab78a14b1e7c55940979f9334996efd6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 12:03:49 +0200 Subject: [PATCH 140/250] feat: refs #7882 Added quadMindsConfig table --- db/versions/11194-orangeOrchid/00-firstScript.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/versions/11194-orangeOrchid/00-firstScript.sql diff --git a/db/versions/11194-orangeOrchid/00-firstScript.sql b/db/versions/11194-orangeOrchid/00-firstScript.sql new file mode 100644 index 000000000..604f4add8 --- /dev/null +++ b/db/versions/11194-orangeOrchid/00-firstScript.sql @@ -0,0 +1,9 @@ +CREATE TABLE vn.quadMindsConfig ( + id int(10) unsigned NULL, + apiKey varchar(255) DEFAULT NULL NULL, + CONSTRAINT quadMindsConfig_pk PRIMARY KEY (id), + CONSTRAINT quadMindsConfig_check CHECK (id = 1) +) +ENGINE=InnoDB +DEFAULT CHARSET=utf8mb3 +COLLATE=utf8mb3_unicode_ci; From c641b47a9b859048b0133be5b85005167c657e2a Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 12:26:34 +0200 Subject: [PATCH 141/250] feat: refs #7882 Added quadMindsConfig table --- db/versions/11194-orangeOrchid/00-firstScript.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/versions/11194-orangeOrchid/00-firstScript.sql b/db/versions/11194-orangeOrchid/00-firstScript.sql index 604f4add8..bcee0c1fa 100644 --- a/db/versions/11194-orangeOrchid/00-firstScript.sql +++ b/db/versions/11194-orangeOrchid/00-firstScript.sql @@ -1,6 +1,7 @@ -CREATE TABLE vn.quadMindsConfig ( +CREATE TABLE vn.quadMindsApiConfig ( id int(10) unsigned NULL, - apiKey varchar(255) DEFAULT NULL NULL, + `url` varchar(255) DEFAULT NULL NULL, + `key` varchar(255) DEFAULT NULL NULL, CONSTRAINT quadMindsConfig_pk PRIMARY KEY (id), CONSTRAINT quadMindsConfig_check CHECK (id = 1) ) From d63a1c54976d379e2458e0c8900c21221158b08a Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 12:28:14 +0200 Subject: [PATCH 142/250] feat: refs #7882 Added quadMindsConfig table --- db/versions/11194-orangeOrchid/00-firstScript.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/versions/11194-orangeOrchid/00-firstScript.sql b/db/versions/11194-orangeOrchid/00-firstScript.sql index bcee0c1fa..59a616edf 100644 --- a/db/versions/11194-orangeOrchid/00-firstScript.sql +++ b/db/versions/11194-orangeOrchid/00-firstScript.sql @@ -1,8 +1,7 @@ CREATE TABLE vn.quadMindsApiConfig ( - id int(10) unsigned NULL, - `url` varchar(255) DEFAULT NULL NULL, + id int(10) unsigned NULL PRIMARY KEY, + `url` varchar(255) DEFAULT NULL NULL, `key` varchar(255) DEFAULT NULL NULL, - CONSTRAINT quadMindsConfig_pk PRIMARY KEY (id), CONSTRAINT quadMindsConfig_check CHECK (id = 1) ) ENGINE=InnoDB From 582fa5faebe80873c8db956b82d693342738a256 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 21 Aug 2024 14:42:03 +0200 Subject: [PATCH 143/250] feat: refs #7567 Requested changes --- db/routines/srt/procedures/moving_clean.sql | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/db/routines/srt/procedures/moving_clean.sql b/db/routines/srt/procedures/moving_clean.sql index ab16aac99..a5bbc7e70 100644 --- a/db/routines/srt/procedures/moving_clean.sql +++ b/db/routines/srt/procedures/moving_clean.sql @@ -5,13 +5,12 @@ BEGIN * Elimina movimientos por inactividad */ DECLARE vExpeditionFk INT; - DECLARE vBufferToFk INT; DECLARE vBufferFromFk INT; DECLARE vStateOutFk INT DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT'); - DECLARE vDone BOOL DEFAULT FALSE; + DECLARE vDone BOOL; DECLARE vSorter CURSOR FOR - SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk + SELECT m.expeditionFk, m.bufferFromFk FROM moving m JOIN ( SELECT bufferFk, SUM(isActive) hasBox @@ -32,7 +31,7 @@ BEGIN OPEN vSorter; l: LOOP SET vDone = FALSE; - FETCH vSorter INTO vExpeditionFk, vBufferToFk, vBufferFromFk; + FETCH vSorter INTO vExpeditionFk, vBufferFromFk; IF vDone THEN LEAVE l; From d9d2ae2f7baa400438e64466a2839f48296cae14 Mon Sep 17 00:00:00 2001 From: ivanm Date: Wed, 21 Aug 2024 16:45:46 +0200 Subject: [PATCH 144/250] feat: refs #7758 Add code mandateType and accountDetailType --- db/dump/fixtures.before.sql | 16 ++++++++-------- db/routines/vn2008/views/mandato_tipo.sql | 2 +- .../11191-chocolateBirch/00-firstScript.sql | 2 ++ .../11191-chocolateBirch/01-firstScript.sql | 2 ++ .../11191-chocolateBirch/02-firstScript.sql | 9 +++++++++ modules/client/back/models/client-sample.js | 2 +- modules/client/back/models/mandate-type.json | 2 +- modules/client/front/mandate/index.html | 2 +- modules/client/front/mandate/index.js | 2 +- 9 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 db/versions/11191-chocolateBirch/00-firstScript.sql create mode 100644 db/versions/11191-chocolateBirch/01-firstScript.sql create mode 100644 db/versions/11191-chocolateBirch/02-firstScript.sql diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 6563292dd..298f84b04 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -412,7 +412,7 @@ INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`) (1103, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), (1104, -30, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)); -INSERT INTO `vn`.`mandateType`(`id`, `name`) +INSERT INTO `vn`.`mandateType`(`id`, `code`) VALUES (1, 'B2B'), (2, 'CORE'), @@ -3945,11 +3945,11 @@ VALUES (35, 'ES12346B12345679', 3, 241); INSERT INTO vn.accountDetailType -(id, description) +(id, description, code) VALUES - (1, 'IBAN'), - (2, 'SWIFT'), - (3, 'Referencia Remesas'), - (4, 'Referencia Transferencias'), - (5, 'Referencia Nominas'), - (6, 'ABA'); + (1, 'IBAN', 'IBAN'), + (2, 'SWIFT', 'SWIFT'), + (3, 'Referencia Remesas', 'REM'), + (4, 'Referencia Transferencias', 'TRAN'), + (5, 'Referencia Nominas', 'NOM'), + (6, 'ABA', 'ABA'); diff --git a/db/routines/vn2008/views/mandato_tipo.sql b/db/routines/vn2008/views/mandato_tipo.sql index a1b5b0a9f..bc3f74632 100644 --- a/db/routines/vn2008/views/mandato_tipo.sql +++ b/db/routines/vn2008/views/mandato_tipo.sql @@ -2,5 +2,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vn2008`.`mandato_tipo` AS SELECT `m`.`id` AS `idmandato_tipo`, - `m`.`name` AS `Nombre` + `m`.`code` AS `Nombre` FROM `vn`.`mandateType` `m` diff --git a/db/versions/11191-chocolateBirch/00-firstScript.sql b/db/versions/11191-chocolateBirch/00-firstScript.sql new file mode 100644 index 000000000..929de87fe --- /dev/null +++ b/db/versions/11191-chocolateBirch/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.mandateType + CHANGE name code VARCHAR(45) DEFAULT NULL; \ No newline at end of file diff --git a/db/versions/11191-chocolateBirch/01-firstScript.sql b/db/versions/11191-chocolateBirch/01-firstScript.sql new file mode 100644 index 000000000..168eaef84 --- /dev/null +++ b/db/versions/11191-chocolateBirch/01-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.accountDetailType + ADD COLUMN code VARCHAR(45) DEFAULT NULL; \ No newline at end of file diff --git a/db/versions/11191-chocolateBirch/02-firstScript.sql b/db/versions/11191-chocolateBirch/02-firstScript.sql new file mode 100644 index 000000000..53b7317b6 --- /dev/null +++ b/db/versions/11191-chocolateBirch/02-firstScript.sql @@ -0,0 +1,9 @@ +UPDATE vn.accountDetailType + SET code = CASE id + WHEN 1 THEN 'IBAN' + WHEN 2 THEN 'SWIFT' + WHEN 3 THEN 'REM' + WHEN 4 THEN 'TRAN' + WHEN 5 THEN 'NOM' + WHEN 6 THEN 'ABA' + END; \ No newline at end of file diff --git a/modules/client/back/models/client-sample.js b/modules/client/back/models/client-sample.js index 5e4393042..b8ab6cff4 100644 --- a/modules/client/back/models/client-sample.js +++ b/modules/client/back/models/client-sample.js @@ -27,7 +27,7 @@ module.exports = Self => { // Renew mandate if (mandate) { const mandateType = await models.MandateType.findOne({ - where: {name: mandate.type} + where: {code: mandate.type} }); const oldMandate = await models.Mandate.findOne({ diff --git a/modules/client/back/models/mandate-type.json b/modules/client/back/models/mandate-type.json index ec189f089..b481e7c72 100644 --- a/modules/client/back/models/mandate-type.json +++ b/modules/client/back/models/mandate-type.json @@ -12,7 +12,7 @@ "type": "number", "description": "Identifier" }, - "name": { + "code": { "type": "string" } } diff --git a/modules/client/front/mandate/index.html b/modules/client/front/mandate/index.html index e2f2cd27b..1ee18737f 100644 --- a/modules/client/front/mandate/index.html +++ b/modules/client/front/mandate/index.html @@ -26,7 +26,7 @@ {{::mandate.id}} {{::mandate.company.code}} - {{::mandate.mandateType.name}} + {{::mandate.mandateType.code}} {{::mandate.created | date:'dd/MM/yyyy HH:mm' | dashIfEmpty}} {{::mandate.finished | date:'dd/MM/yyyy HH:mm' | dashIfEmpty}} diff --git a/modules/client/front/mandate/index.js b/modules/client/front/mandate/index.js index 114e2b570..605ae08cc 100644 --- a/modules/client/front/mandate/index.js +++ b/modules/client/front/mandate/index.js @@ -9,7 +9,7 @@ class Controller extends Section { { relation: 'mandateType', scope: { - fields: ['id', 'name'] + fields: ['id', 'code'] } }, { relation: 'company', From 7c545a379f00bc482aee197fdf8969584ab8ba4e Mon Sep 17 00:00:00 2001 From: ivanm Date: Thu, 22 Aug 2024 17:02:59 +0200 Subject: [PATCH 145/250] feat: refs #7862 roadmap new fields --- db/routines/vn/triggers/roadmap_beforeInsert.sql | 12 ++++++++++++ db/routines/vn/triggers/roadmap_beforeUpdate.sql | 12 ++++++++++++ db/versions/11195-salmonPalmetto/00-firstScript.sql | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100644 db/routines/vn/triggers/roadmap_beforeInsert.sql create mode 100644 db/routines/vn/triggers/roadmap_beforeUpdate.sql create mode 100644 db/versions/11195-salmonPalmetto/00-firstScript.sql diff --git a/db/routines/vn/triggers/roadmap_beforeInsert.sql b/db/routines/vn/triggers/roadmap_beforeInsert.sql new file mode 100644 index 000000000..df07d5540 --- /dev/null +++ b/db/routines/vn/triggers/roadmap_beforeInsert.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert` + BEFORE INSERT ON `roadmap` + FOR EACH ROW +BEGIN + IF NEW.driver1Fk IS NOT NULL THEN + SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk); + ELSE + SET NEW.driverName = NULL; + END IF; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/triggers/roadmap_beforeUpdate.sql b/db/routines/vn/triggers/roadmap_beforeUpdate.sql new file mode 100644 index 000000000..4905a0442 --- /dev/null +++ b/db/routines/vn/triggers/roadmap_beforeUpdate.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate` + BEFORE UPDATE ON `roadmap` + FOR EACH ROW +BEGIN + IF NEW.driver1Fk IS NOT NULL THEN + SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk); + ELSE + SET NEW.driverName = NULL; + END IF; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/versions/11195-salmonPalmetto/00-firstScript.sql b/db/versions/11195-salmonPalmetto/00-firstScript.sql new file mode 100644 index 000000000..980b66c8d --- /dev/null +++ b/db/versions/11195-salmonPalmetto/00-firstScript.sql @@ -0,0 +1,6 @@ +ALTER TABLE vn.roadmap + ADD COLUMN m3 INT UNSIGNED NULL, + ADD COLUMN driver2Fk INT UNSIGNED NULL, + ADD COLUMN driver1Fk INT UNSIGNED NULL, + ADD CONSTRAINT roadmap_worker_FK FOREIGN KEY (driver1Fk) REFERENCES vn.worker(id) ON DELETE RESTRICT ON UPDATE CASCADE, + ADD CONSTRAINT roadmap_worker_FK_2 FOREIGN KEY (driver2Fk) REFERENCES vn.worker(id) ON DELETE RESTRICT ON UPDATE CASCADE; \ No newline at end of file From 340515968b44cecbc4fb4d9a6dde1c6d4048de5c Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 23 Aug 2024 10:57:35 +0200 Subject: [PATCH 146/250] feat: refs #7710 test fixed --- .../back/methods/invoiceOut/refund.js | 2 +- .../methods/invoiceOut/transferInvoice.js | 14 +--- .../front/descriptor-menu/index.html | 23 +----- .../invoiceOut/front/descriptor-menu/index.js | 15 ---- .../front/descriptor-menu/index.spec.js | 13 --- modules/ticket/back/methods/sale/clone.js | 72 ++++++++--------- .../back/methods/sale/specs/clone.spec.js | 8 +- modules/ticket/back/methods/ticket/clone.js | 54 ------------- .../ticket/back/methods/ticket/cloneAll.js | 80 +++++++++++++++++++ modules/ticket/back/methods/ticket/refund.js | 58 -------------- .../back/methods/ticket/specs/clone.spec.js | 43 ---------- .../methods/ticket/specs/cloneAll.spec.js | 53 ++++++++++++ modules/ticket/back/models/ticket-methods.js | 3 +- modules/ticket/front/descriptor-menu/index.js | 15 +++- .../front/descriptor-menu/index.spec.js | 18 ----- 15 files changed, 190 insertions(+), 281 deletions(-) delete mode 100644 modules/ticket/back/methods/ticket/clone.js create mode 100644 modules/ticket/back/methods/ticket/cloneAll.js delete mode 100644 modules/ticket/back/methods/ticket/refund.js delete mode 100644 modules/ticket/back/methods/ticket/specs/clone.spec.js create mode 100644 modules/ticket/back/methods/ticket/specs/cloneAll.spec.js diff --git a/modules/invoiceOut/back/methods/invoiceOut/refund.js b/modules/invoiceOut/back/methods/invoiceOut/refund.js index 1b7ccc1e4..4f43a7a84 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/refund.js +++ b/modules/invoiceOut/back/methods/invoiceOut/refund.js @@ -43,7 +43,7 @@ module.exports = Self => { const tickets = await models.Ticket.find(filter, myOptions); const ticketsIds = tickets.map(ticket => ticket.id); - const refundedTickets = await models.Ticket.refund(ctx, ticketsIds, withWarehouse, myOptions); + const refundedTickets = await models.Ticket.cloneAll(ctx, ticketsIds, withWarehouse, true, myOptions); if (tx) await tx.commit(); diff --git a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js index 0c86e5810..220695fc9 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js @@ -82,20 +82,12 @@ module.exports = Self => { myOptions.transaction = tx; } try { - const filterRef = {where: {refFk: refFk}}; - const tickets = await models.Ticket.find(filterRef, myOptions); + const tickets = await models.Ticket.find({where: {refFk: refFk}}, myOptions); const ticketsIds = tickets.map(ticket => ticket.id); - const refundTickets = await models.Ticket.refund(ctx, ticketsIds, null, myOptions); + const refundTickets = await models.Ticket.cloneAll(ctx, ticketsIds, false, true, myOptions); - const filterTicket = {where: {ticketFk: {inq: ticketsIds}}}; + const clonedTickets = await models.Ticket.cloneAll(ctx, ticketsIds, false, false, myOptions); - const services = await models.TicketService.find(filterTicket, myOptions); - const servicesIds = services.map(service => service.id); - - const sales = await models.Sale.find(filterTicket, myOptions); - const salesIds = sales.map(sale => sale.id); - - const clonedTickets = await models.Sale.clone(ctx, salesIds, servicesIds, null, false, myOptions); const clonedTicketIds = []; for (const clonedTicket of clonedTickets) { diff --git a/modules/invoiceOut/front/descriptor-menu/index.html b/modules/invoiceOut/front/descriptor-menu/index.html index da04c8e72..335ab87cc 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.html +++ b/modules/invoiceOut/front/descriptor-menu/index.html @@ -88,28 +88,7 @@ translate> Show CITES letter - - Refund... - - - - with warehouse - - - without warehouse - - - - + { - const tickets = res.data; - const refundTickets = tickets.map(ticket => ticket.id); - - this.vnApp.showSuccess(this.$t('The following refund tickets have been created', { - ticketId: refundTickets.join(',') - })); - if (refundTickets.length == 1) - this.$state.go('ticket.card.sale', {id: refundTickets[0]}); - }); - } - transferInvoice() { const params = { id: this.invoiceOut.id, diff --git a/modules/invoiceOut/front/descriptor-menu/index.spec.js b/modules/invoiceOut/front/descriptor-menu/index.spec.js index d2ccfa117..a22ca7c2a 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.spec.js +++ b/modules/invoiceOut/front/descriptor-menu/index.spec.js @@ -105,17 +105,4 @@ describe('vnInvoiceOutDescriptorMenu', () => { expect(controller.vnApp.showMessage).toHaveBeenCalled(); }); }); - - describe('refundInvoiceOut()', () => { - it('should make a query and show a success message', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - const params = {ref: controller.invoiceOut.ref}; - - $httpBackend.expectPOST(`InvoiceOuts/refund`, params).respond([{id: 1}, {id: 2}]); - controller.refundInvoiceOut(); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); }); diff --git a/modules/ticket/back/methods/sale/clone.js b/modules/ticket/back/methods/sale/clone.js index 9185a6e75..24346f3ba 100644 --- a/modules/ticket/back/methods/sale/clone.js +++ b/modules/ticket/back/methods/sale/clone.js @@ -1,40 +1,25 @@ module.exports = Self => { Self.remoteMethodCtx('clone', { - description: 'Clone sales and services provided', + description: 'Clone sales, services, and ticket packaging provided', accessType: 'WRITE', accepts: [ - { - arg: 'salesIds', - type: ['number'], - }, { - arg: 'servicesIds', - type: ['number'] - }, { - arg: 'withWarehouse', - type: 'boolean', - required: true - }, { - arg: 'negative', - type: 'boolean' - } + {arg: 'salesIds', type: ['number']}, + {arg: 'servicesIds', type: ['number']}, + {arg: 'ticketPackagingIds', type: ['number']}, + {arg: 'withWarehouse', type: 'boolean', required: true}, + {arg: 'negative', type: 'boolean'} ], - returns: { - type: ['object'], - root: true - }, - http: { - path: `/clone`, - verb: 'POST' - } + returns: {type: ['object'], root: true}, + http: {path: `/clone`, verb: 'POST'} }); - Self.clone = async(ctx, salesIds, servicesIds, withWarehouse, negative, options) => { + + Self.clone = async(ctx, salesIds, servicesIds, ticketPackagingIds, withWarehouse, negative, options) => { const models = Self.app.models; const myOptions = {}; let tx; const newTickets = []; - if (typeof options == 'object') - Object.assign(myOptions, options); + if (typeof options === 'object') Object.assign(myOptions, options); if (!myOptions.transaction) { tx = await Self.beginTransaction({}); @@ -44,8 +29,9 @@ module.exports = Self => { try { let sales; let services; + let ticketPackaging; - if (salesIds && salesIds.length) { + if (salesIds?.length) { sales = await models.Sale.find({ where: {id: {inq: salesIds}}, include: { @@ -57,12 +43,18 @@ module.exports = Self => { }, myOptions); } - if (servicesIds && servicesIds.length) { + if (servicesIds?.length) { services = await models.TicketService.find({ where: {id: {inq: servicesIds}} }, myOptions); } + if (ticketPackagingIds?.length) { + ticketPackaging = await models.TicketPackaging.find({ + where: {id: {inq: ticketPackagingIds}} + }, myOptions); + } + let ticketsIds = sales ? [...new Set(sales.map(sale => sale.ticketFk))] : [...new Set(services.map(service => service.ticketFk))]; @@ -74,12 +66,12 @@ module.exports = Self => { ctx, ticketId, withWarehouse, - negative, myOptions ); newTickets.push(newTicket); mappedTickets.set(ticketId, newTicket.id); } + if (sales) { for (const sale of sales) { const newTicketId = mappedTickets.get(sale.ticketFk); @@ -107,7 +99,7 @@ module.exports = Self => { await models.TicketService.create({ description: service.description, - quantity: negative ? - service.quantity : service.quantity, + quantity: negative ? -service.quantity : service.quantity, price: service.price, taxClassFk: service.taxClassFk, ticketFk: newTicketId, @@ -116,6 +108,18 @@ module.exports = Self => { } } + if (ticketPackaging) { + for (const packaging of ticketPackaging) { + const newTicketId = mappedTickets.get(packaging.ticketFk); + + await models.TicketPackaging.create({ + ticketFk: newTicketId, + packagingFk: packaging.packagingFk, + quantity: negative ? -packaging.quantity : packaging.quantity + }, myOptions); + } + } + if (tx) await tx.commit(); return newTickets; @@ -124,13 +128,7 @@ module.exports = Self => { throw e; } - async function createTicket( - ctx, - ticketId, - withWarehouse, - negative, - myOptions - ) { + async function createTicket(ctx, ticketId, withWarehouse, myOptions) { const models = Self.app.models; const now = Date.vnNew(); diff --git a/modules/ticket/back/methods/sale/specs/clone.spec.js b/modules/ticket/back/methods/sale/specs/clone.spec.js index 5b0dc84a7..1738cc08c 100644 --- a/modules/ticket/back/methods/sale/specs/clone.spec.js +++ b/modules/ticket/back/methods/sale/specs/clone.spec.js @@ -20,7 +20,7 @@ describe('Ticket cloning - clone function', () => { const servicesIds = []; const withWarehouse = true; const negative = false; - const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, withWarehouse, negative, options); + const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, null, withWarehouse, negative, options); expect(newTickets).toBeDefined(); expect(newTickets.length).toBeGreaterThan(0); @@ -30,7 +30,7 @@ describe('Ticket cloning - clone function', () => { const negative = true; const salesIds = [7, 8]; const servicesIds = []; - const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, false, negative, options); + const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, null, false, negative, options); for (const ticket of newTickets) { const sales = await models.Sale.find({where: {ticketFk: ticket.id}}, options); @@ -43,7 +43,7 @@ describe('Ticket cloning - clone function', () => { it('should create new components and services for cloned tickets', async() => { const servicesIds = [2]; const salesIds = [5]; - const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, false, false, options); + const newTickets = await models.Sale.clone(ctx, salesIds, servicesIds, null, false, false, options); for (const ticket of newTickets) { const sale = await models.Sale.findOne({where: {ticketFk: ticket.id}}, options); @@ -58,7 +58,7 @@ describe('Ticket cloning - clone function', () => { it('should create a ticket without sales', async() => { const servicesIds = [4]; - const tickets = await models.Sale.clone(ctx, null, servicesIds, false, false, options); + const tickets = await models.Sale.clone(ctx, null, servicesIds, null, false, false, options); const refundedTicket = await getTicketRefund(tickets[0].id, options); expect(refundedTicket).toBeDefined(); diff --git a/modules/ticket/back/methods/ticket/clone.js b/modules/ticket/back/methods/ticket/clone.js deleted file mode 100644 index 93bc2a94e..000000000 --- a/modules/ticket/back/methods/ticket/clone.js +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = Self => { - Self.remoteMethodCtx('clone', { - description: 'clone a ticket and return the new ticket id', - accessType: 'WRITE', - accepts: [{ - arg: 'id', - type: 'number', - required: true, - description: 'The ticket id', - http: {source: 'path'} - }, { - arg: 'shipped', - type: 'date', - }, { - arg: 'withWarehouse', - type: 'boolean', - } - ], - returns: { - type: 'number', - root: true - }, - http: { - path: `/:id/clone`, - verb: 'POST' - } - }); - - Self.clone = async(ctx, id, shipped, withWarehouse, options) => { - const myOptions = {userId: ctx.req.accessToken.userId}; - let tx; - - if (typeof options == 'object') - Object.assign(myOptions, options); - - if (!myOptions.transaction) { - tx = await Self.beginTransaction({}); - myOptions.transaction = tx; - } - - try { - const [, [{clonedTicketId}]] = await Self.rawSql(` - CALL vn.ticket_cloneAll(?, ?, ?, @clonedTicketId); - SELECT @clonedTicketId clonedTicketId;`, - [id, shipped, withWarehouse], myOptions); - - if (tx) await tx.commit(); - return clonedTicketId; - } catch (e) { - if (tx) await tx.rollback(); - throw e; - } - }; -}; diff --git a/modules/ticket/back/methods/ticket/cloneAll.js b/modules/ticket/back/methods/ticket/cloneAll.js new file mode 100644 index 000000000..cc3672083 --- /dev/null +++ b/modules/ticket/back/methods/ticket/cloneAll.js @@ -0,0 +1,80 @@ +module.exports = Self => { + Self.remoteMethodCtx('cloneAll', { + description: 'Clone tickets, sales, services and packages', + accessType: 'WRITE', + accepts: [ + { + arg: 'ticketsIds', + type: ['number'], + required: true, + description: 'IDs of the tickets to clone' + }, + { + arg: 'withWarehouse', + type: 'boolean', + required: true, + description: 'true: keep original warehouse; false: set to null' + }, + { + arg: 'negative', + type: 'boolean', + required: true, + description: 'Whether to invert quantities (for credit notes)' + } + ], + returns: { + type: ['object'], + root: true, + description: 'The cloned tickets with associated data' + }, + http: { + path: `/cloneAll`, + verb: 'POST' + } + }); + + Self.cloneAll = async(ctx, ticketsIds, withWarehouse, negative, options) => { + const models = Self.app.models; + const myOptions = {}; + let tx; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } + + try { + const filter = {where: {ticketFk: {inq: ticketsIds}}}; + + const [sales, services, ticketPackaging] = await Promise.all([ + models.Sale.find(filter, myOptions), + models.TicketService.find(filter, myOptions), + models.TicketPackaging.find(filter, myOptions) + ]); + + const salesIds = sales.map(sale => sale.id); + const servicesIds = services.map(service => service.id); + const ticketPackagingIds = ticketPackaging.map(packaging => packaging.id); + + const clonedTickets = await models.Sale.clone( + ctx, + salesIds, + servicesIds, + ticketPackagingIds, + withWarehouse, + negative, + myOptions + ); + + if (tx) await tx.commit(); + + return clonedTickets; + } catch (e) { + if (tx) await tx.rollback(); + throw e; + } + }; +}; diff --git a/modules/ticket/back/methods/ticket/refund.js b/modules/ticket/back/methods/ticket/refund.js deleted file mode 100644 index 7365f34df..000000000 --- a/modules/ticket/back/methods/ticket/refund.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = Self => { - Self.remoteMethodCtx('refund', { - description: 'Create refund tickets with all their sales and services', - accessType: 'WRITE', - accepts: [ - { - arg: 'ticketsIds', - type: ['number'], - required: true - }, - { - arg: 'withWarehouse', - type: 'boolean', - required: true - } - ], - returns: { - type: ['object'], - root: true - }, - http: { - path: `/refund`, - verb: 'POST' - } - }); - - Self.refund = async(ctx, ticketsIds, withWarehouse, options) => { - const models = Self.app.models; - const myOptions = {}; - let tx; - - if (typeof options == 'object') - Object.assign(myOptions, options); - - if (!myOptions.transaction) { - tx = await Self.beginTransaction({}); - myOptions.transaction = tx; - } - - try { - const filter = {where: {ticketFk: {inq: ticketsIds}}}; - const sales = await models.Sale.find(filter, myOptions); - const salesIds = sales.map(sale => sale.id); - - const services = await models.TicketService.find(filter, myOptions); - const servicesIds = services.map(service => service.id); - - const refundedTickets = await models.Sale.clone(ctx, salesIds, servicesIds, withWarehouse, true, myOptions); - - if (tx) await tx.commit(); - - return refundedTickets; - } catch (e) { - if (tx) await tx.rollback(); - throw e; - } - }; -}; diff --git a/modules/ticket/back/methods/ticket/specs/clone.spec.js b/modules/ticket/back/methods/ticket/specs/clone.spec.js deleted file mode 100644 index ccc0dcdf3..000000000 --- a/modules/ticket/back/methods/ticket/specs/clone.spec.js +++ /dev/null @@ -1,43 +0,0 @@ -const models = require('vn-loopback/server/server').models; - -describe('Ticket cloning - clone function', () => { - const ctx = beforeAll.getCtx(); - let options; - let tx; - const ticketId = 1; - const shipped = Date.vnNew(); - - beforeEach(async() => { - options = {transaction: tx}; - tx = await models.Ticket.beginTransaction({}); - options.transaction = tx; - }); - - afterEach(async() => { - await tx.rollback(); - }); - - it('should clone a new ticket without warehouse', async() => { - const originalTicket = await models.Ticket.findById(ticketId, null, options); - - const newTicketId = await models.Ticket.clone(ctx, ticketId, shipped, false, options); - const newTicket = await models.Ticket.findById(newTicketId, null, options); - - expect(newTicket.clientFk).toEqual(originalTicket.clientFk); - expect(newTicket.companyFk).toEqual(originalTicket.companyFk); - expect(newTicket.addressFk).toEqual(originalTicket.addressFk); - expect(newTicket.warehouseFk).toBeFalsy(); - }); - - it('should clone a new ticket with warehouse', async() => { - const originalTicket = await models.Ticket.findById(ticketId, null, options); - - const newTicketId = await models.Ticket.clone(ctx, ticketId, shipped, true, options); - const newTicket = await models.Ticket.findById(newTicketId, null, options); - - expect(newTicket.clientFk).toEqual(originalTicket.clientFk); - expect(newTicket.companyFk).toEqual(originalTicket.companyFk); - expect(newTicket.addressFk).toEqual(originalTicket.addressFk); - expect(newTicket.warehouseFk).toEqual(originalTicket.warehouseFk); - }); -}); diff --git a/modules/ticket/back/methods/ticket/specs/cloneAll.spec.js b/modules/ticket/back/methods/ticket/specs/cloneAll.spec.js new file mode 100644 index 000000000..4788df2c2 --- /dev/null +++ b/modules/ticket/back/methods/ticket/specs/cloneAll.spec.js @@ -0,0 +1,53 @@ +const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); + +describe('Ticket cloning - cloneAll function', () => { + const activeCtx = { + accessToken: {userId: 1}, + http: { + req: { + headers: {origin: 'http://localhost'} + } + } + }; + const ctx = {req: activeCtx}; + let options; + let tx; + const ticketIds = [1, 2]; + const withWarehouse = true; + const negative = false; + + beforeEach(async() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: ctx.req}); + tx = await models.Ticket.beginTransaction({}); + options = {transaction: tx}; + }); + + afterEach(async() => { + if (tx) + await tx.rollback(); + }); + + it('should clone all provided tickets with their associated sales, services, and packages', async() => { + const originalTickets = await models.Ticket.find({where: {id: {inq: ticketIds}}}, options); + const originalSales = await models.Sale.find({where: {ticketFk: {inq: ticketIds}}}, options); + const originalServices = await models.TicketService.find({where: {ticketFk: {inq: ticketIds}}}, options); + const originalTicketPackaging = + await models.TicketPackaging.find({where: {ticketFk: {inq: ticketIds}}}, options); + + // Pass the ctx correctly to the cloneAll function + const clonedTickets = await models.Ticket.cloneAll(ctx, ticketIds, withWarehouse, negative, options); + + expect(clonedTickets.length).toEqual(originalTickets.length); + + const clonedSales = await models.Sale.find({where: {ticketFk: {inq: clonedTickets.map(t => t.id)}}}, options); + const clonedServices = + await models.TicketService.find({where: {ticketFk: {inq: clonedTickets.map(t => t.id)}}}, options); + const clonedTicketPackaging = + await models.TicketPackaging.find({where: {ticketFk: {inq: clonedTickets.map(t => t.id)}}}, options); + + expect(clonedSales.length).toEqual(originalSales.length); + expect(clonedServices.length).toEqual(originalServices.length); + expect(clonedTicketPackaging.length).toEqual(originalTicketPackaging.length); + }); +}); diff --git a/modules/ticket/back/models/ticket-methods.js b/modules/ticket/back/models/ticket-methods.js index 5582dde5c..462862cb3 100644 --- a/modules/ticket/back/models/ticket-methods.js +++ b/modules/ticket/back/models/ticket-methods.js @@ -26,7 +26,7 @@ module.exports = function(Self) { require('../methods/ticket/isLocked')(Self); require('../methods/ticket/freightCost')(Self); require('../methods/ticket/getComponentsSum')(Self); - require('../methods/ticket/refund')(Self); + require('../methods/ticket/cloneAll')(Self); require('../methods/ticket/deliveryNotePdf')(Self); require('../methods/ticket/deliveryNoteEmail')(Self); require('../methods/ticket/deliveryNoteCsv')(Self); @@ -46,5 +46,4 @@ module.exports = function(Self) { require('../methods/ticket/invoiceTicketsAndPdf')(Self); require('../methods/ticket/docuwareDownload')(Self); require('../methods/ticket/myLastModified')(Self); - require('../methods/ticket/clone')(Self); }; diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index 32f245454..93948def2 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -287,15 +287,24 @@ class Controller extends Section { } refund(withWarehouse) { - const params = {ticketsIds: [this.id], withWarehouse: withWarehouse}; - const query = 'Tickets/refund'; + const params = { + ticketsIds: [this.id], + withWarehouse: withWarehouse, + negative: true // Asumimos que queremos cantidades negativas para reembolsos + }; + const query = 'Tickets/cloneAll'; return this.$http.post(query, params) .then(res => { const [refundTicket] = res.data; - this.vnApp.showSuccess(this.$t('The following refund ticket have been created', { + this.vnApp.showSuccess(this.$t('The following refund ticket has been created', { ticketId: refundTicket.id })); this.$state.go('ticket.card.sale', {id: refundTicket.id}); + }) + .catch(error => { + this.vnApp.showError(this.$t('Error creating refund ticket', { + error: error.data?.error?.message || 'Unknown error' + })); }); } diff --git a/modules/ticket/front/descriptor-menu/index.spec.js b/modules/ticket/front/descriptor-menu/index.spec.js index 94a991db8..cffbad62e 100644 --- a/modules/ticket/front/descriptor-menu/index.spec.js +++ b/modules/ticket/front/descriptor-menu/index.spec.js @@ -217,24 +217,6 @@ describe('Ticket Component vnTicketDescriptorMenu', () => { }); }); - describe('refund()', () => { - it('should make a query and go to ticket.card.sale', () => { - controller.$state.go = jest.fn(); - - controller._id = ticket.id; - - const params = { - ticketsIds: [16] - }; - const response = {id: 99}; - $httpBackend.expectPOST('Tickets/refund', params).respond([response]); - controller.refund(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('ticket.card.sale', response); - }); - }); - describe('sendChangesSms()', () => { it('should make a query and open the sms dialog', () => { controller.$.sms = {open: () => {}}; From 94461cff58812ea8fe38c73b40c1d7a8eff53fab Mon Sep 17 00:00:00 2001 From: ivanm Date: Fri, 23 Aug 2024 11:34:26 +0200 Subject: [PATCH 147/250] feat: refs #7758 Modify code lowerCamelCase and UNIQUE --- db/dump/fixtures.before.sql | 12 ++++++------ .../11191-chocolateBirch/00-firstScript.sql | 3 ++- .../11191-chocolateBirch/01-firstScript.sql | 3 ++- .../11191-chocolateBirch/02-firstScript.sql | 14 +++++++------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 7ed2b9b7c..4533b67af 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3947,9 +3947,9 @@ VALUES INSERT INTO vn.accountDetailType (id, description, code) VALUES - (1, 'IBAN', 'IBAN'), - (2, 'SWIFT', 'SWIFT'), - (3, 'Referencia Remesas', 'REM'), - (4, 'Referencia Transferencias', 'TRAN'), - (5, 'Referencia Nominas', 'NOM'), - (6, 'ABA', 'ABA'); + (1, 'IBAN', 'iban'), + (2, 'SWIFT', 'swift'), + (3, 'Referencia Remesas', 'remRef'), + (4, 'Referencia Transferencias', 'trnRef'), + (5, 'Referencia Nominas', 'payRef'), + (6, 'ABA', 'aba'); diff --git a/db/versions/11191-chocolateBirch/00-firstScript.sql b/db/versions/11191-chocolateBirch/00-firstScript.sql index 929de87fe..4c9924a42 100644 --- a/db/versions/11191-chocolateBirch/00-firstScript.sql +++ b/db/versions/11191-chocolateBirch/00-firstScript.sql @@ -1,2 +1,3 @@ ALTER TABLE vn.mandateType - CHANGE name code VARCHAR(45) DEFAULT NULL; \ No newline at end of file + CHANGE name code VARCHAR(45) NOT NULL, + ADD UNIQUE (code); \ No newline at end of file diff --git a/db/versions/11191-chocolateBirch/01-firstScript.sql b/db/versions/11191-chocolateBirch/01-firstScript.sql index 168eaef84..50b27fdbd 100644 --- a/db/versions/11191-chocolateBirch/01-firstScript.sql +++ b/db/versions/11191-chocolateBirch/01-firstScript.sql @@ -1,2 +1,3 @@ ALTER TABLE vn.accountDetailType - ADD COLUMN code VARCHAR(45) DEFAULT NULL; \ No newline at end of file + ADD COLUMN code VARCHAR(45) NOT NULL, + ADD UNIQUE (code); \ No newline at end of file diff --git a/db/versions/11191-chocolateBirch/02-firstScript.sql b/db/versions/11191-chocolateBirch/02-firstScript.sql index 53b7317b6..733cffd63 100644 --- a/db/versions/11191-chocolateBirch/02-firstScript.sql +++ b/db/versions/11191-chocolateBirch/02-firstScript.sql @@ -1,9 +1,9 @@ UPDATE vn.accountDetailType - SET code = CASE id - WHEN 1 THEN 'IBAN' - WHEN 2 THEN 'SWIFT' - WHEN 3 THEN 'REM' - WHEN 4 THEN 'TRAN' - WHEN 5 THEN 'NOM' - WHEN 6 THEN 'ABA' + SET code = CASE description + WHEN 'IBAN' THEN 'iban' + WHEN 'SWIFT' THEN 'swift' + WHEN 'Referencia Remesas' THEN 'remRef' + WHEN 'Referencia Transferencias' THEN 'trnRef' + WHEN 'Referencia Nominas' THEN 'payRef' + WHEN 'ABA' THEN 'aba' END; \ No newline at end of file From c5210157b1aef53fd30d2407ad61412ca446aa74 Mon Sep 17 00:00:00 2001 From: ivanm Date: Fri, 23 Aug 2024 13:55:51 +0200 Subject: [PATCH 148/250] feat: refs #7758 accountDetailType fix deploy error --- db/versions/11191-chocolateBirch/01-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11191-chocolateBirch/01-firstScript.sql b/db/versions/11191-chocolateBirch/01-firstScript.sql index 50b27fdbd..c69e92d51 100644 --- a/db/versions/11191-chocolateBirch/01-firstScript.sql +++ b/db/versions/11191-chocolateBirch/01-firstScript.sql @@ -1,3 +1,3 @@ ALTER TABLE vn.accountDetailType - ADD COLUMN code VARCHAR(45) NOT NULL, + ADD COLUMN code VARCHAR(45), ADD UNIQUE (code); \ No newline at end of file From 32d36cda21edc883c3260ce4b1c78791440a0133 Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 23 Aug 2024 14:28:25 +0200 Subject: [PATCH 149/250] feat: refs #7710 pr revision --- .../11197-aquaSalal/00-firstScript.sql | 24 +++++++++++++++++++ .../methods/invoiceOut/transferInvoice.js | 2 +- .../ticket/back/methods/ticket/cloneAll.js | 13 ++++------ 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 db/versions/11197-aquaSalal/00-firstScript.sql diff --git a/db/versions/11197-aquaSalal/00-firstScript.sql b/db/versions/11197-aquaSalal/00-firstScript.sql new file mode 100644 index 000000000..f07368d3e --- /dev/null +++ b/db/versions/11197-aquaSalal/00-firstScript.sql @@ -0,0 +1,24 @@ +DELETE FROM `salix`.`ACL` + WHERE `model` = 'Ticket' + AND `property` = 'refund' + AND `accessType` = 'WRITE' + AND `permission` = 'ALLOW' + AND `principalType` = 'ROLE' + AND `principalId` = 'salesAssistant'; + +UPDATE `salix`.`ACL` + SET `property` = 'cloneAll' + WHERE `model` = 'Ticket' + AND `property` = 'refund' + AND `accessType` = 'WRITE' + AND `permission` = 'ALLOW' + AND `principalType` = 'ROLE' + AND `principalId` IN ('invoicing', 'claimManager', 'logistic'); + +DELETE FROM `salix`.`ACL` + WHERE `model` = 'Ticket' + AND `property` = 'clone' + AND `accessType` = 'WRITE' + AND `permission` = 'ALLOW' + AND `principalType` = 'ROLE' + AND `principalId` = 'administrative'; diff --git a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js index 220695fc9..c31f381d9 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js @@ -82,7 +82,7 @@ module.exports = Self => { myOptions.transaction = tx; } try { - const tickets = await models.Ticket.find({where: {refFk: refFk}}, myOptions); + const tickets = await models.Ticket.find({where: {refFk}}, myOptions); const ticketsIds = tickets.map(ticket => ticket.id); const refundTickets = await models.Ticket.cloneAll(ctx, ticketsIds, false, true, myOptions); diff --git a/modules/ticket/back/methods/ticket/cloneAll.js b/modules/ticket/back/methods/ticket/cloneAll.js index cc3672083..cf99a7edc 100644 --- a/modules/ticket/back/methods/ticket/cloneAll.js +++ b/modules/ticket/back/methods/ticket/cloneAll.js @@ -19,7 +19,7 @@ module.exports = Self => { arg: 'negative', type: 'boolean', required: true, - description: 'Whether to invert quantities (for credit notes)' + description: 'true: invert quantities; false: keep as is.' } ], returns: { @@ -35,12 +35,9 @@ module.exports = Self => { Self.cloneAll = async(ctx, ticketsIds, withWarehouse, negative, options) => { const models = Self.app.models; - const myOptions = {}; + const myOptions = typeof options == 'object' ? {...options} : {}; let tx; - if (typeof options == 'object') - Object.assign(myOptions, options); - if (!myOptions.transaction) { tx = await Self.beginTransaction({}); myOptions.transaction = tx; @@ -55,9 +52,9 @@ module.exports = Self => { models.TicketPackaging.find(filter, myOptions) ]); - const salesIds = sales.map(sale => sale.id); - const servicesIds = services.map(service => service.id); - const ticketPackagingIds = ticketPackaging.map(packaging => packaging.id); + const salesIds = sales.map(({id}) => id); + const servicesIds = services.map(({id}) => id); + const ticketPackagingIds = ticketPackaging.map(({id}) => id); const clonedTickets = await models.Sale.clone( ctx, From b6c0ff01bf2767fb869ea48817365fed0f82d57c Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 26 Aug 2024 12:04:03 +0200 Subject: [PATCH 150/250] fix: refs #7811 Renew token crash --- back/methods/vn-user/renew-token.js | 30 +++++++++++++---------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index ae2d36e3e..688e9a770 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -29,18 +29,8 @@ module.exports = Self => { return token; // Schedule to remove current token - setTimeout(async() => { - let exists; - try { - exists = await models.AccessToken.findById(token.id); - exists && await Self.logout(token.id); - } catch (error) { - // eslint-disable-next-line no-console - console.error(error); - const body = {error: error.message, now: Date.now(), userId: token?.userId ?? null, exists}; - await handleError(body); - throw new Error(error); - } + setTimeout(() => { + Self.logout(token.id); }, courtesyTime * 1000); // Get scopes @@ -53,14 +43,20 @@ module.exports = Self => { return {id: accessToken.id, ttl: accessToken.ttl}; } catch (error) { - const body = {error: error.message, now: Date.now(), userId: token?.userId ?? null, createTokenOptions, isNotExceeded}; - await handleError(body); + const body = { + error: error.message, + userId: token?.userId ?? null, + token: token?.id, + scopes: token?.scopes, + createTokenOptions, + isNotExceeded + }; + await handleError(JSON.stringify(body)); throw new Error(error); } }; }; -async function handleError(body, tag = 'renewToken') { - body = JSON.stringify(body); - await models.Application.rawSql('CALL util.debugAdd(?,?);', [tag, body]); +async function handleError(body) { + await models.Application.rawSql('CALL util.debugAdd(?,?);', ['renewToken', body]); } From aaf95e3cff648e74eea6cc80b60e435e62c561af Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 26 Aug 2024 14:39:30 +0200 Subject: [PATCH 151/250] fix: refs #7756 id 0 --- db/versions/11172-blueFern/10-firstScript.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/versions/11172-blueFern/10-firstScript.sql b/db/versions/11172-blueFern/10-firstScript.sql index 5d34f1025..47ddaff14 100644 --- a/db/versions/11172-blueFern/10-firstScript.sql +++ b/db/versions/11172-blueFern/10-firstScript.sql @@ -1 +1,5 @@ -ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL; \ No newline at end of file +UPDATE vn.invoiceOut + SET id = (SELECT MAX(id) + 1 FROM vn.invoiceOut) + WHERE id = 0; + +ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL; From 5f06ae5cf410f77f3747e50de2a8d2b9757460b3 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 26 Aug 2024 15:57:39 +0200 Subject: [PATCH 152/250] feat: refs #6760 refs #actualiza campo nickname --- .../methods/ticket/specs/transferClient.spec.js | 17 +++++++++++++---- .../back/methods/ticket/transferClient.js | 9 ++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/ticket/back/methods/ticket/specs/transferClient.spec.js b/modules/ticket/back/methods/ticket/specs/transferClient.spec.js index 01fd8fcbe..d3ac3c6aa 100644 --- a/modules/ticket/back/methods/ticket/specs/transferClient.spec.js +++ b/modules/ticket/back/methods/ticket/specs/transferClient.spec.js @@ -8,6 +8,7 @@ describe('Ticket transferClient()', () => { const ctx = beforeAll.getCtx(); let options; let tx; + beforeEach(async() => { options = {transaction: tx}; tx = await models.Ticket.beginTransaction({}); @@ -21,21 +22,23 @@ describe('Ticket transferClient()', () => { it('should throw an error as the ticket is not editable', async() => { try { const ticketId = 4; - const clientId = 1; await models.Ticket.transferClient(ctx, ticketId, clientId, options); } catch (e) { - expect(e.message).toEqual(`This ticket is locked`); + expect(e.message).toEqual('This ticket is locked'); } }); - it('should be assigned a different clientFk in the original ticket', async() => { + it('should be assigned a different clientFk and nickname in the original ticket', async() => { await models.Ticket.transferClient(ctx, 2, clientId, options); const afterTransfer = await models.Ticket.findById(2, null, options); + const client = await models.Client.findById(clientId, {fields: ['defaultAddressFk']}, options); + const address = await models.Address.findById(client.defaultAddressFk, {fields: ['nickname']}, options); expect(afterTransfer.clientFk).toEqual(clientId); + expect(afterTransfer.nickname).toEqual(address.nickname); }); - it('should be assigned a different clientFk in the original and refund ticket and claim', async() => { + it('should be assigned a different clientFk and nickname in the original and refund ticket and claim', async() => { await models.Ticket.transferClient(ctx, originalTicketId, clientId, options); const [originalTicket, refundTicket] = await models.Ticket.find({ @@ -46,8 +49,14 @@ describe('Ticket transferClient()', () => { where: {ticketFk: originalTicketId} }, options); + const client = await models.Client.findById(clientId, {fields: ['defaultAddressFk']}, options); + const address = await models.Address.findById(client.defaultAddressFk, {fields: ['nickname']}, options); + expect(originalTicket.clientFk).toEqual(clientId); expect(refundTicket.clientFk).toEqual(clientId); expect(claim.clientFk).toEqual(clientId); + + expect(originalTicket.nickname).toEqual(address.nickname); + expect(refundTicket.nickname).toEqual(address.nickname); }); }); diff --git a/modules/ticket/back/methods/ticket/transferClient.js b/modules/ticket/back/methods/ticket/transferClient.js index d38c0e8a7..95bee008d 100644 --- a/modules/ticket/back/methods/ticket/transferClient.js +++ b/modules/ticket/back/methods/ticket/transferClient.js @@ -1,6 +1,6 @@ module.exports = Self => { Self.remoteMethodCtx('transferClient', { - description: 'Transfering ticket to another client', + description: 'Transferring ticket to another client', accessType: 'WRITE', accepts: [{ arg: 'id', @@ -40,10 +40,13 @@ module.exports = Self => { include: [{relation: 'refundTicket'}, {relation: 'originalTicket'}] }, myOptions); - const {defaultAddressFk: addressFk} = await models.Client.findById(clientFk, + const client = await models.Client.findById(clientFk, {fields: ['id', 'defaultAddressFk']}, myOptions); - const attributes = {clientFk, addressFk}; + const address = await models.Address.findById(client.defaultAddressFk, + {fields: ['id', 'nickname']}, myOptions); + + const attributes = {clientFk, addressFk: client.defaultAddressFk, nickname: address.nickname}; const tickets = []; const ticketIds = []; From 83f3a057216f4a9fe863fa1d84dd2c1ffd6c8203 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 27 Aug 2024 07:24:10 +0200 Subject: [PATCH 153/250] fix: refs #7811 Tests --- back/methods/vn-user/renew-token.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index 688e9a770..f3e5c16e4 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -29,8 +29,9 @@ module.exports = Self => { return token; // Schedule to remove current token - setTimeout(() => { - Self.logout(token.id); + setTimeout(async() => { + if (await models.AccessToken.findById(token.id)) + await Self.logout(token.id); }, courtesyTime * 1000); // Get scopes From ef26d7f437ba42ced41cab64f14224f9603cb669 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 27 Aug 2024 06:05:39 +0000 Subject: [PATCH 154/250] fix(salix): #7283 ItemFixedPrice duplicated --- modules/item/back/methods/fixed-price/filter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/item/back/methods/fixed-price/filter.js b/modules/item/back/methods/fixed-price/filter.js index 9c91886c1..edc804dc4 100644 --- a/modules/item/back/methods/fixed-price/filter.js +++ b/modules/item/back/methods/fixed-price/filter.js @@ -1,4 +1,3 @@ - const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const buildFilter = require('vn-loopback/util/filter').buildFilter; const mergeFilters = require('vn-loopback/util/filter').mergeFilters; @@ -134,7 +133,7 @@ module.exports = Self => { const stmts = []; const stmt = new ParameterizedSQL(` - SELECT fp.id, + SELECT DISTINCT fp.id, fp.itemFk, fp.warehouseFk, fp.rate2, From ce2058ec8b06356b2236de72e2feb180c453962a Mon Sep 17 00:00:00 2001 From: Pako Date: Tue, 27 Aug 2024 08:36:14 +0200 Subject: [PATCH 155/250] version --- db/versions/11200-brownDendro/00-firstScript.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 db/versions/11200-brownDendro/00-firstScript.sql diff --git a/db/versions/11200-brownDendro/00-firstScript.sql b/db/versions/11200-brownDendro/00-firstScript.sql new file mode 100644 index 000000000..943368b06 --- /dev/null +++ b/db/versions/11200-brownDendro/00-firstScript.sql @@ -0,0 +1,4 @@ +-- Place your SQL code here +ALTER TABLE vn.saleGroup ADD stateFk TINYINT(3) UNSIGNED; + +ALTER TABLE vn.saleGroup ADD CONSTRAINT saleGroup_state_FK FOREIGN KEY (stateFk) REFERENCES vn.state(id) ON DELETE RESTRICT ON UPDATE CASCADE; From 2dc095e8288bc9faff7766baa3ab94104c6155ca Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 27 Aug 2024 10:07:09 +0200 Subject: [PATCH 156/250] fix: refs #7811 Renew token crash --- back/methods/vn-user/renew-token.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index f3e5c16e4..100e913ee 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -30,8 +30,11 @@ module.exports = Self => { // Schedule to remove current token setTimeout(async() => { - if (await models.AccessToken.findById(token.id)) + try { await Self.logout(token.id); + } catch (error) { + // FIXME: Crash if do throw new Error(error) + } }, courtesyTime * 1000); // Get scopes From b317c8c46223d79d898292d094f9dda7a72aa6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 10:47:09 +0200 Subject: [PATCH 157/250] fixes: refs #7760 collection problems --- .../vn/procedures/collection_assign.sql | 169 ++++----- .../vn/procedures/collection_mergeSales.sql | 30 ++ db/routines/vn/procedures/collection_new.sql | 333 ++++++++---------- db/routines/vn/procedures/sales_merge.sql | 41 --- .../vn/procedures/sales_mergeByCollection.sql | 2 +- .../vn/procedures/ticket_mergeSales.sql | 49 +++ .../ticket_splitItemPackingType.sql | 170 +++------ 7 files changed, 356 insertions(+), 438 deletions(-) create mode 100644 db/routines/vn/procedures/collection_mergeSales.sql delete mode 100644 db/routines/vn/procedures/sales_merge.sql create mode 100644 db/routines/vn/procedures/ticket_mergeSales.sql diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index f9032a91d..8e48718b5 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -13,39 +13,42 @@ BEGIN * @param vCollectionFk Id de colección */ DECLARE vHasTooMuchCollections BOOL; - DECLARE vItemPackingTypeFk VARCHAR(1); - DECLARE vWarehouseFk INT; - DECLARE vLockName VARCHAR(215); - DECLARE vLockTime INT DEFAULT 30; - DECLARE vErrorNumber INT; - DECLARE vErrorMsg TEXT; + DECLARE vDone BOOL DEFAULT FALSE; + DECLARE vCollectionWorker INT; + DECLARE vMaxNotAssignedCollectionLifeTime TIME; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - GET DIAGNOSTICS CONDITION 1 - vErrorNumber = MYSQL_ERRNO, - vErrorMsg = MESSAGE_TEXT; - - CALL util.debugAdd('collection_assign', JSON_OBJECT( - 'errorNumber', vErrorNumber, - 'errorMsg', vErrorMsg, - 'lockName', vLockName, - 'userFk', vUserFk - )); -- Tmp - - IF vLockName IS NOT NULL THEN - DO RELEASE_LOCK(vLockName); - END IF; - RESIGNAL; - END; + DECLARE vCollections CURSOR FOR + WITH collections AS ( + SELECT tc.collectionFk, + SUM(sv.volume) volume, + c.saleTotalCount, + c.itemPackingTypeFk, + c.trainFk, + c.warehouseFk, + c.wagons + FROM vn.ticketCollection tc + JOIN vn.collection c ON c.id = tc.collectionFk + JOIN vn.saleVolume sv ON sv.ticketFk = tc.ticketFk + WHERE c.workerFk IS NULL + AND sv.shipped >= util.VN_CURDATE() + GROUP BY tc.collectionFk + ) SELECT c.collectionFk + FROM collections c + JOIN vn.operator o + WHERE o.workerFk = vUserFk + AND (c.saleTotalCount <= o.linesLimit OR o.linesLimit IS NULL) + AND (c.itemPackingTypeFk = o.itemPackingTypeFk OR o.itemPackingTypeFk IS NULL) + AND o.numberOfWagons = c.wagons + AND o.trainFk = c.trainFk + AND o.warehouseFk = c.warehouseFk; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; -- Si hay colecciones sin terminar, sale del proceso + CALL collection_get(vUserFk); - SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, - collection_assign_lockname - INTO vHasTooMuchCollections, - vLockName + SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, pc.maxNotAssignedCollectionLifeTime + INTO vHasTooMuchCollections, vMaxNotAssignedCollectionLifeTime FROM productionConfig pc LEFT JOIN tmp.collection ON TRUE; @@ -55,69 +58,69 @@ BEGIN CALL util.throw('Hay colecciones pendientes'); END IF; - SELECT warehouseFk, itemPackingTypeFk - INTO vWarehouseFk, vItemPackingTypeFk - FROM operator - WHERE workerFk = vUserFk; - - SET vLockName = CONCAT_WS('/', - vLockName, - vWarehouseFk, - vItemPackingTypeFk - ); - - IF NOT GET_LOCK(vLockName, vLockTime) THEN - CALL util.throw(CONCAT('Cannot get lock: ', vLockName)); - END IF; - -- Se eliminan las colecciones sin asignar que estan obsoletas - INSERT INTO ticketTracking(stateFk, ticketFk) - SELECT s.id, tc.ticketFk - FROM `collection` c - JOIN ticketCollection tc ON tc.collectionFk = c.id - JOIN `state` s ON s.code = 'PRINTED_AUTO' - JOIN productionConfig pc - WHERE c.workerFk IS NULL - AND TIMEDIFF(util.VN_NOW(), c.created) > pc.maxNotAssignedCollectionLifeTime; - DELETE c.* - FROM `collection` c - JOIN productionConfig pc - WHERE c.workerFk IS NULL - AND TIMEDIFF(util.VN_NOW(), c.created) > pc.maxNotAssignedCollectionLifeTime; + INSERT INTO ticketTracking(stateFk, ticketFk) + SELECT s.id, tc.ticketFk + FROM `collection` c + JOIN ticketCollection tc ON tc.collectionFk = c.id + JOIN `state` s ON s.code = 'PRINTED_AUTO' + WHERE c.workerFk IS NULL + AND TIMEDIFF(util.VN_NOW(), c.created) > vMaxNotAssignedCollectionLifeTime; + + DELETE FROM `collection` + WHERE workerFk IS NULL + AND TIMEDIFF(util.VN_NOW(), created) > vMaxNotAssignedCollectionLifeTime; -- Se añade registro al semillero - INSERT INTO collectionHotbed(userFk) - VALUES(vUserFk); + + INSERT INTO collectionHotbed(userFk) VALUES(vUserFk); -- Comprueba si hay colecciones disponibles que se ajustan a su configuracion - SELECT MIN(c.id) INTO vCollectionFk - FROM `collection` c - JOIN operator o - ON (o.itemPackingTypeFk = c.itemPackingTypeFk OR c.itemPackingTypeFk IS NULL) - AND o.numberOfWagons = c.wagons - AND o.trainFk = c.trainFk - AND o.warehouseFk = c.warehouseFk - AND c.workerFk IS NULL - AND (c.saleTotalCount <= o.linesLimit OR o.linesLimit IS NULL) - JOIN ( - SELECT tc.collectionFk, SUM(sv.volume) volume - FROM ticketCollection tc - JOIN saleVolume sv ON sv.ticketFk = tc.ticketFk - WHERE sv.shipped >= util.VN_CURDATE() - GROUP BY tc.collectionFk - ) sub ON sub.collectionFk = c.id - AND (volume <= o.volumeLimit OR o.volumeLimit IS NULL) - WHERE o.workerFk = vUserFk; + + OPEN vCollections; + l: LOOP + SET vDone = FALSE; + FETCH vCollections INTO vCollectionFk; + + IF vDone THEN + LEAVE l; + END IF; + + BEGIN + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + SET vCollectionFk = NULL; + RESIGNAL; + END; + + START TRANSACTION; + + SELECT workerFk INTO vCollectionWorker + FROM `collection` + WHERE id = vCollectionFk FOR UPDATE; + + IF vCollectionWorker IS NULL THEN + UPDATE `collection` + SET workerFk = vUserFk + WHERE id = vCollectionFk; + + COMMIT; + LEAVE l; + END IF; + + ROLLBACK; + END; + END LOOP; + CLOSE vCollections; IF vCollectionFk IS NULL THEN CALL collection_new(vUserFk, vCollectionFk); + + UPDATE `collection` + SET workerFk = vUserFk + WHERE id = vCollectionFk; END IF; - - UPDATE `collection` - SET workerFk = vUserFk - WHERE id = vCollectionFk; - - DO RELEASE_LOCK(vLockName); END$$ -DELIMITER ; +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/procedures/collection_mergeSales.sql b/db/routines/vn/procedures/collection_mergeSales.sql new file mode 100644 index 000000000..270f3fa30 --- /dev/null +++ b/db/routines/vn/procedures/collection_mergeSales.sql @@ -0,0 +1,30 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT) +BEGIN + DECLARE vDone BOOL; + -- Fetch variables + DECLARE vTicketFk INT; + + DECLARE cCur CURSOR FOR + SELECT ticketFk + FROM vn.ticketCollection + WHERE collectionFk = vCollectionFk; + + DECLARE CONTINUE HANDLER FOR NOT FOUND + SET vDone = TRUE; + + OPEN cCur; + l: LOOP + SET vDone = FALSE; + + FETCH cCur INTO vTicketFk; + + IF vDone THEN + LEAVE l; + END IF; + + CALL vn.ticket_mergeSales(vTicketFk); + END LOOP; + CLOSE cCur; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index ee76f3994..b6e0d6efa 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -1,5 +1,8 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_new`(vUserFk INT, OUT vCollectionFk INT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_new`( + vUserFk INT, + OUT vCollectionFk INT +) BEGIN /** * Genera colecciones de tickets sin asignar trabajador. @@ -9,33 +12,31 @@ BEGIN DECLARE vWarehouseFk INT; DECLARE vWagons INT; DECLARE vTrainFk INT; - DECLARE vLinesLimit INT; + DECLARE vLinesLimit INT DEFAULT NULL; DECLARE vTicketLines INT; - DECLARE vVolumeLimit DECIMAL; + DECLARE vVolumeLimit DECIMAL DEFAULT NULL; DECLARE vTicketVolume DECIMAL; - DECLARE vSizeLimit INT; DECLARE vMaxTickets INT; DECLARE vStateFk VARCHAR(45); DECLARE vFirstTicketFk INT; - DECLARE vHour INT; - DECLARE vMinute INT; DECLARE vWorkerCode VARCHAR(3); - DECLARE vWagonCounter INT DEFAULT 0; + DECLARE vWagonCounter INT DEFAULT 1; DECLARE vTicketFk INT; DECLARE vItemPackingTypeFk VARCHAR(1); - DECLARE vHasAssignedTickets BOOLEAN; + DECLARE vHasAssignedTickets BOOL; DECLARE vHasUniqueCollectionTime BOOL; - DECLARE vDone INT DEFAULT FALSE; - DECLARE vLockName VARCHAR(215); - DECLARE vLockTime INT DEFAULT 30; + DECLARE vHeight INT; + DECLARE vVolume INT; + DECLARE vLiters INT; + DECLARE vLines INT; + DECLARE vTotalLines INT DEFAULT 0; + DECLARE vTotalVolume INT DEFAULT 0; DECLARE vFreeWagonFk INT; - DECLARE vErrorNumber INT; - DECLARE vErrorMsg TEXT; + DECLARE vDone INT DEFAULT FALSE; - DECLARE c1 CURSOR FOR + DECLARE vTickets CURSOR FOR SELECT ticketFk, `lines`, m3 FROM tmp.productionBuffer - WHERE ticketFk <> vFirstTicketFk ORDER BY HH, mm, productionOrder DESC, @@ -48,26 +49,6 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - GET DIAGNOSTICS CONDITION 1 - vErrorNumber = MYSQL_ERRNO, - vErrorMsg = MESSAGE_TEXT; - - CALL util.debugAdd('collection_new', JSON_OBJECT( - 'errorNumber', vErrorNumber, - 'errorMsg', vErrorMsg, - 'lockName', vLockName, - 'userFk', vUserFk, - 'ticketFk', vTicketFk - )); -- Tmp - - IF vLockName IS NOT NULL THEN - DO RELEASE_LOCK(vLockName); - END IF; - RESIGNAL; - END; - SELECT pc.ticketTrolleyMax * o.numberOfWagons, pc.hasUniqueCollectionTime, w.code, @@ -77,37 +58,25 @@ BEGIN o.numberOfWagons, o.trainFk, o.linesLimit, - o.volumeLimit, - o.sizeLimit, - pc.collection_new_lockname + o.volumeLimit INTO vMaxTickets, - vHasUniqueCollectionTime, - vWorkerCode, - vWarehouseFk, - vItemPackingTypeFk, - vStateFk, - vWagons, - vTrainFk, - vLinesLimit, - vVolumeLimit, - vSizeLimit, - vLockName - FROM productionConfig pc - JOIN worker w ON w.id = vUserFk + vHasUniqueCollectionTime, + vWorkerCode, + vWarehouseFk, + vItemPackingTypeFk, + vStateFk, + vWagons, + vTrainFk, + vLinesLimit, + vVolumeLimit + FROM worker w + JOIN operator o ON o.workerFk = w.id JOIN state st ON st.`code` = 'ON_PREPARATION' - JOIN operator o ON o.workerFk = vUserFk; - - SET vLockName = CONCAT_WS('/', - vLockName, - vWarehouseFk, - vItemPackingTypeFk - ); - - IF NOT GET_LOCK(vLockName, vLockTime) THEN - CALL util.throw(CONCAT('Cannot get lock: ', vLockName)); - END IF; + JOIN productionConfig pc + WHERE w.id = vUserFk; -- Se prepara el tren, con tantos vagones como sea necesario. + CREATE OR REPLACE TEMPORARY TABLE tTrain (wagon INT, shelve INT, @@ -118,71 +87,63 @@ BEGIN PRIMARY KEY(wagon, shelve)) ENGINE = MEMORY; - WHILE vWagons > vWagonCounter DO - SET vWagonCounter = vWagonCounter + 1; - - INSERT INTO tTrain(wagon, shelve, liters, `lines`, height) - SELECT vWagonCounter, cv.`level` , cv.liters , cv.`lines` , cv.height - FROM collectionVolumetry cv - WHERE cv.trainFk = vTrainFk + INSERT INTO tTrain (wagon, shelve, liters, `lines`, height) + WITH RECURSIVE wagonSequence AS ( + SELECT vWagonCounter wagon + UNION ALL + SELECT wagon + 1 wagon + FROM wagonSequence + WHERE wagon < vWagonCounter + vWagons -1 + ) + SELECT ws.wagon, cv.`level`, cv.liters, cv.`lines`, cv.height + FROM wagonSequence ws + JOIN vn.collectionVolumetry cv ON cv.trainFk = vTrainFk AND cv.itemPackingTypeFk = vItemPackingTypeFk; - END WHILE; -- Esto desaparecerá cuando tengamos la table cache.ticket + CALL productionControl(vWarehouseFk, 0); ALTER TABLE tmp.productionBuffer ADD COLUMN liters INT, ADD COLUMN height INT; - -- Se obtiene nº de colección. - INSERT INTO collection - SET itemPackingTypeFk = vItemPackingTypeFk, - trainFk = vTrainFk, - wagons = vWagons, - warehouseFk = vWarehouseFk; - - SELECT LAST_INSERT_ID() INTO vCollectionFk; - -- Los tickets de recogida en Algemesí sólo se sacan si están asignados. -- Los pedidos con riesgo no se sacan aunque se asignen. - DELETE pb.* + + DELETE pb FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state WHERE (pb.agency = 'REC_ALGEMESI' AND s.code <> 'PICKER_DESIGNED') OR pb.problem LIKE '%RIESGO%'; - -- Comprobamos si hay tickets asignados. En ese caso, nos centramos - -- exclusivamente en esos tickets y los sacamos independientemente - -- de problemas o tamaños - SELECT COUNT(*) INTO vHasAssignedTickets - FROM tmp.productionBuffer pb - JOIN state s ON s.id = pb.state - WHERE s.code = 'PICKER_DESIGNED' - AND pb.workerCode = vWorkerCode; + -- Si hay tickets asignados, nos centramos exclusivamente en esos tickets + -- y los sacamos independientemente de problemas o tamaños + + SELECT EXISTS ( + SELECT TRUE + FROM tmp.productionBuffer pb + JOIN state s ON s.id = pb.state + WHERE s.code = 'PICKER_DESIGNED' + AND pb.workerCode = vWorkerCode + LIMIT 1 + ) INTO vHasAssignedTickets; -- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados + IF vHasAssignedTickets THEN - DELETE pb.* + DELETE pb FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state WHERE s.code <> 'PICKER_DESIGNED' OR pb.workerCode <> vWorkerCode; ELSE - DELETE pb.* + DELETE pb FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state JOIN agencyMode am ON am.id = pb.agencyModeFk JOIN agency a ON a.id = am.agencyFk - LEFT JOIN ( - SELECT pb.ticketFk, MAX(i.`size`) maxSize - FROM tmp.productionBuffer pb - JOIN ticket t ON t.id = pb.ticketfk - JOIN sale s ON s.ticketFk = t.id - JOIN item i ON i.id = s.itemFk - GROUP BY pb.ticketFk - ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() OR (pb.ubicacion IS NULL AND a.isOwn) @@ -194,71 +155,63 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR (pb.lines > vLinesLimit AND vLinesLimit IS NOT NULL) - OR (pb.m3 > vVolumeLimit AND vVolumeLimit IS NOT NULL) - OR ((sub.maxSize > vSizeLimit OR sub.maxSize IS NOT NULL) AND vSizeLimit IS NOT NULL); + OR (pb.lines >= vLinesLimit AND vLinesLimit IS NOT NULL) + OR (pb.m3 >= vVolumeLimit AND vVolumeLimit IS NOT NULL); END IF; - -- Es importante que el primer ticket se coja en todos los casos - SELECT ticketFk, - HH, - mm, - `lines`, - m3 - INTO vFirstTicketFk, - vHour, - vMinute, - vTicketLines, - vTicketVolume - FROM tmp.productionBuffer - ORDER BY HH, - mm, - productionOrder DESC, - m3 DESC, - agency, - zona, - routeFk, - ticketFk - LIMIT 1; - -- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede IF vHasUniqueCollectionTime THEN - DELETE FROM tmp.productionBuffer - WHERE HH <> vHour - OR mm <> vMinute; + + SELECT ticketFk INTO vFirstTicketFk + FROM tmp.productionBuffer + ORDER BY HH, + mm, + productionOrder DESC, + m3 DESC, + agency, + zona, + routeFk, + ticketFk + LIMIT 1; + + DELETE pb + FROM tmp.productionBuffer pb + JOIN tmp.productionBuffer pb2 ON pb2.ticketFk = vFirstTicketFk + AND (pb.HH <> pb2.HH OR pb.mm <> pb2.mm); + END IF; - SET vTicketFk = vFirstTicketFk; - SET @lines = 0; - SET @volume = 0; - - OPEN c1; - read_loop: LOOP + OPEN vTickets; + l: LOOP SET vDone = FALSE; + FETCH vTickets INTO vTicketFk, vTicketLines, vTicketVolume; + + IF vDone THEN + LEAVE l; + END IF; -- Buscamos un ticket que cumpla con los requisitos en el listado - IF ((vTicketLines + @lines) <= vLinesLimit OR vLinesLimit IS NULL) - AND ((vTicketVolume + @volume) <= vVolumeLimit OR vVolumeLimit IS NULL) THEN + + IF (vLinesLimit IS NULL OR (vTotalLines + vTicketLines) <= vLinesLimit) + AND (vVolumeLimit IS NULL OR (vTotalVolume + vTicketVolume) <= vVolumeLimit) THEN CALL ticket_splitItemPackingType(vTicketFk, vItemPackingTypeFk); DROP TEMPORARY TABLE tmp.ticketIPT; + SELECT COUNT(*), SUM(litros), MAX(i.`size`), SUM(sv.volume) + INTO vLines, vLiters, vHeight, vVolume + FROM saleVolume sv + JOIN sale s ON s.id = sv.saleFk + JOIN item i ON i.id = s.itemFk + WHERE sv.ticketFk = vTicketFk; + + SET vTotalVolume = vTotalVolume + vVolume, + vTotalLines = vTotalLines + vLines; + UPDATE tmp.productionBuffer pb - JOIN ( - SELECT SUM(litros) liters, - @lines:= COUNT(*) + @lines, - COUNT(*) `lines`, - MAX(i.`size`) height, - @volume := SUM(sv.volume) + @volume, - SUM(sv.volume) volume - FROM saleVolume sv - JOIN sale s ON s.id = sv.saleFk - JOIN item i ON i.id = s.itemFk - WHERE sv.ticketFk = vTicketFk - ) sub - SET pb.liters = sub.liters, - pb.`lines` = sub.`lines`, - pb.height = sub.height + SET pb.liters = vLiters, + pb.`lines` = vLines, + pb.height = vHeight WHERE pb.ticketFk = vTicketFk; UPDATE tTrain tt @@ -275,17 +228,13 @@ BEGIN tt.height LIMIT 1; - -- Si no le encuentra una balda adecuada, intentamos darle un carro entero si queda alguno libre + -- Si no le encuentra una balda, intentamos darle un carro entero libre + IF NOT (SELECT COUNT(*) FROM tTrain WHERE ticketFk) THEN - SELECT tt.wagon - INTO vFreeWagonFk - FROM tTrain tt - LEFT JOIN ( - SELECT DISTINCT wagon - FROM tTrain - WHERE ticketFk IS NOT NULL - ) nn ON nn.wagon = tt.wagon - WHERE nn.wagon IS NULL + SELECT wagon INTO vFreeWagonFk + FROM tTrain + GROUP BY wagon + HAVING SUM(IFNULL(ticketFk, 0)) = 0 ORDER BY wagon LIMIT 1; @@ -294,38 +243,35 @@ BEGIN SET ticketFk = vFirstTicketFk WHERE wagon = vFreeWagonFk; - -- Se anulan el resto de carros libres para que sólo uno lleve un pedido excesivo - DELETE tt.* - FROM tTrain tt - LEFT JOIN ( - SELECT DISTINCT wagon - FROM tTrain - WHERE ticketFk IS NOT NULL - ) nn ON nn.wagon = tt.wagon - WHERE nn.wagon IS NULL; - END IF; - END IF; + -- Se anulan el resto de carros libres, + -- máximo un carro con pedido excesivo - FETCH c1 INTO vTicketFk, vTicketLines, vTicketVolume; - IF vDone OR NOT (SELECT COUNT(*) FROM tTrain WHERE ticketFk IS NULL) THEN - LEAVE read_loop; - END IF; - ELSE - FETCH c1 INTO vTicketFk, vTicketLines, vTicketVolume; - IF vDone THEN - LEAVE read_loop; - END IF; + DELETE tt + FROM tTrain tt + JOIN (SELECT wagon + FROM tTrain + GROUP BY wagon + HAVING SUM(IFNULL(ticketFk, 0)) = 0 + ) sub ON sub.wagon = tt.wagon; + END IF; + END IF; END IF; END LOOP; - CLOSE c1; + CLOSE vTickets; IF (SELECT COUNT(*) FROM tTrain WHERE ticketFk) THEN - UPDATE collection c - JOIN state st ON st.code = 'ON_PREPARATION' - SET c.stateFk = st.id - WHERE c.id = vCollectionFk; + -- Se obtiene nº de colección + + INSERT INTO collection + SET itemPackingTypeFk = vItemPackingTypeFk, + trainFk = vTrainFk, + wagons = vWagons, + warehouseFk = vWarehouseFk; + + SELECT LAST_INSERT_ID() INTO vCollectionFk; -- Asigna las bandejas + INSERT IGNORE INTO ticketCollection(ticketFk, collectionFk, `level`, wagon, liters) SELECT tt.ticketFk, vCollectionFk, tt.shelve, tt.wagon, tt.liters FROM tTrain tt @@ -333,37 +279,34 @@ BEGIN ORDER BY tt.wagon, tt.shelve; -- Actualiza el estado de los tickets + CALL collection_setState(vCollectionFk, vStateFk); -- Aviso para la preparacion previa + INSERT INTO ticketDown(ticketFk, collectionFk) SELECT tc.ticketFk, tc.collectionFk FROM ticketCollection tc WHERE tc.collectionFk = vCollectionFk; - CALL sales_mergeByCollection(vCollectionFk); + CALL collection_mergeSales(vCollectionFk); UPDATE `collection` c - JOIN ( + JOIN( SELECT COUNT(*) saleTotalCount, SUM(s.isPicked <> 0) salePickedCount FROM ticketCollection tc JOIN sale s ON s.ticketFk = tc.ticketFk - WHERE tc.collectionFk = vCollectionFk - AND s.quantity > 0 - ) sub + WHERE tc.collectionFk = vCollectionFk + AND s.quantity > 0 + )sub SET c.saleTotalCount = sub.saleTotalCount, c.salePickedCount = sub.salePickedCount WHERE c.id = vCollectionFk; - ELSE - DELETE FROM `collection` - WHERE id = vCollectionFk; - SET vCollectionFk = NULL; + SET vCollectionFk = NULL; END IF; - DO RELEASE_LOCK(vLockName); - DROP TEMPORARY TABLE tTrain, tmp.productionBuffer; diff --git a/db/routines/vn/procedures/sales_merge.sql b/db/routines/vn/procedures/sales_merge.sql deleted file mode 100644 index 3dd01f9bc..000000000 --- a/db/routines/vn/procedures/sales_merge.sql +++ /dev/null @@ -1,41 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT) -BEGIN - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - ROLLBACK; - RESIGNAL; - END; - - CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve - (PRIMARY KEY (id)) - ENGINE = MEMORY - SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity - FROM sale s - JOIN item i ON i.id = s.itemFk - JOIN itemType it ON it.id = i.typeFk - WHERE s.ticketFk = vTicketFk - AND it.isMergeable - GROUP BY s.itemFk, s.price, s.discount; - - START TRANSACTION; - - UPDATE sale s - JOIN tSalesToPreserve stp ON stp.id = s.id - SET s.quantity = newQuantity - WHERE s.ticketFk = vTicketFk; - - DELETE s.* - FROM sale s - LEFT JOIN tSalesToPreserve stp ON stp.id = s.id - JOIN item i ON i.id = s.itemFk - JOIN itemType it ON it.id = i.typeFk - WHERE s.ticketFk = vTicketFk - AND stp.id IS NULL - AND it.isMergeable; - - COMMIT; - - DROP TEMPORARY TABLE tSalesToPreserve; -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/sales_mergeByCollection.sql b/db/routines/vn/procedures/sales_mergeByCollection.sql index 4c0693753..6a8d11d8f 100644 --- a/db/routines/vn/procedures/sales_mergeByCollection.sql +++ b/db/routines/vn/procedures/sales_mergeByCollection.sql @@ -26,7 +26,7 @@ BEGIN LEAVE myLoop; END IF; - CALL vn.sales_merge(vTicketFk); + CALL vn.ticket_mergeSales(vTicketFk); END LOOP; diff --git a/db/routines/vn/procedures/ticket_mergeSales.sql b/db/routines/vn/procedures/ticket_mergeSales.sql new file mode 100644 index 000000000..2dc3a39da --- /dev/null +++ b/db/routines/vn/procedures/ticket_mergeSales.sql @@ -0,0 +1,49 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_mergeSales`( + vSelf INT +) +BEGIN + DECLARE vHasSalesToMerge BOOL; + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; + + START TRANSACTION; + + SELECT id INTO vSelf + FROM ticket + WHERE id = vSelf FOR UPDATE; + + CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve + (PRIMARY KEY (id)) + ENGINE = MEMORY + SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity + FROM sale s + JOIN item i ON i.id = s.itemFk + JOIN itemType it ON it.id = i.typeFk + WHERE s.ticketFk = vSelf + AND it.isMergeable + GROUP BY s.itemFk, s.price, s.discount + HAVING COUNT(*) > 1; + + SELECT COUNT(*) INTO vHasSalesToMerge + FROM tSalesToPreserve; + + IF vHasSalesToMerge THEN + UPDATE sale s + JOIN tSalesToPreserve stp ON stp.id = s.id + SET s.quantity = newQuantity; + + DELETE s + FROM sale s + JOIN tSalesToPreserve stp ON stp.itemFk = s.itemFk + WHERE s.ticketFk = vSelf + AND s.id <> stp.id; + END IF; + + COMMIT; + DROP TEMPORARY TABLE tSalesToPreserve; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index 5ae9fb9bc..2a41369c9 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -5,139 +5,73 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_splitItemPac ) BEGIN /** - * Clona y reparte las ventas de un ticket en funcion del tipo de empaquetado. - * Respeta el id inicial para el tipo propuesto. + * Clona y reparte las líneas de ventas de un ticket en funcion del tipo de empaquetado. + * Respeta el id de ticket inicial para el tipo de empaquetado propuesto. * * @param vSelf Id ticket - * @param vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original - * @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk) + * @param vOriginalItemPackingTypeFk Tipo empaquetado al que se mantiene el ticket original */ - DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H'; - DECLARE vNewTicketFk INT; - DECLARE vPackingTypesToSplit INT; DECLARE vDone INT DEFAULT FALSE; - DECLARE vErrorNumber INT; - DECLARE vErrorMsg TEXT; + DECLARE vHasItemPackingType BOOL; + DECLARE vItemPackingTypeFk INT; + DECLARE vNewTicketFk INT; - DECLARE vSaleGroup CURSOR FOR - SELECT itemPackingTypeFk - FROM tSaleGroup - WHERE itemPackingTypeFk IS NOT NULL - ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC; + DECLARE vItemPackingTypes CURSOR FOR + SELECT DISTINCT itemPackingTypeFk + FROM tmp.salesToMove; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - GET DIAGNOSTICS CONDITION 1 - vErrorNumber = MYSQL_ERRNO, - vErrorMsg = MESSAGE_TEXT; + SELECT COUNT(*) INTO vHasItemPackingType + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + WHERE t.id = vSelf + AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk; - CALL util.debugAdd('ticket_splitItemPackingType', JSON_OBJECT( - 'errorNumber', vErrorNumber, - 'errorMsg', vErrorMsg, - 'ticketFk', vSelf - )); -- Tmp - ROLLBACK; - RESIGNAL; - END; + IF NOT vHasItemPackingType THEN + CALL util.throw('The ticket has not sales with the itemPackingType'); + END IF; - START TRANSACTION; - - SELECT id - FROM sale - WHERE ticketFk = vSelf - AND NOT quantity - FOR UPDATE; - - DELETE FROM sale - WHERE NOT quantity - AND ticketFk = vSelf; - - CREATE OR REPLACE TEMPORARY TABLE tSale - (PRIMARY KEY (id)) - ENGINE = MEMORY - SELECT s.id, i.itemPackingTypeFk, IFNULL(sv.litros, 0) litros - FROM sale s - JOIN item i ON i.id = s.itemFk - LEFT JOIN saleVolume sv ON sv.saleFk = s.id - WHERE s.ticketFk = vSelf; - - CREATE OR REPLACE TEMPORARY TABLE tSaleGroup - ENGINE = MEMORY - SELECT itemPackingTypeFk, SUM(litros) totalLitros - FROM tSale - GROUP BY itemPackingTypeFk; - - SELECT COUNT(*) INTO vPackingTypesToSplit - FROM tSaleGroup - WHERE itemPackingTypeFk IS NOT NULL; - - CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT( + CREATE OR REPLACE TEMPORARY TABLE tmp.salesToMove ( ticketFk INT, - itemPackingTypeFk VARCHAR(1) - ) ENGINE = MEMORY; + saleFk INT, + itemPackingTypeFk INT + ) ENGINE=MEMORY; - CASE vPackingTypesToSplit - WHEN 0 THEN - INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk) - VALUES(vSelf, vItemPackingTypeFk); - WHEN 1 THEN - INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk) - SELECT vSelf, itemPackingTypeFk - FROM tSaleGroup - WHERE itemPackingTypeFk IS NOT NULL; - ELSE - OPEN vSaleGroup; - FETCH vSaleGroup INTO vItemPackingTypeFk; + INSERT INTO tmp.salesToMove (saleFk, itemPackingTypeFk) + SELECT s.id, i.itemPackingTypeFk + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + WHERE t.id = vSelf + AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk; - INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk) - VALUES(vSelf, vItemPackingTypeFk); + OPEN vItemPackingTypes; - l: LOOP - SET vDone = FALSE; - FETCH vSaleGroup INTO vItemPackingTypeFk; + l: LOOP + SET vDone = FALSE; + FETCH vItemPackingTypes INTO vitemPackingTypeFk; + + IF vDone THEN + LEAVE l; + END IF; + + CALL ticket_Clone(vSelf, vNewTicketFk); + + UPDATE tmp.salesToMove + SET ticketFk = vNewTicketFk + WHERE itemPackingTypeFk = vItemPackingTypeFk; + + END LOOP; - IF vDone THEN - LEAVE l; - END IF; + CLOSE vItemPackingTypes; - CALL ticket_Clone(vSelf, vNewTicketFk); + UPDATE sale s + JOIN tmp.salesToMove stm ON stm.saleFk = s.id + SET s.ticketFk = stm.ticketFk + WHERE stm.ticketFk; - INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk) - VALUES(vNewTicketFk, vItemPackingTypeFk); - END LOOP; - - CLOSE vSaleGroup; - - SELECT s.id - FROM sale s - JOIN tSale ts ON ts.id = s.id - JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk - FOR UPDATE; - - UPDATE sale s - JOIN tSale ts ON ts.id = s.id - JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk - SET s.ticketFk = t.ticketFk; - - SELECT itemPackingTypeFk INTO vItemPackingTypeFk - FROM tSaleGroup sg - WHERE sg.itemPackingTypeFk IS NOT NULL - ORDER BY sg.itemPackingTypeFk - LIMIT 1; - - UPDATE sale s - JOIN tSale ts ON ts.id = s.id - JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = vItemPackingTypeFk - SET s.ticketFk = t.ticketFk - WHERE ts.itemPackingTypeFk IS NULL; - END CASE; - - COMMIT; - - DROP TEMPORARY TABLE - tSale, - tSaleGroup; + DROP TEMPORARY TABLE tmp.salesToMove; END$$ -DELIMITER ; +DELIMITER ; \ No newline at end of file From a4cc36eed1dae8e18835b82259d3db63575bc5d5 Mon Sep 17 00:00:00 2001 From: Pako Date: Tue, 27 Aug 2024 11:41:34 +0200 Subject: [PATCH 158/250] version --- db/versions/11201-limeChrysanthemum/00-firstScript.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 db/versions/11201-limeChrysanthemum/00-firstScript.sql diff --git a/db/versions/11201-limeChrysanthemum/00-firstScript.sql b/db/versions/11201-limeChrysanthemum/00-firstScript.sql new file mode 100644 index 000000000..943368b06 --- /dev/null +++ b/db/versions/11201-limeChrysanthemum/00-firstScript.sql @@ -0,0 +1,4 @@ +-- Place your SQL code here +ALTER TABLE vn.saleGroup ADD stateFk TINYINT(3) UNSIGNED; + +ALTER TABLE vn.saleGroup ADD CONSTRAINT saleGroup_state_FK FOREIGN KEY (stateFk) REFERENCES vn.state(id) ON DELETE RESTRICT ON UPDATE CASCADE; From 3ac2c18da50abfba17939d5b017e181be6b67b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 13:31:07 +0200 Subject: [PATCH 159/250] fixes: refs #7760 collection problems --- .../vn/procedures/collection_mergeSales.sql | 13 ++++++------- db/routines/vn/procedures/collection_new.sql | 16 ++++++++++------ .../procedures/ticket_splitItemPackingType.sql | 10 +++++----- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/db/routines/vn/procedures/collection_mergeSales.sql b/db/routines/vn/procedures/collection_mergeSales.sql index 270f3fa30..26444d6f9 100644 --- a/db/routines/vn/procedures/collection_mergeSales.sql +++ b/db/routines/vn/procedures/collection_mergeSales.sql @@ -2,29 +2,28 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT) BEGIN DECLARE vDone BOOL; - -- Fetch variables DECLARE vTicketFk INT; - DECLARE cCur CURSOR FOR + DECLARE vTickets CURSOR FOR SELECT ticketFk - FROM vn.ticketCollection + FROM ticketCollection WHERE collectionFk = vCollectionFk; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - OPEN cCur; + OPEN vTickets; l: LOOP SET vDone = FALSE; - FETCH cCur INTO vTicketFk; + FETCH vTickets INTO vTicketFk; IF vDone THEN LEAVE l; END IF; - CALL vn.ticket_mergeSales(vTicketFk); + CALL ticket_mergeSales(vTicketFk); END LOOP; - CLOSE cCur; + CLOSE vTickets; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index b6e0d6efa..250d9a03d 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -12,9 +12,10 @@ BEGIN DECLARE vWarehouseFk INT; DECLARE vWagons INT; DECLARE vTrainFk INT; - DECLARE vLinesLimit INT DEFAULT NULL; + DECLARE vLinesLimit INT; DECLARE vTicketLines INT; - DECLARE vVolumeLimit DECIMAL DEFAULT NULL; + DECLARE vVolumeLimit DECIMAL; + DECLARE vSizeLimit INT; DECLARE vTicketVolume DECIMAL; DECLARE vMaxTickets INT; DECLARE vStateFk VARCHAR(45); @@ -58,7 +59,8 @@ BEGIN o.numberOfWagons, o.trainFk, o.linesLimit, - o.volumeLimit + o.volumeLimit, + o.sizeLimit INTO vMaxTickets, vHasUniqueCollectionTime, vWorkerCode, @@ -68,7 +70,8 @@ BEGIN vWagons, vTrainFk, vLinesLimit, - vVolumeLimit + vVolumeLimit, + vSizeLimit FROM worker w JOIN operator o ON o.workerFk = w.id JOIN state st ON st.`code` = 'ON_PREPARATION' @@ -155,8 +158,9 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR (pb.lines >= vLinesLimit AND vLinesLimit IS NOT NULL) - OR (pb.m3 >= vVolumeLimit AND vVolumeLimit IS NOT NULL); + OR pb.lines > COALESCE(vLinesLimit, pb.lines) + OR pb.m3 > COALESCE(vVolumeLimit, pb.m3) + OR sub.maxSize > vSizeLimit; END IF; -- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index 2a41369c9..d2e4290d8 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -51,18 +51,18 @@ BEGIN l: LOOP SET vDone = FALSE; - FETCH vItemPackingTypes INTO vitemPackingTypeFk; - + FETCH vItemPackingTypes INTO vItemPackingTypeFk; + IF vDone THEN LEAVE l; END IF; - + CALL ticket_Clone(vSelf, vNewTicketFk); - + UPDATE tmp.salesToMove SET ticketFk = vNewTicketFk WHERE itemPackingTypeFk = vItemPackingTypeFk; - + END LOOP; CLOSE vItemPackingTypes; From 44072de9289c0978dc8f8c3ecccb5836503cabf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 13:36:06 +0200 Subject: [PATCH 160/250] fixes: refs #7760 collection problems --- db/routines/vn/procedures/collection_new.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 250d9a03d..8de8eaf8c 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -18,7 +18,7 @@ BEGIN DECLARE vSizeLimit INT; DECLARE vTicketVolume DECIMAL; DECLARE vMaxTickets INT; - DECLARE vStateFk VARCHAR(45); + DECLARE vStateCode VARCHAR(45); DECLARE vFirstTicketFk INT; DECLARE vWorkerCode VARCHAR(3); DECLARE vWagonCounter INT DEFAULT 1; @@ -66,7 +66,7 @@ BEGIN vWorkerCode, vWarehouseFk, vItemPackingTypeFk, - vStateFk, + vStateCode, vWagons, vTrainFk, vLinesLimit, @@ -284,7 +284,7 @@ BEGIN -- Actualiza el estado de los tickets - CALL collection_setState(vCollectionFk, vStateFk); + CALL collection_setState(vCollectionFk, vStateCode); -- Aviso para la preparacion previa From 58f8903b531a401a421a965fc3b5642bf1aa2f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 13:43:20 +0200 Subject: [PATCH 161/250] fixes: refs #7760 collection problems --- db/routines/vn/procedures/collection_new.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 8de8eaf8c..b8470cb75 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -158,8 +158,8 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR pb.lines > COALESCE(vLinesLimit, pb.lines) - OR pb.m3 > COALESCE(vVolumeLimit, pb.m3) + OR pb.lines > vLinesLimit + OR pb.m3 > vVolumeLimit OR sub.maxSize > vSizeLimit; END IF; From 6090e8ceeea2cac05a0d76fbc89e57d2e5f31cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 13:47:47 +0200 Subject: [PATCH 162/250] fixes: refs #7760 collection problems --- db/routines/vn/procedures/collection_new.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index b8470cb75..d0b358b75 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -147,6 +147,14 @@ BEGIN JOIN state s ON s.id = pb.state JOIN agencyMode am ON am.id = pb.agencyModeFk JOIN agency a ON a.id = am.agencyFk + LEFT JOIN ( + SELECT pb.ticketFk, MAX(i.`size`) maxSize + FROM tmp.productionBuffer pb + JOIN ticket t ON t.id = pb.ticketfk + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + GROUP BY pb.ticketFk + ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() OR (pb.ubicacion IS NULL AND a.isOwn) From db2215e3fa224142011a8c60cf953d5454f4ccc8 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 27 Aug 2024 13:53:27 +0200 Subject: [PATCH 163/250] feat(salix): refs #7896 update version and changelog --- CHANGELOG.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db79a40a..1e75b6986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,108 @@ +# Version 24.36 - 2024-08-27 + +### Added 🆕 + +- chore: refs #7524 WIP limit call by:jorgep +- feat(update-user): refs #7848 add twoFactor by:alexm +- feat: #3199 Requested changes by:guillermo +- feat: refs #3199 Added more scopes ticket_recalcByScope by:guillermo +- feat: refs #3199 Added one more scope ticket_recalcByScope by:guillermo +- feat: refs #3199 Created ticket_recalcItemTaxCountryByScope by:guillermo +- feat: refs #3199 Requested changes by:guillermo +- feat: refs #7346 add multiple feature by:jgallego +- feat: refs #7346 backTest checks new implementation by:jgallego +- feat: refs #7346 mas intuitivo by:jgallego +- feat: refs #7514 Changes to put srt log (origin/7514-srtLog) by:guillermo +- feat: refs #7524 add default limit (origin/7524-limitSelect) by:jorgep +- feat: refs #7524 add mock limit on find query by:jorgep +- feat: refs #7524 wip remote hooks by:jorgep +- feat: refs #7567 Changed time to call event by:guillermo +- feat: refs #7567 Requested changes by:guillermo +- feat: refs #7710 pr revision by:jgallego +- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego +- feat: refs #7712 Fix by:guillermo +- feat: refs #7712 Unify by:guillermo +- feat: refs #7712 sizeLimit (origin/7712-sizeLimit) by:guillermo +- feat: refs #7758 Add code mandateType and accountDetailType by:ivanm +- feat: refs #7758 Modify code lowerCamelCase and UNIQUE by:ivanm +- feat: refs #7758 accountDetailType fix deploy error by:ivanm +- feat: refs #7784 Changes in entry-order-pdf by:guillermo +- feat: refs #7784 Requested changes by:guillermo +- feat: refs #7799 Added Fk in vn.item.itemPackingTypeFk by:guillermo +- feat: refs #7800 Added company Fk by:guillermo +- feat: refs #7842 Added editorFk in vn.host by:guillermo +- feat: refs #7862 roadmap new fields by:ivanm +- feat: refs #7882 Added quadMindsConfig table by:guillermo + +### Changed 📦 + +- refactor: refs #7567 Fix and improvement by:guillermo +- refactor: refs #7567 Minor change by:guillermo +- refactor: refs #7756 Fix tests by:guillermo +- refactor: refs #7798 Drop bi.Greuges_comercial_detail by:guillermo +- refactor: refs #7848 adapt to lilium by:alexm + +### Fixed 🛠️ + +- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego +- feat: refs #7758 accountDetailType fix deploy error by:ivanm +- fix(salix): #7283 ItemFixedPrice duplicated (origin/7283_itemFixedPrice_duplicated) by:Javier Segarra +- fix: refs #7346 minor error (origin/7346, 7346) by:jgallego +- fix: refs #7355 remove and tests accounts (origin/7355-accountMigration2) by:carlossa +- fix: refs #7355 remove and tests accounts by:carlossa +- fix: refs #7524 default limit select by:jorgep +- fix: refs #7756 Foreign keys invoiceOut (origin/7756-fixRefFk) by:guillermo +- fix: refs #7756 id 0 by:guillermo +- fix: refs #7800 tpvMerchantEnable PRIMARY KEY (origin/7800-tpvMerchantEnable) by:guillermo +- fix: refs #7800 tpvMerchantEnable PRIMARY KEY by:guillermo + +# Version 24.34 - 2024-08-20 + +### Added 🆕 + +- #6900 feat: clear empty by:jorgep +- #6900 feat: empty commit by:jorgep +- chore: refs #6900 beautify code by:jorgep +- chore: refs #6989 add config model by:jorgep +- feat workerActivity refs #6078 by:sergiodt +- feat: #6453 Refactor (origin/6453-orderConfirm) by:guillermo +- feat: #6453 Rollback always split by itemPackingType by:guillermo +- feat: deleted worker module code & redirect to Lilium by:Jon +- feat: refs #6453 Added new ticket search by:guillermo +- feat: refs #6453 Fixes by:guillermo +- feat: refs #6453 Minor changes by:guillermo +- feat: refs #6453 Requested changes by:guillermo +- feat: refs #6900 drop section by:jorgep +- feat: refs #7283 order by desc date by:jorgep +- feat: refs #7323 add locale by:jorgep +- feat: refs #7323 redirect to lilium by:jorgep +- feat: refs #7646 delete scannableCodeType by:robert +- feat: refs #7713 Created ACLLog by:guillermo +- feat: refs #7774 (origin/7774-ticket_cloneWeekly) by:robert +- feat: refs #7774 #7774 Changes ticket_cloneWeekly by:guillermo +- feat: refs #7774 ticket_cloneWeekly by:robert + +### Changed 📦 + +- refactor: refs #6453 Major changes by:guillermo +- refactor: refs #6453 Minor changes by:guillermo +- refactor: refs #6453 order_confirmWithUser by:guillermo +- refactor: refs #7646 #7646 Deleted scannable* variables productionConfig by:guillermo +- refactor: refs #7820 Deprecated silexACL by:guillermo + +### Fixed 🛠️ + +- #6900 fix: #6900 rectificative filter by:jorgep +- #6900 fix: empty commit by:jorgep +- fix(orders_filter): add sourceApp accepts by:alexm +- fix: refs #6130 commit lint by:pablone +- fix: refs #6453 order_confirmWithUser by:guillermo +- fix: refs #7283 sql by:jorgep +- fix: refs #7713 ACL Log by:guillermo +- test: fix claim descriptor redirect to lilium by:alexm +- test: fix ticket redirect to lilium by:alexm +- test: fix ticket sale e2e by:alexm + # Version 24.32 - 2024-08-06 ### Added 🆕 diff --git a/package.json b/package.json index 61a9cf46c..bbb83c4b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "24.34.0", + "version": "24.36.0", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From b833fd50818d033e7eb8c09fc34a1be5cf1e2306 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 27 Aug 2024 14:45:11 +0200 Subject: [PATCH 164/250] chore: refs #7524 modify ormConfig table col --- db/versions/11204-navyMonstera/00-firstScript.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/versions/11204-navyMonstera/00-firstScript.sql diff --git a/db/versions/11204-navyMonstera/00-firstScript.sql b/db/versions/11204-navyMonstera/00-firstScript.sql new file mode 100644 index 000000000..492e3d607 --- /dev/null +++ b/db/versions/11204-navyMonstera/00-firstScript.sql @@ -0,0 +1,5 @@ +ALTER TABLE vn.ormConfig +MODIFY COLUMN id INT NOT NULL, +DROP PRIMARY KEY, +ADD CONSTRAINT ormConfig_check CHECK (id = 1), +ADD PRIMARY KEY (id); \ No newline at end of file From 9a2351b958967a3ac4d5345eea8b27c61fa31ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 17:12:41 +0200 Subject: [PATCH 165/250] Hotfix: refs #7213 ticket_isTooLittle group by addressFk --- .../vn/functions/ticket_isTooLittle.sql | 20 +++++++++++++------ .../procedures/ticket_setProblemTooLittle.sql | 13 +++++++++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/db/routines/vn/functions/ticket_isTooLittle.sql b/db/routines/vn/functions/ticket_isTooLittle.sql index bcbf09035..9874f00d4 100644 --- a/db/routines/vn/functions/ticket_isTooLittle.sql +++ b/db/routines/vn/functions/ticket_isTooLittle.sql @@ -12,13 +12,21 @@ BEGIN * @return BOOL */ DECLARE vIsTooLittle TINYINT(1); - + + WITH tickets AS ( + SELECT addressFk, DATE(shipped) dated + FROM vn.ticket + WHERE id = vSelf + ) SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume - AND IFNULL(t.totalWithoutVat, 0) < vc.minTicketValue) INTO vIsTooLittle - FROM ticket t - LEFT JOIN saleVolume sv ON sv.ticketFk = t.id - JOIN volumeConfig vc - WHERE t.id = vSelf; + AND SUM(IFNULL(t.totalWithoutVat, 0)) < vc.minTicketValue) INTO vIsTooLittle + FROM vn.ticket t + JOIN tickets ts ON ts.addressFk = t.addressFk + JOIN vn.volumeConfig vc + LEFT JOIN vn.saleVolume sv ON sv.ticketFk = t.id + WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated) + AND sv.litros > 0 + AND t.totalWithoutVat > 0; RETURN vIsTooLittle; END$$ diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql index 48cc47809..3d972a998 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql @@ -12,13 +12,20 @@ BEGIN CREATE OR REPLACE TEMPORARY TABLE tmp.ticket (INDEX(ticketFk, isProblemCalcNeeded)) ENGINE = MEMORY + WITH tickets AS ( + SELECT addressFk, DATE(shipped) dated + FROM vn.ticket + WHERE id = vSelf + ) SELECT vSelf ticketFk, - ticket_isTooLittle(vSelf) hasProblem, - ticket_isProblemCalcNeeded(vSelf) isProblemCalcNeeded; + ticket_isTooLittle(vSelf) hasProblem, + ticket_isProblemCalcNeeded(vSelf) isProblemCalcNeeded + FROM vn.ticket t + JOIN tickets ts ON ts.addressFk = t.addressFk + WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated); CALL ticket_setProblem('isTooLittle'); DROP TEMPORARY TABLE tmp.ticket; - END$$ DELIMITER ; \ No newline at end of file From 1ec9e5bf0969b0ca4e541b4fa6a5399fc467eaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 17:39:54 +0200 Subject: [PATCH 166/250] Hotfix: refs #7213 ticket_isTooLittle group by addressFk --- db/routines/vn/functions/ticket_isTooLittle.sql | 9 ++++----- db/routines/vn/procedures/ticket_setProblemTooLittle.sql | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/db/routines/vn/functions/ticket_isTooLittle.sql b/db/routines/vn/functions/ticket_isTooLittle.sql index 9874f00d4..dee1df29b 100644 --- a/db/routines/vn/functions/ticket_isTooLittle.sql +++ b/db/routines/vn/functions/ticket_isTooLittle.sql @@ -20,13 +20,12 @@ BEGIN ) SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume AND SUM(IFNULL(t.totalWithoutVat, 0)) < vc.minTicketValue) INTO vIsTooLittle - FROM vn.ticket t - JOIN tickets ts ON ts.addressFk = t.addressFk - JOIN vn.volumeConfig vc + FROM tickets ts + JOIN vn.ticket t ON t.addressFk = ts.addressFk LEFT JOIN vn.saleVolume sv ON sv.ticketFk = t.id + JOIN vn.volumeConfig vc WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated) - AND sv.litros > 0 - AND t.totalWithoutVat > 0; + AND ticket_isProblemCalcNeeded(t.id); RETURN vIsTooLittle; END$$ diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql index 3d972a998..fe2d3306d 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql @@ -17,9 +17,9 @@ BEGIN FROM vn.ticket WHERE id = vSelf ) - SELECT vSelf ticketFk, - ticket_isTooLittle(vSelf) hasProblem, - ticket_isProblemCalcNeeded(vSelf) isProblemCalcNeeded + SELECT t.id ticketFk, + ticket_isTooLittle(t.id) hasProblem, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded FROM vn.ticket t JOIN tickets ts ON ts.addressFk = t.addressFk WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated); From 16fd69904ba952b5c4f194f83b04f14a0d9a8fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 27 Aug 2024 18:36:07 +0200 Subject: [PATCH 167/250] fixes: refs #7760 collection problems --- db/routines/vn/procedures/collection_new.sql | 2 +- .../vn/procedures/sales_mergeByCollection.sql | 2 +- .../vn/procedures/ticket_splitItemPackingType.sql | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index d0b358b75..80c5e6172 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -165,7 +165,7 @@ BEGIN OR (NOT pb.H AND pb.V > 0 AND vItemPackingTypeFk = 'H') OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) - OR LENGTH(pb.problem) > 0 + OR LENGTH(pb.problem) OR pb.lines > vLinesLimit OR pb.m3 > vVolumeLimit OR sub.maxSize > vSizeLimit; diff --git a/db/routines/vn/procedures/sales_mergeByCollection.sql b/db/routines/vn/procedures/sales_mergeByCollection.sql index 6a8d11d8f..04f8b5bc7 100644 --- a/db/routines/vn/procedures/sales_mergeByCollection.sql +++ b/db/routines/vn/procedures/sales_mergeByCollection.sql @@ -26,7 +26,7 @@ BEGIN LEAVE myLoop; END IF; - CALL vn.ticket_mergeSales(vTicketFk); + CALL ticket_mergeSales(vTicketFk); END LOOP; diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index d2e4290d8..86e621706 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -18,7 +18,7 @@ BEGIN DECLARE vItemPackingTypes CURSOR FOR SELECT DISTINCT itemPackingTypeFk - FROM tmp.salesToMove; + FROM tSalesToMove; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; @@ -33,13 +33,13 @@ BEGIN CALL util.throw('The ticket has not sales with the itemPackingType'); END IF; - CREATE OR REPLACE TEMPORARY TABLE tmp.salesToMove ( + CREATE OR REPLACE TEMPORARY TABLE tSalesToMove ( ticketFk INT, saleFk INT, itemPackingTypeFk INT ) ENGINE=MEMORY; - INSERT INTO tmp.salesToMove (saleFk, itemPackingTypeFk) + INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk) SELECT s.id, i.itemPackingTypeFk FROM ticket t JOIN sale s ON s.ticketFk = t.id @@ -59,7 +59,7 @@ BEGIN CALL ticket_Clone(vSelf, vNewTicketFk); - UPDATE tmp.salesToMove + UPDATE tSalesToMove SET ticketFk = vNewTicketFk WHERE itemPackingTypeFk = vItemPackingTypeFk; @@ -68,10 +68,10 @@ BEGIN CLOSE vItemPackingTypes; UPDATE sale s - JOIN tmp.salesToMove stm ON stm.saleFk = s.id + JOIN tSalesToMove stm ON stm.saleFk = s.id SET s.ticketFk = stm.ticketFk WHERE stm.ticketFk; - DROP TEMPORARY TABLE tmp.salesToMove; + DROP TEMPORARY TABLE tSalesToMove; END$$ DELIMITER ; \ No newline at end of file From 97b839bf1a029a11f1dbe3275f8d09f8f5f2da61 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 28 Aug 2024 08:10:32 +0200 Subject: [PATCH 168/250] fix: refs #6727 No delete log tables data in clean procedures --- db/routines/vn/procedures/clean.sql | 6 ------ 1 file changed, 6 deletions(-) diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index f479d5b3e..9a90b4e85 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -19,14 +19,12 @@ BEGIN DELETE FROM workerActivity WHERE created < v2Years; DELETE FROM ticketParking WHERE created < v2Months; DELETE FROM routesMonitor WHERE dated < v2Months; - DELETE FROM workerTimeControlLog WHERE created < v2Months; DELETE FROM `message` WHERE sendDate < v2Months; DELETE FROM messageInbox WHERE sendDate < v2Months; DELETE FROM messageInbox WHERE sendDate < v2Months; DELETE FROM workerTimeControl WHERE timed < v4Years; DELETE FROM itemShelving WHERE created < util.VN_CURDATE() AND visible = 0; DELETE FROM ticketDown WHERE created < util.yesterday(); - DELETE FROM entryLog WHERE creationDate < v2Months; DELETE IGNORE FROM expedition WHERE created < v26Months; DELETE cs FROM sms s @@ -61,11 +59,8 @@ BEGIN DELETE b FROM buy b JOIN entryConfig e ON e.defaultEntry = b.entryFk WHERE b.created < v2Months; - DELETE FROM itemShelvingLog WHERE created < v2Months; DELETE FROM stockBuyed WHERE creationDate < v2Months; - DELETE FROM itemCleanLog WHERE created < util.VN_NOW() - INTERVAL 1 YEAR; DELETE FROM printQueue WHERE statusCode = 'printed' AND created < v2Months; - DELETE FROM ticketLog WHERE creationDate <= v5Years; -- Equipos duplicados DELETE w.* FROM workerTeam w @@ -174,7 +169,6 @@ BEGIN -- Borra los registros de collection y ticketcollection DELETE FROM collection WHERE created < v2Months; - DELETE FROM travelLog WHERE creationDate < v3Months; CALL shelving_clean(); From 3dda49b3c56a1a9f5f542db83393e521e3af9e33 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 28 Aug 2024 08:40:03 +0200 Subject: [PATCH 169/250] fix: refs #pako Deleted duplicated version --- db/versions/11200-brownDendro/00-firstScript.sql | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 db/versions/11200-brownDendro/00-firstScript.sql diff --git a/db/versions/11200-brownDendro/00-firstScript.sql b/db/versions/11200-brownDendro/00-firstScript.sql deleted file mode 100644 index 943368b06..000000000 --- a/db/versions/11200-brownDendro/00-firstScript.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Place your SQL code here -ALTER TABLE vn.saleGroup ADD stateFk TINYINT(3) UNSIGNED; - -ALTER TABLE vn.saleGroup ADD CONSTRAINT saleGroup_state_FK FOREIGN KEY (stateFk) REFERENCES vn.state(id) ON DELETE RESTRICT ON UPDATE CASCADE; From 5b49e7cf459205d691dc28191f4c2ac0f46875be Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 28 Aug 2024 06:51:32 +0000 Subject: [PATCH 170/250] fix(salix): rollback updateClaim --- modules/claim/back/methods/claim/updateClaim.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/claim/back/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js index 10d304496..326192385 100644 --- a/modules/claim/back/methods/claim/updateClaim.js +++ b/modules/claim/back/methods/claim/updateClaim.js @@ -108,7 +108,7 @@ module.exports = Self => { async function notifyStateChange(ctx, workerId, claim, newState) { const models = Self.app.models; - const url = await models.Url.getUrl('lilium'); + const url = await models.Url.getUrl(); const $t = ctx.req.__; const message = $t(`Claim state has changed to`, { @@ -122,7 +122,7 @@ module.exports = Self => { async function notifyPickUp(ctx, workerId, claim) { const models = Self.app.models; - const url = await models.Url.getUrl('lilium'); + const url = await models.Url.getUrl(); const $t = ctx.req.__; // $translate const message = $t('Claim will be picked', { From 27e30c0051cccc01f73e437ee5c10e689145d150 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 28 Aug 2024 09:22:31 +0200 Subject: [PATCH 171/250] fix(salix): redirect with params --- front/core/services/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/core/services/app.js b/front/core/services/app.js index 8cee66ef0..cec7bea7f 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -56,6 +56,8 @@ export default class App { } getUrl(route, appName = 'lilium') { + const index = window.location.hash.indexOf(route.toLowerCase()); + const newRoute = index < 0 ? route : window.location.hash.substring(index); const env = process.env.NODE_ENV; const filter = { where: {and: [ @@ -67,7 +69,7 @@ export default class App { return this.logger.$http.get('Urls/findOne', {filter}) .then(res => { if (res && res.data) - return res.data.url + route; + return res.data.url + newRoute; }) .catch(() => { this.showError('Direction not found'); From 49394b9b165444b8f0509b801a0cf282b556c201 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 28 Aug 2024 09:42:59 +0200 Subject: [PATCH 172/250] fix: change claim --- modules/claim/front/main/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/claim/front/main/index.js b/modules/claim/front/main/index.js index cbbbe0c7e..c921d5a12 100644 --- a/modules/claim/front/main/index.js +++ b/modules/claim/front/main/index.js @@ -7,7 +7,7 @@ export default class Claim extends ModuleMain { } async $onInit() { this.$state.go('home'); - window.location.href = await this.vnApp.getUrl(`Claim/`); + window.location.href = await this.vnApp.getUrl(`claim/`); } } From 423ba8c21836dfe1b111d275f40ac8f4d4742595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Wed, 28 Aug 2024 11:59:46 +0200 Subject: [PATCH 173/250] Hotfix: refs #7213 ticket_isTooLittle group by addressFk --- db/routines/vn/functions/ticket_isTooLittle.sql | 12 ++++++------ .../vn/procedures/ticket_setProblemTooLittle.sql | 15 +++++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/db/routines/vn/functions/ticket_isTooLittle.sql b/db/routines/vn/functions/ticket_isTooLittle.sql index dee1df29b..2752b3f35 100644 --- a/db/routines/vn/functions/ticket_isTooLittle.sql +++ b/db/routines/vn/functions/ticket_isTooLittle.sql @@ -2,7 +2,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`( vSelf INT ) - RETURNS tinyint(1) + RETURNS BOOL READS SQL DATA BEGIN /** @@ -11,20 +11,20 @@ BEGIN * @param vSelf Id ticket * @return BOOL */ - DECLARE vIsTooLittle TINYINT(1); + DECLARE vIsTooLittle BOOL; - WITH tickets AS ( + WITH ticketData AS ( SELECT addressFk, DATE(shipped) dated FROM vn.ticket WHERE id = vSelf ) SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume AND SUM(IFNULL(t.totalWithoutVat, 0)) < vc.minTicketValue) INTO vIsTooLittle - FROM tickets ts - JOIN vn.ticket t ON t.addressFk = ts.addressFk + FROM ticketData td + JOIN vn.ticket t ON t.addressFk = td.addressFk LEFT JOIN vn.saleVolume sv ON sv.ticketFk = t.id JOIN vn.volumeConfig vc - WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated) + WHERE t.shipped BETWEEN td.dated AND util.dayEnd(td.dated) AND ticket_isProblemCalcNeeded(t.id); RETURN vIsTooLittle; diff --git a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql index fe2d3306d..03677a05c 100644 --- a/db/routines/vn/procedures/ticket_setProblemTooLittle.sql +++ b/db/routines/vn/procedures/ticket_setProblemTooLittle.sql @@ -8,22 +8,25 @@ BEGIN * * @param vSelf Id del ticket */ - + DECLARE vTicketIsTooLittle BOOL; + + SELECT ticket_isTooLittle(vSelf) INTO vTicketIsTooLittle; + CREATE OR REPLACE TEMPORARY TABLE tmp.ticket (INDEX(ticketFk, isProblemCalcNeeded)) ENGINE = MEMORY - WITH tickets AS ( + WITH ticketData AS ( SELECT addressFk, DATE(shipped) dated FROM vn.ticket WHERE id = vSelf ) SELECT t.id ticketFk, - ticket_isTooLittle(t.id) hasProblem, + vTicketIsTooLittle hasProblem, ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded FROM vn.ticket t - JOIN tickets ts ON ts.addressFk = t.addressFk - WHERE t.shipped BETWEEN ts.dated AND util.dayEnd(ts.dated); - + JOIN ticketData td ON td.addressFk = t.addressFk + WHERE t.shipped BETWEEN td.dated AND util.dayEnd(td.dated); + CALL ticket_setProblem('isTooLittle'); DROP TEMPORARY TABLE tmp.ticket; From 484bb48d04f99727e4b1c7dc2282b928b7af441c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Wed, 28 Aug 2024 12:33:05 +0200 Subject: [PATCH 174/250] fix: refs #7760 collection problems --- db/routines/vn/procedures/collection_new.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 80c5e6172..18b51c4d3 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -130,7 +130,6 @@ BEGIN JOIN state s ON s.id = pb.state WHERE s.code = 'PICKER_DESIGNED' AND pb.workerCode = vWorkerCode - LIMIT 1 ) INTO vHasAssignedTickets; -- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados From 611fbebd6d6226e9d532df04ceeb7582d78b205e Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 29 Aug 2024 09:35:23 +0200 Subject: [PATCH 175/250] feat: refs #7811 Added new params in datasources.json --- loopback/server/datasources.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/loopback/server/datasources.json b/loopback/server/datasources.json index 341d5d578..b4bf4a79a 100644 --- a/loopback/server/datasources.json +++ b/loopback/server/datasources.json @@ -11,12 +11,17 @@ "port": "3306", "username": "root", "password": "root", + "connectionLimit": 100, + "queueLimit": 100, "multipleStatements": true, "legacyUtcDateProcessing": false, "timezone": "local", "connectTimeout": 40000, "acquireTimeout": 90000, - "waitForConnections": true + "waitForConnections": true, + "handleDisconnects": true, + "maxIdleTime": 60000, + "idleTimeout": 60000 }, "osticket": { "connector": "memory", From 1e3ab2d31a1034183c572ead9ef8a51e60462b50 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 29 Aug 2024 10:07:02 +0200 Subject: [PATCH 176/250] feat: refs #7905 Added param toCsv --- modules/entry/back/methods/entry/getBuys.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index 245dada09..65fb047c6 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -1,5 +1,6 @@ const UserError = require('vn-loopback/util/user-error'); const mergeFilters = require('vn-loopback/util/filter').mergeFilters; +const {toCSV} = require('vn-loopback/util/csv'); module.exports = Self => { Self.remoteMethodCtx('getBuys', { @@ -16,6 +17,11 @@ module.exports = Self => { arg: 'filter', type: 'object', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string' + }, + { + arg: 'toCsv', + type: 'boolean', + description: 'If true, return the data in CSV format' } ], returns: { @@ -28,7 +34,7 @@ module.exports = Self => { } }); - Self.getBuys = async(ctx, id, filter, options) => { + Self.getBuys = async(ctx, id, filter, toCsv, options) => { const userId = ctx.req.accessToken.userId; const models = Self.app.models; const myOptions = {}; @@ -129,6 +135,15 @@ module.exports = Self => { }; defaultFilter = mergeFilters(defaultFilter, filter); - return models.Buy.find(defaultFilter, myOptions); + const data = models.Buy.find(defaultFilter, myOptions); + + if (toCsv) { + return [ + toCSV(data), + 'text/csv', + `attachment; filename="${id}.csv"` + ]; + } else + return data; }; }; From c7777f609b52c1bf347a783a202d9e6239691469 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 29 Aug 2024 10:10:37 +0200 Subject: [PATCH 177/250] feat: refs #7811 Added new params in datasources.json --- loopback/server/datasources.json | 1 - 1 file changed, 1 deletion(-) diff --git a/loopback/server/datasources.json b/loopback/server/datasources.json index b4bf4a79a..f1643e522 100644 --- a/loopback/server/datasources.json +++ b/loopback/server/datasources.json @@ -19,7 +19,6 @@ "connectTimeout": 40000, "acquireTimeout": 90000, "waitForConnections": true, - "handleDisconnects": true, "maxIdleTime": 60000, "idleTimeout": 60000 }, From 72b4607d54344cf49d37d627d0e4a804e0e06927 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 29 Aug 2024 12:19:06 +0200 Subject: [PATCH 178/250] feat: refs #7905 Added new method getBuysCsv --- .../11206-turquoiseCyca/00-firstScript.sql | 2 + modules/entry/back/methods/entry/getBuys.js | 19 +---- .../entry/back/methods/entry/getBuysCsv.js | 75 +++++++++++++++++++ modules/entry/back/models/entry.js | 1 + 4 files changed, 80 insertions(+), 17 deletions(-) create mode 100644 db/versions/11206-turquoiseCyca/00-firstScript.sql create mode 100644 modules/entry/back/methods/entry/getBuysCsv.js diff --git a/db/versions/11206-turquoiseCyca/00-firstScript.sql b/db/versions/11206-turquoiseCyca/00-firstScript.sql new file mode 100644 index 000000000..c1d63fcec --- /dev/null +++ b/db/versions/11206-turquoiseCyca/00-firstScript.sql @@ -0,0 +1,2 @@ +INSERT INTO salix.ACL (model,property,principalId) + VALUES ('Entry','getBuysCsv','supplier'); diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index 65fb047c6..245dada09 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -1,6 +1,5 @@ const UserError = require('vn-loopback/util/user-error'); const mergeFilters = require('vn-loopback/util/filter').mergeFilters; -const {toCSV} = require('vn-loopback/util/csv'); module.exports = Self => { Self.remoteMethodCtx('getBuys', { @@ -17,11 +16,6 @@ module.exports = Self => { arg: 'filter', type: 'object', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string' - }, - { - arg: 'toCsv', - type: 'boolean', - description: 'If true, return the data in CSV format' } ], returns: { @@ -34,7 +28,7 @@ module.exports = Self => { } }); - Self.getBuys = async(ctx, id, filter, toCsv, options) => { + Self.getBuys = async(ctx, id, filter, options) => { const userId = ctx.req.accessToken.userId; const models = Self.app.models; const myOptions = {}; @@ -135,15 +129,6 @@ module.exports = Self => { }; defaultFilter = mergeFilters(defaultFilter, filter); - const data = models.Buy.find(defaultFilter, myOptions); - - if (toCsv) { - return [ - toCSV(data), - 'text/csv', - `attachment; filename="${id}.csv"` - ]; - } else - return data; + return models.Buy.find(defaultFilter, myOptions); }; }; diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js new file mode 100644 index 000000000..76b9cdc57 --- /dev/null +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -0,0 +1,75 @@ +const UserError = require('vn-loopback/util/user-error'); +const {toCSV} = require('vn-loopback/util/csv'); + +module.exports = Self => { + Self.remoteMethodCtx('getBuys', { + description: 'Returns buys for one entry', + accessType: 'READ', + accepts: [{ + arg: 'id', + type: 'number', + required: true, + description: 'The entry id', + http: {source: 'path'} + } + ], + returns: [ + { + arg: 'body', + type: 'file', + root: true + }, { + arg: 'Content-Type', + type: 'String', + http: {target: 'header'} + }, { + arg: 'Content-Disposition', + type: 'String', + http: {target: 'header'} + } + ], + http: { + path: `/:id/getBuysCsv`, + verb: 'GET' + } + }); + + Self.getBuys = async(ctx, id, options) => { + const userId = ctx.req.accessToken.userId; + const models = Self.app.models; + const myOptions = {}; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + const client = await models.Client.findById(userId, myOptions); + const supplier = await models.Supplier.findOne({where: {nif: client.fi}}, myOptions); + if (supplier) { + const isEntryOwner = (await Self.findById(id)).supplierFk === supplier.id; + if (!isEntryOwner) throw new UserError('Access Denied'); + } + + const data = await Self.rawSql(` + SELECT b.id, + b.itemFk, + i.name, + b.stickers, + b.packing, + b.grouping, + b.packing, + b.groupingMode, + b.quantity, + b.packagingFk, + b.weight, + b.buyingValue, + b.price2, + b.price3, + b.printedStickers + FROM buy b + JOIN item i ON i.id = b.itemFk + WHERE b.entryFk = ? + `, [id]); + + return [toCSV(data), 'text/csv', `inline; filename="buys-${id}.csv"`]; + }; +}; diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index b11d64415..8ca79f531 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -3,6 +3,7 @@ module.exports = Self => { require('../methods/entry/filter')(Self); require('../methods/entry/getEntry')(Self); require('../methods/entry/getBuys')(Self); + require('../methods/entry/getBuysCsv')(Self); require('../methods/entry/importBuys')(Self); require('../methods/entry/importBuysPreview')(Self); require('../methods/entry/lastItemBuys')(Self); From e50c67c3058bacb56c7964a0c52dc5d9aaff1109 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 29 Aug 2024 12:22:29 +0200 Subject: [PATCH 179/250] feat: refs #7905 Added new method getBuysCsv --- db/versions/11206-turquoiseCyca/00-firstScript.sql | 2 +- modules/entry/back/methods/entry/getBuysCsv.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/versions/11206-turquoiseCyca/00-firstScript.sql b/db/versions/11206-turquoiseCyca/00-firstScript.sql index c1d63fcec..ab6b35a0f 100644 --- a/db/versions/11206-turquoiseCyca/00-firstScript.sql +++ b/db/versions/11206-turquoiseCyca/00-firstScript.sql @@ -1,2 +1,2 @@ -INSERT INTO salix.ACL (model,property,principalId) +INSERT IGNORE INTO salix.ACL (model,property,principalId) VALUES ('Entry','getBuysCsv','supplier'); diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js index 76b9cdc57..541179a1d 100644 --- a/modules/entry/back/methods/entry/getBuysCsv.js +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -2,8 +2,8 @@ const UserError = require('vn-loopback/util/user-error'); const {toCSV} = require('vn-loopback/util/csv'); module.exports = Self => { - Self.remoteMethodCtx('getBuys', { - description: 'Returns buys for one entry', + Self.remoteMethodCtx('getBuysCsv', { + description: 'Returns buys for one entry in CSV file format', accessType: 'READ', accepts: [{ arg: 'id', @@ -34,7 +34,7 @@ module.exports = Self => { } }); - Self.getBuys = async(ctx, id, options) => { + Self.getBuysCsv = async(ctx, id, options) => { const userId = ctx.req.accessToken.userId; const models = Self.app.models; const myOptions = {}; From 4e52f344f4d947e8261a285f7d2dd4a85c5b677d Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 30 Aug 2024 09:14:21 +0200 Subject: [PATCH 180/250] feat: refs #7811 Added comment --- loopback/server/connectors/vn-mysql.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js index 5edef4395..2012caf37 100644 --- a/loopback/server/connectors/vn-mysql.js +++ b/loopback/server/connectors/vn-mysql.js @@ -342,6 +342,9 @@ exports.initialize = function initialize(dataSource, callback) { } }; +// Code extracted from original Loopback MySQL connector +// since it cannot be reused, please try not to alter it. +// https://github.com/loopbackio/loopback-connector-mysql/blob/v6.2.0/lib/mysql.js MySQL.prototype.connect = function(callback) { const self = this; const options = generateOptions(this.settings); From 0f4bc3f83b33e320bdd7cd748d1e26716902f45c Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 30 Aug 2024 09:42:50 +0200 Subject: [PATCH 181/250] feat(salix): refs #7905 #7905 use getBuys toCSV flattened --- loopback/util/flatten.js | 28 ++++++++ .../entry/back/methods/entry/getBuysCsv.js | 65 ++++++++----------- 2 files changed, 56 insertions(+), 37 deletions(-) create mode 100644 loopback/util/flatten.js diff --git a/loopback/util/flatten.js b/loopback/util/flatten.js new file mode 100644 index 000000000..90e9184b7 --- /dev/null +++ b/loopback/util/flatten.js @@ -0,0 +1,28 @@ + +function flatten(dataArray) { + return dataArray.map(item => flatten(item.__data)); +} +function flattenObj(data, prefix = '') { + let result = {}; + try { + for (let key in data) { + if (!data[key]) continue; + + const newKey = prefix ? `${prefix}_${key}` : key; + const value = data[key]; + + if (typeof value === 'object' && value !== null && !Array.isArray(value)) + Object.assign(result, flattenObj(value.__data, newKey)); + else + result[newKey] = value; + } + } catch (error) { + console.error(error); + } + + return result; +} +module.exports = { + flatten, + flattenObj, +}; diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js index 541179a1d..647f41d22 100644 --- a/modules/entry/back/methods/entry/getBuysCsv.js +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -1,5 +1,5 @@ -const UserError = require('vn-loopback/util/user-error'); const {toCSV} = require('vn-loopback/util/csv'); +const {flatten} = require('vn-loopback/util/flatten'); module.exports = Self => { Self.remoteMethodCtx('getBuysCsv', { @@ -35,41 +35,32 @@ module.exports = Self => { }); Self.getBuysCsv = async(ctx, id, options) => { - const userId = ctx.req.accessToken.userId; - const models = Self.app.models; - const myOptions = {}; - - if (typeof options == 'object') - Object.assign(myOptions, options); - - const client = await models.Client.findById(userId, myOptions); - const supplier = await models.Supplier.findOne({where: {nif: client.fi}}, myOptions); - if (supplier) { - const isEntryOwner = (await Self.findById(id)).supplierFk === supplier.id; - if (!isEntryOwner) throw new UserError('Access Denied'); - } - - const data = await Self.rawSql(` - SELECT b.id, - b.itemFk, - i.name, - b.stickers, - b.packing, - b.grouping, - b.packing, - b.groupingMode, - b.quantity, - b.packagingFk, - b.weight, - b.buyingValue, - b.price2, - b.price3, - b.printedStickers - FROM buy b - JOIN item i ON i.id = b.itemFk - WHERE b.entryFk = ? - `, [id]); - - return [toCSV(data), 'text/csv', `inline; filename="buys-${id}.csv"`]; + const data = await Self.getBuys(ctx, id, null, options); + const dataFlatted = flatten(data); + return [toCSV(dataFlatted), 'text/csv', `inline; filename="buys-${id}.csv"`]; }; }; +// function flattenJSON(dataArray) { +// return dataArray.map(item => flatten(item.__data)); +// } +// function flatten(data, prefix = '') { +// let result = {}; +// try { +// for (let key in data) { +// if (!data[key]) continue; + +// const newKey = prefix ? `${prefix}_${key}` : key; +// const value = data[key]; + +// if (typeof value === 'object' && value !== null && !Array.isArray(value)) +// Object.assign(result, flatten(value.__data, newKey)); +// else +// result[newKey] = value; +// } +// } catch (error) { +// console.error(error); +// } + +// return result; +// } + From b451641d47b314e23955f76be90799ca9546a5e0 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 11:49:39 +0200 Subject: [PATCH 182/250] fix: refs #6897 fix filter --- modules/entry/back/methods/entry/filter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index dcb1e3158..776544bc6 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -109,6 +109,11 @@ module.exports = Self => { arg: 'days', type: 'number', description: `N days interval` + }, + { + arg: 'invoiceAmount', + type: 'number', + description: `The invoice amount` } ], returns: { @@ -192,6 +197,7 @@ module.exports = Self => { e.companyFk, e.gestDocFk, e.invoiceInFk, + e.invoiceAmount, t.landed, s.name supplierName, s.nickname supplierAlias, From e8010d0f18fcbc88a0c1f1150be2142384084020 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:10:33 +0200 Subject: [PATCH 183/250] fix: refs #6897 fix json --- modules/entry/back/models/entry.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index 833edf14d..383585fce 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -74,6 +74,9 @@ }, "observationEditorFk": { "type": "number" + }, + "invoiceAmount": { + "type": "number" } }, "relations": { @@ -108,4 +111,4 @@ "foreignKey": "typeFk" } } -} \ No newline at end of file +} From 26d93ef474cd1f2c1d6e94029f0792fc5ec295f9 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:35:10 +0200 Subject: [PATCH 184/250] fix: refs #6897 travel filter --- modules/travel/back/methods/travel/filter.js | 11 +++++++++++ modules/travel/back/models/travel.json | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js index 3fa1d65f9..b7fadc8f2 100644 --- a/modules/travel/back/methods/travel/filter.js +++ b/modules/travel/back/methods/travel/filter.js @@ -71,7 +71,16 @@ module.exports = Self => { arg: 'continent', type: 'string', description: 'The continent code' + }, { + arg: 'shipmentHour', + type: 'time', + description: 'The shipment hour' }, + { + arg: 'landingHour', + type: 'time', + description: 'The landing hour' + } ], returns: { type: ['Object'], @@ -130,6 +139,8 @@ module.exports = Self => { t.isReceived, t.m3, t.kg, + t.shipmentHour, + t.landingHour, t.cargoSupplierFk, t.totalEntries, am.name agencyModeName, diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index 701894a76..d0153e044 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -44,8 +44,13 @@ }, "agencyModeFk": { "type": "number" - } - }, + }, + "shipmentHour": { + "type": "time" + }, + "landingHour": { + "type": "time" + }, "relations": { "agency": { "type": "belongsTo", From f65d36011b5ce9a2b5b5aeb4d3fbe9f4a8037bf4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:40:37 +0200 Subject: [PATCH 185/250] fix: refs #6897 back --- modules/travel/back/models/travel.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index d0153e044..46d24f975 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -46,10 +46,10 @@ "type": "number" }, "shipmentHour": { - "type": "time" + "type": "string" }, "landingHour": { - "type": "time" + "type": "string" }, "relations": { "agency": { @@ -69,3 +69,4 @@ } } } +} From 7b1a34e249e7e9743e712e93f6f0af9683007260 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 30 Aug 2024 12:47:05 +0200 Subject: [PATCH 186/250] feat: refs #7860 Update new packagings --- db/versions/11208-limeRoebelini/00-firstScript.vn.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/versions/11208-limeRoebelini/00-firstScript.vn.sql diff --git a/db/versions/11208-limeRoebelini/00-firstScript.vn.sql b/db/versions/11208-limeRoebelini/00-firstScript.vn.sql new file mode 100644 index 000000000..22b3dc924 --- /dev/null +++ b/db/versions/11208-limeRoebelini/00-firstScript.vn.sql @@ -0,0 +1,7 @@ +UPDATE vn.packaging SET id='25E' WHERE id='cactus200'; +UPDATE vn.packaging SET id='35E' WHERE id='kalan330'; +UPDATE vn.packaging SET id='45E' WHERE id='kalan400'; +UPDATE vn.packaging SET id='60E' WHERE id='kalan577'; +UPDATE vn.packaging SET id='60A' WHERE id='guzma650'; +UPDATE vn.packaging SET id='120A' WHERE id='guzma1200'; +UPDATE vn.packaging SET id='140A' WHERE id='guzma1400'; From 4a7d81f920570210b370f57856122127e679a2f8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:53:44 +0200 Subject: [PATCH 187/250] fix: refs #6897 back and tests --- modules/travel/back/methods/travel/filter.js | 7 +++---- modules/travel/back/models/travel.json | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js index b7fadc8f2..9f26423ce 100644 --- a/modules/travel/back/methods/travel/filter.js +++ b/modules/travel/back/methods/travel/filter.js @@ -73,12 +73,11 @@ module.exports = Self => { description: 'The continent code' }, { arg: 'shipmentHour', - type: 'time', + type: 'string', description: 'The shipment hour' - }, - { + }, { arg: 'landingHour', - type: 'time', + type: 'string', description: 'The landing hour' } ], diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index 46d24f975..0ebf683e7 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -50,7 +50,8 @@ }, "landingHour": { "type": "string" - }, + } + }, "relations": { "agency": { "type": "belongsTo", @@ -69,4 +70,4 @@ } } } -} + From 3da6a700ae97694b6aa27342a52a6f5dd33be34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 30 Aug 2024 13:08:15 +0200 Subject: [PATCH 188/250] fix: refs #7213 problem rounding --- .../sale_setProblemRoundingByBuy.sql | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql diff --git a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql new file mode 100644 index 000000000..cb7322c22 --- /dev/null +++ b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql @@ -0,0 +1,71 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRoundingByBuy`( + vBuyFk INT +) +/** + * Update rounding problem for all sales related to a buy + * @param vBuyFk Id buy + */ + DECLARE vItemFk INT, + DECLARE vWareHouseFk INT + DECLARE vMaxDated DATE; + DECLARE vMinDated DATE; + DECLARE vLanding DATE; + DECLARE vLastBuy INT; + DECLARE vCurrentBuy INT; + DECLARE vGrouping INT; + + SELECT b.itemFk, t.warehouseInFk + INTO vItemFk, vWareHouseFk + FROM vn.buy b + JOIN vn.entry e ON e.id = b.entryFk + JOIN vn.travel t ON t.id = e.travelFk + WHERE b.id = vBuyFk; + + SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped)) + INTO vMaxDated, vMinDated + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + WHERE t.shipped >= CURDATE() + AND s.itemFk = vItemFk + AND s.quantity > 0; + + CALL buy_getUltimate(vItemFk, vWareHouseFk, vMinDated); + + SELECT bu.buyFk, b.grouping INTO vLastBuy, vGrouping + FROM tmp.buyUltimate bu + JOIN buy b ON b.id = bu.buyFk; + + DROP TEMPORARY TABLE tmp.buyUltimate; + + SET vLanding = vMaxDated; + + WHILE vCurrentBuy <> vLastBuy OR vLanding > vMinDated DO + SET vMaxDated = vLanding - INTERVAL 1 DAY; + + CALL buy_getUltimate(vItemFk, vWareHouseFk, vMaxDated); + + SELECT buyFk, landing + INTO vCurrentBuy, vLanding + FROM tmp.buyUltimate; + + DROP TEMPORARY TABLE tmp.buyUltimate; + END WHILE; + + CREATE OR REPLACE TEMPORARY TABLE tmp.sale + (INDEX(saleFk, isProblemCalcNeeded)) + SELECT s.id saleFk , + MOD(s.quantity, vGrouping) hasProblem, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + WHERE s.itemFk = vItemFk + AND s.quantity > 0 + AND t.shipped BETWEEN vMinDated + AND util.dayEnd(vMaxDated); + + CALL sale_setProblem('hasRounding'); + + DROP TEMPORARY TABLE tmp.sale; +END$$ +DELIMITER ; \ No newline at end of file From beb54aedf85ca6f83e867a6e1564691b262199b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 30 Aug 2024 13:14:45 +0200 Subject: [PATCH 189/250] fix: refs #7213 problem rounding --- db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql index cb7322c22..60b495a75 100644 --- a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql +++ b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql @@ -2,12 +2,13 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRoundingByBuy`( vBuyFk INT ) +BEGIN /** * Update rounding problem for all sales related to a buy * @param vBuyFk Id buy */ - DECLARE vItemFk INT, - DECLARE vWareHouseFk INT + DECLARE vItemFk INT; + DECLARE vWareHouseFk INT; DECLARE vMaxDated DATE; DECLARE vMinDated DATE; DECLARE vLanding DATE; From 51535bfa6b6ee895145ca16f1b4916e18875db70 Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 30 Aug 2024 13:50:51 +0200 Subject: [PATCH 190/250] feat: refs #7277 refundInvoices --- db/dump/.dump/data.sql | 2 +- .../11207-turquoiseMastic/00-firstScript.sql | 2 + .../methods/client/specs/consumption.spec.js | 2 +- .../back/methods/invoiceOut/invoiceClient.js | 14 +- .../methods/invoiceOut/refundAndInvoice.js | 89 +++++++++++ .../invoiceOut/specs/makePdfAndNotify.spec.js | 105 +++++++++++++ .../invoiceOut/specs/refundAndInvoice.spec.js | 46 ++++++ .../methods/invoiceOut/specs/transfer.spec.js | 146 ++++++++++++++++++ .../invoiceOut/specs/transferinvoice.spec.js | 116 -------------- .../back/methods/invoiceOut/transfer.js | 114 ++++++++++++++ .../methods/invoiceOut/transferInvoice.js | 131 ---------------- modules/invoiceOut/back/models/invoice-out.js | 3 +- .../invoiceOut/front/descriptor-menu/index.js | 3 +- .../ticket/back/methods/ticket/cloneAll.js | 5 +- 14 files changed, 520 insertions(+), 258 deletions(-) create mode 100644 db/versions/11207-turquoiseMastic/00-firstScript.sql create mode 100644 modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js create mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js create mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js create mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js delete mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js create mode 100644 modules/invoiceOut/back/methods/invoiceOut/transfer.js delete mode 100644 modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql index 37e7835fc..db8a25b76 100644 --- a/db/dump/.dump/data.sql +++ b/db/dump/.dump/data.sql @@ -1922,7 +1922,7 @@ INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimV INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL); -INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (750,'InvoiceOut','transfer','WRITE','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL); diff --git a/db/versions/11207-turquoiseMastic/00-firstScript.sql b/db/versions/11207-turquoiseMastic/00-firstScript.sql new file mode 100644 index 000000000..d1fd184aa --- /dev/null +++ b/db/versions/11207-turquoiseMastic/00-firstScript.sql @@ -0,0 +1,2 @@ +INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) + VALUES ('InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative'); diff --git a/modules/client/back/methods/client/specs/consumption.spec.js b/modules/client/back/methods/client/specs/consumption.spec.js index 85dbb7422..dd2037541 100644 --- a/modules/client/back/methods/client/specs/consumption.spec.js +++ b/modules/client/back/methods/client/specs/consumption.spec.js @@ -1,6 +1,6 @@ const models = require('vn-loopback/server/server').models; -describe('client consumption() filter', () => { +fdescribe('client consumption() filter', () => { it('should return a list of buyed items by ticket', async() => { const tx = await models.Client.beginTransaction({}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index 2c44cef34..bf7e7d3cb 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -47,12 +47,16 @@ module.exports = Self => { Self.invoiceClient = async(ctx, options) => { const args = ctx.args; const models = Self.app.models; - options = typeof options === 'object' ? {...options} : {}; - options.userId = ctx.req.accessToken.userId; - let tx; - if (!options.transaction) - tx = options.transaction = await Self.beginTransaction({}); + const myOptions = {userId: ctx.req.accessToken.userId}; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } const minShipped = Date.vnNew(); minShipped.setFullYear(args.maxShipped.getFullYear() - 1); diff --git a/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js new file mode 100644 index 000000000..7c7788459 --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js @@ -0,0 +1,89 @@ +module.exports = Self => { + Self.remoteMethodCtx('refundAndInvoice', { + description: 'Refund an invoice and create a new one', + accessType: 'WRITE', + accepts: [ + { + arg: 'id', + type: 'number', + required: true, + description: 'Issued invoice id' + }, + { + arg: 'cplusRectificationTypeFk', + type: 'number', + required: true + }, + { + arg: 'siiTypeInvoiceOutFk', + type: 'number', + required: true + }, + { + arg: 'invoiceCorrectionTypeFk', + type: 'number', + required: true + }, + ], + returns: { + type: 'object', + root: true + }, + http: { + path: '/refundAndInvoice', + verb: 'post' + } + }); + + Self.refundAndInvoice = async( + ctx, + id, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + options + ) => { + const models = Self.app.models; + const myOptions = {userId: ctx.req.accessToken.userId}; + let refundId; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + let tx; + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } + + try { + const originalInvoice = await models.InvoiceOut.findById(id, myOptions); + + const refundedTickets = await Self.refund(ctx, originalInvoice.ref, false, myOptions); + + const invoiceCorrection = { + correctedFk: id, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk + }; + const ticketIds = refundedTickets.map(ticket => ticket.id); + refundId = await models.Ticket.invoiceTickets(ctx, ticketIds, invoiceCorrection, myOptions); + + tx && await tx.commit(); + } catch (e) { + if (tx) await tx.rollback(); + throw e; + } + + if (tx) { + try { + await models.InvoiceOut.makePdfList(ctx, refundId); + } catch (e) { + throw new UserError('The invoices have been created but the PDFs could not be generated'); + } + } + + return {refundId}; + }; +}; diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js new file mode 100644 index 000000000..0d73eba88 --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js @@ -0,0 +1,105 @@ +const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); +const UserError = require('vn-loopback/util/user-error'); + +fdescribe('InvoiceOut makePdfAndNotify()', () => { + const userId = 5; + const ctx = { + req: { + accessToken: {userId}, + __: (key, obj) => `Translated: ${key}, ${JSON.stringify(obj)}`, + getLocale: () => 'es' + }, + args: {} + }; + const activeCtx = {accessToken: {userId}}; + const id = 4; + const printerFk = 1; + + beforeEach(() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); + }); + + it('should generate PDF and send email when client is to be mailed', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + await models.InvoiceOut.makePdfAndNotify(ctx, id, printerFk, options); + + const invoice = await models.InvoiceOut.findById(id, { + fields: ['ref', 'clientFk'], + include: { + relation: 'client', + scope: { + fields: ['id', 'email', 'isToBeMailed', 'salesPersonFk'] + } + } + }, options); + + expect(invoice).toBeDefined(); + expect(invoice.client().isToBeMailed).toBe(true); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); + + it('should generate PDF and print when client is not to be mailed', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + await models.InvoiceOut.makePdfAndNotify(ctx, id, null, options); + + const invoice = await models.InvoiceOut.findById(id, { + fields: ['ref', 'clientFk'], + include: { + relation: 'client', + scope: { + fields: ['id', 'email', 'isToBeMailed', 'salesPersonFk'] + } + } + }, options); + + expect(invoice).toBeDefined(); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); + + it('should throw UserError when PDF generation fails', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + await models.InvoiceOut.makePdfAndNotify(ctx, null, null, options); + await tx.rollback(); + } catch (e) { + expect(e instanceof UserError).toBe(true); + expect(e.message).toContain('Error while generating PDF'); + await tx.rollback(); + } + }); + + it('should send message to salesperson when email fails', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + spyOn(models.InvoiceOut, 'invoiceEmail').and.rejectWith(new Error('Test Error')); + await models.InvoiceOut.makePdfAndNotify(ctx, id, null, options); + await tx.rollback(); + } catch (e) { + expect(e instanceof UserError).toBe(true); + expect(e.message).toContain('Error when sending mail to client'); + + await tx.rollback(); + } + }); +}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js new file mode 100644 index 000000000..46cc4458b --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js @@ -0,0 +1,46 @@ +const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); + +describe('InvoiceOut refundAndInvoice()', () => { + const userId = 5; + const ctx = {req: {accessToken: {userId}}}; + const activeCtx = {accessToken: {userId}}; + const id = 4; + const cplusRectificationTypeFk = 1; + const siiTypeInvoiceOutFk = 1; + const invoiceCorrectionTypeFk = 1; + + beforeEach(() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); + }); + + fit('should refund an invoice and create a new invoice', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + const result = await models.InvoiceOut.refundAndInvoice( + ctx, + id, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + options + ); + + expect(result).toBeDefined(); + expect(result.refundId).toBeDefined(); + + const invoicesAfter = await models.InvoiceOut.find({where: {id: result.refundId}}, options); + const ticketsAfter = await models.Ticket.find({where: {refFk: 'R10100001'}}, options); + + expect(invoicesAfter.length).toBeGreaterThan(0); + expect(ticketsAfter.length).toBeGreaterThan(0); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); +}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js new file mode 100644 index 000000000..2c9d46930 --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -0,0 +1,146 @@ +const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); +const UserError = require('vn-loopback/util/user-error'); + +fdescribe('InvoiceOut transfer()', () => { + const userId = 5; + const ctx = { + req: { + accessToken: {userId}, + __: (key, obj) => `Translated: ${key}, ${JSON.stringify(obj)}`, + getLocale: () => 'es' + }, + args: {} + }; + const activeCtx = {accessToken: {userId}}; + const id = 4; + const newClientFk = 1101; + const cplusRectificationTypeFk = 1; + const siiTypeInvoiceOutFk = 1; + const invoiceCorrectionTypeFk = 1; + + beforeEach(() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); + }); + + it('should transfer an invoice to a new client and return the new invoice ID', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + const makeInvoice = true; + + try { + const result = await models.InvoiceOut.transfer( + ctx, + id, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice + ); + + const newInvoice = await models.InvoiceOut.findById(result, options); + + expect(newInvoice.clientFk).toBe(newClientFk); + + const transferredTickets = await models.Ticket.find({ + where: { + invoiceOutFk: result, + clientFk: newClientFk + } + }, options); + + expect(transferredTickets.length).toBeGreaterThan(0); + + if (tx) await tx.rollback(); + } catch (e) { + if (tx) await tx.rollback(); + throw e; + } + }); + + it('should throw an error if original invoice is not found', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + const makeInvoice = true; + try { + await models.InvoiceOut.transfer( + ctx, + 'idNotExists', + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice, + options + ); + fail('Expected an error to be thrown'); + } catch (e) { + expect(e).toBeInstanceOf(UserError); + expect(e.message).toBe('Original invoice not found'); + await tx.rollback(); + } + }); + + it('should throw an error if the new client is the same as the original client', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + const makeInvoice = true; + const originalInvoice = await models.InvoiceOut.findById(id); + + try { + await models.InvoiceOut.transfer( + ctx, + id, + originalInvoice.clientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice, + options + ); + fail('Expected an error to be thrown'); + } catch (e) { + expect(e).toBeInstanceOf(UserError); + expect(e.message).toBe('Select a different client'); + await tx.rollback(); + } + }); + + fit('should not create a new invoice if makeInvoice is false', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + + try { + const originalTickets = await models.Ticket.find({ + where: {clientFk: newClientFk, invoiceOutFk: null}, + options + }); + + const result = await models.InvoiceOut.transfer( + ctx, + id, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + false, + options + ); + + expect(result).toBeUndefined(); + + const transferredTickets = await models.Ticket.find({ + where: {clientFk: newClientFk, invoiceOutFk: null}, + options + }); + + expect(transferredTickets.length).toBeGreaterThan(originalTickets.length); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); +}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js deleted file mode 100644 index 22787e730..000000000 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transferinvoice.spec.js +++ /dev/null @@ -1,116 +0,0 @@ -const models = require('vn-loopback/server/server').models; -const LoopBackContext = require('loopback-context'); - -describe('InvoiceOut transferInvoice()', () => { - const activeCtx = { - accessToken: {userId: 5}, - http: { - req: { - headers: {origin: 'http://localhost'} - } - } - }; - const ctx = {req: activeCtx}; - - beforeEach(() => { - spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ - active: activeCtx - }); - }); - - it('should return the id of the created issued invoice', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - const id = 4; - const newClient = 1; - spyOn(models.InvoiceOut, 'makePdfList'); - - try { - const {clientFk: oldClient} = await models.InvoiceOut.findById(id, {fields: ['clientFk']}); - const invoicesBefore = await models.InvoiceOut.find({}, options); - const result = await models.InvoiceOut.transferInvoice( - ctx, - id, - 'T4444444', - newClient, - 1, - 1, - 1, - true, - options); - const invoicesAfter = await models.InvoiceOut.find({}, options); - const rectificativeInvoice = invoicesAfter[invoicesAfter.length - 2]; - const newInvoice = invoicesAfter[invoicesAfter.length - 1]; - - expect(result).toBeDefined(); - expect(invoicesAfter.length - invoicesBefore.length).toEqual(2); - expect(rectificativeInvoice.clientFk).toEqual(oldClient); - expect(newInvoice.clientFk).toEqual(newClient); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } - }); - - it('should throw an error when it is the same client', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - spyOn(models.InvoiceOut, 'makePdfList'); - - try { - await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1101, 1, 1, 1, true, options); - await tx.rollback(); - } catch (e) { - expect(e.message).toBe(`Select a different client`); - await tx.rollback(); - } - }); - - it('should throw an error when it is refund', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - spyOn(models.InvoiceOut, 'makePdfList'); - try { - await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, true, options); - await tx.rollback(); - } catch (e) { - expect(e.message).toContain(`This ticket is already a refund`); - await tx.rollback(); - } - }); - - it('should throw an error when pdf failed', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - spyOn(models.InvoiceOut, 'makePdfList').and.returnValue(() => { - throw new Error('test'); - }); - - try { - await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, true, options); - await tx.rollback(); - } catch (e) { - expect(e.message).toContain(`It has been invoiced but the PDF could not be generated`); - await tx.rollback(); - } - }); - - it('should not generate an invoice', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - spyOn(models.InvoiceOut, 'makePdfList'); - - let response; - try { - response = await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, false, options); - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } - - expect(response).not.toBeDefined(); - }); -}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/transfer.js b/modules/invoiceOut/back/methods/invoiceOut/transfer.js new file mode 100644 index 000000000..8f6e9dfee --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/transfer.js @@ -0,0 +1,114 @@ +const UserError = require('vn-loopback/util/user-error'); + +module.exports = Self => { + Self.remoteMethodCtx('transfer', { + description: 'Transfer an issued invoice to another client', + accessType: 'WRITE', + accepts: [ + { + arg: 'id', + type: 'number', + required: true, + description: 'Issued invoice id' + }, + { + arg: 'newClientFk', + type: 'number', + required: true + }, + { + arg: 'cplusRectificationTypeFk', + type: 'number', + required: true + }, + { + arg: 'siiTypeInvoiceOutFk', + type: 'number', + required: true + }, + { + arg: 'invoiceCorrectionTypeFk', + type: 'number', + required: true + }, + { + arg: 'makeInvoice', + type: 'boolean', + required: true + }, + ], + returns: {type: 'object', root: true}, + http: {path: '/transfer', verb: 'post'} + }); + + Self.transfer = async( + ctx, + id, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice, + options + ) => { + const models = Self.app.models; + let tx; + const myOptions = {}; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } + + const originalInvoice = await models.InvoiceOut.findById(id); + if (!originalInvoice) + throw new UserError('Original invoice not found'); + + if (originalInvoice.clientFk === newClientFk) + throw new UserError('Select a different client'); + + let transferredInvoiceId; + try { + await Self.refundAndInvoice( + ctx, + id, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + myOptions + ); + + const tickets = await models.Ticket.find({where: {refFk: originalInvoice.ref}}, myOptions); + const ticketIds = tickets.map(ticket => ticket.id); + const transferredTickets = await models.Ticket.cloneAll(ctx, ticketIds, false, false, myOptions); + + const transferredTicketIds = transferredTickets.map(ticket => ticket.id); + await models.Ticket.updateAll( + {id: {inq: transferredTicketIds}}, + {clientFk: newClientFk}, + myOptions + ); + + if (makeInvoice) + transferredInvoiceId = await models.Ticket.invoiceTickets(ctx, transferredTicketIds, null, myOptions); + + if (tx) await tx.commit(); + } catch (e) { + if (tx) await tx.rollback(); + throw e; + } + + if (transferredInvoiceId) { + try { + await models.InvoiceOut.makePdfList(ctx, transferredInvoiceId); + } catch (e) { + throw new UserError('The transferred invoice has been created but the PDF could not be generated'); + } + } + + return transferredInvoiceId; + }; +}; diff --git a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js deleted file mode 100644 index c31f381d9..000000000 --- a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js +++ /dev/null @@ -1,131 +0,0 @@ -const UserError = require('vn-loopback/util/user-error'); - -module.exports = Self => { - Self.remoteMethodCtx('transferInvoice', { - description: 'Transfer an issued invoice to another client', - accessType: 'WRITE', - accepts: [ - { - arg: 'id', - type: 'number', - required: true, - description: 'Issued invoice id' - }, - { - arg: 'refFk', - type: 'string', - required: true - }, - { - arg: 'newClientFk', - type: 'number', - required: true - }, - { - arg: 'cplusRectificationTypeFk', - type: 'number', - required: true - }, - { - arg: 'siiTypeInvoiceOutFk', - type: 'number', - required: true - }, - { - arg: 'invoiceCorrectionTypeFk', - type: 'number', - required: true - }, - { - arg: 'makeInvoice', - type: 'boolean', - required: true - }, - ], - returns: { - type: 'object', - root: true - }, - http: { - path: '/transferInvoice', - verb: 'post' - } - }); - - Self.transferInvoice = async( - ctx, - id, - refFk, - newClientFk, - cplusRectificationTypeFk, - siiTypeInvoiceOutFk, - invoiceCorrectionTypeFk, - makeInvoice, - options - ) => { - const models = Self.app.models; - const myOptions = {userId: ctx.req.accessToken.userId}; - let invoiceId; - let refundId; - - let tx; - if (typeof options == 'object') - Object.assign(myOptions, options); - - const {clientFk} = await models.InvoiceOut.findById(id); - - if (clientFk == newClientFk) - throw new UserError(`Select a different client`); - - if (!myOptions.transaction) { - tx = await Self.beginTransaction({}); - myOptions.transaction = tx; - } - try { - const tickets = await models.Ticket.find({where: {refFk}}, myOptions); - const ticketsIds = tickets.map(ticket => ticket.id); - const refundTickets = await models.Ticket.cloneAll(ctx, ticketsIds, false, true, myOptions); - - const clonedTickets = await models.Ticket.cloneAll(ctx, ticketsIds, false, false, myOptions); - - const clonedTicketIds = []; - - for (const clonedTicket of clonedTickets) { - await clonedTicket.updateAttribute('clientFk', newClientFk, myOptions); - clonedTicketIds.push(clonedTicket.id); - } - - const invoiceCorrection = { - correctedFk: id, - cplusRectificationTypeFk, - siiTypeInvoiceOutFk, - invoiceCorrectionTypeFk - }; - const refundTicketIds = refundTickets.map(ticket => ticket.id); - - refundId = await models.Ticket.invoiceTickets(ctx, refundTicketIds, invoiceCorrection, myOptions); - - if (makeInvoice) - invoiceId = await models.Ticket.invoiceTickets(ctx, clonedTicketIds, null, myOptions); - - tx && await tx.commit(); - } catch (e) { - if (tx) await tx.rollback(); - throw e; - } - - if (tx && makeInvoice) { - try { - await models.InvoiceOut.makePdfList(ctx, invoiceId); - } catch (e) { - throw new UserError('It has been invoiced but the PDF could not be generated'); - } - try { - await models.InvoiceOut.makePdfList(ctx, refundId); - } catch (e) { - throw new UserError('It has been invoiced but the PDF of refund not be generated'); - } - } - return invoiceId; - }; -}; diff --git a/modules/invoiceOut/back/models/invoice-out.js b/modules/invoiceOut/back/models/invoice-out.js index b0e05b626..47dbcbea4 100644 --- a/modules/invoiceOut/back/models/invoice-out.js +++ b/modules/invoiceOut/back/models/invoice-out.js @@ -26,7 +26,8 @@ module.exports = Self => { require('../methods/invoiceOut/getInvoiceDate')(Self); require('../methods/invoiceOut/negativeBases')(Self); require('../methods/invoiceOut/negativeBasesCsv')(Self); - require('../methods/invoiceOut/transferInvoice')(Self); + require('../methods/invoiceOut/transfer')(Self); + require('../methods/invoiceOut/refundAndInvoice')(Self); Self.filePath = async function(id, options) { const fields = ['ref', 'issued']; diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js index 07a0f1768..136b12517 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -137,7 +137,6 @@ class Controller extends Section { transferInvoice() { const params = { - id: this.invoiceOut.id, refFk: this.invoiceOut.ref, newClientFk: this.clientId, cplusRectificationTypeFk: this.cplusRectificationType, @@ -155,7 +154,7 @@ class Controller extends Section { return; } - this.$http.post(`InvoiceOuts/transferInvoice`, params).then(res => { + this.$http.post(`InvoiceOuts/transfer`, params).then(res => { const invoiceId = res.data; this.vnApp.showSuccess(this.$t('Transferred invoice')); this.$state.go('invoiceOut.card.summary', {id: invoiceId}); diff --git a/modules/ticket/back/methods/ticket/cloneAll.js b/modules/ticket/back/methods/ticket/cloneAll.js index cf99a7edc..29d45615f 100644 --- a/modules/ticket/back/methods/ticket/cloneAll.js +++ b/modules/ticket/back/methods/ticket/cloneAll.js @@ -35,8 +35,11 @@ module.exports = Self => { Self.cloneAll = async(ctx, ticketsIds, withWarehouse, negative, options) => { const models = Self.app.models; - const myOptions = typeof options == 'object' ? {...options} : {}; let tx; + const myOptions = {}; + + if (typeof options == 'object') + Object.assign(myOptions, options); if (!myOptions.transaction) { tx = await Self.beginTransaction({}); From c45a861ef4d2553eae7a6241ced1e23d53d9b3bb Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 30 Aug 2024 13:51:36 +0200 Subject: [PATCH 191/250] feat: refs #7277 fdescribe --- .../invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js index 2c9d46930..6ef6783cc 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -2,7 +2,7 @@ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); const UserError = require('vn-loopback/util/user-error'); -fdescribe('InvoiceOut transfer()', () => { +describe('InvoiceOut transfer()', () => { const userId = 5; const ctx = { req: { From ac36762e21576f626b104c213651b1554fe5326d Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 30 Aug 2024 13:56:07 +0200 Subject: [PATCH 192/250] feat: refs #7277 fdescribe --- modules/client/back/methods/client/specs/consumption.spec.js | 2 +- .../back/methods/invoiceOut/specs/makePdfAndNotify.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/client/back/methods/client/specs/consumption.spec.js b/modules/client/back/methods/client/specs/consumption.spec.js index dd2037541..85dbb7422 100644 --- a/modules/client/back/methods/client/specs/consumption.spec.js +++ b/modules/client/back/methods/client/specs/consumption.spec.js @@ -1,6 +1,6 @@ const models = require('vn-loopback/server/server').models; -fdescribe('client consumption() filter', () => { +describe('client consumption() filter', () => { it('should return a list of buyed items by ticket', async() => { const tx = await models.Client.beginTransaction({}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js index 0d73eba88..002face07 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/makePdfAndNotify.spec.js @@ -2,7 +2,7 @@ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); const UserError = require('vn-loopback/util/user-error'); -fdescribe('InvoiceOut makePdfAndNotify()', () => { +describe('InvoiceOut makePdfAndNotify()', () => { const userId = 5; const ctx = { req: { From 2e3fb7646f2ba69402c3535fc14781919e28a46e Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 30 Aug 2024 14:03:02 +0200 Subject: [PATCH 193/250] feat: refs #7277 fit --- .../invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js index 6ef6783cc..5aeb92ec3 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -107,7 +107,7 @@ describe('InvoiceOut transfer()', () => { } }); - fit('should not create a new invoice if makeInvoice is false', async() => { + it('should not create a new invoice if makeInvoice is false', async() => { const tx = await models.InvoiceOut.beginTransaction({}); const options = {transaction: tx}; From 4ed5811042b00b54eb65755023dac28a7bdab5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 30 Aug 2024 14:14:06 +0200 Subject: [PATCH 194/250] fix: refs #7213 problem rounding --- .../sale_setProblemRoundingByBuy.sql | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql index 60b495a75..efa1a65fb 100644 --- a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql +++ b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql @@ -4,8 +4,9 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRoun ) BEGIN /** - * Update rounding problem for all sales related to a buy - * @param vBuyFk Id buy + * Update rounding problem for all sales related to a buy. + * + * @param vBuyFk Buy id */ DECLARE vItemFk INT; DECLARE vWareHouseFk INT; @@ -18,16 +19,16 @@ BEGIN SELECT b.itemFk, t.warehouseInFk INTO vItemFk, vWareHouseFk - FROM vn.buy b - JOIN vn.entry e ON e.id = b.entryFk - JOIN vn.travel t ON t.id = e.travelFk + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk WHERE b.id = vBuyFk; SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped)) INTO vMaxDated, vMinDated FROM sale s JOIN ticket t ON t.id = s.ticketFk - WHERE t.shipped >= CURDATE() + WHERE t.shipped >= util.VN_CURDATE() AND s.itemFk = vItemFk AND s.quantity > 0; @@ -54,16 +55,16 @@ BEGIN END WHILE; CREATE OR REPLACE TEMPORARY TABLE tmp.sale - (INDEX(saleFk, isProblemCalcNeeded)) - SELECT s.id saleFk , + (INDEX(saleFk, isProblemCalcNeeded)) + ENGINE = MEMORY + SELECT s.id saleFk, MOD(s.quantity, vGrouping) hasProblem, ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded FROM sale s JOIN ticket t ON t.id = s.ticketFk WHERE s.itemFk = vItemFk AND s.quantity > 0 - AND t.shipped BETWEEN vMinDated - AND util.dayEnd(vMaxDated); + AND t.shipped BETWEEN vMinDated AND util.dayEnd(vMaxDated); CALL sale_setProblem('hasRounding'); From c88b069ac344695c8f0abcdd60abf19196d7fa2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 30 Aug 2024 14:16:03 +0200 Subject: [PATCH 195/250] fix: refs #7213 problem rounding --- db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql index efa1a65fb..a1362c222 100644 --- a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql +++ b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql @@ -56,7 +56,7 @@ BEGIN CREATE OR REPLACE TEMPORARY TABLE tmp.sale (INDEX(saleFk, isProblemCalcNeeded)) - ENGINE = MEMORY + ENGINE = MEMORY SELECT s.id saleFk, MOD(s.quantity, vGrouping) hasProblem, ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded From e2f1fea6bec70b80ff49fe537d1279f3632d6ced Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 30 Aug 2024 17:04:45 +0200 Subject: [PATCH 196/250] fix: refs #7277 error test --- .../collection/spec/assignCollection.spec.js | 6 +- .../invoiceOut/specs/refundAndInvoice.spec.js | 2 +- .../methods/invoiceOut/specs/transfer.spec.js | 93 +++++++++---------- 3 files changed, 48 insertions(+), 53 deletions(-) diff --git a/back/methods/collection/spec/assignCollection.spec.js b/back/methods/collection/spec/assignCollection.spec.js index e8f3882a3..7cdcd6cb6 100644 --- a/back/methods/collection/spec/assignCollection.spec.js +++ b/back/methods/collection/spec/assignCollection.spec.js @@ -15,9 +15,7 @@ describe('ticket assignCollection()', () => { args: {} }; - spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ - active: ctx.req - }); + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: ctx.req}); options = {transaction: tx}; tx = await models.Sale.beginTransaction({}); @@ -25,7 +23,7 @@ describe('ticket assignCollection()', () => { }); afterEach(async() => { - await tx.rollback(); + if (tx) await tx.rollback(); }); it('should throw an error when there is not picking tickets', async() => { diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js index 46cc4458b..c54ae5f6c 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js @@ -14,7 +14,7 @@ describe('InvoiceOut refundAndInvoice()', () => { spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); }); - fit('should refund an invoice and create a new invoice', async() => { + it('should refund an invoice and create a new invoice', async() => { const tx = await models.InvoiceOut.beginTransaction({}); const options = {transaction: tx}; diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js index 5aeb92ec3..f8a43dc2f 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -2,16 +2,11 @@ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); const UserError = require('vn-loopback/util/user-error'); -describe('InvoiceOut transfer()', () => { +fdescribe('InvoiceOut transfer()', () => { const userId = 5; - const ctx = { - req: { - accessToken: {userId}, - __: (key, obj) => `Translated: ${key}, ${JSON.stringify(obj)}`, - getLocale: () => 'es' - }, - args: {} - }; + let options; + let tx; + let ctx; const activeCtx = {accessToken: {userId}}; const id = 4; const newClientFk = 1101; @@ -19,13 +14,28 @@ describe('InvoiceOut transfer()', () => { const siiTypeInvoiceOutFk = 1; const invoiceCorrectionTypeFk = 1; - beforeEach(() => { + beforeEach(async() => { + ctx = { + req: { + accessToken: {userId: 1106}, + headers: {origin: 'http://localhost'}, + __: value => value, + getLocale: () => 'es' + }, + args: {} + }; + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); + options = {transaction: tx}; + tx = await models.Sale.beginTransaction({}); + options.transaction = tx; + }); + + afterEach(async() => { + await tx.rollback(); }); it('should transfer an invoice to a new client and return the new invoice ID', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; const makeInvoice = true; try { @@ -45,7 +55,7 @@ describe('InvoiceOut transfer()', () => { const transferredTickets = await models.Ticket.find({ where: { - invoiceOutFk: result, + refFk: result, clientFk: newClientFk } }, options); @@ -60,8 +70,6 @@ describe('InvoiceOut transfer()', () => { }); it('should throw an error if original invoice is not found', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; const makeInvoice = true; try { await models.InvoiceOut.transfer( @@ -83,8 +91,6 @@ describe('InvoiceOut transfer()', () => { }); it('should throw an error if the new client is the same as the original client', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; const makeInvoice = true; const originalInvoice = await models.InvoiceOut.findById(id); @@ -107,40 +113,31 @@ describe('InvoiceOut transfer()', () => { } }); - it('should not create a new invoice if makeInvoice is false', async() => { - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; + fit('should not create a new invoice if makeInvoice is false', async() => { + const originalTickets = await models.Ticket.find({ + where: {clientFk: newClientFk, refFk: null}, + options + }); - try { - const originalTickets = await models.Ticket.find({ - where: {clientFk: newClientFk, invoiceOutFk: null}, - options - }); + const result = await models.InvoiceOut.transfer( + ctx, + id, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + false, + options + ); - const result = await models.InvoiceOut.transfer( - ctx, - id, - newClientFk, - cplusRectificationTypeFk, - siiTypeInvoiceOutFk, - invoiceCorrectionTypeFk, - false, - options - ); + expect(result).toBeUndefined(); - expect(result).toBeUndefined(); + // await tx.commit(); + const transferredTickets = await models.Ticket.find({ + where: {clientFk: newClientFk, refFk: null}, + options + }); - const transferredTickets = await models.Ticket.find({ - where: {clientFk: newClientFk, invoiceOutFk: null}, - options - }); - - expect(transferredTickets.length).toBeGreaterThan(originalTickets.length); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } + expect(transferredTickets.length).toBeGreaterThan(originalTickets.length); }); }); From cdaf8a7a6771db503a724fb747e6df29ea13d751 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 2 Sep 2024 08:43:53 +0200 Subject: [PATCH 197/250] fix: refs #6900 fine tunning --- modules/invoiceIn/back/methods/invoice-in/filter.js | 5 ++--- modules/invoiceIn/back/methods/invoice-in/getTotals.js | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index 8a884e211..936f7bb6c 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -138,9 +138,9 @@ module.exports = Self => { ? {'ii.id': value} : {'s.name': {like: `%${value}%`}}; case 'from': - return {'ii.created': {gte: value}}; + return {'ii.issued': {gte: value}}; case 'to': - return {'ii.created': {lte: value}}; + return {'ii.issued': {lte: value}}; case 'fi': return {'s.nif': value}; case 'account': @@ -173,7 +173,6 @@ module.exports = Self => { const stmt = new ParameterizedSQL( `SELECT ii.id, - ii.serialNumber, ii.serial, ii.issued, ii.isBooked, diff --git a/modules/invoiceIn/back/methods/invoice-in/getTotals.js b/modules/invoiceIn/back/methods/invoice-in/getTotals.js index 7bef9f7e9..c4e73abc2 100644 --- a/modules/invoiceIn/back/methods/invoice-in/getTotals.js +++ b/modules/invoiceIn/back/methods/invoice-in/getTotals.js @@ -27,10 +27,12 @@ module.exports = Self => { const [result] = await Self.rawSql(` SELECT iit.*, - SUM(iidd.amount) totalDueDay + SUM(iidd.amount) totalDueDay, + SUM(iidd.foreignValue) totalDueDayForeignValue FROM vn.invoiceIn ii LEFT JOIN ( SELECT SUM(iit.taxableBase) totalTaxableBase, + SUM(iit.foreignValue) totalTaxableBaseForeignValue, CAST( SUM(IFNULL(iit.taxableBase * (1 + (ti.PorcentajeIva / 100)), iit.taxableBase)) AS DECIMAL(10, 2) From 355714fec8d290ec284d1c0d20a45e7de7c98370 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 2 Sep 2024 11:43:35 +0200 Subject: [PATCH 198/250] test: refs #7277 fix test proposal --- .../back/methods/invoiceOut/specs/transfer.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js index f8a43dc2f..c3b5bebcd 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -2,7 +2,7 @@ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); const UserError = require('vn-loopback/util/user-error'); -fdescribe('InvoiceOut transfer()', () => { +describe('InvoiceOut transfer()', () => { const userId = 5; let options; let tx; @@ -134,9 +134,9 @@ fdescribe('InvoiceOut transfer()', () => { // await tx.commit(); const transferredTickets = await models.Ticket.find({ - where: {clientFk: newClientFk, refFk: null}, - options - }); + where: {clientFk: newClientFk, refFk: null} + }, + options); expect(transferredTickets.length).toBeGreaterThan(originalTickets.length); }); From 4ea1177d385811cf2d8c42a9623fa3ad4c5323a6 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 2 Sep 2024 13:55:44 +0200 Subject: [PATCH 199/250] chore: refs #6900 fix test --- .../methods/invoice-in/specs/filter.spec.js | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js b/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js index ff2164783..48310b32a 100644 --- a/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js +++ b/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js @@ -47,29 +47,6 @@ describe('InvoiceIn filter()', () => { } }); - it('should return the invoice in matching the serial number', async() => { - const tx = await models.InvoiceIn.beginTransaction({}); - const options = {transaction: tx}; - - try { - const ctx = { - args: { - serialNumber: '1002', - } - }; - - const result = await models.InvoiceIn.filter(ctx, {}, options); - - expect(result.length).toEqual(1); - expect(result[0].serialNumber).toEqual(1002); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } - }); - it('should return the invoice in matching the account', async() => { const tx = await models.InvoiceIn.beginTransaction({}); const options = {transaction: tx}; @@ -158,7 +135,7 @@ describe('InvoiceIn filter()', () => { const result = await models.InvoiceIn.filter(ctx, {}, options); - expect(result.length).toEqual(5); + expect(result.length).toEqual(6); await tx.rollback(); } catch (e) { From 89f8e987dc7827a32eace416a3d7ebd202d99c6a Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 2 Sep 2024 14:27:04 +0200 Subject: [PATCH 200/250] feat: refs #7562 Requested changes --- db/versions/11209-pinkOrchid/00-firstScript.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/versions/11209-pinkOrchid/00-firstScript.sql diff --git a/db/versions/11209-pinkOrchid/00-firstScript.sql b/db/versions/11209-pinkOrchid/00-firstScript.sql new file mode 100644 index 000000000..92a7a7569 --- /dev/null +++ b/db/versions/11209-pinkOrchid/00-firstScript.sql @@ -0,0 +1,6 @@ +ALTER TABLE vn.operator + MODIFY COLUMN sizeLimit int(10) unsigned DEFAULT NULL NULL COMMENT 'Límite de altura en una colección para la asignación de pedidos'; + +UPDATE vn.operator + SET sizeLimit = 90 + WHERE itemPackingTypeFk = 'V'; From 6fc8b9b8215340e2f0ad3b086abce153f6a70d40 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 2 Sep 2024 14:41:02 +0200 Subject: [PATCH 201/250] feat: ticket 215005 Changed acl show transferClient --- modules/ticket/front/descriptor-menu/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html index 3583b1202..82094d7b8 100644 --- a/modules/ticket/front/descriptor-menu/index.html +++ b/modules/ticket/front/descriptor-menu/index.html @@ -6,7 +6,7 @@ From b436ac051833540353aedc5d604dbbc5d89b56f4 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 07:45:25 +0200 Subject: [PATCH 202/250] fix: refs #7916 itemShelving_transfer --- .../vn/procedures/itemShelving_transfer.sql | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/db/routines/vn/procedures/itemShelving_transfer.sql b/db/routines/vn/procedures/itemShelving_transfer.sql index 47a9a7cf0..94d2308a1 100644 --- a/db/routines/vn/procedures/itemShelving_transfer.sql +++ b/db/routines/vn/procedures/itemShelving_transfer.sql @@ -5,28 +5,26 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_transf ) BEGIN /** - * Transfiere producto de una ubicación a otra, fusionando si coincide el - * packing y la fecha. + * Transfiere producto de una ubicación a otra + * fusionando si coincide el packing y la fecha. * * @param vItemShelvingFk Identificador de itemShelving * @param vShelvingFk Identificador de shelving */ - DECLARE vNewItemShelvingFk INT DEFAULT 0; + DECLARE vNewItemShelvingFk INT; - SELECT MAX(ish.id) - INTO vNewItemShelvingFk + SELECT MAX(ish.id) INTO vNewItemShelvingFk FROM itemShelving ish JOIN ( - SELECT - itemFk, - packing, - created, - buyFk + SELECT itemFk, + packing, + created, + buyFk FROM itemShelving WHERE id = vItemShelvingFk ) ish2 ON ish2.itemFk = ish.itemFk AND ish2.packing = ish.packing - AND date(ish2.created) = date(ish.created) + AND DATE(ish2.created) = DATE(ish.created) AND ish2.buyFk = ish.buyFk WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci; @@ -39,10 +37,16 @@ BEGIN DELETE FROM itemShelving WHERE id = vItemShelvingFk; ELSE - UPDATE itemShelving - SET shelvingFk = vShelvingFk - WHERE id = vItemShelvingFk; + IF (SELECT EXISTS(SELECT id FROM shelving + WHERE code = vShelvingFk COLLATE utf8_unicode_ci)) THEN + + UPDATE itemShelving + SET shelvingFk = vShelvingFk + WHERE id = vItemShelvingFk; + ELSE + CALL util.throw('The shelving not exists'); + END IF; END IF; - SELECT true; + SELECT TRUE; END$$ -DELIMITER ; \ No newline at end of file +DELIMITER ; From e0a0b987b20d862a6cee9a0025521e7edce79740 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 3 Sep 2024 08:05:02 +0200 Subject: [PATCH 203/250] feat(salix): refs #7897 #7897 update changelog.md --- CHANGELOG.md | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db79a40a..74109c7c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,113 @@ +# Version 24.36 - 2024-09-03 + +### Added 🆕 + +- chore: refs #7524 WIP limit call by:jorgep +- chore: refs #7524 modify ormConfig table col (origin/7524-warmfix-modifyColumn) by:jorgep +- feat(update-user): refs #7848 add twoFactor by:alexm +- feat: #3199 Requested changes by:guillermo +- feat: refs #3199 Added more scopes ticket_recalcByScope by:guillermo +- feat: refs #3199 Added one more scope ticket_recalcByScope by:guillermo +- feat: refs #3199 Created ticket_recalcItemTaxCountryByScope by:guillermo +- feat: refs #3199 Requested changes by:guillermo +- feat: refs #7346 add multiple feature by:jgallego +- feat: refs #7346 backTest checks new implementation by:jgallego +- feat: refs #7346 mas intuitivo by:jgallego +- feat: refs #7514 Changes to put srt log (origin/7514-srtLog) by:guillermo +- feat: refs #7524 add default limit (origin/7524-limitSelect) by:jorgep +- feat: refs #7524 add mock limit on find query by:jorgep +- feat: refs #7524 wip remote hooks by:jorgep +- feat: refs #7562 Requested changes by:guillermo +- feat: refs #7567 Changed time to call event by:guillermo +- feat: refs #7567 Requested changes by:guillermo +- feat: refs #7710 pr revision by:jgallego +- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego +- feat: refs #7712 Fix by:guillermo +- feat: refs #7712 Unify by:guillermo +- feat: refs #7712 sizeLimit (origin/7712-sizeLimit) by:guillermo +- feat: refs #7758 Add code mandateType and accountDetailType by:ivanm +- feat: refs #7758 Modify code lowerCamelCase and UNIQUE by:ivanm +- feat: refs #7758 accountDetailType fix deploy error by:ivanm +- feat: refs #7784 Changes in entry-order-pdf by:guillermo +- feat: refs #7784 Requested changes by:guillermo +- feat: refs #7799 Added Fk in vn.item.itemPackingTypeFk by:guillermo +- feat: refs #7800 Added company Fk by:guillermo +- feat: refs #7842 Added editorFk in vn.host by:guillermo +- feat: refs #7860 Update new packagings (origin/7860-newPackaging) by:guillermo +- feat: refs #7862 roadmap new fields by:ivanm +- feat: refs #7882 Added quadMindsConfig table by:guillermo + +### Changed 📦 + +- refactor: refs #7567 Fix and improvement by:guillermo +- refactor: refs #7567 Minor change by:guillermo +- refactor: refs #7756 Fix tests by:guillermo +- refactor: refs #7798 Drop bi.Greuges_comercial_detail by:guillermo +- refactor: refs #7848 adapt to lilium by:alexm + +### Fixed 🛠️ + +- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego +- feat: refs #7758 accountDetailType fix deploy error by:ivanm +- fix(salix): #7283 ItemFixedPrice duplicated (origin/7283_itemFixedPrice_duplicated) by:Javier Segarra +- fix: refs #7346 minor error (origin/7346, 7346) by:jgallego +- fix: refs #7355 remove and tests accounts (origin/7355-accountMigration2) by:carlossa +- fix: refs #7355 remove and tests accounts by:carlossa +- fix: refs #7524 default limit select by:jorgep +- fix: refs #7756 Foreign keys invoiceOut (origin/7756-fixRefFk) by:guillermo +- fix: refs #7756 id 0 by:guillermo +- fix: refs #7800 tpvMerchantEnable PRIMARY KEY (origin/7800-tpvMerchantEnable) by:guillermo +- fix: refs #7800 tpvMerchantEnable PRIMARY KEY by:guillermo +- fix: refs #7916 itemShelving_transfer (origin/test, test) by:guillermo +- fix: refs #pako Deleted duplicated version by:guillermo + +# Version 24.34 - 2024-08-20 + +### Added 🆕 + +- #6900 feat: clear empty by:jorgep +- #6900 feat: empty commit by:jorgep +- chore: refs #6900 beautify code by:jorgep +- chore: refs #6989 add config model by:jorgep +- feat workerActivity refs #6078 by:sergiodt +- feat: #6453 Refactor (origin/6453-orderConfirm) by:guillermo +- feat: #6453 Rollback always split by itemPackingType by:guillermo +- feat: deleted worker module code & redirect to Lilium by:Jon +- feat: refs #6453 Added new ticket search by:guillermo +- feat: refs #6453 Fixes by:guillermo +- feat: refs #6453 Minor changes by:guillermo +- feat: refs #6453 Requested changes by:guillermo +- feat: refs #6900 drop section by:jorgep +- feat: refs #7283 order by desc date by:jorgep +- feat: refs #7323 add locale by:jorgep +- feat: refs #7323 redirect to lilium by:jorgep +- feat: refs #7646 delete scannableCodeType by:robert +- feat: refs #7713 Created ACLLog by:guillermo +- feat: refs #7774 (origin/7774-ticket_cloneWeekly) by:robert +- feat: refs #7774 #7774 Changes ticket_cloneWeekly by:guillermo +- feat: refs #7774 ticket_cloneWeekly by:robert + +### Changed 📦 + +- refactor: refs #6453 Major changes by:guillermo +- refactor: refs #6453 Minor changes by:guillermo +- refactor: refs #6453 order_confirmWithUser by:guillermo +- refactor: refs #7646 #7646 Deleted scannable* variables productionConfig by:guillermo +- refactor: refs #7820 Deprecated silexACL by:guillermo + +### Fixed 🛠️ + +- #6900 fix: #6900 rectificative filter by:jorgep +- #6900 fix: empty commit by:jorgep +- fix(orders_filter): add sourceApp accepts by:alexm +- fix: refs #6130 commit lint by:pablone +- fix: refs #6453 order_confirmWithUser by:guillermo +- fix: refs #7283 sql by:jorgep +- fix: refs #7713 ACL Log by:guillermo +- test: fix claim descriptor redirect to lilium by:alexm +- test: fix ticket redirect to lilium by:alexm +- test: fix ticket sale e2e by:alexm + # Version 24.32 - 2024-08-06 ### Added 🆕 From 6b53c24f20d1b157cb18bce9a91d2614c4af7c78 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 08:17:27 +0200 Subject: [PATCH 204/250] feat: refs #6650 Added saleGroupLog --- .../saleGroupDetail._beforeInsert.sql | 8 ++++++ .../triggers/saleGroupDetail_afterDelete.sql | 12 +++++++++ .../triggers/saleGroupDetail_beforeUpdate.sql | 8 ++++++ .../vn/triggers/saleGroup_afterDelete.sql | 2 +- .../11183-limePhormium/00-firstScript.sql | 26 ++++++++++++++++--- 5 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql create mode 100644 db/routines/vn/triggers/saleGroupDetail_afterDelete.sql create mode 100644 db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql diff --git a/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql b/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql new file mode 100644 index 000000000..9513be46a --- /dev/null +++ b/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeInsert` + BEFORE INSERT ON `saleGroupDetail` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql b/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql new file mode 100644 index 000000000..1698ad8ce --- /dev/null +++ b/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_afterDelete` + AFTER DELETE ON `saleGroupDetail` + FOR EACH ROW +BEGIN + INSERT INTO saleGroupLog + SET `action` = 'delete', + `changedModel` = 'SaleGroupDetail', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql b/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql new file mode 100644 index 000000000..0da18fd98 --- /dev/null +++ b/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql @@ -0,0 +1,8 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeUpdate` + BEFORE UPDATE ON `saleGroupDetail` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/saleGroup_afterDelete.sql b/db/routines/vn/triggers/saleGroup_afterDelete.sql index 1e0163187..7ba34c6ce 100644 --- a/db/routines/vn/triggers/saleGroup_afterDelete.sql +++ b/db/routines/vn/triggers/saleGroup_afterDelete.sql @@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroup_afterDelete AFTER DELETE ON `saleGroup` FOR EACH ROW BEGIN - INSERT INTO ticketLog + INSERT INTO saleGroupLog SET `action` = 'delete', `changedModel` = 'SaleGroup', `changedModelId` = OLD.id, diff --git a/db/versions/11183-limePhormium/00-firstScript.sql b/db/versions/11183-limePhormium/00-firstScript.sql index d6d1fc271..a30338f9e 100644 --- a/db/versions/11183-limePhormium/00-firstScript.sql +++ b/db/versions/11183-limePhormium/00-firstScript.sql @@ -1,3 +1,23 @@ -ALTER TABLE vn.shelvingLog MODIFY - COLUMN changedModel enum('Shelving', 'ItemShelving') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Shelving' NOT NULL; -ALTER TABLE vn.shelvingLog MODIFY COLUMN originFk varchar(11) DEFAULT NULL NULL; +CREATE OR REPLACE TABLE `vn`.`saleGroupLog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `originFk` int(11) DEFAULT NULL, + `userFk` int(10) unsigned DEFAULT NULL, + `action` set('insert','update','delete','select') NOT NULL, + `creationDate` timestamp NULL DEFAULT current_timestamp(), + `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `changedModel` enum('SaleGroup', 'SaleGroupDetail') NOT NULL DEFAULT 'SaleGroup', + `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)), + `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), + `changedModelId` int(11) NOT NULL, + `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, + `reason` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `saleGroupUserFk` (`userFk`), + KEY `saleGroupLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), + KEY `saleGroupLog_originFk` (`originFk`,`creationDate`), + CONSTRAINT `saleGroupLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +ALTER TABLE vn.parkingLog + MODIFY COLUMN changedModel enum('Parking') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Parking' NOT NULL; From 7632f333226df77c76041a574c2fb962d001f311 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 09:22:55 +0200 Subject: [PATCH 205/250] fix: refs #7712 sizeLimit --- db/routines/vn/procedures/collection_new.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index ee76f3994..6e112634e 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -194,9 +194,9 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR (pb.lines > vLinesLimit AND vLinesLimit IS NOT NULL) - OR (pb.m3 > vVolumeLimit AND vVolumeLimit IS NOT NULL) - OR ((sub.maxSize > vSizeLimit OR sub.maxSize IS NOT NULL) AND vSizeLimit IS NOT NULL); + OR pb.lines > vLinesLimit + OR pb.m3 > vVolumeLimit + OR sub.maxSize > vSizeLimit; END IF; -- Es importante que el primer ticket se coja en todos los casos From 6f97d1b83a359081c920316ba10f1452aad97942 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 09:57:18 +0200 Subject: [PATCH 206/250] fix: refs #7844 salesFilter and isTooLittle condition --- .../vn/procedures/sale_getProblems.sql | 6 ++++- .../back/methods/sales-monitor/salesFilter.js | 27 ++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 6f65a3722..7e84900eb 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -70,11 +70,15 @@ BEGIN LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250), NULL ) hasRounding, - IF(FIND_IN_SET('isTooLittle', t.problem), TRUE, FALSE) isTooLittle + IF(FIND_IN_SET('isTooLittle', t.problem) + AND util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE, + TRUE, FALSE) isTooLittle FROM tmp.sale_getProblems sgp JOIN ticket t ON t.id = sgp.ticketFk LEFT JOIN sale s ON s.ticketFk = t.id LEFT JOIN item i ON i.id = s.itemFk + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + AND zc.dated = util.VN_CURDATE() WHERE s.problem <> '' OR t.problem <> '' OR t.risk GROUP BY t.id, s.id; diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 33b37d8a4..308c27f3f 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -239,9 +239,8 @@ module.exports = Self => { stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`); // Get client debt balance - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt'); stmts.push(` - CREATE TEMPORARY TABLE tmp.clientGetDebt + CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt (PRIMARY KEY (clientFk)) ENGINE = MEMORY SELECT DISTINCT clientFk FROM tmp.filter`); @@ -250,9 +249,8 @@ module.exports = Self => { stmts.push(stmt); stmts.push('DROP TEMPORARY TABLE tmp.clientGetDebt'); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.tickets'); stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.tickets + CREATE OR REPLACE TEMPORARY TABLE tmp.tickets (PRIMARY KEY (id)) ENGINE = MEMORY SELECT f.*, r.risk AS debt @@ -279,10 +277,8 @@ module.exports = Self => { WHERE t.debt + t.credit >= 0 `); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems'); - stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.sale_getProblems + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems (INDEX (ticketFk)) ENGINE = MEMORY SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped @@ -303,14 +299,13 @@ module.exports = Self => { risk = t.debt + t.credit, totalProblems = totalProblems + 1 `); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.sale_getWarnings'); - stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.sale_getWarnings - (INDEX (ticketFk, agencyModeFk)) - ENGINE = MEMORY - SELECT f.id ticketFk, f.agencyModeFk - FROM tmp.filter f`); + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getWarnings + (INDEX (ticketFk, agencyModeFk)) + ENGINE = MEMORY + SELECT f.id ticketFk, f.agencyModeFk + FROM tmp.filter f + `); stmts.push(stmt); stmts.push('CALL ticket_getWarnings()'); @@ -318,12 +313,12 @@ module.exports = Self => { stmt = new ParameterizedSQL(` SELECT t.*, tp.*, - ((tp.risk) + cc.riskTolerance < 0) AS hasHighRisk, + tp.hasHighRisk, tw.* FROM tmp.tickets t LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = t.id LEFT JOIN tmp.ticket_warnings tw ON tw.ticketFk = t.id - JOIN clientConfig cc`); + `); const hasProblems = args.problems; if (hasProblems != undefined && (!args.from && !args.to)) From 04c8f87c00e1cfea47500d1c2edd0a19f10fa525 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 3 Sep 2024 12:02:55 +0200 Subject: [PATCH 207/250] feat: rollback limit --- loopback/common/models/vn-model.js | 30 +++++++++++++++--------------- loopback/server/boot/orm.js | 12 ++++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index a11bed11d..6fcb6f0e3 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -27,25 +27,25 @@ module.exports = function(Self) { }; }); - this.beforeRemote('**', async ctx => { - if (!this.hasFilter(ctx)) return; + // this.beforeRemote('**', async ctx => { + // if (!this.hasFilter(ctx)) return; - const defaultLimit = this.app.orm.selectLimit; - const filter = ctx.args.filter || {limit: defaultLimit}; + // const defaultLimit = this.app.orm.selectLimit; + // const filter = ctx.args.filter || {limit: defaultLimit}; - if (filter.limit > defaultLimit) { - filter.limit = defaultLimit; - ctx.args.filter = filter; - } - }); + // if (filter.limit > defaultLimit) { + // filter.limit = defaultLimit; + // ctx.args.filter = filter; + // } + // }); - this.afterRemote('**', async ctx => { - if (!this.hasFilter(ctx)) return; + // this.afterRemote('**', async ctx => { + // if (!this.hasFilter(ctx)) return; - const {result} = ctx; - const length = Array.isArray(result) ? result.length : result ? 1 : 0; - if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); - }); + // const {result} = ctx; + // const length = Array.isArray(result) ? result.length : result ? 1 : 0; + // if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); + // }); // Register field ACL validation /* diff --git a/loopback/server/boot/orm.js b/loopback/server/boot/orm.js index 8bbd969e1..ccd9d4eca 100644 --- a/loopback/server/boot/orm.js +++ b/loopback/server/boot/orm.js @@ -1,6 +1,6 @@ -module.exports = async function(app) { - if (!app.orm) { - const ormConfig = await app.models.OrmConfig.findOne(); - app.orm = ormConfig; - } -}; +// module.exports = async function(app) { +// if (!app.orm) { +// const ormConfig = await app.models.OrmConfig.findOne(); +// app.orm = ormConfig; +// } +// }; From 0c3349dc036aa8d6d23ba843a36b1e2a8bbf5d55 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 12:06:31 +0200 Subject: [PATCH 208/250] fix: refs #7844 salesFilter and tmp.ticket_problems.totalProblems --- .../vn/procedures/sale_getProblems.sql | 3 + .../vn/procedures/ticket_getProblems.sql | 27 +++--- .../back/methods/sales-monitor/salesFilter.js | 94 +++++-------------- .../sales-monitor/specs/salesFilter.spec.js | 8 +- 4 files changed, 46 insertions(+), 86 deletions(-) diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 7e84900eb..8df28dbc0 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -35,6 +35,7 @@ BEGIN saleFk INT(11), isFreezed INTEGER(1) DEFAULT 0, risk DECIMAL(10,1) DEFAULT 0, + hasRisk TINYINT(1) DEFAULT 0, hasHighRisk TINYINT(1) DEFAULT 0, hasTicketRequest INTEGER(1) DEFAULT 0, itemShortage VARCHAR(255), @@ -52,6 +53,7 @@ BEGIN saleFk, isFreezed, risk, + hasRisk, hasHighRisk, hasTicketRequest, isTaxDataChecked, @@ -62,6 +64,7 @@ BEGIN s.id, IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed, t.risk, + IF(FIND_IN_SET('hasRisk', t.problem), TRUE, FALSE) hasRisk, IF(FIND_IN_SET('hasHighRisk', t.problem), TRUE, FALSE) hasHighRisk, IF(FIND_IN_SET('hasTicketRequest', t.problem), TRUE, FALSE) hasTicketRequest, IF(FIND_IN_SET('isTaxDataChecked', t.problem), FALSE, TRUE) isTaxDataChecked, diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index e9becab2a..49485e5f5 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -18,6 +18,7 @@ BEGIN SELECT ticketFk, MAX(isFreezed) isFreezed, MAX(risk) risk, + MAX(hasRisk) hasRisk, MAX(hasHighRisk) hasHighRisk, MAX(hasTicketRequest) hasTicketRequest, MAX(itemShortage) itemShortage, @@ -32,19 +33,19 @@ BEGIN FROM tmp.sale_problems GROUP BY ticketFk; - UPDATE tmp.ticket_problems tp - SET tp.totalProblems = ( - (tp.isFreezed) + - IF(tp.risk,TRUE, FALSE) + - (tp.hasTicketRequest) + - (tp.isTaxDataChecked = 0) + - (tp.hasComponentLack) + - (tp.itemDelay) + - (tp.isTooLittle) + - (tp.itemLost) + - (tp.hasRounding) + - (tp.itemShortage) + - (tp.isVip) + UPDATE tmp.ticket_problems + SET totalProblems = ( + (isFreezed) + + (hasRisk) + + (hasTicketRequest) + + (isTaxDataChecked) + + (hasComponentLack) + + (itemDelay IS NOT NULL) + + (isTooLittle) + + (itemLost IS NOT NULL) + + (hasRounding IS NOT NULL) + + (itemShortage IS NOT NULL) + + (isVip) ); DROP TEMPORARY TABLE tmp.sale_problems; diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 308c27f3f..dbf2ea468 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -238,45 +238,6 @@ module.exports = Self => { stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`); - // Get client debt balance - stmts.push(` - CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt - (PRIMARY KEY (clientFk)) - ENGINE = MEMORY - SELECT DISTINCT clientFk FROM tmp.filter`); - - stmt = new ParameterizedSQL('CALL client_getDebt(?)', [args.to]); - stmts.push(stmt); - stmts.push('DROP TEMPORARY TABLE tmp.clientGetDebt'); - - stmt = new ParameterizedSQL(` - CREATE OR REPLACE TEMPORARY TABLE tmp.tickets - (PRIMARY KEY (id)) - ENGINE = MEMORY - SELECT f.*, r.risk AS debt - FROM tmp.filter f - LEFT JOIN tmp.risk r ON f.clientFk = r.clientFk`); - stmts.push(stmt); - - // Sum risk to future - stmts.push(`SET @client:= 0`); - stmts.push('SET @risk := 0'); - stmts.push(` - UPDATE tmp.tickets - SET debt = IF(@client <> @client:= clientFk, - -totalWithVat + @risk:= - debt + totalWithVat, - -totalWithVat + @risk:= @risk + totalWithVat - ) - ORDER BY clientFk, shipped DESC - `); - - // Remove positive risks - stmts.push(` - UPDATE tmp.tickets t - SET debt = 0 - WHERE t.debt + t.credit >= 0 - `); - stmt = new ParameterizedSQL(` CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems (INDEX (ticketFk)) @@ -290,15 +251,6 @@ module.exports = Self => { stmts.push('CALL ticket_getProblems(FALSE)'); - stmts.push(` - INSERT INTO tmp.ticket_problems (ticketFk, risk, totalProblems) - SELECT t.id, t.debt + t.credit AS risk, 1 - FROM tmp.tickets t - WHERE (t.debt + t.credit) < 0 - ON DUPLICATE KEY UPDATE - risk = t.debt + t.credit, totalProblems = totalProblems + 1 - `); - stmt = new ParameterizedSQL(` CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getWarnings (INDEX (ticketFk, agencyModeFk)) @@ -311,14 +263,18 @@ module.exports = Self => { stmts.push('CALL ticket_getWarnings()'); stmt = new ParameterizedSQL(` - SELECT t.*, - tp.*, - tp.hasHighRisk, - tw.* - FROM tmp.tickets t - LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = t.id - LEFT JOIN tmp.ticket_warnings tw ON tw.ticketFk = t.id + UPDATE tmp.ticket_problems + SET risk = IF(hasRisk AND risk > 0, risk, 0) `); + stmts.push(stmt); + + stmt = new ParameterizedSQL(` + SELECT * + FROM tmp.filter f + LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id + LEFT JOIN tmp.ticket_warnings tw ON tw.ticketFk = f.id + `); + stmts.push(stmt); const hasProblems = args.problems; if (hasProblems != undefined && (!args.from && !args.to)) @@ -354,23 +310,23 @@ module.exports = Self => { switch (param) { case 'search': return /^\d+$/.test(value) - ? {'t.id': {inq: value}} - : {'t.nickname': {like: `%${value}%`}}; + ? {'f.id': {inq: value}} + : {'f.nickname': {like: `%${value}%`}}; case 'nickname': - return {'t.nickname': {like: `%${value}%`}}; + return {'f.nickname': {like: `%${value}%`}}; case 'refFk': - return {'t.refFk': value}; + return {'f.refFk': value}; case 'provinceFk': - return {'t.provinceFk': value}; + return {'f.provinceFk': value}; case 'stateFk': - return {'t.stateFk': value}; + return {'f.stateFk': value}; case 'alertLevel': - return {'t.alertLevel': value}; + return {'f.alertLevel': value}; case 'pending': if (value) { - return {'t.alertLevelCode': {inq: [ + return {'f.alertLevelCode': {inq: [ 'FIXING', 'FREE', 'NOT_READY', @@ -380,7 +336,7 @@ module.exports = Self => { 'WAITING_FOR_PAYMENT' ]}}; } else { - return {'t.alertLevelCode': {inq: [ + return {'f.alertLevelCode': {inq: [ 'ON_PREPARATION', 'ON_CHECKING', 'CHECKED', @@ -404,7 +360,7 @@ module.exports = Self => { } case 'agencyModeFk': case 'warehouseFk': - param = `t.${param}`; + param = `f.${param}`; return {[param]: value}; } }); @@ -417,14 +373,14 @@ module.exports = Self => { stmt.merge(conn.makeLimit(filter)); const ticketsIndex = stmts.push(stmt) - 1; - stmts.push( - `DROP TEMPORARY TABLE + stmts.push(` + DROP TEMPORARY TABLE tmp.filter, tmp.ticket_problems, tmp.sale_getProblems, tmp.sale_getWarnings, - tmp.ticket_warnings, - tmp.risk`); + tmp.ticket_warnings + `); const sql = ParameterizedSQL.join(stmts, ';'); const result = await conn.executeStmt(sql, myOptions); diff --git a/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js b/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js index c3da7f08b..cd55c471a 100644 --- a/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js +++ b/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js @@ -39,7 +39,7 @@ describe('SalesMonitor salesFilter()', () => { const filter = {}; const result = await models.SalesMonitor.salesFilter(ctx, filter, options); - expect(result.length).toBeGreaterThan(11); + expect(result.length).toBeGreaterThan(10); await tx.rollback(); } catch (e) { @@ -68,7 +68,7 @@ describe('SalesMonitor salesFilter()', () => { const filter = {}; const result = await models.SalesMonitor.salesFilter(ctx, filter, options); - expect(result.length).toEqual(0); + expect(result.length).toEqual(4); await tx.rollback(); } catch (e) { @@ -218,8 +218,8 @@ describe('SalesMonitor salesFilter()', () => { const firstTicket = result.shift(); const secondTicket = result.shift(); - expect(firstTicket.totalProblems).toEqual(1); - expect(secondTicket.totalProblems).toEqual(1); + expect(firstTicket.totalProblems).toEqual(4); + expect(secondTicket.totalProblems).toEqual(4); await tx.rollback(); } catch (e) { From 790a44c62abbcec98b59a474edc74fd2d529a386 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 13:29:01 +0200 Subject: [PATCH 209/250] fix: refs #7844 salesFilter and tmp.ticket_problems.totalProblems --- db/routines/vn/procedures/ticket_getProblems.sql | 2 +- .../methods/sales-monitor/specs/salesFilter.spec.js | 4 ++-- modules/ticket/back/methods/ticket/filter.js | 6 ++++++ modules/ticket/back/methods/ticket/getTicketsFuture.js | 10 ++++++++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index 49485e5f5..f83351456 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -38,7 +38,7 @@ BEGIN (isFreezed) + (hasRisk) + (hasTicketRequest) + - (isTaxDataChecked) + + (!isTaxDataChecked) + (hasComponentLack) + (itemDelay IS NOT NULL) + (isTooLittle) + diff --git a/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js b/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js index cd55c471a..9460addfa 100644 --- a/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js +++ b/modules/monitor/back/methods/sales-monitor/specs/salesFilter.spec.js @@ -218,8 +218,8 @@ describe('SalesMonitor salesFilter()', () => { const firstTicket = result.shift(); const secondTicket = result.shift(); - expect(firstTicket.totalProblems).toEqual(4); - expect(secondTicket.totalProblems).toEqual(4); + expect(firstTicket.totalProblems).toEqual(3); + expect(secondTicket.totalProblems).toEqual(3); await tx.rollback(); } catch (e) { diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 3e8b732af..e29109bde 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -306,6 +306,12 @@ module.exports = Self => { stmts.push(stmt); stmts.push('CALL ticket_getProblems(FALSE)'); + stmt = new ParameterizedSQL(` + UPDATE tmp.ticket_problems + SET risk = IF(hasRisk AND risk > 0, risk, 0) + `); + stmts.push(stmt); + stmt = new ParameterizedSQL(` SELECT f.*, tp.* FROM tmp.filter f diff --git a/modules/ticket/back/methods/ticket/getTicketsFuture.js b/modules/ticket/back/methods/ticket/getTicketsFuture.js index 0fd21ea74..24ff37be8 100644 --- a/modules/ticket/back/methods/ticket/getTicketsFuture.js +++ b/modules/ticket/back/methods/ticket/getTicketsFuture.js @@ -158,10 +158,16 @@ module.exports = Self => { stmts.push(stmt); stmts.push('CALL ticket_getProblems(FALSE)'); + stmt = new ParameterizedSQL(` + UPDATE tmp.ticket_problems + SET risk = IF(hasRisk AND risk > 0, risk, 0) + `); + stmts.push(stmt); + stmt = new ParameterizedSQL(` SELECT f.*, tp.* - FROM tmp.filter f - LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id + FROM tmp.filter f + LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id `); if (args.problems != undefined && (!args.originDated && !args.futureDated)) From 77fd3e7f460b96eb19f4fdb1e1008dfa24720728 Mon Sep 17 00:00:00 2001 From: ivanm Date: Tue, 3 Sep 2024 14:42:07 +0200 Subject: [PATCH 210/250] feat: refs #7898 Add column "floor" in vn.parking --- db/versions/11211-greenCataractarum/00-firstScript.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/versions/11211-greenCataractarum/00-firstScript.sql diff --git a/db/versions/11211-greenCataractarum/00-firstScript.sql b/db/versions/11211-greenCataractarum/00-firstScript.sql new file mode 100644 index 000000000..55b73925c --- /dev/null +++ b/db/versions/11211-greenCataractarum/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.parking ADD COLUMN floor VARCHAR(5) DEFAULT '--' AFTER row; From 3cc19549e4a9d61542b5ba906ccaf9fc90a805ce Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 3 Sep 2024 15:03:09 +0200 Subject: [PATCH 211/250] fix: refs #7844 salesFilter and tmp.ticket_problems.totalProblems --- .../sale_setProblemRoundingByBuy.sql | 88 ++++++++++--------- .../back/methods/sales-monitor/salesFilter.js | 2 +- modules/ticket/back/methods/ticket/filter.js | 2 +- .../back/methods/ticket/getTicketsFuture.js | 2 +- modules/ticket/back/models/ticket.json | 3 + modules/ticket/front/descriptor/index.html | 2 +- 6 files changed, 52 insertions(+), 47 deletions(-) diff --git a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql index a1362c222..b0e286d25 100644 --- a/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql +++ b/db/routines/vn/procedures/sale_setProblemRoundingByBuy.sql @@ -9,7 +9,7 @@ BEGIN * @param vBuyFk Buy id */ DECLARE vItemFk INT; - DECLARE vWareHouseFk INT; + DECLARE vWarehouseFk INT; DECLARE vMaxDated DATE; DECLARE vMinDated DATE; DECLARE vLanding DATE; @@ -18,56 +18,58 @@ BEGIN DECLARE vGrouping INT; SELECT b.itemFk, t.warehouseInFk - INTO vItemFk, vWareHouseFk + INTO vItemFk, vWarehouseFk FROM buy b JOIN entry e ON e.id = b.entryFk JOIN travel t ON t.id = e.travelFk WHERE b.id = vBuyFk; - - SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped)) - INTO vMaxDated, vMinDated - FROM sale s - JOIN ticket t ON t.id = s.ticketFk - WHERE t.shipped >= util.VN_CURDATE() - AND s.itemFk = vItemFk - AND s.quantity > 0; - - CALL buy_getUltimate(vItemFk, vWareHouseFk, vMinDated); - SELECT bu.buyFk, b.grouping INTO vLastBuy, vGrouping - FROM tmp.buyUltimate bu - JOIN buy b ON b.id = bu.buyFk; - - DROP TEMPORARY TABLE tmp.buyUltimate; - - SET vLanding = vMaxDated; - - WHILE vCurrentBuy <> vLastBuy OR vLanding > vMinDated DO - SET vMaxDated = vLanding - INTERVAL 1 DAY; - - CALL buy_getUltimate(vItemFk, vWareHouseFk, vMaxDated); - - SELECT buyFk, landing - INTO vCurrentBuy, vLanding - FROM tmp.buyUltimate; - - DROP TEMPORARY TABLE tmp.buyUltimate; - END WHILE; - - CREATE OR REPLACE TEMPORARY TABLE tmp.sale - (INDEX(saleFk, isProblemCalcNeeded)) - ENGINE = MEMORY - SELECT s.id saleFk, - MOD(s.quantity, vGrouping) hasProblem, - ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + IF vItemFk AND vWarehouseFk THEN + SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped)) + INTO vMaxDated, vMinDated FROM sale s JOIN ticket t ON t.id = s.ticketFk - WHERE s.itemFk = vItemFk - AND s.quantity > 0 - AND t.shipped BETWEEN vMinDated AND util.dayEnd(vMaxDated); + WHERE t.shipped >= util.VN_CURDATE() + AND s.itemFk = vItemFk + AND s.quantity > 0; + + CALL buy_getUltimate(vItemFk, vWarehouseFk, vMinDated); - CALL sale_setProblem('hasRounding'); + SELECT bu.buyFk, b.grouping INTO vLastBuy, vGrouping + FROM tmp.buyUltimate bu + JOIN buy b ON b.id = bu.buyFk; + + DROP TEMPORARY TABLE tmp.buyUltimate; + + SET vLanding = vMaxDated; - DROP TEMPORARY TABLE tmp.sale; + WHILE vCurrentBuy <> vLastBuy OR vLanding > vMinDated DO + SET vMaxDated = vLanding - INTERVAL 1 DAY; + + CALL buy_getUltimate(vItemFk, vWarehouseFk, vMaxDated); + + SELECT buyFk, landing + INTO vCurrentBuy, vLanding + FROM tmp.buyUltimate; + + DROP TEMPORARY TABLE tmp.buyUltimate; + END WHILE; + + CREATE OR REPLACE TEMPORARY TABLE tmp.sale + (INDEX(saleFk, isProblemCalcNeeded)) + ENGINE = MEMORY + SELECT s.id saleFk, + MOD(s.quantity, vGrouping) hasProblem, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + WHERE s.itemFk = vItemFk + AND s.quantity > 0 + AND t.shipped BETWEEN vMinDated AND util.dayEnd(vMaxDated); + + CALL sale_setProblem('hasRounding'); + + DROP TEMPORARY TABLE tmp.sale; + END IF; END$$ DELIMITER ; \ No newline at end of file diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index dbf2ea468..8ef51a0d1 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -264,7 +264,7 @@ module.exports = Self => { stmt = new ParameterizedSQL(` UPDATE tmp.ticket_problems - SET risk = IF(hasRisk AND risk > 0, risk, 0) + SET risk = IF(hasRisk, risk, 0) `); stmts.push(stmt); diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index e29109bde..2209c8df4 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -308,7 +308,7 @@ module.exports = Self => { stmt = new ParameterizedSQL(` UPDATE tmp.ticket_problems - SET risk = IF(hasRisk AND risk > 0, risk, 0) + SET risk = IF(hasRisk, risk, 0) `); stmts.push(stmt); diff --git a/modules/ticket/back/methods/ticket/getTicketsFuture.js b/modules/ticket/back/methods/ticket/getTicketsFuture.js index 24ff37be8..9f455ec03 100644 --- a/modules/ticket/back/methods/ticket/getTicketsFuture.js +++ b/modules/ticket/back/methods/ticket/getTicketsFuture.js @@ -160,7 +160,7 @@ module.exports = Self => { stmt = new ParameterizedSQL(` UPDATE tmp.ticket_problems - SET risk = IF(hasRisk AND risk > 0, risk, 0) + SET risk = IF(hasRisk, risk, 0) `); stmts.push(stmt); diff --git a/modules/ticket/back/models/ticket.json b/modules/ticket/back/models/ticket.json index d8a3206c6..3f073806e 100644 --- a/modules/ticket/back/models/ticket.json +++ b/modules/ticket/back/models/ticket.json @@ -69,6 +69,9 @@ }, "cmrFk": { "type": "number" + }, + "problem": { + "type": "string" } }, "relations": { diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index 75bcd2801..32a30833b 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -58,7 +58,7 @@ + ng-if="$ctrl.ticket.problem.includes('hasRisk')"> Date: Tue, 3 Sep 2024 15:14:33 +0200 Subject: [PATCH 212/250] feat: refs #7277 transfer addressFk --- .../methods/invoiceOut/specs/transfer.spec.js | 61 ++++++++----------- .../back/methods/invoiceOut/transfer.js | 10 ++- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js index f8a43dc2f..dd1932d55 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/transfer.spec.js @@ -2,7 +2,7 @@ const models = require('vn-loopback/server/server').models; const LoopBackContext = require('loopback-context'); const UserError = require('vn-loopback/util/user-error'); -fdescribe('InvoiceOut transfer()', () => { +describe('InvoiceOut transfer()', () => { const userId = 5; let options; let tx; @@ -37,36 +37,32 @@ fdescribe('InvoiceOut transfer()', () => { it('should transfer an invoice to a new client and return the new invoice ID', async() => { const makeInvoice = true; + const makePdfListMock = spyOn(models.InvoiceOut, 'makePdfList').and.returnValue(); - try { - const result = await models.InvoiceOut.transfer( - ctx, - id, - newClientFk, - cplusRectificationTypeFk, - siiTypeInvoiceOutFk, - invoiceCorrectionTypeFk, - makeInvoice - ); + const [result] = await models.InvoiceOut.transfer( + ctx, + id, + newClientFk, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + makeInvoice, + options + ); - const newInvoice = await models.InvoiceOut.findById(result, options); + const newInvoice = await models.InvoiceOut.findById(result, null, options); - expect(newInvoice.clientFk).toBe(newClientFk); + expect(newInvoice.clientFk).toBe(newClientFk); - const transferredTickets = await models.Ticket.find({ - where: { - refFk: result, - clientFk: newClientFk - } - }, options); + const transferredTickets = await models.Ticket.find({ + where: { + refFk: newInvoice.ref, + clientFk: newClientFk + } + }, options); - expect(transferredTickets.length).toBeGreaterThan(0); - - if (tx) await tx.rollback(); - } catch (e) { - if (tx) await tx.rollback(); - throw e; - } + expect(transferredTickets.length).toBeGreaterThan(0); + expect(makePdfListMock).toHaveBeenCalledWith(ctx, [result]); }); it('should throw an error if original invoice is not found', async() => { @@ -86,13 +82,12 @@ fdescribe('InvoiceOut transfer()', () => { } catch (e) { expect(e).toBeInstanceOf(UserError); expect(e.message).toBe('Original invoice not found'); - await tx.rollback(); } }); it('should throw an error if the new client is the same as the original client', async() => { const makeInvoice = true; - const originalInvoice = await models.InvoiceOut.findById(id); + const originalInvoice = await models.InvoiceOut.findById(id, options); try { await models.InvoiceOut.transfer( @@ -109,11 +104,10 @@ fdescribe('InvoiceOut transfer()', () => { } catch (e) { expect(e).toBeInstanceOf(UserError); expect(e.message).toBe('Select a different client'); - await tx.rollback(); } }); - fit('should not create a new invoice if makeInvoice is false', async() => { + it('should not create a new invoice if makeInvoice is false', async() => { const originalTickets = await models.Ticket.find({ where: {clientFk: newClientFk, refFk: null}, options @@ -132,11 +126,10 @@ fdescribe('InvoiceOut transfer()', () => { expect(result).toBeUndefined(); - // await tx.commit(); const transferredTickets = await models.Ticket.find({ - where: {clientFk: newClientFk, refFk: null}, - options - }); + where: {clientFk: newClientFk, refFk: null} + + }, options); expect(transferredTickets.length).toBeGreaterThan(originalTickets.length); }); diff --git a/modules/invoiceOut/back/methods/invoiceOut/transfer.js b/modules/invoiceOut/back/methods/invoiceOut/transfer.js index 8f6e9dfee..08ed69c8a 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transfer.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transfer.js @@ -84,11 +84,19 @@ module.exports = Self => { const tickets = await models.Ticket.find({where: {refFk: originalInvoice.ref}}, myOptions); const ticketIds = tickets.map(ticket => ticket.id); const transferredTickets = await models.Ticket.cloneAll(ctx, ticketIds, false, false, myOptions); + const client = await models.Client.findById(newClientFk, + {fields: ['id', 'defaultAddressFk']}, myOptions); + const address = await models.Address.findById(client.defaultAddressFk, + {fields: ['id', 'nickname']}, myOptions); const transferredTicketIds = transferredTickets.map(ticket => ticket.id); await models.Ticket.updateAll( {id: {inq: transferredTicketIds}}, - {clientFk: newClientFk}, + { + clientFk: newClientFk, + addressFk: client.defaultAddressFk, + nickname: address.nickname + }, myOptions ); From 99243fa2487db3e675ff2fd7c7c1d85d8fa9767a Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 4 Sep 2024 08:30:01 +0200 Subject: [PATCH 213/250] feat: refs #7277 traducciones --- loopback/locale/en.json | 8 +++++--- loopback/locale/es.json | 7 ++++--- loopback/locale/fr.json | 6 ++++-- loopback/locale/pt.json | 6 ++++-- modules/invoiceOut/back/methods/invoiceOut/transfer.js | 2 +- modules/invoiceOut/front/descriptor-menu/index.js | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 06538a524..7505d82f5 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -230,10 +230,12 @@ "This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency", "You can only have one PDA": "You can only have one PDA", "Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member", - "It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated", + "The invoices have been created but the PDFs could not be generated": "The invoices have been created but the PDFs could not be generated", "It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated", "Cannot add holidays on this day": "Cannot add holidays on this day", "Cannot send mail": "Cannot send mail", "CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`": "CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`", - "This postcode already exists": "This postcode already exists" -} \ No newline at end of file + "This postcode already exists": "This postcode already exists", + "Original invoice not found": "Original invoice not found" + +} diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 377691ae6..a3ed32994 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -363,12 +363,13 @@ "You can not use the same password": "No puedes usar la misma contraseña", "This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario", "You can only have one PDA": "Solo puedes tener un PDA", - "It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF", + "The invoices have been created but the PDFs could not be generated": "Se ha facturado pero no se ha podido generar el PDF", "It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono", "Payment method is required": "El método de pago es obligatorio", "Cannot send mail": "Não é possível enviar o email", "CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos", "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo", "The entry not have stickers": "La entrada no tiene etiquetas", - "Too many records": "Demasiados registros" -} \ No newline at end of file + "Too many records": "Demasiados registros", + "Original invoice not found": "Factura original no encontrada" +} diff --git a/loopback/locale/fr.json b/loopback/locale/fr.json index 49584ef0e..76897737d 100644 --- a/loopback/locale/fr.json +++ b/loopback/locale/fr.json @@ -358,7 +358,9 @@ "This workCenter is already assigned to this agency": "Ce centre de travail est déjà assigné à cette agence", "Select ticket or client": "Choisissez un ticket ou un client", "It was not able to create the invoice": "Il n'a pas été possible de créer la facture", - "It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré", + "The invoices have been created but the PDFs could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré", "It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré", - "Cannot send mail": "Impossible d'envoyer le mail" + "Cannot send mail": "Impossible d'envoyer le mail", + "Original invoice not found": "Facture originale introuvable" + } diff --git a/loopback/locale/pt.json b/loopback/locale/pt.json index 95c1fff0a..6425db9ed 100644 --- a/loopback/locale/pt.json +++ b/loopback/locale/pt.json @@ -358,6 +358,8 @@ "This workCenter is already assigned to this agency": "Este centro de trabalho já está atribuído a esta agência", "Select ticket or client": "Selecione um ticket ou cliente", "It was not able to create the invoice": "Não foi possível criar a fatura", - "It has been invoiced but the PDF could not be generated": "Foi faturado, mas o PDF não pôde ser gerado", - "It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso" + "The invoices have been created but the PDFs could not be generated": "Foi faturado, mas o PDF não pôde ser gerado", + "It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso", + "Original invoice not found": "Fatura original não encontrada" + } diff --git a/modules/invoiceOut/back/methods/invoiceOut/transfer.js b/modules/invoiceOut/back/methods/invoiceOut/transfer.js index 08ed69c8a..954adf780 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transfer.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transfer.js @@ -113,7 +113,7 @@ module.exports = Self => { try { await models.InvoiceOut.makePdfList(ctx, transferredInvoiceId); } catch (e) { - throw new UserError('The transferred invoice has been created but the PDF could not be generated'); + throw new UserError('The invoices have been created but the PDFs could not be generatedd'); } } diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js index 136b12517..288de879e 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -137,7 +137,7 @@ class Controller extends Section { transferInvoice() { const params = { - refFk: this.invoiceOut.ref, + id: this.invoiceOut.id, newClientFk: this.clientId, cplusRectificationTypeFk: this.cplusRectificationType, siiTypeInvoiceOutFk: this.siiTypeInvoiceOut, From a8cc3f496f3e5867540de36780d3202ba73c3a73 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 09:02:38 +0200 Subject: [PATCH 214/250] build: refs #7897 dump 24.36 --- db/dump/.dump/data.sql | 94 ++-- db/dump/.dump/privileges.sql | 12 +- db/dump/.dump/structure.sql | 882 +++++++++++++++++++---------------- db/dump/.dump/triggers.sql | 199 +++++++- 4 files changed, 754 insertions(+), 433 deletions(-) diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql index 37e7835fc..a1c15a30f 100644 --- a/db/dump/.dump/data.sql +++ b/db/dump/.dump/data.sql @@ -3,7 +3,7 @@ USE `util`; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -INSERT INTO `version` VALUES ('vn-database','11180','2a5588f013dbb6370e15754e03a6d9f1d74188e2','2024-08-20 08:34:44','11191'); +INSERT INTO `version` VALUES ('vn-database','11209','3cc19549e4a9d61542b5ba906ccaf9fc90a805ce','2024-09-03 15:04:20','11212'); INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL); @@ -896,6 +896,9 @@ INSERT INTO `versionLog` VALUES ('vn-database','11137','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11138','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:34',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11139','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-08 10:58:01',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11140','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:34',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11141','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11142','00-invoiceOutSerialColumn.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11142','01-invoiceOutSerialUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11145','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 13:55:46',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11146','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11149','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:35',NULL,NULL); @@ -915,10 +918,45 @@ INSERT INTO `versionLog` VALUES ('vn-database','11166','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11168','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 08:58:34',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11169','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 12:38:13',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11170','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-09 07:12:38',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11171','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','03-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','04-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','05-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:08',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','06-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:08',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','07-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:40:15',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','08-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:54:58',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','09-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:55:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','10-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:55:16',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','11-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','12-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','13-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','14-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:25',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11172','15-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11175','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11177','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-30 12:42:28',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11179','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11180','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11182','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-08-09 08:19:36',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11185','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11187','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11189','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11190','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11191','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11191','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11191','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11192','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11193','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11193','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11193','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11194','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11195','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11209','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; @@ -1428,7 +1466,7 @@ INSERT INTO `ACL` VALUES (157,'Calendar','absences','READ','ALLOW','ROLE','emplo INSERT INTO `ACL` VALUES (158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory',NULL); INSERT INTO `ACL` VALUES (160,'TicketServiceType','*','READ','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (161,'TicketConfig','*','READ','ALLOW','ROLE','employee',NULL); -INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing',NULL); +INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','adminBoss',783); INSERT INTO `ACL` VALUES (163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing',NULL); INSERT INTO `ACL` VALUES (165,'TicketDms','*','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee',NULL); @@ -1551,9 +1589,8 @@ INSERT INTO `ACL` VALUES (320,'ItemType','*','WRITE','ALLOW','ROLE','buyer',NULL INSERT INTO `ACL` VALUES (321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing',NULL); INSERT INTO `ACL` VALUES (322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL); INSERT INTO `ACL` VALUES (323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager',NULL); -INSERT INTO `ACL` VALUES (324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing',NULL); -INSERT INTO `ACL` VALUES (325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL); -INSERT INTO `ACL` VALUES (326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager',NULL); +INSERT INTO `ACL` VALUES (324,'Ticket','cloneAll','WRITE','ALLOW','ROLE','invoicing',10578); +INSERT INTO `ACL` VALUES (326,'Ticket','cloneAll','WRITE','ALLOW','ROLE','claimManager',10578); INSERT INTO `ACL` VALUES (327,'Sale','clone','WRITE','ALLOW','ROLE','salesAssistant',NULL); INSERT INTO `ACL` VALUES (328,'Sale','clone','WRITE','ALLOW','ROLE','claimManager',NULL); INSERT INTO `ACL` VALUES (329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing',NULL); @@ -1841,7 +1878,7 @@ INSERT INTO `ACL` VALUES (626,'Ticket','collectionLabel','READ','ALLOW','ROLE',' INSERT INTO `ACL` VALUES (628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss',NULL); INSERT INTO `ACL` VALUES (630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss',NULL); -INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative',19295); INSERT INTO `ACL` VALUES (636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss',NULL); @@ -1871,7 +1908,7 @@ INSERT INTO `ACL` VALUES (688,'ClientSms','create','WRITE','ALLOW','ROLE','emplo INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee',NULL); -INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative',NULL); +INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','claimManager',19295); INSERT INTO `ACL` VALUES (698,'Ticket','canEditWeekly','WRITE','ALLOW','ROLE','buyer',NULL); INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryAssistant',NULL); @@ -1991,7 +2028,6 @@ INSERT INTO `ACL` VALUES (817,'ParkingLog','*','READ','ALLOW','ROLE','employee', INSERT INTO `ACL` VALUES (818,'ExpeditionPallet','*','*','ALLOW','ROLE','production',NULL); INSERT INTO `ACL` VALUES (819,'Ticket','addSaleByCode','WRITE','ALLOW','ROLE','production',NULL); INSERT INTO `ACL` VALUES (820,'TicketCollection','*','READ','ALLOW','ROLE','production',NULL); -INSERT INTO `ACL` VALUES (821,'Ticket','clone','WRITE','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (822,'SupplierDms','*','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (823,'MailAlias','*','*','ALLOW','ROLE','developerBoss',NULL); INSERT INTO `ACL` VALUES (824,'ItemShelving','hasItemOlder','READ','ALLOW','ROLE','production',NULL); @@ -2012,7 +2048,7 @@ INSERT INTO `ACL` VALUES (840,'Locker','*','*','ALLOW','ROLE','hr',NULL); INSERT INTO `ACL` VALUES (841,'Locker','*','*','ALLOW','ROLE','productionBoss',NULL); INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr',NULL); INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss',NULL); -INSERT INTO `ACL` VALUES (846,'Ticket','refund','WRITE','ALLOW','ROLE','logistic',NULL); +INSERT INTO `ACL` VALUES (846,'Ticket','cloneAll','WRITE','ALLOW','ROLE','logistic',10578); INSERT INTO `ACL` VALUES (847,'RouteConfig','*','READ','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (848,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (849,'InvoiceIn','clone','WRITE','ALLOW','ROLE','administrative',NULL); @@ -2070,6 +2106,7 @@ INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL); INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier',NULL); INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL); +INSERT INTO `ACL` VALUES (908,'Docuware','upload','WRITE','ALLOW','ROLE','hrBuyer',13657); INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee'); INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee'); @@ -2364,11 +2401,9 @@ INSERT INTO `component` VALUES (39,'maná auto',7,NULL,NULL,1,'autoMana',0); INSERT INTO `component` VALUES (40,'cambios Santos 2016',4,NULL,NULL,1,NULL,0); INSERT INTO `component` VALUES (41,'bonificacion porte',6,NULL,NULL,1,'freightCharge',0); INSERT INTO `component` VALUES (42,'promocion Francia',4,NULL,NULL,1,'frenchOffer',0); -INSERT INTO `component` VALUES (43,'promocion Floramondo',4,NULL,NULL,1,'floramondoPromo',0); INSERT INTO `component` VALUES (44,'rappel cadena',2,NULL,NULL,1,'rappel',0); INSERT INTO `component` VALUES (45,'maná reclamacion',7,4,NULL,0,'manaClaim',0); INSERT INTO `component` VALUES (46,'recargo a particular',2,NULL,0.25,0,'individual',0); -INSERT INTO `component` VALUES (47,'promocion Italia',4,NULL,NULL,1,'italianOffer',0); INSERT INTO `component` VALUES (48,'fusión de lineas',4,NULL,NULL,1,'lineFusion',0); INSERT INTO `component` VALUES (49,'sustitución',4,NULL,NULL,1,'substitution',0); @@ -2393,57 +2428,57 @@ INSERT INTO `continent` VALUES (5,'Oceanía','OC'); INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,112,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS'); INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_PREPARATION'); +INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING'); INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (44,'management','GERENCIA',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',78,79,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY'); +INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',78,79,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE'); INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL); INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL); -INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD'); INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,'CLAIM'); INSERT INTO `department` VALUES (61,NULL,'VNH',92,95,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',98,99,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',0,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL); +INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL); INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (89,NULL,'COORDINACION',102,103,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (90,NULL,'TRAILER',93,94,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS'); INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); -INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',0,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL); +INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); +INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',1,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL); INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',0,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL); +INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL); INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING'); +INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING'); INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',87,88,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',0,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL); -INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',0,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL); +INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL); +INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL); INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',106,107,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (137,'sorter','SORTER',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); -INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',0,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL); +INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL); INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',69,70,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); @@ -2575,6 +2610,7 @@ INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',2,29, INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',NULL,16,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',7,42,0,0,0,2,0,0,2,0,'warning'); INSERT INTO `ticketUpdateAction` VALUES (1,'Cambiar los precios en el ticket','renewPrices'); INSERT INTO `ticketUpdateAction` VALUES (2,'Convertir en maná','mana'); diff --git a/db/dump/.dump/privileges.sql b/db/dump/.dump/privileges.sql index 1af4b446a..96d417ec5 100644 --- a/db/dump/.dump/privileges.sql +++ b/db/dump/.dump/privileges.sql @@ -929,16 +929,14 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','tillConfig', INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','till','juan@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','till','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleInvoiceIn','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','sectorCollectionSaleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleDms','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','vehicle','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicle','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Agencias','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','expeditionStateType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','vehicleNotes','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleState','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','volumeConfig','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','ticketTrackingState','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); @@ -1460,6 +1458,12 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','salesAssistant','orderCon INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryOut','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingSale','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packaging','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','rate','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleInvoiceIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleNotes','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); /*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */; /*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */; diff --git a/db/dump/.dump/structure.sql b/db/dump/.dump/structure.sql index 1f04c8e78..81441e19f 100644 --- a/db/dump/.dump/structure.sql +++ b/db/dump/.dump/structure.sql @@ -2290,23 +2290,6 @@ CREATE TABLE `Greuge_comercial_recobro` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `Greuges_comercial_detail` --- - -DROP TABLE IF EXISTS `Greuges_comercial_detail`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `Greuges_comercial_detail` ( - `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `Id_Trabajador` int(10) unsigned NOT NULL, - `Comentario` varchar(45) NOT NULL, - `Importe` decimal(10,2) NOT NULL, - `Fecha` datetime DEFAULT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci ROW_FORMAT=COMPACT; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `Ticket_Portes` -- @@ -12457,10 +12440,11 @@ DROP TABLE IF EXISTS `tpvMerchantEnable`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tpvMerchantEnable` ( `merchantFk` int(10) unsigned NOT NULL DEFAULT 0, - `companyFk` smallint(6) unsigned NOT NULL, - PRIMARY KEY (`merchantFk`,`companyFk`), + `companyFk` int(10) unsigned NOT NULL, + PRIMARY KEY (`merchantFk`), UNIQUE KEY `company_id` (`companyFk`), - CONSTRAINT `tpvMerchantEnable_ibfk_1` FOREIGN KEY (`merchantFk`, `companyFk`) REFERENCES `tpvMerchant` (`id`, `companyFk`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `tpvMerchantEnable_company_FK` FOREIGN KEY (`companyFk`) REFERENCES `vn`.`company` (`id`) ON UPDATE CASCADE, + CONSTRAINT `tpvMerchantEnable_tpvMerchant_FK` FOREIGN KEY (`merchantFk`) REFERENCES `tpvMerchant` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Virtual TPV enabled providers'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -19323,6 +19307,7 @@ CREATE TABLE `buffer` ( `hasStrapper` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'tiene una flejadora acoplada', `typeDefaultFk` int(11) NOT NULL DEFAULT 1 COMMENT 'estado por defecto', `motors` int(11) NOT NULL DEFAULT 1 COMMENT 'número de fotocélulas que corresponden con sectores de motor independientes', + `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `code_UNIQUE` (`code`), KEY `buffer_FK` (`stateFk`), @@ -19390,6 +19375,34 @@ CREATE TABLE `bufferGroup` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Agrupación de buffers que sirven de salida para las mismas rutas'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `bufferLog` +-- + +DROP TABLE IF EXISTS `bufferLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bufferLog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `originFk` int(11) DEFAULT NULL, + `userFk` int(10) unsigned DEFAULT NULL, + `action` set('insert','update','delete','select') NOT NULL, + `creationDate` timestamp NULL DEFAULT current_timestamp(), + `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `changedModel` enum('Buffer','Config') NOT NULL DEFAULT 'Buffer', + `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)), + `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)), + `changedModelId` int(11) NOT NULL, + `changedModelValue` varchar(45) DEFAULT NULL, + `summaryId` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `logBufferUserFk` (`userFk`), + KEY `bufferLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), + KEY `bufferLog_originFk` (`originFk`,`creationDate`), + CONSTRAINT `bufferUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `bufferPool` -- @@ -19497,6 +19510,7 @@ CREATE TABLE `config` ( `isBalanced` tinyint(1) NOT NULL DEFAULT 1, `testMode` tinyint(1) NOT NULL DEFAULT 0, `isAllowedUnloading` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Permite que se pueda cambiar el mode de los buffers a UNLOADING', + `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `config_check` CHECK (`id` = 1) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -19677,7 +19691,6 @@ CREATE TABLE `moving` ( `created` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `moving_UN` (`expeditionFk`), - KEY `moving_fk1_idx` (`expeditionFk`), KEY `moving_fk2_idx` (`bufferFromFk`), KEY `moving_fk3_idx` (`bufferToFk`), KEY `moving_FK` (`stateFk`), @@ -19854,18 +19867,14 @@ DELIMITER ;; /*!50003 SET @saved_cs_client = @@character_set_client */ ;; /*!50003 SET @saved_cs_results = @@character_set_results */ ;; /*!50003 SET @saved_col_connection = @@collation_connection */ ;; -/*!50003 SET character_set_client = utf8mb3 */ ;; -/*!50003 SET character_set_results = utf8mb3 */ ;; -/*!50003 SET collation_connection = utf8mb3_general_ci */ ;; +/*!50003 SET character_set_client = utf8mb4 */ ;; +/*!50003 SET character_set_results = utf8mb4 */ ;; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;; /*!50003 SET @saved_time_zone = @@time_zone */ ;; /*!50003 SET time_zone = 'SYSTEM' */ ;; -/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `moving_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-01-21 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Llama a srt.moving_clean para que elimine y notifique de registr' DO BEGIN - - CALL srt.moving_clean(); - -END */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `moving_clean` ON SCHEDULE EVERY 15 MINUTE STARTS '2022-01-21 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Llama a srt.moving_clean para que elimine y notifique de registr' DO CALL srt.moving_clean() */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -22228,62 +22237,70 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `moving_clean`() BEGIN /** * Elimina movimientos por inactividad - * */ DECLARE vExpeditionFk INT; - DECLARE vBufferToFk INT; DECLARE vBufferFromFk INT; - DECLARE done BOOL DEFAULT FALSE; - - DECLARE cur CURSOR FOR - SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk - FROM srt.moving m - JOIN srt.config c - JOIN (SELECT bufferFk, SUM(isActive) hasBox - FROM srt.photocell - GROUP BY bufferFk) sub ON sub.bufferFk = m.bufferFromFk - WHERE m.created < TIMESTAMPADD(MINUTE, - c.movingMaxLife , util.VN_NOW()) + DECLARE vStateOutFk INT + DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT'); + DECLARE vDone BOOL; + DECLARE vSorter CURSOR FOR + SELECT m.expeditionFk, m.bufferFromFk + FROM moving m + JOIN ( + SELECT bufferFk, SUM(isActive) hasBox + FROM photocell + GROUP BY bufferFk + ) sub ON sub.bufferFk = m.bufferFromFk + WHERE m.created < (util.VN_NOW() - INTERVAL (SELECT movingMaxLife FROM config) MINUTE) AND NOT sub.hasBox; - DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - OPEN cur; + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; - bucle: LOOP + OPEN vSorter; + l: LOOP + SET vDone = FALSE; + FETCH vSorter INTO vExpeditionFk, vBufferFromFk; - FETCH cur INTO vExpeditionFk, vBufferToFk, vBufferFromFk; - - IF done THEN - LEAVE bucle; + IF vDone THEN + LEAVE l; END IF; - DELETE FROM srt.moving + START TRANSACTION; + + SELECT id + FROM moving + WHERE expeditionFk = vExpeditionFk + FOR UPDATE; + + DELETE FROM moving WHERE expeditionFk = vExpeditionFk; - UPDATE srt.expedition e - JOIN srt.expeditionState es ON es.description = 'OUT' - SET - bufferFk = NULL, + SELECT id + FROM expedition + WHERE id = vExpeditionFk + OR (bufferFk = vBufferFromFk AND `position` > 0) + FOR UPDATE; + + UPDATE expedition + SET bufferFk = NULL, `position` = NULL, - stateFk = es.id - WHERE e.id = vExpeditionFk; + stateFk = vStateOutFk + WHERE id = vExpeditionFk; - UPDATE srt.expedition e - SET e.`position` = e.`position` - 1 - WHERE e.bufferFk = vBufferFromFk - AND e.`position` > 0; - - CALL vn.mail_insert( - 'pako@verdnatura.es, carles@verdnatura.es', - NULL, - CONCAT('Moving_clean. Expedition: ', vExpeditionFk, ' estaba parada'), - CONCAT('Expedition: ', vExpeditionFk,' vBufferToFk: ', vBufferToFk) - ); - - END LOOP bucle; - - CLOSE cur; + UPDATE expedition + SET `position` = `position` - 1 + WHERE bufferFk = vBufferFromFk + AND `position` > 0; + COMMIT; + END LOOP l; + CLOSE vSorter; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -26234,7 +26251,9 @@ DROP TABLE IF EXISTS `accountDetailType`; CREATE TABLE `accountDetailType` ( `id` int(11) NOT NULL AUTO_INCREMENT, `description` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) + `code` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -31761,6 +31780,7 @@ CREATE TABLE `host` ( `routeDaysBefore` smallint(6) DEFAULT 2, `routeDaysAfter` smallint(6) DEFAULT 1, `updated` timestamp NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `host_UN` (`code`), KEY `configHost_FK_3` (`companyFk`), @@ -32014,10 +32034,10 @@ CREATE TABLE `invoiceCorrection` ( KEY `invoiceCorrection_ibfk_1_idx` (`cplusRectificationTypeFk`), KEY `cplusInvoiceTyoeFk_idx` (`siiTypeInvoiceOutFk`), KEY `invoiceCorrectionTypeFk_idx` (`invoiceCorrectionTypeFk`), - CONSTRAINT `corrected_fk` FOREIGN KEY (`correctedFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `correcting_fk` FOREIGN KEY (`correctingFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `cplusRectificationType_FK` FOREIGN KEY (`cplusRectificationTypeFk`) REFERENCES `cplusRectificationType` (`id`) ON UPDATE CASCADE, CONSTRAINT `invoiceCorrectionType_FK` FOREIGN KEY (`invoiceCorrectionTypeFk`) REFERENCES `invoiceCorrectionType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `invoiceCorrection_invoiceOut_FK` FOREIGN KEY (`correctingFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `invoiceCorrection_invoiceOut_FK_1` FOREIGN KEY (`correctedFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `siiTypeInvoiceOut_FK` FOREIGN KEY (`siiTypeInvoiceOutFk`) REFERENCES `siiTypeInvoiceOut` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Relacion entre las facturas rectificativas y las rectificadas.'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -32381,8 +32401,8 @@ CREATE TABLE `invoiceOut` ( `cplusTaxBreakFk` int(10) unsigned NOT NULL DEFAULT 1, `cplusSubjectOpFk` int(10) unsigned NOT NULL DEFAULT 1, `siiTrascendencyInvoiceOutFk` int(10) unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (`id`,`ref`), - UNIQUE KEY `Id_Factura` (`ref`), + PRIMARY KEY (`id`), + UNIQUE KEY `invoiceOut_unique` (`ref`), KEY `Id_Banco` (`bankFk`), KEY `Id_Cliente` (`clientFk`), KEY `empresa_id` (`companyFk`), @@ -32434,8 +32454,8 @@ CREATE TABLE `invoiceOutExpense` ( PRIMARY KEY (`id`), KEY `invoiceOutExpence_FK_1_idx` (`invoiceOutFk`), KEY `invoiceOutExpence_expenceFk_idx` (`expenseFk`), - CONSTRAINT `invoiceOutExpence_FK_1` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoiceOutExpence_expenceFk` FOREIGN KEY (`expenseFk`) REFERENCES `expense` (`id`) ON UPDATE CASCADE + CONSTRAINT `invoiceOutExpence_expenceFk` FOREIGN KEY (`expenseFk`) REFERENCES `expense` (`id`) ON UPDATE CASCADE, + CONSTRAINT `invoiceOutExpense_invoiceOut_FK` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -32455,8 +32475,9 @@ CREATE TABLE `invoiceOutSerial` ( `cplusInvoiceType477Fk` int(10) unsigned DEFAULT 1, `footNotes` longtext DEFAULT NULL, `isRefEditable` tinyint(4) NOT NULL DEFAULT 0, - `type` enum('global','quick') DEFAULT NULL, + `type` enum('global','quick','multiple') DEFAULT NULL, PRIMARY KEY (`code`), + UNIQUE KEY `invoiceOutSerial_taxAreaFk_IDX` (`taxAreaFk`,`type`) USING BTREE, KEY `taxAreaFk_idx` (`taxAreaFk`), CONSTRAINT `invoiceOutSeriaTaxArea` FOREIGN KEY (`taxAreaFk`) REFERENCES `taxArea` (`code`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -32480,8 +32501,8 @@ CREATE TABLE `invoiceOutTax` ( UNIQUE KEY `invoiceOutTax_Resctriccion` (`invoiceOutFk`,`pgcFk`), KEY `invoiceOutFk_idx` (`invoiceOutFk`), KEY `pgcFk` (`pgcFk`), - CONSTRAINT `invoiceOutFk` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoiceOutTax_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON UPDATE CASCADE + CONSTRAINT `invoiceOutTax_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON UPDATE CASCADE, + CONSTRAINT `invoiceOutTax_invoiceOut_FK` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -32607,6 +32628,7 @@ CREATE TABLE `item` ( KEY `item_lastUsed_IDX` (`lastUsed`) USING BTREE, KEY `item_expenceFk_idx` (`expenseFk`), KEY `item_fk_editor` (`editorFk`), + KEY `item_itemPackingType_FK` (`itemPackingTypeFk`), CONSTRAINT `item_FK` FOREIGN KEY (`genericFk`) REFERENCES `item` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `item_FK_1` FOREIGN KEY (`typeFk`) REFERENCES `itemType` (`id`), CONSTRAINT `item_expenceFk` FOREIGN KEY (`expenseFk`) REFERENCES `expense` (`id`) ON UPDATE CASCADE, @@ -32614,6 +32636,7 @@ CREATE TABLE `item` ( CONSTRAINT `item_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`), CONSTRAINT `item_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `origin` (`id`) ON UPDATE CASCADE, CONSTRAINT `item_ibfk_2` FOREIGN KEY (`intrastatFk`) REFERENCES `intrastat` (`id`) ON UPDATE CASCADE, + CONSTRAINT `item_itemPackingType_FK` FOREIGN KEY (`itemPackingTypeFk`) REFERENCES `itemPackingType` (`code`) ON UPDATE CASCADE, CONSTRAINT `itemsupplyResponseFk` FOREIGN KEY (`supplyResponseFk`) REFERENCES `edi`.`supplyResponse` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `producer_id` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -33996,8 +34019,9 @@ DROP TABLE IF EXISTS `mandateType`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mandateType` ( `id` smallint(5) NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - PRIMARY KEY (`id`) + `code` varchar(45) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -34459,8 +34483,9 @@ CREATE TABLE `operator` ( `warehouseFk` smallint(6) unsigned NOT NULL DEFAULT 60, `sectorFk` int(11) DEFAULT NULL, `labelerFk` int(10) unsigned DEFAULT NULL, - `linesLimit` int(11) DEFAULT 20 COMMENT 'Límite de lineas en una colección para la asignación de pedidos', + `linesLimit` int(10) unsigned DEFAULT 20 COMMENT 'Límite de lineas en una colección para la asignación de pedidos', `volumeLimit` decimal(10,6) DEFAULT 0.500000 COMMENT 'Límite de volumen en una colección para la asignación de pedidos', + `sizeLimit` int(10) unsigned DEFAULT NULL COMMENT 'Límite de altura en una colección para la asignación de pedidos', `isOnReservationMode` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`workerFk`), KEY `operator_FK` (`workerFk`), @@ -34558,6 +34583,21 @@ SET character_set_client = utf8; 1 AS `name` */; SET character_set_client = @saved_cs_client; +-- +-- Table structure for table `ormConfig` +-- + +DROP TABLE IF EXISTS `ormConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ormConfig` ( + `id` int(11) NOT NULL, + `selectLimit` int(5) NOT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `ormConfig_check` CHECK (`id` = 1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `osTicketConfig` -- @@ -36114,6 +36154,22 @@ CREATE TABLE `punchState` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Table for storing punches that have cars with errors'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `quadMindsApiConfig` +-- + +DROP TABLE IF EXISTS `quadMindsApiConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quadMindsApiConfig` ( + `id` int(10) unsigned NOT NULL, + `url` varchar(255) DEFAULT NULL, + `key` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `quadMindsConfig_check` CHECK (`id` = 1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `quality` -- @@ -36458,11 +36514,18 @@ CREATE TABLE `roadmap` ( `kmEnd` mediumint(9) DEFAULT NULL, `started` datetime DEFAULT NULL, `finished` datetime DEFAULT NULL, + `m3` int(10) unsigned DEFAULT NULL, + `driver2Fk` int(10) unsigned DEFAULT NULL, + `driver1Fk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `userFk` (`userFk`), KEY `roadmap_supplierFk` (`supplierFk`), + KEY `roadmap_worker_FK` (`driver1Fk`), + KEY `roadmap_worker_FK_2` (`driver2Fk`), CONSTRAINT `roadmap_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE, - CONSTRAINT `roadmap_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE + CONSTRAINT `roadmap_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE, + CONSTRAINT `roadmap_worker_FK` FOREIGN KEY (`driver1Fk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, + CONSTRAINT `roadmap_worker_FK_2` FOREIGN KEY (`driver2Fk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Troncales diarios que se contratan'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -37046,14 +37109,17 @@ CREATE TABLE `saleGroup` ( `sectorFk` int(11) DEFAULT NULL, `ticketFk` int(11) DEFAULT NULL, `editorFk` int(10) unsigned DEFAULT NULL, + `stateFk` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `saleGroup_FK` (`ticketFk`), KEY `saleGroup_userFK` (`userFk`), KEY `saleGroup_parkingFK` (`parkingFk`), KEY `saleGroup_sectorFK` (`sectorFk`), + KEY `saleGroup_state_FK` (`stateFk`), CONSTRAINT `saleGroup_FK` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `saleGroup_parkingFK` FOREIGN KEY (`parkingFk`) REFERENCES `parking` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `saleGroup_sectorFK` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `saleGroup_state_FK` FOREIGN KEY (`stateFk`) REFERENCES `state` (`id`) ON UPDATE CASCADE, CONSTRAINT `saleGroup_userFK` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='agrupa lineas de venta'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -38864,7 +38930,6 @@ CREATE TABLE `ticket` ( KEY `ticket_fk_editor` (`editorFk`), KEY `ticket_cmrFk` (`cmrFk`), CONSTRAINT `ticketCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, - CONSTRAINT `ticket_FK` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE, CONSTRAINT `ticket_cmrFk` FOREIGN KEY (`cmrFk`) REFERENCES `cmr` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticket_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticket_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`), @@ -38872,6 +38937,7 @@ CREATE TABLE `ticket` ( CONSTRAINT `ticket_ibfk_6` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticket_ibfk_8` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`), CONSTRAINT `ticket_ibfk_9` FOREIGN KEY (`routeFk`) REFERENCES `route` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `ticket_invoiceOut_FK` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE, CONSTRAINT `tickets_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -44423,73 +44489,33 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(15)) RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** - * Obtiene la serie de de una factura + * Obtiene la serie de una factura * dependiendo del area del cliente. - * + * * @param vClientFk Id del cliente * @param vCompanyFk Id de la empresa - * @param vType Tipo de factura ["R", "M", "G"] - * @return Serie de la factura + * @param vType Tipo de factura ['global','multiple','quick'] + * @return vSerie de la factura */ - DECLARE vTaxArea VARCHAR(25); - DECLARE vSerie CHAR(1); + DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci; + DECLARE vSerie CHAR(2); IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN RETURN 'S'; END IF; - SELECT clientTaxArea(vClientFk, vCompanyFk) INTO vTaxArea; - SELECT invoiceSerialArea(vType,vTaxArea) INTO vSerie; - RETURN vSerie; -END ;; -DELIMITER ; -/*!50003 SET sql_mode = @saved_sql_mode */ ; -/*!50003 SET character_set_client = @saved_cs_client */ ; -/*!50003 SET character_set_results = @saved_cs_results */ ; -/*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; -/*!50003 DROP FUNCTION IF EXISTS `invoiceSerialArea` */; -/*!50003 SET @saved_cs_client = @@character_set_client */ ; -/*!50003 SET @saved_cs_results = @@character_set_results */ ; -/*!50003 SET @saved_col_connection = @@collation_connection */ ; -/*!50003 SET character_set_client = utf8mb4 */ ; -/*!50003 SET character_set_results = utf8mb4 */ ; -/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; -DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci - DETERMINISTIC -BEGIN - DECLARE vSerie CHAR(1); + SELECT addressTaxArea(defaultAddressFk, vCompanyFk) INTO vTaxArea + FROM client + WHERE id = vClientFk; + + SELECT code INTO vSerie + FROM invoiceOutSerial + WHERE `type` = vType AND taxAreaFk = vTaxArea; - IF vType = 'R' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'H' - WHEN 'WORLD' THEN 'E' - ELSE 'T' - END INTO vSerie; - -- Factura multiple - ELSEIF vType = 'M' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'H' - WHEN 'WORLD' THEN 'E' - ELSE 'M' - END INTO vSerie; - -- Factura global - ELSEIF vType = 'G' THEN - SELECT - CASE vTaxArea - WHEN 'CEE' THEN 'V' - WHEN 'WORLD' THEN 'X' - ELSE 'A' - END INTO vSerie; - END IF; RETURN vSerie; END ;; DELIMITER ; @@ -46174,14 +46200,21 @@ BEGIN * @param vSelf Id ticket * @return BOOL */ - DECLARE vIsTooLittle TINYINT(1); - + DECLARE vIsTooLittle BOOL; + + WITH ticketData AS ( + SELECT addressFk, DATE(shipped) dated + FROM vn.ticket + WHERE id = vSelf + ) SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume - AND IFNULL(t.totalWithoutVat, 0) < vc.minTicketValue) INTO vIsTooLittle - FROM ticket t - LEFT JOIN saleVolume sv ON sv.ticketFk = t.id - JOIN volumeConfig vc - WHERE t.id = vSelf; + AND SUM(IFNULL(t.totalWithoutVat, 0)) < vc.minTicketValue) INTO vIsTooLittle + FROM ticketData td + JOIN vn.ticket t ON t.addressFk = td.addressFk + LEFT JOIN vn.saleVolume sv ON sv.ticketFk = t.id + JOIN vn.volumeConfig vc + WHERE t.shipped BETWEEN td.dated AND util.dayEnd(td.dated) + AND ticket_isProblemCalcNeeded(t.id); RETURN vIsTooLittle; END ;; @@ -52524,10 +52557,11 @@ BEGIN DECLARE vWarehouseFk INT; DECLARE vWagons INT; DECLARE vTrainFk INT; - DECLARE vLinesLimit INT DEFAULT NULL; + DECLARE vLinesLimit INT; DECLARE vTicketLines INT; - DECLARE vVolumeLimit DECIMAL DEFAULT NULL; + DECLARE vVolumeLimit DECIMAL; DECLARE vTicketVolume DECIMAL; + DECLARE vSizeLimit INT; DECLARE vMaxTickets INT; DECLARE vStateFk VARCHAR(45); DECLARE vFirstTicketFk INT; @@ -52592,6 +52626,7 @@ BEGIN o.trainFk, o.linesLimit, o.volumeLimit, + o.sizeLimit, pc.collection_new_lockname INTO vMaxTickets, vHasUniqueCollectionTime, @@ -52603,6 +52638,7 @@ BEGIN vTrainFk, vLinesLimit, vVolumeLimit, + vSizeLimit, vLockName FROM productionConfig pc JOIN worker w ON w.id = vUserFk @@ -52687,6 +52723,14 @@ BEGIN JOIN state s ON s.id = pb.state JOIN agencyMode am ON am.id = pb.agencyModeFk JOIN agency a ON a.id = am.agencyFk + LEFT JOIN ( + SELECT pb.ticketFk, MAX(i.`size`) maxSize + FROM tmp.productionBuffer pb + JOIN ticket t ON t.id = pb.ticketfk + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + GROUP BY pb.ticketFk + ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() OR (pb.ubicacion IS NULL AND a.isOwn) @@ -52698,8 +52742,9 @@ BEGIN OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR LENGTH(pb.problem) > 0 - OR (pb.lines >= vLinesLimit AND vLinesLimit IS NOT NULL) - OR (pb.m3 >= vVolumeLimit AND vVolumeLimit IS NOT NULL); + OR pb.lines > vLinesLimit + OR pb.m3 > vVolumeLimit + OR sub.maxSize > vSizeLimit; END IF; -- Es importante que el primer ticket se coja en todos los casos @@ -59182,7 +59227,7 @@ BEGIN AND (vCorrectingSerial = vSerial OR NOT hasAnyNegativeBase()) THEN - -- el trigger añade el siguiente Id_Factura correspondiente a la vSerial + -- el trigger añade el siguiente ref correspondiente a la vSerial INSERT INTO invoiceOut( ref, serial, @@ -62222,28 +62267,26 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_transfer`( ) BEGIN /** - * Transfiere producto de una ubicación a otra, fusionando si coincide el - * packing y la fecha. + * Transfiere producto de una ubicación a otra + * fusionando si coincide el packing y la fecha. * * @param vItemShelvingFk Identificador de itemShelving * @param vShelvingFk Identificador de shelving */ - DECLARE vNewItemShelvingFk INT DEFAULT 0; + DECLARE vNewItemShelvingFk INT; - SELECT MAX(ish.id) - INTO vNewItemShelvingFk + SELECT MAX(ish.id) INTO vNewItemShelvingFk FROM itemShelving ish JOIN ( - SELECT - itemFk, - packing, - created, - buyFk + SELECT itemFk, + packing, + created, + buyFk FROM itemShelving WHERE id = vItemShelvingFk ) ish2 ON ish2.itemFk = ish.itemFk AND ish2.packing = ish.packing - AND date(ish2.created) = date(ish.created) + AND DATE(ish2.created) = DATE(ish.created) AND ish2.buyFk = ish.buyFk WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci; @@ -62256,11 +62299,17 @@ BEGIN DELETE FROM itemShelving WHERE id = vItemShelvingFk; ELSE - UPDATE itemShelving - SET shelvingFk = vShelvingFk - WHERE id = vItemShelvingFk; + IF (SELECT EXISTS(SELECT id FROM shelving + WHERE code = vShelvingFk COLLATE utf8_unicode_ci)) THEN + + UPDATE itemShelving + SET shelvingFk = vShelvingFk + WHERE id = vItemShelvingFk; + ELSE + CALL util.throw('The shelving not exists'); + END IF; END IF; - SELECT true; + SELECT TRUE; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -63950,7 +63999,7 @@ BEGIN SELECT * FROM sales UNION ALL SELECT * FROM orders - ORDER BY shipped DESC, + ORDER BY shipped, (inventorySupplierFk = entityId) DESC, alertLevel DESC, isTicket, @@ -67026,11 +67075,6 @@ proc: BEGIN DECLARE vEndingDate DATETIME; DECLARE vIsTodayRelative BOOLEAN; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - RESIGNAL; - END; - SELECT util.dayEnd(util.VN_CURDATE()) + INTERVAL LEAST(vScopeDays, maxProductionScopeDays) DAY INTO vEndingDate FROM productionConfig; @@ -67284,7 +67328,6 @@ proc: BEGIN DROP TEMPORARY TABLE tmp.productionTicket, tmp.ticket, - tmp.risk, tmp.ticket_problems, tmp.ticketWithPrevia, tItemShelvingStock, @@ -69809,154 +69852,98 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblems`( + vIsTodayRelative tinyint(1) +) BEGIN /** * Calcula los problemas de cada venta para un conjunto de tickets. * * @param vIsTodayRelative Indica si se calcula el disponible como si todo saliera hoy - * @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Identificadores de los tickets a calcular + * @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Tickets a calcular * @return tmp.sale_problems */ - DECLARE vWarehouseFk INT; + DECLARE vWarehouseFk INT; DECLARE vDate DATE; - DECLARE vAvailableCache INT; + DECLARE vAvailableCache INT; DECLARE vVisibleCache INT; DECLARE vDone BOOL; - DECLARE vRequiredComponent INT; - - DECLARE vCursor CURSOR FOR - SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(tt.shipped)) - FROM tmp.sale_getProblems tt - WHERE DATE(tt.shipped) BETWEEN util.VN_CURDATE() - AND util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY; + DECLARE vCursor CURSOR FOR + SELECT DISTINCT warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(shipped)) + FROM tmp.sale_getProblems + WHERE shipped BETWEEN util.VN_CURDATE() + AND util.dayEnd(util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY); DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DELETE tt.* FROM tmp.sale_getProblems tt JOIN ticketObservation tto ON tto.ticketFk = tt.ticketFk - JOIN observationType ot ON ot.id = tto.observationTypeFk - WHERE ot.code = 'administrative' + JOIN observationType ot ON ot.id = tto.observationTypeFk + WHERE ot.code = 'administrative' AND tto.description = 'Miriam'; - CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( - ticketFk INT(11), - saleFk INT(11), - isFreezed INTEGER(1) DEFAULT 0, - risk DECIMAL(10,1) DEFAULT 0, - hasHighRisk TINYINT(1) DEFAULT 0, - hasTicketRequest INTEGER(1) DEFAULT 0, - itemShortage VARCHAR(255), - isTaxDataChecked INTEGER(1) DEFAULT 1, - itemDelay VARCHAR(255), - itemLost VARCHAR(255), - hasComponentLack INTEGER(1), - hasRounding VARCHAR(255), - isTooLittle BOOL DEFAULT FALSE, - isVip BOOL DEFAULT FALSE, - PRIMARY KEY (ticketFk, saleFk) - ) ENGINE = MEMORY; + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( + ticketFk INT(11), + saleFk INT(11), + isFreezed INTEGER(1) DEFAULT 0, + risk DECIMAL(10,1) DEFAULT 0, + hasRisk TINYINT(1) DEFAULT 0, + hasHighRisk TINYINT(1) DEFAULT 0, + hasTicketRequest INTEGER(1) DEFAULT 0, + itemShortage VARCHAR(255), + isTaxDataChecked INTEGER(1) DEFAULT 1, + itemDelay VARCHAR(255), + itemLost VARCHAR(255), + hasComponentLack INTEGER(1), + hasRounding VARCHAR(255), + isTooLittle BOOL DEFAULT FALSE, + isVip BOOL DEFAULT FALSE, + PRIMARY KEY (ticketFk, saleFk) + ) ENGINE = MEMORY; - CREATE OR REPLACE TEMPORARY TABLE tmp.ticket_list - (PRIMARY KEY (ticketFk)) - ENGINE = MEMORY - SELECT ticketFk, clientFk - FROM tmp.sale_getProblems; + INSERT INTO tmp.sale_problems(ticketFk, + saleFk, + isFreezed, + risk, + hasRisk, + hasHighRisk, + hasTicketRequest, + isTaxDataChecked, + hasComponentLack, + hasRounding, + isTooLittle) + SELECT sgp.ticketFk, + s.id, + IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed, + t.risk, + IF(FIND_IN_SET('hasRisk', t.problem), TRUE, FALSE) hasRisk, + IF(FIND_IN_SET('hasHighRisk', t.problem), TRUE, FALSE) hasHighRisk, + IF(FIND_IN_SET('hasTicketRequest', t.problem), TRUE, FALSE) hasTicketRequest, + IF(FIND_IN_SET('isTaxDataChecked', t.problem), FALSE, TRUE) isTaxDataChecked, + IF(FIND_IN_SET('hasComponentLack', s.problem), TRUE, FALSE) hasComponentLack, + IF(FIND_IN_SET('hasRounding', s.problem), + LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250), + NULL + ) hasRounding, + IF(FIND_IN_SET('isTooLittle', t.problem) + AND util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE, + TRUE, FALSE) isTooLittle + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk + LEFT JOIN sale s ON s.ticketFk = t.id + LEFT JOIN item i ON i.id = s.itemFk + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + AND zc.dated = util.VN_CURDATE() + WHERE s.problem <> '' OR t.problem <> '' OR t.risk + GROUP BY t.id, s.id; - SELECT COUNT(*) INTO vRequiredComponent - FROM component - WHERE isRequired; - - -- Too Little - INSERT INTO tmp.sale_problems(ticketFk, isTooLittle) - SELECT tp.ticketFk, TRUE - FROM tmp.sale_getProblems tp - JOIN ticket t ON t.id = tp.ticketFk - JOIN ( - SELECT t.addressFk, - SUM(ROUND(`ic`.`cm3delivery` * `s`.`quantity` / 1000, 0)) litros, - t.totalWithoutVat - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN sale s ON s.ticketFk = t.id - AND s.quantity > 0 - JOIN itemCost ic ON ic.itemFk = s.itemFk - AND ic.warehouseFk = t.warehouseFk - JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk - AND zc.dated = util.VN_CURDATE() - JOIN agencyMode am ON am.id = t.agencyModeFk - JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk - WHERE util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE - AND dm.code IN ('AGENCY','DELIVERY','PICKUP') - AND t.shipped BETWEEN util.VN_CURDATE() AND util.midnight() - GROUP BY t.addressFk - ) sub ON sub.addressFk = t.addressFk - JOIN volumeConfig vc - WHERE sub.litros < vc.minTicketVolume - AND sub.totalWithoutVat < vc.minTicketValue; - - -- VIP INSERT INTO tmp.sale_problems(ticketFk, isVip) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk + SELECT sgp.ticketFk, TRUE + FROM tmp.sale_getProblems sgp + JOIN client c ON c.id = sgp.clientFk WHERE c.businessTypeFk = 'VIP' - ON DUPLICATE KEY UPDATE isVip = TRUE; - - -- Faltan componentes - INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk) - SELECT t.id, COUNT(c.id) < vRequiredComponent hasComponentLack, s.id - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN sale s ON s.ticketFk = t.id - JOIN agencyMode am ON am.id = t.agencyModeFk - JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk - LEFT JOIN saleComponent sc ON sc.saleFk = s.id - LEFT JOIN component c ON c.id = sc.componentFk - AND c.isRequired - WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP') - AND s.quantity > 0 - GROUP BY s.id - HAVING hasComponentLack; - - -- Cliente congelado - INSERT INTO tmp.sale_problems(ticketFk, isFreezed) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk - WHERE c.isFreezed - ON DUPLICATE KEY UPDATE isFreezed = c.isFreezed; - - -- Credit exceeded - CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt - (PRIMARY KEY (clientFk)) - ENGINE = MEMORY - SELECT DISTINCT clientFk - FROM tmp.ticket_list; - - CALL client_getDebt(util.VN_CURDATE()); - - INSERT INTO tmp.sale_problems(ticketFk, risk, hasHighRisk) - SELECT DISTINCT tl.ticketFk, r.risk, ((r.risk - cc.riskTolerance) > c.credit + 10) - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - JOIN agencyMode a ON t.agencyModeFk = a.id - JOIN tmp.risk r ON r.clientFk = t.clientFk - JOIN client c ON c.id = t.clientFk - JOIN clientConfig cc - WHERE r.risk > c.credit + 10 - AND NOT a.isRiskFree - ON DUPLICATE KEY UPDATE - risk = r.risk, hasHighRisk = ((r.risk - cc.riskTolerance) > c.credit + 10); - - -- Antiguo COD 100, son peticiones de compra sin terminar - INSERT INTO tmp.sale_problems(ticketFk, hasTicketRequest) - SELECT DISTINCT tl.ticketFk, TRUE - FROM tmp.ticket_list tl - JOIN ticketRequest tr ON tr.ticketFk = tl.ticketFk - WHERE tr.isOK IS NULL - ON DUPLICATE KEY UPDATE hasTicketRequest = TRUE; + ON DUPLICATE KEY UPDATE isVIP = TRUE; CREATE OR REPLACE TEMPORARY TABLE tItemShelvingStock_byWarehouse (INDEX (itemFk, warehouseFk)) @@ -69968,10 +69955,9 @@ BEGIN JOIN shelving sh ON sh.code = ish.shelvingFk JOIN parking p ON p.id = sh.parkingFk JOIN sector s ON s.id = p.sectorFk - GROUP BY ish.itemFk, - s.warehouseFk; + GROUP BY ish.itemFk, s.warehouseFk; - -- Disponible, Faltas, Inventario y Retrasos + -- Disponible, faltas, inventario y retrasos OPEN vCursor; l: LOOP SET vDone = FALSE; @@ -69990,14 +69976,14 @@ BEGIN INSERT INTO tmp.sale_problems(ticketFk, itemShortage, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, - LEFT(CONCAT('F: ',GROUP_CONCAT(i.id, ' ', i.longName, ' ')),250) problem, - s.id AS saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + SELECT sgp.ticketFk, + LEFT(CONCAT('F: ', GROUP_CONCAT(i.id, ' ', i.longName, ' ')), 250) problem, + s.id saleFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = i.id AND v.calc_id = vVisibleCache @@ -70005,8 +69991,8 @@ BEGIN AND av.calc_id = vAvailableCache LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk - WHERE IFNULL(v.visible,0) < s.quantity - AND IFNULL(av.available ,0) < s.quantity + WHERE IFNULL(v.visible, 0) < s.quantity + AND IFNULL(av.available, 0) < s.quantity AND IFNULL(issw.visible, 0) < s.quantity AND NOT s.isPicked AND NOT s.reserved @@ -70015,27 +70001,27 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk) sub + GROUP BY sgp.ticketFk) sub ON DUPLICATE KEY UPDATE itemShortage = sub.problem, saleFk = sub.saleFk; -- Inventario: Visible suficiente, pero ubicado menor a la cantidad vendida INSERT INTO tmp.sale_problems(ticketFk, itemLost, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, + SELECT sgp.ticketFk, LEFT(GROUP_CONCAT('I: ', i.id, ' ', i.longName, ' '), 250) problem, s.id saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = s.itemFk AND v.calc_id = vVisibleCache LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk - WHERE IFNULL(v.visible,0) >= s.quantity + WHERE IFNULL(v.visible, 0) >= s.quantity AND IFNULL(issw.visible, 0) < s.quantity AND s.quantity > 0 AND NOT s.isPicked @@ -70045,22 +70031,22 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk + GROUP BY sgp.ticketFk ) sub - ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; + ON DUPLICATE KEY UPDATE itemLost = sub.problem, saleFk = sub.saleFk; -- Retraso: Disponible suficiente, pero no visible ni ubicado INSERT INTO tmp.sale_problems(ticketFk, itemDelay, saleFk) SELECT ticketFk, problem, saleFk FROM ( - SELECT tl.ticketFk, + SELECT sgp.ticketFk, LEFT(GROUP_CONCAT('R: ', i.id, ' ', i.longName, ' '), 250) problem, s.id saleFk - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk JOIN sale s ON s.ticketFk = t.id JOIN item i ON i.id = s.itemFk - JOIN itemType it on it.id = i.typeFk + JOIN itemType it ON it.id = i.typeFk JOIN itemCategory ic ON ic.id = it.categoryFk LEFT JOIN cache.visible v ON v.item_id = s.itemFk AND v.calc_id = vVisibleCache @@ -70079,43 +70065,28 @@ BEGIN AND NOT i.generic AND util.VN_CURDATE() = vDate AND t.warehouseFk = vWarehouseFk - GROUP BY tl.ticketFk + GROUP BY sgp.ticketFk ) sub ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; - - -- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra - CALL buy_getUltimate(NULL, vWarehouseFk, vDate); - INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) - SELECT ticketFk, problem ,saleFk - FROM ( - SELECT tl.ticketFk, - s.id saleFk, - LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem - FROM tmp.ticket_list tl - JOIN ticket t ON t.id = tl.ticketFk - AND t.warehouseFk = vWarehouseFk - JOIN sale s ON s.ticketFk = tl.ticketFk - JOIN item i ON i.id = s.itemFk - JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk - JOIN buy b ON b.id = bu.buyFk - WHERE MOD(s.quantity, b.`grouping`) - GROUP BY tl.ticketFk - )sub - ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; END LOOP; CLOSE vCursor; - - INSERT INTO tmp.sale_problems(ticketFk, isTaxDataChecked) - SELECT DISTINCT tl.ticketFk, FALSE - FROM tmp.ticket_list tl - JOIN client c ON c.id = tl.clientFk - WHERE NOT c.isTaxDataChecked - ON DUPLICATE KEY UPDATE isTaxDataChecked = FALSE; - DROP TEMPORARY TABLE - tmp.clientGetDebt, - tmp.ticket_list, - tItemShelvingStock_byWarehouse; + INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) + SELECT ticketFk, problem, saleFk + FROM ( + SELECT sgp.ticketFk, + s.id saleFk, + LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem + FROM tmp.sale_getProblems sgp + JOIN ticket t ON t.id = sgp.ticketFk + JOIN sale s ON s.ticketFk = sgp.ticketFk + JOIN item i ON i.id = s.itemFk + WHERE FIND_IN_SET('hasRounding', s.problem) + GROUP BY sgp.ticketFk + ) sub + ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; + + DROP TEMPORARY TABLE tItemShelvingStock_byWarehouse; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -70140,8 +70111,7 @@ BEGIN * * @return Problems result */ - DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems; - CREATE TEMPORARY TABLE tmp.sale_getProblems + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems (INDEX (ticketFk)) ENGINE = MEMORY SELECT t.id ticketFk, t.clientFk, t.warehouseFk, t.shipped @@ -70659,6 +70629,94 @@ DELIMITER ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `sale_setProblemRoundingByBuy` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_setProblemRoundingByBuy`( + vBuyFk INT +) +BEGIN +/** + * Update rounding problem for all sales related to a buy. + * + * @param vBuyFk Buy id + */ + DECLARE vItemFk INT; + DECLARE vWarehouseFk INT; + DECLARE vMaxDated DATE; + DECLARE vMinDated DATE; + DECLARE vLanding DATE; + DECLARE vLastBuy INT; + DECLARE vCurrentBuy INT; + DECLARE vGrouping INT; + + SELECT b.itemFk, t.warehouseInFk + INTO vItemFk, vWarehouseFk + FROM buy b + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + WHERE b.id = vBuyFk; + + IF vItemFk AND vWarehouseFk THEN + SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped)) + INTO vMaxDated, vMinDated + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + WHERE t.shipped >= util.VN_CURDATE() + AND s.itemFk = vItemFk + AND s.quantity > 0; + + CALL buy_getUltimate(vItemFk, vWarehouseFk, vMinDated); + + SELECT bu.buyFk, b.grouping INTO vLastBuy, vGrouping + FROM tmp.buyUltimate bu + JOIN buy b ON b.id = bu.buyFk; + + DROP TEMPORARY TABLE tmp.buyUltimate; + + SET vLanding = vMaxDated; + + WHILE vCurrentBuy <> vLastBuy OR vLanding > vMinDated DO + SET vMaxDated = vLanding - INTERVAL 1 DAY; + + CALL buy_getUltimate(vItemFk, vWarehouseFk, vMaxDated); + + SELECT buyFk, landing + INTO vCurrentBuy, vLanding + FROM tmp.buyUltimate; + + DROP TEMPORARY TABLE tmp.buyUltimate; + END WHILE; + + CREATE OR REPLACE TEMPORARY TABLE tmp.sale + (INDEX(saleFk, isProblemCalcNeeded)) + ENGINE = MEMORY + SELECT s.id saleFk, + MOD(s.quantity, vGrouping) hasProblem, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + WHERE s.itemFk = vItemFk + AND s.quantity > 0 + AND t.shipped BETWEEN vMinDated AND util.dayEnd(vMaxDated); + + CALL sale_setProblem('hasRounding'); + + DROP TEMPORARY TABLE tmp.sale; + END IF; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `sectorCollectionSaleGroup_add` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -74410,7 +74468,7 @@ DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_close`() BEGIN /** - * Realiza el cierre de todos los + * Realiza el cierre de todos los * tickets de la tabla tmp.ticket_close. * * @table tmp.ticket_close(ticketFk) Identificadores de los tickets a cerrar @@ -74428,7 +74486,7 @@ BEGIN DECLARE cur CURSOR FOR SELECT ticketFk FROM tmp.ticket_close; - + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN RESIGNAL; @@ -74438,7 +74496,7 @@ BEGIN proc: LOOP SET vDone = FALSE; - + FETCH cur INTO vCurTicketFk; IF vDone THEN @@ -74455,12 +74513,12 @@ BEGIN c.hasToInvoice INTO vClientFk, vIsTaxDataChecked, - vCompanyFk, + vCompanyFk, vShipped, vHasDailyInvoice, vWithPackage, vHasToInvoice - FROM ticket t + FROM ticket t JOIN `client` c ON c.id = t.clientFk JOIN province p ON p.id = c.provinceFk LEFT JOIN autonomy a ON a.id = p.autonomyFk @@ -74470,7 +74528,7 @@ BEGIN INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity) (SELECT vCurTicketFk, p.id, COUNT(*) - FROM expedition e + FROM expedition e JOIN packaging p ON p.id = e.packagingFk JOIN ticket t ON t.id = e.ticketFk LEFT JOIN agencyMode am ON am.id = t.agencyModeFk @@ -74481,15 +74539,15 @@ BEGIN GROUP BY p.itemFk); -- No retornables o no catalogados - INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed) + INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed) (SELECT e.freightItemFk, vCurTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.freightItemFk, vClientFk), 1 - FROM expedition e + FROM expedition e JOIN item i ON i.id = e.freightItemFk LEFT JOIN packaging p ON p.itemFk = i.id WHERE e.ticketFk = vCurTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0 AND getSpecialPrice(e.freightItemFk, vClientFk) > 0 GROUP BY e.freightItemFk); - + IF(vHasDailyInvoice) AND vHasToInvoice THEN -- Facturacion rapida @@ -74497,10 +74555,10 @@ BEGIN -- Facturar si está contabilizado IF vIsTaxDataChecked THEN CALL invoiceOut_newFromClient( - vClientFk, - (SELECT invoiceSerial(vClientFk, vCompanyFk, 'M')), - vShipped, - vCompanyFk, + vClientFk, + (SELECT invoiceSerial(vClientFk, vCompanyFk, 'multiple')), + vShipped, + vCompanyFk, NULL, NULL, vNewInvoiceId); @@ -75215,7 +75273,9 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getProblems`(IN vIsTodayRelative tinyint(1)) +CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getProblems`( + vIsTodayRelative tinyint(1) +) BEGIN /** * Calcula los problemas para un conjunto de tickets. @@ -75232,6 +75292,7 @@ BEGIN SELECT ticketFk, MAX(isFreezed) isFreezed, MAX(risk) risk, + MAX(hasRisk) hasRisk, MAX(hasHighRisk) hasHighRisk, MAX(hasTicketRequest) hasTicketRequest, MAX(itemShortage) itemShortage, @@ -75246,19 +75307,19 @@ BEGIN FROM tmp.sale_problems GROUP BY ticketFk; - UPDATE tmp.ticket_problems tp - SET tp.totalProblems = ( - (tp.isFreezed) + - IF(tp.risk,TRUE, FALSE) + - (tp.hasTicketRequest) + - (tp.isTaxDataChecked = 0) + - (tp.hasComponentLack) + - (tp.itemDelay) + - (tp.isTooLittle) + - (tp.itemLost) + - (tp.hasRounding) + - (tp.itemShortage) + - (tp.isVip) + UPDATE tmp.ticket_problems + SET totalProblems = ( + (isFreezed) + + (hasRisk) + + (hasTicketRequest) + + (!isTaxDataChecked) + + (hasComponentLack) + + (itemDelay IS NOT NULL) + + (isTooLittle) + + (itemLost IS NOT NULL) + + (hasRounding IS NOT NULL) + + (itemShortage IS NOT NULL) + + (isVip) ); DROP TEMPORARY TABLE tmp.sale_problems; @@ -75895,16 +75956,28 @@ BEGIN DECLARE vTicketFk INT; DECLARE cTickets CURSOR FOR - SELECT id FROM ticket - WHERE refFk IS NULL - AND ((vScope = 'client' AND clientFk = vId) - OR (vScope = 'address' AND addressFk = vId)); + SELECT DISTINCT t.id + FROM ticket t + LEFT JOIN tItems ti ON ti.id = t.id + WHERE t.refFk IS NULL + AND ((vScope = 'client' AND t.clientFk = vId) + OR (vScope = 'address' AND t.addressFk = vId) + OR (vScope = 'item' AND ti.id) + ); - DECLARE CONTINUE HANDLER FOR NOT FOUND - SET vDone = TRUE; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + CREATE OR REPLACE TEMPORARY TABLE tItems + (PRIMARY KEY (id)) + ENGINE = MEMORY + SELECT DISTINCT t.id + FROM ticket t + JOIN sale s ON s.ticketFk = t.id + JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk + WHERE t.refFk IS NULL + AND (vScope = 'item' AND itc.itemFk = vId); OPEN cTickets; - myLoop: LOOP SET vDone = FALSE; FETCH cTickets INTO vTicketFk; @@ -75915,8 +75988,9 @@ BEGIN CALL ticket_recalc(vTicketFk, NULL); END LOOP; - CLOSE cTickets; + + DROP TEMPORARY TABLE tItems; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -76458,18 +76532,28 @@ BEGIN * * @param vSelf Id del ticket */ - + DECLARE vTicketIsTooLittle BOOL; + + SELECT ticket_isTooLittle(vSelf) INTO vTicketIsTooLittle; + CREATE OR REPLACE TEMPORARY TABLE tmp.ticket (INDEX(ticketFk, isProblemCalcNeeded)) ENGINE = MEMORY - SELECT vSelf ticketFk, - ticket_isTooLittle(vSelf) hasProblem, - ticket_isProblemCalcNeeded(vSelf) isProblemCalcNeeded; - + WITH ticketData AS ( + SELECT addressFk, DATE(shipped) dated + FROM vn.ticket + WHERE id = vSelf + ) + SELECT t.id ticketFk, + vTicketIsTooLittle hasProblem, + ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded + FROM vn.ticket t + JOIN ticketData td ON td.addressFk = t.addressFk + WHERE t.shipped BETWEEN td.dated AND util.dayEnd(td.dated); + CALL ticket_setProblem('isTooLittle'); DROP TEMPORARY TABLE tmp.ticket; - END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -90739,7 +90823,7 @@ USE `vn2008`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `mandato_tipo` AS select `m`.`id` AS `idmandato_tipo`,`m`.`name` AS `Nombre` from `vn`.`mandateType` `m` */; +/*!50001 VIEW `mandato_tipo` AS select `m`.`id` AS `idmandato_tipo`,`m`.`code` AS `Nombre` from `vn`.`mandateType` `m` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -91419,4 +91503,4 @@ USE `vn2008`; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-08-20 7:45:07 +-- Dump completed on 2024-09-04 7:00:41 diff --git a/db/dump/.dump/triggers.sql b/db/dump/.dump/triggers.sql index a968277b9..70ef63cf4 100644 --- a/db/dump/.dump/triggers.sql +++ b/db/dump/.dump/triggers.sql @@ -1502,6 +1502,134 @@ USE `srt`; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_beforeInsert` + BEFORE INSERT ON `buffer` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_beforeUpdate` + BEFORE UPDATE ON `buffer` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_afterDelete` + AFTER DELETE ON `buffer` + FOR EACH ROW +BEGIN + INSERT INTO buffer + SET `action` = 'delete', + `changedModel` = 'Buffer', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_beforeInsert` + BEFORE INSERT ON `config` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_beforeUpdate` + BEFORE UPDATE ON `config` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_afterDelete` + AFTER DELETE ON `config` + FOR EACH ROW +BEGIN + INSERT INTO config + SET `action` = 'delete', + `changedModel` = 'Config', + `changedModelId` = OLD.id, + `userFk` = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW @@ -5419,11 +5547,32 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeInsert` + BEFORE INSERT ON `host` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeUpdate` BEFORE UPDATE ON `host` FOR EACH ROW BEGIN SET new.updated = util.VN_NOW(); + SET NEW.editorFk = account.myUser_getId(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -7793,6 +7942,54 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeInsert` + BEFORE INSERT ON `roadmap` + FOR EACH ROW +BEGIN + IF NEW.driver1Fk IS NOT NULL THEN + SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk); + ELSE + SET NEW.driverName = NULL; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeUpdate` + BEFORE UPDATE ON `roadmap` + FOR EACH ROW +BEGIN + IF NEW.driver1Fk IS NOT NULL THEN + SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk); + ELSE + SET NEW.driverName = NULL; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeInsert` BEFORE INSERT ON `roadmapStop` FOR EACH ROW BEGIN @@ -11212,4 +11409,4 @@ USE `vn2008`; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-08-20 7:45:23 +-- Dump completed on 2024-09-04 7:01:01 From 32815bad510a4b0767076dc18080c9021abca2e6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 4 Sep 2024 09:24:07 +0200 Subject: [PATCH 215/250] revert(salix): rollback limit query --- loopback/common/models/vn-model.js | 30 +++++++++++++++--------------- loopback/server/boot/orm.js | 12 ++++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 6fcb6f0e3..a11bed11d 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -27,25 +27,25 @@ module.exports = function(Self) { }; }); - // this.beforeRemote('**', async ctx => { - // if (!this.hasFilter(ctx)) return; + this.beforeRemote('**', async ctx => { + if (!this.hasFilter(ctx)) return; - // const defaultLimit = this.app.orm.selectLimit; - // const filter = ctx.args.filter || {limit: defaultLimit}; + const defaultLimit = this.app.orm.selectLimit; + const filter = ctx.args.filter || {limit: defaultLimit}; - // if (filter.limit > defaultLimit) { - // filter.limit = defaultLimit; - // ctx.args.filter = filter; - // } - // }); + if (filter.limit > defaultLimit) { + filter.limit = defaultLimit; + ctx.args.filter = filter; + } + }); - // this.afterRemote('**', async ctx => { - // if (!this.hasFilter(ctx)) return; + this.afterRemote('**', async ctx => { + if (!this.hasFilter(ctx)) return; - // const {result} = ctx; - // const length = Array.isArray(result) ? result.length : result ? 1 : 0; - // if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); - // }); + const {result} = ctx; + const length = Array.isArray(result) ? result.length : result ? 1 : 0; + if (length >= this.app.orm.selectLimit) throw new UserError('Too many records'); + }); // Register field ACL validation /* diff --git a/loopback/server/boot/orm.js b/loopback/server/boot/orm.js index ccd9d4eca..8bbd969e1 100644 --- a/loopback/server/boot/orm.js +++ b/loopback/server/boot/orm.js @@ -1,6 +1,6 @@ -// module.exports = async function(app) { -// if (!app.orm) { -// const ormConfig = await app.models.OrmConfig.findOne(); -// app.orm = ormConfig; -// } -// }; +module.exports = async function(app) { + if (!app.orm) { + const ormConfig = await app.models.OrmConfig.findOne(); + app.orm = ormConfig; + } +}; From 8311795fd8dd9dac88b718df423129b589b9ed09 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 4 Sep 2024 12:16:42 +0200 Subject: [PATCH 216/250] refactor: refs #7524 dynamic fetch --- modules/ticket/front/sale-tracking/index.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html index f05cf15fb..3bf35ae39 100644 --- a/modules/ticket/front/sale-tracking/index.html +++ b/modules/ticket/front/sale-tracking/index.html @@ -6,16 +6,6 @@ order="concept ASC, quantity DESC" auto-load="true"> - - - - @@ -208,7 +198,7 @@ Date: Wed, 4 Sep 2024 12:23:01 +0200 Subject: [PATCH 217/250] fix: ticket #216260 buy_recalcPrices --- .../vn/procedures/buy_recalcPrices.sql | 75 ++++++++++--------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index 35eb00cf1..c63e7c55c 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -2,51 +2,56 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() BEGIN /** - * Recalcula los precios para las compras insertadas en tmp.buyRecalc + * Recalcula los precios para las compras insertadas en tmp.buyRecalc. * * @param tmp.buyRecalc (id) */ DECLARE vLanded DATE; DECLARE vWarehouseFk INT; - DECLARE vHasNotPrice BOOL; - DECLARE vBuyingValue DECIMAL(10,4); - DECLARE vPackagingFk VARCHAR(10); DECLARE vIsWarehouseFloramondo BOOL; + DECLARE vDone BOOL; + DECLARE vTravels CURSOR FOR + SELECT t.landed, t.warehouseInFk, (w.code = 'flm') + FROM tmp.buyRecalc br + JOIN buy b ON b.id = br.id + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + JOIN warehouse w ON w.id = t.warehouseInFk + GROUP BY t.landed, t.warehouseInFk, (w.code = 'flm'); - SELECT t.landed, t.warehouseInFk, (w.`name` = 'Floramondo') - INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo - FROM tmp.buyRecalc br - JOIN buy b ON b.id = br.id - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - JOIN warehouse w ON w.id = t.warehouseInFk - LIMIT 1; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - CALL rate_getPrices(vLanded, vWarehouseFk); + OPEN vTravels; + l: LOOP + SET vDone = FALSE; + FETCH vTravels INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo; - UPDATE buy b - JOIN tmp.buyRecalc br ON br.id = b.id AND (@buyId := b.id) - LEFT JOIN packaging p ON p.id = b.packagingFk - JOIN item i ON i.id = b.itemFk - JOIN entry e ON e.id = b.entryFk - JOIN itemType it ON it.id = i.typeFk - JOIN travel tr ON tr.id = e.travelFk - JOIN agencyMode am ON am.id = tr.agencyModeFk - JOIN tmp.rate r - JOIN volumeConfig vc - SET b.freightValue = @PF:= IFNULL(((am.m3 * @m3:= item_getVolume(b.itemFk, b.packagingFk) / 1000000) - / b.packing) * IF(am.hasWeightVolumetric, GREATEST(b.weight / @m3 / vc.aerealVolumetricDensity, 1), 1), 0), - b.comissionValue = @CF:= ROUND(IFNULL(e.commission * b.buyingValue / 100, 0), 3), - b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), - b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 - b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), - b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + IF vDone THEN + LEAVE l; + END IF; - SELECT (b.buyingValue = b.price2), b.buyingValue, b.packagingFk - INTO vHasNotPrice, vBuyingValue, vPackagingFk - FROM vn.buy b - WHERE b.id = @buyId AND b.buyingValue <> 0.01; + CALL rate_getPrices(vLanded, vWarehouseFk); - DROP TEMPORARY TABLE tmp.rate; + UPDATE buy b + JOIN tmp.buyRecalc br ON br.id = b.id AND (@buyId := b.id) + LEFT JOIN packaging p ON p.id = b.packagingFk + JOIN item i ON i.id = b.itemFk + JOIN entry e ON e.id = b.entryFk + JOIN itemType it ON it.id = i.typeFk + JOIN travel tr ON tr.id = e.travelFk + JOIN agencyMode am ON am.id = tr.agencyModeFk + JOIN tmp.rate r + JOIN volumeConfig vc + SET b.freightValue = @PF:= IFNULL(((am.m3 * @m3:= item_getVolume(b.itemFk, b.packagingFk) / 1000000) + / b.packing) * IF(am.hasWeightVolumetric, GREATEST(b.weight / @m3 / vc.aerealVolumetricDensity, 1), 1), 0), + b.comissionValue = @CF:= ROUND(IFNULL(e.commission * b.buyingValue / 100, 0), 3), + b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), + b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 + b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), + b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + + DROP TEMPORARY TABLE tmp.rate; + END LOOP; + CLOSE vTravels; END$$ DELIMITER ; From 297eb30395cbfc1d4202b67f5ee6bb823cce24b1 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 12:41:44 +0200 Subject: [PATCH 218/250] fix: ticket #216260 buy_recalcPrices --- db/routines/vn/procedures/buy_recalcPrices.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index c63e7c55c..d4f205595 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -17,7 +17,7 @@ BEGIN JOIN entry e ON e.id = b.entryFk JOIN travel t ON t.id = e.travelFk JOIN warehouse w ON w.id = t.warehouseInFk - GROUP BY t.landed, t.warehouseInFk, (w.code = 'flm'); + GROUP BY t.landed, t.warehouseInFk; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; @@ -48,7 +48,9 @@ BEGIN b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), - b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2) + WHERE t.landed = vLanded + AND t.warehouseInFk = vWarehouseFk; DROP TEMPORARY TABLE tmp.rate; END LOOP; From afcb590a9e790ecac64bb72926ef40ab89a4d32f Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 12:45:33 +0200 Subject: [PATCH 219/250] fix: ticket #216260 buy_recalcPrices --- db/routines/vn/procedures/buy_recalcPrices.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index d4f205595..b05a9bfa9 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -49,8 +49,8 @@ BEGIN b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2) - WHERE t.landed = vLanded - AND t.warehouseInFk = vWarehouseFk; + WHERE tr.landed = vLanded + AND tr.warehouseInFk = vWarehouseFk; DROP TEMPORARY TABLE tmp.rate; END LOOP; From cb24ca9f8275453de82e6a9d32e24a0ad16cc877 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 4 Sep 2024 13:36:57 +0200 Subject: [PATCH 220/250] fix: hotfix --- print/templates/reports/sepa-core/sql/supplier.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/print/templates/reports/sepa-core/sql/supplier.sql b/print/templates/reports/sepa-core/sql/supplier.sql index da543147a..e7bede26d 100644 --- a/print/templates/reports/sepa-core/sql/supplier.sql +++ b/print/templates/reports/sepa-core/sql/supplier.sql @@ -7,8 +7,8 @@ SELECT m.code mandateCode, sp.name province, ad.value accountDetailValue FROM client c - JOIN mandate m ON m.clientFk = c.id - JOIN mandateType mt ON mt.id = m.mandateTypeFk + JOIN mandate m ON m.clientFk = c.id + JOIN mandateType mt ON mt.id = m.mandateTypeFk JOIN supplier s ON s.id = m.companyFk LEFT JOIN country sc ON sc.id = s.countryFk LEFT JOIN province sp ON sp.id = s.provinceFk @@ -18,7 +18,7 @@ SELECT m.code mandateCode, WHERE m.companyFk = ? AND m.finished IS NULL AND c.id = ? - AND mt.name = 'CORE' + AND mt.code = 'CORE' AND adt.description = 'Referencia Remesas' GROUP BY m.id, ad.value - ORDER BY m.created DESC \ No newline at end of file + ORDER BY m.created DESC From e574f0060a78aa0c4d9ea2f27707262883bae73d Mon Sep 17 00:00:00 2001 From: Pako Date: Wed, 4 Sep 2024 13:37:13 +0200 Subject: [PATCH 221/250] hotfix --- .../vn/procedures/sale_getProblems.sql | 65 +++++++++---------- .../11205-grayCymbidium/00-firstScript.sql | 2 + 2 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 db/versions/11205-grayCymbidium/00-firstScript.sql diff --git a/db/routines/vn/procedures/sale_getProblems.sql b/db/routines/vn/procedures/sale_getProblems.sql index 8df28dbc0..7c5204e0d 100644 --- a/db/routines/vn/procedures/sale_getProblems.sql +++ b/db/routines/vn/procedures/sale_getProblems.sql @@ -23,43 +23,36 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DELETE tt.* - FROM tmp.sale_getProblems tt - JOIN ticketObservation tto ON tto.ticketFk = tt.ticketFk - JOIN observationType ot ON ot.id = tto.observationTypeFk - WHERE ot.code = 'administrative' - AND tto.description = 'Miriam'; + CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( + ticketFk INT(11), + saleFk INT(11), + isFreezed INTEGER(1) DEFAULT 0, + risk DECIMAL(10,1) DEFAULT 0, + hasRisk TINYINT(1) DEFAULT 0, + hasHighRisk TINYINT(1) DEFAULT 0, + hasTicketRequest INTEGER(1) DEFAULT 0, + itemShortage VARCHAR(255), + isTaxDataChecked INTEGER(1) DEFAULT 1, + itemDelay VARCHAR(255), + itemLost VARCHAR(255), + hasComponentLack INTEGER(1), + hasRounding VARCHAR(255), + isTooLittle BOOL DEFAULT FALSE, + isVip BOOL DEFAULT FALSE, + PRIMARY KEY (ticketFk, saleFk) + ) ENGINE = MEMORY; - CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems ( - ticketFk INT(11), - saleFk INT(11), - isFreezed INTEGER(1) DEFAULT 0, - risk DECIMAL(10,1) DEFAULT 0, - hasRisk TINYINT(1) DEFAULT 0, - hasHighRisk TINYINT(1) DEFAULT 0, - hasTicketRequest INTEGER(1) DEFAULT 0, - itemShortage VARCHAR(255), - isTaxDataChecked INTEGER(1) DEFAULT 1, - itemDelay VARCHAR(255), - itemLost VARCHAR(255), - hasComponentLack INTEGER(1), - hasRounding VARCHAR(255), - isTooLittle BOOL DEFAULT FALSE, - isVip BOOL DEFAULT FALSE, - PRIMARY KEY (ticketFk, saleFk) - ) ENGINE = MEMORY; - - INSERT INTO tmp.sale_problems(ticketFk, - saleFk, - isFreezed, - risk, - hasRisk, - hasHighRisk, - hasTicketRequest, - isTaxDataChecked, - hasComponentLack, - hasRounding, - isTooLittle) + INSERT INTO tmp.sale_problems(ticketFk, + saleFk, + isFreezed, + risk, + hasRisk, + hasHighRisk, + hasTicketRequest, + isTaxDataChecked, + hasComponentLack, + hasRounding, + isTooLittle) SELECT sgp.ticketFk, s.id, IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed, diff --git a/db/versions/11205-grayCymbidium/00-firstScript.sql b/db/versions/11205-grayCymbidium/00-firstScript.sql new file mode 100644 index 000000000..ba3ab60e1 --- /dev/null +++ b/db/versions/11205-grayCymbidium/00-firstScript.sql @@ -0,0 +1,2 @@ +-- Place your SQL code here +ALTER TABLE dipole.expedition_PrintOut MODIFY COLUMN isPrinted int(11) DEFAULT 0 NOT NULL COMMENT '0.- Not Printed ; 1.- Printed; 2.- Selected ; 3.- Error ; 4.- Waiting to be printed'; From 212e8d1a037c397f9491f54b6fde309713334024 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 14:09:31 +0200 Subject: [PATCH 222/250] fix: refs #7346 invoiceSerial --- db/routines/vn/functions/invoiceSerial.sql | 37 +++++++++----- modules/ticket/back/methods/ticket/closure.js | 49 +++++++------------ 2 files changed, 41 insertions(+), 45 deletions(-) diff --git a/db/routines/vn/functions/invoiceSerial.sql b/db/routines/vn/functions/invoiceSerial.sql index 9df887cf5..10ab7a797 100644 --- a/db/routines/vn/functions/invoiceSerial.sql +++ b/db/routines/vn/functions/invoiceSerial.sql @@ -1,18 +1,23 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(15)) +CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`( + vClientFk INT, + vCompanyFk INT, + vType CHAR(15) +) RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN - /** - * Obtiene la serie de una factura - * dependiendo del area del cliente. - * - * @param vClientFk Id del cliente - * @param vCompanyFk Id de la empresa - * @param vType Tipo de factura ['global','multiple','quick'] - * @return vSerie de la factura - */ +/** +* Obtiene la serie de una factura +* dependiendo del area del cliente. +* +* @param vClientFk Id del cliente +* @param vCompanyFk Id de la empresa +* @param vType Tipo de factura (vn.invoiceOutSerial.type[ENUM]) +* @return vSerie de la factura +*/ DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci; + DECLARE vTransactionCode INT(2); DECLARE vSerie CHAR(2); IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN @@ -23,9 +28,15 @@ BEGIN FROM client WHERE id = vClientFk; - SELECT code INTO vSerie - FROM invoiceOutSerial - WHERE `type` = vType AND taxAreaFk = vTaxArea; + SELECT CodigoTransaccion INTO vTransactionCode + FROM taxArea + WHERE code = vTaxArea; + + SELECT ios.code INTO vSerie + FROM invoiceOutSerial ios + JOIN taxArea ta ON ta.code = ios.taxAreaFk + WHERE ios.`type` = vType + AND ta.CodigoTransaccion = vTransactionCode; RETURN vSerie; END$$ diff --git a/modules/ticket/back/methods/ticket/closure.js b/modules/ticket/back/methods/ticket/closure.js index fba39f18f..c39d51c02 100644 --- a/modules/ticket/back/methods/ticket/closure.js +++ b/modules/ticket/back/methods/ticket/closure.js @@ -13,23 +13,20 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { const failedtickets = []; for (const ticket of tickets) { try { - await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'M'); + await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'multiple'); await Self.rawSql( `CALL vn.ticket_closeByTicket(?)`, [ticket.id], {userId} ); - const [invoiceOut] = await Self.rawSql( - ` + const [invoiceOut] = await Self.rawSql(` SELECT io.id, io.ref, io.serial, cny.code companyCode, io.issued FROM ticket t JOIN invoiceOut io ON io.ref = t.refFk JOIN company cny ON cny.id = io.companyFk WHERE t.id = ? - `, - [ticket.id], - ); + `, [ticket.id]); const mailOptions = { overrideAttachments: true, @@ -104,17 +101,14 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { } // Incoterms authorization - const [{firstOrder}] = await Self.rawSql( - ` - SELECT COUNT(*) as firstOrder - FROM ticket t - JOIN client c ON c.id = t.clientFk - WHERE t.clientFk = ? - AND NOT t.isDeleted - AND c.isVies - `, - [ticket.clientFk], - ); + const [{firstOrder}] = await Self.rawSql(` + SELECT COUNT(*) as firstOrder + FROM ticket t + JOIN client c ON c.id = t.clientFk + WHERE t.clientFk = ? + AND NOT t.isDeleted + AND c.isVies + `, [ticket.clientFk]); if (firstOrder == 1) { const args = { @@ -129,26 +123,17 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { const email = new Email('incoterms-authorization', args); await email.send(); - const [sample] = await Self.rawSql( - `SELECT id + const [sample] = await Self.rawSql(` + SELECT id FROM sample - WHERE code = 'incoterms-authorization' - `, - ); + WHERE code = 'incoterms-authorization' + `); - await Self.rawSql( - ` + await Self.rawSql(` INSERT INTO clientSample (clientFk, typeFk, companyFk) VALUES(?, ?, ?) - `, - [ticket.clientFk, sample.id, ticket.companyFk], - {userId}, - ); + `, [ticket.clientFk, sample.id, ticket.companyFk], {userId}); } } catch (error) { - await Self.rawSql(` - INSERT INTO util.debug (variable, value) - VALUES ('invoicingTicketError', ?) - `, [ticket.id + ' - ' + error]); // Domain not found if (error.responseCode == 450) { await invalidEmail(ticket); From 75be124e1f9e600d74b509cb3d22e7f417c79681 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 4 Sep 2024 14:14:12 +0200 Subject: [PATCH 223/250] feat: refs #7929 create table material --- .../11213-aquaCarnation/00-firstScript.sql | 253 ++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 db/versions/11213-aquaCarnation/00-firstScript.sql diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql new file mode 100644 index 000000000..3067ce06e --- /dev/null +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -0,0 +1,253 @@ + +use vn; + +CREATE TABLE IF NOT EXISTS `material` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO `material` (`name`) VALUES ('Abedul'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acacia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acero'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acero Galvanizado'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acetato'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acrílico'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Alambre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Algodón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Aluminio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Antracita'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Arcilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Bambú'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Banano'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Canneté'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cartón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cartulina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Celofán'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cemento'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cerámica'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Chapa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Chenilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cloruro de polivinilo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cobre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Corcho'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cordel'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton Chess'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cristal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cubo Asa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cuerda'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cuero'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Raso'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Velvet'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Eco Glass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Encaje'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Esparto'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Espuma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Felpa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Coco'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Vidrio y Resina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fieltro'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Foam'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Gamuza'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Gasa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Glass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Goma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Grafito'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hierro'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja Carbono'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja de Mirto'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hormigón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Jute'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Kraft'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Látex'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Latrix'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lienzo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lino'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lurex'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Madera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Metacrilato'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Metal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Mimbre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Musgo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Nonwoven'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Nylon'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Organza'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paja'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Pana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Papel'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paperweb'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paulownia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Peluche'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Piedra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Pizarra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Plástico'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Poliestireno'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Polipropileno'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Poliresina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Polyester'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Porcelana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Puntilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('PVC'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rafia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rama'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Raso'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rattan'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rayon'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Reciclable'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Red'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Resina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Roca'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rope'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Saco'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Salim'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Seagrass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Silicona'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Sisal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tejido'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tela'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Terciopelo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Terracota'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Textil'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Titanio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tul'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Velvet'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Vidrio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Yute'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Zinc'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Base de goma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Base de madera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Plumas'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Protección Uva'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Purpurina'); + +CREATE TABLE IF NOT EXISTS `secondaryMaterial` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Abedul'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acacia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero Galvanizado'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acetato'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acrílico'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Alambre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Algodón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Aluminio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Antracita'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Arcilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Bambú'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Banano'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Canneté'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartulina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Celofán'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cemento'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cerámica'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chapa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chenilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cloruro de polivinilo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cobre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Corcho'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cordel'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton Chess'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cristal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cubo Asa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuerda'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuero'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Raso'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Velvet'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Eco Glass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Encaje'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Esparto'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Espuma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Felpa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Coco'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Vidrio y Resina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fieltro'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Foam'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gamuza'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gasa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Glass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Goma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Grafito'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hierro'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja Carbono'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja de Mirto'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hormigón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Jute'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Kraft'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Látex'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Latrix'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lienzo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lino'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lurex'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Madera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metacrilato'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Mimbre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Musgo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nonwoven'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nylon'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Organza'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paja'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Papel'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paperweb'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paulownia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Peluche'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Piedra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pizarra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plástico'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliestireno'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polipropileno'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliresina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polyester'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Porcelana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Puntilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('PVC'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rafia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rama'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Raso'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rattan'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rayon'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Reciclable'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Red'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Resina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Roca'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rope'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Saco'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Salim'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Seagrass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Silicona'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Sisal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tejido'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tela'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terciopelo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terracota'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Textil'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Titanio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tul'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Velvet'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Vidrio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Yute'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Zinc'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de goma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de madera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plumas'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Protección Uva'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Purpurina'); + +UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name= 'Material'; +UPDATE vn.tag SET isFree=0,sourceTable='secondaryMaterial' WHERE name='Material secundario'; \ No newline at end of file From 03d711b694c4af992449f6f218bf5c997eb5b284 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 5 Sep 2024 09:12:52 +0200 Subject: [PATCH 224/250] chore: refs #7524 add select limit --- db/dump/fixtures.before.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 56450b27c..c8bbd035d 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3967,3 +3967,7 @@ VALUES (4, 'Referencia Transferencias', 'trnRef'), (5, 'Referencia Nominas', 'payRef'), (6, 'ABA', 'aba'); + +INSERT IGNORE INTO ormConfig + SET id =1, + selectLimit = 1000; \ No newline at end of file From d49707828b22169ed88be14b1e987f08f1d23d99 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 5 Sep 2024 09:13:33 +0200 Subject: [PATCH 225/250] fix(salix): refs #7905 #7905 use right fn to flatten data --- loopback/util/flatten.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopback/util/flatten.js b/loopback/util/flatten.js index 90e9184b7..d6030f7d0 100644 --- a/loopback/util/flatten.js +++ b/loopback/util/flatten.js @@ -1,6 +1,6 @@ function flatten(dataArray) { - return dataArray.map(item => flatten(item.__data)); + return dataArray.map(item => flattenObj(item.__data)); } function flattenObj(data, prefix = '') { let result = {}; From 2aeff1957811614c5523f8eb67dde70972528d95 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 5 Sep 2024 09:21:00 +0200 Subject: [PATCH 226/250] fix: refs #7905 added comments to flatten.js --- loopback/util/flatten.js | 15 ++++++++++++ .../entry/back/methods/entry/getBuysCsv.js | 24 ------------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/loopback/util/flatten.js b/loopback/util/flatten.js index d6030f7d0..35c368d3b 100644 --- a/loopback/util/flatten.js +++ b/loopback/util/flatten.js @@ -1,7 +1,22 @@ +/** + * Flattens an array of objects by converting each object into a flat structure. + * + * @param {Array} dataArray Array of objects to be flattened + * @return {Array} Array of flattened objects + */ function flatten(dataArray) { return dataArray.map(item => flattenObj(item.__data)); } + +/** + * Recursively flattens an object, converting nested properties into a single level object + * with keys representing the original nested structure. + * + * @param {Object} data The object to be flattened + * @param {String} [prefix=''] Optional prefix for nested keys + * @return {Object} Flattened object + */ function flattenObj(data, prefix = '') { let result = {}; try { diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js index 647f41d22..a46f09c66 100644 --- a/modules/entry/back/methods/entry/getBuysCsv.js +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -40,27 +40,3 @@ module.exports = Self => { return [toCSV(dataFlatted), 'text/csv', `inline; filename="buys-${id}.csv"`]; }; }; -// function flattenJSON(dataArray) { -// return dataArray.map(item => flatten(item.__data)); -// } -// function flatten(data, prefix = '') { -// let result = {}; -// try { -// for (let key in data) { -// if (!data[key]) continue; - -// const newKey = prefix ? `${prefix}_${key}` : key; -// const value = data[key]; - -// if (typeof value === 'object' && value !== null && !Array.isArray(value)) -// Object.assign(result, flatten(value.__data, newKey)); -// else -// result[newKey] = value; -// } -// } catch (error) { -// console.error(error); -// } - -// return result; -// } - From 95d4c706d49497a31cc77bc27ed14faffa08faee Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 5 Sep 2024 09:23:58 +0200 Subject: [PATCH 227/250] fix: refs #7346 multiple to quick in closure.js --- modules/ticket/back/methods/ticket/closure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/closure.js b/modules/ticket/back/methods/ticket/closure.js index c39d51c02..89343b193 100644 --- a/modules/ticket/back/methods/ticket/closure.js +++ b/modules/ticket/back/methods/ticket/closure.js @@ -13,7 +13,7 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { const failedtickets = []; for (const ticket of tickets) { try { - await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'multiple'); + await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'quick'); await Self.rawSql( `CALL vn.ticket_closeByTicket(?)`, [ticket.id], From ac01da5eed7296ce7108894c2e0280ffc2222a4c Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 5 Sep 2024 11:19:00 +0200 Subject: [PATCH 228/250] feat: refs #7759 Deleted version 11163-maroonEucalyptus --- db/versions/11163-maroonEucalyptus/00-firstScript.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 db/versions/11163-maroonEucalyptus/00-firstScript.sql diff --git a/db/versions/11163-maroonEucalyptus/00-firstScript.sql b/db/versions/11163-maroonEucalyptus/00-firstScript.sql deleted file mode 100644 index 88e5fc022..000000000 --- a/db/versions/11163-maroonEucalyptus/00-firstScript.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE USER 'vn'@'localhost'; -GRANT ALL PRIVILEGES ON *.* TO 'vn'@'localhost' WITH GRANT OPTION;; From 684658bb966766ad0a3d7bd5175a3ab7709e38a2 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 5 Sep 2024 14:25:50 +0200 Subject: [PATCH 229/250] feat: refs #7929 quitar codigo --- .../11213-aquaCarnation/00-firstScript.sql | 126 +----------------- 1 file changed, 1 insertion(+), 125 deletions(-) diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql index 3067ce06e..b23a6c782 100644 --- a/db/versions/11213-aquaCarnation/00-firstScript.sql +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -125,129 +125,5 @@ INSERT IGNORE INTO `material` (`name`) VALUES ('Plumas'); INSERT IGNORE INTO `material` (`name`) VALUES ('Protección Uva'); INSERT IGNORE INTO `material` (`name`) VALUES ('Purpurina'); -CREATE TABLE IF NOT EXISTS `secondaryMaterial` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; - -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Abedul'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acacia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero Galvanizado'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acetato'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acrílico'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Alambre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Algodón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Aluminio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Antracita'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Arcilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Bambú'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Banano'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Canneté'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartulina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Celofán'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cemento'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cerámica'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chapa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chenilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cloruro de polivinilo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cobre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Corcho'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cordel'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton Chess'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cristal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cubo Asa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuerda'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuero'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Raso'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Velvet'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Eco Glass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Encaje'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Esparto'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Espuma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Felpa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Coco'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Vidrio y Resina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fieltro'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Foam'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gamuza'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gasa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Glass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Goma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Grafito'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hierro'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja Carbono'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja de Mirto'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hormigón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Jute'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Kraft'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Látex'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Latrix'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lienzo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lino'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lurex'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Madera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metacrilato'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Mimbre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Musgo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nonwoven'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nylon'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Organza'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paja'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Papel'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paperweb'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paulownia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Peluche'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Piedra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pizarra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plástico'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliestireno'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polipropileno'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliresina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polyester'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Porcelana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Puntilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('PVC'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rafia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rama'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Raso'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rattan'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rayon'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Reciclable'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Red'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Resina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Roca'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rope'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Saco'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Salim'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Seagrass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Silicona'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Sisal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tejido'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tela'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terciopelo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terracota'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Textil'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Titanio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tul'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Velvet'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Vidrio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Yute'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Zinc'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de goma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de madera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plumas'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Protección Uva'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Purpurina'); - UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name= 'Material'; -UPDATE vn.tag SET isFree=0,sourceTable='secondaryMaterial' WHERE name='Material secundario'; \ No newline at end of file +UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name='Material secundario'; \ No newline at end of file From 3e4caa8edf5f4633aedaa7bb591bb15549113d26 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 5 Sep 2024 14:38:55 +0200 Subject: [PATCH 230/250] feat: refs #7929 autoincrement 1 --- db/versions/11213-aquaCarnation/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql index b23a6c782..9e744b66c 100644 --- a/db/versions/11213-aquaCarnation/00-firstScript.sql +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `material` ( `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; INSERT IGNORE INTO `material` (`name`) VALUES ('Abedul'); INSERT IGNORE INTO `material` (`name`) VALUES ('Acacia'); From a7bc58a5bc6374e9c9227ff9ab376a7ea0e332dd Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 5 Sep 2024 14:45:17 +0200 Subject: [PATCH 231/250] fix: refs #7931 Immediately discount order lines from available --- .../cache/procedures/available_refresh.sql | 7 +++++- .../cache/procedures/available_updateItem.sql | 23 +++++++++++++++++++ .../hedera/procedures/order_addItem.sql | 10 ++++---- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 db/routines/cache/procedures/available_updateItem.sql diff --git a/db/routines/cache/procedures/available_refresh.sql b/db/routines/cache/procedures/available_refresh.sql index abf023a41..87c003648 100644 --- a/db/routines/cache/procedures/available_refresh.sql +++ b/db/routines/cache/procedures/available_refresh.sql @@ -1,5 +1,10 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`( + OUT `vCalc` INT, + `vRefresh` INT, + `vWarehouse` INT, + `vDated` DATE +) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; diff --git a/db/routines/cache/procedures/available_updateItem.sql b/db/routines/cache/procedures/available_updateItem.sql new file mode 100644 index 000000000..347eaa137 --- /dev/null +++ b/db/routines/cache/procedures/available_updateItem.sql @@ -0,0 +1,23 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_updateItem`( + `vItem` INT, + `vWarehouse` INT, + `vDated` DATE, + `vQuantity` INT +) +BEGIN + DECLARE vCalc INT; + + SELECT id INTO vCalc FROM cache_calc + WHERE cacheName = 'available' + AND params = CONCAT_WS('/', vWarehouse, vDated) + AND last_refresh <= NOW(); + + IF vCalc IS NOT NULL THEN + UPDATE available + SET available = available - vQuantity + WHERE calc_id = vCalc + AND item_id = vItem; + END IF; +END$$ +DELIMITER ; diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index f690f9aa6..204dcb6bf 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -1,8 +1,8 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_addItem`( vSelf INT, - vWarehouse INT, - vItem INT, + vWarehouse INT, + vItem INT, vAmount INT) BEGIN /** @@ -37,7 +37,7 @@ BEGIN ROLLBACK; RESIGNAL; END; - + CALL order_calcCatalogFromItem(vSelf, vItem); START TRANSACTION; @@ -102,6 +102,8 @@ BEGIN amount = vAdd, price = vPrice; + CALL cache.available_updateItem(vItem, vWarehouse, vShipment, vAdd); + SET vRow = LAST_INSERT_ID(); INSERT INTO orderRowComponent (rowFk, componentFk, price) @@ -121,6 +123,6 @@ BEGIN END IF; COMMIT; - CALL vn.ticketCalculatePurge; + CALL vn.ticketCalculatePurge; END$$ DELIMITER ; From c1e086072b7c95addf1d40f08321444f386f1868 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 5 Sep 2024 14:50:36 +0200 Subject: [PATCH 232/250] fix: refs #7524 load after get client --- modules/client/front/balance/create/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index 9113d7605..f4ff0e3aa 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -23,6 +23,7 @@ class Controller extends Dialog { } set clientFk(value) { + if (!value) return; this.receipt.clientFk = value; const filter = { @@ -32,6 +33,7 @@ class Controller extends Dialog { } }; + this.getAmountPaid(); this.$http.get(`Clients/findOne`, {filter}) .then(res => { this.receipt.email = res.data.email; @@ -50,7 +52,6 @@ class Controller extends Dialog { set companyFk(value) { this.receipt.companyFk = value; - this.getAmountPaid(); } set description(value) { @@ -152,7 +153,7 @@ class Controller extends Dialog { getAmountPaid() { const filter = { where: { - clientFk: this.$params.id, + clientFk: this.$params.id ?? this.clientFk, companyFk: this.receipt.companyFk } }; @@ -210,8 +211,8 @@ ngModule.vnComponent('vnClientBalanceCreate', { payed: ' Date: Thu, 5 Sep 2024 15:47:45 +0200 Subject: [PATCH 233/250] fix: refs #7524 add fixture orm config --- db/dump/fixtures.before.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 769c081c5..9f590233f 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3953,3 +3953,7 @@ VALUES (4, 'Referencia Transferencias', 'trnRef'), (5, 'Referencia Nominas', 'payRef'), (6, 'ABA', 'aba'); + +INSERT INTO vn.ormConfig SET + id = 1, + selectLimit = 1000; \ No newline at end of file From ac8b101455db4ce37707aeb5c99ab77a169f2e38 Mon Sep 17 00:00:00 2001 From: ivanm Date: Thu, 5 Sep 2024 17:05:48 +0200 Subject: [PATCH 234/250] feat: refs #7898 Modify default --- db/versions/11211-greenCataractarum/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11211-greenCataractarum/00-firstScript.sql b/db/versions/11211-greenCataractarum/00-firstScript.sql index 55b73925c..c9ba73479 100644 --- a/db/versions/11211-greenCataractarum/00-firstScript.sql +++ b/db/versions/11211-greenCataractarum/00-firstScript.sql @@ -1 +1 @@ -ALTER TABLE vn.parking ADD COLUMN floor VARCHAR(5) DEFAULT '--' AFTER row; +ALTER TABLE vn.parking ADD COLUMN floor VARCHAR(5) DEFAULT NULL AFTER row; From 72024fb8543860365336ea28b4c80b386f010be1 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 06:12:48 +0200 Subject: [PATCH 235/250] fix: refs #7759 Added user 'vn'@'localhost' & grants --- db/dump/dump.after.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/db/dump/dump.after.sql b/db/dump/dump.after.sql index f1a121b2a..a0da5c526 100644 --- a/db/dump/dump.after.sql +++ b/db/dump/dump.after.sql @@ -1 +1,12 @@ --- Executed after dump +CREATE USER 'vn'@'localhost'; + +GRANT SELECT, + INSERT, + UPDATE, + DELETE, + CREATE TEMPORARY TABLES, + EXECUTE, + TRIGGER, + CREATE ROUTINE, + ALTER ROUTINE + ON *.* TO 'vn'@'localhost'; From 718c37e0574a1ec78888af9afe440aad8dea874c Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 08:22:07 +0200 Subject: [PATCH 236/250] feat: refs #7532 Requested changes --- myt.config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/myt.config.yml b/myt.config.yml index ffa4188b2..683090ecc 100755 --- a/myt.config.yml +++ b/myt.config.yml @@ -2,6 +2,7 @@ code: vn-database versionSchema: util replace: true sumViews: false +defaultDefiner: vn@localhost mockDate: '2001-01-01 12:00:00' subdir: db schemas: From 671dc0342acf5d38e3b33f016be40167b2ee5362 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 08:24:17 +0200 Subject: [PATCH 237/250] Revert commit --- myt.config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/myt.config.yml b/myt.config.yml index 683090ecc..ffa4188b2 100755 --- a/myt.config.yml +++ b/myt.config.yml @@ -2,7 +2,6 @@ code: vn-database versionSchema: util replace: true sumViews: false -defaultDefiner: vn@localhost mockDate: '2001-01-01 12:00:00' subdir: db schemas: From 1b8583a19dec1b17c9846cb6b98e3942169793aa Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 08:50:50 +0200 Subject: [PATCH 238/250] feat: refs #7759 Revoke routine grants vn --- db/dump/dump.after.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/dump/dump.after.sql b/db/dump/dump.after.sql index a0da5c526..7508a36a7 100644 --- a/db/dump/dump.after.sql +++ b/db/dump/dump.after.sql @@ -6,7 +6,5 @@ GRANT SELECT, DELETE, CREATE TEMPORARY TABLES, EXECUTE, - TRIGGER, - CREATE ROUTINE, - ALTER ROUTINE + TRIGGER ON *.* TO 'vn'@'localhost'; From 747e6a562a218c4e123dc9616b5ab28eea6150ef Mon Sep 17 00:00:00 2001 From: ivanm Date: Fri, 6 Sep 2024 08:51:41 +0200 Subject: [PATCH 239/250] feat: refs #7747 Delete buyUltimate and buyUltimateFromInterval --- .../cache/procedures/last_buy_refresh.sql | 2 +- db/routines/vn/procedures/buyUltimate.sql | 18 ----------------- .../vn/procedures/buyUltimateFromInterval.sql | 20 ------------------- 3 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 db/routines/vn/procedures/buyUltimate.sql delete mode 100644 db/routines/vn/procedures/buyUltimateFromInterval.sql diff --git a/db/routines/cache/procedures/last_buy_refresh.sql b/db/routines/cache/procedures/last_buy_refresh.sql index 555ae0b8d..86a5e8d8c 100644 --- a/db/routines/cache/procedures/last_buy_refresh.sql +++ b/db/routines/cache/procedures/last_buy_refresh.sql @@ -4,7 +4,7 @@ proc: BEGIN /** * Crea o actualiza la cache con la última compra y fecha de cada * artículo hasta ayer. Para obtener la última compra hasta una fecha - * determinada utilizar el procedimiento vn.buyUltimate(). + * determinada utilizar el procedimiento vn.buy_getUltimate(). * * @param vRefresh %TRUE para forzar el recálculo de la cache */ diff --git a/db/routines/vn/procedures/buyUltimate.sql b/db/routines/vn/procedures/buyUltimate.sql deleted file mode 100644 index 37d4312f6..000000000 --- a/db/routines/vn/procedures/buyUltimate.sql +++ /dev/null @@ -1,18 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buyUltimate`( - vWarehouseFk SMALLINT, - vDated DATE -) -BEGIN -/** - * @deprecated Usar buy_getUltimate - * Calcula las últimas compras realizadas hasta una fecha. - * - * @param vItemFk Id del artículo - * @param vWarehouseFk Id del almacén - * @param vDated Compras hasta fecha - * @return tmp.buyUltimate - */ - CALL buy_getUltimate(NULL, vWarehouseFk, vDated); -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/buyUltimateFromInterval.sql b/db/routines/vn/procedures/buyUltimateFromInterval.sql deleted file mode 100644 index 08450470c..000000000 --- a/db/routines/vn/procedures/buyUltimateFromInterval.sql +++ /dev/null @@ -1,20 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buyUltimateFromInterval`( - vWarehouseFk SMALLINT, - vStarted DATE, - vEnded DATE -) -BEGIN -/** - * @deprecated Usar buy_getUltimateFromInterval - * Calcula las últimas compras realizadas - * desde un rango de fechas. - * - * @param vWarehouseFk Id del almacén si es NULL se actualizan todos - * @param vStarted Fecha inicial - * @param vEnded Fecha fin - * @return tmp.buyUltimateFromInterval - */ - CALL vn.buy_getUltimateFromInterval(NULL, vWarehouseFk, vStarted, vEnded); -END$$ -DELIMITER ; From 640b45ed995a3e75fadcf3f3931438553f55d7bc Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 09:06:00 +0200 Subject: [PATCH 240/250] fix: refs #7931 Apply PR change requests --- .../cache/procedures/available_updateItem.sql | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/db/routines/cache/procedures/available_updateItem.sql b/db/routines/cache/procedures/available_updateItem.sql index 347eaa137..8e94a9d75 100644 --- a/db/routines/cache/procedures/available_updateItem.sql +++ b/db/routines/cache/procedures/available_updateItem.sql @@ -6,12 +6,20 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_update `vQuantity` INT ) BEGIN +/** + * Immediately deduct/add an amount from the available cache (if exists). + * + * @param vItem The item id + * @param vWarehouse The warehouse id + * @param vDated Available cache date + * @param vQuantity The amount to be deducted from the cache + */ DECLARE vCalc INT; - SELECT id INTO vCalc FROM cache_calc + SELECT id INTO vCalc + FROM cache_calc WHERE cacheName = 'available' - AND params = CONCAT_WS('/', vWarehouse, vDated) - AND last_refresh <= NOW(); + AND params = CONCAT_WS('/', vWarehouse, vDated); IF vCalc IS NOT NULL THEN UPDATE available From 78a851336fe14918b8d390225e45c6a13bab0511 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 6 Sep 2024 09:11:20 +0200 Subject: [PATCH 241/250] chore: refs #7323 worker changes wip --- db/dump/fixtures.before.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 56450b27c..cdc60981d 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -108,6 +108,7 @@ INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `bossFk`) UPDATE `vn`.`worker` SET bossFk = NULL WHERE id = 20; UPDATE `vn`.`worker` SET bossFk = 20 WHERE id = 1 OR id = 9; UPDATE `vn`.`worker` SET bossFk = 19 WHERE id = 18; +UPDATE `vn`.`worker` SET bossFk = 50 WHERE id = 49; DELETE FROM `vn`.`worker` WHERE firstName ='customer'; From 48f94140e265cadc274833ef0004dfae66b73273 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 09:16:22 +0200 Subject: [PATCH 242/250] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index 61bf6b3e7..f068a3a32 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(185); + expect(result.available).toEqual(175); expect(result.visible).toEqual(92); await tx.rollback(); From 46a4b577ce911c06ebb3eb252b8508ecb606c60d Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 6 Sep 2024 10:07:46 +0200 Subject: [PATCH 243/250] feat: refs #7277 test with warehouse --- .../methods/invoiceOut/refundAndInvoice.js | 8 +++- .../invoiceOut/specs/refundAndInvoice.spec.js | 39 ++++++++++++++++++- .../back/methods/invoiceOut/transfer.js | 1 + 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js index 7c7788459..41a645ff3 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/refundAndInvoice.js @@ -9,6 +9,11 @@ module.exports = Self => { required: true, description: 'Issued invoice id' }, + { + arg: 'withWarehouse', + type: 'boolean', + required: true + }, { arg: 'cplusRectificationTypeFk', type: 'number', @@ -38,6 +43,7 @@ module.exports = Self => { Self.refundAndInvoice = async( ctx, id, + withWarehouse, cplusRectificationTypeFk, siiTypeInvoiceOutFk, invoiceCorrectionTypeFk, @@ -59,7 +65,7 @@ module.exports = Self => { try { const originalInvoice = await models.InvoiceOut.findById(id, myOptions); - const refundedTickets = await Self.refund(ctx, originalInvoice.ref, false, myOptions); + const refundedTickets = await Self.refund(ctx, originalInvoice.ref, withWarehouse, myOptions); const invoiceCorrection = { correctedFk: id, diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js index c54ae5f6c..ed15fb404 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/refundAndInvoice.spec.js @@ -14,14 +14,16 @@ describe('InvoiceOut refundAndInvoice()', () => { spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx}); }); - it('should refund an invoice and create a new invoice', async() => { + it('should refund an invoice and create a new invoice with warehouse', async() => { const tx = await models.InvoiceOut.beginTransaction({}); const options = {transaction: tx}; + const withWarehouse = true; try { const result = await models.InvoiceOut.refundAndInvoice( ctx, id, + withWarehouse, cplusRectificationTypeFk, siiTypeInvoiceOutFk, invoiceCorrectionTypeFk, @@ -32,7 +34,40 @@ describe('InvoiceOut refundAndInvoice()', () => { expect(result.refundId).toBeDefined(); const invoicesAfter = await models.InvoiceOut.find({where: {id: result.refundId}}, options); - const ticketsAfter = await models.Ticket.find({where: {refFk: 'R10100001'}}, options); + const ticketsAfter = await models.Ticket.find( + {where: {refFk: 'R10100001', warehouse: {neq: null}}}, options); + + expect(invoicesAfter.length).toBeGreaterThan(0); + expect(ticketsAfter.length).toBeGreaterThan(0); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); + + it('should refund an invoice and create a new invoice with warehouse null', async() => { + const tx = await models.InvoiceOut.beginTransaction({}); + const options = {transaction: tx}; + const withWarehouse = false; + + try { + const result = await models.InvoiceOut.refundAndInvoice( + ctx, + id, + withWarehouse, + cplusRectificationTypeFk, + siiTypeInvoiceOutFk, + invoiceCorrectionTypeFk, + options + ); + + expect(result).toBeDefined(); + expect(result.refundId).toBeDefined(); + + const invoicesAfter = await models.InvoiceOut.find({where: {id: result.refundId}}, options); + const ticketsAfter = await models.Ticket.find({where: {refFk: 'R10100001', warehouse: null}}, options); expect(invoicesAfter.length).toBeGreaterThan(0); expect(ticketsAfter.length).toBeGreaterThan(0); diff --git a/modules/invoiceOut/back/methods/invoiceOut/transfer.js b/modules/invoiceOut/back/methods/invoiceOut/transfer.js index 954adf780..aa5c0d9d2 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transfer.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transfer.js @@ -75,6 +75,7 @@ module.exports = Self => { await Self.refundAndInvoice( ctx, id, + false, cplusRectificationTypeFk, siiTypeInvoiceOutFk, invoiceCorrectionTypeFk, From b0abe829b1adef052ff723c5e316be34eac29b2a Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 10:10:41 +0200 Subject: [PATCH 244/250] fix: refs ##7905 Handle error --- loopback/locale/es.json | 5 +++-- modules/entry/back/methods/entry/getBuysCsv.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 8c11b3f1c..8b443d96b 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -371,5 +371,6 @@ "The sale not exists in the item shelving": "La venta no existe en la estantería del artículo", "The entry not have stickers": "La entrada no tiene etiquetas", "Too many records": "Demasiados registros", - "Original invoice not found": "Factura original no encontrada" -} + "Original invoice not found": "Factura original no encontrada", + "The entry has no lines or does not exist": "La entrada no tiene lineas o no existe" +} \ No newline at end of file diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js index a46f09c66..4bd246fa0 100644 --- a/modules/entry/back/methods/entry/getBuysCsv.js +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -1,5 +1,6 @@ const {toCSV} = require('vn-loopback/util/csv'); const {flatten} = require('vn-loopback/util/flatten'); +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('getBuysCsv', { @@ -36,6 +37,7 @@ module.exports = Self => { Self.getBuysCsv = async(ctx, id, options) => { const data = await Self.getBuys(ctx, id, null, options); + if (!data.length) throw new UserError('The entry has no lines or does not exist'); const dataFlatted = flatten(data); return [toCSV(dataFlatted), 'text/csv', `inline; filename="buys-${id}.csv"`]; }; From 18d93d93a609daf2f215a48cba19ef1c68dce28f Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 6 Sep 2024 10:40:16 +0200 Subject: [PATCH 245/250] chore: refs #7323 worker changes --- .../11215-purpleIvy/00-firstScript.sql | 4 ++ loopback/server/boot/role-resolver.js | 12 ++++++ modules/worker/back/models/worker.json | 40 ++++++++++++++++++- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 db/versions/11215-purpleIvy/00-firstScript.sql create mode 100644 loopback/server/boot/role-resolver.js diff --git a/db/versions/11215-purpleIvy/00-firstScript.sql b/db/versions/11215-purpleIvy/00-firstScript.sql new file mode 100644 index 000000000..ac82b7773 --- /dev/null +++ b/db/versions/11215-purpleIvy/00-firstScript.sql @@ -0,0 +1,4 @@ +-- Place your SQL code here +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) + VALUES ('Worker', '__get__descriptor', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'findById', 'READ', 'ALLOW', 'ROLE', '$subordinate'); \ No newline at end of file diff --git a/loopback/server/boot/role-resolver.js b/loopback/server/boot/role-resolver.js new file mode 100644 index 000000000..cf70abb39 --- /dev/null +++ b/loopback/server/boot/role-resolver.js @@ -0,0 +1,12 @@ +const UserError = require('vn-loopback/util/user-error'); + +module.exports = async function(app) { + const models = app.models; + + models.VnRole.registerResolver('$subordinate', async(role, ctx) => { + Object.assign(ctx, {req: {accessToken: {userId: ctx.accessToken.userId}}}); + + const isSubordinate = await models.Worker.isSubordinate(ctx, +ctx.modelId); + if (!isSubordinate) throw new UserError(`You don't have enough privileges`); + }); +}; diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 855d77e39..b809768a4 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -140,5 +140,41 @@ "principalType": "ROLE", "principalId": "$owner" } - ] -} + ], + "scopes": { + "descriptor": { + "include": [ + { + "relation": "user", + "scope": { + "fields": [ + "name", + "nickname" + ], + "include": { + "relation": "emailUser", + "scope": { + "fields": [ + "email" + ] + } + } + } + }, + { + "relation": "department", + "scope": { + "include": [ + { + "relation": "department" + } + ] + } + }, + { + "relation": "sip" + } + ] + } + } +} \ No newline at end of file From d44dec3703dca6f6182ce9cdbf20dfdc07a5a52c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 11:25:49 +0200 Subject: [PATCH 246/250] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index f068a3a32..61bf6b3e7 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(175); + expect(result.available).toEqual(185); expect(result.visible).toEqual(92); await tx.rollback(); From 382e54b57220c36c2e29065986cb3fbf0f78999f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 11:30:43 +0200 Subject: [PATCH 247/250] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index 61bf6b3e7..f068a3a32 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(185); + expect(result.available).toEqual(175); expect(result.visible).toEqual(92); await tx.rollback(); From d10db686e536df72cb982b8d811702f5425c4b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 6 Sep 2024 12:52:24 +0200 Subject: [PATCH 248/250] fix: refs #7346 ticket_close serial --- db/routines/vn/procedures/ticket_close.sql | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 97da5057c..f8bbe239b 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -17,6 +17,7 @@ BEGIN DECLARE vHasDailyInvoice BOOL; DECLARE vWithPackage BOOL; DECLARE vHasToInvoice BOOL; + DECLARE vSerial VARCHAR(2); DECLARE cur CURSOR FOR SELECT ticketFk FROM tmp.ticket_close; @@ -83,14 +84,17 @@ BEGIN GROUP BY e.freightItemFk); IF(vHasDailyInvoice) AND vHasToInvoice THEN + SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial; + IF NOT vSerial THEN + CALL util.throw('Cannot booking without a serial'); + END IF; - -- Facturacion rapida CALL ticket_setState(vCurTicketFk, 'DELIVERED'); - -- Facturar si está contabilizado + IF vIsTaxDataChecked THEN CALL invoiceOut_newFromClient( vClientFk, - (SELECT invoiceSerial(vClientFk, vCompanyFk, 'multiple')), + vSerial, vShipped, vCompanyFk, NULL, From e2c6a4575610e89c29cc32e9e6718af45189befb Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 12:57:57 +0200 Subject: [PATCH 249/250] fix: refs #7931 Available back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index f068a3a32..adf9b7f76 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('item getVisibleAvailable()', () => { - it('should check available visible for today', async() => { + it('should check available visible for tomorrow', async() => { const tx = await models.Item.beginTransaction({}); const options = {transaction: tx}; @@ -9,10 +9,11 @@ describe('item getVisibleAvailable()', () => { const itemFk = 1; const warehouseFk = 1; const dated = Date.vnNew(); + dated.setDate(dated.getDate() + 1); const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(175); + expect(result.available).toEqual(185); expect(result.visible).toEqual(92); await tx.rollback(); From 0ad4d3a9592dcb8283b3f25ffd39f8c2bcfbdc3b Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 13:50:49 +0200 Subject: [PATCH 250/250] feat: refs #7905 getBuysCsv --- loopback/util/flatten.js | 42 ++++++++++++++++++ .../entry/back/methods/entry/getBuysCsv.js | 44 +++++++++++++++++++ modules/entry/back/models/entry.js | 1 + 3 files changed, 87 insertions(+) create mode 100644 loopback/util/flatten.js create mode 100644 modules/entry/back/methods/entry/getBuysCsv.js diff --git a/loopback/util/flatten.js b/loopback/util/flatten.js new file mode 100644 index 000000000..18d682d1f --- /dev/null +++ b/loopback/util/flatten.js @@ -0,0 +1,42 @@ +/** + * Flattens an array of objects by converting each object into a flat structure. + * + * @param {Array} dataArray Array of objects to be flattened + * @return {Array} Array of flattened objects + */ +function flatten(dataArray) { + return dataArray.map(item => flattenObj(item.__data)); +} + +/** + * Recursively flattens an object, converting nested properties into a single level object + * with keys representing the original nested structure. + * + * @param {Object} data The object to be flattened + * @param {String} [prefix=''] Optional prefix for nested keys + * @return {Object} Flattened object + */ +function flattenObj(data, prefix = '') { + let result = {}; + try { + for (let key in data) { + if (!data[key]) continue; + + const newKey = prefix ? `${prefix}_${key}` : key; + const value = data[key]; + + if (typeof value === 'object' && value !== null && !Array.isArray(value)) + Object.assign(result, flattenObj(value.__data, newKey)); + else + result[newKey] = value; + } + } catch (error) { + console.error(error); + } + + return result; +} +module.exports = { + flatten, + flattenObj, +}; diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js new file mode 100644 index 000000000..4bd246fa0 --- /dev/null +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -0,0 +1,44 @@ +const {toCSV} = require('vn-loopback/util/csv'); +const {flatten} = require('vn-loopback/util/flatten'); +const UserError = require('vn-loopback/util/user-error'); + +module.exports = Self => { + Self.remoteMethodCtx('getBuysCsv', { + description: 'Returns buys for one entry in CSV file format', + accessType: 'READ', + accepts: [{ + arg: 'id', + type: 'number', + required: true, + description: 'The entry id', + http: {source: 'path'} + } + ], + returns: [ + { + arg: 'body', + type: 'file', + root: true + }, { + arg: 'Content-Type', + type: 'String', + http: {target: 'header'} + }, { + arg: 'Content-Disposition', + type: 'String', + http: {target: 'header'} + } + ], + http: { + path: `/:id/getBuysCsv`, + verb: 'GET' + } + }); + + Self.getBuysCsv = async(ctx, id, options) => { + const data = await Self.getBuys(ctx, id, null, options); + if (!data.length) throw new UserError('The entry has no lines or does not exist'); + const dataFlatted = flatten(data); + return [toCSV(dataFlatted), 'text/csv', `inline; filename="buys-${id}.csv"`]; + }; +}; diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index b11d64415..8ca79f531 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -3,6 +3,7 @@ module.exports = Self => { require('../methods/entry/filter')(Self); require('../methods/entry/getEntry')(Self); require('../methods/entry/getBuys')(Self); + require('../methods/entry/getBuysCsv')(Self); require('../methods/entry/importBuys')(Self); require('../methods/entry/importBuysPreview')(Self); require('../methods/entry/lastItemBuys')(Self);