diff --git a/back/methods/dms/updateFile.js b/back/methods/dms/updateFile.js index cfc4c322f..68149ef62 100644 --- a/back/methods/dms/updateFile.js +++ b/back/methods/dms/updateFile.js @@ -38,7 +38,7 @@ module.exports = Self => { { arg: 'hasFile', type: 'Boolean', - description: 'True if has an attached file' + description: 'True if has the original in paper' }, { arg: 'hasFileAttached', diff --git a/back/methods/quadminds-api-config/sendOrders.js b/back/methods/quadminds-api-config/sendOrders.js new file mode 100644 index 000000000..760d622b6 --- /dev/null +++ b/back/methods/quadminds-api-config/sendOrders.js @@ -0,0 +1,88 @@ +const axios = require('axios'); +const UserError = require('vn-loopback/util/user-error'); +const moment = require('moment'); + +module.exports = Self => { + Self.remoteMethod('sendOrders', { + description: 'Sends a set of orders', + accessType: 'WRITE', + accepts: [{ + arg: 'tickets', + type: ['number'], + required: true + } + ], + returns: { + type: 'string', + root: true + }, + http: { + path: `/sendOrders`, + verb: 'POST' + } + }); + Self.sendOrders = async tickets => { + const config = await Self.app.models.QuadmindsApiConfig.findOne(); + if (!config) throw new UserError('Config params not set'); + + if (tickets.length > config.maxObjects) + throw new UserError(`Quadminds does not support more than ${config.maxObjects} tickets`); + + let poisData = []; + let isOk; + for (let offset = 0; !isOk; offset = offset + config.limit) { + const pois = await axios.get(`${config.url}pois/search?limit=${config.limit}&offset=${offset}`, { + headers: { + 'Accept': 'application/json', + 'X-Saas-Apikey': config.key + } + }); + pois.data.data.length ? poisData.push(...pois.data.data) : isOk = true; + } + + const poiMap = new Map(poisData.map(poi => [poi.code, poi._id])); + + let orders = await Self.rawSql(` + SELECT a.id poiCode, + t.id code, + t.shipped date, + 'PEDIDO' operation, + t.totalWithVat totalAmount, + t.totalWithoutVat totalAmountWithoutTaxes, + SUM(sv.volume) volume + FROM ticket t + JOIN address a ON a.id = t.addressFk + JOIN saleVolume sv ON sv.ticketFk = t.id + WHERE t.id IN (?) + GROUP BY t.id + `, [tickets]); + + // Transformo code en string ya que lo obtenermos como integer + orders = orders.map(order => { + return { + ...order, + poiId: poiMap.get(order.poiCode.toString()) || undefined, + code: order.code.toString(), + date: moment(order.date).format('YYYY-MM-DD'), + totalAmount: order.totalAmount || undefined, + totalAmountWithoutTaxes: order.totalAmountWithoutTaxes || undefined, + timeWindow: [{ + from: config.orderTimeFrom, + to: config.orderTimeTo + }], + orderMeasures: [{ + constraintId: 3, // Volumen + value: order.volume + }] + }; + }); + + await axios.post(`${config.url}orders`, orders, { + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'X-Saas-Apikey': config.key + } + }); + }; +}; diff --git a/back/methods/quadminds-api-config/sendPois.js b/back/methods/quadminds-api-config/sendPois.js new file mode 100644 index 000000000..cb5eef93e --- /dev/null +++ b/back/methods/quadminds-api-config/sendPois.js @@ -0,0 +1,87 @@ +const axios = require('axios'); +const UserError = require('vn-loopback/util/user-error'); + +module.exports = Self => { + Self.remoteMethod('sendPois', { + description: 'Sends a set of pois', + accessType: 'WRITE', + accepts: [{ + arg: 'tickets', + type: ['number'], + required: true + } + ], + returns: { + type: 'string', + root: true + }, + http: { + path: `/sendPois`, + verb: 'POST' + } + }); + Self.sendPois = async tickets => { + const config = await Self.app.models.QuadmindsApiConfig.findOne(); + if (!config) throw new UserError('Config params not set'); + + if (tickets.length > config.maxObjects) + throw new UserError(`Quadminds does not support more than ${config.maxObjects} tickets`); + + let pois = await Self.rawSql(` + WITH deliveryNotes AS ( + SELECT t.id, t.routeFk, tn.description + FROM ticket t + JOIN ticketObservation tn ON tn.ticketFk = t.id + JOIN observationType ot ON ot.id = tn.observationTypeFk + WHERE ot.code = 'delivery' + ) + SELECT a.id code, + c.socialName name, + IF(ABS(a.latitude - ROUND(a.latitude)) < 0.000001, NULL, a.latitude) latitude, + IF(ABS(a.longitude - ROUND(a.longitude)) < 0.000001, NULL, a.longitude) longitude, + a.street, + a.city locality, + p.name state, + co.name country, + CONCAT_WS(', ', IFNULL(a.street, ''), IFNULL(a.city, ''), IFNULL(p.name, '')) longAddress, + CONCAT(IFNULL(a.mobile, c.mobile)) phoneNumber, + dn.description poiDeliveryComments, + c.email email + FROM ticket t + JOIN address a ON a.id = t.addressFk + JOIN province p ON p.id = a.provinceFk + JOIN country co ON co.id = p.countryFk + JOIN client c ON c.id = t.clientFk + LEFT JOIN deliveryNotes dn ON dn.id = t.id + WHERE t.id IN (?) + GROUP BY t.id + `, [tickets]); + + // Transformo code en string ya que lo obtenermos como integer + pois = pois.map(poi => { + return { + ...poi, + code: poi.code.toString(), + latitude: poi.latitude || undefined, + longitude: poi.longitude || undefined, + address: { + street: poi.street || undefined, + locality: poi.locality || undefined, + state: poi.state || undefined, + country: poi.country || undefined + }, + poiDeliveryComments: poi.poiDeliveryComments || undefined, + phoneNumber: poi.phoneNumber || undefined, + email: poi.email || undefined + }; + }); + + await axios.post(`${config.url}pois`, pois, { + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'X-Saas-Apikey': config.key + } + }); + }; +}; diff --git a/back/model-config.json b/back/model-config.json index 07ce5fe88..20bfb06bd 100644 --- a/back/model-config.json +++ b/back/model-config.json @@ -124,6 +124,9 @@ "Province": { "dataSource": "vn" }, + "QuadmindsApiConfig": { + "dataSource": "vn" + }, "Autonomy": { "dataSource": "vn" }, diff --git a/back/models/buyer.json b/back/models/buyer.json index a1297eda3..a17d3b538 100644 --- a/back/models/buyer.json +++ b/back/models/buyer.json @@ -15,9 +15,6 @@ "nickname": { "type": "string", "required": true - }, - "display": { - "type": "boolean" } }, "acls": [ diff --git a/back/models/quadminds-api-config.js b/back/models/quadminds-api-config.js new file mode 100644 index 000000000..c2773fa0b --- /dev/null +++ b/back/models/quadminds-api-config.js @@ -0,0 +1,4 @@ +module.exports = Self => { + require('../methods/quadminds-api-config/sendPois')(Self); + require('../methods/quadminds-api-config/sendOrders')(Self); +}; diff --git a/back/models/quadminds-api-config.json b/back/models/quadminds-api-config.json new file mode 100644 index 000000000..4001badf3 --- /dev/null +++ b/back/models/quadminds-api-config.json @@ -0,0 +1,34 @@ +{ + "name": "QuadmindsApiConfig", + "base": "VnModel", + "options": { + "mysql": { + "table": "quadmindsApiConfig" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "required": true + }, + "url": { + "type": "string" + }, + "key": { + "type": "string" + }, + "maxObjects": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "orderTimeFrom": { + "type": "string" + }, + "orderTimeTo": { + "type": "string" + } + } +} diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql index 58b892604..ca254055b 100644 --- a/db/dump/.dump/data.sql +++ b/db/dump/.dump/data.sql @@ -1,9 +1,10 @@ USE `util`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!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','11209','3cc19549e4a9d61542b5ba906ccaf9fc90a805ce','2024-09-03 15:04:20','11212'); +INSERT INTO `version` VALUES ('vn-database','11278','fe10f03459a153fc213bf64e352804c043f94590','2024-10-03 07:47:47','11281'); 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); @@ -861,6 +862,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11083','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11084','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:38:13',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11086','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-27 10:02:02',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11087','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:38:13',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11088','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11089','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:16',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11090','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11092','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-07 08:21:23',NULL,NULL); @@ -874,16 +876,45 @@ INSERT INTO `versionLog` VALUES ('vn-database','11103','00-firstScript.sql','jen INSERT INTO `versionLog` VALUES ('vn-database','11104','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11105','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-20 15:36:07',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11106','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:49',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','04-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:49',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','05-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:49',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','06-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:04',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','07-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','08-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','09-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:47',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','10-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:48',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','11-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:59',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','12-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','14-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:00',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','15-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','17-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','18-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','19-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:19',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','20-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:19',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','21-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:34',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','22-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:34',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','23-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11107','24-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11108','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:39',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11109','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-18 19:09:56',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11110','00-clientUnpaid.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11111','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11112','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:40',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11113','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11114','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:49',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11115','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11116','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11117','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11118','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-19 12:28:49',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11119','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:13',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11120','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:15',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11121','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:15',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11124','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:40',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11124','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:40',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11126','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:15',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11128','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:15',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11129','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:22:15',NULL,NULL); @@ -937,9 +968,11 @@ INSERT INTO `versionLog` VALUES ('vn-database','11172','14-firstScript.sql','jen 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','11178','00-aclSetWeight.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',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','11183','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',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); @@ -953,16 +986,60 @@ INSERT INTO `versionLog` VALUES ('vn-database','11193','01-firstScript.sql','jen 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','11196','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 07:28:14',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','11205','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-04 13:54:55',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11206','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11207','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',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); +INSERT INTO `versionLog` VALUES ('vn-database','11210','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11210','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11210','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:40',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11210','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11211','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11213','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-06 06:31:13',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11215','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11216','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11217','00-hederaMessages.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-09 12:21:45',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11219','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11221','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11222','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11223','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11224','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11225','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11225','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11225','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11227','00-addWorkerTimeControlMailAcl.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11229','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-16 08:24:17',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11234','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:42',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11235','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11236','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11236','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11237','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11239','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 12:57:06',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11240','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11241','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-20 09:08:25',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11246','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 12:39:53',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11247','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-19 12:10:08',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11248','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 11:12:17',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11249','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11253','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-20 14:41:27',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11255','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11256','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 12:18:24',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11262','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11263','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-27 12:05:32',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11278','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11279','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-10-02 08:05:24',NULL,NULL); +INSERT INTO `versionLog` VALUES ('vn-database','11280','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-02 08:46:50',NULL,NULL); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `account`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; @@ -1089,7 +1166,6 @@ INSERT INTO `roleInherit` VALUES (37,34,1,NULL); INSERT INTO `roleInherit` VALUES (38,34,13,NULL); INSERT INTO `roleInherit` VALUES (39,34,33,NULL); INSERT INTO `roleInherit` VALUES (40,35,1,NULL); -INSERT INTO `roleInherit` VALUES (42,36,47,NULL); INSERT INTO `roleInherit` VALUES (43,37,1,NULL); INSERT INTO `roleInherit` VALUES (44,38,37,NULL); INSERT INTO `roleInherit` VALUES (45,38,64,NULL); @@ -1328,6 +1404,9 @@ 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 `roleInherit` VALUES (377,47,49,19295); +INSERT INTO `roleInherit` VALUES (378,101,15,19294); +INSERT INTO `roleInherit` VALUES (379,103,121,19294); INSERT INTO `userPassword` VALUES (1,7,1,0,2,1); @@ -1340,6 +1419,7 @@ INSERT INTO `mailConfig` VALUES (1,'verdnatura.es'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `salix`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; @@ -1427,7 +1507,7 @@ INSERT INTO `ACL` VALUES (112,'Defaulter','*','READ','ALLOW','ROLE','employee',N 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 (116,'BankEntity','*','READ','ALLOW','ROLE','employee',10578); 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); @@ -1523,8 +1603,6 @@ 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); @@ -1538,7 +1616,7 @@ 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 (261,'SupplierAccount','*','WRITE','ALLOW','ROLE','administrative',783); 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); @@ -1559,8 +1637,8 @@ INSERT INTO `ACL` VALUES (279,'MailAlias','*','READ','ALLOW','ROLE','marketing', 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 (286,'ACL','*','READ','ALLOW','ROLE','developer',10578); +INSERT INTO `ACL` VALUES (287,'AccessToken','*','*','ALLOW','ROLE','developerBoss',10578); 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); @@ -1569,7 +1647,7 @@ INSERT INTO `ACL` VALUES (297,'Sale','clone','WRITE','ALLOW','ROLE','invoicing', 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 (303,'ClaimLog','*','READ','ALLOW','ROLE','employee',19294); 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); @@ -1863,7 +1941,6 @@ INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee',NU 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); @@ -1887,7 +1964,7 @@ INSERT INTO `ACL` VALUES (654,'Ticket','editZone','WRITE','ALLOW','ROLE','logist 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 (658,'Ticket','closeAll','WRITE','ALLOW','ROLE','system',19295); 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); @@ -1914,7 +1991,7 @@ INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPer 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 (704,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','production',19294); 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); @@ -1959,7 +2036,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','transfer','WRITE','ALLOW','ROLE','administrative',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); @@ -2107,6 +2184,35 @@ INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','producti 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 `ACL` VALUES (909,'Entry','getBuysCsv','READ','ALLOW','ROLE','supplier',19295); +INSERT INTO `ACL` VALUES (910,'MedicalReview','*','*','ALLOW','ROLE','hr',10578); +INSERT INTO `ACL` VALUES (911,'MedicalCenter','*','*','ALLOW','ROLE','hr',10578); +INSERT INTO `ACL` VALUES (912,'Worker','__get__medicalReview','*','ALLOW','ROLE','hr',10578); +INSERT INTO `ACL` VALUES (913,'VnToken','*','READ','ALLOW','ROLE','developer',10578); +INSERT INTO `ACL` VALUES (914,'VnToken','killSession','*','ALLOW','ROLE','developer',10578); +INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',10578); +INSERT INTO `ACL` VALUES (916,'Entry','getBuysCsv','READ','ALLOW','ROLE','supplier',10578); +INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578); +INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578); +INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578); +INSERT INTO `ACL` VALUES (920,'QuadmindsApiConfig','*','*','ALLOW','ROLE','delivery',19295); +INSERT INTO `ACL` VALUES (922,'SaleGroup','*','WRITE','ALLOW','ROLE','production',19294); +INSERT INTO `ACL` VALUES (923,'Worker','__get__advancedSummary','READ','ALLOW','ROLE','hr',10578); +INSERT INTO `ACL` VALUES (924,'Worker','__get__summary','READ','ALLOW','ROLE','employee',10578); +INSERT INTO `ACL` VALUES (925,'Postcode','*','WRITE','ALLOW','ROLE','administrative',10578); +INSERT INTO `ACL` VALUES (926,'Province','*','WRITE','ALLOW','ROLE','administrative',10578); +INSERT INTO `ACL` VALUES (927,'Town','*','WRITE','ALLOW','ROLE','administrative',10578); +INSERT INTO `ACL` VALUES (928,'ExpeditionStateType','*','READ','ALLOW','ROLE','employee',19294); +INSERT INTO `ACL` VALUES (929,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery',19294); +INSERT INTO `ACL` VALUES (930,'SupplierAccount','*','READ','ALLOW','ROLE','buyer',783); +INSERT INTO `ACL` VALUES (931,'StockBought','*','READ','ALLOW','ROLE','buyer',10578); +INSERT INTO `ACL` VALUES (932,'StockBought','*','WRITE','ALLOW','ROLE','buyer',10578); +INSERT INTO `ACL` VALUES (933,'Buyer','*','READ','ALLOW','ROLE','buyer',10578); +INSERT INTO `ACL` VALUES (934,'Ticket','setWeight','WRITE','ALLOW','ROLE','salesPerson',10578); +INSERT INTO `ACL` VALUES (935,'BankEntity','*','WRITE','ALLOW','ROLE','financial',10578); +INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee',10578); +INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578); +INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578); INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee'); INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee'); @@ -2202,6 +2308,7 @@ INSERT INTO `defaultViewMultiConfig` VALUES ('routesList','{\"ID\":true,\"worker /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `vn`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; @@ -2406,6 +2513,7 @@ 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 (48,'fusión de lineas',4,NULL,NULL,1,'lineFusion',0); INSERT INTO `component` VALUES (49,'sustitución',4,NULL,NULL,1,'substitution',0); +INSERT INTO `component` VALUES (50,'bonus',4,NULL,NULL,1,'bonus',0); INSERT INTO `componentType` VALUES (1,'cost','coste',1,0); INSERT INTO `componentType` VALUES (2,NULL,'com ventas',1,1); @@ -2426,7 +2534,7 @@ INSERT INTO `continent` VALUES (3,'África','AF'); INSERT INTO `continent` VALUES (4,'Europa','EU'); 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 (1,'VN','VERDNATURA',1,114,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,'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); @@ -2437,28 +2545,28 @@ 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,'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,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,'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 (43,'VT','VENTAS',40,73,NULL,0,0,0,1,16,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); +INSERT INTO `department` VALUES (44,'management','GERENCIA',74,75,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',76,77,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',78,79,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',80,81,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',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 (52,NULL,'CARGA AEREA',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 (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 (54,NULL,'ORNAMENTALES',86,87,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,'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 (58,'CMP','CAMPOS',88,91,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',92,93,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,'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 (61,NULL,'VNH',94,97,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',98,99,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 (69,NULL,'VERDNABARNA',100,101,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 (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 (86,NULL,'LIMPIEZA',102,103,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',104,105,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',95,96,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,'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',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); @@ -2466,22 +2574,23 @@ INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065, 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 (124,NULL,'CONTROL INTERNO',106,107,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 (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,'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 (131,'greenhouse','INVERNADERO',89,90,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 (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 (135,'routers','ENRUTADORES',108,109,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',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 (137,'sorter','SORTER',112,113,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 (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 (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS'); 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); +INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',0,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL); INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL); INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL); @@ -2536,7 +2645,7 @@ INSERT INTO `sample` VALUES (16,'letter-debtor-nd','Aviso reiterado por saldo de INSERT INTO `sample` VALUES (17,'client-lcr','Email de solicitud de datos bancarios LCR',0,1,1,0,NULL); INSERT INTO `sample` VALUES (18,'client-debt-statement','Extracto del cliente',1,0,1,1,'Clients'); INSERT INTO `sample` VALUES (19,'credit-request','Solicitud de crédito',1,1,1,0,'Clients'); -INSERT INTO `sample` VALUES (20,'incoterms-authorization','Autorización de incoterms',1,1,1,0,'Clients'); +INSERT INTO `sample` VALUES (20,'incoterms-authorization','Entregas intracomunitarias recogidas por el cliente',1,1,1,0,'Clients'); INSERT INTO `siiTrascendencyInvoiceIn` VALUES (1,'Operación de régimen general'); INSERT INTO `siiTrascendencyInvoiceIn` VALUES (2,'Operaciones por las que los empresarios satisfacen compensaciones REAGYP'); @@ -2573,48 +2682,50 @@ 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 `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'); -INSERT INTO `state` VALUES (4,'Impreso',4,0,'PRINTED',2,29,1,0,1,0,0,1,2,0,'success'); -INSERT INTO `state` VALUES (5,'Preparación',6,2,'ON_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); -INSERT INTO `state` VALUES (6,'En Revisión',7,2,'ON_CHECKING',NULL,6,0,1,0,3,0,0,1,0,'warning'); -INSERT INTO `state` VALUES (7,'Sin Acabar',1,0,'NOT_READY',NULL,7,0,0,0,0,0,0,4,1,'alert'); -INSERT INTO `state` VALUES (8,'Revisado',8,2,'CHECKED',NULL,8,0,1,0,3,0,0,1,0,'warning'); -INSERT INTO `state` VALUES (9,'Encajando',9,3,'PACKING',NULL,9,0,1,0,0,0,0,1,0,NULL); -INSERT INTO `state` VALUES (10,'Encajado',10,3,'PACKED',NULL,10,0,1,0,0,0,0,0,0,NULL); -INSERT INTO `state` VALUES (11,'Facturado',0,4,'INVOICED',NULL,11,0,1,0,0,0,0,0,0,NULL); -INSERT INTO `state` VALUES (12,'Bloqueado',0,0,'BLOCKED',NULL,12,0,0,0,0,0,0,4,1,'alert'); -INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',NULL,13,0,1,0,0,0,0,0,0,NULL); -INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',NULL,14,0,1,0,2,0,0,1,0,'warning'); -INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',NULL,15,0,1,0,0,0,0,0,0,NULL); -INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',NULL,16,0,1,0,0,0,0,0,0,NULL); -INSERT INTO `state` VALUES (20,'Asignado',4,0,'PICKER_DESIGNED',NULL,20,1,0,0,0,0,0,2,0,'success'); -INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',6,21,0,0,0,0,0,0,2,0,'success'); -INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',NULL,22,0,0,0,0,0,0,4,1,'alert'); -INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',NULL,23,1,0,1,0,0,0,4,1,'success'); -INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',4,24,0,0,0,0,0,0,3,1,'success'); -INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',5,25,1,0,0,0,0,0,3,0,'alert'); -INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',1,28,1,0,0,1,0,0,2,0,'warning'); -INSERT INTO `state` VALUES (27,'Prep Asistida',5,2,'ASSISTED_PREPARATION',7,27,0,0,0,0,0,0,2,0,'success'); -INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',3,28,1,0,1,1,1,1,3,0,'warning'); -INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',2,29,1,0,1,0,0,1,2,0,'success'); -INSERT INTO `state` VALUES (30,'Embarcado',4,2,'BOARD',5,30,0,0,0,2,0,0,3,0,'success'); -INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',2,29,1,0,1,0,0,1,2,0,'success'); -INSERT INTO `state` VALUES (32,'Polizon OK',3,2,'OK STOWAWAY',3,31,1,0,0,1,1,1,3,0,'warning'); -INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',2,29,1,0,1,0,0,1,2,0,'success'); -INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',NULL,34,0,0,0,0,0,0,4,1,'alert'); -INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',NULL,10,0,1,0,0,0,0,1,0,NULL); -INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',2,37,1,0,0,4,0,1,2,0,'warning'); -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 `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',7,42,0,0,0,2,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (1,'Arreglar',2,0,'FIXING',1,0,0,0,0,0,0,4,1,'alert'); +INSERT INTO `state` VALUES (2,'Libre',2,0,'FREE',2,0,0,0,0,0,0,4,1,'notice'); +INSERT INTO `state` VALUES (3,'OK',3,0,'OK',28,1,0,1,0,1,1,3,0,'success'); +INSERT INTO `state` VALUES (4,'Impreso',4,0,'PRINTED',29,1,0,1,0,0,1,2,0,'success'); +INSERT INTO `state` VALUES (5,'Preparación',6,2,'ON_PREPARATION',14,0,0,0,2,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (6,'En Revisión',7,2,'ON_CHECKING',6,0,1,0,3,0,0,1,0,'warning'); +INSERT INTO `state` VALUES (7,'Sin Acabar',1,0,'NOT_READY',7,0,0,0,0,0,0,4,1,'alert'); +INSERT INTO `state` VALUES (8,'Revisado',8,2,'CHECKED',8,0,1,0,3,0,0,1,0,'warning'); +INSERT INTO `state` VALUES (9,'Encajando',9,3,'PACKING',9,0,1,0,0,0,0,1,0,NULL); +INSERT INTO `state` VALUES (10,'Encajado',10,3,'PACKED',10,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (11,'Facturado',0,4,'INVOICED',11,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (12,'Bloqueado',0,0,'BLOCKED',12,0,0,0,0,0,0,4,1,'alert'); +INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',13,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',14,0,1,0,2,0,0,1,0,'warning'); +INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',15,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',16,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (20,'Asignado',4,0,'PICKER_DESIGNED',20,1,0,0,0,0,0,2,0,'success'); +INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',21,0,0,0,0,0,0,2,0,'success'); +INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',22,0,0,0,0,0,0,4,1,'alert'); +INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',23,1,0,1,0,0,0,4,1,'success'); +INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',24,0,0,0,0,0,0,3,1,'success'); +INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',25,1,0,0,0,0,0,3,0,'alert'); +INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',28,1,0,0,1,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (27,'Prep Asistida',5,2,'ASSISTED_PREPARATION',27,0,0,0,0,0,0,2,0,'success'); +INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',28,1,0,1,1,1,1,3,0,'warning'); +INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',29,1,0,1,0,0,1,2,0,'success'); +INSERT INTO `state` VALUES (30,'Embarcado',4,2,'BOARD',30,0,0,0,2,0,0,3,0,'success'); +INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',29,1,0,1,0,0,1,2,0,'success'); +INSERT INTO `state` VALUES (32,'Polizon OK',3,2,'OK STOWAWAY',31,1,0,0,1,1,1,3,0,'warning'); +INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',29,1,0,1,0,0,1,2,0,'success'); +INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',34,0,0,0,0,0,0,4,1,'alert'); +INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',10,0,1,0,0,0,0,1,0,NULL); +INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',37,1,0,0,4,0,1,2,0,'warning'); +INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',29,1,0,1,0,0,1,2,0,'warning'); +INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',14,0,0,0,2,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',14,0,0,0,2,0,0,2,0,'warning'); +INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',16,0,1,0,0,0,0,0,0,NULL); +INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',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'); +INSERT INTO `ticketCanAdvanceConfig` VALUES (1,5); + INSERT INTO `volumeConfig` VALUES (2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,167.0); INSERT INTO `workCenter` VALUES (1,'Silla',20,859,1,'Av espioca 100',552703,NULL); @@ -2627,6 +2738,7 @@ INSERT INTO `workCenter` VALUES (7,'Tenerife',NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (8,'Silla-Agrario',26,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (9,'Algemesi',20,1354,60,'Fenollars, 2',523549,NULL); INSERT INTO `workCenter` VALUES (10,'Rubi',88,NULL,84,'Av. de la Llana, 131',549722,NULL); +INSERT INTO `workCenter` VALUES (11,'Colombia',NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workerTimeControlError` VALUES (1,'IS_NOT_ALLOWED_FUTURE','No se permite fichar a futuro'); INSERT INTO `workerTimeControlError` VALUES (2,'INACTIVE_BUSINESS','No hay un contrato en vigor'); @@ -2643,6 +2755,7 @@ INSERT INTO `workerTimeControlError` VALUES (9,'UNDEFINED_ERROR','Error sin defi /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `cache`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; @@ -2667,6 +2780,7 @@ INSERT INTO `cache` VALUES (14,'lastBuy','23:59:00'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `hedera`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; @@ -2701,7 +2815,7 @@ INSERT INTO `language` VALUES ('mn','Португалий','Mongolian',1); INSERT INTO `language` VALUES ('pt','Português','Portuguese',1); INSERT INTO `link` VALUES (16,'Printing server','Manage the CUPS printing server','http://printnatura.verdnatura.es','printer'); -INSERT INTO `link` VALUES (20,'Webmail','Verdnatura webmail','https://webmail.verdnatura.es/','mail'); +INSERT INTO `link` VALUES (20,'Webmail','Verdnatura webmail','https://mail.verdnatura.es/','mail'); INSERT INTO `link` VALUES (23,'Verdnatura Beta','Trial version of the web page','https://test-shop.verdnatura.es/','vn'); INSERT INTO `link` VALUES (25,'Shared folder','Shared folder','https://cdn.verdnatura.es/share','backup'); INSERT INTO `link` VALUES (29,'phpMyAdmin','Manage MySQL database','https://pma.verdnatura.es/','pma'); @@ -2710,16 +2824,16 @@ INSERT INTO `link` VALUES (33,'Gitea','Version control system','https://gitea.ve INSERT INTO `link` VALUES (34,'Wiknatura','Verdnatura wiki page','https://wiki.verdnatura.es/','wiki'); INSERT INTO `link` VALUES (35,'phpLDAPadmin','Manage the LDAP database','https://pla.verdnatura.es/','pla'); INSERT INTO `link` VALUES (36,'Applications','Access applications repository','https://cdn.verdnatura.es/vn-access','access'); -INSERT INTO `link` VALUES (37,'Jenkins','CI and CD system','https://jenkins.verdnatura.es','jenkins'); -INSERT INTO `link` VALUES (38,'osTicket','User service center','https://cau.verdnatura.es','osticket'); -INSERT INTO `link` VALUES (39,'Redmine','Flexible project management','https://redmine.verdnatura.es','redmine'); -INSERT INTO `link` VALUES (40,'Grafana','Analytics & monitoring solution','https://grafana.verdnatura.es','grafana'); -INSERT INTO `link` VALUES (41,'Rocket.Chat','Communications platform','https://chat.verdnatura.es','rocketchat'); -INSERT INTO `link` VALUES (42,'Salix','ERP software','https://salix.verdnatura.es','salix'); -INSERT INTO `link` VALUES (43,'Docker','Container management','https://docker.verdnatura.es','docker'); -INSERT INTO `link` VALUES (44,'Proxmox','Virtual environment','https://mox.verdnatura.es','proxmox'); -INSERT INTO `link` VALUES (45,'Shinobi','Network video recorder','https://shinobi.verdnatura.es','shinobi'); -INSERT INTO `link` VALUES (46,'DokuWiki','Internal documentation','https://doku.verdnatura.es','dokuwiki'); +INSERT INTO `link` VALUES (37,'Jenkins','CI and CD system','https://jenkins.verdnatura.es/','jenkins'); +INSERT INTO `link` VALUES (38,'osTicket','User service center','https://cau.verdnatura.es/','osticket'); +INSERT INTO `link` VALUES (39,'Redmine','Flexible project management','https://redmine.verdnatura.es/','redmine'); +INSERT INTO `link` VALUES (40,'Grafana','Analytics & monitoring solution','https://grafana.verdnatura.es/','grafana'); +INSERT INTO `link` VALUES (41,'Rocket.Chat','Communications platform','https://chat.verdnatura.es/','rocketchat'); +INSERT INTO `link` VALUES (42,'Salix','ERP software','https://salix.verdnatura.es/','salix'); +INSERT INTO `link` VALUES (43,'Kubernetes','Container management','https://kube.verdnatura.es/','docker'); +INSERT INTO `link` VALUES (44,'Proxmox','Virtual environment','https://pve.verdnatura.es/','proxmox'); +INSERT INTO `link` VALUES (45,'Shinobi','Network video recorder','https://shinobi.verdnatura.es/','shinobi'); +INSERT INTO `link` VALUES (46,'xWiki','Internal documentation','https://xwiki.verdnatura.es/','dokuwiki'); INSERT INTO `location` VALUES (2,'39.2095886','-0.4173501','Valencia','Calle Fenollar, 2','46680','Algemesi','Valencia','963 242 100','es'); INSERT INTO `location` VALUES (3,'40.4564969','-3.4875829','Madrid','Avenida de la Constitución, 3 - Nave E','28850','Torrejón de Ardoz','Madrid','963 242 100',NULL); @@ -2769,6 +2883,8 @@ INSERT INTO `message` VALUES (18,'orderNotOwnedByUser','The order belongs to ano INSERT INTO `message` VALUES (19,'orderConfirmed','The order has already been confirmed and cannot be modified'); INSERT INTO `message` VALUES (20,'clientNotVerified','Incomplete tax data, please contact your sales representative'); INSERT INTO `message` VALUES (21,'quantityLessThanMin','The quantity cannot be less than the minimum'); +INSERT INTO `message` VALUES (22,'ORDER_ROW_UNAVAILABLE','The ordered quantity exceeds the available'); +INSERT INTO `message` VALUES (23,'AMOUNT_NOT_MATCH_GROUPING','The quantity ordered does not match the grouping'); INSERT INTO `metatag` VALUES (2,'title','Verdnatura Levante SL, mayorista de flores, plantas y complementos para floristería y decoración'); INSERT INTO `metatag` VALUES (3,'description','Verdnatura Levante SL, mayorista de flores, plantas y complementos para floristería y decoración. Envío a toda España, pedidos por internet o por teléfono.'); @@ -2935,6 +3051,7 @@ INSERT INTO `tpvResponse` VALUES (9999,'Operación que ha sido redirigida al emi /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `sage`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; diff --git a/db/dump/.dump/privileges.sql b/db/dump/.dump/privileges.sql index 96d417ec5..66e553763 100644 --- a/db/dump/.dump/privileges.sql +++ b/db/dump/.dump/privileges.sql @@ -1,2207 +1,2217 @@ USE `mysql`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40000 ALTER TABLE `db` DISABLE KEYS */; -INSERT IGNORE INTO `db` VALUES ('','tmp','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','postgresql','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','util','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn2008','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','tmp','android','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','cache','salix','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','hedera','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','nst','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','postgresql','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','hedera','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','android','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','sage','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','pbx','android','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn','android','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','cache','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn2008','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bi','android','Y','Y','Y','Y','N','Y','N','N','N','N','Y','Y','N','Y','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn2008','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','srt','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','psico','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','account','android','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','edi','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','stock','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','hedera','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','salix','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','account','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','edi','android','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','util','hedera-web','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','Consumos','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vncontrol','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','salix','salix','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N'); -INSERT IGNORE INTO `db` VALUES ('','vn','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','Y','N','N'); -INSERT IGNORE INTO `db` VALUES ('','pbx','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','edi','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bs','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','managedesktop','salix','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','account','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','Y','N','N'); -INSERT IGNORE INTO `db` VALUES ('','mysql','salix','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','psico','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','geo','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','floranet','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','tmp','guest','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','util','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','dipole','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','sage','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bs','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','util','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','stock','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','salix','sysadmin','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','pbx','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','.mysqlworkbench','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','hedera','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','account','sysadmin','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','cache','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn2008','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','srt','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','sage','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','srt','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','psico','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','postgresql','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','edi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn2008','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','vn','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','edi','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','dipole','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','cache','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bs','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','bi','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','util','grafana','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','mysql','developerBoss','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','rfid','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); -INSERT IGNORE INTO `db` VALUES ('','floranet','floranet','Y','N','N','N','N','N','N','N','N','N','Y','Y','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','tmp','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','postgresql','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','util','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn2008','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','tmp','android','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','cache','salix','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','hedera','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','nst','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','postgresql','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','hedera','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','android','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','sage','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','pbx','android','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn','android','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','cache','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn2008','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bi','android','Y','Y','Y','Y','N','Y','N','N','N','N','Y','Y','N','Y','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn2008','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','srt','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','psico','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','account','android','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','edi','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','stock','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','hedera','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','salix','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','account','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','edi','android','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','util','hedera-web','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn','hedera-web','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','Consumos','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vncontrol','android','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','salix','salix','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N'); +INSERT IGNORE INTO `db` VALUES ('','vn','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','Y','N','N'); +INSERT IGNORE INTO `db` VALUES ('','pbx','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','edi','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bs','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','managedesktop','salix','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','account','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','Y','N','N'); +INSERT IGNORE INTO `db` VALUES ('','mysql','salix','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','psico','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','geo','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','floranet','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','tmp','guest','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','util','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','dipole','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','sage','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bs','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','util','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','stock','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','salix','sysadmin','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','pbx','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','.mysqlworkbench','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','hedera','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','account','sysadmin','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','cache','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn2008','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','srt','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','sage','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','srt','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','psico','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','postgresql','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','edi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn2008','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','vn','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','edi','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','dipole','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','cache','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bs','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','bi','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','util','grafana','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','mysql','developerBoss','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','rfid','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N'); +INSERT IGNORE INTO `db` VALUES ('','floranet','floranet','Y','N','N','N','N','N','N','N','N','N','Y','Y','N','N','N','N','Y','N','N','N'); /*!40000 ALTER TABLE `db` ENABLE KEYS */; /*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */; -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemTypeL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','country','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemType','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myAddress','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select','Insert,Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitUser','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','producer','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','tagL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','config','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','originL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','origin','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','entryEditor','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','social','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','image','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','tblContadores','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','item_track','alexm@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','value','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','value','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developerBoss','general_log','juan@10.5.1.1','0000-00-00 00:00:00','Select,Drop',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','employee','expedition_PrintOut','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','marketPlace','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','definitivo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','item_group','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','item_feature','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item_feature','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemTag','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemCategoryL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financialBoss','credit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Tipos','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','producer','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mdbVersion','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','province','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','warehouse','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','account','itemTaxCountry','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','province','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTpvTransaction','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketState','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketRow','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrderTicket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrderRow','juan@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrder','juan@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myInvoice','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myClient','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myBasketItem','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myBasketDefaults','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','account','userPassword','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','mainAccountBank','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemCategory','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','answer','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','ekt','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','administrative','taxType','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','fellow','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','address_type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','user','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','userPassword','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','roleRole','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','roleInherit','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','role','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailAliasAccount','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailAlias','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','accountConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','account','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','tpvMerchant','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','account','myUser','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','language','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','imageConfig','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Paises','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Tintas','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','item','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','agencyMode','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','inkL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','ink','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','deliveryMethod','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','reinos','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','collectionHotbed','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailForward','juan@db-proxy1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','location','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailAliasAccount','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','tag','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','news','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k012','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k012','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myMenu','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myBasket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','message','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','guest','myUser','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','guest','myRole','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','followme','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','account','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','android','AccessToken','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','itemTag','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemTag','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k03','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','examQuestion','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','exam','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','exchange','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','supplier','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','employee','printer','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','item_groupToOffer','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','coolerAssist','expedition_PrintOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','putOrder','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','supplyResponse','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','collectionWagonTicket','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','blacklist','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','cdr','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queue','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queueMember','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queuePhone','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','schedule','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','sip','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','browser','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','config','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete','References'); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','orderRowComponent','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','imageCollection','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','orderRow','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','link','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','shelf','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','shelfConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order_row','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order_component','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitAccess','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitAgent','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visit','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','userSession','z-developer@172.16.255.16','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','collectionWagon','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','marketing','news','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','newsTag','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposIva','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposRetencion','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposTransacciones','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','bank_account_type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','salesPerson','item_groupToOffer','carlosap@172.16.5.232','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketService','root@10.2.3.180','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','administrative','movConta','carlosap@172.16.5.232','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','mailConfig','jgallego@81.202.38.190','2022-08-03 23:44:43','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','account_conciliacion','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','accion_dits','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','config','juan@%','0000-00-00 00:00:00','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','util','account','config','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','transitoryDuaUnified','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientDied','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','userPassword','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','roleRole','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','roleInherit','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','role','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailConfig','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailAlias','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','tables_priv','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','event','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','proxies_priv','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','procs_priv','$itBoss@10.5.1.5','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','db','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','columns_priv','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','time','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','slow_log','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','user','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','proc','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','account_detail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','account_detail_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','entryEditor','Compres','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Agencias','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','emailUser','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','agencia_descuadre','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','agency_warehouse','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','salesPerson','inter','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran_state','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Articles','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component_template','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_component_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb_gestdoc','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_recibida','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_role','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_unit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financialBoss','balance_nest_tree','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','deliveryBoss','inter','juan@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Bancos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','barcodes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','barcodes','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','buyer','inter','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','inter','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','agency','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k04','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k03','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k04','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesAssistant','Clientes','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','chanel','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Clientes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','V_edi_item_track','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','v_botanic_export','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','manager','v_botanic_export','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','v_Articles_botanical','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Colores','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Clientes','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','recibida_vencimiento','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','jerarquia','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessAgreement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','producer','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','officeBoss','ticket_observation','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Cajas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','awb_recibida','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','awb','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','buy_edi','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','ACL','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Vehiculos_consumo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizer','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Colores','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Consignatarios','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','travel','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','price_fixed','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','itemType','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','travel','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Bancos_poliza','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','duaDismissed','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','edi_article','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','time','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','operator','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payment','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_supplier','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','edi_supplier','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','travel','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tramos','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Trabajadores','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','empresa','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tintas','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Compres','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','ticket_observation','juan@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas_dits','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Entradas_orden','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','ticket_observation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_turno','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','entrySource','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionScan','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets_state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Entradas','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Tintas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','filtros','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_kop','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','flight','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','zones','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Entradas','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','buy','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','buySource','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','budgetNotes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','specialLabels','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budgetDms','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budget','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','offerList','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bookingPlanner','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budgetInvoiceIn','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','beach','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','business','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos_revisar','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Movimientos_mark','alexm@%','0000-00-00 00:00:00','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Movimientos','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Movimientos','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Movimientos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Monedas','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','calendarHolidays','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','mandato','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','mandato','alexm@%','0000-00-00 00:00:00','Select,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','iva_group','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','greugeType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInIntrastat','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','greuge','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Intrastat','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Intrastat','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','integra2_province','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Grupos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','continent','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_mark','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_revisar','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Reservas','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Ordenes','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Origen','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','pago','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awb','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Paises','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesAssistant','clientDied','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_categorias','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_centros','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_conceptos','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Tintas','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','alertLevel','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_employee','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyMode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Recibos','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','saleCloned','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','pay_met','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Permisos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','shelving','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingStock','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizer','cmrConfig','carlosap@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Proveedores','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','PreciosEspeciales','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','agencia_descuadre','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','price_fixed','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','iva_tipo','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','iva_codigo','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','pago','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Proveedores','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Proveedores_cargueras','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','recibida','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','recibida','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','recibida_iva','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_intrastat','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_iva','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_vencimiento','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Recibos','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agency','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','versiones','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','reference_rate','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','saleComponent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','Remesas','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Reservas','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Rutas','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','address','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','queue','root@localhost','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','address','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountingType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingStock_byWarehouse','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Movimientos','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Series','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','Series','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','Recibos','alexm@%','0000-00-00 00:00:00','Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','price_fixed','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','salesByItemTypeDay','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesAssistant','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','absenceType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','Entradas_Auto','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Vehiculos_consumo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tblContadores','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendar','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendarHolidays','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claim','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimEnd','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','claimRatio','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Cubos','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','cplusRectificationType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','cplusInvoiceType477','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','country','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','mandato_tipo','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyNotes','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','province','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','receipt','jgallego@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','receipt','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','referenceRate','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','report','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','available','guillermo@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','time','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','role','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','role','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','comparativeFilterType','guillermo@10.5.1.4','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','comparativeFilter','guillermo@10.5.1.4','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','route','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','company','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionStateType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','collectionHotbed','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','collectionColors','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','collection','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','cmr_list','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','collection','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','cmr','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientYoke','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','roles_mapping','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketLastState','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','calendar','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','pago','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','clientPhoneBook','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleGroupDetail','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','clientObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','clientObservation','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','productionConfig','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','packingSite','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionPlus','province','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','province','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','sip','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientCredit','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleTracking','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','client','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','client','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleVolume','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerAssistant','Cubos','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','sale','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sale','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','zoneClosure','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','saleComponent','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','saleComponent','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','saleGoal','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleGroup','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleGroupDetail','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','account_detail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','accion','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','volumeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','currency','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','tag','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','currency','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditClassification','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditInsurance','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','currency','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerTimeControl','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','defaulter','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','deliveryMethod','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','deliveryMethod','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','v_compres','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionUser','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','department','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProduction','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProduction','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','absenceType','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionUser','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','disabilityGrade','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dmsType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','dua','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaIntrastat','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaTax','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','agency','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ektEntryAssign','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','itemShelving','root@localhost','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyDms','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlConfig','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entry','guillermo@10.5.1.3','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entrySplit__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectNotes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','project','juan@10.5.1.1','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','productionConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','productionConfig','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditInsurance','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','visible','guillermo@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','errorProduction__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','Tickets','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','packingSite','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','accessTokenConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','printQueueArgs','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','printQueue','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printer','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expedition','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sector','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeLocation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','wks','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingList','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','expeditionTruck','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','alertLevel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionSticker','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dock','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionTruck','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','expeditionPallet','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','expense','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','expeditionScan','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeGroup','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','floramondoNotOfferDay__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','fuelType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeDMS','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeComponent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppe','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','glsExpedition__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','postCode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','pgcMaster','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBarcode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','host','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticket','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceIn','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','intrastat','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailureCause','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrection','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrectionDataSource','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrectionType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInIntrastat__','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInSage','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceOutExpense','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','item','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOutSerial','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOutTax','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','item','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemBarcode','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemBotanical','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBotanicalWithGenus','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemCategory','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','pgcEqu','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','pgc','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','itemCost','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','itemConfig','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemConversor__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','itemCost','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','personalProtectionEquipment','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','payMethod','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payDem','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemPlacementSupply','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemPackingType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemPlacementSupply','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemPlacement__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','payDem','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemRepo__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemSearch','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelving','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemShelvingLog','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketWeekly','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','itemShelvingLog','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','airport','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingSale','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','Tickets','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimEnd','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workCenter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','parking','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packingSiteLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dua','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packingSite','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingWithoutFreight','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemVerdecora__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingWithFreight','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingGifts','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packaging','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','packageEquivalentItem','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packageEquivalent','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packageChecked','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packageChecked','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','packageChecked','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','operator','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','operator','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mail','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Recibos','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','operator','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','mandate','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','occupationCode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','observationType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','defaultViewConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','medicalCenter','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','medicalReview','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','noticeSubscription','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','noticeSubscription','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','noticeCategory','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','noticeCategory','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mrwServiceWeekday','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','mrw','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mrwService','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppePlan','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','buy','carlosap@10.5.1.8','0000-00-00 00:00:00','Select,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','buy','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','packingSiteLog','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleComponent','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','arcRead','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientProtected','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','dua','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','expeditionTruck','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','moving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDetail','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDms','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','vehicle','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awb','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machine','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_dits','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','coolerBoss','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','PreciosEspeciales','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','movingState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','buffer','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferGroup','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','lastRFID','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','person__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','config','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','expedition','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','travel','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','itemPicker','buy','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_Auto','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machine','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','referenceCurrent','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','cooler','Tintas','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','itemBotanical','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','productionConfigLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','signInLog','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketTracking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','hr','inter','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printServerQueue2__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printServerQueue__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','buy','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Movimientos','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','buy','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemMinimumQuantity','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','receipt','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','producer','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','link','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','link','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','vehicle','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','upperStickers','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','province','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','XDiario','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','till','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','recovery','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','photocell','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','supplyResponse','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','customer','last_buy','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','client','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceInTax','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_media','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','recovery','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','buffer','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','professional_category','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','media_type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','media','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','labour_agreement','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','returnBuckets__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','journey','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','income_employee','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','incometype_employee','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hrBoss','income_employee','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','salesByWeek','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routeGate__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','calendar_labour_type','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','adminBoss','XDiario_ALL','alexm@%','0000-00-00 00:00:00','Select,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','rate','carlosap@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientAnnualConsumption','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','productionAssi','rutasBoard','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','logistic','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionLog','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientNewBorn','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleItemShelving__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesBoss','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expedition','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingStock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleParking__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','property','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','config','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleEvent','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','lastIndicators','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleComponent','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemBotanical','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','salesPersonGoal','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hrBoss','journey','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','workerTimeControl','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','currentWorkersStats','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketStateToday','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','shelving','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','shelving','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','shelving','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','customer','supplier','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','state','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','state','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','stockBuyed','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','stowaway','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','supplier','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierExpense','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','ticketService','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketService','jgallego@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingServiceWeekday','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ticketRequest','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketParking','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','taxArea','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','taxClass','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesPersonEvolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','calendar_employee','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticket','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticket','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketCollection','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketDocumentation','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketDms','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','ektEntryAssign','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','intrastat','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','franceExpressConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','ticketLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketCollection','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ticketDms','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackaging','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketParking','alexm@%','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackingList','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketParking','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPreviousPreparingList','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketRefund','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketRequest','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','ticketService','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','ticketServiceType','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketState','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketStateToday','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','greugeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','time','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketWeekly','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','till','juan@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','account','town','juan@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','time','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMana','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','defaulters','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','customer','travel','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','train','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','train','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCenter','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCourse','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCourseType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','travel','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','travelClonedWeekly','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','employee','facturacion_media_anual','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','travelObservation','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bankPolicy','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','travelThermograph','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','tillConfig','juan@%','0000-00-00 00:00:00','Select',''); -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','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','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','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','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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehouse','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workCenter','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientCredit','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','worker','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','workerAppTester','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyGroup','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','worker','alexm@%','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerConfig__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','inventoryDiscrepancyDetail','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingConfig','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerIrpf','juan@%','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerJourney','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerLabour','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerMana','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','workerMana','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerRelatives','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDocument','alexm@%','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrection','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ink','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zone','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','XDiario','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','XDiario','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerTimeControl','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','financial','Greuge_Evolution','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','officeBoss','Greuge_Evolution','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','claimManager','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zonePromo__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingType','alexm@%','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','agencyMode','alexm@%','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','employee','visible','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','productionConfig','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','employee','available','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','ekt','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketCollection','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientChain','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','VMPSettings','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimResponsible','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packingSiteLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','recibida','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','util','grafana','debug','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myOrder','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbVersion','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendar','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','campaign','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketService','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','report','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','buyer','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','defaulter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','componentType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientManaCache','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceIn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','deliveryInformation','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','grafana','role','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','supplyOffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketStateToday','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeComplement','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleVolume','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','component','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','train','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','ticketPalletized','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','autonomy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionMistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketParking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','state','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','taxClass','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByWeek','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceInDueDay','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sectorProductivity','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByclientSalesPerson','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','marketPlace','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeAction','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProduction','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceOut','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbBranch','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerProductivity','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','config','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','userSession','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','receipt','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','buy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarHolidays','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parking','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','role','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','errorLogApp','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','continent','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','lastRFID','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','farmingInvoiceIn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','agencyMode','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','absenceType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGroupDetail','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbVersionTree','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionTruck','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimReason','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','log','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','failureLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientNewBorn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','farming','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','order','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','packingSpeed','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expense','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerLabour','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','orderRow','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','movingLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','warehouse','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sector','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','salesPersonGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','movingState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimResult','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routesMonitor','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionPallet','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','ventas','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','intrastat','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueueArgs','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','grafana','Greuge_Evolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','host','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','country','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','waste','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketTracking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemCategory','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleTracking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','producer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','cache','grafana','stock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','account','grafana','user','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deliveryMethod','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketCollection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','lastHourProduction','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','warehouseAlias','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneClosure','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','origin','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','referenceCurrent','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','thermograph','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dms','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dmsType','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','greenhouseBoss','property','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketLastState','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myAddress','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','tag','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemTag','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Tipos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','saleBuy','carlosap@10.5.1.6','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','orderTicket','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','negativeOrigin','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','route','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemPackingType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','expedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneEstimatedDelivery','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','payMethod','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemCost','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','worker','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entry','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','department','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','grafana','rutasBoard','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','address','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerDistributionCategory','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','client','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zone','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packingSite','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemTaxCountry','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerLabourDataByMonth','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferFreeLength','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByItemTypeDay','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','collection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','project','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','inventoryDiscrepancy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektSubAddress','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item_track','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','putOrder','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','parking','juan@10.5.1.2','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenance','machine','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendarType','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','glsExpedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','clientType','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProductionLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','integra2Province','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleState','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machineDetail','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machineDms','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerJourney','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','productionError','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','professionalCategory','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbApp','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','glsConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','clientContact','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','collectionVolumetry','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','item','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerIncome','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','tagAbbreviation','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostConfig','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostSenderAddress','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostServiceWeekday','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostExpedition','root@localhost','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorCollection','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingService','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','tickets_gestdoc','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','flight','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routeAction','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','bankErrorCode','jgallego@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farming','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingInvoiceIn','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeCommission','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','warehouse','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimBeginning','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','invoicing','vehiclePlateRegex','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessSchedule','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientRisk','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessCalendar','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','item','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','routesMonitor','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyNotes','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','taxType','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','autonomy','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionPlus','autonomy','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','routePalletized','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticBoss','warehouse','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','m3','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cajas','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','tagAbbreviation','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemImageQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketing','parking','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sectorCollection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplier','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','defaulter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInTaxBookingAccount','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','business','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','item','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientAnnualConsumption','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','parking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','bankEntityConfig','carlosap@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','shelving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','duaEntry','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','fieldAcl','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','module','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','printConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','url','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','userConfigView','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRedelivery','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientRisk','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','sale','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','chain','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','cl_main','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','company','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routeAction','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','ticket_observation','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Tickets_turno','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','jerarquia','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Impresoras','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','autoRadioLogCall','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','autoRadioConfig','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Recibos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Rutas','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Movimientos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','state','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','route','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routeComplement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','deliveryMethod','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Tickets','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionRoute_Monitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionScan','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionPallet','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','province','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAccess','root@localhost','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_botanic_export','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','itemCost','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','ticketDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workCenter','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workerDepartment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bi','deliveryAssistant','rotacion','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','agency','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','agencyMode','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','vehicle','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','vehicleEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','postCode','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','town','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claim','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierAccount','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerDepartment','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','cdr','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerTimeControlConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','putOrder','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProductionUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','contactChannel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','vehicle','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerProductivityConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','antenna','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','cmr','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','accounting','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditClassification','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','moving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDevelopment','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','expeditionLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','compradores_evolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','currency','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimObservation','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','salesPreviousPreparated','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','company','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','buffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); -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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDms','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ink','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAgent','root@localhost','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','remittance','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','accountReconciliation','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','accountDetail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountDetail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountDetailType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','airport','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNote','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNoteDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNoteState','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponentTemplate','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbComponentType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponentType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbInvoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','awbInvoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbRole','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbUnit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','balanceNestTree','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK1','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK1','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK2','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK2','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK3','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK3','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK4','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK4','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','dmsStorageBox','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','company','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','component','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','componentType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','priceFixed','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingSale','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','tagAbbreviation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','ticketTracking','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','item','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update'); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','ticketDms','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','agencyExtraCharge','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','sale_freightComponent','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accounting','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRatio','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketConfig','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneIncluded','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneGeo','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','quality','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','category','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektEntryAssign','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket_type','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','timeSlots','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierFreight','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollWorker','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollWorkCenter','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','professionalCategory','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visit','root@localhost','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicy','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyDetail','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyReview','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','roadmapStop','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyWorkCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','greenhouseBoss','business','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','teamBoss','business','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','solunionCAP','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','clientUnpaid','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','pay_dem','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceOut','guillermo@10.5.1.3','0000-00-00 00:00:00','Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','invoiceOut','guillermo@10.5.1.3','0000-00-00 00:00:00','Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','accountDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','accountDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','project','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','antenna','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferPool','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','enteringLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','expeditionLoading','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','failureLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','movingLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','sorterLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','genericAllocation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessReasonEnd','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -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',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNoteDms','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNoteState','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','buy','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','claimDestination','juan@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryLog','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','grafana','expedition_PrintOut','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketObservation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','recovery','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','observationType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientInforma','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','accountingType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); -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',''); -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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemTypeL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','country','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemType','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myAddress','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select','Insert,Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitUser','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','producer','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','tagL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','config','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','originL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','origin','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','entryEditor','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','social','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','image','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','tblContadores','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','item_track','alexm@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','value','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','value','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developerBoss','general_log','juan@10.5.1.1','0000-00-00 00:00:00','Select,Drop',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','employee','expedition_PrintOut','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','marketPlace','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','definitivo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','item_group','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','item_feature','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item_feature','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemTag','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemCategoryL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financialBoss','credit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Tipos','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','producer','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mdbVersion','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','province','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','warehouse','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','account','itemTaxCountry','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','province','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTpvTransaction','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketState','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketRow','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrderTicket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrderRow','juan@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myOrder','juan@db-proxy2.static.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myInvoice','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myClient','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myBasketItem','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myBasketDefaults','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','account','userPassword','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','mainAccountBank','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','itemCategory','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','answer','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','ekt','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','administrative','taxType','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','fellow','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','address_type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','user','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','userPassword','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','roleRole','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','roleInherit','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','role','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailAliasAccount','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','mailAlias','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','accountConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','employee','account','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','tpvMerchant','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','account','myUser','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','language','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','imageConfig','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Paises','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','Tintas','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','item','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','agencyMode','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','inkL10n','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','ink','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','deliveryMethod','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','guest','reinos','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','collectionHotbed','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailForward','juan@db-proxy1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','location','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailAliasAccount','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','tag','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','news','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k012','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k012','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myMenu','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myBasket','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','message','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','guest','myUser','root@pc-juan.dyn.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','guest','myRole','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','followme','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','account','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','android','AccessToken','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','itemTag','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemTag','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k03','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','examQuestion','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','psico','hr','exam','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','exchange','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','supplier','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','employee','printer','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','manager','item_groupToOffer','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','coolerAssist','expedition_PrintOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','putOrder','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','supplyResponse','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','collectionWagonTicket','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','blacklist','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','cdr','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queue','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queueMember','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','queuePhone','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','schedule','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','employee','sip','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','browser','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','config','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete','References'); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','orderRowComponent','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','imageCollection','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','orderRow','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','link','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','shelf','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','shelfConfig','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order_row','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','order_component','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitAccess','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visitAgent','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','visit','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','userSession','z-developer@172.16.255.16','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','collectionWagon','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','marketing','news','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','newsTag','z-developer@www1.static.verdnatura.es','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposIva','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposRetencion','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','employee','TiposTransacciones','z-sysadmin@172.16.255.30','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','bank_account_type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','salesPerson','item_groupToOffer','carlosap@172.16.5.232','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','account','myTicketService','root@10.2.3.180','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','administrative','movConta','carlosap@172.16.5.232','2022-08-03 23:44:43','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','employee','mailConfig','jgallego@81.202.38.190','2022-08-03 23:44:43','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','account_conciliacion','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','accion_dits','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','config','juan@%','0000-00-00 00:00:00','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','util','account','config','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','transitoryDuaUnified','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientDied','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','userPassword','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','roleRole','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','roleInherit','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','role','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailConfig','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','hr','mailAlias','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','tables_priv','$itBoss@10.0.2.69','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','event','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','proxies_priv','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','procs_priv','$itBoss@10.5.1.5','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','db','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','columns_priv','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','time','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','slow_log','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','user','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','proc','$itBoss@10.0.2.68','2022-08-03 23:44:43','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','account_detail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','account_detail_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','entryEditor','Compres','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Agencias','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','emailUser','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','agencia_descuadre','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','agency_warehouse','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','salesPerson','inter','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','albaran_state','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Articles','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_component','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component_template','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_component_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','awb_gestdoc','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','awb_recibida','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_role','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_unit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financialBoss','balance_nest_tree','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','deliveryBoss','inter','juan@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Bancos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','barcodes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','barcodes','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','buyer','inter','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','inter','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','agency','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','buy_edi_k04','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k03','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi_k04','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesAssistant','Clientes','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','chanel','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','v_empresa','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Clientes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','V_edi_item_track','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','v_botanic_export','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','manager','v_botanic_export','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','v_Articles_botanical','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Colores','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Clientes','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','recibida_vencimiento','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','jerarquia','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessAgreement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','producer','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','officeBoss','ticket_observation','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Cajas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','awb_recibida','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','awb','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','buy_edi','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','ACL','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Vehiculos_consumo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizer','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Colores','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Consignatarios','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','travel','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','price_fixed','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','itemType','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','travel','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Bancos_poliza','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','duaDismissed','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','edi_article','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','time','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','operator','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payment','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_supplier','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','edi_supplier','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','travel','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tramos','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Trabajadores','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','empresa','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tintas','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Compres','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','ticket_observation','juan@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas_dits','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Entradas_orden','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','ticket_observation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_turno','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','entrySource','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionScan','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets_state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Entradas','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Tintas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','filtros','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_kop','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','flight','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','zones','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Entradas','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','buy','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','buySource','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','budgetNotes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','specialLabels','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budgetDms','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budget','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','offerList','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bookingPlanner','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','budgetInvoiceIn','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','beach','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','business','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos_revisar','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Movimientos_mark','alexm@%','0000-00-00 00:00:00','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Movimientos','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Movimientos','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Movimientos','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Movimientos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Monedas','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','calendarHolidays','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','mandato','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','mandato','alexm@%','0000-00-00 00:00:00','Select,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','iva_group','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','greugeType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInIntrastat','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','greuge','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Intrastat','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Intrastat','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','integra2_province','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Grupos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','continent','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Movimientos_componentes','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_mark','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Movimientos_revisar','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Reservas','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Ordenes','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Origen','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','pago','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awb','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Paises','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesAssistant','clientDied','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_categorias','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_centros','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_conceptos','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Tintas','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','alertLevel','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','payroll_employee','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyMode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Recibos','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','saleCloned','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','pay_met','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Permisos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','shelving','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingStock','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizer','cmrConfig','carlosap@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Proveedores','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','PreciosEspeciales','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','agencia_descuadre','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','price_fixed','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','iva_tipo','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','iva_codigo','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','pago','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Proveedores','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Proveedores_cargueras','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','recibida','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','recibida','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','recibida_iva','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_intrastat','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_iva','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','recibida_vencimiento','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Recibos','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agency','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','bankEntity','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','versiones','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','reference_rate','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','saleComponent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','Remesas','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Reservas','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Rutas','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','address','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','queue','root@localhost','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','address','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountingType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingStock_byWarehouse','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Movimientos','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Series','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','Series','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','Recibos','alexm@%','0000-00-00 00:00:00','Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','price_fixed','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','salesByItemTypeDay','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesAssistant','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','absenceType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','Entradas_Auto','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionAssi','Vehiculos_consumo','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tblContadores','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendar','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendarHolidays','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claim','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimEnd','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','claimRatio','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Cubos','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','cplusRectificationType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','cplusInvoiceType477','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','country','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','mandato_tipo','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyNotes','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','province','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','receipt','jgallego@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','receipt','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','referenceRate','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','report','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','available','guillermo@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','time','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','role','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','role','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','comparativeFilterType','guillermo@10.5.1.4','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','comparativeFilter','guillermo@10.5.1.4','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','route','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','company','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionStateType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','collectionHotbed','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','collectionColors','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','collection','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','cmr_list','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','collection','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','cmr','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientYoke','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','mysql','developer','roles_mapping','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketLastState','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','calendar','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','pago','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','clientPhoneBook','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleGroupDetail','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','clientObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','clientObservation','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','productionConfig','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','packingSite','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionPlus','province','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','productionPlus','province','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','sip','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientCredit','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','saleTracking','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleTracking','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','client','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','client','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleVolume','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerAssistant','Cubos','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','sale','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sale','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','zoneClosure','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','saleComponent','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','saleComponent','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','saleGoal','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleGroup','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleGroupDetail','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','account_detail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component_type','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','accion','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','volumeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','currency','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','tag','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','currency','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditClassification','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditInsurance','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','currency','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerTimeControl','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','defaulter','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','deliveryMethod','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','deliveryMethod','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','v_compres','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionUser','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','department','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProduction','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProduction','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','absenceType','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionUser','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','disabilityGrade','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dmsType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','dua','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaIntrastat','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','duaInvoiceIn','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','duaTax','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tickets_turno','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','cl_main','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','agency','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ektEntryAssign','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','itemShelving','root@localhost','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyDms','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlConfig','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entry','guillermo@10.5.1.3','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entrySplit__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectNotes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','project','juan@10.5.1.1','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','productionConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','productionConfig','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditInsurance','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','visible','guillermo@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','errorProduction__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','Tickets','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','packingSite','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','accessTokenConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','printQueueArgs','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','printQueue','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printer','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expedition','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sector','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeLocation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','wks','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingList','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','expeditionTruck','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','alertLevel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionSticker','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dock','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionTruck','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','expeditionPallet','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','expense','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','expeditionScan','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeGroup','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','floramondoNotOfferDay__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','fuelType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeDMS','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppeComponent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppe','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','glsExpedition__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','postCode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','pgcMaster','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBarcode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','host','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticket','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceIn','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','intrastat','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailureCause','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrection','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrectionDataSource','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrectionType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInIntrastat__','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInSage','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInTax','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceOutExpense','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','item','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOutSerial','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceOutTax','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','item','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemBarcode','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemBotanical','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBotanicalWithGenus','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemCategory','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','pgcEqu','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','pgc','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','itemCost','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','itemConfig','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemConversor__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','itemCost','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','personalProtectionEquipment','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','payMethod','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payDem','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemPlacementSupply','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemPackingType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemPlacementSupply','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','itemPlacementSupplyList','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemPlacement__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','payDem','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemRepo__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemSearch','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelving','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemShelvingLog','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketWeekly','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','itemShelvingLog','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','airport','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemShelvingSale','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','Tickets','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimEnd','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workCenter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','itemTaxCountry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','parking','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packingSiteLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','dua','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packingSite','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingWithoutFreight','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemVerdecora__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingWithFreight','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingGifts','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packagingConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packaging','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','packageEquivalentItem','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packageEquivalent','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','packageChecked','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packageChecked','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','packageChecked','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','operator','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','operator','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mail','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Recibos','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','operator','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','mandate','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','occupationCode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','observationType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','defaultViewConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','medicalCenter','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','medicalReview','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','noticeSubscription','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','noticeSubscription','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','noticeCategory','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','noticeCategory','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mrwServiceWeekday','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','mrw','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','mrwService','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ppePlan','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','buy','carlosap@10.5.1.8','0000-00-00 00:00:00','Select,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','buy','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','packingSiteLog','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleComponent','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','arcRead','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientProtected','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','invoiceOut','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','dua','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','expeditionTruck','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','moving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDetail','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDms','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','vehicle','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awb','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machine','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_dits','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','coolerBoss','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','PreciosEspeciales','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','movingState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','buffer','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferGroup','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','lastRFID','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','person__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','config','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','expedition','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','travel','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','itemPicker','buy','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_Auto','alexm@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machine','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','referenceCurrent','alexm@%','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','cooler','Tintas','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','itemBotanical','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','productionConfigLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','signInLog','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketTracking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','hr','inter','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printServerQueue2__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','printServerQueue__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','buy','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Movimientos','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','buy','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemMinimumQuantity','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','receipt','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','producer','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','link','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','link','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','vehicle','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','upperStickers','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','province','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','XDiario','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','till','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','financial','recovery','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','photocell','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','supplyResponse','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','customer','last_buy','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','client','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceInTax','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_media','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','recovery','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','buffer','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','professional_category','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','media_type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','media','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','labour_agreement','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','returnBuckets__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','journey','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','income_employee','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','incometype_employee','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hrBoss','income_employee','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','salesByWeek','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routeGate__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','calendar_labour_type','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','adminBoss','XDiario_ALL','alexm@%','0000-00-00 00:00:00','Select,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','rate','carlosap@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientAnnualConsumption','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','productionAssi','rutasBoard','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','logistic','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionLog','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientNewBorn','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleItemShelving__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesBoss','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expedition','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingStock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleParking__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','property','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','config','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleEvent','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','lastIndicators','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleComponent','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemBotanical','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','salesPersonGoal','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hrBoss','journey','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','workerTimeControl','alexm@%','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','currentWorkersStats','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketStateToday','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','shelving','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','shelving','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','shelving','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','customer','supplier','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','state','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','state','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','stockBuyed','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','stowaway','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','supplier','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierAccount','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierExpense','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','ticketService','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketService','jgallego@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingServiceWeekday','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ticketRequest','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketParking','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','taxArea','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','taxClass','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','taxCode','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesPersonEvolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','calendar_employee','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticket','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticket','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketCollection','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketDocumentation','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketDms','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','ektEntryAssign','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','intrastat','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','franceExpressConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','ticketLog','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketCollection','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ticketDms','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackaging','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketParking','alexm@%','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackingList','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketParking','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPreviousPreparingList','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','ticketRefund','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketRequest','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','ticketService','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','ticketServiceType','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketState','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketStateToday','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','greugeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','time','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketWeekly','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','till','juan@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','account','town','juan@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','time','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMana','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','defaulters','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','customer','travel','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','train','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','train','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCenter','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCourse','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','trainingCourseType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','travel','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','travelClonedWeekly','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','employee','facturacion_media_anual','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','travelObservation','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','bankPolicy','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','travelThermograph','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','tillConfig','juan@%','0000-00-00 00:00:00','Select',''); +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','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','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','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','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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehouse','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workCenter','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientCredit','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','worker','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','workerAppTester','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyGroup','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','worker','alexm@%','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDepartment','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerConfig__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','inventoryDiscrepancyDetail','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingConfig','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerIrpf','juan@%','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerJourney','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerLabour','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerMana','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','workerMana','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','entryConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerRelatives','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDocument','alexm@%','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrection','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ink','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zone','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','XDiario','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','XDiario','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerTimeControl','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','financial','Greuge_Evolution','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','officeBoss','Greuge_Evolution','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','claimManager','rotacion','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zonePromo__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingConfig','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingType','alexm@%','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','agencyMode','alexm@%','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','employee','visible','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','productionConfig','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','employee','available','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','logistic','ekt','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','ticketCollection','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientChain','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','VMPSettings','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimResponsible','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packingSiteLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','recibida','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','util','grafana','debug','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myOrder','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbVersion','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendar','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','campaign','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketService','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','report','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','buyer','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','defaulter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','componentType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientManaCache','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceIn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','deliveryInformation','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','grafana','role','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','supplyOffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketStateToday','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeComplement','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleVolume','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','component','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','train','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','ticketPalletized','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','autonomy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionMistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketParking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','state','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','taxClass','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByWeek','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceInDueDay','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sectorProductivity','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByclientSalesPerson','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','marketPlace','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeAction','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProduction','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceOut','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbBranch','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerProductivity','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','config','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','userSession','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','receipt','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','buy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarHolidays','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parking','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','role','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','errorLogApp','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','continent','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','lastRFID','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','farmingInvoiceIn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','agencyMode','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','absenceType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGroupDetail','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMistakeType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbVersionTree','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionTruck','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimReason','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','log','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','failureLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientNewBorn','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','farming','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','order','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','packingSpeed','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expense','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerLabour','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','orderRow','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','movingLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','warehouse','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sector','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','salesPersonGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','movingState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimResult','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routesMonitor','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionPallet','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','ventas','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','intrastat','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueueArgs','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','grafana','Greuge_Evolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','host','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','country','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','waste','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketTracking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemCategory','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleTracking','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','producer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','cache','grafana','stock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','account','grafana','user','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deliveryMethod','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketCollection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','lastHourProduction','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','warehouseAlias','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneClosure','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','origin','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','referenceCurrent','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','thermograph','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dms','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dmsType','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','greenhouseBoss','property','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketLastState','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','guest','myAddress','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','tag','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemTag','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','handmadeBoss','Tipos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','saleBuy','carlosap@10.5.1.6','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','orderTicket','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','negativeOrigin','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','route','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemPackingType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','expedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneEstimatedDelivery','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','payMethod','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemCost','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','worker','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entry','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','department','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','grafana','rutasBoard','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','address','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerDistributionCategory','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','client','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zone','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packingSite','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemTaxCountry','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerLabourDataByMonth','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','bufferFreeLength','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','salesByItemTypeDay','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','collection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','project','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','inventoryDiscrepancy','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektSubAddress','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','item_track','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','putOrder','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','parking','juan@10.5.1.2','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenance','machine','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','calendarType','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','glsExpedition','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','clientType','juan@10.5.1.2','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProductionLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','integra2Province','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleState','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machineDetail','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','machineDms','juan@10.5.1.1','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerJourney','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','productionError','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','professionalCategory','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','mdbApp','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','glsConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','clientContact','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','collectionVolumetry','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','item','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerIncome','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','tagAbbreviation','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostConfig','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostSenderAddress','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostServiceWeekday','jenkins@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','chronopostExpedition','root@localhost','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorCollection','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','sendingService','jenkins@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','adminOfficer','tickets_gestdoc','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','flight','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routeAction','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','bankErrorCode','jgallego@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farming','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingInvoiceIn','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','routeCommission','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','expeditionState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','warehouse','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimBeginning','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','invoicing','vehiclePlateRegex','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessSchedule','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientRisk','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessCalendar','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','item','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','routesMonitor','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyNotes','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','payment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','taxType','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','guest','autonomy','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionPlus','autonomy','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','routePalletized','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticBoss','warehouse','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','m3','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cajas','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','tagAbbreviation','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemImageQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketing','parking','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sectorCollection','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplier','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','defaulter','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInTaxBookingAccount','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','business','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','dock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','item','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','clientAnnualConsumption','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','parking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','bankEntityConfig','carlosap@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','shelving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','duaEntry','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','fieldAcl','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','module','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','printConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','url','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','userConfigView','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRedelivery','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientRisk','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','sale','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','chain','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','warehouse_pickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','cl_main','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','company','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routeAction','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','ticket_observation','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Tickets_turno','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','jerarquia','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Impresoras','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','autoRadioLogCall','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','autoRadioConfig','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Recibos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Rutas','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Movimientos','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','state','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','route','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','routeComplement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','deliveryMethod','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','Tickets','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionRoute_Monitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionScan','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionPallet','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','province','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAccess','root@localhost','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_botanic_export','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','itemCost','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','ticketDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workCenter','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workerDepartment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bi','deliveryAssistant','rotacion','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','agency','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','agencyMode','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','vehicle','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','vehicleEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','postCode','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','town','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claim','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierAccount','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerDepartment','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','pbx','grafana','cdr','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerTimeControlConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','putOrder','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleMistake','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceProductionUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','contactChannel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deviceLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','vehicle','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','packaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','workerProductivityConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','antenna','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','cmr','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','accounting','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditClassification','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','moving','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDevelopment','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','expeditionLog','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','compradores_evolution','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','currency','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimObservation','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','salesPreviousPreparated','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','company','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','buffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); +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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDms','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ink','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAgent','root@localhost','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','remittance','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','accountReconciliation','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','accountDetail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountDetail','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','accountDetailType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','airline','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','airport','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNote','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNoteDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','deliveryNoteState','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponentTemplate','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbComponentType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbComponentType','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','awbDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','awbInvoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','awbInvoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbRole','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','awbUnit','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','balanceNestTree','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK1','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK1','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK2','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK2','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK3','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK3','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','buyer','ektK4','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','edi','administrative','ektK4','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','dmsStorageBox','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','company','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','warehousePickup','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','component','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','componentType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','priceFixed','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingSale','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','tagAbbreviation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','ticketTracking','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','item','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update'); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','ticketDms','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','agencyExtraCharge','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','sale_freightComponent','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accounting','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRatio','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketConfig','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneIncluded','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneGeo','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','quality','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','category','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektEntryAssign','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket_type','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','timeSlots','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierFreight','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollWorker','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollWorkCenter','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','payrollComponent','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','professionalCategory','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visit','root@localhost','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicy','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyDetail','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyReview','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','roadmapStop','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyWorkCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','greenhouseBoss','business','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','teamBoss','business','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','solunionCAP','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','clientUnpaid','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','pay_dem','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceOut','guillermo@10.5.1.3','0000-00-00 00:00:00','Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','invoiceOut','guillermo@10.5.1.3','0000-00-00 00:00:00','Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','accountDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','accountDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','project','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','antenna','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferPool','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','enteringLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','expeditionLoading','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','failureLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','movingLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','sorterLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','genericAllocation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessReasonEnd','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +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',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNoteDms','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','deliveryNoteState','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','buy','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','claimDestination','juan@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryLog','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','dipole','grafana','expedition_PrintOut','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketObservation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','recovery','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','observationType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientInforma','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','accountingType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +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',''); +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','production','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','supplierAccount','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','alertLevel','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivityType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','priceDelta','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parkingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); +INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travelLog','guillermo@db-proxy2.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 */; -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','port','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','secure','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','host','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','active','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','role','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','nickname','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','name','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','created','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','lastUpdate','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','userVisitFk','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','order','id','2022-08-03 23:44:43','References'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','testRestUri','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','restUri','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','defaultLang','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','employee','sip','extension','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','employee','sip','user_id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','description','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','companyFk','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','nickname','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','email','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','lang','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','isActive','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','id','2022-08-03 23:44:43','Insert'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','provinceFk','2022-08-03 23:44:43','Insert,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','nickname','2022-08-03 23:44:43','Insert,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','street','2022-08-03 23:44:43','Insert,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','clientFk','2022-08-03 23:44:43','Insert'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','city','2022-08-03 23:44:43','Insert,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','postalCode','2022-08-03 23:44:43','Insert,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myClient','defaultAddressFk','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myClient','isToBeMailed','2022-08-03 23:44:43','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','imageConfig','url','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Paises','Id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Paises','Pais','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Tintas','Id_Tinta','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Tintas','name','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','tblContadores','dbproduccion','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','pdfsDir','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','testDomain','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','productionDomain','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','defaultForm','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','id','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','deliveryMethodFk','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','web','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','agencyFk','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','description','2022-08-03 23:44:43','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','config','dbproduccion','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','role','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','email','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','user_id','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','extension','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','name','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','active','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','workerFk','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','id','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','departmentFk','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','companyCodeFk','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','routeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','name','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','beachFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketPacked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketFree','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketProduction','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','packages','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','note','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','dated','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','dockFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','m3','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','priority','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','etd','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','m3boxes','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','bufferFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','isPickingAllowed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','productionBoss','routesMonitor','expeditionTruckFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','id','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','nickname','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','itemFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','ticketFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','concept','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','quantity','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','originalQuantity','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','discount','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','reserved','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isPicked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isPriceFixed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isAdded','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','total','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','itemFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','ticketFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','concept','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','quantity','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','originalQuantity','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','discount','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','reserved','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isPicked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isPriceFixed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isAdded','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','total','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','postCode','code','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','postCode','townFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','town','provinceFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','equivalent','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','stems','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minPrice','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isToPrint','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','family','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','box','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','category','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','doPhoto','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','image','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','inkFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','intrastatFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','hasMinPrice','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','comment','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','typeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','generic','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','producerFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','description','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','density','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','relevancy','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','expenseFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isActive','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','subName','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag5','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value5','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag6','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value6','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag7','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value7','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag8','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value8','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag9','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value9','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag10','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value10','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minimum','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','upToDown','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','supplyResponseFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','hasKgPrice','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isFloramondo','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isFragile','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','numberOfItemsPerCask','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','embalageCode','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','quality','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','stemMultiplier','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','itemPackingTypeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','packingOut','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','genericFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','packingShelve','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isLaid','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','lastUsed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','weightByPiece','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Entrada','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Proveedor','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Fecha','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','nickname','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','refFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','addressFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','workerFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','observations','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isSigned','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isLabeled','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isPrinted','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','packages','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','location','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','hour','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isBlocked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','solution','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','routeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','priority','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','hasPriority','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','companyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','agencyModeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','landed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isBoxed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isDeleted','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zoneFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zonePrice','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zoneBonus','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','totalWithVat','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','totalWithoutVat','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','weight','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','clonedFrom','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','cmrFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','config','truckLength','0000-00-00 00:00:00','Select'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','production','item','isBoxPickingMode','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','supplierFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','dated','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceNumber','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isExcludedFromAvailable','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isConfirmed','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isOrdered','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isRaid','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','commission','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','evaNotes','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','travelFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','currencyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','companyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','gestDocFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','loadPriority','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','kop','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','sub','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','pro','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','auction','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceAmount','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','buyerFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','typeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','reference','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','observationEditorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','clonedFrom','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','lockerUserFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','locked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Referencia','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Inventario','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Confirmada','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Pedida','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Redada','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','comision','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','odbc_date','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Notas_Eva','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','travel_id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Moneda','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','empresa_id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','gestdoc_id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','recibida_id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','loadPriority','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','kop','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','sub','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','pro','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','invoiceAmount','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','buyerFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','typeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','reference','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serial','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','issued','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','docFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','booked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','operated','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serial','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','issued','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','docFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','booked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','operated','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','id','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serial','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','issued','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','created','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','docFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','booked','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','operated','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); -INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','port','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','secure','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','mailConfig','host','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','active','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','role','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','nickname','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','name','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','employee','user','id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','created','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','lastUpdate','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','userSession','userVisitFk','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','order','id','2022-08-03 23:44:43','References'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','testRestUri','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','restUri','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','defaultLang','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','employee','sip','extension','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','employee','config','id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','employee','sip','user_id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','description','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','companyFk','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','tpvMerchant','id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','nickname','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','email','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','account','myUser','lang','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','isActive','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','id','2022-08-03 23:44:43','Insert'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','provinceFk','2022-08-03 23:44:43','Insert,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','nickname','2022-08-03 23:44:43','Insert,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','street','2022-08-03 23:44:43','Insert,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','clientFk','2022-08-03 23:44:43','Insert'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','city','2022-08-03 23:44:43','Insert,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myAddress','postalCode','2022-08-03 23:44:43','Insert,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myClient','defaultAddressFk','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','account','myClient','isToBeMailed','2022-08-03 23:44:43','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','imageConfig','url','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Paises','Id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Paises','Pais','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Tintas','Id_Tinta','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','Tintas','name','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','guest','tblContadores','dbproduccion','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','pdfsDir','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','testDomain','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','productionDomain','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','hedera','guest','config','defaultForm','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','id','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','deliveryMethodFk','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','web','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','agencyFk','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','agencyMode','description','2022-08-03 23:44:43','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','guest','config','dbproduccion','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','role','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','email','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','user_id','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','extension','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','name','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','active','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','workerFk','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','id','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','departmentFk','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','companyCodeFk','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','routeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','name','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','beachFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketPacked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketFree','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','ticketProduction','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','packages','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','note','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','dated','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','dockFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','m3','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','priority','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','etd','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','m3boxes','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','bufferFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','isPickingAllowed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','productionBoss','routesMonitor','expeditionTruckFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','id','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','nickname','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','itemFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','ticketFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','concept','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','quantity','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','originalQuantity','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','discount','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','reserved','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isPicked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isPriceFixed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','isAdded','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','total','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','sale','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','itemFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','ticketFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','concept','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','quantity','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','originalQuantity','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','discount','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','reserved','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isPicked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isPriceFixed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','isAdded','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','total','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','salesAssistant','sale','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','postCode','code','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','postCode','townFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryAssistant','town','provinceFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','equivalent','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','stems','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minPrice','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isToPrint','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','family','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','box','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','category','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','doPhoto','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','image','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','inkFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','intrastatFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','hasMinPrice','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','comment','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','typeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','generic','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','producerFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','description','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','density','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','relevancy','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','expenseFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isActive','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','subName','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag5','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value5','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag6','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value6','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag7','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value7','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag8','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value8','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag9','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value9','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','tag10','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','value10','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minimum','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','upToDown','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','supplyResponseFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','hasKgPrice','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isFloramondo','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isFragile','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','numberOfItemsPerCask','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','embalageCode','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','quality','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','stemMultiplier','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','itemPackingTypeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','packingOut','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','genericFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','packingShelve','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','isLaid','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','lastUsed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','weightByPiece','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Entrada','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Proveedor','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Fecha','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','nickname','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','refFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','addressFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','workerFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','observations','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isSigned','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isLabeled','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isPrinted','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','packages','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','location','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','hour','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isBlocked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','solution','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','routeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','priority','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','hasPriority','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','companyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','agencyModeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','landed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isBoxed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','isDeleted','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zoneFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zonePrice','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','zoneBonus','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','totalWithVat','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','totalWithoutVat','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','weight','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','clonedFrom','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','cmrFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','config','truckLength','0000-00-00 00:00:00','Select'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','production','item','isBoxPickingMode','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','supplierFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','dated','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceNumber','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isExcludedFromAvailable','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isConfirmed','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isOrdered','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','isRaid','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','commission','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','evaNotes','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','travelFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','currencyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','companyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','gestDocFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','loadPriority','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','kop','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','sub','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','pro','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','auction','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','invoiceAmount','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','buyerFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','typeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','reference','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','observationEditorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','clonedFrom','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','lockerUserFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','locked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Referencia','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Inventario','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Confirmada','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Pedida','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Redada','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','comision','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','odbc_date','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Notas_Eva','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','travel_id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Moneda','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','empresa_id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','gestdoc_id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','recibida_id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','loadPriority','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','kop','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','sub','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','pro','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','invoiceAmount','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','buyerFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','typeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','reference','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serial','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','issued','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','docFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','booked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','operated','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serial','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','issued','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','docFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','booked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','operated','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','id','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serialNumber','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serial','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','issued','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierRef','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','currencyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','created','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','companyFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','docFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','booked','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','operated','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','bookEntried','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update'); +INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','editorFk','0000-00-00 00:00:00','Update'); /*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */; /*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */; -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myorder_getavailable','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myOrder_calcCatalogFull','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_checkConfig','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_calcCatalogFromItem','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_getTax','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','log_add','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','employee','item_listAllocation','PROCEDURE','z-developer@www1.static.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','mytpvtransaction_end','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_list','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTicket_getServices','PROCEDURE','root@10.2.3.180','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_getrows','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_getpackages','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTicket_get','PROCEDURE','z-sysadmin@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_confirm','PROCEDURE','juan@10.5.1.2','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_additem','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myOrder_configureForGuest','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_create','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','zone_getaddresses','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','catalog_calcfrommyaddress','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','ext','buy_scan','PROCEDURE','juan@swarm-worker2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_loginWithKey','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_login','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_hasRole','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_getName','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_getId','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','palletizerBoss','midnight','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','account','myUser_logout','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','getinventoryDate','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','zone_upcomingdeliveries','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','vn_now','FUNCTION','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_unlock','PROCEDURE','guillermo@10.5.1.4','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','account','zone_getAgency','PROCEDURE','juan@77.228.249.89','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','account','invoiceout_getpath','FUNCTION','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','employee','order_confirm','PROCEDURE','z-developer@www1.static.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTpvTransaction_start','PROCEDURE','juan@77.227.99.220','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_logaccess','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_newwithdate','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_newwithaddress','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myclient_getdebt','FUNCTION','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_configure','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_hasRoleId','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_checkLogin','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','lang','FUNCTION','juan@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofmonth','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','addAccountReconciliation','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyedbyworker','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','dayend','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','buffer_settypebyname','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_nextTx','PROCEDURE','guillermo@10.5.1.3','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','entry_updateComission','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','client_checkBalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','absoluteInventoryHistory','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','client_getSalesPersonByTicket','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','pbx','developer','clientFromPhone','FUNCTION','juan@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','production','log_addWithUser','PROCEDURE','juan@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_addChild','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_delete','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_move','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','company_getSuppliersDebt','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','multipleInventoryHistory','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','bi','salesAssistant','defaultersFromDate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_updatepacking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_updategrouping','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','item_comparative','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','item_getVolume','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','clientgetmana','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_scan','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','client_getSalesPersonByTicket','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','client_create','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_isintrastat','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','manager','collection_make','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','debugadd','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','copyComponentsFromSaleList','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaEntryValueUpdate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaInvoiceInBooking','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvinglog_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expedition_scan','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionBoss','saleSplit','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','client_getDebt','FUNCTION','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_commit','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buyultimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','log_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','employee','moving_between','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','getuser','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hassomenegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','administrative','accountshorttostandard','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','lastdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','creditInsurance_GetRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicefromticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','entry_splitbyshelving','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceintaxmakebydua','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clienttaxarea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURTIME','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaTaxBooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','invoiceout_newfromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceout_newfromticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientgetmana','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticket_gettax','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','productionAssi','midnight','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','dipole','employee','expedition_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_transfer','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','itempacking','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','available_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','payment_add','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','itemsale_byweek','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','itemsale_byweek','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timecontrol_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timecontrol_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','manager','midnight','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','last_buy_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','stock_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingproblem','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingradar','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','visible_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','quarterfirstday','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workertimecontrol_sendmailbydepartment','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','agency','item_getStock','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','debugadd','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','buyer','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','zone_getstate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','worker_gethierarchy','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','workertimecontrol_weekcheckbreak','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_split','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','agency','agencyVolume','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','saletracking_new','PROCEDURE','alexm@pc325.algemesi.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticketnotinvoicedbyclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','item_getinfo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','item_getlack','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','item_getpackage','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workerdisable','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','developer','ticket_add','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workercalendar_calculateyear','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workercalendar_calculatebusiness','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketparking_findskipped','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketcollection_getnopacked','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_checkbalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_docompensation','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_next','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicein_booking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','logshow','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyed_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_calculatecomponent','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','manaspellersrequery','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','packinglistswitch','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','previoussticker_get','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productioncontrol','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productionsectorlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','routemonitor_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_haspriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','salegroup_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','salepreparinglist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','zone_getLanded','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','saletracking_del','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','manager','ekt_getEntry','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaTax_doRecalc','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketGetTotal','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','tickettoinvoicebyaddress','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_canmerge','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','tickettotalvolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','tickettotalvolumeboxes','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myuser_haspriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerAssist','ticket_canmerge','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_cloneweekly','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','ticket_closebyticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_get','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_getsplitlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','ticket_gettax','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_lock','PROCEDURE','guillermo@10.5.1.4','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','developerBoss','role_syncPrivileges','PROCEDURE','juan@10.5.1.1','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_recalccomponents','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entryDelivered','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_splitpackingcomplete','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myuser_hasroutinepriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','timecontrol_geterror','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','travel_weeklyclone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','handmadeBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','bi','productionAssi','rutasanalyze','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionPlus','workerCreateExternal','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_NOW','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UNIX_TIMESTAMP','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_DATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_TIME','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_TIMESTAMP','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_getsaledate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_setState','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','invoicing','invoiceout_new','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_replaceItem','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_next','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','workerjourney_replace','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','developerBoss','role_sync','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','ticket_weightdeclaration','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientPackagingOverstock','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientPackagingOverstockReturn','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_filterbuyer','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','deliveryAssistant','dayend','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','routeproposal','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasroutinepriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','grafana','user_hasRole','FUNCTION','jgallego@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','time_generate','PROCEDURE','jenkins@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addbyclaim','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addByCollection','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addlist','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_selfconsumption','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','item_getsimilar','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvingsale_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_printsticker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_printlabelprevious','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_isoutclosurezone','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','workermachinery_isregistered','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticketstatetoday_setstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','device_checklogin','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','worker_getfromhasmistake','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_new','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','setparking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','shelvingparking_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machine_getworkerplate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addprevok','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollectionsalegroup_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_updateischecked','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addpreparedsalegroup','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','travel_updatepacking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','freelance_getinfo','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','company_getfiscaldata','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getfromroute','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machineworker_gethistorical','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemplacementsupplyaiming','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expeditionloading_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_printlabel','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_view','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_put','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','cmrpallet_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','item_getbalance','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_checkroute','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','addnotefromdelivery','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getSalesPerson','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','buy_updatepacking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','buy_updategrouping','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','buffer_settypebyname','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expedition_scan','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvinglog_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_getsaledate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_filterbuyer','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addbyclaim','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addlist','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_selfconsumption','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','item_getsimilar','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvingsale_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printsticker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','workermachinery_isregistered','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_new','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','setparking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','shelvingparking_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machine_getworkerplate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addprevok','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollectionsalegroup_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_updateischecked','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addpreparedsalegroup','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','travel_updatepacking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','freelance_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','company_getfiscaldata','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getfromroute','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machineworker_gethistorical','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemplacementsupplyaiming','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionstate_addbypallet','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expeditionloading_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_printlabel','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_view','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_put','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','cmrpallet_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','item_getbalance','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_checkroute','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','addnotefromdelivery','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelving_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemShelving_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_get','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','item_comparative','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_getBoxPickingList','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','worker_isInDepartment','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_rollback','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_start','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPrices','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByAwb','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -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','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'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_getTransfer','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','intrastat_estimateNet','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','remittance_calc','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasRole','FUNCTION','root@localhost','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_nextTx','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_docompensation','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_setQuantity','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_unpicked','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_getAssigned','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_addWithReservation','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addBySectorCollection','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorCollection_hasSalesReserved','FUNCTION','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_reallocate','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_setPicked','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); -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'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myorder_getavailable','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myOrder_calcCatalogFull','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_checkConfig','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_calcCatalogFromItem','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_getTax','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','log_add','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','employee','item_listAllocation','PROCEDURE','z-developer@www1.static.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','mytpvtransaction_end','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_list','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTicket_getServices','PROCEDURE','root@10.2.3.180','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_getrows','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_getpackages','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTicket_get','PROCEDURE','z-sysadmin@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_confirm','PROCEDURE','juan@10.5.1.2','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_additem','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','guest','myOrder_configureForGuest','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_create','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','zone_getaddresses','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','catalog_calcfrommyaddress','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','ext','buy_scan','PROCEDURE','juan@swarm-worker2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_loginWithKey','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_login','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_hasRole','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_getName','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_getId','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','palletizerBoss','midnight','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','account','myUser_logout','PROCEDURE','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','getinventoryDate','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','zone_upcomingdeliveries','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','vn_now','FUNCTION','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_unlock','PROCEDURE','guillermo@10.5.1.4','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','account','zone_getAgency','PROCEDURE','juan@77.228.249.89','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','account','invoiceout_getpath','FUNCTION','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','employee','order_confirm','PROCEDURE','z-developer@www1.static.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myTpvTransaction_start','PROCEDURE','juan@77.227.99.220','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myticket_logaccess','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_newwithdate','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myorder_newwithaddress','PROCEDURE','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myclient_getdebt','FUNCTION','root@pc-juan.dyn.verdnatura.es','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','hedera','account','myOrder_configure','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_hasRoleId','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myUser_checkLogin','FUNCTION','jenkins@172.16.255.34','Execute','2022-08-03 23:44:43'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','lang','FUNCTION','juan@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofmonth','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','addAccountReconciliation','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyedbyworker','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','dayend','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','buffer_settypebyname','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_nextTx','PROCEDURE','guillermo@10.5.1.3','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','entry_updateComission','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','client_checkBalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','absoluteInventoryHistory','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','client_getSalesPersonByTicket','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','pbx','developer','clientFromPhone','FUNCTION','juan@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','production','log_addWithUser','PROCEDURE','juan@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_addChild','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_delete','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','balanceNestTree_move','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','company_getSuppliersDebt','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','multipleInventoryHistory','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','bi','salesAssistant','defaultersFromDate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_updatepacking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_updategrouping','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','item_comparative','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','item_getVolume','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','clientgetmana','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_scan','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','client_getSalesPersonByTicket','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','client_create','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_isintrastat','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','manager','collection_make','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','debugadd','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','copyComponentsFromSaleList','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaEntryValueUpdate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaInvoiceInBooking','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvinglog_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expedition_scan','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionBoss','saleSplit','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','client_getDebt','FUNCTION','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_commit','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','log_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','employee','moving_between','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','getuser','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hassomenegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','administrative','accountshorttostandard','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','lastdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','creditInsurance_GetRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicefromticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','entry_splitbyshelving','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceintaxmakebydua','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clienttaxarea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoicefromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURTIME','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaTaxBooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','invoiceout_newfromclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoiceout_newfromticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','invoiceserial','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientgetmana','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','invoiceoutbooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticket_gettax','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','productionAssi','midnight','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','dipole','employee','expedition_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_transfer','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','itempacking','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','available_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','payment_add','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','itemsale_byweek','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','itemsale_byweek','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timecontrol_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timecontrol_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','manager','midnight','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','last_buy_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','stock_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingproblem','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingradar','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','visible_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','quarterfirstday','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workertimecontrol_sendmailbydepartment','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','agency','item_getStock','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','debugadd','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','buyer','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','invoiceindueday_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','invoiceintax_getfromentries','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','zone_getstate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','worker_gethierarchy','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','workertimecontrol_weekcheckbreak','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_split','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','agency','agencyVolume','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','saletracking_new','PROCEDURE','alexm@pc325.algemesi.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticketnotinvoicedbyclient','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','item_getinfo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','item_getlack','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','workerjourney_replace','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','item_getpackage','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workerdisable','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','developer','ticket_add','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workercalendar_calculateyear','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workercalendar_calculatebusiness','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketparking_findskipped','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketcollection_getnopacked','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_checkbalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_docompensation','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_next','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicein_booking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','logshow','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyed_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_calculatecomponent','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','manaspellersrequery','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','packinglistswitch','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','previoussticker_get','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productioncontrol','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productionsectorlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','routemonitor_calculate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_haspriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','salegroup_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','salepreparinglist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','zone_getLanded','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','saletracking_del','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','manager','ekt_getEntry','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaTax_doRecalc','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketGetTotal','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','tickettoinvoicebyaddress','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_canmerge','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','tickettotalvolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','tickettotalvolumeboxes','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myuser_haspriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerAssist','ticket_canmerge','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_cloneweekly','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','ticket_closebyticket','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_get','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ticket_getfromfloramondo','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_getsplitlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','ticket_gettax','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','entry_lock','PROCEDURE','guillermo@10.5.1.4','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','developerBoss','role_syncPrivileges','PROCEDURE','juan@10.5.1.1','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_recalccomponents','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entryDelivered','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_splitpackingcomplete','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myuser_hasroutinepriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','timecontrol_geterror','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','travel_weeklyclone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','handmadeBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','bi','productionAssi','rutasanalyze','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionPlus','workerCreateExternal','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_NOW','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UNIX_TIMESTAMP','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_DATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_TIME','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_UTC_TIMESTAMP','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_getsaledate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_setState','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','invoicing','invoiceout_new','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_replaceItem','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_next','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','workerjourney_replace','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','developerBoss','role_sync','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','ticket_weightdeclaration','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientPackagingOverstock','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','clientPackagingOverstockReturn','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_filterbuyer','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','deliveryAssistant','dayend','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','routeproposal','FUNCTION','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasroutinepriv','FUNCTION','jgallego@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','grafana','user_hasRole','FUNCTION','jgallego@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','time_generate','PROCEDURE','jenkins@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addbyclaim','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addByCollection','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addlist','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_selfconsumption','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','item_getSimilar','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvingsale_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_printsticker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_printlabelprevious','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_isoutclosurezone','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','workermachinery_isregistered','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticketstatetoday_setstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','device_checklogin','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','worker_getfromhasmistake','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_new','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','setparking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','shelvingparking_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machine_getworkerplate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addprevok','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollectionsalegroup_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_updateischecked','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addpreparedsalegroup','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','travel_updatepacking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','freelance_getinfo','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','company_getfiscaldata','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getfromroute','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machineworker_gethistorical','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemplacementsupplyaiming','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expeditionloading_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_printlabel','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionpallet_view','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_put','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','cmrpallet_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','item_getbalance','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_checkroute','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','addnotefromdelivery','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getSalesPerson','FUNCTION','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','buy_updatepacking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','buy_updategrouping','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','buffer_settypebyname','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expedition_scan','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvinglog_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_getsaledate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_filterbuyer','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addbyclaim','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addlist','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_selfconsumption','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','reviewer','item_getSimilar','PROCEDURE','guillermo@10.5.1.6','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvingsale_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printsticker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','workermachinery_isregistered','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_new','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','setparking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','shelvingparking_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machine_getworkerplate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addprevok','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollectionsalegroup_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_updateischecked','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addpreparedsalegroup','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','travel_updatepacking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','freelance_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','company_getfiscaldata','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getfromroute','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machineworker_gethistorical','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemplacementsupplyaiming','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionstate_addbypallet','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expeditionloading_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_printlabel','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionpallet_view','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_put','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','cmrpallet_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','item_getbalance','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_checkroute','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','addnotefromdelivery','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelving_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemShelving_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_get','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','item_comparative','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_getBoxPickingList','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','worker_isInDepartment','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_rollback','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_start','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPrices','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByAwb','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +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','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'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_getTransfer','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','intrastat_estimateNet','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','remittance_calc','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasRole','FUNCTION','root@localhost','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addBySaleGroup','PROCEDURE','alexm@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_nextTx','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_docompensation','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_setQuantity','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_unpicked','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_getAssigned','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_addWithReservation','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addBySectorCollection','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorCollection_hasSalesReserved','FUNCTION','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_reallocate','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_setPicked','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +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'); +INSERT IGNORE INTO `procs_priv` VALUES ('','bs','buyerBoss','waste_addSales','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); +INSERT IGNORE INTO `procs_priv` VALUES ('','bs','grafana','waste_addSales','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 */; @@ -2209,76 +2219,78 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buy_getUltimate','PRO /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; USE `mysql`; +/*M!999999\- enable the sandbox mode */ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40000 ALTER TABLE `global_priv` DISABLE KEYS */; -INSERT IGNORE INTO `global_priv` VALUES ('','account','{\"access\": 0, \"is_role\": true,\"version_id\":100707}'); -INSERT IGNORE INTO `global_priv` VALUES ('','adminBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','adminOfficer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','administrative','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','agency','{\"access\": 0, \"max_questions\": 40000, \"max_updates\": 1000, \"max_connections\": 20000, \"max_user_connections\": 50, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','android','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','artificialBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','assetManager','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','coolerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','customer','{\"access\": 0, \"max_questions\": 0, \"max_updates\": 30000, \"max_connections\": 300000, \"max_user_connections\": 400, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":100707}'); -INSERT IGNORE INTO `global_priv` VALUES ('','delivery','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','deliveryAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','deliveryBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','developer','{\"access\": 5909905728, \"is_role\": true, \"version_id\": 101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','developerBoss','{\"access\":33554432,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','employee','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','entryEditor','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','ext','{\"access\": 0, \"is_role\": true, \"version_id\": 100707}'); -INSERT IGNORE INTO `global_priv` VALUES ('','financial','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','financialBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','floranet','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','grafana','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','grafana-write','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -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\":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}'); -INSERT IGNORE INTO `global_priv` VALUES ('','itBoss','{\"access\": 541165846527, \"is_role\": true, \"version_id\": 100707}'); -INSERT IGNORE INTO `global_priv` VALUES ('','itManagement','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','itemPicker','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','logistic','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','logisticAssist','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','logisticBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','maintenance','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','maintenanceBos','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','maintenanceBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','manager','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','marketing','{\"access\": 0, \"is_role\": true,\"version_id\":101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','marketingBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','officeBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','packager','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','palletizer','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','palletizerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','preservedBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','production','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','productionAssi','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','productionBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','productionPlus','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','root','{\"access\": 549755781119, \"version_id\": 100705, \"is_role\": true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','salesAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','salesBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','salesPerson','{\"access\": 0, \"is_role\": true,\"version_id\":101106}'); -INSERT IGNORE INTO `global_priv` VALUES ('','salesTeamBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','salix','{\"access\":33555456,\"version_id\":100707,\"is_role\":true}'); -INSERT IGNORE INTO `global_priv` VALUES ('','sysadmin','{\"access\": 201326592, \"is_role\": true, \"version_id\": 100707}'); -INSERT IGNORE INTO `global_priv` VALUES ('','teamBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','account','{\"access\": 0, \"is_role\": true,\"version_id\":100707}'); +INSERT IGNORE INTO `global_priv` VALUES ('','adminBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','adminOfficer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','administrative','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','agency','{\"access\": 0, \"max_questions\": 40000, \"max_updates\": 1000, \"max_connections\": 20000, \"max_user_connections\": 50, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','android','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','artificialBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','assetManager','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','coolerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','customer','{\"access\": 0, \"max_questions\": 0, \"max_updates\": 30000, \"max_connections\": 300000, \"max_user_connections\": 400, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":100707}'); +INSERT IGNORE INTO `global_priv` VALUES ('','delivery','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','deliveryAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','deliveryBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','developer','{\"access\": 5909905728, \"is_role\": true, \"version_id\": 101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','developerBoss','{\"access\":33554432,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','employee','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','entryEditor','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','ext','{\"access\": 0, \"is_role\": true, \"version_id\": 100707}'); +INSERT IGNORE INTO `global_priv` VALUES ('','financial','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','financialBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','floranet','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','grafana','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','grafana-write','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +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\":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}'); +INSERT IGNORE INTO `global_priv` VALUES ('','itBoss','{\"access\": 541165846527, \"is_role\": true, \"version_id\": 100707}'); +INSERT IGNORE INTO `global_priv` VALUES ('','itManagement','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','itemPicker','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','logistic','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','logisticAssist','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','logisticBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','maintenance','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','maintenanceBos','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','maintenanceBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','manager','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','marketing','{\"access\": 0, \"is_role\": true,\"version_id\":101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','marketingBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','officeBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','packager','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','palletizer','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','palletizerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','preservedBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','production','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','productionAssi','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','productionBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','productionPlus','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','reviewer','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','root','{\"access\": 549755781119, \"version_id\": 100705, \"is_role\": true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','salesAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','salesBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','salesPerson','{\"access\": 0, \"is_role\": true,\"version_id\":101106}'); +INSERT IGNORE INTO `global_priv` VALUES ('','salesTeamBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','salix','{\"access\":33555456,\"version_id\":100707,\"is_role\":true}'); +INSERT IGNORE INTO `global_priv` VALUES ('','sysadmin','{\"access\": 201326592, \"is_role\": true, \"version_id\": 100707}'); +INSERT IGNORE INTO `global_priv` VALUES ('','teamBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}'); /*!40000 ALTER TABLE `global_priv` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/db/dump/.dump/structure.sql b/db/dump/.dump/structure.sql index 81441e19f..0bd03ac32 100644 --- a/db/dump/.dump/structure.sql +++ b/db/dump/.dump/structure.sql @@ -1,4 +1,5 @@ --- MariaDB dump 10.19 Distrib 10.5.23-MariaDB, for debian-linux-gnu (x86_64) +/*M!999999\- enable the sandbox mode */ +-- MariaDB dump 10.19 Distrib 10.5.26-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: db.verdnatura.es Database: account -- ------------------------------------------------------ @@ -75,13 +76,13 @@ SET character_set_client = utf8; SET character_set_client = @saved_cs_client; -- --- Table structure for table `accountLog` +-- Table structure for table `accountLog__` -- -DROP TABLE IF EXISTS `accountLog`; +DROP TABLE IF EXISTS `accountLog__`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `accountLog` ( +CREATE TABLE `accountLog__` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `msg` varchar(255) NOT NULL, `pid` varchar(255) NOT NULL, @@ -91,7 +92,7 @@ CREATE TABLE `accountLog` ( `time` varchar(255) NOT NULL, `summaryId` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2024-09-02 refs #7819'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -185,23 +186,6 @@ CREATE TABLE `mailAliasAcl` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `mailClientAccess__` --- - -DROP TABLE IF EXISTS `mailClientAccess__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `mailClientAccess__` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL, - `action` set('OK','REJECT') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'REJECT', - `description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `mailFrom` (`client`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-09-03'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `mailConfig` -- @@ -235,23 +219,6 @@ CREATE TABLE `mailForward` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Mail forwarding'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `mailSenderAccess__` --- - -DROP TABLE IF EXISTS `mailSenderAccess__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `mailSenderAccess__` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `sender` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL, - `action` set('OK','REJECT') NOT NULL DEFAULT 'REJECT', - `description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `mailFrom` (`sender`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-09-03'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Temporary table structure for view `myRole` -- @@ -370,6 +337,7 @@ CREATE TABLE `roleLog` ( KEY `userFk` (`userFk`), KEY `roleLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `roleLog_originFk` (`originFk`,`creationDate`), + KEY `roleLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `roleLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -514,6 +482,7 @@ CREATE TABLE `userLog` ( KEY `userFk` (`userFk`), KEY `userLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `userLog_originFk` (`originFk`,`creationDate`), + KEY `userLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `userLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2400,27 +2369,6 @@ CREATE TABLE `analisis_ventas_almacen_evolution` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `analisis_ventas_familia_evolution__` --- - -DROP TABLE IF EXISTS `analisis_ventas_familia_evolution__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `analisis_ventas_familia_evolution__` ( - `semana` int(11) NOT NULL, - `familia` varchar(50) NOT NULL, - `ventas` int(11) NOT NULL, - `año` int(11) NOT NULL, - `periodo` int(11) NOT NULL, - `typeFk` smallint(5) unsigned DEFAULT NULL, - UNIQUE KEY `familia` (`familia`,`periodo`), - KEY `periodo` (`periodo`), - KEY `analisis_ventas_familia_evolution_FK` (`typeFk`), - CONSTRAINT `analisis_ventas_familia_evolution_FK` FOREIGN KEY (`typeFk`) REFERENCES `vn`.`itemType` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5196 Deprecated 2023-06-05'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `analisis_ventas_provincia_evolution` -- @@ -2642,54 +2590,6 @@ SET character_set_client = utf8; 1 AS `Consumo` */; SET character_set_client = @saved_cs_client; --- --- Table structure for table `live_counter__` --- - -DROP TABLE IF EXISTS `live_counter__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `live_counter__` ( - `odbc_date` timestamp NOT NULL DEFAULT current_timestamp(), - `amount` double NOT NULL, - PRIMARY KEY (`odbc_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5744 Deprecated 2023-06-06'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `partitioning_information__` --- - -DROP TABLE IF EXISTS `partitioning_information__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `partitioning_information__` ( - `schema_name` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `table_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `date_field` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, - `table_depending` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, - `execution_order` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`schema_name`,`table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5744 Deprecated 2023-06-06'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `primer_pedido__` --- - -DROP TABLE IF EXISTS `primer_pedido__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `primer_pedido__` ( - `Id_Cliente` int(11) NOT NULL, - `Id_Ticket` int(11) NOT NULL, - `month` tinyint(1) NOT NULL, - `year` smallint(2) NOT NULL, - `total` decimal(10,2) NOT NULL DEFAULT 0.00, - PRIMARY KEY (`Id_Cliente`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5744 Deprecated 2023-06-06'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Temporary table structure for view `rotacion` -- @@ -2723,26 +2623,13 @@ CREATE TABLE `rutasBoard` ( `id` int(11) NOT NULL AUTO_INCREMENT, `Id_Ruta` int(10) unsigned NOT NULL DEFAULT 0, `Id_Agencia` int(11) NOT NULL DEFAULT 0, - `km__` varchar(9) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `Dia__` varchar(9) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', `Fecha` date NOT NULL, - `Terceros__` int(11) DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', `Bultos` int(11) NOT NULL DEFAULT 0, - `Matricula__` varchar(10) DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `Tipo__` varchar(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `year__` int(4) DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `month__` int(2) DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `warehouse_id__` smallint(5) unsigned DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', - `coste_bulto__` decimal(10,2) unsigned DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', `teorico` decimal(10,2) NOT NULL DEFAULT 0.00, `practico` decimal(10,2) NOT NULL DEFAULT 0.00, `greuge` decimal(10,2) NOT NULL DEFAULT 0.00, - `m3__` decimal(10,1) unsigned DEFAULT NULL COMMENT '@deprecated 2023-11-01, refs #6087', PRIMARY KEY (`id`), - UNIQUE KEY `rutasBoard_Ruta` (`Id_Ruta`), - KEY `rutasBoard_ix1` (`year__`), - KEY `rutasBoard_ix2` (`month__`), - KEY `rutasBoard_ix3` (`warehouse_id__`) + UNIQUE KEY `rutasBoard_Ruta` (`Id_Ruta`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Se usa en https://grafana.verdnatura.es/d/c089276b-5ab5-430f-aa76-e5d8e0e7fe2e/analisis-de-volumen-y-rendimiento-por-agencia?orgId=1'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2779,36 +2666,6 @@ SET character_set_client = utf8; 1 AS `margen` */; SET character_set_client = @saved_cs_client; --- --- Table structure for table `tarifa_premisas__` --- - -DROP TABLE IF EXISTS `tarifa_premisas__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tarifa_premisas__` ( - `Id_Premisa` int(11) NOT NULL AUTO_INCREMENT, - `premisa` varchar(45) NOT NULL, - PRIMARY KEY (`Id_Premisa`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5744 Deprecated 2023-06-06'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `tarifa_warehouse__` --- - -DROP TABLE IF EXISTS `tarifa_warehouse__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tarifa_warehouse__` ( - `Id_Tarifa_Warehouse` int(11) NOT NULL AUTO_INCREMENT, - `warehouse_id` int(11) NOT NULL, - `Id_Premisa` int(11) NOT NULL, - `Valor` double NOT NULL, - PRIMARY KEY (`Id_Tarifa_Warehouse`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #5744 Deprecated 2023-06-06\nAlmacena los valores de gasto por almacen'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Dumping events for database 'bi' -- @@ -3875,10 +3732,7 @@ DROP TABLE IF EXISTS `clientDied`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `clientDied` ( `clientFk` int(11) NOT NULL DEFAULT 0, - `clientName__` varchar(50) NOT NULL COMMENT '@deprecated 2023-10-15', `lastInvoiced` date DEFAULT NULL, - `workerCode__` varchar(3) NOT NULL COMMENT '@deprecated 2023-10-15', - `Boss__` varchar(3) NOT NULL COMMENT '@deprecated 2023-10-15', `warning` enum('first','second','third') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, PRIMARY KEY (`clientFk`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Clientes que no han comprado en los ultimos 3 meses, se actualiza con proceso nocturno el 3 de cada mes'; @@ -3919,24 +3773,6 @@ CREATE TABLE `clientNewBorn` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Listado de clientes que se consideran nuevos a efectos de cobrar la comision adicional del comercial'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `compradores__` --- - -DROP TABLE IF EXISTS `compradores__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `compradores__` ( - `Id_Trabajador` int(10) unsigned NOT NULL, - `año` int(4) NOT NULL, - `semana` int(2) NOT NULL, - `importe` decimal(10,2) DEFAULT NULL, - `comision` decimal(10,2) DEFAULT NULL, - PRIMARY KEY (`Id_Trabajador`,`año`,`semana`), - CONSTRAINT `comprador_trabajador` FOREIGN KEY (`Id_Trabajador`) REFERENCES `vn`.`worker` (`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 `compradores_evolution` -- @@ -4291,7 +4127,6 @@ DROP TABLE IF EXISTS `salesByItemTypeDay`; CREATE TABLE `salesByItemTypeDay` ( `itemTypeFk` smallint(5) unsigned NOT NULL, `dated` date NOT NULL, - `netSale__` int(11) NOT NULL DEFAULT 0 COMMENT '@deprecated 2023-08-31, Mismo valor que campo sale', `stems` int(11) NOT NULL DEFAULT 0 COMMENT 'Número de tallos vendidos', `references` int(11) NOT NULL DEFAULT 0 COMMENT 'Número de artículos distintos por tipo vendidos', `trash` int(11) NOT NULL DEFAULT 0 COMMENT 'Tallos basura', @@ -4346,31 +4181,6 @@ CREATE TABLE `salesByclientSalesPerson` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Ventas diarias por cliente y comercial'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `salesMonthlySnapshot___` --- - -DROP TABLE IF EXISTS `salesMonthlySnapshot___`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `salesMonthlySnapshot___` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `salesPersonName` varchar(100) DEFAULT '', - `teamName` varchar(100) DEFAULT NULL, - `year` int(11) DEFAULT NULL, - `month` int(11) DEFAULT NULL, - `currentSale` decimal(10,3) DEFAULT NULL, - `commissionSale` decimal(10,3) DEFAULT NULL, - `individualPlus` decimal(10,3) DEFAULT NULL, - `teamPlus` decimal(10,3) DEFAULT NULL, - `teamScore` decimal(10,3) DEFAULT NULL, - `newClientPlus` decimal(10,3) DEFAULT NULL, - `newClientScore` decimal(10,3) DEFAULT NULL, - `teamBossPlus` decimal(10,3) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2022-11'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `salesPersonEvolution` -- @@ -4391,48 +4201,6 @@ CREATE TABLE `salesPersonEvolution` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Evolución Comerciales'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `salesPerson__` --- - -DROP TABLE IF EXISTS `salesPerson__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `salesPerson__` ( - `workerFk` int(10) unsigned NOT NULL, - `year` int(4) NOT NULL, - `month` int(2) NOT NULL, - `amount` decimal(10,2) DEFAULT NULL, - `commission` decimal(10,2) DEFAULT NULL, - `leasedCommission` decimal(10,2) DEFAULT NULL COMMENT 'comision proveniente de clientes que han sido donados. Ver tabla Clientes_cedidos', - `cededCommission` decimal(10,2) DEFAULT NULL COMMENT 'comision generada por los clientes que han sido donados. Ver tabla Clientes_cedidos', - `newCommission` decimal(10,2) DEFAULT NULL, - `leasedReplacement` decimal(10,2) DEFAULT NULL, - `itemTypeBorrowed` decimal(10,2) DEFAULT NULL, - `portfolioWeight` decimal(10,2) DEFAULT NULL COMMENT 'Pero de la cartera del comercial a fecha vendedores.updated', - `updated` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`workerFk`,`year`,`month`), - CONSTRAINT `salesPerson_FK` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2022-11'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `vendedores_evolution__` --- - -DROP TABLE IF EXISTS `vendedores_evolution__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `vendedores_evolution__` ( - `workerFk` int(10) unsigned NOT NULL, - `year` int(11) NOT NULL, - `sales` decimal(10,2) DEFAULT NULL, - `month` int(11) NOT NULL, - PRIMARY KEY (`workerFk`,`year`,`month`), - CONSTRAINT `evo_vendedor_trabajador` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2022-11'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Temporary table structure for view `ventas` -- @@ -4489,8 +4257,11 @@ CREATE TABLE `waste` ( `itemFk` int(11) NOT NULL DEFAULT 0, `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, + `saleFaultWaste` decimal(10,2) DEFAULT NULL, + `saleContainerWaste` decimal(10,2) DEFAULT NULL, + `saleBreakWaste` decimal(10,2) DEFAULT NULL, + `saleOtherWaste` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`year`,`week`,`buyerFk`,`itemTypeFk`,`itemFk`), KEY `waste_itemType_id` (`itemTypeFk`), KEY `waste_item_id` (`itemFk`), @@ -6147,8 +5918,8 @@ DELIMITER ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `salesByItemTypeDay_addLauncher`() -BEGIN - CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); +BEGIN + CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -6508,10 +6279,24 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `waste_addSales`() +CREATE DEFINER=`root`@`localhost` PROCEDURE `waste_addSales`( + vDateFrom DATE, + vDateTo DATE +) BEGIN - DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY; - DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY; +/** + * Recalcula las mermas de un periodo. + * + * @param vDateFrom Fecha desde + * @param vDateTo Fecha hasta + */ + IF vDateFrom IS NULL THEN + SET vDateFrom = util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY; + END IF; + + IF vDateTo IS NULL THEN + SET vDateTo = vDateFrom + INTERVAL 6 DAY; + END IF; CALL cache.last_buy_refresh(FALSE); @@ -6523,16 +6308,32 @@ BEGIN s.itemFk, SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity), SUM(IF(aw.`type`, s.quantity, 0)), - SUM( - IF( - aw.`type` = 'internal', + SUM(IF( + aw.`type` = 'external', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, 0 ) - ), - SUM( - IF( - aw.`type` = 'external', + ), + SUM(IF( + aw.`type` = 'fault', + (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, + 0 + ) + ), + SUM(IF( + aw.`type` = 'container', + (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, + 0 + ) + ), + SUM(IF( + aw.`type` = 'break', + (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, + 0 + ) + ), + SUM(IF( + aw.`type` = 'other', (b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity, 0 ) @@ -6549,7 +6350,26 @@ BEGIN JOIN vn.buy b ON b.id = lb.buy_id WHERE t.shipped BETWEEN vDateFrom AND vDateTo AND w.isManaged - GROUP BY i.id; + GROUP BY YEAR(t.shipped), WEEK(t.shipped, 4), i.id; +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 `waste_addSalesLauncher` */; +/*!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 `waste_addSalesLauncher`() +BEGIN + CALL waste_addSales(NULL, NULL); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -7253,7 +7073,12 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE DEFINER=`root`@`localhost` PROCEDURE `available_refresh`( + OUT `vCalc` INT, + `vRefresh` INT, + `vWarehouse` INT, + `vDated` DATE +) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; @@ -7385,6 +7210,50 @@ 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 `available_updateItem` */; +/*!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 `available_updateItem`( + `vItem` INT, + `vWarehouse` INT, + `vDated` DATE, + `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 + WHERE cacheName = 'available' + AND params = CONCAT_WS('/', vWarehouse, vDated); + + IF vCalc IS NOT NULL THEN + UPDATE available + SET available = available - vQuantity + WHERE calc_id = vCalc + AND item_id = vItem; + 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 `cacheCalc_clean` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -7718,7 +7587,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 */ @@ -7949,7 +7818,7 @@ CREATE TABLE `expedition_PrintOut` ( `postalCode` varchar(10) NOT NULL DEFAULT ' ', `city` varchar(100) NOT NULL DEFAULT ' ', `shopName` varchar(100) NOT NULL DEFAULT ' ', - `isPrinted` int(11) NOT NULL DEFAULT 0, + `isPrinted` int(11) NOT NULL DEFAULT 0 COMMENT '0.- Not Printed ; 1.- Printed; 2.- Selected ; 3.- Error ; 4.- Waiting to be printed', `created` timestamp NOT NULL DEFAULT current_timestamp(), `printerFk` int(10) unsigned NOT NULL DEFAULT 0, `routeFk` int(11) NOT NULL DEFAULT 0, @@ -9297,27 +9166,6 @@ CREATE TABLE `warehouseFloramondo` ( -- -- Dumping events for database 'edi' -- -/*!50106 SET @save_time_zone= @@TIME_ZONE */ ; -/*!50106 DROP EVENT IF EXISTS `floramondo` */; -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 `floramondo` ON SCHEDULE EVERY 6 MINUTE STARTS '2022-01-28 09:52:45' ON COMPLETION NOT PRESERVE DISABLE DO CALL edi.floramondo_offerRefresh() */ ;; -/*!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 */ ;; -DELIMITER ; -/*!50106 SET TIME_ZONE= @save_time_zone */ ; -- -- Dumping routines for database 'edi' @@ -10035,541 +9883,6 @@ 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 `floramondo_offerRefresh` */; -/*!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 `floramondo_offerRefresh`() -proc: BEGIN - DECLARE vLanded DATETIME; - DECLARE vDone INT DEFAULT FALSE; - DECLARE vFreeId INT; - DECLARE vSupplyResponseFk INT; - DECLARE vLastInserted DATETIME; - DECLARE vIsAuctionDay BOOLEAN; - DECLARE vMaxNewItems INT DEFAULT 10000; - DECLARE vStartingTime DATETIME; - DECLARE vAalsmeerMarketPlaceID VARCHAR(13) DEFAULT '8713783439043'; - DECLARE vDayRange INT; - - DECLARE cur1 CURSOR FOR - SELECT id - FROM edi.item_free; - - DECLARE cur2 CURSOR FOR - SELECT srId - FROM itemToInsert; - - DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DECLARE EXIT HANDLER FOR SQLSTATE '45000' - BEGIN - ROLLBACK; - RESIGNAL; - END; - - DECLARE CONTINUE HANDLER FOR SQLEXCEPTION - BEGIN - DO RELEASE_LOCK('edi.floramondo_offerRefresh'); - SET @isTriggerDisabled = FALSE; - RESIGNAL; - END; - - IF 'test' = (SELECT environment FROM util.config) THEN - LEAVE proc; - END IF; - - IF !GET_LOCK('edi.floramondo_offerRefresh', 0) THEN - LEAVE proc; - END IF; - - SELECT dayRange INTO vDayRange - FROM offerRefreshConfig; - - IF vDayRange IS NULL THEN - CALL util.throw("Variable vDayRange not declared"); - END IF; - - SET vStartingTime = util.VN_NOW(); - - TRUNCATE edi.offerList; - - INSERT INTO edi.offerList(supplier, total) - SELECT v.name, COUNT(DISTINCT sr.ID) total - FROM edi.supplyResponse sr - JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID - WHERE sr.NumberOfUnits > 0 - AND sr.EmbalageCode != 999 - GROUP BY sr.vmpID; - - UPDATE edi.offerList o - JOIN (SELECT v.name, COUNT(*) total - FROM edi.supplyOffer sr - JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID - GROUP BY sr.vmpID) sub ON o.supplier = sub.name - SET o.`filter` = sub.total; - - -- Elimina de la lista de items libres aquellos que ya existen - DELETE itf.* - FROM edi.item_free itf - JOIN vn.item i ON i.id = itf.id; - - CREATE OR REPLACE TEMPORARY TABLE tmp - (INDEX (`Item_ArticleCode`)) - ENGINE = MEMORY - SELECT t.* - FROM ( - SELECT * - FROM edi.supplyOffer - ORDER BY (MarketPlaceID = vAalsmeerMarketPlaceID) DESC, - NumberOfUnits DESC LIMIT 10000000000000000000) t - GROUP BY t.srId; - - CREATE OR REPLACE TEMPORARY TABLE edi.offer (INDEX (`srID`), INDEX (`EmbalageCode`), - INDEX (`ef1`), INDEX (`ef2`), INDEX (`ef3`), INDEX (`ef4`),INDEX (`ef5`), INDEX (`ef6`), - INDEX (`s1Value`), INDEX (`s2Value`), INDEX (`s3Value`), INDEX (`s4Value`),INDEX (`s5Value`), INDEX (`s6Value`)) - ENGINE = MEMORY - SELECT so.*, - ev1.type_description s1Value, - ev2.type_description s2Value, - ev3.type_description s3Value, - ev4.type_description s4Value, - ev5.type_description s5Value, - ev6.type_description s6Value, - eif1.feature ef1, - eif2.feature ef2, - eif3.feature ef3, - eif4.feature ef4, - eif5.feature ef5, - eif6.feature ef6 - FROM tmp so - LEFT JOIN edi.item_feature eif1 ON eif1.item_id = so.Item_ArticleCode - AND eif1.presentation_order = 1 - AND eif1.expiry_date IS NULL - LEFT JOIN edi.item_feature eif2 ON eif2.item_id = so.Item_ArticleCode - AND eif2.presentation_order = 2 - AND eif2.expiry_date IS NULL - LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode - AND eif3.presentation_order = 3 - AND eif3.expiry_date IS NULL - LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode - AND eif4.presentation_order = 4 - AND eif4.expiry_date IS NULL - LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode - AND eif5.presentation_order = 5 - AND eif5.expiry_date IS NULL - LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode - AND eif6.presentation_order = 6 - AND eif6.expiry_date IS NULL - LEFT JOIN edi.`value` ev1 ON ev1.type_id = eif1.feature - AND so.s1 = ev1.type_value - LEFT JOIN edi.`value` ev2 ON ev2.type_id = eif2.feature - AND so.s2 = ev2.type_value - LEFT JOIN edi.`value` ev3 ON ev3.type_id = eif3.feature - AND so.s3 = ev3.type_value - LEFT JOIN edi.`value` ev4 ON ev4.type_id = eif4.feature - AND so.s4 = ev4.type_value - LEFT JOIN edi.`value` ev5 ON ev5.type_id = eif5.feature - AND so.s5 = ev5.type_value - LEFT JOIN edi.`value` ev6 ON ev6.type_id = eif6.feature - AND so.s6 = ev6.type_value - ORDER BY Price; - - DROP TEMPORARY TABLE tmp; - - DELETE o - FROM edi.offer o - LEFT JOIN vn.tag t1 ON t1.ediTypeFk = o.ef1 AND t1.overwrite = 'size' - LEFT JOIN vn.tag t2 ON t2.ediTypeFk = o.ef2 AND t2.overwrite = 'size' - LEFT JOIN vn.tag t3 ON t3.ediTypeFk = o.ef3 AND t3.overwrite = 'size' - LEFT JOIN vn.tag t4 ON t4.ediTypeFk = o.ef4 AND t4.overwrite = 'size' - LEFT JOIN vn.tag t5 ON t5.ediTypeFk = o.ef5 AND t5.overwrite = 'size' - LEFT JOIN vn.tag t6 ON t6.ediTypeFk = o.ef6 AND t6.overwrite = 'size' - JOIN vn.floramondoConfig fc ON TRUE - WHERE (t1.id IS NOT NULL AND CONVERT(s1Value, UNSIGNED) > fc.itemMaxSize) - OR (t2.id IS NOT NULL AND CONVERT(s2Value, UNSIGNED) > fc.itemMaxSize) - OR (t3.id IS NOT NULL AND CONVERT(s3Value, UNSIGNED) > fc.itemMaxSize) - OR (t4.id IS NOT NULL AND CONVERT(s4Value, UNSIGNED) > fc.itemMaxSize) - OR (t5.id IS NOT NULL AND CONVERT(s5Value, UNSIGNED) > fc.itemMaxSize) - OR (t6.id IS NOT NULL AND CONVERT(s6Value, UNSIGNED) > fc.itemMaxSize); - - START TRANSACTION; - - -- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos - UPDATE IGNORE edi.offer o - JOIN vn.item i - ON i.name = o.product_name - AND i.subname <=> o.company_name - AND i.value5 <=> o.s1Value - AND i.value6 <=> o.s2Value - AND i.value7 <=> o.s3Value - AND i.value8 <=> o.s4Value - AND i.value9 <=> o.s5Value - AND i.value10 <=> o.s6Value - AND i.NumberOfItemsPerCask <=> o.NumberOfItemsPerCask - AND i.EmbalageCode <=> o.EmbalageCode - AND i.quality <=> o.Quality - JOIN vn.itemType it ON it.id = i.typeFk - LEFT JOIN vn.sale s ON s.itemFk = i.id - LEFT JOIN vn.ticket t ON t.id = s.ticketFk - AND t.shipped > (util.VN_CURDATE() - INTERVAL 1 WEEK) - LEFT JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk - LEFT JOIN edi.deliveryInformation di ON di.supplyResponseID = sr.ID - LEFT JOIN edi.putOrder po ON po.supplyResponseID = i.supplyResponseFk - AND po.OrderTradeLineDateTime > (util.VN_CURDATE() - INTERVAL 1 WEEK) - SET i.supplyResponseFk = o.srID - WHERE (sr.ID IS NULL - OR sr.NumberOfUnits = 0 - OR di.LatestOrderDateTime < util.VN_NOW() - OR di.ID IS NULL) - AND it.isInventory - AND t.id IS NULL - AND po.id IS NULL; - - CREATE OR REPLACE TEMPORARY TABLE itemToInsert - ENGINE = MEMORY - SELECT o.*, CAST(NULL AS DECIMAL(6,0)) itemFk - FROM edi.offer o - LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId - WHERE i.id IS NULL - LIMIT vMaxNewItems; - - -- Reciclado de nº de item - OPEN cur1; - OPEN cur2; - - read_loop: LOOP - - FETCH cur2 INTO vSupplyResponseFk; - FETCH cur1 INTO vFreeId; - - IF vDone THEN - LEAVE read_loop; - END IF; - - UPDATE itemToInsert - SET itemFk = vFreeId - WHERE srId = vSupplyResponseFk; - - END LOOP; - - CLOSE cur1; - CLOSE cur2; - - -- Insertamos todos los items en Articles de la oferta - INSERT INTO vn.item(id, - `name`, - longName, - subName, - expenseFk, - typeFk, - intrastatFk, - originFk, - supplyResponseFk, - numberOfItemsPerCask, - embalageCode, - quality, - isFloramondo) - SELECT iti.itemFk, - iti.product_name, - iti.product_name, - iti.company_name, - iti.expenseFk, - iti.itemTypeFk, - iti.intrastatFk, - iti.originFk, - iti.`srId`, - iti.NumberOfItemsPerCask, - iti.EmbalageCode, - iti.Quality, - TRUE - FROM itemToInsert iti; - - -- Inserta la foto de los articulos nuevos (prioridad alta) - INSERT IGNORE INTO vn.itemImageQueue(itemFk, url) - SELECT i.id, PictureReference - FROM itemToInsert ii - JOIN vn.item i ON i.supplyResponseFk = ii.srId - WHERE PictureReference IS NOT NULL - AND i.image IS NULL; - - INSERT INTO edi.`log`(tableName, fieldName,fieldValue) - SELECT 'itemImageQueue','NumImagenesPtes', COUNT(*) - FROM vn.itemImageQueue - WHERE attempts = 0; - - -- Inserta si se añadiesen tags nuevos - INSERT IGNORE INTO vn.tag (name, ediTypeFk) - SELECT description, type_id FROM edi.type; - - -- Desabilita el trigger para recalcular los tags al final - SET @isTriggerDisabled = TRUE; - - -- Inserta los tags sólo en los articulos nuevos - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , ii.product_name, 1 - FROM itemToInsert ii - JOIN vn.tag t ON t.`name` = 'Producto' - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT ii.product_name IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , ii.Quality, 3 - FROM itemToInsert ii - JOIN vn.tag t ON t.`name` = 'Calidad' - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT ii.Quality IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , ii.company_name, 4 - FROM itemToInsert ii - JOIN vn.tag t ON t.`name` = 'Productor' - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT ii.company_name IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s1Value, 5 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef1 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s1Value IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s2Value, 6 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef2 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s2Value IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s3Value, 7 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef3 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s3Value IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s4Value, 8 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef4 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s4Value IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s5Value, 9 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef5 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s5Value IS NULL; - - INSERT INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id , s6Value, 10 - FROM itemToInsert ii - JOIN vn.tag t ON t.ediTypeFk = ii.ef6 - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - WHERE NOT s6Value IS NULL; - - INSERT IGNORE INTO vn.itemTag(itemFk, tagFk, value, priority) - SELECT i.id, t.id, IFNULL(ink.name, ik.color), 11 - FROM itemToInsert ii - JOIN vn.item i ON i.supplyResponseFk = ii.`srId` - JOIN vn.tag t ON t.`name` = 'Color' - LEFT JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode - LEFT JOIN edi.`type` tp ON tp.type_id = f.feature_type_id - AND tp.`description` = 'Hoofdkleur 1' - LEFT JOIN vn.ink ON ink.dutchCode = f.feature_value - LEFT JOIN vn.itemInk ik ON ik.longName = i.longName - WHERE ink.name IS NOT NULL - OR ik.color IS NOT NULL; - - CREATE OR REPLACE TABLE tmp.item - (PRIMARY KEY (id)) - SELECT i.id FROM vn.item i - JOIN itemToInsert ii ON i.supplyResponseFk = ii.`srId`; - - CALL vn.item_refreshTags(); - - DROP TABLE tmp.item; - - SELECT MIN(LatestDeliveryDateTime) INTO vLanded - FROM edi.supplyResponse sr - JOIN edi.deliveryInformation di ON di.supplyResponseID = sr.ID - JOIN edi.marketPlace mp ON mp.id = sr.MarketPlaceID - JOIN vn.floramondoConfig fc - WHERE mp.isLatestOrderDateTimeRelevant - AND di.LatestOrderDateTime > IF( - fc.MaxLatestOrderHour > HOUR(util.VN_NOW()), - util.VN_CURDATE(), - util.VN_CURDATE() + INTERVAL 1 DAY); - - UPDATE vn.floramondoConfig - SET nextLanded = vLanded - WHERE vLanded IS NOT NULL; - - -- Elimina la oferta obsoleta - UPDATE vn.buy b - JOIN vn.entry e ON e.id = b.entryFk - JOIN vn.travel tr ON tr.id = e.travelFk - JOIN vn.agencyMode am ON am.id = tr.agencyModeFk - JOIN vn.item i ON i.id = b.itemFk - LEFT JOIN edi.supplyResponse sr ON i.supplyResponseFk = sr.ID - LEFT JOIN edi.deliveryInformation di ON di.ID = b.deliveryFk - SET b.quantity = 0 - WHERE (IFNULL(di.LatestOrderDateTime,util.VN_NOW()) <= util.VN_NOW() - OR i.supplyResponseFk IS NULL - OR sr.NumberOfUnits = 0) - AND am.name = 'LOGIFLORA' - AND e.isRaid; - - -- Localiza las entradas de cada almacen - UPDATE edi.warehouseFloramondo - SET entryFk = vn.entry_getForLogiflora(vLanded + INTERVAL travellingDays DAY, warehouseFk); - - IF vLanded IS NOT NULL THEN - -- Actualiza la oferta existente - UPDATE vn.buy b - JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk - JOIN vn.item i ON i.id = b.itemFk - JOIN edi.offer o ON i.supplyResponseFk = o.`srId` - SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask, - b.buyingValue = o.price - WHERE (b.quantity <> o.NumberOfUnits * o.NumberOfItemsPerCask - OR b.buyingValue <> o.price); - - -- Inserta el resto - SET vLastInserted := util.VN_NOW(); - - -- Inserta la oferta - INSERT INTO vn.buy ( - entryFk, - itemFk, - quantity, - buyingValue, - stickers, - packing, - `grouping`, - groupingMode, - packagingFk, - deliveryFk) - SELECT wf.entryFk, - i.id, - o.NumberOfUnits * o.NumberOfItemsPerCask quantity, - o.Price, - o.NumberOfUnits etiquetas, - o.NumberOfItemsPerCask packing, - GREATEST(1, IFNULL(o.MinimumQuantity,0)) * o.NumberOfItemsPerCask `grouping`, - 'packing', - o.embalageCode, - o.diId - FROM edi.offer o - JOIN vn.item i ON i.supplyResponseFk = o.srId - JOIN edi.warehouseFloramondo wf - JOIN vn.packaging p ON p.id - LIKE o.embalageCode - LEFT JOIN vn.buy b ON b.itemFk = i.id - AND b.entryFk = wf.entryFk - WHERE b.id IS NULL; -- Quitar esta linea y mirar de crear los packages a tiempo REAL - - INSERT INTO vn.itemCost( - itemFk, - warehouseFk, - cm3, - cm3delivery) - SELECT b.itemFk, - wf.warehouseFk, - @cm3 := vn.buy_getUnitVolume(b.id), - IFNULL((vc.standardFlowerBox * 1000) / i.packingOut, @cm3) - FROM warehouseFloramondo wf - JOIN vn.volumeConfig vc - JOIN vn.buy b ON b.entryFk = wf.entryFk - JOIN vn.item i ON i.id = b.itemFk - LEFT JOIN vn.itemCost ic ON ic.itemFk = b.itemFk - AND ic.warehouseFk = wf.warehouseFk - WHERE (ic.cm3 IS NULL OR ic.cm3 = 0) - ON DUPLICATE KEY UPDATE cm3 = @cm3, cm3delivery = IFNULL((vc.standardFlowerBox * 1000) / i.packingOut, @cm3); - - CREATE OR REPLACE TEMPORARY TABLE tmp.buyRecalc - SELECT b.id - FROM vn.buy b - JOIN warehouseFloramondo wf ON wf.entryFk = b.entryFk - WHERE b.created >= vLastInserted; - - CALL vn.buy_recalcPrices(); - - UPDATE edi.offerList o - JOIN (SELECT v.name, COUNT(DISTINCT b.itemFk) total - FROM vn.buy b - JOIN vn.item i ON i.id = b.itemFk - JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk - JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID - JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk - JOIN vn.warehouse w ON w.id = wf.warehouseFk - WHERE w.name = 'VNH' - AND b.quantity > 0 - GROUP BY sr.vmpID) sub ON o.supplier = sub.name - SET o.vnh = sub.total; - - UPDATE edi.offerList o - JOIN (SELECT v.name, COUNT(DISTINCT b.itemFk) total - FROM vn.buy b - JOIN vn.item i ON i.id = b.itemFk - JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk - JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID - JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk - JOIN vn.warehouse w ON w.id = wf.warehouseFk - WHERE w.name = 'ALGEMESI' - AND b.quantity > 0 - GROUP BY sr.vmpID) sub ON o.supplier = sub.name - SET o.algemesi = sub.total; - END IF; - - DROP TEMPORARY TABLE - edi.offer, - itemToInsert; - - SET @isTriggerDisabled = FALSE; - - COMMIT; - - -- Esto habria que pasarlo a procesos programados o trabajar con tags y dejar las familias - UPDATE vn.item i - SET typeFk = 121 - WHERE i.longName LIKE 'Rosa Garden %' - AND typeFk = 17; - - UPDATE vn.item i - SET typeFk = 156 - WHERE i.longName LIKE 'Rosa ec %' - AND typeFk = 17; - - -- Refresca las fotos de los items existentes que mostramos (prioridad baja) - INSERT IGNORE INTO vn.itemImageQueue(itemFk, url, priority) - SELECT i.id, sr.PictureReference, 100 - FROM edi.supplyResponse sr - JOIN vn.item i ON i.supplyResponseFk = sr.ID - JOIN edi.supplyOffer so ON so.srId = sr.ID - JOIN hedera.image i2 ON i2.name = i.image - AND i2.collectionFk = 'catalog' - WHERE i2.updated <= (UNIX_TIMESTAMP(util.VN_NOW()) - vDayRange) - AND sr.NumberOfUnits; - - INSERT INTO edi.`log` - SET tableName = 'floramondo_offerRefresh', - fieldName = 'Tiempo de proceso', - fieldValue = TIMEDIFF(util.VN_NOW(), vStartingTime); - - DO RELEASE_LOCK('edi.floramondo_offerRefresh'); -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 `item_freeAdd` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -13881,8 +13194,8 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `order_addItem`( vSelf INT, - vWarehouse INT, - vItem INT, + vWarehouse INT, + vItem INT, vAmount INT) BEGIN /** @@ -13917,7 +13230,7 @@ BEGIN ROLLBACK; RESIGNAL; END; - + CALL order_calcCatalogFromItem(vSelf, vItem); START TRANSACTION; @@ -13927,11 +13240,15 @@ BEGIN FROM tmp.zoneGetShipped WHERE warehouseFk = vWarehouse; - SELECT IFNULL(available, 0) INTO vAvailable + SELECT available INTO vAvailable FROM tmp.ticketLot WHERE warehouseFk = vWarehouse AND itemFk = vItem; + IF vAvailable IS NULL THEN + SET vAvailable = 0; + END IF; + IF vAmount > vAvailable THEN CALL util.throw ('ORDER_ROW_UNAVAILABLE'); END IF; @@ -13982,6 +13299,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) @@ -14001,7 +13320,7 @@ BEGIN END IF; COMMIT; - CALL vn.ticketCalculatePurge; + CALL vn.ticketCalculatePurge; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -18991,6 +18310,7 @@ CREATE TABLE `ACLLog` ( KEY `logRateuserFk` (`userFk`), KEY `ACLLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `ACLLog_originFk` (`originFk`,`creationDate`), + KEY `ACLLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, 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 */; @@ -19399,6 +18719,7 @@ CREATE TABLE `bufferLog` ( KEY `logBufferUserFk` (`userFk`), KEY `bufferLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `bufferLog_originFk` (`originFk`,`creationDate`), + KEY `bufferLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, 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 */; @@ -24031,8 +23352,8 @@ DROP TABLE IF EXISTS `config`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `config` ( `id` int(10) unsigned NOT NULL, - `dbVersion` char(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'The current database version', - `hasTriggersDisabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Defines if triggers are disabled', + `dbVersion__` char(11) DEFAULT NULL COMMENT '@deprecated 2024-09-02 refs #7819', + `hasTriggersDisabled__` tinyint(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-09-02 refs #7819', `environment` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'The current Database environment', `lastDump` datetime DEFAULT NULL COMMENT 'Timestamp of the last data dump', `mockUtcTime` datetime DEFAULT NULL, @@ -24095,6 +23416,24 @@ SET character_set_client = utf8; 1 AS `error` */; SET character_set_client = @saved_cs_client; +-- +-- Table structure for table `logCleanMultiConfig` +-- + +DROP TABLE IF EXISTS `logCleanMultiConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `logCleanMultiConfig` ( + `schemaName` varchar(64) NOT NULL, + `tableName` varchar(64) NOT NULL, + `retentionDays` int(11) DEFAULT NULL, + `order` int(11) DEFAULT NULL, + `started` datetime DEFAULT NULL, + `finished` datetime DEFAULT NULL, + PRIMARY KEY (`schemaName`,`tableName`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `notification` -- @@ -24241,7 +23580,25 @@ CREATE TABLE `versionLog` ( -- Dumping events for database 'util' -- /*!50106 SET @save_time_zone= @@TIME_ZONE */ ; -/*!50106 DROP EVENT IF EXISTS `slowLog_prune` */; +/*!50106 DROP EVENT IF EXISTS `log_clean` */; +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 `log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2024-07-09 00:30:00' ON COMPLETION PRESERVE ENABLE DO CALL util.log_clean */ ;; +/*!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 `slowLog_prune` */;; DELIMITER ;; /*!50003 SET @saved_cs_client = @@character_set_client */ ;; /*!50003 SET @saved_cs_results = @@character_set_results */ ;; @@ -25698,6 +25055,73 @@ 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 `log_clean` */; +/*!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 `log_clean`() +BEGIN +/** + * Hace limpieza de los datos de las tablas log, + * dejando únicamente los días de retención configurados. + */ + DECLARE vSchemaName VARCHAR(65); + DECLARE vSchemaNameQuoted VARCHAR(65); + DECLARE vTableName VARCHAR(65); + DECLARE vTableNameQuoted VARCHAR(65); + DECLARE vRetentionDays INT; + DECLARE vStarted DATETIME; + DECLARE vDated DATE; + DECLARE vDone BOOL; + + DECLARE vQueue CURSOR FOR + SELECT schemaName, tableName, retentionDays + FROM logCleanMultiConfig + ORDER BY `order`; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + OPEN vQueue; + l: LOOP + SET vDone = FALSE; + FETCH vQueue INTO vSchemaName, vTableName, vRetentionDays; + + IF vDone THEN + LEAVE l; + END IF; + + IF vRetentionDays THEN + SET vStarted = VN_NOW(); + SET vSchemaNameQuoted = quoteIdentifier(vSchemaName); + SET vTableNameQuoted = quoteIdentifier(vTableName); + SET vDated = VN_CURDATE() - INTERVAL vRetentionDays DAY; + + EXECUTE IMMEDIATE CONCAT( + 'DELETE FROM ', vSchemaNameQuoted, + '.', vTableNameQuoted, + " WHERE creationDate < '", vDated, "'" + ); + + UPDATE logCleanMultiConfig + SET `started` = vStarted, + `finished` = VN_NOW() + WHERE schemaName = vSchemaName + AND tableName = vTableName; + END IF; + END LOOP; + CLOSE vQueue; +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 `log_cleanInstances` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -26499,7 +25923,7 @@ DROP TABLE IF EXISTS `addressWaste`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `addressWaste` ( `addressFk` int(11) NOT NULL, - `type` enum('internal','external') NOT NULL, + `type` enum('external','fault','container','break','other') NOT NULL, PRIMARY KEY (`addressFk`), CONSTRAINT `addressShortage_FK` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -26516,17 +25940,14 @@ CREATE TABLE `agency` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) NOT NULL, `warehouseFk` smallint(5) unsigned DEFAULT NULL COMMENT 'A nulo si se puede enrutar desde todos los almacenes', - `warehouseAliasFk__` smallint(5) unsigned DEFAULT NULL COMMENT '@deprecated 2024-01-23 refs #5167', `isOwn` tinyint(1) NOT NULL DEFAULT 0, `workCenterFk` int(11) DEFAULT NULL, `isAnyVolumeAllowed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Permite vender productos que tengan vn.itemType.IsUnconventionalSize = TRUE', `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `warehouse_id` (`warehouseFk`), - KEY `agencias_alias_idx` (`warehouseAliasFk__`), KEY `agency_ibfk_3_idx` (`workCenterFk`), KEY `agency_user_FK` (`editorFk`), - CONSTRAINT `agency_FK` FOREIGN KEY (`warehouseAliasFk__`) REFERENCES `warehouseAlias__` (`id`) ON UPDATE CASCADE, CONSTRAINT `agency_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `agency_ibfk_3` FOREIGN KEY (`workCenterFk`) REFERENCES `workCenter` (`id`) ON UPDATE CASCADE, CONSTRAINT `agency_user_FK` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`) @@ -26590,6 +26011,7 @@ CREATE TABLE `agencyLog` ( KEY `logAgencyUserFk` (`userFk`), KEY `agencyLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `agencyLog_originFk` (`originFk`,`creationDate`), + KEY `agencyLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `agencyOriginFk` FOREIGN KEY (`originFk`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `agencyUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -26973,7 +26395,6 @@ CREATE TABLE `awbComponent` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `awbFk` smallint(11) unsigned DEFAULT NULL, `supplierFk` int(11) NOT NULL, - `dated__` date NOT NULL, `typeFk` mediumint(3) unsigned DEFAULT NULL, `awbRoleFk` tinyint(1) unsigned NOT NULL DEFAULT 1, `awbUnitFk` varchar(10) DEFAULT NULL, @@ -27332,30 +26753,6 @@ CREATE TABLE `bookingPlanner` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `botanicExport__` --- - -DROP TABLE IF EXISTS `botanicExport__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `botanicExport__` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `ediGenusFk` mediumint(8) unsigned NOT NULL, - `ediSpecieFk` mediumint(8) unsigned DEFAULT NULL, - `countryFk__` mediumint(8) unsigned DEFAULT NULL, - `restriction` enum('Sin restriccion','Importacion Prohibida','pasaporte fitosanitario','pasaporte individual','declaracion origen') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `description` varchar(45) DEFAULT NULL, - `isProtectedZone` tinyint(1) NOT NULL DEFAULT 0, - `code` enum('importProhibited','phytosanitaryPassport','individualPassport') DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `Id_Paises` (`countryFk__`), - KEY `botanicExport_ibfk_2_idx` (`ediGenusFk`), - KEY `botanicExport_ibfk_3_idx` (`ediSpecieFk`), - CONSTRAINT `botanicExport___ibfk_1` FOREIGN KEY (`countryFk__`) REFERENCES `country` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #4419 Deprecated 2023-07-20'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `budget` -- @@ -27605,7 +27002,6 @@ CREATE TABLE `buy` ( `packing` int(11) NOT NULL DEFAULT 1 CHECK (`packing` > 0), `grouping` smallint(5) unsigned NOT NULL DEFAULT 1, `groupingMode` enum('grouping','packing') DEFAULT NULL, - `containerFk__` smallint(5) unsigned DEFAULT NULL, `comissionValue` decimal(10,3) NOT NULL DEFAULT 0.000, `packageValue` decimal(10,3) NOT NULL DEFAULT 0.000, `location` varchar(5) DEFAULT NULL, @@ -27630,7 +27026,6 @@ CREATE TABLE `buy` ( KEY `CompresId_Trabajador` (`workerFk`), KEY `Id_Cubo` (`packagingFk`), KEY `Id_Entrada` (`entryFk`), - KEY `container_id` (`containerFk__`), KEY `buy_edi_id` (`ektFk`), KEY `itemFk_entryFk` (`itemFk`,`entryFk`), KEY `buy_fk_4_idx` (`deliveryFk`), @@ -27869,7 +27264,6 @@ CREATE TABLE `chat` ( `dated` datetime DEFAULT NULL, `checkUserStatus` tinyint(1) DEFAULT NULL, `message` text DEFAULT NULL, - `status__` tinyint(1) DEFAULT NULL, `attempts` int(1) DEFAULT NULL, `error` text DEFAULT NULL, `status` enum('pending','sent','error','sending') NOT NULL DEFAULT 'pending', @@ -27917,7 +27311,6 @@ CREATE TABLE `claim` ( `ticketFk` int(11) DEFAULT NULL, `pickup` enum('agency','delivery') DEFAULT NULL, `packages` smallint(10) unsigned DEFAULT 0 COMMENT 'packages received by the client', - `rma__` varchar(100) DEFAULT NULL, `responsabilityRate` decimal(3,2) GENERATED ALWAYS AS ((5 - `responsibility`) / 4) VIRTUAL, `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), @@ -28100,6 +27493,7 @@ CREATE TABLE `claimLog` ( KEY `userFk` (`userFk`), KEY `claimLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `claimLog_claimLog` (`originFk`,`creationDate`), + KEY `claimLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `claimUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -28208,22 +27602,6 @@ CREATE TABLE `claimResult` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Consecuencias de los motivos'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `claimRma__` --- - -DROP TABLE IF EXISTS `claimRma__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `claimRma__` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `code` varchar(100) NOT NULL, - `created` timestamp NOT NULL DEFAULT current_timestamp(), - `workerFk` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='kkeada el 2024-02-26 por Pablo'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `claimState` -- @@ -28290,7 +27668,6 @@ CREATE TABLE `client` ( `riskCalculated` date NOT NULL, `hasCoreVnh` tinyint(1) DEFAULT 0, `isRelevant` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Define los clientes cuyas ventas hay que tener en cuenta en los calculos estadisticos.', - `clientTypeFk__` int(11) NOT NULL DEFAULT 1 COMMENT '@deprecated 2024-02-20 refs #6784', `creditInsurance` int(11) DEFAULT NULL, `eypbc` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Email\\nYesterday\\nPurchases\\nBy\\nConsigna', `hasToInvoiceByAddress` tinyint(1) DEFAULT 0, @@ -28306,7 +27683,6 @@ CREATE TABLE `client` ( `transferorFk` int(11) DEFAULT NULL COMMENT 'Cliente que le ha transmitido la titularidad de la empresa', `lastSalesPersonFk` int(10) unsigned DEFAULT NULL COMMENT 'ultimo comercial que tuvo, para el calculo del peso en los rankings de equipo', `businessTypeFk` varchar(20) NOT NULL DEFAULT 'florist', - `hasIncoterms__` tinyint(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-06-12 refs #7545 Received incoterms authorization from client', `rating` int(10) unsigned DEFAULT NULL COMMENT 'información proporcionada por Informa', `recommendedCredit` int(10) unsigned DEFAULT NULL COMMENT 'información proporcionada por Informa', `editorFk` int(10) unsigned DEFAULT NULL, @@ -28322,7 +27698,6 @@ CREATE TABLE `client` ( KEY `default_address` (`defaultAddressFk`), KEY `Telefono` (`phone`), KEY `movil` (`mobile`), - KEY `tipos_de_cliente_idx` (`clientTypeFk__`), KEY `fk_Clientes_entity_idx` (`bankEntityFk`), KEY `typeFk` (`typeFk`), KEY `client_taxTypeSageFk_idx` (`taxTypeSageFk`), @@ -28489,7 +27864,7 @@ CREATE TABLE `clientInforma` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `clientFk` int(11) NOT NULL, `rating` int(10) unsigned DEFAULT NULL, - `recommendedCredit` int(10) unsigned DEFAULT NULL, + `recommendedCredit` int(10) unsigned NOT NULL, `workerFk` int(10) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), @@ -28544,6 +27919,7 @@ CREATE TABLE `clientLog` ( KEY `userFk` (`userFk`), KEY `clientLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `clientLog_clientLog` (`originFk`,`creationDate`), + KEY `clientLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `clientLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -28742,7 +28118,6 @@ DROP TABLE IF EXISTS `clientType`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `clientType` ( - `id__` int(11) NOT NULL COMMENT '@deprecated 2024-02-20 refs #6784', `code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `type` varchar(45) NOT NULL, `isCreatedAsServed` tinyint(1) DEFAULT 0, @@ -28796,7 +28171,6 @@ DROP TABLE IF EXISTS `cmr`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cmr` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `ticketFk__` int(11) DEFAULT NULL COMMENT '@deprecated 2023-10-20 refs #6092', `truckPlate` varchar(30) DEFAULT NULL, `observations` varchar(255) DEFAULT NULL, `senderInstruccions` varchar(255) DEFAULT NULL, @@ -28813,14 +28187,12 @@ CREATE TABLE `cmr` ( `landed` datetime DEFAULT NULL COMMENT 'Hora de llegada a destino', `ead` datetime DEFAULT NULL COMMENT 'Estimated Arriving Date', PRIMARY KEY (`id`), - KEY `cmr_fk1_idx` (`ticketFk__`), KEY `cmr_fk2_idx` (`companyFk`), KEY `cmr_fk3_idx` (`addressToFk`), KEY `cm_fk4_idx` (`supplierFk`), KEY `cmr_FK` (`addressFromFk`), CONSTRAINT `cmrCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `cmr_FK` FOREIGN KEY (`addressFromFk`) REFERENCES `address` (`id`) ON UPDATE CASCADE, - CONSTRAINT `cmr_fk1` FOREIGN KEY (`ticketFk__`) REFERENCES `ticket` (`id`), CONSTRAINT `cmr_fk3` FOREIGN KEY (`addressToFk`) REFERENCES `address` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `cmr_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -28961,7 +28333,7 @@ DROP TABLE IF EXISTS `collectionWagon`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `collectionWagon` ( `collectionFk` int(11) NOT NULL, - `wagonFk` varchar(6) NOT NULL, + `wagonFk` int(11) unsigned NOT NULL, `position` int(11) unsigned NOT NULL, PRIMARY KEY (`collectionFk`,`position`), UNIQUE KEY `collectionWagon_unique` (`collectionFk`,`wagonFk`), @@ -28980,7 +28352,7 @@ DROP TABLE IF EXISTS `collectionWagonTicket`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `collectionWagonTicket` ( `ticketFk` int(11) NOT NULL, - `wagonFk` varchar(6) NOT NULL, + `wagonFk` int(11) unsigned NOT NULL, `trayFk` int(11) unsigned NOT NULL, `side` set('L','R') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, `rgb` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'Color de la balda', @@ -28990,7 +28362,7 @@ CREATE TABLE `collectionWagonTicket` ( KEY `collectionWagonTicket_FK_1` (`wagonFk`), CONSTRAINT `collectionWagonTicket_FK` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON UPDATE CASCADE, CONSTRAINT `collectionWagonTicket_FK_1` FOREIGN KEY (`wagonFk`) REFERENCES `wagon` (`id`) ON UPDATE CASCADE, - CONSTRAINT `collectionWagonTicket_tray` FOREIGN KEY (`trayFk`) REFERENCES `wagonTypeTray` (`id`) ON UPDATE CASCADE + CONSTRAINT `collectionWagonTicket_tray` FOREIGN KEY (`trayFk`) REFERENCES `wagonTypeTray` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -29046,7 +28418,6 @@ CREATE TABLE `company` ( `stamp` longblob DEFAULT NULL, `created` timestamp NOT NULL ON UPDATE current_timestamp(), `clientFk` int(11) DEFAULT NULL, - `sage200Company__` int(2) DEFAULT NULL COMMENT '@deprecated 06/03/2024', `supplierAccountFk` mediumint(8) unsigned DEFAULT NULL COMMENT 'Cuenta por defecto para ingresos desde este pais', `isDefaulter` tinyint(4) NOT NULL DEFAULT 0, `companyGroupFk` int(11) NOT NULL DEFAULT 1 COMMENT 'usado para calcular los greuges ', @@ -29478,22 +28849,6 @@ CREATE TABLE `conveyorType` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `coolerPathDetail__` --- - -DROP TABLE IF EXISTS `coolerPathDetail__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `coolerPathDetail__` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `coolerPathFk` int(11) NOT NULL DEFAULT 1, - `hallway` varchar(3) NOT NULL, - PRIMARY KEY (`coolerPathFk`,`hallway`), - UNIQUE KEY `cooler_path_detail_id_UNIQUE` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `corridor` -- @@ -29523,7 +28878,6 @@ CREATE TABLE `country` ( `code` varchar(2) NOT NULL, `viesCode` varchar(2) DEFAULT NULL, `currencyFk` tinyint(3) unsigned NOT NULL DEFAULT 1, - `politicalCountryFk__` mediumint(8) unsigned DEFAULT NULL COMMENT 'Pais Real(apaño por culpa del España Exento)', `geoFk` int(11) DEFAULT NULL, `hasDailyInvoice` tinyint(4) NOT NULL DEFAULT 0, `isUeeMember` tinyint(4) NOT NULL DEFAULT 0, @@ -29533,13 +28887,11 @@ CREATE TABLE `country` ( `isSocialNameUnique` tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY `country_unique` (`code`), - KEY `Id_Paisreal` (`politicalCountryFk__`), KEY `currency_id_fk_idx` (`currencyFk`), KEY `country_Ix4` (`name`), KEY `continent_id_fk_idx` (`continentFk`), KEY `country_FK_1` (`geoFk`), CONSTRAINT `continent_id_fk` FOREIGN KEY (`continentFk`) REFERENCES `continent` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, - CONSTRAINT `country_FK` FOREIGN KEY (`politicalCountryFk__`) REFERENCES `country` (`id`) ON UPDATE CASCADE, CONSTRAINT `country_FK_1` FOREIGN KEY (`geoFk`) REFERENCES `zoneGeo` (`id`) ON UPDATE CASCADE, CONSTRAINT `currency_id_fk` FOREIGN KEY (`currencyFk`) REFERENCES `currency` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -29643,15 +28995,14 @@ DROP TABLE IF EXISTS `creditInsurance`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `creditInsurance` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `creditClassification` int(11) DEFAULT NULL, + `creditClassification__` int(11) DEFAULT NULL COMMENT '@deprecated 2024-09-11', `credit` int(11) DEFAULT NULL, `creationDate` timestamp NOT NULL DEFAULT current_timestamp(), `grade` tinyint(1) DEFAULT NULL, `creditClassificationFk` int(11) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `CreditInsurance_Fk1_idx` (`creditClassification`), + KEY `CreditInsurance_Fk1_idx` (`creditClassification__`), KEY `creditInsurance_creditClassificationFk` (`creditClassificationFk`), - CONSTRAINT `CreditInsurance_Fk1` FOREIGN KEY (`creditClassification`) REFERENCES `creditClassification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `creditInsurance_creditClassificationFk` FOREIGN KEY (`creditClassificationFk`) REFERENCES `creditClassification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -29785,7 +29136,6 @@ CREATE TABLE `deliveryNote` ( `supervisorFk` int(10) unsigned NOT NULL, `departmentFk` int(11) NOT NULL, `invoiceInFk` mediumint(8) unsigned DEFAULT NULL, - `farmingFk__` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_albaran_Proveedores_idx` (`supplierFk`), KEY `fk_albaran_empresa1_idx` (`companyFk`), @@ -29795,9 +29145,7 @@ CREATE TABLE `deliveryNote` ( KEY `fk_albaran_Trabajadores2_idx` (`supervisorFk`), KEY `fk_albaran_department1_idx` (`departmentFk`), KEY `fk_albaran_recibida_idx` (`invoiceInFk`), - KEY `albaran_FK` (`farmingFk__`), CONSTRAINT `albaranCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, - CONSTRAINT `albaran_FK` FOREIGN KEY (`farmingFk__`) REFERENCES `farming` (`id`), CONSTRAINT `albaran_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE, CONSTRAINT `fk_albaran_Trabajadores1` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `fk_albaran_Trabajadores2` FOREIGN KEY (`supervisorFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, @@ -30074,6 +29422,7 @@ CREATE TABLE `deviceProductionLog` ( KEY `userFk` (`userFk`), KEY `deviceProductionLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `deviceProductionLog_deviceProductionLog` (`originFk`,`creationDate`), + KEY `deviceProductionLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `deviceProductionUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -30212,7 +29561,6 @@ CREATE TABLE `dmsType` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(45) NOT NULL, `name` varchar(45) NOT NULL, - `path__` varchar(255) NOT NULL COMMENT '@deprecated 2024-01-08 refs #6410', `writeRoleFk` int(10) unsigned DEFAULT NULL, `readRoleFk` int(10) unsigned DEFAULT NULL, `monthToDelete` int(10) unsigned DEFAULT NULL COMMENT 'Meses en el pasado para ir borrando registros, dejar a null para no borrarlos nunca', @@ -30300,7 +29648,6 @@ DROP TABLE IF EXISTS `dua`; CREATE TABLE `dua` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(45) DEFAULT NULL, - `awbFk__` smallint(11) unsigned DEFAULT NULL COMMENT '@Deprecated refs #5871 01/10/2023', `issued` date DEFAULT NULL, `operated` date DEFAULT NULL, `booked` date DEFAULT NULL, @@ -30311,7 +29658,6 @@ CREATE TABLE `dua` ( `ASIEN` double DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `code_UNIQUE` (`code`), - KEY `fk_awb_dua_awb_idx` (`awbFk__`), KEY `fk_dua_gestdoc1_idx` (`gestdocFk`), KEY `dua_fk4_idx` (`companyFk`), CONSTRAINT `duaCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, @@ -30563,7 +29909,6 @@ CREATE TABLE `entry` ( `companyFk` int(10) unsigned NOT NULL DEFAULT 442, `gestDocFk` int(11) DEFAULT NULL, `invoiceInFk` mediumint(8) unsigned DEFAULT NULL, - `isBlocked__` tinyint(4) NOT NULL DEFAULT 0 COMMENT '@deprecated 27/03/2024', `loadPriority` int(11) DEFAULT NULL, `kop` int(11) DEFAULT NULL, `sub` mediumint(8) unsigned DEFAULT NULL, @@ -30663,6 +30008,7 @@ CREATE TABLE `entryLog` ( KEY `entryLog_ibfk_2` (`userFk`), KEY `entryLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `entryLog_originFk` (`originFk`,`creationDate`), + KEY `entryLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -30958,7 +30304,6 @@ CREATE TABLE `expedition` ( `ticketFk` int(10) NOT NULL, `freightItemFk` int(11) DEFAULT 1 COMMENT 'itemFk del artículo que nos va a facturar el proveedor de transporte.', `created` timestamp NULL DEFAULT current_timestamp(), - `itemFk__` int(11) DEFAULT NULL COMMENT 'Si es necesario el itemFk del cubo, se obtiene mediante packagingFk, join packing.itemFk', `counter` smallint(5) unsigned NOT NULL, `workerFk` int(10) unsigned DEFAULT NULL, `externalId` varchar(20) DEFAULT NULL, @@ -31532,29 +30877,6 @@ CREATE TABLE `floramondoConfig` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `forecastedBalance__` --- - -DROP TABLE IF EXISTS `forecastedBalance__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `forecastedBalance__` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `description` varchar(45) DEFAULT NULL, - `amount` double NOT NULL DEFAULT 0, - `dated` date NOT NULL, - `accountingFk` int(11) DEFAULT NULL, - `companyFk` int(10) unsigned NOT NULL DEFAULT 442, - PRIMARY KEY (`id`), - KEY `Fecha_indice` (`dated`), - KEY `banco_prevision_idx` (`accountingFk`), - KEY `empresa_prevision_idx` (`companyFk`), - CONSTRAINT `Saldos_PrevisionCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, - CONSTRAINT `banco_prevision` FOREIGN KEY (`accountingFk`) REFERENCES `accounting` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2024-05-21'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `franceExpressConfig` -- @@ -32261,6 +31583,7 @@ CREATE TABLE `invoiceInLog` ( KEY `userFk` (`userFk`), KEY `invoiceInLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `invoiceInLog_originFk` (`originFk`,`creationDate`), + KEY `invoiceInLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `invoiceInLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -32593,14 +31916,12 @@ CREATE TABLE `item` ( `itemPackingTypeFk` varchar(1) DEFAULT NULL, `packingOut` decimal(10,2) DEFAULT NULL COMMENT 'cantidad que cabe en una caja de verdnatura', `genericFk` int(11) DEFAULT NULL COMMENT 'Item genérico', - `packingShelve__` int(11) DEFAULT NULL COMMENT '@deprecated 2024-31-01', `isLaid` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Indica si el producto se puede tumbar a efectos del transporte desde Holanda', `lastUsed` datetime DEFAULT current_timestamp(), `weightByPiece` int(10) unsigned DEFAULT NULL COMMENT 'peso por defecto para un articulo por tallo/unidad', `editorFk` int(10) unsigned DEFAULT NULL, `recycledPlastic` decimal(10,2) DEFAULT NULL, `nonRecycledPlastic` decimal(10,2) DEFAULT NULL, - `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, @@ -32959,6 +32280,7 @@ CREATE TABLE `itemLog` ( KEY `itemLogUserFk_idx` (`userFk`), KEY `itemLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `itemLog_originFk` (`originFk`,`creationDate`), + KEY `itemLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -33179,7 +32501,6 @@ SET character_set_client = utf8; 1 AS `concept`, 1 AS `size`, 1 AS `Estado`, - 1 AS `sectorProdPriority`, 1 AS `available`, 1 AS `sectorFk`, 1 AS `matricula`, @@ -33543,20 +32864,10 @@ CREATE TABLE `itemType` ( `workerFk` int(10) unsigned NOT NULL, `isInventory` tinyint(4) NOT NULL DEFAULT 1 COMMENT 'Se utiliza tanto en el cálculo del inventario, como en el del informe del inventario valorado', `created` timestamp NULL DEFAULT current_timestamp(), - `transaction__` tinyint(4) NOT NULL DEFAULT 0, `making` int(10) unsigned DEFAULT NULL COMMENT 'Son productos de confección propia', - `location__` varchar(10) DEFAULT NULL, `life` smallint(5) unsigned DEFAULT NULL, - `maneuver__` double NOT NULL DEFAULT 0.21 COMMENT '@deprecated 2024-07-01 refs #7418', - `target__` double NOT NULL DEFAULT 0.15 COMMENT '@deprecated 2024-07-01 refs #7418', - `topMargin__` double NOT NULL DEFAULT 0.3 COMMENT '@deprecated 2024-07-01 refs #7418', - `profit__` double NOT NULL DEFAULT 0.02 COMMENT '@deprecated 2024-07-01 refs #7418', - `density__` double NOT NULL DEFAULT 167 COMMENT '@deprecated 2024-07-01 refs #7418 Almacena el valor por defecto de la densidad en kg/m3 para el calculo de los portes aereos, en articulos se guarda la correcta', `promo` double NOT NULL DEFAULT 0, `isPackaging` tinyint(1) NOT NULL DEFAULT 0, - `hasComponents__` tinyint(1) NOT NULL DEFAULT 1, - `warehouseFk__` smallint(6) unsigned NOT NULL DEFAULT 60, - `compression__` decimal(5,2) DEFAULT 1.00, `itemPackingTypeFk` varchar(1) DEFAULT NULL, `temperatureFk` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, `isUnconventionalSize` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'familia con productos cuyas medidas no son aptas para la cinta transportadora o paletizar', @@ -33570,13 +32881,11 @@ CREATE TABLE `itemType` ( KEY `Trabajador` (`workerFk`), KEY `reino_id` (`categoryFk`), KEY `Tipos_fk3_idx` (`making`), - KEY `warehouseFk5_idx` (`warehouseFk__`), KEY `temperatureFk` (`temperatureFk`), CONSTRAINT `Tipos_fk3` FOREIGN KEY (`making`) REFERENCES `confectionType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `Trabajador` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `itemType_ibfk_1` FOREIGN KEY (`categoryFk`) REFERENCES `itemCategory` (`id`) ON UPDATE CASCADE, - CONSTRAINT `temperatureFk` FOREIGN KEY (`temperatureFk`) REFERENCES `temperature` (`code`), - CONSTRAINT `warehouseFk5` FOREIGN KEY (`warehouseFk__`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE + CONSTRAINT `temperatureFk` FOREIGN KEY (`temperatureFk`) REFERENCES `temperature` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Protege la tabla tipos de updates para los 4 parámetros de los compradores, en funcion del valor del campo CodigoRojo de tblContadores.'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -33783,9 +33092,7 @@ DROP TABLE IF EXISTS `ledgerConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ledgerConfig` ( - `lastBookEntry__` int(11) NOT NULL COMMENT '@deprecated 2024-05-28 refs #7400 Modificar contador asientos contables', - `maxTolerance` decimal(10,2) NOT NULL, - PRIMARY KEY (`lastBookEntry__`) + `maxTolerance` decimal(10,2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -34042,6 +33349,21 @@ CREATE TABLE `manuscript` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `material` +-- + +DROP TABLE IF EXISTS `material`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `material` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + 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 */; + -- -- Table structure for table `mdbApp` -- @@ -34719,6 +34041,8 @@ CREATE TABLE `packaging` ( `conveyorBuildingClassFk` int(11) DEFAULT NULL, `isTrolley` tinyint(1) NOT NULL DEFAULT 0, `isPallet` tinyint(1) NOT NULL DEFAULT 0, + `isPlantTray` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'The container is a plant tray. Used to restrict the picking of full plant trays, to make previous picking.', + `isActive` tinyint(1) DEFAULT 1, PRIMARY KEY (`id`), KEY `packaging_fk1` (`itemFk`), KEY `packaging_fk2_idx` (`freightItemFk`), @@ -34912,6 +34236,7 @@ CREATE TABLE `packingSiteDeviceLog` ( KEY `userFk` (`userFk`), KEY `packingSiteDeviceLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `packingSiteDeviceLog_packingSiteDeviceLog` (`originFk`,`creationDate`), + KEY `packingSiteDeviceLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `packingSiteDeviceLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -34985,6 +34310,7 @@ CREATE TABLE `parking` ( `id` int(11) NOT NULL AUTO_INCREMENT, `column` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '--', `row` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '--', + `floor` varchar(5) DEFAULT NULL, `sectorFk` int(11) NOT NULL, `code` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, `pickingOrder` int(11) DEFAULT NULL, @@ -34992,7 +34318,7 @@ CREATE TABLE `parking` ( PRIMARY KEY (`id`), UNIQUE KEY `code_UNIQUE` (`code`), KEY `parking_fk1_idx` (`sectorFk`), - CONSTRAINT `parking_fk1` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `parking_fk1` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON UPDATE CASCADE, CONSTRAINT `chkParkingCodeFormat` CHECK (char_length(`code`) > 4 and `code` regexp '^[^ ]+-[^ ]+$') ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Tabla con los parkings del altillo'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -35011,7 +34337,7 @@ CREATE TABLE `parkingLog` ( `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('Parking','SaleGroup','SaleGroupDetail') NOT NULL DEFAULT 'Parking', + `changedModel` enum('Parking') NOT NULL DEFAULT 'Parking', `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, @@ -35021,6 +34347,7 @@ CREATE TABLE `parkingLog` ( KEY `logParkinguserFk` (`userFk`), KEY `parkingLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `parkingLog_originFk` (`originFk`,`creationDate`), + KEY `parkingLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `parkingOriginFk` FOREIGN KEY (`originFk`) REFERENCES `parking` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `parkingUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -35194,15 +34521,7 @@ DROP TABLE IF EXISTS `payrollWorkCenter`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `payrollWorkCenter` ( `workCenterFkA3` int(11) NOT NULL COMMENT 'Columna que hace referencia a A3.', - `Centro__` varchar(255) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `nss_cotizacion__` varchar(15) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `domicilio__` varchar(255) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `poblacion__` varchar(45) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `cp__` varchar(5) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `empresa_id__` int(10) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `companyFkA3` int(11) DEFAULT NULL COMMENT 'Columna que hace referencia a A3.', - PRIMARY KEY (`workCenterFkA3`,`empresa_id__`), - KEY `payroll_centros_ix1` (`empresa_id__`) + `companyFkA3` int(11) DEFAULT NULL COMMENT 'Columna que hace referencia a A3.' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -35215,17 +34534,10 @@ DROP TABLE IF EXISTS `payrollWorker`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `payrollWorker` ( `workerFkA3` int(11) NOT NULL COMMENT 'Columna que hace referencia a A3.', - `nss__` varchar(23) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `codpuesto__` int(10) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', `companyFkA3` int(10) NOT NULL COMMENT 'Columna que hace referencia a A3.', - `codcontrato__` int(10) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `FAntiguedad__` date NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', `grupotarifa` int(10) NOT NULL, - `codcategoria__` int(10) NOT NULL COMMENT '@Deprecated refs #6738 15/03/2024', - `ContratoTemporal__` tinyint(1) NOT NULL DEFAULT 0 COMMENT '@Deprecated refs #6738 15/03/2024', `workerFk` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`workerFkA3`,`companyFkA3`), - KEY `sajvgfh_idx` (`codpuesto__`), KEY `payroll_employee_workerFk_idx` (`workerFk`), CONSTRAINT `payroll_employee_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -35582,6 +34894,45 @@ CREATE TABLE `ppePlan` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Plan de amortizacion para la tabla ppe'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `priceDelta` +-- + +DROP TABLE IF EXISTS `priceDelta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `priceDelta` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size', + `maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size', + `inkFk` varchar(3) DEFAULT NULL, + `originFk` tinyint(2) unsigned DEFAULT NULL, + `producerFk` mediumint(3) unsigned DEFAULT NULL, + `fromDated` date DEFAULT NULL, + `toDated` date DEFAULT NULL, + `absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price', + `ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price', + `warehouseFk` smallint(6) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, + `zoneGeoFk` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `priceDelta_itemType_FK` (`itemTypeFk`), + KEY `priceDelta_ink_FK` (`inkFk`), + KEY `priceDelta_producer_FK` (`producerFk`), + KEY `priceDelta_warehouse_FK` (`warehouseFk`), + KEY `priceDelta_worker_FK` (`editorFk`), + KEY `priceDelta_zoneGeo_FK` (`zoneGeoFk`), + CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `priceDelta_zoneGeo_FK` FOREIGN KEY (`zoneGeoFk`) REFERENCES `zoneGeo` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items'; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `priceFixed` -- @@ -35798,6 +35149,7 @@ CREATE TABLE `productionConfig` ( `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', + `minPlantTrayLength` int(11) NOT NULL DEFAULT 53 COMMENT 'minimum length for plant tray restriction. Avoid to make collection of the ticket with this kind of item', PRIMARY KEY (`id`), KEY `productionConfig_FK` (`shortageAddressFk`), KEY `productionConfig_FK_1` (`clientSelfConsumptionFk`), @@ -35839,6 +35191,7 @@ CREATE TABLE `productionConfigLog` ( KEY `productionConfigLog_userFk` (`userFk`), KEY `productionConfigLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `productionConfigLog_originFk` (`originFk`,`creationDate`), + KEY `productionConfigLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `productionConfigUserFk` 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 */; @@ -36155,16 +35508,20 @@ CREATE TABLE `punchState` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `quadMindsApiConfig` +-- Table structure for table `quadmindsApiConfig` -- -DROP TABLE IF EXISTS `quadMindsApiConfig`; +DROP TABLE IF EXISTS `quadmindsApiConfig`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `quadMindsApiConfig` ( +CREATE TABLE `quadmindsApiConfig` ( `id` int(10) unsigned NOT NULL, `url` varchar(255) DEFAULT NULL, `key` varchar(255) DEFAULT NULL, + `maxObjects` int(11) DEFAULT NULL COMMENT 'Número máximo de objetos en el array por petición', + `limit` int(11) DEFAULT NULL COMMENT 'Limite de objetos solicitados por petición', + `orderTimeFrom` varchar(5) DEFAULT NULL COMMENT 'Inicio de ventana horaria de pedido', + `orderTimeTo` varchar(5) DEFAULT NULL COMMENT 'Fin de ventana horaria de pedido', PRIMARY KEY (`id`), CONSTRAINT `quadMindsConfig_check` CHECK (`id` = 1) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -36281,6 +35638,7 @@ CREATE TABLE `rateLog` ( KEY `logRateuserFk` (`userFk`), KEY `rateLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `rateLog_originFk` (`originFk`,`creationDate`), + KEY `rateLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `rateUserFk` 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 */; @@ -36799,21 +36157,6 @@ CREATE TABLE `routeDefaultAgencyMode` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `routeLoadWorker__` --- - -DROP TABLE IF EXISTS `routeLoadWorker__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `routeLoadWorker__` ( - `routeFk` int(10) unsigned NOT NULL, - `workerFk` int(10) unsigned NOT NULL, - PRIMARY KEY (`routeFk`,`workerFk`), - KEY `frmWorker_idx` (`workerFk`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Table deprecated on 26/04/23'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `routeLog` -- @@ -36838,6 +36181,7 @@ CREATE TABLE `routeLog` ( KEY `userFk` (`userFk`), KEY `routeLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `routeLog_originFk` (`originFk`,`creationDate`), + KEY `routeLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `routeLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -36887,24 +36231,6 @@ CREATE TABLE `routeRecalc` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin COMMENT='Queue of changed volume to recalc route volumen'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `routeUserPercentage__` --- - -DROP TABLE IF EXISTS `routeUserPercentage__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `routeUserPercentage__` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `workerFk` int(10) unsigned NOT NULL, - `percentage` decimal(10,2) NOT NULL, - `dated` date NOT NULL, - PRIMARY KEY (`id`), - KEY `routeUserPercentageFk_idx` (`workerFk`), - CONSTRAINT `routeUserPercentageFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Temporary table structure for view `routesControl` -- @@ -37144,6 +36470,36 @@ CREATE TABLE `saleGroupDetail` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='relaciona sale y saleGroup'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `saleGroupLog` +-- + +DROP TABLE IF EXISTS `saleGroupLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `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`), + KEY `saleGroupLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, + CONSTRAINT `saleGroupLogUserFk` 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 `saleLabel` -- @@ -37262,7 +36618,6 @@ CREATE TABLE `saleTracking` ( `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `originalQuantity` double DEFAULT NULL, `workerFk` int(10) unsigned NOT NULL, - `actionFk__` int(11) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, `stateFk` tinyint(3) unsigned NOT NULL, `isScanned` tinyint(1) DEFAULT NULL COMMENT 'TRUE: se ha escaneado. FALSE: escrito a mano. NULL:demás casos', @@ -37271,11 +36626,9 @@ CREATE TABLE `saleTracking` ( KEY `Id_Movimiento` (`saleFk`), KEY `fgnStateFk_idx` (`stateFk`), KEY `saleTracking_idx5` (`created`), - KEY `saleTracking_fk2_idx` (`actionFk__`), KEY `saleTracking_FK_2` (`workerFk`), CONSTRAINT `fgnStateFk` FOREIGN KEY (`stateFk`) REFERENCES `state` (`id`) ON UPDATE CASCADE, CONSTRAINT `saleTracking_FK` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `saleTracking_FK_1` FOREIGN KEY (`actionFk__`) REFERENCES `ticketTrackingState__` (`id`) ON UPDATE CASCADE, CONSTRAINT `saleTracking_FK_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -37832,6 +37185,7 @@ CREATE TABLE `shelvingLog` ( KEY `userFk` (`userFk`), KEY `shelvingLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `shelvingLog_originFk` (`originFk`,`creationDate`), + KEY `shelvingLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `shelvingLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -38241,7 +37595,6 @@ CREATE TABLE `state` ( `order` tinyint(3) unsigned DEFAULT NULL, `alertLevel` int(11) NOT NULL DEFAULT 0, `code` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `sectorProdPriority` tinyint(3) DEFAULT NULL, `nextStateFk` tinyint(3) unsigned NOT NULL COMMENT 'Estado al que tiene que cambiar el ticket despues de preparacion previa', `isPreviousPreparable` tinyint(1) NOT NULL DEFAULT 0, `isPicked` tinyint(1) NOT NULL DEFAULT 0, @@ -38278,6 +37631,25 @@ CREATE TABLE `stateI18n` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `stockBought` +-- + +DROP TABLE IF EXISTS `stockBought`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `stockBought` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `workerFk` int(10) unsigned NOT NULL, + `bought` decimal(10,2) NOT NULL COMMENT 'purchase volume in m3 for the day', + `reserve` decimal(10,2) DEFAULT NULL COMMENT 'reserved volume in m3 for the day', + `dated` date NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + UNIQUE KEY `stockBought_unique` (`workerFk`,`dated`), + CONSTRAINT `stockBought_worker_FK` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `stockBuyed` -- @@ -38332,7 +37704,6 @@ CREATE TABLE `supplier` ( `countryFk` mediumint(8) unsigned DEFAULT NULL, `nif` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, `isOfficial` tinyint(1) NOT NULL DEFAULT 1, - `isFarmer__` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'refs #7345 @deprecated 2024-05-10 - Utilizar withholdingSageFk', `retAccount` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, `phone` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, `commission` float NOT NULL DEFAULT 0, @@ -38399,7 +37770,6 @@ CREATE TABLE `supplierAccount` ( `office` varchar(4) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, `DC` varchar(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, `number` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, - `description__` varchar(45) DEFAULT NULL COMMENT '@deprecated 2023-03-23', `bankEntityFk` int(10) unsigned DEFAULT NULL, `accountingFk` int(11) DEFAULT NULL, `beneficiary` varchar(50) DEFAULT NULL, @@ -38613,6 +37983,7 @@ CREATE TABLE `supplierLog` ( KEY `supplierLog_ibfk_2` (`userFk`), KEY `supplierLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `supplierLog_originFk` (`originFk`,`creationDate`), + KEY `supplierLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `supplierLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -38915,6 +38286,7 @@ CREATE TABLE `ticket` ( `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, + `volume` decimal(10,6) DEFAULT NULL COMMENT 'Unidad en m3', PRIMARY KEY (`id`), KEY `Id_Cliente` (`clientFk`), KEY `Id_Consigna` (`addressFk`), @@ -38942,6 +38314,21 @@ CREATE TABLE `ticket` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `ticketCanAdvanceConfig` +-- + +DROP TABLE IF EXISTS `ticketCanAdvanceConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ticketCanAdvanceConfig` ( + `id` int(10) unsigned NOT NULL, + `destinationOrder` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `ticketCanAdvanceConfig_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 `ticketCollection` -- @@ -39354,7 +38741,6 @@ CREATE TABLE `ticketRequest` ( `ordered` datetime DEFAULT NULL, `shipped` datetime DEFAULT NULL, `salesPersonCode` varchar(3) DEFAULT NULL, - `buyerCode__` varchar(3) NOT NULL COMMENT '@deprecated 2024-04-23 refs #6731 field not used', `quantity` int(11) DEFAULT NULL, `price` double DEFAULT NULL, `itemFk` double DEFAULT NULL, @@ -39373,7 +38759,6 @@ CREATE TABLE `ticketRequest` ( UNIQUE KEY `Id_Movimiento_UNIQUE` (`saleFk`), KEY `Id_ARTICLE` (`itemFk`), KEY `Id_CLIENTE` (`clientFk`), - KEY `Id_Comprador` (`buyerCode__`), KEY `Id_Movimiento` (`saleFk`), KEY `Id_Vendedor` (`salesPersonCode`), KEY `fgnRequester_idx` (`requesterFk`), @@ -39433,23 +38818,6 @@ CREATE TABLE `ticketServiceType` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Lista de los posibles servicios a elegir'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `ticketSms__` --- - -DROP TABLE IF EXISTS `ticketSms__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ticketSms__` ( - `smsFk` mediumint(8) unsigned NOT NULL, - `ticketFk` int(11) DEFAULT NULL, - PRIMARY KEY (`smsFk`), - KEY `ticketSms_FK_1` (`ticketFk`), - CONSTRAINT `ticketSms_FK` FOREIGN KEY (`smsFk`) REFERENCES `sms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `ticketSms_FK_1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Temporary table structure for view `ticketState` -- @@ -39523,20 +38891,6 @@ CREATE TABLE `ticketTracking` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `ticketTrackingState__` --- - -DROP TABLE IF EXISTS `ticketTrackingState__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ticketTrackingState__` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `action` varchar(15) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `ticketTrolley` -- @@ -39886,7 +39240,6 @@ CREATE TABLE `travel` ( `landingHour` time DEFAULT NULL, `warehouseInFk` smallint(6) unsigned DEFAULT NULL, `warehouseOutFk` smallint(6) unsigned DEFAULT NULL, - `agencyFk__` smallint(5) unsigned NOT NULL COMMENT '@deprecated 2024-10-01 refs #6604', `ref` varchar(20) DEFAULT NULL, `isDelivered` tinyint(1) NOT NULL DEFAULT 0, `isReceived` tinyint(1) NOT NULL DEFAULT 0, @@ -39901,7 +39254,6 @@ CREATE TABLE `travel` ( `awbFk` smallint(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `shipment_1` (`shipped`,`landed`,`warehouseInFk`,`warehouseOutFk`,`agencyModeFk`,`ref`), - KEY `agency_id` (`agencyFk__`), KEY `shipment` (`shipped`), KEY `landing` (`landed`), KEY `warehouse_landing` (`warehouseInFk`,`landed`), @@ -40024,6 +39376,7 @@ CREATE TABLE `travelLog` ( KEY `userFk` (`userFk`), KEY `travelLog_changedModel` (`changedModel`,`changedModelId`,`originFk`), KEY `travelLog_originFk` (`originFk`,`creationDate`), + KEY `travelLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `travelLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -40118,6 +39471,7 @@ CREATE TABLE `userLog` ( PRIMARY KEY (`id`), KEY `originFk` (`originFk`), KEY `userFk` (`userFk`), + KEY `userLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `userLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -40441,7 +39795,7 @@ DROP TABLE IF EXISTS `wagon`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wagon` ( - `id` varchar(6) NOT NULL COMMENT '26 letras de alfabeto inglés', + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '26 letras de alfabeto inglés', `volume` int(11) NOT NULL DEFAULT 150 COMMENT 'Volumen en litros', `plate` varchar(10) NOT NULL COMMENT 'Matrícula', `typeFk` int(11) unsigned NOT NULL, @@ -40466,7 +39820,11 @@ CREATE TABLE `wagonConfig` ( `maxWagonHeight` int(11) unsigned DEFAULT 200, `minHeightBetweenTrays` int(11) unsigned DEFAULT 50, `maxTrays` int(11) unsigned DEFAULT 6, + `defaultHeight` int(10) unsigned DEFAULT 0 COMMENT 'Default height in cm for a base tray', + `defaultTrayColorFk` int(11) unsigned DEFAULT NULL COMMENT 'Default color for a base tray', PRIMARY KEY (`id`), + KEY `wagonConfig_wagonTypeColor_FK` (`defaultTrayColorFk`), + CONSTRAINT `wagonConfig_wagonTypeColor_FK` FOREIGN KEY (`defaultTrayColorFk`) REFERENCES `wagonTypeColor` (`id`), CONSTRAINT `wagonConfig_check` CHECK (`id` = 1) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -40513,15 +39871,15 @@ DROP TABLE IF EXISTS `wagonTypeTray`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wagonTypeTray` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `typeFk` int(11) unsigned DEFAULT NULL, - `height` int(11) unsigned NOT NULL, - `colorFk` int(11) unsigned DEFAULT NULL, + `wagonTypeFk` int(11) unsigned DEFAULT NULL, + `height` int(11) unsigned DEFAULT NULL, + `wagonTypeColorFk` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `typeFk` (`typeFk`,`height`), - KEY `wagonTypeTray_color` (`colorFk`), - CONSTRAINT `wagonTypeTray_color` FOREIGN KEY (`colorFk`) REFERENCES `wagonTypeColor` (`id`) ON UPDATE CASCADE, - CONSTRAINT `wagonTypeTray_type` FOREIGN KEY (`typeFk`) REFERENCES `wagonType` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + KEY `wagonTypeTray_wagonType_FK` (`wagonTypeFk`), + KEY `wagonTypeTray_wagonTypeColor_FK` (`wagonTypeColorFk`), + CONSTRAINT `wagonTypeTray_wagonTypeColor_FK` FOREIGN KEY (`wagonTypeColorFk`) REFERENCES `wagonTypeColor` (`id`), + CONSTRAINT `wagonTypeTray_wagonType_FK` FOREIGN KEY (`wagonTypeFk`) REFERENCES `wagonType` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -40537,7 +39895,7 @@ CREATE TABLE `wagonVolumetry` ( `lines` int(10) unsigned NOT NULL DEFAULT 1, `liters` int(10) unsigned NOT NULL DEFAULT 0, `height` int(10) unsigned NOT NULL DEFAULT 20, - `wagonFk` varchar(6) NOT NULL, + `wagonFk` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `wagonVolumetry_FK_1` (`wagonFk`), CONSTRAINT `wagonVolumetry_FK_1` FOREIGN KEY (`wagonFk`) REFERENCES `wagon` (`id`) ON UPDATE CASCADE @@ -40572,7 +39930,6 @@ CREATE TABLE `warehouse` ( `hasDms` tinyint(1) NOT NULL DEFAULT 0, `pickUpAgencyModeFk` int(11) DEFAULT NULL, `isBuyerToBeEmailed` tinyint(2) NOT NULL DEFAULT 0, - `aliasFk__` smallint(5) unsigned DEFAULT NULL COMMENT '@deprecated 2024-01-23 refs #5167', `labelReport` int(11) DEFAULT NULL, `hasUbications` tinyint(1) NOT NULL DEFAULT 1, `hasProduction` tinyint(1) NOT NULL DEFAULT 0, @@ -40587,31 +39944,14 @@ CREATE TABLE `warehouse` ( UNIQUE KEY `name_UNIQUE` (`name`), KEY `Id_Paises` (`countryFk`), KEY `isComparativeIdx` (`isComparative`), - KEY `warehouse_ibfk_1_idx` (`aliasFk__`), KEY `warehouse_FK` (`addressFk`), KEY `warehouse_FK_1` (`pickUpAgencyModeFk`), CONSTRAINT `warehouse_FK` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `warehouse_FK_1` FOREIGN KEY (`pickUpAgencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE, - CONSTRAINT `warehouse_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`), - CONSTRAINT `warehouse_ibfk_2` FOREIGN KEY (`aliasFk__`) REFERENCES `warehouseAlias__` (`id`) ON DELETE SET NULL ON UPDATE CASCADE + CONSTRAINT `warehouse_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `warehouseAlias__` --- - -DROP TABLE IF EXISTS `warehouseAlias__`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `warehouseAlias__` ( - `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(15) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='@deprecated 2024-01-23 refs #5167'; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `warehousePickup` -- @@ -40687,9 +40027,8 @@ CREATE TABLE `worker` ( `hasMachineryAuthorized` tinyint(2) DEFAULT 0, `seniority` date DEFAULT NULL, `isTodayRelative` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Para el F11. Calcula los problemas de visiblidad en funcion del dia actual', - `isF11Allowed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Usuario autorizado para abrir el F11', + `isF11Allowed__` tinyint(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-09-22', `maritalStatus` enum('S','M') NOT NULL, - `labelerFk__` tinyint(3) unsigned DEFAULT NULL COMMENT '@deprecated 2023-06-26', `originCountryFk` mediumint(8) unsigned DEFAULT NULL COMMENT 'País de origen', `educationLevelFk` smallint(6) DEFAULT NULL, `SSN` varchar(15) DEFAULT NULL, @@ -40707,7 +40046,6 @@ CREATE TABLE `worker` ( UNIQUE KEY `worker_business` (`businessFk`), KEY `sub` (`sub`), KEY `boss_idx` (`bossFk`), - KEY `worker_FK` (`labelerFk__`), KEY `worker_FK_2` (`educationLevelFk`), KEY `worker_FK_1` (`originCountryFk`), KEY `worker_fk_editor` (`editorFk`), @@ -40929,25 +40267,25 @@ CREATE TABLE `workerDistributionCategory` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `workerDocument` +-- Table structure for table `workerDms` -- -DROP TABLE IF EXISTS `workerDocument`; +DROP TABLE IF EXISTS `workerDms`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `workerDocument` ( +CREATE TABLE `workerDms` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `worker` int(10) unsigned DEFAULT NULL, - `document` int(11) DEFAULT NULL, + `workerFk` int(10) unsigned DEFAULT NULL, + `dmsFk` int(11) DEFAULT NULL, `isReadableByWorker` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Indica si el empleado tiene permiso para acceder al documento', `editorFk` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), - KEY `workerDocument_ibfk_1` (`worker`), - KEY `workerDocument_ibfk_2` (`document`), + KEY `workerDocument_ibfk_1` (`workerFk`), + KEY `workerDocument_ibfk_2` (`dmsFk`), KEY `workerDocument_fk_editor` (`editorFk`), - CONSTRAINT `workerDocument_FK` FOREIGN KEY (`worker`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, - CONSTRAINT `workerDocument_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`), - CONSTRAINT `workerDocument_ibfk_2` FOREIGN KEY (`document`) REFERENCES `dms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `workerDms_ibfk_2` FOREIGN KEY (`dmsFk`) REFERENCES `dms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `workerDocument_FK` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, + CONSTRAINT `workerDocument_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -41111,6 +40449,7 @@ CREATE TABLE `workerLog` ( KEY `userFk_idx` (`userFk`), KEY `workerLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `workerLog_originFk` (`originFk`,`creationDate`), + KEY `workerLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `userFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -41613,9 +40952,10 @@ CREATE TABLE `zone` ( `isVolumetric` tinyint(1) NOT NULL DEFAULT 0, `inflation` decimal(5,2) NOT NULL DEFAULT 1.00, `m3Max` decimal(10,2) unsigned DEFAULT NULL, - `itemMaxSize` int(11) DEFAULT NULL COMMENT 'tamaño maximo de los articulos que esa ruta puede transportar', + `itemMaxSize` int(11) DEFAULT NULL COMMENT 'Altura maxima de los articulos que esa agencia puede transportar', `code` varchar(45) DEFAULT NULL, `editorFk` int(10) unsigned DEFAULT NULL, + `itemMaxLength` int(11) DEFAULT NULL COMMENT 'Longitud maxima para articulos acostados que esa agencia puede transportar', PRIMARY KEY (`id`), KEY `fk_zone_2_idx` (`agencyModeFk`), KEY `zone_name_idx` (`name`), @@ -41889,6 +41229,7 @@ CREATE TABLE `zoneLog` ( KEY `userFk` (`userFk`), KEY `zoneLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `zoneLog_originFk` (`originFk`,`creationDate`), + KEY `zoneLog_creationDate_IDX` (`creationDate` DESC) USING BTREE, CONSTRAINT `zoneLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -41931,7 +41272,7 @@ DELIMITER ;; /*!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 `claim_changeState` ON SCHEDULE EVERY 1 DAY STARTS '2024-06-06 07:52:46' ON COMPLETION PRESERVE ENABLE DO BEGIN +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `claim_changeState` ON SCHEDULE EVERY 1 DAY STARTS '2024-06-06 07:52:46' ON COMPLETION PRESERVE ENABLE DO BEGIN DECLARE vClaimState INT; @@ -41956,14 +41297,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 `client_unassignSalesPerson` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:30:00' ON COMPLETION PRESERVE ENABLE DO CALL client_unassignSalesPerson */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `client_unassignSalesPerson` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:30:00' ON COMPLETION PRESERVE ENABLE DO CALL client_unassignSalesPerson */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -41981,7 +41322,7 @@ DELIMITER ;; /*!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 `client_userDisable` ON SCHEDULE EVERY 1 MONTH STARTS '2023-06-01 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL client_userDisable() */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `client_userDisable` ON SCHEDULE EVERY 1 MONTH STARTS '2023-06-01 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL client_userDisable() */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -41992,14 +41333,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 = 'NO_ENGINE_SUBSTITUTION' */ ;; +/*!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 `collection_make` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-09-15 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.collection_make */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `collection_make` ON SCHEDULE EVERY 5 MINUTE STARTS '2022-09-15 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.collection_make */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42010,14 +41351,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 `department_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-11-15 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.department_doCalc */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `department_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-11-15 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.department_doCalc */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42028,14 +41369,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 `envialiaThreHoldChecker` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:52:46' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `envialiaThreHoldChecker` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-28 09:52:46' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN DECLARE vActualNumber BIGINT; DECLARE vEndRange BIGINT; DECLARE vIsAlreadyNotified BOOLEAN; @@ -42074,14 +41415,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 `greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in wrong greuges' DO CALL vn.greuge_notifyEvents() */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in wrong greuges' DO CALL vn.greuge_notifyEvents() */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42092,16 +41433,16 @@ 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 `itemImageQueue_check` ON SCHEDULE EVERY 1 HOUR STARTS '2023-07-28 00:00:00' ON COMPLETION PRESERVE ENABLE DO BEGIN - DELETE FROM itemImageQueue - WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig); +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `itemImageQueue_check` ON SCHEDULE EVERY 1 HOUR STARTS '2023-07-28 00:00:00' ON COMPLETION PRESERVE ENABLE DO BEGIN + DELETE FROM itemImageQueue + WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig); END */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; @@ -42120,7 +41461,7 @@ DELIMITER ;; /*!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 `itemShelvingSale_doReserve` ON SCHEDULE EVERY 15 SECOND STARTS '2023-10-16 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.itemShelvingSale_doReserve */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `itemShelvingSale_doReserve` ON SCHEDULE EVERY 15 SECOND STARTS '2023-10-16 00:00:00' ON COMPLETION PRESERVE ENABLE DO CALL vn.itemShelvingSale_doReserve */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42131,14 +41472,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 `mysqlConnectionsSorter_kill` ON SCHEDULE EVERY 1 MINUTE STARTS '2021-10-28 09:56:27' ON COMPLETION NOT PRESERVE ENABLE DO CALL mysqlConnectionsSorter_kill() */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `mysqlConnectionsSorter_kill` ON SCHEDULE EVERY 1 MINUTE STARTS '2021-10-28 09:56:27' ON COMPLETION NOT PRESERVE ENABLE DO CALL mysqlConnectionsSorter_kill() */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42149,14 +41490,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 `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2022-01-28 09:52:46' ON COMPLETION PRESERVE ENABLE DO BEGIN +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2022-01-28 09:52:46' ON COMPLETION PRESERVE ENABLE DO BEGIN DECLARE vCurrentCount INT; DECLARE vCheckSum INT; @@ -42167,14 +41508,7 @@ DELIMITER ;; DECLARE vPrintQueueLimit INT; DECLARE vCur CURSOR FOR - SELECT CONCAT(' - ', IFNULL(pq.id, ''), ' - ', IFNULL(p.path, ''),' - ', IFNULL(r.name, ''),' - ', IFNULL(pq.statusCode, ''),' - ', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),' - ', IFNULL(pq.`error`, ''),' - ') + SELECT CONCAT('\n\t\t\t\t\t\t\t', IFNULL(pq.id, ''), '\n\t\t\t\t\t\t\t', IFNULL(p.path, ''),'\n\t\t\t\t\t\t\t', IFNULL(r.name, ''),'\n\t\t\t\t\t\t\t', IFNULL(pq.statusCode, ''),'\n\t\t\t\t\t\t\t', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),'\n\t\t\t\t\t\t\t', IFNULL(pq.`error`, ''),'\n\t\t\t\t\t\t') FROM printQueue pq LEFT JOIN worker w ON w.id = pq.workerFk LEFT JOIN printer p ON p.id = pq.printerFk @@ -42199,15 +41533,7 @@ DELIMITER ;; vIsAlreadyNotified = FALSE AND vCurrentCount > 0 THEN - SELECT ' - - - - - - - - ' INTO vTableQueue; + SELECT '
Id ColaRuta ImpresoraInformeEstadoTrabajadorError
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t' INTO vTableQueue; OPEN vCur; @@ -42265,7 +41591,7 @@ DELIMITER ;; /*!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 `raidUpdate` ON SCHEDULE EVERY 1 DAY STARTS '2017-12-29 00:05:00' ON COMPLETION PRESERVE ENABLE DO CALL raidUpdate */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `raidUpdate` ON SCHEDULE EVERY 1 DAY STARTS '2017-12-29 00:05:00' ON COMPLETION PRESERVE ENABLE DO CALL raidUpdate */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42276,14 +41602,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 `route_doRecalc` ON SCHEDULE EVERY 10 SECOND STARTS '2021-07-08 07:32:23' ON COMPLETION PRESERVE ENABLE DO CALL route_doRecalc */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `route_doRecalc` ON SCHEDULE EVERY 10 SECOND STARTS '2021-07-08 07:32:23' ON COMPLETION PRESERVE ENABLE DO CALL route_doRecalc */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42301,7 +41627,7 @@ DELIMITER ;; /*!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 +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`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(); @@ -42316,14 +41642,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 `vehicle_notify` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in vehicles that are about t' DO CALL vn.vehicle_notifyEvents */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `vehicle_notify` ON SCHEDULE EVERY 1 DAY STARTS '2022-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in vehicles that are about t' DO CALL vn.vehicle_notifyEvents */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42334,14 +41660,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 `workerJourney_doRecalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-22 04:00:00' ON COMPLETION PRESERVE ENABLE DO CALL workerJourney_replace(util.VN_CURDATE() - INTERVAL 1 WEEK, util.VN_CURDATE(), NULL) */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `workerJourney_doRecalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-22 04:00:00' ON COMPLETION PRESERVE ENABLE DO CALL workerJourney_replace(util.VN_CURDATE() - INTERVAL 1 WEEK, util.VN_CURDATE(), NULL) */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42352,14 +41678,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 `worker_updateChangedBusiness` ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:05' ON COMPLETION NOT PRESERVE ENABLE DO CALL worker_updateChangedBusiness */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `worker_updateChangedBusiness` ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:05' ON COMPLETION NOT PRESERVE ENABLE DO CALL worker_updateChangedBusiness */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42388,14 +41714,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 `zoneGeo_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-09-13 15:30:47' ON COMPLETION PRESERVE ENABLE DO CALL vn.zoneGeo_doCalc */ ;; +/*!50106 CREATE*/ /*!50117 DEFINER=`vn`@`localhost`*/ /*!50106 EVENT `zoneGeo_doCalc` ON SCHEDULE EVERY 15 SECOND STARTS '2019-09-13 15:30:47' ON COMPLETION PRESERVE ENABLE DO CALL vn.zoneGeo_doCalc */ ;; /*!50003 SET time_zone = @saved_time_zone */ ;; /*!50003 SET sql_mode = @saved_sql_mode */ ;; /*!50003 SET character_set_client = @saved_cs_client */ ;; @@ -42417,7 +41743,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `addressTaxArea`(vAddresId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `addressTaxArea`(vAddresId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** @@ -42459,7 +41785,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `address_getGeo`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `address_getGeo`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -42486,16 +41812,16 @@ 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 FUNCTION IF EXISTS `barcodeToItem` */; /*!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_general_ci */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `barcodeToItem`(vBarcode VARCHAR(22)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `barcodeToItem`(vBarcode VARCHAR(22)) RETURNS int(11) DETERMINISTIC BEGIN @@ -42549,16 +41875,16 @@ 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 FUNCTION IF EXISTS `buy_getUnitVolume` */; /*!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` FUNCTION `buy_getUnitVolume`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `buy_getUnitVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -42593,7 +41919,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `buy_getVolume`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `buy_getVolume`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -42626,7 +41952,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `catalog_componentReverse`(vWarehouse INT, +CREATE DEFINER=`vn`@`localhost` FUNCTION `catalog_componentReverse`(vWarehouse INT, vCost DECIMAL(10,3), vM3 DECIMAL(10,3), vAddressFk INT, @@ -42733,7 +42059,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `clientGetMana`(vClient INT) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `clientGetMana`(vClient INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN /** @@ -42773,7 +42099,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `clientGetSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `clientGetSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -42796,7 +42122,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `clientTaxArea`(vClientId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `clientTaxArea`(vClientId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci READS SQL DATA BEGIN /** @@ -42831,7 +42157,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getDebt`(`vClient` INT, `vDate` DATE) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getDebt`(`vClient` INT, `vDate` DATE) RETURNS decimal(10,2) READS SQL DATA BEGIN /** @@ -42880,7 +42206,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getFromPhone`(vPhone VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -42933,7 +42259,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -43019,7 +42345,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonByTicket`(vTicketFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getSalesPersonByTicket`(vTicketFk INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -43054,7 +42380,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonCode`(vClientFk INT, vDated DATE) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getSalesPersonCode`(vClientFk INT, vDated DATE) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** @@ -43092,7 +42418,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonCodeByTicket`(vTicketFk INT) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_getSalesPersonCodeByTicket`(vTicketFk INT) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN /** @@ -43127,7 +42453,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `client_hasDifferentCountries`(vClientFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `client_hasDifferentCountries`(vClientFk INT) RETURNS tinyint(1) READS SQL DATA BEGIN /** @@ -43159,7 +42485,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `collection_isPacked`(vSelf INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `collection_isPacked`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** @@ -43193,7 +42519,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `currency_getCommission`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `currency_getCommission`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -43228,7 +42554,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `currentRate`(vCurrencyFk INT, vDated DATE) RETURNS decimal(10,4) +CREATE DEFINER=`vn`@`localhost` FUNCTION `currentRate`(vCurrencyFk INT, vDated DATE) RETURNS decimal(10,4) READS SQL DATA BEGIN @@ -43259,7 +42585,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) RETURNS tinyint(1) DETERMINISTIC BEGIN /* @@ -43300,7 +42626,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) RETURNS decimal(5,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) RETURNS decimal(5,2) DETERMINISTIC BEGIN /** @@ -43335,7 +42661,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ekt_getEntry`(vEktFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ekt_getEntry`(vEktFk INT) RETURNS int(11) READS SQL DATA BEGIN /** @@ -43417,7 +42743,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) RETURNS int(11) READS SQL DATA BEGIN /** @@ -43473,7 +42799,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `entry_getCommission`(vTravelFk INT, +CREATE DEFINER=`vn`@`localhost` FUNCTION `entry_getCommission`(vTravelFk INT, vCurrencyFk INT, vSupplierFk INT ) RETURNS int(11) @@ -43542,7 +42868,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `entry_getCurrency`(vCurrency INT, +CREATE DEFINER=`vn`@`localhost` FUNCTION `entry_getCurrency`(vCurrency INT, vSupplierFk INT ) RETURNS int(11) READS SQL DATA @@ -43565,81 +42891,6 @@ 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 FUNCTION IF EXISTS `entry_getForLogiflora` */; -/*!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 `entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) - READS SQL DATA -BEGIN - - /** - * Devuelve una entrada para Logiflora. Si no existe la crea. - * - * @param vLanded Fecha de llegada al almacén - * @param vWarehouseFk Identificador de vn.warehouse - */ - - DECLARE vTravelFk INT; - DECLARE vEntryFk INT; - DECLARE previousEntryFk INT; - - SET vTravelFk = vn.travel_getForLogiflora(vLanded, vWarehouseFk); - - IF vLanded THEN - - SELECT IFNULL(MAX(id),0) INTO vEntryFk - FROM vn.entry - WHERE travelFk = vTravelFk - AND isRaid; - - IF NOT vEntryFk THEN - - INSERT INTO vn.entry(travelFk, supplierFk, commission, companyFk, currencyFk, isRaid) - SELECT vTravelFk, s.id, 4, c.id, cu.id, TRUE - FROM vn.supplier s - JOIN vn.company c ON c.code = 'VNL' - JOIN vn.currency cu ON cu.code = 'EUR' - WHERE s.name = 'KONINKLIJE COOPERATIEVE BLOEMENVEILING FLORAHOLLAN'; - - SELECT MAX(id) INTO vEntryFk - FROM vn.entry - WHERE travelFk = vTravelFk; - - END IF; - - END IF; - - SELECT entryFk INTO previousEntryFk - FROM edi.warehouseFloramondo wf - WHERE wf.warehouseFk = vWarehouseFk; - - IF IFNULL(previousEntryFk,0) != vEntryFk THEN - - UPDATE buy b - SET b.printedStickers = 0 - WHERE entryFk = previousEntryFk; - - DELETE FROM buy WHERE entryFk = previousEntryFk; - - DELETE FROM entry WHERE id = previousEntryFk; - - END IF; - - RETURN vEntryFk; - -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 `entry_isIntrastat` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -43648,7 +42899,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `entry_isIntrastat`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `entry_isIntrastat`(vSelf INT) RETURNS int(11) READS SQL DATA BEGIN /** @@ -43698,7 +42949,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `entry_isInventoryOrPrevious`(vSelf INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `entry_isInventoryOrPrevious`(vSelf INT) RETURNS int(11) DETERMINISTIC BEGIN DECLARE vIsInventoryOrPrevious BOOL; @@ -43728,7 +42979,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** @@ -43772,7 +43023,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `firstDayOfWeek`(vYear INT, vWeek INT) RETURNS date +CREATE DEFINER=`vn`@`localhost` FUNCTION `firstDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN /** @@ -43808,7 +43059,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getAlert3State`(vTicket INT) RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `getAlert3State`(vTicket INT) RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci READS SQL DATA BEGIN DECLARE vDeliveryType INTEGER DEFAULT 0; @@ -43858,7 +43109,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getDueDate`(vDated DATE, vDayToPay INT) RETURNS date +CREATE DEFINER=`vn`@`localhost` FUNCTION `getDueDate`(vDated DATE, vDayToPay INT) RETURNS date NO SQL BEGIN DECLARE vDued DATE; @@ -43886,10 +43137,10 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getInventoryDate`() RETURNS date +CREATE DEFINER=`vn`@`localhost` FUNCTION `getInventoryDate`() RETURNS date DETERMINISTIC -BEGIN - RETURN (SELECT inventoried FROM config LIMIT 1); +BEGIN + RETURN (SELECT inventoried FROM config LIMIT 1); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -43906,7 +43157,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getNewItemId`() RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getNewItemId`() RETURNS int(11) READS SQL DATA BEGIN DECLARE newItemId INT; @@ -43935,7 +43186,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) RETURNS date +CREATE DEFINER=`vn`@`localhost` FUNCTION `getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) RETURNS date NO SQL BEGIN @@ -43977,7 +43228,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getShipmentHour`(vTicket INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getShipmentHour`(vTicket INT) RETURNS int(11) READS SQL DATA BEGIN DECLARE vShipmentHour INT; @@ -44022,7 +43273,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getSpecialPrice`(vItemFk int(11),vClientFk int(11)) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getSpecialPrice`(vItemFk int(11),vClientFk int(11)) RETURNS decimal(10,2) READS SQL DATA BEGIN DECLARE price DECIMAL(10,2); @@ -44056,7 +43307,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getTicketTrolleyLabelCount`(vTicket INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getTicketTrolleyLabelCount`(vTicket INT) RETURNS int(11) READS SQL DATA BEGIN DECLARE vLabelCount INT DEFAULT 0; @@ -44087,7 +43338,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getUser`() RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getUser`() RETURNS int(11) DETERMINISTIC BEGIN /** @@ -44110,7 +43361,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `getUserId`(userName varchar(30)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `getUserId`(userName varchar(30)) RETURNS int(11) READS SQL DATA BEGIN DECLARE vUser INT; @@ -44128,16 +43379,16 @@ 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 FUNCTION IF EXISTS `hasAnyNegativeBase` */; /*!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` FUNCTION `hasAnyNegativeBase`() RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `hasAnyNegativeBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -44170,16 +43421,16 @@ 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 FUNCTION IF EXISTS `hasAnyPositiveBase` */; /*!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` FUNCTION `hasAnyPositiveBase`() RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `hasAnyPositiveBase`() RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -44221,7 +43472,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `hasItemsInSector`(vTicketFk INT, vSectorFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `hasItemsInSector`(vTicketFk INT, vSectorFk INT) RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -44253,7 +43504,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `hasSomeNegativeBase`(vTicket INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `hasSomeNegativeBase`(vTicket INT) RETURNS tinyint(1) READS SQL DATA BEGIN DECLARE vCountry INT; @@ -44294,7 +43545,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `intrastat_estimateNet`(vSelf INT, +CREATE DEFINER=`vn`@`localhost` FUNCTION `intrastat_estimateNet`(vSelf INT, vStems INT ) RETURNS double DETERMINISTIC @@ -44337,7 +43588,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOutAmount`(vInvoiceRef VARCHAR(15)) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `invoiceOutAmount`(vInvoiceRef VARCHAR(15)) RETURNS decimal(10,2) READS SQL DATA BEGIN DECLARE totalAmount DECIMAL(10,2); @@ -44363,16 +43614,16 @@ 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 FUNCTION IF EXISTS `invoiceOut_getMaxIssued` */; /*!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` FUNCTION `invoiceOut_getMaxIssued`(vSerial VARCHAR(2), +CREATE DEFINER=`vn`@`localhost` FUNCTION `invoiceOut_getMaxIssued`(vSerial VARCHAR(2), vCompanyFk INT, vYear INT ) RETURNS date @@ -44415,7 +43666,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOut_getPath`(vSelf INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `invoiceOut_getPath`(vSelf INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN DECLARE vIssued DATE; @@ -44439,16 +43690,16 @@ 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 FUNCTION IF EXISTS `invoiceOut_getWeight` */; /*!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` FUNCTION `invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) +CREATE DEFINER=`vn`@`localhost` FUNCTION `invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) ) RETURNS decimal(10,2) READS SQL DATA BEGIN @@ -44489,19 +43740,23 @@ 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(15)) RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`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 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 @@ -44512,9 +43767,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 ;; @@ -44533,7 +43794,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `isLogifloraDay`(vShipped DATE, vWarehouse INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `isLogifloraDay`(vShipped DATE, vWarehouse INT) RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -44564,7 +43825,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) RETURNS int(11) DETERMINISTIC BEGIN @@ -44617,7 +43878,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) RETURNS int(11) READS SQL DATA BEGIN @@ -44661,7 +43922,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `itemsInSector_get`(vTicketFk INT, vSectorFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `itemsInSector_get`(vTicketFk INT, vSectorFk INT) RETURNS int(11) READS SQL DATA BEGIN @@ -44693,7 +43954,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `itemTag_getIntValue`(vValue VARCHAR(255)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `itemTag_getIntValue`(vValue VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN IF vValue NOT REGEXP '^-?[0-9]+' THEN @@ -44717,7 +43978,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `item_getFhImage`(itemFk INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `item_getFhImage`(itemFk INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN DECLARE vImageUrl VARCHAR(255); @@ -44746,7 +44007,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `item_getPackage`(vItemFk INT) RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `item_getPackage`(vItemFk INT) RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN @@ -44788,7 +44049,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -44827,7 +44088,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `lastDayOfWeek`(vYear INT, vWeek INT) RETURNS date +CREATE DEFINER=`vn`@`localhost` FUNCTION `lastDayOfWeek`(vYear INT, vWeek INT) RETURNS date DETERMINISTIC BEGIN /** @@ -44863,7 +44124,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `machine_checkPlate`(vPlate VARCHAR(10)) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `machine_checkPlate`(vPlate VARCHAR(10)) RETURNS tinyint(1) READS SQL DATA BEGIN /** @@ -44898,7 +44159,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) READS SQL DATA BEGIN DECLARE result INT; @@ -44924,7 +44185,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11) DETERMINISTIC BEGIN @@ -44981,26 +44242,6 @@ 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 FUNCTION IF EXISTS `MIDNIGHT` */; -/*!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 `MIDNIGHT`(vDate DATE) RETURNS datetime - DETERMINISTIC -BEGIN - RETURN TIMESTAMP(vDate,'23:59:59'); -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 `orderTotalVolume` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -45009,7 +44250,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `orderTotalVolume`(vOrderId INT) RETURNS decimal(10,3) +CREATE DEFINER=`vn`@`localhost` FUNCTION `orderTotalVolume`(vOrderId INT) RETURNS decimal(10,3) READS SQL DATA BEGIN -- Devuelte el volumen total de la orden sumada @@ -45040,7 +44281,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `orderTotalVolumeBoxes`(vOrderId INT) RETURNS decimal(10,3) +CREATE DEFINER=`vn`@`localhost` FUNCTION `orderTotalVolumeBoxes`(vOrderId INT) RETURNS decimal(10,3) READS SQL DATA BEGIN /** @@ -45076,7 +44317,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `packaging_calculate`(isPackageReturnable TINYINT(1), +CREATE DEFINER=`vn`@`localhost` FUNCTION `packaging_calculate`(isPackageReturnable TINYINT(1), packagingReturnFk INT(11), base DECIMAL(10,2), price DECIMAL(10,2), @@ -45115,7 +44356,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) RETURNS double +CREATE DEFINER=`vn`@`localhost` FUNCTION `priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) RETURNS double BEGIN DECLARE vWarehouse INT; @@ -45147,7 +44388,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `routeProposal`(vTicketFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `routeProposal`(vTicketFk INT) RETURNS int(11) READS SQL DATA BEGIN @@ -45205,47 +44446,6 @@ 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 FUNCTION IF EXISTS `routeProposal_` */; -/*!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 `routeProposal_`(vTicketFk INT) RETURNS int(11) - READS SQL DATA -BEGIN - - DECLARE vRouteFk INT; - DECLARE vAddressFk INT; - DECLARE vShipped DATETIME; - - SELECT addressFk, date(shipped) INTO vAddressFk, vShipped - FROM vn.ticket - WHERE id = vTicketFk; - - SELECT routeFk INTO vRouteFk - FROM - (SELECT t.routeFk, sum(af.friendship) friendshipSum - FROM vn.ticket t - JOIN cache.addressFriendship af ON af.addressFk2 = t.addressFk AND af.addressFk1 = vAddressFk - WHERE t.shipped BETWEEN vShipped and MIDNIGHT(vShipped) - AND t.routeFk - GROUP BY routeFk - ORDER BY friendshipSum DESC - ) sub - LIMIT 1; - - RETURN vRouteFk; -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 `routeProposal_beta` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -45254,7 +44454,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `routeProposal_beta`(vTicketFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `routeProposal_beta`(vTicketFk INT) RETURNS int(11) READS SQL DATA BEGIN @@ -45320,7 +44520,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `sale_hasComponentLack`(vSelf INT +CREATE DEFINER=`vn`@`localhost` FUNCTION `sale_hasComponentLack`(vSelf INT ) RETURNS tinyint(1) READS SQL DATA BEGIN @@ -45360,7 +44560,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `sectorCollection_hasSalesReserved`(vSelf INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `sectorCollection_hasSalesReserved`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** @@ -45398,7 +44598,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `specie_IsForbidden`(vItemFk INT, vAddressFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `specie_IsForbidden`(vItemFk INT, vAddressFk INT) RETURNS tinyint(1) READS SQL DATA BEGIN @@ -45437,7 +44637,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `testCIF`(vCIF VARCHAR(9)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `testCIF`(vCIF VARCHAR(9)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN @@ -45522,7 +44722,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `testNIE`(vNIE VARCHAR(9)) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `testNIE`(vNIE VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -45589,7 +44789,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `testNIF`(vNIF VARCHAR(9)) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `testNIF`(vNIF VARCHAR(9)) RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -45630,7 +44830,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketCollection_getNoPacked`(vCollectionFk INT) RETURNS varchar(100) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketCollection_getNoPacked`(vCollectionFk INT) RETURNS varchar(100) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN @@ -45669,7 +44869,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketGetTotal`(vTicketId INT) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketGetTotal`(vTicketId INT) RETURNS decimal(10,2) READS SQL DATA DETERMINISTIC BEGIN @@ -45712,7 +44912,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketPositionInPath`(vTicketId INT) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketPositionInPath`(vTicketId INT) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_general_ci DETERMINISTIC BEGIN @@ -45803,7 +45003,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketSplitCounter`(vTicketFk INT) RETURNS varchar(15) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketSplitCounter`(vTicketFk INT) RETURNS varchar(15) CHARSET utf8mb3 COLLATE utf8mb3_general_ci READS SQL DATA BEGIN DECLARE vSplitCounter VARCHAR(15); @@ -45835,7 +45035,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketTotalVolume`(vTicketId INT) RETURNS decimal(10,3) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketTotalVolume`(vTicketId INT) RETURNS decimal(10,3) READS SQL DATA BEGIN -- Devuelte el volumen total del ticket sumado @@ -45863,7 +45063,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketTotalVolumeBoxes`(vTicketId INT) RETURNS decimal(10,1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketTotalVolumeBoxes`(vTicketId INT) RETURNS decimal(10,1) DETERMINISTIC BEGIN @@ -45900,7 +45100,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticketWarehouseGet`(vTicketFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticketWarehouseGet`(vTicketFk INT) RETURNS int(11) READS SQL DATA BEGIN DECLARE vWarehouseFk INT; @@ -45926,7 +45126,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_CC_volume`(vTicketFk INT) RETURNS decimal(10,1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_CC_volume`(vTicketFk INT) RETURNS decimal(10,1) READS SQL DATA BEGIN @@ -45959,7 +45159,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_get`(vParamFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_get`(vParamFk INT) RETURNS int(11) READS SQL DATA BEGIN /** @@ -46014,7 +45214,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_getFreightCost`(vTicketFk INT) RETURNS decimal(10,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_getFreightCost`(vTicketFk INT) RETURNS decimal(10,2) DETERMINISTIC BEGIN /** @@ -46054,7 +45254,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_getWeight`(vTicketFk INT) RETURNS decimal(10,3) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_getWeight`(vTicketFk INT) RETURNS decimal(10,3) READS SQL DATA BEGIN /** @@ -46087,7 +45287,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_HasUbication`(vTicketFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_HasUbication`(vTicketFk INT) RETURNS tinyint(1) READS SQL DATA BEGIN @@ -46117,7 +45317,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_isOutClosureZone`(vSelf INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_isOutClosureZone`(vSelf INT) RETURNS tinyint(1) DETERMINISTIC BEGIN /** @@ -46152,7 +45352,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_isProblemCalcNeeded`(vSelf INT +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_isProblemCalcNeeded`(vSelf INT ) RETURNS tinyint(1) DETERMINISTIC BEGIN @@ -46190,7 +45390,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_isTooLittle`(vSelf INT +CREATE DEFINER=`vn`@`localhost` FUNCTION `ticket_isTooLittle`(vSelf INT ) RETURNS tinyint(1) READS SQL DATA BEGIN @@ -46324,7 +45524,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci READS SQL DATA BEGIN /** @@ -46400,7 +45600,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `time_getSalesYear`(vMonth INT, vYear INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `time_getSalesYear`(vMonth INT, vYear INT) RETURNS int(11) DETERMINISTIC BEGIN DECLARE vSalesYear INT; @@ -46409,69 +45609,6 @@ FROM `time` WHERE `month` = vMonth AND `year` = vYear LIMIT 1; RETURN vSalesYear; -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 `travel_getForLogiflora` */; -/*!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 `travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11) - READS SQL DATA -BEGIN - - /** - * Devuelve un número de travel para compras de Logiflora a partir de la fecha de llegada y del almacén. - * Si no existe lo genera. - * - * @param vLanded Fecha de llegada al almacén - * @param vWarehouseFk Identificador de vn.warehouse - */ - - DECLARE vTravelFk INT; - - IF vLanded THEN - - SELECT IFNULL(MAX(tr.id),0) INTO vTravelFk - FROM vn.travel tr - JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk - JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk - JOIN vn.agencyMode am ON am.id = tr.agencyModeFk - WHERE wIn.id = vWarehouseFk - AND wOut.name = 'Holanda' - AND am.name = 'LOGIFLORA' - AND landed = vLanded; - - IF NOT vTravelFk THEN - - INSERT INTO vn.travel(landed, shipped, warehouseInFk, warehouseOutFk, agencyModeFk) - SELECT vLanded, util.VN_CURDATE(), vWarehouseFk, wOut.id, am.id - FROM vn.warehouse wOut - JOIN vn.agencyMode am ON am.name = 'LOGIFLORA' - WHERE wOut.name = 'Holanda'; - - SELECT MAX(tr.id) INTO vTravelFk - FROM vn.travel tr - JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk - JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk - WHERE wIn.id = vWarehouseFk - AND wOut.name = 'Holanda' - AND landed = vLanded; - END IF; - - END IF; - - RETURN vTravelFk; - END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -46488,7 +45625,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `travel_hasUniqueAwb`(vSelf INT +CREATE DEFINER=`vn`@`localhost` FUNCTION `travel_hasUniqueAwb`(vSelf INT ) RETURNS tinyint(1) READS SQL DATA BEGIN @@ -46527,7 +45664,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `validationCode`(vString VARCHAR(255)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `validationCode`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN @@ -46568,7 +45705,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `validationCode_beta`(vString VARCHAR(255)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `validationCode_beta`(vString VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN @@ -46609,7 +45746,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) RETURNS tinyint(1) READS SQL DATA BEGIN /** @@ -46643,7 +45780,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) RETURNS decimal(5,2) +CREATE DEFINER=`vn`@`localhost` FUNCTION `workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) RETURNS decimal(5,2) READS SQL DATA BEGIN /** @@ -46682,7 +45819,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `worker_getCode`() RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci +CREATE DEFINER=`vn`@`localhost` FUNCTION `worker_getCode`() RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci READS SQL DATA BEGIN DECLARE vUserCode VARCHAR(3) CHARSET utf8 COLLATE utf8_unicode_ci; @@ -46708,7 +45845,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `worker_isBoss`(vUserId INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `worker_isBoss`(vUserId INT) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -46767,7 +45904,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `worker_isInDepartment`(vDepartmentCode VARCHAR(255)) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `worker_isInDepartment`(vDepartmentCode VARCHAR(255)) RETURNS int(11) DETERMINISTIC BEGIN /** @@ -46806,7 +45943,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `worker_isWorking`(vWorkerFk INT) RETURNS tinyint(1) +CREATE DEFINER=`vn`@`localhost` FUNCTION `worker_isWorking`(vWorkerFk INT) RETURNS tinyint(1) READS SQL DATA BEGIN /** @@ -46845,7 +45982,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` FUNCTION `zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) RETURNS int(11) +CREATE DEFINER=`vn`@`localhost` FUNCTION `zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) RETURNS int(11) NO SQL BEGIN /** @@ -46885,7 +46022,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `absoluteInventoryHistory`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `absoluteInventoryHistory`( vItemFk INT, vWarehouseFk INT, vDate DATETIME @@ -47000,7 +46137,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `addAccountReconciliation`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `addAccountReconciliation`() BEGIN /** * Updates duplicate records in the accountReconciliation table, @@ -47079,7 +46216,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `addNoteFromDelivery`(idTicket INT,nota TEXT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `addNoteFromDelivery`(idTicket INT,nota TEXT) BEGIN DECLARE observationTypeFk INT DEFAULT 3; /*3 = REPARTIDOR*/ @@ -47105,7 +46242,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `addressTaxArea`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `addressTaxArea`() READS SQL DATA BEGIN /** @@ -47156,7 +46293,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `address_updateCoordinates`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `address_updateCoordinates`( vTicketFk INT, vLongitude DECIMAL(11,7), vLatitude DECIMAL(11,7)) @@ -47194,7 +46331,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetFirstShipped @@ -47242,7 +46379,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetLanded @@ -47292,7 +46429,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT) BEGIN /** * DEPRECATED usar zoneGetWarehouse @@ -47383,7 +46520,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT) BEGIN /* * DEPRECATED usar zoneGetShipped */ @@ -47409,7 +46546,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyVolume`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `agencyVolume`() BEGIN /** * Calculates and presents information on shipment and packaging volumes @@ -47460,7 +46597,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `available_calc`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `available_calc`( vDate DATE, vAddress INT, vAgencyMode INT) @@ -47530,7 +46667,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `available_traslate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `available_traslate`( vWarehouseLanding INT, vDated DATE, vWarehouseShipment INT) @@ -47681,7 +46818,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `balanceNestTree_addChild`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `balanceNestTree_addChild`( vSelf INT, vName VARCHAR(45) ) @@ -47746,7 +46883,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `balanceNestTree_delete`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `balanceNestTree_delete`( vSelf INT ) BEGIN @@ -47812,7 +46949,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `balanceNestTree_move`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `balanceNestTree_move`( vSelf INT, vFather INT ) @@ -47942,7 +47079,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `balance_create`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `balance_create`( vStartingMonth INT, vEndingMonth INT, vCompany INT, @@ -48173,7 +47310,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `bankEntity_checkBic`(vBic VARCHAR(255)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `bankEntity_checkBic`(vBic VARCHAR(255)) BEGIN /** * If the bic length is Incorrect throw exception @@ -48205,7 +47342,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `bankPolicy_notifyExpired`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `bankPolicy_notifyExpired`() BEGIN /** * @@ -48230,70 +47367,6 @@ 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 `buyUltimate` */; -/*!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 `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 ; -/*!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 `buyUltimateFromInterval` */; -/*!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 `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 ; -/*!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_afterUpsert` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -48302,7 +47375,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_afterUpsert`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_afterUpsert`( vSelf INT ) BEGIN @@ -48401,7 +47474,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_checkGrouping`(vGrouping INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_checkGrouping`(vGrouping INT) BEGIN /** * Checks the buy grouping, throws an error if it's invalid. @@ -48428,16 +47501,17 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_checkItem`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_checkItem`() BEGIN /** * Checks if the item has weightByPiece or size null on any buy. * * @param tmp.buysToCheck(id as INT). */ - DECLARE hasVolumetricAgency INT; + DECLARE vHasVolumetricAgency INT; + DECLARE vItemFk INT; - SELECT a.hasWeightVolumetric INTO hasVolumetricAgency + SELECT a.hasWeightVolumetric, i.id INTO vHasVolumetricAgency, vItemFk FROM entry e JOIN travel t ON t.id = e.travelFk JOIN agencyMode a ON a.id = t.agencyModeFk @@ -48448,11 +47522,11 @@ BEGIN AND a.hasWeightVolumetric LIMIT 1; - DROP TEMPORARY TABLE tmp.buysToCheck; + DROP TEMPORARY TABLE tmp.buysToCheck; - IF hasVolumetricAgency THEN - CALL util.throw('Item lacks size/weight in purchase line at agency'); - END IF; + IF vHasVolumetricAgency THEN + CALL util.throw(CONCAT('Missing size/weight in buy line at agency, item: ', vItemFk)); + END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -48469,7 +47543,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_clone`(vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_clone`(vEntryFk INT) BEGIN /** * Clone buys to an entry @@ -48539,7 +47613,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getSplit`(vSelf INT, vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getSplit`(vSelf INT, vDated DATE) BEGIN /** * Devuelve tantos registros como etiquetas se necesitan para cada uno de los cubos o cajas de @@ -48680,7 +47754,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getUltimate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getUltimate`( vItemFk INT, vWarehouseFk SMALLINT, vDated DATE @@ -48740,7 +47814,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getUltimateFromInterval`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getUltimateFromInterval`( vItemFk INT, vWarehouseFk SMALLINT, vStarted DATE, @@ -48919,16 +47993,16 @@ 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 `buy_getVolume` */; /*!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 `buy_getVolume`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getVolume`() BEGIN /** * Cálculo de volumen en líneas de compra @@ -48962,7 +48036,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; @@ -48995,7 +48069,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getVolumeByEntry`(vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_getVolumeByEntry`(vEntryFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.buy; @@ -49026,55 +48100,62 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPrices`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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; - 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) + WHERE tr.landed = vLanded + AND tr.warehouseInFk = vWarehouseFk; + + DROP TEMPORARY TABLE tmp.rate; + END LOOP; + CLOSE vTravels; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -49091,7 +48172,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByAwb`(IN awbFk varchar(18)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_recalcPricesByAwb`(IN awbFk varchar(18)) BEGIN /** * inserta en tmp.buyRecalc las compras de un awb @@ -49127,7 +48208,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByBuy`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_recalcPricesByBuy`( vBuyFk INT(11) ) BEGIN @@ -49160,7 +48241,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByEntry`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_recalcPricesByEntry`( vEntryFk INT(11) ) BEGIN @@ -49195,7 +48276,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_scan`(vBarcode VARCHAR(512)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_scan`(vBarcode VARCHAR(512)) BEGIN /** * Busca compras a partir de un código de barras de subasta, las marca como @@ -49247,7 +48328,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updateGrouping`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_updateGrouping`( vWarehouseFk INT, vItemFk INT, vGrouping INT @@ -49285,7 +48366,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing @@ -49320,7 +48401,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_calcFromItem`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `catalog_calcFromItem`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, @@ -49359,7 +48440,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_calculate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `catalog_calculate`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, @@ -49486,7 +48567,10 @@ BEGIN AND a.available > 0 AND (sub.itemAllowed OR NOT it.isFloramondo OR anr.available > 0) AND (ag.isAnyVolumeAllowed OR NOT itt.isUnconventionalSize) - AND (itc.isReclining OR it.`size` IS NULL OR it.`size` < z.itemMaxSize OR z.itemMaxSize IS NULL) + AND (it.`size` IS NULL + OR IF(itc.isReclining, + it.size <= z.itemMaxLength OR z.itemMaxLength IS NULL, + it.size <= z.itemMaxSize OR z.itemMaxSize IS NULL)) AND cit.id IS NULL AND zit.id IS NULL AND ait.id IS NULL; @@ -49578,7 +48662,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentCalculate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `catalog_componentCalculate`( vZoneFk INT, vAddressFk INT, vShipped DATE, @@ -49586,7 +48670,7 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentCalculate`( ) BEGIN /** - * Calcula los componentes de los articulos de tmp.ticketLot + * Calcula los componentes de los articulos de la tabla tmp.ticketLot * * @param vZoneFk para calcular el transporte * @param vAddressFk Consignatario @@ -49604,18 +48688,41 @@ BEGIN FROM address WHERE id = vAddressFk; - CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice + CREATE OR REPLACE TEMPORARY TABLE tPriceDelta (INDEX (itemFk)) - ENGINE = MEMORY - SELECT * FROM ( + ENGINE = MEMORY + SELECT i.id itemFk, + SUM(IFNULL(pd.absIncreasing,0)) absIncreasing, + SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing, + pd.warehouseFk + FROM item i + JOIN priceDelta pd + ON pd.itemTypeFk = i.typeFk + AND (pd.minSize IS NULL OR pd.minSize <= i.`size`) + AND (pd.maxSize IS NULL OR pd.maxSize >= i.`size`) + AND (pd.inkFk IS NULL OR pd.inkFk = i.inkFk) + AND (pd.originFk IS NULL OR pd.originFk = i.originFk) + AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk) + AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk) + LEFT JOIN zoneGeo zg ON zg.id = pd.zoneGeoFk + LEFT JOIN zoneGeo zg2 ON zg2.id = address_getGeo(vAddressFk) + WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped) + AND (pd.toDated IS NULL OR pd.toDated >= vShipped) + AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt) + GROUP BY itemFk; + + CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice + (INDEX (itemFk)) + ENGINE = MEMORY + SELECT * FROM ( SELECT * - FROM specialPrice - WHERE (clientFk = vClientFk OR clientFk IS NULL) - AND started <= vShipped - AND (ended >= vShipped OR ended IS NULL) - ORDER BY (clientFk = vClientFk) DESC, id DESC - LIMIT 10000000000000000000) t - GROUP BY itemFk; + FROM specialPrice + WHERE (clientFk = vClientFk OR clientFk IS NULL) + AND started <= vShipped + AND (ended >= vShipped OR ended IS NULL) + ORDER BY (clientFk = vClientFk) DESC, id DESC + LIMIT 10000000000000000000) t + GROUP BY itemFk; CREATE OR REPLACE TEMPORARY TABLE tmp.ticketComponentCalculate (PRIMARY KEY (itemFk, warehouseFk)) @@ -49687,6 +48794,19 @@ BEGIN JOIN tmp.ticketComponentCalculate tcc ON tcc.itemFk = tc.itemFk AND tcc.warehouseFk = tc.warehouseFk GROUP BY tc.itemFk, warehouseFk; + -- Bonus del comprador a un rango de productos + INSERT INTO tmp.ticketComponent(warehouseFk, itemFk, componentFk, cost) + SELECT + tcb.warehouseFk, + tcb.itemFk, + c.id, + IFNULL(tcb.base * tpd.ratIncreasing / 100,0) + IFNULL(tpd.absIncreasing,0) + FROM tmp.ticketComponentBase tcb + JOIN component c ON c.code = 'bonus' + JOIN tPriceDelta tpd + ON tpd.itemFk = tcb.itemFk + AND tpd.warehouseFk = tcb.warehouseFk; + -- RECOBRO INSERT INTO tmp.ticketComponent(warehouseFk, itemFk, componentFk, cost) SELECT tcb.warehouseFk, tcb.itemFk, c2.id, @@ -49882,7 +49002,8 @@ BEGIN tmp.ticketComponentBase, tmp.ticketComponentRate, tmp.ticketComponentCopy, - tSpecialPrice; + tPriceDelta, + tSpecialPrice; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -49899,7 +49020,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentPrepare`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `catalog_componentPrepare`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent; @@ -49939,7 +49060,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentPurge`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `catalog_componentPurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketComponentPrice, @@ -49961,7 +49082,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `claimRatio_add`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `claimRatio_add`() BEGIN /* * Añade a la tabla greuges todos los cargos necesario y @@ -50164,7 +49285,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clean`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clean`() BEGIN /** * Purges outdated data to optimize performance. @@ -50184,14 +49305,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 @@ -50226,11 +49345,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 @@ -50339,7 +49455,6 @@ BEGIN -- Borra los registros de collection y ticketcollection DELETE FROM collection WHERE created < v2Months; - DELETE FROM travelLog WHERE creationDate < v3Months; CALL shelving_clean(); @@ -50408,7 +49523,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clean_logiflora`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clean_logiflora`() BEGIN /** * Elimina las compras y los artículos residuales de logiflora. @@ -50494,27 +49609,6 @@ 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 `clearShelvingList` */; -/*!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 `clearShelvingList`(vShelvingFk VARCHAR(8)) -BEGIN - UPDATE vn.itemShelving - SET visible = 0 - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk COLLATE utf8_unicode_ci; -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 `clientDebtSpray` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -50523,7 +49617,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientDebtSpray`(vClientFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientDebtSpray`(vClientFk INT) BEGIN /* Reparte el saldo de un cliente en greuge en la cartera que corresponde, y desasigna el comercial @@ -50565,7 +49659,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientFreeze`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientFreeze`() BEGIN /** * Congela diariamente aquellos clientes que son morosos sin recobro, @@ -50622,7 +49716,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientGetDebtDiary`(vClientFK INT, vCompanyFk INT) BEGIN /** * Devuelve el registro de deuda @@ -50752,7 +49846,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN) BEGIN DECLARE vGreuge DECIMAL(10,2); @@ -50838,7 +49932,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientPackagingOverstock`(vClientFk INT, vGraceDays INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientPackagingOverstock`(vClientFk INT, vGraceDays INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.clientPackagingOverstock; CREATE TEMPORARY TABLE tmp.clientPackagingOverstock @@ -50943,7 +50037,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT) BEGIN DECLARE vNewTicket INT DEFAULT 0; DECLARE vWarehouseFk INT; @@ -50996,7 +50090,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientRemoveWorker`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientRemoveWorker`() BEGIN DECLARE vDone BOOL DEFAULT FALSE; DECLARE vClientFk INT; @@ -51049,7 +50143,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2)) BEGIN IF vAmount IS NOT NULL THEN @@ -51077,7 +50171,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros clientes con @@ -51158,7 +50252,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_create`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_create`( vFirstname VARCHAR(50), vSurnames VARCHAR(50), vFi VARCHAR(9), @@ -51264,7 +50358,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_getDebt`(vDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_getDebt`(vDate DATE) BEGIN /** * Calculates the risk for active clients @@ -51339,7 +50433,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_getMana`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_getMana`() BEGIN /** * Devuelve el mana de los clientes de la tabla tmp.client(id) @@ -51409,7 +50503,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_getRisk`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_getRisk`( vDate DATE ) BEGIN @@ -51457,7 +50551,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_RandomList`(vNumber INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_RandomList`(vNumber INT) BEGIN DECLARE i INT DEFAULT 0; @@ -51529,7 +50623,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_unassignSalesPerson`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_unassignSalesPerson`() BEGIN /** * Elimina la asignación de salesPersonFk de la ficha del clientes @@ -51594,7 +50688,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `client_userDisable`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `client_userDisable`() BEGIN /** * Desactiva los clientes inactivos en los últimos X meses. @@ -51641,7 +50735,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT) BEGIN /** * Añade registro a tabla cmrPallet. @@ -51691,7 +50785,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collectionPlacement_get`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collectionPlacement_get`( vParamFk INT(11), vIsPicker bool) BEGIN @@ -51747,24 +50841,20 @@ BEGIN SELECT ts.saleFk, ts.itemFk, CAST(0 AS DECIMAL(10,0)) saleOrder, - IF(ish.visible > 0 OR iss.id, 1, 100000) * - IFNULL(p2.pickingOrder, p.pickingOrder) `order`, - TO_SECONDS(IF(iss.id, - iss.created - INTERVAL vCurrentYear YEAR, - ish.created - INTERVAL YEAR(ish.created) YEAR)) priority, + (IF(ish.visible > 0 OR iss.id, 1, 100000) * + COALESCE(p2.pickingOrder, p.pickingOrder)) `order`, + TO_SECONDS(COALESCE(iss.created, ish.created)) - TO_SECONDS(MAKEDATE(IFNULL(YEAR(iss.created), YEAR(ish.created)), 1)) priority, CONCAT( - IF(iss.id, - CONCAT('< ', IFNULL(wk.`code`, '---'),' > '), - ''), - p.`code`) COLLATE utf8_general_ci placement, + IF(iss.id, CONCAT('< ', COALESCE(wk.`code`, '---'),' > '), ''), + p.`code` + ) COLLATE utf8_general_ci placement, sh.priority shelvingPriority, sh.code COLLATE utf8_general_ci shelving, ish.created, ish.visible, - IFNULL( - IF(st.code = 'previousByPacking', ish.packing, g.`grouping`), - 1) `grouping`, - st.code = 'previousPrepared' isPreviousPrepared, + COALESCE( + IF(st.code = 'previousByPacking', ish.packing, g.`grouping`),1) `grouping`, + (st.code = 'previousPrepared') isPreviousPrepared, iss.id itemShelvingSaleFk, ts.ticketFk, iss.id, @@ -51772,11 +50862,12 @@ BEGIN iss.userFk, ts.quantity FROM tSale ts - LEFT JOIN (SELECT DISTINCT saleFk - FROM saleTracking st - JOIN state s ON s.id = st.stateFk - WHERE st.isChecked - AND s.semaphore = 1) st ON st.saleFk = ts.saleFk + LEFT JOIN (SELECT st.saleFk + FROM saleTracking st + JOIN state s ON s.id = st.stateFk + WHERE st.isChecked + AND s.semaphore = 1 + GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk JOIN itemShelving ish ON ish.itemFk = ts.itemFk JOIN shelving sh ON sh.code = ish.shelvingFk JOIN parking p ON p.id = sh.parkingFk @@ -51785,14 +50876,14 @@ BEGIN JOIN warehouse w ON w.id = sc.warehouseFk LEFT JOIN tGrouping g ON g.itemFk = ts.itemFk LEFT JOIN itemShelvingSale iss ON iss.saleFk = ts.saleFk - AND iss.itemShelvingFk = ish.id + AND iss.itemShelvingFk = ish.id LEFT JOIN worker wk ON wk.id = iss.userFk LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = ts.saleFk LEFT JOIN saleGroup sg ON sg.id = sgd.saleGroupFk LEFT JOIN parking p2 ON p2.id = sg.parkingFk WHERE w.id = vWarehouseFk - AND NOT sc.isHideForPickers - HAVING (iss.id AND st.saleFk) OR salePreviousPrepared IS NULL; + AND NOT sc.isHideForPickers + AND ((iss.id AND st.saleFk) OR st.saleFk IS NULL); CREATE OR REPLACE TEMPORARY TABLE tSalePlacementList2 (INDEX(saleFk), INDEX(olderPriority)) @@ -51854,7 +50945,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_addItem`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_addItem`( vBarccodeFk INT, vQuantity INT, vTicketFk INT @@ -51928,7 +51019,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_addWithReservation`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_addWithReservation`( vItemFk INT, vQuantity INT, vTicketFk INT, @@ -52031,7 +51122,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_assign`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_assign`( vUserFk INT, OUT vCollectionFk INT ) @@ -52045,39 +51136,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; @@ -52087,70 +51181,70 @@ 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 ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -52167,7 +51261,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_get`(vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_get`(vWorkerFk INT) BEGIN /** * Obtiene colección del sacador si tiene líneas pendientes. @@ -52218,7 +51312,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_getAssigned`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_getAssigned`( vUserFk INT, OUT vCollectionFk INT ) @@ -52335,7 +51429,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_getTickets`(vParamFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_getTickets`(vParamFk INT) BEGIN /** * Selecciona los tickets de una colección/ticket/sectorCollection @@ -52359,7 +51453,7 @@ BEGIN JOIN vn.ticketCollection tc ON tc.ticketFk = tob.ticketFk LEFT JOIN vn.observationType ot ON ot.id = tob.observationTypeFk WHERE ot.`code` = 'itemPicker' - AND tc.collectionFk = vParamFk + AND tc.collectionFk = vParamFk OR tc.ticketFk = vParamFk ) SELECT t.id ticketFk, IF(!(vItemPackingTypeFk <=> 'V'), cc.code, CONCAT(SUBSTRING('ABCDEFGH', tc.wagon, 1), '-', tc.`level`)) `level`, @@ -52437,7 +51531,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_kill`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_kill`(vSelf INT) BEGIN /** * Elimina una coleccion y coloca sus tickets en OK @@ -52466,7 +51560,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_make`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_make`() proc:BEGIN /** * Genera colecciones de tickets sin asignar trabajador a partir de la tabla @@ -52539,6 +51633,48 @@ 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 `collection_mergeSales` */; +/*!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=`vn`@`localhost` PROCEDURE `collection_mergeSales`(vCollectionFk INT) +BEGIN + DECLARE vDone BOOL; + DECLARE vTicketFk INT; + + DECLARE vTickets CURSOR FOR + SELECT ticketFk + FROM ticketCollection + WHERE collectionFk = vCollectionFk; + + 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 ticket_mergeSales(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 `collection_new` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -52547,7 +51683,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_new`(vUserFk INT, OUT vCollectionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_new`(vUserFk INT, OUT vCollectionFk INT) BEGIN /** * Genera colecciones de tickets sin asignar trabajador. @@ -52744,7 +51880,8 @@ BEGIN OR LENGTH(pb.problem) > 0 OR pb.lines > vLinesLimit OR pb.m3 > vVolumeLimit - OR sub.maxSize > vSizeLimit; + OR sub.maxSize > vSizeLimit + OR pb.hasPlantTray; END IF; -- Es importante que el primer ticket se coja en todos los casos @@ -52931,7 +52068,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_printSticker`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_printSticker`( vSelf INT, vLabelCount INT ) @@ -52977,7 +52114,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_setParking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_setParking`( vSelf INT, vParkingFk INT ) @@ -53008,7 +52145,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci) BEGIN /** * Modifica el estado de los tickets de una colección. @@ -53065,7 +52202,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `company_getFiscaldata`(workerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `company_getFiscaldata`(workerFk INT) BEGIN DECLARE vCompanyFk INT; @@ -53103,7 +52240,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT) BEGIN /** * Generates a temporary table containing outstanding payments to suppliers. @@ -53318,7 +52455,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `comparative_add`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `comparative_add`() BEGIN /** * Inserts sales records less than one month old in comparative. @@ -53390,7 +52527,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `confection_controlSource`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `confection_controlSource`( vDated DATE, vScopeDays INT, vMaxAlertLevel INT, @@ -53506,7 +52643,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME) BEGIN @@ -53571,7 +52708,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `copyComponentsFromSaleList`(vTargetTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `copyComponentsFromSaleList`(vTargetTicketFk INT) BEGIN /* Copy sales and components to the target ticket @@ -53619,7 +52756,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `createPedidoInterno`(vItemFk INT,vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `createPedidoInterno`(vItemFk INT,vQuantity INT) BEGIN @@ -53641,7 +52778,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `creditInsurance_getRisk`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `creditInsurance_getRisk`() BEGIN /** * Devuelve el riesgo de los clientes que estan asegurados @@ -53652,7 +52789,7 @@ BEGIN SELECT * FROM ( SELECT cc.client clientFk, ci.grade FROM creditClassification cc - JOIN creditInsurance ci ON cc.id = ci.creditClassification + JOIN creditInsurance ci ON cc.id = ci.creditClassificationFk WHERE dateEnd IS NULL ORDER BY ci.creationDate DESC LIMIT 10000000000000000000) t1 @@ -53696,7 +52833,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `creditRecovery`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `creditRecovery`() BEGIN /** * Actualiza el crédito de los clientes @@ -53763,7 +52900,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) ) BEGIN DECLARE vEncryptedText VARCHAR(255) DEFAULT ''; @@ -53833,7 +52970,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255)) BEGIN DECLARE vUncryptedText VARCHAR(255) DEFAULT ''; @@ -53900,7 +53037,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `department_calcTree`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `department_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of @@ -53944,7 +53081,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `department_calcTreeRec`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `department_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, @@ -54026,7 +53163,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `department_doCalc`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `department_doCalc`() proc: BEGIN /** * Recalculates the department tree. @@ -54068,7 +53205,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `department_getHasMistake`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `department_getHasMistake`() BEGIN /** @@ -54097,7 +53234,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `department_getLeaves`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `department_getLeaves`( vParentFk INT, vSearch VARCHAR(255) ) @@ -54188,7 +53325,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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. @@ -54216,7 +53353,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProductionUser_exists`(vUserFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `deviceProductionUser_exists`(vUserFk INT) BEGIN /* SELECT COUNT(*) AS UserExists @@ -54240,7 +53377,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona si hay registrado un device con un android_id @@ -54267,7 +53404,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64)) BEGIN /** * Selecciona el id del dispositivo que corresponde al vAndroid_id. @@ -54293,7 +53430,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50)) BEGIN /* @@ -54349,7 +53486,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `duaEntryValueUpdate`(vDuaFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `duaEntryValueUpdate`(vDuaFk INT) BEGIN UPDATE duaEntry de @@ -54390,7 +53527,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `duaInvoiceInBooking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `duaInvoiceInBooking`( vDuaFk INT ) BEGIN @@ -54514,7 +53651,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `duaParcialMake`(vDuaFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `duaParcialMake`(vDuaFk INT) BEGIN DECLARE vNewDuaFk INT; @@ -54548,7 +53685,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `duaTaxBooking`(vDuaFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `duaTaxBooking`(vDuaFk INT) BEGIN DECLARE vBookNumber INT; DECLARE vBookDated DATE; @@ -54690,7 +53827,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `duaTax_doRecalc`(vDuaFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `duaTax_doRecalc`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y los vuelve a crear en base a la tabla duaEntry @@ -54757,7 +53894,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ediTables_Update`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ediTables_Update`() BEGIN INSERT IGNORE INTO vn.genus(name) @@ -54783,7 +53920,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ektEntryAssign_setEntry`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ektEntryAssign_setEntry`() BEGIN DECLARE done INT DEFAULT FALSE; @@ -54908,7 +54045,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `energyMeter_record`(vInput INT, vActiveTime INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `energyMeter_record`(vInput INT, vActiveTime INT) BEGIN DECLARE vConsumption INT; @@ -54941,7 +54078,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entryDelivered`(vDated DATE, vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entryDelivered`(vDated DATE, vEntryFk INT) BEGIN DECLARE vTravelFk INT; @@ -54985,7 +54122,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE) BEGIN DECLARE vTravel INT; @@ -55043,16 +54180,16 @@ 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 `entry_checkPackaging` */; /*!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 `entry_checkPackaging`(vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_checkPackaging`(vEntryFk INT) BEGIN /** * Comprueba que los campos package y packaging no sean nulos @@ -55085,7 +54222,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_clone`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_clone`(vSelf INT) BEGIN /** * clones an entry. @@ -55118,7 +54255,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_cloneHeader`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_cloneHeader`( vSelf INT, OUT vNewEntryFk INT, vTravelFk INT @@ -55173,7 +54310,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT) BEGIN /** * Clona una entrada sin compras @@ -55207,7 +54344,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_copyBuys`(vSelf INT, vDestinationEntryFk INT) BEGIN /** * Copies all buys from an entry to an entry. @@ -55238,7 +54375,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_fixMisfit`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_fixMisfit`( vSelf INT ) BEGIN @@ -55314,7 +54451,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_getRate`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_getRate`(vSelf INT) BEGIN /** * Prepara una tabla con las tarifas aplicables en funcion de la fecha @@ -55348,7 +54485,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_getTransfer`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_getTransfer`( vSelf INT ) BEGIN @@ -55567,7 +54704,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_isEditable`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_isEditable`( vSelf INT ) BEGIN @@ -55604,7 +54741,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_lock`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_lock`(vSelf INT) BEGIN /** * Lock the indicated entry @@ -55630,7 +54767,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_moveNotPrinted`(vSelf INT, +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_moveNotPrinted`(vSelf INT, vDays INT, vChangeEntry BOOL, OUT vNewEntryFk INT) @@ -55816,7 +54953,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512)) BEGIN DECLARE vEmail VARCHAR(255); DECLARE vFields VARCHAR(100); @@ -55861,7 +54998,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_recalc`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_recalc`() BEGIN /** * Comprueba que las ventas creadas entre un rango de fechas tienen componentes @@ -55908,7 +55045,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -56037,7 +55174,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_splitMisfit`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_splitMisfit`(vSelf INT) BEGIN /* Divide una entrada, pasando los registros que ha insertado vn.entry_fixMisfit de la entrada original @@ -56084,7 +55221,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_unlock`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_unlock`(vSelf INT) BEGIN /** * Unlock the indicated entry @@ -56110,7 +55247,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_updateComission`(vCurrency INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `entry_updateComission`(vCurrency INT) BEGIN /** * Actualiza la comision de las entradas de hoy a futuro y las recalcula @@ -56174,7 +55311,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionGetFromRoute`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionGetFromRoute`( vExpeditionFk INT) BEGIN /** @@ -56219,7 +55356,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_build`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionPallet_build`( vExpeditions JSON, vArcId INT, vWorkerFk INT, @@ -56336,7 +55473,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_Del`(vPalletFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionPallet_Del`(vPalletFk INT) BEGIN DELETE FROM vn.expeditionPallet @@ -56358,7 +55495,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_List`(vTruckFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionPallet_List`(vTruckFk INT) BEGIN SELECT ep.id Pallet, @@ -56387,7 +55524,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_printLabel`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionPallet_printLabel`(vSelf INT) BEGIN /** * Calls the report_print procedure and passes it @@ -56429,16 +55566,16 @@ 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 `expeditionPallet_View` */; /*!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 `expeditionPallet_View`(vPalletFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionPallet_View`(vPalletFk INT) BEGIN SELECT ep.id Pallet, @@ -56467,7 +55604,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Add`(vPalletFk INT, vTruckFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionScan_Add`(vPalletFk INT, vTruckFk INT) BEGIN DECLARE vTotal INT DEFAULT 0; @@ -56507,7 +55644,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Del`(vScanFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionScan_Del`(vScanFk INT) BEGIN DELETE FROM vn.expeditionScan @@ -56529,7 +55666,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_List`(vPalletFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionScan_List`(vPalletFk INT) BEGIN SELECT es.id, @@ -56559,7 +55696,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Put`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionScan_Put`( vPalletFk INT, vExpeditionFk INT ) @@ -56590,7 +55727,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionState_add`(vParam INT, vStateCode VARCHAR(100)) BEGIN /** @@ -56634,7 +55771,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** @@ -56668,7 +55805,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100)) BEGIN /** @@ -56699,7 +55836,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100)) BEGIN /** * Inserta nuevos registros en la tabla vn.expeditionState @@ -56743,7 +55880,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100)) BEGIN /** @@ -56776,7 +55913,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_getFromRoute`(vRouteFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expedition_getFromRoute`(vRouteFk INT) BEGIN /** * Obtiene las expediciones a partir de una ruta @@ -56833,7 +55970,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_getState`(vExpeditionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expedition_getState`(vExpeditionFk INT) BEGIN DECLARE vTicketsPendientes INT; @@ -56903,7 +56040,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_StateGet`(vExpeditionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `expedition_StateGet`(vExpeditionFk INT) BEGIN /* Devuelve una "ficha" con todos los datos relativos a la expedición @@ -56990,7 +56127,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `freelance_getInfo`(workerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `freelance_getInfo`(workerFk INT) BEGIN SELECT s.name, s.street, s.city, s.nif, s.postCode FROM route r @@ -57017,7 +56154,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `getDayExpeditions`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `getDayExpeditions`() BEGIN SELECT @@ -57045,7 +56182,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `getInfoDelivery`(vRouteFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -57068,7 +56205,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `getPedidosInternos`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `getPedidosInternos`() BEGIN SELECT id,name as description,upToDown as quantity FROM vn.item WHERE upToDown; @@ -57080,16 +56217,16 @@ 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 `getTaxBases` */; /*!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 `getTaxBases`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `getTaxBases`() BEGIN /** * Calcula y devuelve en número de bases imponibles postivas y negativas @@ -57134,7 +56271,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `greuge_add`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `greuge_add`() BEGIN /** * Group inserts into vn.greuge and then deletes the records just inserted @@ -57169,7 +56306,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `greuge_notifyEvents`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `greuge_notifyEvents`() BEGIN /** * Notify to detect wrong greuges. @@ -57254,7 +56391,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryFailureAdd`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `inventoryFailureAdd`() BEGIN DECLARE done BOOL DEFAULT FALSE; @@ -57315,7 +56452,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryMake`(vInventoryDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `inventoryMake`(vInventoryDate DATE) BEGIN /** * Recalculate the inventories @@ -57598,7 +56735,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryMakeLauncher`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `inventoryMakeLauncher`() BEGIN /** * Recalculate the inventories of all warehouses @@ -57623,7 +56760,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `inventory_repair`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `inventory_repair`() BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.lastEntry; @@ -57742,7 +56879,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceExpenseMake`(IN vInvoice INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceExpenseMake`(IN vInvoice INT) BEGIN /* Inserta las partidas de gasto correspondientes a la factura * REQUIERE tabla tmp.ticketToInvoice @@ -57785,7 +56922,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT) BEGIN DECLARE vMinDateTicket DATE DEFAULT TIMESTAMPADD(MONTH, -3, util.VN_CURDATE()); @@ -57820,7 +56957,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromClient`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceFromClient`( IN vMaxTicketDate datetime, IN vClientFk INT, IN vCompanyFk INT) @@ -57855,7 +56992,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromTicket`(IN vTicket INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceFromTicket`(IN vTicket INT) BEGIN DROP TEMPORARY TABLE IF EXISTS `tmp`.`ticketToInvoice`; @@ -57882,8 +57019,8 @@ 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=`vn`@`localhost` PROCEDURE `invoiceInDueDay_calculate`( + vInvoiceInFk INT ) BEGIN /** @@ -57971,7 +57108,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInDueDay_recalc`(vInvoiceInFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInDueDay_recalc`(vInvoiceInFk INT) BEGIN DELETE FROM invoiceInDueDay @@ -57995,7 +57132,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTaxMakeByDua`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInTaxMakeByDua`( vDuaFk INT ) BEGIN @@ -58046,7 +57183,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_afterUpsert`(vInvoiceInFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInTax_afterUpsert`(vInvoiceInFk INT) BEGIN /** * Triggered actions when a invoiceInTax is updated or inserted. @@ -58082,7 +57219,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_getFromDua`(vDuaFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInTax_getFromDua`(vDuaFk INT) BEGIN /** * Borra los valores de duaTax y sus vctos. y los vuelve a crear en base a la tabla duaEntry @@ -58130,7 +57267,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_getFromEntries`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInTax_getFromEntries`( IN vInvoiceInFk INT ) BEGIN @@ -58194,7 +57331,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_recalc`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceInTax_recalc`( vInvoiceInFk INT ) BEGIN @@ -58264,7 +57401,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceIn_booking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceIn_booking`( vSelf INT, vBookNumber INT ) @@ -58588,7 +57725,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceIn_checkBooked`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceIn_checkBooked`( vSelf INT ) BEGIN @@ -58623,7 +57760,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. @@ -58693,7 +57830,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutBooking`(IN vInvoice INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOutBooking`(IN vInvoice INT) BEGIN /** * Asienta una factura emitida @@ -58895,7 +58032,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutBookingRange`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOutBookingRange`() BEGIN /* Reasentar facturas @@ -58955,7 +58092,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE) BEGIN SELECT @@ -58995,7 +58132,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutTaxAndExpense`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOutTaxAndExpense`() BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. @@ -59084,7 +58221,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_exportationFromClient`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOut_exportationFromClient`( vMaxTicketDate DATETIME, vClientFk INT, vCompanyFk INT) @@ -59129,7 +58266,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_new`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOut_new`( vSerial VARCHAR(255), vInvoiceDate DATE, vTaxArea VARCHAR(25), @@ -59421,7 +58558,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_newFromClient`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOut_newFromClient`( IN vClientFk INT, IN vSerial CHAR(2), IN vMaxShipped DATE, @@ -59490,7 +58627,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25), IN vRef varchar(25), OUT vInvoiceId int) BEGIN /** @@ -59537,7 +58674,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25)) BEGIN /** * Factura un conjunto de tickets. @@ -59594,7 +58731,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL) BEGIN IF vDelete THEN DELETE FROM vn.itemBarcode WHERE itemFk = vItemFk AND code = vCode; @@ -59602,98 +58739,6 @@ ELSE INSERT INTO vn.itemBarcode(itemFk,code) VALUES (vItemFk,vCode); 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 `itemFuentesBalance` */; -/*!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 `itemFuentesBalance`(vDaysInFuture INT) -BEGIN - - /* Se utiliza para calcular la necesidad de mover mercancia entre el almacén de fuentes y el nuestro - * - * @param vDaysInFuture Rango de dias para calcular entradas y salidas - * - */ - - DECLARE vWarehouseFk INT; - - SELECT s.warehouseFk INTO vWarehouseFk - FROM vn.sector s - WHERE s.code = 'FUENTES_PICASSE'; - - CALL cache.stock_refresh(FALSE); - - SELECT i.id itemFk, - i.longName, - i.size, - i.subName, - v.amount - IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as visible, - fue.Fuentes, - alb.Albenfruit, - sale.venta, - IFNULL(buy.compra,0) + IFNULL(mov.traslado,0) as compra, - IFNULL(v.amount,0) + IFNULL(sale.venta,0) + IFNULL(buy.compra,0) + IFNULL(mov.traslado,0) - - IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as saldo - FROM vn.item i - JOIN vn.itemType it ON it.id = i.typeFk - JOIN vn.itemCategory ic ON ic.id = it.categoryFk - LEFT JOIN ( - SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Fuentes - FROM vn.itemShelving ish - JOIN vn.shelving sh ON sh.code = ish.shelvingFk - JOIN vn.parking p ON p.id = sh.parkingFk - JOIN vn.sector s ON s.id = p.sectorFk - WHERE s.code = 'FUENTES_PICASSE' - GROUP BY ish.itemFk - ) fue ON fue.itemFk = i.id - LEFT JOIN ( - SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Albenfruit - FROM vn.itemShelving ish - JOIN vn.shelving sh ON sh.code = ish.shelvingFk - JOIN vn.parking p ON p.id = sh.parkingFk - JOIN vn.sector s ON s.id = p.sectorFk - WHERE s.code = 'ALBENFRUIT' - GROUP BY ish.itemFk - ) alb ON alb.itemFk = i.id - LEFT JOIN cache.stock v ON i.id = v.item_id AND v.warehouse_id = vWarehouseFk - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as venta - FROM itemTicketOut - WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseFk = vWarehouseFk - GROUP BY itemFk - ) sale ON sale.item_id = i.id - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as compra - FROM itemEntryIn - WHERE landed BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseInFk = vWarehouseFk - AND isVirtualStock = FALSE - GROUP BY itemFk - ) buy ON buy.item_id = i.id - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as traslado - FROM itemEntryOut - WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseOutFk = vWarehouseFk - GROUP BY itemFk - ) mov ON mov.item_id = i.id - WHERE (v.amount OR fue.Fuentes OR alb.Albenfruit) - AND i.itemPackingTypeFk = 'H' - AND ic.shortLife; - END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -59710,7 +58755,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemMinimumQuantity_check`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemMinimumQuantity_check`( vSelf INT, vItemFk INT, vStarted DATE, @@ -59751,7 +58796,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementFromTicket`(vTicket INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemPlacementFromTicket`(vTicket INT) BEGIN /** * Llama a itemPlacementUpdateVisible @@ -59788,7 +58833,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT) BEGIN SELECT ish.itemFk, @@ -59831,7 +58876,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT) BEGIN UPDATE vn.itemPlacementSupply @@ -59854,7 +58899,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyGetOrder`(vSector INT ) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemPlacementSupplyGetOrder`(vSector INT ) BEGIN DECLARE vId INT; @@ -59904,7 +58949,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT) BEGIN /** * Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa. @@ -59947,7 +58992,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemRefreshTags`(IN vItem INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemRefreshTags`(IN vItem INT) BEGIN /** * Crea la tabla temporal necesaria para el procedimiento item_refreshTags @@ -59980,7 +59025,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT) BEGIN DECLARE vStarted DATE; @@ -60038,7 +59083,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSaveMin`(min INT,vBarcode VARCHAR(22)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemSaveMin`(min INT,vBarcode VARCHAR(22)) BEGIN DECLARE vItemFk INT; @@ -60064,7 +59109,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSearchShelving`(`vShelvingFk` VARCHAR(3)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemSearchShelving`(`vShelvingFk` VARCHAR(3)) BEGIN SELECT p.`column` AS col , p.`row` FROM vn.shelving s @@ -60086,7 +59131,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingDelete`(vId INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingDelete`(vId INT) BEGIN DELETE FROM vn.itemShelving WHERE id = vId; @@ -60107,7 +59152,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingLog_get`(vShelvingFk VARCHAR(10) ) BEGIN /** @@ -60139,77 +59184,6 @@ BEGIN WHERE shelvingFk = vShelvingFk OR isl.itemFk = vShelvingFk ORDER BY isl.created DESC; -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 `itemShelvingMakeFromDate` */; -/*!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 */ ; -DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `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; - - SELECT vn.barcodeToItem(vBarcode) INTO vItemFk; - - SELECT itemFk INTO vItemFk - FROM vn.buy b - WHERE b.id = vItemFk; - - IF (SELECT COUNT(*) FROM vn.shelving WHERE code = vShelvingFk COLLATE utf8_unicode_ci) = 0 THEN - - INSERT IGNORE INTO vn.parking(`code`) VALUES(vShelvingFk); - INSERT INTO vn.shelving(`code`, parkingFk) - SELECT vShelvingFk, id - FROM vn.parking - WHERE `code` = vShelvingFk COLLATE utf8_unicode_ci; - - END IF; - - IF (SELECT COUNT(*) FROM vn.itemShelving - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk - AND packing = vPacking) = 1 THEN - - UPDATE vn.itemShelving - SET visible = visible+vQuantity, - created = vCreated - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk - AND packing = vPacking; - - ELSE - CALL cache.last_buy_refresh(FALSE); - INSERT INTO itemShelving( itemFk, - shelvingFk, - visible, - created, - `grouping`, - packing, - packagingFk) - SELECT vItemFk, - vShelvingFk, - vQuantity, - vCreated, - IF(vGrouping = 0, IFNULL(b.packing, vPacking), vGrouping) `grouping`, - IF(vPacking = 0, b.packing, vPacking) packing, - IF(vPackagingFk = '', b.packagingFk, vPackagingFk) packaging - FROM vn.item i - LEFT JOIN cache.last_buy lb ON i.id = lb.item_id AND lb.warehouse_id = vWarehouseFk - LEFT JOIN vn.buy b ON b.id = lb.buy_id - WHERE i.id = vItemFk; - END IF; - END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -60226,7 +59200,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME) BEGIN DECLARE vTravelFk INT; @@ -60254,39 +59228,6 @@ BEGIN ) ish ON ish.itemFk = id WHERE b.stickers OR ish.etiquetas; -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 `itemShelvingPlacementSupplyAdd` */; -/*!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 `itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) -BEGIN - - INSERT INTO vn.itemShelvingPlacementSupply( itemShelvingFk, - itemPlacementSupplyFk, - quantity, - userFk) - VALUES (vItemShelvingFk, - vItemPlacementSupplyFk, - vQuantity, - getUser()); - - UPDATE vn.itemShelving - SET visible = visible - vQuantity - WHERE id = vItemShelvingFk; - - END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -60303,7 +59244,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingProblem`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingProblem`(vSectorFk INT) BEGIN DECLARE vVisibleCache INT; @@ -60342,7 +59283,7 @@ BEGIN AND IFNULL(sub3.transit,0) < s.quantity AND s.isPicked = FALSE AND s.reserved = FALSE - AND t.shipped BETWEEN util.VN_CURDATE() AND MIDNIGHT(util.VN_CURDATE()) + AND t.shipped BETWEEN util.VN_CURDATE() AND util.midnight() AND tst.isPreviousPreparable = TRUE AND t.warehouseFk = vWarehouseFk AND iss.sectorFk = vSectorFk @@ -60365,7 +59306,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingRadar`( vSectorFk INT ) BEGIN @@ -60585,7 +59526,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar_Entry`(vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingRadar_Entry`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; @@ -60650,7 +59591,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar_Entry_State_beta`(vEntryFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingRadar_Entry_State_beta`(vEntryFk INT) BEGIN DECLARE vWarehouseFk INT DEFAULT 1; @@ -60701,7 +59642,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT) BEGIN /** * Añade línea a itemShelvingSale y regulariza el carro @@ -60720,7 +59661,8 @@ BEGIN getUser()); UPDATE itemShelving - SET visible = visible - vQuantity + SET visible = visible - vQuantity, + available = available - vQuantity WHERE id = vItemShelvingFk; UPDATE vn.saleTracking @@ -60743,7 +59685,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_addByCollection`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_addByCollection`( vCollectionFk INT(11) ) BEGIN @@ -60806,7 +59748,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_addBySale`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_addBySale`( vSaleFk INT, vSectorFk INT ) @@ -60855,6 +59797,13 @@ proc: BEGIN RESIGNAL; END; + START TRANSACTION; + + SELECT id INTO vSaleFk + FROM sale + WHERE id = vSaleFk + FOR UPDATE; + SELECT MAX(p.pickingOrder), s.quantity - SUM(IFNULL(iss.quantity, 0)), s.quantity INTO vLastPickingOrder, vOutStanding, vSaleQuantity FROM sale s @@ -60864,7 +59813,8 @@ proc: BEGIN LEFT JOIN parking p ON p.id = sh.parkingFk WHERE s.id = vSaleFk; - IF vOutStanding <= 0 THEN + IF vOutStanding <= 0 THEN + COMMIT; LEAVE proc; END IF; @@ -60882,16 +59832,17 @@ proc: BEGIN WHERE saleFk = vSaleFk; IF vTotalReservedQuantity <> vSaleQuantity THEN + CALL util.debugAdd('itemShelvingSale_addBySale', + CONCAT(vSaleFk, ' - ', vSaleQuantity,' - ', vTotalReservedQuantity,'-', vOutStanding,'-', account.myUser_getId())); + UPDATE sale SET quantity = vTotalReservedQuantity WHERE id = vSaleFk; END IF; LEAVE l; END IF; - - START TRANSACTION; - - SELECT id INTO vItemShelvingFk + + SELECT id INTO vItemShelvingFk FROM itemShelving WHERE id = vItemShelvingFk FOR UPDATE; @@ -60900,7 +59851,8 @@ proc: BEGIN SET vOutStanding = vOutStanding - vReservedQuantity; IF vReservedQuantity > 0 THEN - + CALL util.debugAdd('itemShelvingSale_addBySale_reservedQuantity', + CONCAT(vSaleFk, ' - ', vReservedQuantity, ' - ', vOutStanding, account.myUser_getId())); INSERT INTO itemShelvingSale( itemShelvingFk, saleFk, @@ -60918,10 +59870,9 @@ proc: BEGIN WHERE id = vItemShelvingFk; END IF; - - COMMIT; END LOOP; CLOSE vItemShelvingAvailable; + COMMIT; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -60938,7 +59889,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_addBySaleGroup`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_addBySaleGroup`( vSaleGroupFk INT(11) ) BEGIN @@ -60997,7 +59948,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_addBySectorCollection`(vSectorCollectionFk INT(11)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_addBySectorCollection`(vSectorCollectionFk INT(11)) BEGIN /** * Reserva cantidades con ubicaciones para el contenido de una preparación previa @@ -61027,6 +59978,8 @@ BEGIN FROM operator WHERE workerFk = account.myUser_getId(); + CALL util.debugAdd('itemShelvingSale_addBySectorCollection',CONCAT(vSectorCollectionFk,' - ', account.myUser_getId())); + OPEN vSales; l: LOOP SET vDone = FALSE; @@ -61055,7 +60008,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_doReserve`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_doReserve`() proc: BEGIN /** * Genera reservas de la tabla vn.itemShelvingSaleReserve @@ -61122,7 +60075,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_reallocate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_reallocate`( vItemShelvingFk INT(10), vItemFk INT(10), vSectorFk INT @@ -61190,7 +60143,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_setPicked`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_setPicked`( vSaleGroupFk INT(10) ) BEGIN @@ -61237,7 +60190,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_setQuantity`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_setQuantity`( vItemShelvingSaleFk INT(10), vQuantity DECIMAL(10,0), vIsItemShelvingSaleEmpty BOOLEAN, @@ -61361,7 +60314,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_unpicked`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelvingSale_unpicked`( vSelf INT(11) ) BEGIN @@ -61434,7 +60387,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_add`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_add`( vShelvingFk VARCHAR(8), vBarcode VARCHAR(22), vQuantity INT, @@ -61481,7 +60434,8 @@ BEGIN AND buyFk = vBuyFk) THEN UPDATE itemShelving - SET visible = visible + vQuantity + SET visible = visible + vQuantity, + available = available + vQuantity WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking; ELSE @@ -61503,7 +60457,7 @@ BEGIN id FROM buy b WHERE id = vBuyFk; - END IF; + END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -61520,7 +60474,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3)) BEGIN /** * Insert items of claim into itemShelving. @@ -61563,7 +60517,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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. @@ -61623,7 +60577,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT) proc:BEGIN /** * Lista de articulos filtrados por comprador @@ -61722,7 +60676,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_get`(IN vSelf VARCHAR(8)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_get`(IN vSelf VARCHAR(8)) BEGIN /** * Lista artículos de itemshelving @@ -61763,7 +60717,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_getAlternatives`(vShelvingFk VARCHAR(10)) BEGIN /** * Devuelve un listado de posibles ubicaciones alternativas a ubicar los item de la matricula @@ -61798,7 +60752,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getInfo`(vItemFk VARCHAR(22)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_getInfo`(vItemFk VARCHAR(22)) BEGIN /** * Muestra información realtiva a la ubicación de un item @@ -61835,7 +60789,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getItemDetails`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_getItemDetails`( vBarcodeItem INT, vShelvingFK VARCHAR(10) ) @@ -61903,7 +60857,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_getSaleDate`(vShelvingFk VARCHAR(3)) BEGIN /* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula. @@ -62081,7 +61035,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8)) BEGIN /** * Devuelve un listado de ubicaciones a revisar @@ -62159,19 +61113,19 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_selfConsumption`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_selfConsumption`( vShelvingFk VARCHAR(10) COLLATE utf8_general_ci, vItemFk INT, vQuantity INT ) BEGIN /** - * Leave the indicated amount on the shelf + * Leave the indicated amount on the shelve * and create a ticket with the difference. * - * @param vShelvingFk id of the shelf where the item is located. + * @param vShelvingFk id of the shelve where the item is located. * @param vItemFk article of which the self-consumption ticket is to be created. - * @param vQuantity amount that will stay on the shelf + * @param vQuantity amount that will stay on the shelve */ DECLARE vVisible INT; DECLARE vClientFk INT; @@ -62240,7 +61194,8 @@ BEGIN WHERE id = vItemFk; UPDATE itemShelving - SET visible = IF(id = vItemShelvingFk, vQuantity, 0) + SET visible = IF(id = vItemShelvingFk, vQuantity, 0), + available = IF(id = vItemShelvingFk, vQuantity, 0) WHERE shelvingFk = vShelvingFk AND itemFk = vItemFk; @@ -62261,7 +61216,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_transfer`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_transfer`( vItemShelvingFk INT, vShelvingFk VARCHAR(10) ) @@ -62293,7 +61248,8 @@ BEGIN IF vNewItemShelvingFk THEN UPDATE itemShelving ish JOIN itemShelving ish2 ON ish2.id = vItemShelvingFk - SET ish.visible = ish.visible + ish2.visible + SET ish.visible = ish.visible + ish2.visible, + ish.available = ish.available + ish2.available WHERE ish.id = vNewItemShelvingFk; DELETE FROM itemShelving @@ -62326,7 +61282,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT ) BEGIN /** * Actualiza itemShelving. @@ -62358,7 +61314,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTagMake`(vItemFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemTagMake`(vItemFk INT) BEGIN /* * Crea los tags usando la tabla plantilla itemTag @@ -62418,16 +61374,16 @@ 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 `itemTagReorder` */; /*!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 `itemTagReorder`(itemTypeFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemTagReorder`(itemTypeFk INT) BEGIN SET @isTriggerDisabled = TRUE; @@ -62467,7 +61423,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTagReorderByName`(vName VARCHAR(255)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemTagReorderByName`(vName VARCHAR(255)) BEGIN SET @isTriggerDisabled = TRUE; @@ -62507,7 +61463,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -62555,7 +61511,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTopSeller`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemTopSeller`() BEGIN DECLARE vCategoryFk INTEGER; DECLARE vDone INT DEFAULT FALSE; @@ -62631,7 +61587,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `itemUpdateTag`(IN vItem BIGINT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `itemUpdateTag`(IN vItem BIGINT) BEGIN @@ -62685,7 +61641,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_calcVisible`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_calcVisible`( vSelf INT, vWarehouseFk INT ) @@ -62760,7 +61716,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_cleanFloramondo`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_cleanFloramondo`() BEGIN /** * Elimina todos los items repetidos de floramondo @@ -62973,7 +61929,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_comparative`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_comparative`( vDate DATETIME, vDayRange TINYINT, vWarehouseFk TINYINT, @@ -63283,7 +62239,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_deactivateUnused`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_deactivateUnused`() BEGIN /** * Cambia a false el campo isActive de la tabla vn.item para todos aquellos @@ -63327,7 +62283,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_devalueA2`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_devalueA2`( vSelf INT, vShelvingFK VARCHAR(10), vBuyingValue DECIMAL(10,4), @@ -63631,7 +62587,8 @@ BEGIN WHERE id = vTargetItemShelvingFk; ELSE UPDATE itemShelving - SET visible = vCurrentVisible - vQuantity + SET visible = vCurrentVisible - vQuantity, + available = GREATEST(0, available - vQuantity) WHERE id = vTargetItemShelvingFk; END IF; @@ -63748,7 +62705,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getAtp`(vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getAtp`(vDated DATE) BEGIN /** * Calcula el valor mínimo acumulado para cada artículo ordenado por fecha y @@ -63809,7 +62766,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getBalance`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getBalance`( vItemFk INT, vWarehouseFk INT, vDated DATETIME @@ -64102,7 +63059,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getInfo`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getInfo`( `vBarcode` VARCHAR(22), `vWarehouseFk` INT ) @@ -64192,7 +63149,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getLack`(IN vForce BOOLEAN, IN vDays INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getLack`(IN vForce BOOLEAN, IN vDays INT) BEGIN /** * Calcula una tabla con el máximo negativo visible para cada producto y almacen @@ -64262,7 +63219,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinacum`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getMinacum`( vWarehouseFk TINYINT, vDated DATE, vRange INT, @@ -64377,7 +63334,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinETD`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getMinETD`() BEGIN /* Devuelve una tabla temporal con la primera ETD, para todos los artículos con salida hoy. @@ -64414,29 +63371,28 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getSimilar`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getSimilar`( vSelf INT, vWarehouseFk INT, vDated DATE, - vShowType BOOL + vShowType BOOL, + vDaysInForward INT ) BEGIN /** -* Propone articulos disponibles ordenados, con la cantidad +* Propone articulos ordenados, con la cantidad * de veces usado y segun sus caracteristicas. * * @param vSelf Id de artículo * @param vWarehouseFk Id de almacen * @param vDated Fecha * @param vShowType Mostrar tipos +* @param vDaysInForward Días de alcance para las ventas */ DECLARE vAvailableCalcFk INT; - DECLARE vVisibleCalcFk INT; - DECLARE vTypeFk INT; DECLARE vPriority INT DEFAULT 1; CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated); - CALL cache.visible_refresh(vVisibleCalcFk, FALSE, vWarehouseFk); WITH itemTags AS ( SELECT i.id, @@ -64456,8 +63412,25 @@ BEGIN AND it.priority = vPriority LEFT JOIN vn.tag t ON t.id = it.tagFk WHERE i.id = vSelf + ), + stock AS ( + SELECT itemFk, SUM(visible) stock + FROM vn.itemShelvingStock + WHERE warehouseFk = vWarehouseFk + GROUP BY itemFk + ), + sold AS ( + SELECT SUM(s.quantity) quantity, s.itemFk + FROM vn.sale s + JOIN vn.ticket t ON t.id = s.ticketFk + LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id + WHERE t.shipped >= CURDATE() + INTERVAL vDaysInForward DAY + AND iss.saleFk IS NULL + AND t.warehouseFk = vWarehouseFk + GROUP BY s.itemFk ) SELECT i.id itemFk, + LEAST(CAST(sd.quantity AS INT), sk.stock) advanceable, i.longName, i.subName, i.tag5, @@ -64479,13 +63452,13 @@ BEGIN WHEN b.groupingMode = 'packing' THEN b.packing ELSE 1 END minQuantity, - v.visible located, + sk.stock located, b.price2 FROM vn.item i + LEFT JOIN sold sd ON sd.itemFk = i.id JOIN cache.available a ON a.item_id = i.id AND a.calc_id = vAvailableCalcFk - LEFT JOIN cache.visible v ON v.item_id = i.id - AND v.calc_id = vVisibleCalcFk + LEFT JOIN stock sk ON sk.itemFk = i.id LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = vWarehouseFk LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id @@ -64495,20 +63468,21 @@ BEGIN LEFT JOIN vn.tag t ON t.id = it.tagFk LEFT JOIN vn.buy b ON b.id = lb.buy_id JOIN itemTags its - WHERE a.available > 0 + WHERE (a.available > 0 OR sd.quantity < sk.stock) AND (i.typeFk = its.typeFk OR NOT vShowType) AND i.id <> vSelf - ORDER BY `counter` DESC, - (t.name = its.name) DESC, - (it.value = its.value) DESC, - (i.tag5 = its.tag5) DESC, - match5 DESC, - (i.tag6 = its.tag6) DESC, - match6 DESC, - (i.tag7 = its.tag7) DESC, - match7 DESC, - (i.tag8 = its.tag8) DESC, - match8 DESC + ORDER BY (a.available > 0) DESC, + `counter` DESC, + (t.name = its.name) DESC, + (it.value = its.value) DESC, + (i.tag5 = its.tag5) DESC, + match5 DESC, + (i.tag6 = its.tag6) DESC, + match6 DESC, + (i.tag7 = its.tag7) DESC, + match7 DESC, + (i.tag8 = its.tag8) DESC, + match8 DESC LIMIT 100; END ;; DELIMITER ; @@ -64526,7 +63500,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getStock`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_getStock`( vWarehouseFk SMALLINT, vDated DATE, vItemFk INT @@ -64611,7 +63585,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_multipleBuy`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_multipleBuy`( vDate DATETIME, vWarehouseFk INT ) @@ -64660,7 +63634,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_multipleBuyByDate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_multipleBuyByDate`( vDated DATETIME, vWarehouseFk TINYINT(3) ) @@ -64713,7 +63687,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_refreshFromTags`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_refreshFromTags`(vSelf INT) BEGIN /** * Updates item attributes with its corresponding tags. @@ -64794,7 +63768,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_refreshTags`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_refreshTags`() BEGIN /** * Update item table, tag "cache" fields @@ -64836,7 +63810,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150)) BEGIN /** @@ -64868,7 +63842,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_setGeneric`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_setGeneric`(vSelf INT) BEGIN /** * Asigna el código genérico a un item, salvo que sea un código de item genérico. @@ -64937,7 +63911,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_setVisibleDiscard`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_setVisibleDiscard`( vItemFk INT, vWarehouseFk INT, vQuantity INT, @@ -65030,7 +64004,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** * Update the packing type of an item @@ -65056,7 +64030,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_valuateInventory`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_valuateInventory`( vDated DATE, vItemTypeFk INT, vItemCategoryFk INT @@ -65313,7 +64287,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `item_zoneClosure`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `item_zoneClosure`() BEGIN /* Devuelve una tabla temporal con la hora minima de un ticket sino tiene el de la zoneClosure y @@ -65351,7 +64325,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ledger_doCompensation`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ledger_doCompensation`( vDated DATE, vCompensationAccount VARCHAR(10), vBankFk VARCHAR(10), @@ -65473,7 +64447,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ledger_next`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ledger_next`( IN vFiscalYear INT, OUT vLastBookEntry INT ) @@ -65513,7 +64487,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ledger_nextTx`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ledger_nextTx`( IN vFiscalYear INT, OUT vLastBookEntry INT ) @@ -65548,7 +64522,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `logShow`(vOriginFk INT, vEntity VARCHAR(45)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `logShow`(vOriginFk INT, vEntity VARCHAR(45)) BEGIN /** * Muestra las acciones realizadas por el usuario @@ -65584,7 +64558,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `lungSize_generator`(vDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `lungSize_generator`(vDate DATE) BEGIN SET @buildingOrder := 0; @@ -65645,7 +64619,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** @@ -65680,7 +64654,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT) BEGIN /** * Obtiene historial de la matrícula vPlate que el trabajador vWorkerFk escanea, @@ -65714,7 +64688,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT) BEGIN /** @@ -65765,7 +64739,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `machine_getWorkerPlate`(vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `machine_getWorkerPlate`(vWorkerFk INT) BEGIN /** * Selecciona la matrícula del vehículo del workerfk @@ -65794,7 +64768,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `mail_insert`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `mail_insert`( vReceiver VARCHAR(255), vReplyTo VARCHAR(50), vSubject VARCHAR(100), @@ -65845,7 +64819,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `makeNewItem`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `makeNewItem`() BEGIN DECLARE newItemFk INT; @@ -65874,7 +64848,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `makePCSGraf`(vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `makePCSGraf`(vDated DATE) BEGIN @@ -65926,7 +64900,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `manaSpellersRequery`(vWorkerFk INTEGER) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `manaSpellersRequery`(vWorkerFk INTEGER) `whole_proc`: BEGIN /** @@ -65975,7 +64949,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `multipleInventory`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `multipleInventory`( vDate DATE, vWarehouseFk TINYINT, vMaxDays TINYINT @@ -66183,7 +65157,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqlConnectionsSorter_kill`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `mysqlConnectionsSorter_kill`() BEGIN /** @@ -66233,7 +65207,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqlPreparedCount_check`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `mysqlPreparedCount_check`() BEGIN DECLARE vPreparedCount INTEGER; @@ -66267,7 +65241,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `nextShelvingCodeMake`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `nextShelvingCodeMake`() BEGIN DECLARE newShelving VARCHAR(3); @@ -66321,7 +65295,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT) BEGIN /** * Guarda las observaciones realizadas por el usuario @@ -66362,7 +65336,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `orderCreate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `orderCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, @@ -66402,7 +65376,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `orderDelete`(IN vId INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `orderDelete`(IN vId INT) BEGIN DELETE FROM hedera.`order` where id = vId; @@ -66423,7 +65397,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `orderListCreate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `orderListCreate`( vLanded DATE, vAgencyMode INT, vAddress INT, @@ -66450,7 +65424,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `orderListVolume`(IN vOrderId INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `orderListVolume`(IN vOrderId INT) BEGIN SELECT @@ -66479,7 +65453,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `packingListSwitch`(saleFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `packingListSwitch`(saleFk INT) BEGIN DECLARE valueFk INT; @@ -66503,16 +65477,16 @@ 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 `packingSite_startCollection` */; /*!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 `packingSite_startCollection`(vSelf INT, vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `packingSite_startCollection`(vSelf INT, vTicketFk INT) proc: BEGIN /** * @param vSelf packingSite id @@ -66576,7 +65550,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN) BEGIN DECLARE vColumn INT; @@ -66630,7 +65604,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT) BEGIN DECLARE vRow INT; @@ -66705,7 +65679,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_new`(vStart INT, vEnd INT, vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `parking_new`(vStart INT, vEnd INT, vSectorFk INT) BEGIN DECLARE vRow INT; @@ -66750,7 +65724,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_setOrder`(vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `parking_setOrder`(vWarehouseFk INT) BEGIN /* @@ -66790,7 +65764,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `payment_add`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `payment_add`( vDated DATE, vSupplierFk INT, vAmount DOUBLE, @@ -66887,7 +65861,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `prepareClientList`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `prepareClientList`() BEGIN /* @@ -66916,7 +65890,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.productionTicket; CREATE TEMPORARY TABLE tmp.productionTicket @@ -66953,60 +65927,66 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `previousSticker_get`(vSaleGroupFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `previousSticker_get`( + vSaleGroupFk INT +) BEGIN /** * Devuelve los campos a imprimir en una etiqueta de preparación previa. - * Actualiza el valor de vn.saleGroup.parkingFk en el caso de que exista un + * Actualiza el valor de saleGroup.parkingFk en el caso de que exista un * saleGroup del mismo ticket con parking, del mismo sector, para que todos se * pongan juntos. * - * @param vSaleGroupFk Identificador de vn.saleGroup + * @param vSaleGroupFk Identificador de saleGroup */ DECLARE vTicketFk INT; DECLARE vParkingFk INT; DECLARE vSectorFk INT; + DECLARE vTicketLines INT; - SELECT s.ticketFk - INTO vTicketFk - FROM vn.saleGroupDetail sgd - JOIN vn.sale s ON s.id = sgd.saleFk - WHERE sgd.saleGroupFk = vSaleGroupFk - LIMIT 1; + WITH ticketData AS( + SELECT DISTINCT s.ticketFk + FROM vn.saleGroupDetail sgd + JOIN vn.sale s ON s.id = sgd.saleFk + WHERE sgd.saleGroupFk = vSaleGroupFk + ) + SELECT COUNT(*), s.ticketFk INTO vTicketLines, vTicketFk + FROM vn.sale s + JOIN ticketData td ON td.ticketFk = s.ticketFk; SELECT sg.parkingFk, sc.sectorFk INTO vParkingFk, vSectorFk - FROM vn.saleGroup sg - JOIN vn.sectorCollectionSaleGroup scsg ON scsg.saleGroupFk = sg.id - JOIN vn.sectorCollection sc ON sc.id = scsg.sectorCollectionFk - JOIN vn.saleGroupDetail sgd ON sgd.saleGroupFk = sg.id - JOIN vn.sale s ON s.id = sgd.saleFk + FROM saleGroup sg + JOIN sectorCollectionSaleGroup scsg ON scsg.saleGroupFk = sg.id + JOIN sectorCollection sc ON sc.id = scsg.sectorCollectionFk + JOIN saleGroupDetail sgd ON sgd.saleGroupFk = sg.id + JOIN sale s ON s.id = sgd.saleFk WHERE s.ticketFk = vTicketFk AND sg.parkingFk IS NOT NULL LIMIT 1; - UPDATE vn.saleGroup sg + UPDATE saleGroup sg SET sg.parkingFk = vParkingFk WHERE sg.id = vSaleGroupFk AND sg.sectorFk = vSectorFk; SELECT sgd.saleGroupFk, t.id ticketFk, - p.code as location, - t.observations, + COUNT(*) previousLines, IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) shippingHour, IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) shippingMinute , IFNULL(MAX(i.itemPackingTypeFk),'H') itemPackingTypeFk , - count(*) items, + vTicketLines ticketLines, + p.code `location`, sc.description sector - FROM vn.sale s - JOIN vn.item i ON i.id = s.itemFk - JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id - JOIN vn.saleGroup sg ON sg.id = sgd.saleGroupFk - JOIN vn.sector sc ON sc.id = sg.sectorFk - JOIN vn.ticket t ON t.id = s.ticketFk - LEFT JOIN vn.parking p ON p.id = sg.parkingFk - LEFT JOIN vn.`zone` z ON z.id = t.zoneFk + FROM sale s + JOIN item i ON i.id = s.itemFk + JOIN saleGroupDetail sgd ON sgd.saleFk = s.id + JOIN saleGroup sg ON sg.id = sgd.saleGroupFk + JOIN sector sc ON sc.id = sg.sectorFk + JOIN ticket t ON t.id = s.ticketFk + LEFT JOIN parking p ON p.id = sg.parkingFk + LEFT JOIN `zone` z ON z.id = t.zoneFk WHERE sgd.saleGroupFk = vSaleGroupFk; END ;; DELIMITER ; @@ -67024,7 +66004,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11)) BEGIN /** * Comprueba si la impresora pertenece al sector @@ -67059,7 +66039,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `productionControl`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `productionControl`( vWarehouseFk INT, vScopeDays INT ) @@ -67271,8 +66251,6 @@ proc: BEGIN salesInParkingCount INT DEFAULT 0) ENGINE = MEMORY; - -- Insertamos todos los tickets que tienen productos parkineados - -- en sectores de previa, segun el sector CREATE OR REPLACE TEMPORARY TABLE tItemShelvingStock (PRIMARY KEY(itemFk, sectorFk)) ENGINE = MEMORY @@ -67305,7 +66283,6 @@ proc: BEGIN AND s.quantity > 0 GROUP BY pb.ticketFk; - -- Se calcula la cantidad de productos que estan ya preparados porque su saleGroup está aparcado UPDATE tmp.ticketWithPrevia twp JOIN ( SELECT pb.ticketFk, COUNT(DISTINCT s.id) salesInParkingCount @@ -67319,12 +66296,28 @@ proc: BEGIN ) sub ON twp.ticketFk = sub.ticketFk SET twp.salesInParkingCount = sub.salesInParkingCount; - -- Marcamos como pendientes aquellos que no coinciden las cantidades UPDATE tmp.productionBuffer pb JOIN tmp.ticketWithPrevia twp ON twp.ticketFk = pb.ticketFk SET pb.previousWithoutParking = TRUE WHERE twp.salesCount > twp.salesInParkingCount; + -- hasPlantTray + ALTER TABLE tmp.productionBuffer + ADD hasPlantTray BOOL DEFAULT FALSE; + + UPDATE tmp.productionBuffer pb + JOIN sale s ON s.ticketFk = pb.ticketFk + JOIN item i ON i.id = s.itemFk + JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk + AND lb.item_id = s.itemFk + JOIN buy b ON b.id = lb.buy_id + JOIN packaging p ON p.id = b.packagingFk + JOIN productionConfig pc + SET pb.hasPlantTray = TRUE + WHERE p.isPlantTray + AND s.quantity >= b.packing + AND pb.isOwn; + DROP TEMPORARY TABLE tmp.productionTicket, tmp.ticket, @@ -67348,7 +66341,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `productionError_add`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `productionError_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; @@ -67525,7 +66518,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `productionError_addCheckerPackager`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `productionError_addCheckerPackager`( vDatedFrom DATETIME, vDatedTo DATETIME, vRol VARCHAR(50)) @@ -67585,7 +66578,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `productionSectorList`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `productionSectorList`(vSectorFk INT) BEGIN /** * Devuelve el listado de sale que se puede preparar en previa para ese sector @@ -67641,7 +66634,6 @@ BEGIN i.itemPackingTypeFk, isa.`size`, isa.Estado, - isa.sectorProdPriority, isa.available, isa.sectorFk, isa.matricula, @@ -67707,7 +66699,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `raidUpdate`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `raidUpdate`() BEGIN /** * Actualiza el travel de las entradas de redadas @@ -67751,7 +66743,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `rangeDateInfo`(vStarted DATE, vEnded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `rangeDateInfo`(vStarted DATE, vEnded DATE) BEGIN /** * Crea una tabla temporal con las fechas @@ -67801,7 +66793,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `rateView`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `rateView`() BEGIN /** * Muestra información sobre tasas de cambio de Dolares @@ -67852,7 +66844,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `rate_getPrices`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `rate_getPrices`( vDated DATE, vWarehouseFk INT ) @@ -67910,7 +66902,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT) BEGIN DECLARE vLastCost DECIMAL(10,2); @@ -67958,7 +66950,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `remittance_calc`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `remittance_calc`( vDated DATE ) BEGIN @@ -68041,7 +67033,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `reportLabelCollection_get`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `reportLabelCollection_get`( vParam INT, vLabelCount INT ) @@ -68109,7 +67101,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `report_print`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `report_print`( vReportName VARCHAR(100), vPrinterFk INT, vUserFk INT, @@ -68205,7 +67197,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `routeGuessPriority`(IN vRuta INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -68238,7 +67230,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `routeInfo`(vRouteFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `routeInfo`(vRouteFk INT) BEGIN DECLARE vPackages INT; @@ -68284,7 +67276,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `routeMonitor_calculate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `routeMonitor_calculate`( vDate DATE, vDaysAgo INT ) @@ -68411,7 +67403,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `routeSetOk`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `routeSetOk`( vRouteFk INT) BEGIN @@ -68435,7 +67427,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `routeUpdateM3`(vRoute INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `routeUpdateM3`(vRoute INT) BEGIN /** * @deprecated Use vn.route_updateM3() @@ -68457,7 +67449,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `route_calcCommission`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `route_calcCommission`( vSelf INT ) BEGIN @@ -68564,7 +67556,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `route_doRecalc`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `route_doRecalc`() proc: BEGIN /** * Recalculates modified route. @@ -68625,7 +67617,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `route_getTickets`(vRouteFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `route_getTickets`(vRouteFk INT) BEGIN /** * Pasado un RouteFk devuelve la información @@ -68710,7 +67702,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `route_updateM3`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `route_updateM3`( vSelf INT ) BEGIN @@ -68741,7 +67733,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleBuy_Add`(vSaleFk INT, vBuyFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -68780,7 +67772,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleGroup_add`(vSectorFk INT,vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleGroup_add`(vSectorFk INT,vTicketFk INT) BEGIN /** * Añade un nuevo registro a la tabla y devuelve su id. @@ -68809,7 +67801,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleGroup_setParking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleGroup_setParking`( vSaleGroupFk VARCHAR(8), vParkingFk INT ) @@ -68842,7 +67834,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT) BEGIN INSERT INTO vn.saleMistake(saleFk, userFk, typeFk) @@ -68864,7 +67856,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `salePreparingList`(IN vTicketFk BIGINT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `salePreparingList`(IN vTicketFk BIGINT) BEGIN /** * Devuelve un listado con las lineas de vn.sale y los distintos estados de prepacion @@ -68923,7 +67915,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleSplit`(vSaleFk INT, vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleSplit`(vSaleFk INT, vQuantity INT) BEGIN @@ -68971,60 +67963,6 @@ 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 `sales_merge` */; -/*!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 `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 ; -/*!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 `sales_mergeByCollection` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -69033,7 +67971,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sales_mergeByCollection`(vCollectionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sales_mergeByCollection`(vCollectionFk INT) BEGIN DECLARE vDone BOOL; @@ -69060,7 +67998,7 @@ BEGIN LEAVE myLoop; END IF; - CALL vn.sales_merge(vTicketFk); + CALL ticket_mergeSales(vTicketFk); END LOOP; @@ -69082,7 +68020,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_add`(vSaleGroupFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_add`(vSaleGroupFk INT) BEGIN /** Inserta en vn.saleTracking las lineas de una previa * @@ -69117,7 +68055,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT) BEGIN /** * Inserta lineas de vn.saleTracking para un saleGroup (previa) que escanea un sacador @@ -69145,7 +68083,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_addPrevOK`(vSectorCollectionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_addPrevOK`(vSectorCollectionFk INT) BEGIN /** * Inserta los registros de la colección de sector con el estado PREVIA OK @@ -69183,7 +68121,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_del`(vSaleFk INT, vState VARCHAR(50)) BEGIN DELETE FROM itemShelvingSale @@ -69211,7 +68149,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_new`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_new`( vSaleFK INT, vIsChecked BOOLEAN, vOriginalQuantity INT, @@ -69262,7 +68200,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL) BEGIN /** @@ -69303,7 +68241,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_boxPickingPrint`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_boxPickingPrint`( IN vPrinterFk INT, IN vSaleFk INT, IN vPacking INT, @@ -69463,7 +68401,10 @@ w1: WHILE vQuantity >= vPacking DO UPDATE sale SET quantity = quantity - vPacking WHERE id = vSaleFk; - UPDATE itemShelving SET visible = visible - vPacking WHERE id = vItemShelvingFk; + UPDATE itemShelving + SET visible = visible - vPacking, + available = available - vPacking + WHERE id = vItemShelvingFk; SET vNewSaleFk = NULL; @@ -69592,16 +68533,16 @@ 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_calculateComponent` */; /*!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_calculateComponent`(vSelf INT, vOption VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_calculateComponent`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** * Crea tabla temporal para vn.sale_recalcComponent() para recalcular los componentes @@ -69633,7 +68574,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getBoxPickingList`(vSectorFk INT, vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_getBoxPickingList`(vSectorFk INT, vDated DATE) BEGIN /** * Returns a suitable boxPicking sales list @@ -69722,7 +68663,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getFromTicketOrCollection`(vParam INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_getFromTicketOrCollection`(vParam INT) BEGIN /** * Visualizar lineas de la tabla sale a través del parámetro vParam que puede @@ -69852,7 +68793,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblems`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_getProblems`( vIsTodayRelative tinyint(1) ) BEGIN @@ -69876,43 +68817,35 @@ 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, + isTooLittle) SELECT sgp.ticketFk, s.id, IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed, @@ -69922,10 +68855,6 @@ BEGIN 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 @@ -70068,24 +68997,31 @@ BEGIN GROUP BY sgp.ticketFk ) sub ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk; + + -- Redondeo: cantidad incorrecta con respecto al grouping + CALL buy_getUltimate(NULL, vWarehouseFk, vDate); + 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 + AND t.warehouseFk = vWarehouseFk + JOIN sale s ON s.ticketFk = sgp.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 sgp.ticketFk + )sub + ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk; + + DROP TEMPORARY TABLE tmp.buyUltimate; END LOOP; CLOSE vCursor; - 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 ; @@ -70103,7 +69039,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1)) BEGIN /** * Calcula los problemas de cada venta @@ -70141,7 +69077,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_PriceFix`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_PriceFix`(vTicketFk INT) BEGIN DELETE sc.* @@ -70176,7 +69112,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_recalcComponent`(vOption VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_recalcComponent`(vOption VARCHAR(25)) proc: BEGIN /** * Este procedimiento recalcula los componentes de un conjunto de sales, @@ -70304,7 +69240,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_replaceItem`(vSaleFk INT, vNewItemFk INT, vQuantity INT) BEGIN /** * Añade un nuevo articulo para sustituir a otro, y actualiza la memoria de sustituciones. @@ -70451,7 +69387,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_setProblem`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_setProblem`( vProblemCode VARCHAR(25) ) BEGIN @@ -70505,7 +69441,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_setProblemComponentLack`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_setProblemComponentLack`( vSelf INT ) BEGIN @@ -70543,7 +69479,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_setProblemComponentLackByComponent`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sale_setProblemComponentLackByComponent`( vComponentFk INT ) BEGIN @@ -70579,144 +69515,6 @@ 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_setProblemRounding` */; -/*!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_setProblemRounding`( - vSelf INT -) -BEGIN -/** - * Update the rounding problem for a sales line - * @param vSelf Id sale - */ - DECLARE vItemFk INT; - DECLARE vWarehouseFk INT; - DECLARE vShipped DATE; - DECLARE vQuantity INT; - DECLARE vIsProblemCalcNeeded BOOL; - - SELECT s.itemFk, t.warehouseFk, t.shipped, s.quantity, ticket_isProblemCalcNeeded(t.id) - INTO vItemFk, vWarehouseFk, vShipped, vQuantity, vIsProblemCalcNeeded - FROM sale s - JOIN ticket t ON t.id = s.ticketFk - WHERE s.id = vSelf; - - CALL buy_getUltimate(vItemFk, vWarehouseFk, vShipped); - - CREATE OR REPLACE TEMPORARY TABLE tmp.sale - SELECT vSelf saleFk, - MOD(vQuantity, b.`grouping`) hasProblem, - vIsProblemCalcNeeded isProblemCalcNeeded - FROM tmp.buyUltimate bu - JOIN buy b ON b.id = bu.buyFk - WHERE bu.itemFk = vItemFk; - - CALL sale_setProblem('hasRounding'); - - DROP TEMPORARY TABLE tmp.sale; - DROP TEMPORARY TABLE tmp.buyUltimate; -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 `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 */ ; @@ -70725,7 +69523,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT) BEGIN /** * Inserta un nuevo registro en vn.sectorCollectionSaleGroup @@ -70795,7 +69593,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_get`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorCollection_get`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas @@ -70830,7 +69628,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_getMyPartial`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorCollection_getMyPartial`() BEGIN /** * Devuelve las colecciones del sector que corresponden al usuario conectado, y que estan incompletas @@ -70861,7 +69659,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_getSale`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorCollection_getSale`(vSelf INT) BEGIN /** * Devuelve las lineas de venta correspondientes a esa coleccion de sector @@ -70906,7 +69704,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_new`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorCollection_new`(vSectorFk INT) BEGIN /** * Inserta una nueva colección, si el usuario no tiene ninguna vacia. @@ -70947,7 +69745,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorProductivity_add`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sectorProductivity_add`() BEGIN DECLARE vDatedFrom DATETIME; DECLARE vDatedTo DATETIME; @@ -71034,7 +69832,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sector_getWarehouse`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `sector_getWarehouse`(vSectorFk INT) BEGIN SELECT s.warehouseFk @@ -71057,7 +69855,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `setParking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `setParking`( vParam VARCHAR(8), vParkingCode VARCHAR(8) ) @@ -71111,7 +69909,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8)) BEGIN UPDATE vn.itemShelving @@ -71135,7 +69933,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingLog_get`(shelvingFk VARCHAR(10)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelvingLog_get`(shelvingFk VARCHAR(10)) BEGIN /* Lista el log de un carro @@ -71166,7 +69964,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT) BEGIN @@ -71202,7 +70000,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10)) BEGIN UPDATE vn.shelving SET priority = priority WHERE code=vShelvingFk COLLATE utf8_unicode_ci; @@ -71223,7 +70021,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_clean`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelving_clean`() BEGIN DELETE FROM shelving @@ -71249,8 +70047,9 @@ UPDATE shelving sh AND ( sh.parked IS NULL OR - sh.parked < TIMESTAMPADD(MONTH,-1,util.VN_CURDATE()) - ) + sh.parked < util.VN_CURDATE() - INTERVAL 2 WEEK + ) + AND IF(code REGEXP '^[A-Za-z]{2}[0-9]', LEFT (code, 2) NOT IN ( SELECT DISTINCT LEFT(its.shelvingFk, 2) FROM itemShelving its @@ -71273,7 +70072,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_getSpam`(vDated DATE, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelving_getSpam`(vDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve las matrículas con productos que no son necesarios para la venta @@ -71370,7 +70169,10 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `shelving_setParking`( + `vShelvingCode` VARCHAR(8), + `vParkingFk` INT +) BEGIN /** * Aparca una matrícula en un parking @@ -71406,7 +70208,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `sleep_X_min`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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;) @@ -71419,16 +70221,91 @@ 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 `stockBought_calculate` */; +/*!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=`vn`@`localhost` PROCEDURE `stockBought_calculate`( + vDated DATE +) +proc: BEGIN +/** + * Calculate the stock of the auction warehouse from the inventory date to vDated + * without taking into account the outputs of the same day vDated + * + * @param vDated Date to calculate the stock. + */ + IF vDated < util.VN_CURDATE() THEN + LEAVE proc; + END IF; + + CREATE OR REPLACE TEMPORARY TABLE tStockBought + SELECT workerFk, reserve + FROM stockBought + WHERE dated = vDated + AND reserve; + + DELETE FROM stockBought WHERE dated = vDated; + + CALL item_calculateStock(vDated); + + INSERT INTO stockBought(workerFk, bought, dated) + SELECT it.workerFk, + ROUND(SUM( + (ti.quantity / b.packing) * + buy_getVolume(b.id) + ) / vc.palletM3 / 1000000, 1) bought, + vDated + FROM itemType it + JOIN item i ON i.typeFk = it.id + LEFT JOIN tmp.item ti ON ti.itemFk = i.id + JOIN itemCategory ic ON ic.id = it.categoryFk + JOIN warehouse wh ON wh.code = 'VNH' + JOIN tmp.buyUltimate bu ON bu.itemFk = i.id + AND bu.warehouseFk = wh.id + JOIN buy b ON b.id = bu.buyFk + JOIN volumeConfig vc + WHERE ic.display + GROUP BY it.workerFk + HAVING bought; + + UPDATE stockBought s + JOIN tStockBought ts ON ts.workerFk = s.workerFk + SET s.reserve = ts.reserve + WHERE s.dated = vDated; + + INSERT INTO stockBought (workerFk, reserve, dated) + SELECT ts.workerFk, ts.reserve, vDated + FROM tStockBought ts + WHERE ts.workerFk NOT IN ( + SELECT workerFk + FROM stockBought + WHERE dated = vDated + ); + + DROP TEMPORARY TABLE tStockBought, tmp.item, tmp.buyUltimate; +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 `stockBuyedByWorker` */; /*!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 `stockBuyedByWorker`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `stockBuyedByWorker`( vDated DATE, vWorker INT ) @@ -71515,7 +70392,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `stockBuyed_add`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `stockBuyed_add`( vDated DATE ) BEGIN @@ -71598,7 +70475,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `stockTraslation`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `stockTraslation`( vDated DATE ) BEGIN @@ -71652,7 +70529,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `subordinateGetList`(vBossFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `subordinateGetList`(vBossFk INT) BEGIN -- deprecated usar vn.worker_GetHierarch @@ -71715,7 +70592,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplierExpenses`(vEnded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplierExpenses`(vEnded DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS openingBalance; @@ -71807,7 +70684,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplierPackaging_ReportSource`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplierPackaging_ReportSource`( vFromDated DATE, vSupplierFk INT ) @@ -71987,7 +70864,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL) BEGIN /** * Compara los datos de nuestros proveedores con @@ -72074,7 +70951,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_checkIsActive`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplier_checkIsActive`(vSelf INT) BEGIN /** * Comprueba si un proveedor esta activo. @@ -72104,7 +70981,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_disablePayMethodChecked`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplier_disablePayMethodChecked`() BEGIN /* @@ -72142,7 +71019,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_statementWithEntries`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `supplier_statementWithEntries`( vSupplierFk INT, vCurrencyFk INT, vCompanyFk INT, @@ -72160,14 +71037,14 @@ BEGIN * @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 +* @return tmp.supplierStatement */ DECLARE vBalanceStartingDate DATETIME; SET @euroBalance:= 0; SET @currencyBalance:= 0; - SELECT balanceStartingDate + SELECT balanceStartingDate INTO vBalanceStartingDate FROM invoiceInConfig; @@ -72207,14 +71084,14 @@ BEGIN c.code, 'invoiceIn' statementType FROM invoiceIn ii - JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id + LEFT 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 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 + GROUP BY iid.id, ii.id UNION ALL SELECT p.bankFk, p.companyFk, @@ -72250,7 +71127,7 @@ BEGIN AND vCurrencyFk IN (p.currencyFk, 0) AND vCompanyFk IN (p.companyFk, 0) AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) - UNION ALL + UNION ALL SELECT NULL, companyFk, NULL, @@ -72277,7 +71154,7 @@ BEGIN AND vCurrencyFk IN (se.currencyFk,0) AND vCompanyFk IN (se.companyFk,0) AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) - UNION ALL + UNION ALL SELECT NULL bankFk, e.companyFk, 'E' serial, @@ -72293,7 +71170,7 @@ BEGIN FALSE isBooked, c.code, 'order' - FROM entry e + FROM entry e JOIN travel tr ON tr.id = e.travelFk JOIN currency c ON c.id = e.currencyFk WHERE e.supplierFk = vSupplierFk @@ -72312,16 +71189,16 @@ 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 `ticketBoxesView` */; /*!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 `ticketBoxesView`(IN vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketBoxesView`(IN vTicketFk INT) BEGIN SELECT s.id, @@ -72359,7 +71236,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketBuiltTime`(vDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketBuiltTime`(vDate DATE) BEGIN DECLARE vDateStart DATETIME DEFAULT DATE(vDate); @@ -72410,7 +71287,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) BEGIN /* * Recalcula los componentes un ticket clonado, @@ -72460,7 +71337,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculateFromType`( vLanded DATE, +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketCalculateFromType`( vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vTypeFk INT) @@ -72491,7 +71368,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculatePurge`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketCalculatePurge`() BEGIN DROP TEMPORARY TABLE tmp.ticketCalculateItem, @@ -72515,7 +71392,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketClon`(vTicketFk INT, vNewShipped DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketClon`(vTicketFk INT, vNewShipped DATE) BEGIN DECLARE vNewTicketFk INT; @@ -72538,7 +71415,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketClon_OneYear`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketClon_OneYear`(vTicketFk INT) BEGIN DECLARE vShipped DATE; @@ -72573,7 +71450,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCollection_get`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketCollection_get`(vTicketFk INT) BEGIN SELECT tc.collectionFk @@ -72596,7 +71473,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT) BEGIN /* @@ -72617,16 +71494,16 @@ 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 `ticketComponentUpdate` */; /*!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 `ticketComponentUpdate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketComponentUpdate`( vTicketFk INT, vClientFk INT, vAgencyModeFk INT, @@ -72692,16 +71569,16 @@ 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 `ticketComponentUpdateSale` */; /*!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 `ticketComponentUpdateSale`(vCode VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketComponentUpdateSale`(vCode VARCHAR(25)) BEGIN /** * A partir de la tabla tmp.sale, crea los Movimientos_componentes @@ -72825,7 +71702,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketDown_PrintableSelection`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketDown_PrintableSelection`(vSectorFk INT) BEGIN UPDATE vn.ticketDown td @@ -72860,7 +71737,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTaxAdd`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketGetTaxAdd`(vTicketFk INT) BEGIN /** * Añade un ticket a la tabla tmp.ticket para calcular @@ -72904,7 +71781,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTax_new`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketGetTax_new`() READS SQL DATA BEGIN /** @@ -72983,7 +71860,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTotal`(vTaxArea VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketGetTotal`(vTaxArea VARCHAR(25)) BEGIN /** * Calcula el total con IVA para un conjunto de tickets. @@ -73023,7 +71900,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetVisibleAvailable`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketGetVisibleAvailable`( vTicket INT) BEGIN DECLARE vVisibleCalc INT; @@ -73072,7 +71949,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketNotInvoicedByClient`(vClientFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketNotInvoicedByClient`(vClientFk INT) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticket; @@ -73115,7 +71992,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketObservation_addNewBorn`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketObservation_addNewBorn`(vTicketFk INT) BEGIN /** @@ -73148,7 +72025,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketPackaging_add`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketPackaging_add`( vClientFk INT, vDated DATE, vCompanyFk INT, @@ -73302,7 +72179,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1)) BEGIN /** @@ -73381,7 +72258,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45)) BEGIN /* Modifica el estado de un ticket de hoy @@ -73424,7 +72301,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByAddress`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketToInvoiceByAddress`( vStarted DATE, vEnded DATETIME, vAddress INT, @@ -73460,7 +72337,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByDate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketToInvoiceByDate`( vStarted DATE, vEnded DATETIME, vClient INT, @@ -73496,7 +72373,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15)) BEGIN /* Para tickets ya facturados, vuelve a repetir el proceso de facturación. @@ -73556,7 +72433,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_add`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_add`( vClientId INT ,vShipped DATE ,vWarehouseFk INT @@ -73694,7 +72571,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN INSERT INTO vn.ticket(clientFk, addressFk, shipped, warehouseFk, companyFk, landed) @@ -73726,7 +72603,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) BEGIN /** * Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar. @@ -73746,8 +72623,7 @@ BEGIN CREATE OR REPLACE TEMPORARY TABLE tmp.filter (INDEX (id)) - SELECT - origin.ticketFk futureId, + SELECT origin.ticketFk futureId, dest.ticketFk id, dest.state, origin.futureState, @@ -73778,48 +72654,48 @@ BEGIN origin.warehouseFk futureWarehouseFk, origin.companyFk futureCompanyFk, IFNULL(dest.nickname, origin.nickname) nickname, - dest.landed + dest.landed, + dest.preparation FROM ( - SELECT - s.ticketFk, - c.salesPersonFk workerFk, - t.shipped, - t.totalWithVat, - st.name futureState, - am.name futureAgency, - count(s.id) futureLines, - GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) futureIpt, - CAST(SUM(litros) AS DECIMAL(10,0)) futureLiters, - SUM(s.quantity <= (IFNULL(il.stock,0) + IFNULL(im.amount, 0))) hasStock, - z.id futureZoneFk, - z.name futureZoneName, - st.classColor, - t.clientFk, - t.nickname, - t.addressFk, - t.warehouseFk, - t.companyFk, - t.agencyModeFk - FROM ticket t - JOIN client c ON c.id = t.clientFk - JOIN sale s ON s.ticketFk = t.id - JOIN saleVolume sv ON sv.saleFk = s.id - JOIN item i ON i.id = s.itemFk - JOIN ticketState ts ON ts.ticketFk = t.id - JOIN state st ON st.id = ts.stateFk - JOIN agencyMode am ON t.agencyModeFk = am.id - JOIN zone z ON t.zoneFk = z.id - LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk - LEFT JOIN tmp.itemMinacum im ON im.itemFk = i.id - AND im.warehouseFk = vWarehouseFk - LEFT JOIN tmp.itemList il ON il.itemFk = i.id - WHERE t.shipped BETWEEN vDateFuture AND util.dayend(vDateFuture) - AND t.warehouseFk = vWarehouseFk - GROUP BY t.id + SELECT s.ticketFk, + c.salesPersonFk workerFk, + t.shipped, + t.totalWithVat, + st.name futureState, + am.name futureAgency, + count(s.id) futureLines, + GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) futureIpt, + CAST(SUM(litros) AS DECIMAL(10,0)) futureLiters, + SUM(s.quantity <= (IFNULL(il.stock,0) + IFNULL(im.amount, 0))) hasStock, + z.id futureZoneFk, + z.name futureZoneName, + st.classColor, + t.clientFk, + t.nickname, + t.addressFk, + t.warehouseFk, + t.companyFk, + t.agencyModeFk + FROM ticket t + JOIN client c ON c.id = t.clientFk + JOIN sale s ON s.ticketFk = t.id + JOIN saleVolume sv ON sv.saleFk = s.id + JOIN item i ON i.id = s.itemFk + JOIN ticketState ts ON ts.ticketFk = t.id + JOIN `state` st ON st.id = ts.stateFk + JOIN agencyMode am ON t.agencyModeFk = am.id + JOIN `zone` z ON t.zoneFk = z.id + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk + LEFT JOIN tmp.itemMinacum im ON im.itemFk = i.id + AND im.warehouseFk = vWarehouseFk + LEFT JOIN tmp.itemList il ON il.itemFk = i.id + WHERE t.shipped BETWEEN vDateFuture AND util.dayend(vDateFuture) + AND t.warehouseFk = vWarehouseFk + GROUP BY t.id ) origin LEFT JOIN ( - SELECT - t.id ticketFk, + SELECT t.id ticketFk, st.name state, GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) ipt, t.shipped, @@ -73835,18 +72711,25 @@ BEGIN t.warehouseFk, t.companyFk, t.landed, - t.agencyModeFk + t.agencyModeFk, + SEC_TO_TIME( + COALESCE(HOUR(t.shipped), HOUR(zc.hour), HOUR(z.hour)) * 3600 + + COALESCE(MINUTE(t.shipped), MINUTE(zc.hour), MINUTE(z.hour)) * 60 + ) preparation FROM ticket t JOIN sale s ON s.ticketFk = t.id JOIN saleVolume sv ON sv.saleFk = s.id JOIN item i ON i.id = s.itemFk JOIN ticketState ts ON ts.ticketFk = t.id - JOIN state st ON st.id = ts.stateFk + JOIN `state` st ON st.id = ts.stateFk JOIN agencyMode am ON t.agencyModeFk = am.id LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk + LEFT JOIN `zone` z ON z.id = t.zoneFk + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + JOIN ticketCanAdvanceConfig tc WHERE t.shipped BETWEEN vDateToAdvance AND util.dayend(vDateToAdvance) AND t.warehouseFk = vWarehouseFk - AND st.order <= 5 + AND st.order <= tc.destinationOrder GROUP BY t.id ) dest ON dest.addressFk = origin.addressFk WHERE origin.hasStock; @@ -73870,7 +72753,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) BEGIN /** * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro @@ -73892,6 +72775,7 @@ BEGIN t.clientFk, t.warehouseFk, ts.alertLevel, + sub2.alertLevel futureAlertLevel, t.shipped, t.totalWithVat, sub2.shipped futureShipped, @@ -73918,6 +72802,7 @@ BEGIN t.addressFk, t.id, t.shipped, + ts.alertLevel, st.name state, st.code, st.classColor, @@ -73947,16 +72832,16 @@ 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 `ticket_canMerge` */; /*!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 `ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -74034,7 +72919,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME) BEGIN /** @@ -74093,7 +72978,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT) BEGIN /** * Clona el contenido de un ticket en otro @@ -74172,7 +73057,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) BEGIN DECLARE vDone BOOLEAN DEFAULT FALSE; @@ -74240,7 +73125,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_cloneWeekly`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_cloneWeekly`( vDateFrom DATE, vDateTo DATE ) @@ -74465,7 +73350,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_close`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_close`() BEGIN /** * Realiza el cierre de todos los @@ -74483,6 +73368,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; @@ -74549,14 +73435,17 @@ BEGIN GROUP BY e.freightItemFk); IF(vHasDailyInvoice) AND vHasToInvoice THEN + SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial; + IF vSerial IS NULL 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, @@ -74585,7 +73474,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_closeByTicket`(IN vTicketFk int) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_closeByTicket`(IN vTicketFk int) BEGIN /** * Inserta el ticket en la tabla temporal @@ -74617,16 +73506,16 @@ 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 `ticket_componentMakeUpdate` */; /*!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 `ticket_componentMakeUpdate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_componentMakeUpdate`( vTicketFk INT, vClientFk INT, vNickname VARCHAR(50), @@ -74736,7 +73625,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_componentPreview`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_componentPreview`( vTicketFk INT, vLanded DATE, vAddressFk INT, @@ -74849,7 +73738,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT) BEGIN DECLARE done INT DEFAULT FALSE; DECLARE vTicketFk INT; @@ -74898,7 +73787,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_DelayTruckSplit`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_DelayTruckSplit`( vTicketFk INT ) BEGIN @@ -74970,7 +73859,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_doCmr`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_doCmr`(vSelf INT) BEGIN /** * Crea u actualiza la información del CMR asociado con @@ -75065,7 +73954,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE) BEGIN /** * Genera una tabla con la lista de tickets de Floramondo @@ -75205,7 +74094,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getMovable`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getMovable`( vTicketFk INT, vNewShipped DATETIME, vWarehouseFk INT @@ -75273,7 +74162,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getProblems`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getProblems`( vIsTodayRelative tinyint(1) ) BEGIN @@ -75310,7 +74199,7 @@ BEGIN UPDATE tmp.ticket_problems SET totalProblems = ( (isFreezed) + - (hasRisk) + + (hasHighRisk) + (hasTicketRequest) + (!isTaxDataChecked) + (hasComponentLack) + @@ -75339,7 +74228,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT) BEGIN /** * Devuelve un listado con los tickets posibles para splitar HOY. @@ -75512,7 +74401,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getTax`(IN vTaxArea VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getTax`(IN vTaxArea VARCHAR(25)) BEGIN /** * Calcula la base imponible, el IVA y el recargo de equivalencia para @@ -75628,7 +74517,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getWarnings`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getWarnings`() BEGIN /** * Calcula las adventencias para un conjunto de tickets. @@ -75683,7 +74572,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getWithParameters`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_getWithParameters`( vClientFk INT, vWarehouseFk INT, vShipped DATE, @@ -75745,7 +74634,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_insertZone`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_insertZone`() BEGIN DECLARE vDone INT DEFAULT 0; DECLARE vFechedTicket INT; @@ -75780,6 +74669,62 @@ 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_mergeSales` */; +/*!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=`vn`@`localhost` PROCEDURE `ticket_mergeSales`( + vSelf 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 = vSelf + 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 = vSelf; + + 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 = vSelf + AND stp.id IS NULL + AND it.isMergeable; + + COMMIT; + + DROP TEMPORARY TABLE tSalesToPreserve; +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_priceDifference` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -75788,7 +74733,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_priceDifference`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_priceDifference`( vTicketFk INT, vLanded DATE, vAddressFk INT, @@ -75845,7 +74790,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_printLabelPrevious`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_printLabelPrevious`(vTicketFk INT) BEGIN /** * Calls the report_print procedure and passes it @@ -75891,7 +74836,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25)) proc:BEGIN /** * Calcula y guarda el total con/sin IVA en un ticket. @@ -75941,7 +74886,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_recalcByScope`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_recalcByScope`( vScope VARCHAR(255), vId INT ) @@ -75998,16 +74943,16 @@ 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 `ticket_recalcComponents` */; /*!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 `ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_recalcComponents`(vSelf INT, vOption VARCHAR(25)) proc: BEGIN /** @@ -76041,7 +74986,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setNextState`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setNextState`( vSelf INT ) BEGIN @@ -76088,7 +75033,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setParking`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setParking`( vSelf INT, vParkingFk INT ) @@ -76137,16 +75082,16 @@ 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 `ticket_setPreviousState` */; /*!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 `ticket_setPreviousState`(vTicketFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setPreviousState`(vTicketFk INT) BEGIN DECLARE vControlFk INT; @@ -76191,7 +75136,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblem`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblem`( vProblemCode VARCHAR(25) ) BEGIN @@ -76245,7 +75190,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemFreeze`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemFreeze`( vClientFk INT ) BEGIN @@ -76289,7 +75234,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemRequest`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemRequest`( vSelf INT ) BEGIN @@ -76332,7 +75277,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemRisk`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemRisk`( vSelf INT ) BEGIN @@ -76387,7 +75332,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemRiskByClient`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemRiskByClient`( vClientFk INT ) BEGIN @@ -76427,56 +75372,6 @@ 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_setProblemRounding` */; -/*!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_setProblemRounding`( - vSelf INT -) -BEGIN -/** - * Update the rounding problem for the sales lines of a ticket - * - * @param vSelf Id de ticket - */ - DECLARE vWarehouseFk INT; - DECLARE vDated DATE; - - SELECT warehouseFk, shipped - INTO vWarehouseFk, vDated - FROM ticket - WHERE id = vSelf; - - CALL buy_getUltimate(NULL, vWarehouseFk, vDated); - - CREATE OR REPLACE TEMPORARY TABLE tmp.sale - (INDEX(saleFk, isProblemCalcNeeded)) - SELECT s.id saleFk , - MOD(s.quantity, b.`grouping`) hasProblem, - ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded - FROM ticket t - JOIN sale s ON s.ticketFk = t.id - JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk - JOIN buy b ON b.id = bu.buyFk - WHERE t.id = vSelf; - - CALL sale_setProblem('hasRounding'); - - DROP TEMPORARY TABLE tmp.sale; - DROP TEMPORARY TABLE tmp.buyUltimate; -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_setProblemTaxDataChecked` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -76485,7 +75380,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemTaxDataChecked`(vClientFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemTaxDataChecked`(vClientFk INT) BEGIN /** * Update the problem of tickets, depending on whether @@ -76523,7 +75418,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemTooLittle`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemTooLittle`( vSelf INT ) BEGIN @@ -76570,7 +75465,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setProblemTooLittleItemCost`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setProblemTooLittleItemCost`( vItemFk INT ) BEGIN @@ -76614,7 +75509,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setRisk`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setRisk`( vClientFk INT ) BEGIN @@ -76710,7 +75605,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setState`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_setState`( vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci ) @@ -76771,6 +75666,95 @@ 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_setVolume` */; +/*!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=`vn`@`localhost` PROCEDURE `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 ; +/*!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_setVolumeItemCost` */; +/*!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=`vn`@`localhost` PROCEDURE `ticket_setVolumeItemCost`( + vItemFk INT +) +BEGIN +/** + * Update the volume of tickets containing the item. + * + * @param vItemFk Item id + */ + DECLARE vTicket INT; + DECLARE vDone BOOL; + + DECLARE vTickets CURSOR FOR + SELECT DISTINCT t.id + 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 s.itemFk = vItemFk + AND t.shipped >= util.VN_CURDATE() + AND t.refFk IS NULL; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + OPEN vTickets; + l: LOOP + FETCH vTickets INTO vTicket; + + IF vDone THEN + LEAVE l; + END IF; + + CALL ticket_setVolume(vTicket); + + END LOOP l; + 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_split` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -76779,7 +75763,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_split`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_split`( vTicketFk INT, vTicketFutureFk INT, vDated DATE @@ -76868,7 +75852,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_splitItemPackingType`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_splitItemPackingType`( vSelf INT, vOriginalItemPackingTypeFk VARCHAR(1) ) @@ -76885,8 +75869,6 @@ BEGIN DECLARE vNewTicketFk INT; DECLARE vPackingTypesToSplit INT; DECLARE vDone INT DEFAULT FALSE; - DECLARE vErrorNumber INT; - DECLARE vErrorMsg TEXT; DECLARE vSaleGroup CURSOR FOR SELECT itemPackingTypeFk @@ -76896,21 +75878,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('ticket_splitItemPackingType', JSON_OBJECT( - 'errorNumber', vErrorNumber, - 'errorMsg', vErrorMsg, - 'ticketFk', vSelf - )); -- Tmp - ROLLBACK; - RESIGNAL; - END; - START TRANSACTION; SELECT id @@ -77024,7 +75991,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT) BEGIN DECLARE vNeedToSplit BOOLEAN; @@ -77079,7 +76046,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_WeightDeclaration`(vClientFk INT, vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `ticket_WeightDeclaration`(vClientFk INT, vDated DATE) BEGIN DECLARE vTheorycalWeight DECIMAL(10,2); @@ -77142,7 +76109,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `till_new`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `till_new`( vClient INT, vBank INT, vAmount DOUBLE, @@ -77228,7 +76195,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * Horas que debe trabajar un empleado según contrato y día. @@ -77326,7 +76293,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77358,7 +76325,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk @@ -77396,7 +76363,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77431,7 +76398,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77465,7 +76432,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculate`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_calculate`( vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN @@ -77672,7 +76639,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77704,7 +76671,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** * @param vDepartmentFk @@ -77742,7 +76709,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77777,7 +76744,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /** @@ -77812,7 +76779,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME) BEGIN /* * @param vDatedFrom @@ -77895,7 +76862,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_checkStatus`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `tpvTransaction_checkStatus`() BEGIN /** * @@ -77923,16 +76890,16 @@ 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 `travelVolume` */; /*!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 `travelVolume`(vTravelFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travelVolume`(vTravelFk INT) BEGIN SELECT w1.name AS ORI, @@ -77966,16 +76933,16 @@ 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 `travelVolume_get` */; /*!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 `travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT) BEGIN SELECT tr.landed Fecha, a.name Agencia, @@ -78005,7 +76972,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkDates`(vShipped DATE, vLanded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_checkDates`(vShipped DATE, vLanded DATE) BEGIN /** * Checks the landing/shipment dates of travel, throws an error @@ -78035,7 +77002,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkPackaging`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_checkPackaging`(vSelf INT) BEGIN DECLARE vDone BOOL; DECLARE vEntryFk INT; @@ -78078,7 +77045,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_checkWarehouseIsFeedStock`(vWarehouseFk INT) proc: BEGIN /* * Check that the warehouse is not Feed Stock @@ -78108,7 +77075,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT) BEGIN /** * Clona un travel el número de dias indicado y devuelve su id. @@ -78169,7 +77136,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_cloneWithEntries`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_cloneWithEntries`( IN vTravelFk INT, IN vDateStart DATE, IN vDateEnd DATE, @@ -78263,7 +77230,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_getDetailFromContinent`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_getDetailFromContinent`( vContinentFk INT ) BEGIN @@ -78376,16 +77343,16 @@ 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 `travel_getEntriesMissingPackage` */; /*!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 `travel_getEntriesMissingPackage`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_getEntriesMissingPackage`(vSelf INT) BEGIN DECLARE vpackageOrPackingNull INT; DECLARE vTravelFk INT; @@ -78416,7 +77383,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_moveRaids`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_moveRaids`() BEGIN /* @@ -78501,7 +77468,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_recalc`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_recalc`(vSelf INT) proc: BEGIN /** * Updates the number of entries assigned to the travel. @@ -78531,7 +77498,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_throwAwb`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_throwAwb`(vSelf INT) BEGIN /** * Throws an error if travel does not have a logical AWB @@ -78558,7 +77525,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_upcomingArrivals`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_upcomingArrivals`( vWarehouseFk INT, vDate DATETIME ) @@ -78652,7 +77619,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_updatePacking`(vItemFk INT, vPacking INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_updatePacking`(vItemFk INT, vPacking INT) BEGIN /** * Actualiza packing para los movimientos de almacén de la subasta al almacén central @@ -78694,7 +77661,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_weeklyClone`(vSinceWeek INT, vToWeek INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `travel_weeklyClone`(vSinceWeek INT, vToWeek INT) BEGIN /** * Clona los traslados plantilla para las semanas pasadas por parámetros. @@ -78780,7 +77747,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `typeTagMake`(vTypeFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `typeTagMake`(vTypeFk INT) BEGIN /* * Plantilla para modificar reemplazar todos los tags @@ -78851,7 +77818,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `updatePedidosInternos`(vItemFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `updatePedidosInternos`(vItemFk INT) BEGIN UPDATE vn.item SET upToDown = 0 WHERE item.id = vItemFk; @@ -78873,7 +77840,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2)) BEGIN /** * Comprueba si la matricula pasada tiene el formato correcto dependiendo del pais del vehiculo @@ -78903,7 +77870,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `vehicle_notifyEvents`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `vehicle_notifyEvents`() proc:BEGIN /** * Query the vehicleEvent table to see if there are any events that need to be notified. @@ -78967,7 +77934,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `visible_getMisfit`(vSectorFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `visible_getMisfit`(vSectorFk INT) BEGIN /* Devuelve una tabla temporal con los descuadres entre el visible teórico y lo ubicado en la práctica @@ -79026,7 +77993,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT) BEGIN DECLARE vCacheVisibleOriginFk INT; DECLARE vCacheVisibleDestinyFk INT; @@ -79064,7 +78031,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `warehouseFitting_byTravel`(IN vTravelFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `warehouseFitting_byTravel`(IN vTravelFk INT) BEGIN DECLARE vWhOrigin INT; @@ -79092,7 +78059,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalculateBoss`(vWorker INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerCalculateBoss`(vWorker INT) BEGIN /** * Actualiza la tabla workerBosses @@ -79133,7 +78100,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT) BEGIN /** * Calcula los días y horas de vacaciones en función de un contrato y año @@ -79207,7 +78174,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerCalendar_calculateYear`(vYear INT, vWorkerFk INT) BEGIN /** @@ -79279,7 +78246,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCreateExternal`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerCreateExternal`( vFirstName VARCHAR(50), vSurname1 VARCHAR(50), vSurname2 VARCHAR(50), @@ -79321,7 +78288,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDepartmentByDate`(vDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerDepartmentByDate`(vDate DATE) BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.workerDepartmentByDate; @@ -79358,7 +78325,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDisable`(vUserId int) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerDisable`(vUserId int) mainLabel:BEGIN IF (SELECT COUNT(*) FROM workerDisableExcluded WHERE workerFk = vUserId AND (dated > util.VN_CURDATE() OR dated IS NULL)) > 0 THEN @@ -79407,7 +78374,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDisableAll`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerDisableAll`() BEGIN DECLARE done BOOL DEFAULT FALSE; DECLARE vUserFk INT; @@ -79456,7 +78423,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerForAllCalculateBoss`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerForAllCalculateBoss`() BEGIN /** * Actualiza la tabla workerBosses utilizando el procedimiento @@ -79502,7 +78469,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerJourney_replace`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerJourney_replace`( vDatedFrom DATE, vDatedTo DATE, vWorkerFk INT) @@ -79823,7 +78790,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerMistakeType_get`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerMistakeType_get`() BEGIN /** @@ -79850,7 +78817,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10)) BEGIN /** * Añade error al trabajador @@ -79878,7 +78845,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE) BEGIN SET @order := 0; @@ -79904,7 +78871,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_calculateOddDays`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_calculateOddDays`() BEGIN /** * Calculo de las fichadas impares por empleado y dia. @@ -79951,7 +78918,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -80132,7 +79099,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_checkBreak`(vStarted DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_checkBreak`(vStarted DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas @@ -80299,7 +79266,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_clockIn`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_clockIn`( vWorkerFk INT, vTimed DATETIME, vDirection VARCHAR(10), @@ -80607,7 +79574,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME) BEGIN /** * Devuelve que direcciones de fichadas son lógicas a partir de la anterior fichada @@ -80696,7 +79663,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_getClockIn`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_getClockIn`( vUserFk INT, vDated DATE) BEGIN @@ -80787,7 +79754,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_login`(vWorkerFk VARCHAR(10)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -80826,7 +79793,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME) BEGIN DECLARE vDirectionRemove VARCHAR(6); @@ -80888,7 +79855,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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. @@ -81030,7 +79997,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_sendMailByDepartmentLauncher`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_sendMailByDepartmentLauncher`() BEGIN DECLARE vDatedFrom, vDatedTo DATETIME; @@ -81055,7 +80022,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE) BEGIN /** * Retorna los trabajadores que no han respetado el descanso semanal de 36/72 horas @@ -81104,7 +80071,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `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 @@ -81250,7 +80217,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_checkMultipleDevice`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_checkMultipleDevice`( vSelf INT ) BEGIN @@ -81287,7 +80254,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getFromHasMistake`(vDepartmentFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_getFromHasMistake`(vDepartmentFk INT) BEGIN /** @@ -81319,7 +80286,9 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getHierarchy`(vUserFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_getHierarchy`( + vUserFk INT +) BEGIN /** * Retorna una tabla temporal con los trabajadores que tiene @@ -81332,15 +80301,16 @@ BEGIN (PRIMARY KEY (workerFk)) ENGINE = MEMORY WITH RECURSIVE workerHierarchy AS ( - SELECT id workerFk, bossFk, 0 depth + SELECT id workerFk, bossFk, 0 `depth`, CAST(id AS CHAR(255)) `path` FROM vn.worker WHERE id = vUserFk UNION ALL - SELECT w.id, w.bossFk, wh.depth + 1 + SELECT w.id, w.bossFk, wh.`depth` + 1, CONCAT(wh.`path`, ',', w.id) FROM vn.worker w JOIN workerHierarchy wh ON w.bossFk = wh.workerFk + WHERE NOT FIND_IN_SET(w.id, wh.`path`) ) - SELECT * + SELECT * FROM workerHierarchy ORDER BY depth, workerFk; END ;; @@ -81359,7 +80329,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getSector`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_getSector`() BEGIN /** @@ -81387,7 +80357,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_updateBalance`(vSelf INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2)) BEGIN /** * Actualiza la columna balance de worker. @@ -81413,7 +80383,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateBusiness`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_updateBusiness`(vSelf INT) BEGIN /** * Activates an account and configures its email settings. @@ -81460,7 +80430,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateChangedBusiness`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `worker_updateChangedBusiness`() BEGIN /** * Actualiza el contrato actual de todos los trabajadores cuyo contracto ha @@ -81513,7 +80483,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHours`(username varchar(255), logon boolean) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workingHours`(username varchar(255), logon boolean) BEGIN DECLARE userid int(11); @@ -81542,7 +80512,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHoursTimeIn`(vUserId INT(11)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workingHoursTimeIn`(vUserId INT(11)) BEGIN INSERT INTO vn.workingHours (timeIn, userId) VALUES (util.VN_NOW(),vUserId); @@ -81562,7 +80532,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHoursTimeOut`(vUserId INT(11)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `workingHoursTimeOut`(vUserId INT(11)) BEGIN UPDATE vn.workingHours SET timeOut = util.VN_NOW() @@ -81584,7 +80554,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `wrongEqualizatedClient`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `wrongEqualizatedClient`() BEGIN SELECT clientFk, c.name, c.isActive, c.isTaxDataChecked, count(ie) as num FROM vn.client c @@ -81624,7 +80594,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `XDiario_check`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `XDiario_check`() BEGIN /** * Realiza la revisión diaria de los asientos contables, @@ -81665,7 +80635,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `XDiario_checkDate`(vDate DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `XDiario_checkDate`(vDate DATE) proc: BEGIN /** * Comprueba si la fecha pasada esta en el rango @@ -81702,7 +80672,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `xdiario_new`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `xdiario_new`( vBookNumber INT, vDated DATE, vSubaccount VARCHAR(12), @@ -81758,7 +80728,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneClosure_recalc`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneClosure_recalc`() proc: BEGIN /** * Recalculates the delivery time (hour) for every zone in days + scope in future @@ -81818,7 +80788,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_calcTree`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_calcTree`() BEGIN /** * Calculates the #path, #lft, #rgt, #sons and #depth columns of @@ -81862,7 +80832,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_calcTreeRec`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_calcTreeRec`( vSelf INT, vPath VARCHAR(255), vDepth INT, @@ -81944,7 +80914,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_checkName`(vName VARCHAR(255)) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_checkName`(vName VARCHAR(255)) BEGIN IF vName = '' THEN SIGNAL SQLSTATE '45000' @@ -81966,7 +80936,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_delete`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_delete`(vSelf INT) BEGIN /** * Deletes a node from the #zoneGeo table. Also sets a mark @@ -81992,7 +80962,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_doCalc`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_doCalc`() proc: BEGIN /** * Recalculates the zones tree. @@ -82034,7 +81004,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_setParent`(vSelf INT, vParentFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_setParent`(vSelf INT, vParentFk INT) BEGIN /** * Updates the parent of a node. Also sets a mark @@ -82063,7 +81033,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_throwNotEditable`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zoneGeo_throwNotEditable`() BEGIN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Column `geoFk` cannot be modified'; @@ -82083,7 +81053,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_excludeFromGeo`(vZoneGeo INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_excludeFromGeo`(vZoneGeo INT) BEGIN /** * Excluye zonas a partir un geoFk. @@ -82116,7 +81086,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAddresses`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getAddresses`( vSelf INT, vShipped DATE, vDepartmentFk INT @@ -82187,7 +81157,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAgency`(vAddress INT, vLanded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getAgency`(vAddress INT, vLanded DATE) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha @@ -82236,7 +81206,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAvailable`(vAddress INT, vLanded DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getAvailable`(vAddress INT, vLanded DATE) BEGIN CALL zone_getFromGeo(address_getGeo(vAddress)); CALL zone_getOptionsForLanding(vLanded, FALSE); @@ -82262,7 +81232,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getClosed`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getClosed`() proc:BEGIN /** * Devuelve una tabla con las zonas cerradas para hoy @@ -82309,7 +81279,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getCollisions`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getCollisions`() BEGIN /** * Calcula si para un mismo codigo postal y dia @@ -82430,7 +81400,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getEvents`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getEvents`( vGeoFk INT, vAgencyModeFk INT) BEGIN @@ -82507,7 +81477,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getFromGeo`(vGeoFk INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getFromGeo`(vGeoFk INT) BEGIN /** * Returns all zones which have the passed geo included. @@ -82576,7 +81546,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve una tabla temporal con el dia de recepcion para vShipped. @@ -82636,7 +81606,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getLeaves`( +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getLeaves`( vSelf INT, vParentFk INT, vSearch VARCHAR(255), @@ -82772,7 +81742,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and delivery date. @@ -82849,7 +81819,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN) BEGIN /** * Gets computed options for the passed zones and shipping date. @@ -82937,7 +81907,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getPostalCode`(vSelf INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getPostalCode`(vSelf INT) BEGIN /** * Devuelve los códigos postales incluidos en una zona @@ -82996,7 +81966,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN) BEGIN /** * Devuelve la mínima fecha de envío para cada warehouse @@ -83060,7 +82030,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getState`(vDated DATE) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getState`(vDated DATE) BEGIN /** * Devuelve las zonas y el estado para la fecha solicitada @@ -83115,7 +82085,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) BEGIN /** * Devuelve el listado de agencias disponibles para la fecha, @@ -83165,7 +82135,7 @@ DELIMITER ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; DELIMITER ;; -CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_upcomingDeliveries`() +CREATE DEFINER=`vn`@`localhost` PROCEDURE `zone_upcomingDeliveries`() BEGIN DECLARE vForwardDays INT; @@ -83328,7 +82298,6 @@ SET character_set_client = utf8; 1 AS `hasKgPrice`, 1 AS `Equivalente`, 1 AS `Imprimir`, - 1 AS `Familia__`, 1 AS `do_photo`, 1 AS `odbc_date`, 1 AS `isFloramondo`, @@ -83593,7 +82562,8 @@ SET character_set_client = utf8; 1 AS `Suben`, 1 AS `Base`, 1 AS `box`, - 1 AS `costeRetorno` */; + 1 AS `costeRetorno`, + 1 AS `isActive` */; SET character_set_client = @saved_cs_client; -- @@ -85616,7 +84586,6 @@ SET character_set_client = utf8; 1 AS `order`, 1 AS `alert_level`, 1 AS `code`, - 1 AS `sectorProdPriority`, 1 AS `nextStateFk`, 1 AS `isPreviousPreparable`, 1 AS `isPicked` */; @@ -87180,7 +86149,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `NewView` AS select `c`.`id` AS `clientFk`,max(`t`.`shipped`) AS `lastShipped`,`pc`.`notBuyingMonths` AS `notBuyingMonths` from ((`client` `c` join `productionConfig` `pc`) left join `ticket` `t` on(`c`.`id` = `t`.`clientFk` and `t`.`shipped` < `util`.`VN_CURDATE`() + interval -`pc`.`rookieDays` day)) group by `c`.`id` having `lastShipped` is null or `lastShipped` < `util`.`VN_CURDATE`() + interval -`notBuyingMonths` month */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87194,11 +86163,11 @@ USE `vn`; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; -/*!50001 SET character_set_client = utf8mb3 */; -/*!50001 SET character_set_results = utf8mb3 */; -/*!50001 SET collation_connection = utf8mb3_general_ci */; +/*!50001 SET character_set_client = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `agencyTerm` AS select `sat`.`agencyFk` AS `agencyFk`,`sat`.`minimumPackages` AS `minimumPackages`,`sat`.`kmPrice` AS `kmPrice`,`sat`.`packagePrice` AS `packagePrice`,`sat`.`routePrice` AS `routePrice`,`sat`.`minimumKm` AS `minimumKm`,`sat`.`minimumM3` AS `minimumM3`,`sat`.`m3Price` AS `m3Price` from `supplierAgencyTerm` `sat` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87216,7 +86185,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `annualAverageInvoiced` AS select `cec`.`clientFk` AS `clientFk`,`cec`.`invoiced` AS `invoiced` from `bs`.`clientAnnualConsumption` `cec` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87234,7 +86203,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `awbVolume` AS select `t`.`awbFk` AS `awbFk`,`b`.`stickers` * `i`.`density` * if(`p`.`volume` > 0,`p`.`volume`,`p`.`width` * `p`.`depth` * if(`p`.`height` = 0,`i`.`size` + 10,`p`.`height`)) / (`vc`.`aerealVolumetricDensity` * 1000) AS `volume`,`b`.`id` AS `buyFk` from ((((((`buy` `b` join `item` `i` on(`b`.`itemFk` = `i`.`id`)) join `itemType` `it` on(`i`.`typeFk` = `it`.`id`)) join `packaging` `p` on(`p`.`id` = `b`.`packagingFk`)) join `entry` `e` on(`b`.`entryFk` = `e`.`id`)) join `travel` `t` on(`t`.`id` = `e`.`travelFk`)) join `volumeConfig` `vc`) where `t`.`shipped` > makedate(year(`util`.`VN_CURDATE`()) - 1,1) and `t`.`awbFk` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87252,7 +86221,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `businessCalendar` AS select `c`.`id` AS `id`,`c`.`businessFk` AS `businessFk`,`c`.`dayOffTypeFk` AS `absenceTypeFk`,`c`.`dated` AS `dated` from `calendar` `c` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87270,7 +86239,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `buyer` AS select distinct `u`.`id` AS `userFk`,`u`.`nickname` AS `nickname` from (`account`.`user` `u` join `vn`.`itemType` `it` on(`it`.`workerFk` = `u`.`id`)) where `u`.`active` <> 0 order by `u`.`nickname` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87288,7 +86257,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `buyerSales` AS select `v`.`importe` AS `importe`,`w`.`code` AS `comprador`,`t`.`year` AS `año`,`t`.`week` AS `semana` from (((`bs`.`ventas` `v` join `vn`.`time` `t` on(`t`.`dated` = `v`.`fecha`)) join `vn`.`itemType` `it` on(`it`.`id` = `v`.`tipo_id`)) join `vn`.`worker` `w` on(`w`.`id` = `it`.`workerFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87306,7 +86275,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `clientLost` AS select `c`.`id` AS `clientFk`,max(`t`.`shipped`) AS `lastShipped`,`pc`.`notBuyingMonths` AS `notBuyingMonths` from ((`client` `c` join `productionConfig` `pc`) left join `ticket` `t` on(`c`.`id` = `t`.`clientFk` and `t`.`shipped` < `util`.`VN_CURDATE`() + interval -`pc`.`rookieDays` day)) group by `c`.`id` having `lastShipped` is null or `lastShipped` < `util`.`VN_CURDATE`() + interval -`notBuyingMonths` month */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87324,7 +86293,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `clientPhoneBook` AS select `c`.`id` AS `clientFk`,trim(`c`.`phone`) AS `phone` from `client` `c` where `c`.`phone` <> 0 and `c`.`isActive` <> 0 union select `c`.`id` AS `clientFk`,trim(`c`.`mobile`) AS `phone` from `client` `c` where `c`.`mobile` <> 0 and `c`.`isActive` <> 0 union select `a`.`clientFk` AS `clientFk`,trim(`a`.`phone`) AS `phone` from (`address` `a` join `client` `c` on(`c`.`id` = `a`.`clientFk`)) where `a`.`phone` <> 0 and `c`.`isActive` <> 0 union select `a`.`clientFk` AS `clientFk`,trim(`a`.`mobile`) AS `phone` from (`address` `a` join `client` `c` on(`c`.`id` = `a`.`clientFk`)) where `a`.`mobile` <> 0 and `c`.`isActive` <> 0 union select `cc`.`clientFk` AS `clientFk`,trim(`cc`.`phone`) AS `phone` from (`clientContact` `cc` left join `client` `c` on(`c`.`id` = `cc`.`clientFk`)) where `c`.`phone` <> 0 and `c`.`isActive` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87342,7 +86311,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `companyL10n` AS select `c`.`id` AS `id`,ifnull(`ci`.`footnotes`,`c`.`footnotes`) AS `footnotes` from (`company` `c` left join `companyI18n` `ci` on(`ci`.`companyFk` = `c`.`id` and `ci`.`lang` = `util`.`LANG`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87360,7 +86329,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `defaulter` AS select `d`.`clientFk` AS `clientFk`,`d`.`created` AS `created`,`d`.`amount` AS `amount`,`d`.`defaulterSinced` AS `defaulterSinced`,`d`.`hasChanged` AS `hasChanged`,`c`.`countryFk` AS `country`,`c`.`payMethodFk` AS `payMethod` from (((`bs`.`defaulter` `d` join `vn`.`client` `c` on(`c`.`id` = `d`.`clientFk`)) join `vn`.`country` `co` on(`co`.`id` = `c`.`countryFk`)) join `vn`.`payMethod` `pm` on(`pm`.`id` = `c`.`payMethodFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87378,7 +86347,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `departmentTree` AS select `node`.`id` AS `id`,concat(convert(repeat(repeat(' ',5),count(`parent`.`id`) - 1) using utf8mb3),`node`.`name`) AS `dep` from (`department` `node` join `department` `parent`) where `node`.`lft` between `parent`.`lft` and `parent`.`rgt` group by `node`.`id` order by `node`.`lft` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87396,7 +86365,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ediGenus` AS select `g`.`genus_id` AS `id`,`g`.`latin_genus_name` AS `latinGenusName`,`g`.`entry_date` AS `entried`,`g`.`expiry_date` AS `dued`,`g`.`change_date_time` AS `modified` from `edi`.`genus` `g` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87414,7 +86383,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ediSpecie` AS select `s`.`specie_id` AS `id`,`s`.`genus_id` AS `genusFk`,`s`.`latin_species_name` AS `latinSpeciesName`,`s`.`entry_date` AS `entried`,`s`.`expiry_date` AS `dued`,`s`.`change_date_time` AS `modified` from `edi`.`specie` `s` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87432,7 +86401,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ektSubAddress` AS select `eea`.`sub` AS `sub`,`a`.`clientFk` AS `clientFk`,`a`.`nickname` AS `nickname`,`eea`.`addressFk` AS `addressFk` from (`ektEntryAssign` `eea` join `address` `a` on(`a`.`id` = `eea`.`addressFk`)) group by `eea`.`sub` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87450,7 +86419,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `especialPrice` AS select `sp`.`id` AS `id`,`sp`.`clientFk` AS `clientFk`,`sp`.`itemFk` AS `itemFk`,`sp`.`value` AS `value` from `specialPrice` `sp` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87468,7 +86437,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `exchangeInsuranceEntry` AS select max(`tr`.`landed`) AS `dated`,cast(sum((`b`.`buyingValue` + `b`.`freightValue`) * `b`.`quantity`) as decimal(10,2)) AS `Dolares`,cast(sum((`b`.`buyingValue` + `b`.`freightValue`) * `b`.`quantity`) / sum((100 + `e`.`commission`) / 100 * (`b`.`buyingValue` + `b`.`freightValue`) * `b`.`quantity`) as decimal(10,4)) AS `rate` from ((`entry` `e` join `buy` `b` on(`e`.`id` = `b`.`entryFk`)) join `travel` `tr` on(`tr`.`id` = `e`.`travelFk`)) where `tr`.`landed` between '2016-01-31' and `util`.`VN_CURDATE`() and `e`.`commission` < 0 and `e`.`currencyFk` = 2 group by month(`tr`.`landed`),year(`tr`.`landed`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87486,7 +86455,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `exchangeInsuranceIn` AS select `exchangeInsuranceInPrevious`.`dated` AS `dated`,sum(`exchangeInsuranceInPrevious`.`amount`) AS `amount`,cast(sum(`exchangeInsuranceInPrevious`.`amount` * `exchangeInsuranceInPrevious`.`rate`) / sum(`exchangeInsuranceInPrevious`.`amount`) as decimal(10,4)) AS `rate` from `exchangeInsuranceInPrevious` group by `exchangeInsuranceInPrevious`.`dated` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87504,7 +86473,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `exchangeInsuranceInPrevious` AS select `ei`.`dueDated` AS `dated`,`ei`.`amount` AS `amount`,`ei`.`rate` AS `rate` from `exchangeInsurance` `ei` where `ei`.`amount` <> 0 and `ei`.`financialProductTypefk` = 'SC' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87522,7 +86491,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `exchangeInsuranceOut` AS select `p`.`received` AS `received`,sum(`p`.`divisa`) AS `divisa`,sum(`p`.`divisa`) / sum(`p`.`amount`) AS `rate` from ((`payment` `p` join `accounting` `a` on(`a`.`id` = `p`.`bankFk`)) join `accountingType` `at2` on(`at2`.`id` = `a`.`accountingTypeFk`)) where `p`.`currencyFk` = 2 and `at2`.`code` = 'wireTransfer' and `p`.`supplierFk` <> 2213 group by `p`.`received` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87540,7 +86509,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionCommon` AS select `rs`.`id` AS `truckFk`,`rs`.`eta` AS `eta`,ifnull(ucase(`rs`.`description`),'SIN ESCANEAR') AS `description`,`es`.`palletFk` AS `palletFk`,`t`.`routeFk` AS `routeFk`,`es`.`id` AS `scanFk`,`e`.`id` AS `expeditionFk`,`r`.`roadmapStopFk` AS `roadmapStopFk`,`t`.`warehouseFk` AS `warehouseFk`,`e`.`created` AS `lastPacked`,`t`.`id` AS `ticketFk` from (((((`roadmapStop` `rs` left join `routesMonitor` `r` on(`rs`.`id` = `r`.`roadmapStopFk`)) left join `ticket` `t` on(`r`.`routeFk` = `t`.`routeFk`)) left join `expedition` `e` on(`t`.`id` = `e`.`ticketFk`)) left join `expeditionScan` `es` on(`e`.`id` = `es`.`expeditionFk`)) left join `expeditionPallet` `ep` on(`es`.`palletFk` = `ep`.`id`)) where `rs`.`eta` >= `util`.`VN_CURDATE`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87558,7 +86527,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionPallet_Print` AS select `rs2`.`description` AS `truck`,`t`.`routeFk` AS `routeFk`,`r`.`description` AS `zone`,count(`es`.`id`) AS `eti`,`ep`.`id` AS `palletFk`,`rs`.`id` <=> `rm`.`roadmapStopFk` AS `isMatch`,`t`.`warehouseFk` AS `warehouseFk`,if(`r`.`created` > `util`.`VN_CURDATE`() + interval 1 day,ucase(dayname(`r`.`created`)),NULL) AS `nombreDia` from (((((((`roadmapStop` `rs` join `expeditionPallet` `ep` on(`ep`.`truckFk` = `rs`.`id`)) join `expeditionScan` `es` on(`es`.`palletFk` = `ep`.`id`)) join `expedition` `e` on(`e`.`id` = `es`.`expeditionFk`)) join `ticket` `t` on(`t`.`id` = `e`.`ticketFk`)) join `route` `r` on(`r`.`id` = `t`.`routeFk`)) left join `routesMonitor` `rm` on(`rm`.`routeFk` = `r`.`id`)) left join `roadmapStop` `rs2` on(`rs2`.`id` = `rm`.`roadmapStopFk`)) group by `ep`.`id`,`t`.`routeFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87576,7 +86545,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionRoute_Monitor` AS select `r`.`id` AS `routeFk`,count(distinct if(`e`.`id` is null,`t`.`id`,NULL)) AS `tickets`,count(distinct `e`.`id`) AS `expeditions`,count(distinct `es`.`id`) AS `scanned`,max(`e`.`created`) AS `lastPacked`,`r`.`created` AS `created` from (((((`route` `r` left join `routesMonitor` `rm` on(`r`.`id` = `rm`.`routeFk`)) left join `roadmapStop` `rs` on(`rs`.`id` = `rm`.`roadmapStopFk`)) join `ticket` `t` on(`t`.`routeFk` = `r`.`id`)) left join `expedition` `e` on(`e`.`ticketFk` = `t`.`id`)) left join `expeditionScan` `es` on(`es`.`expeditionFk` = `e`.`id`)) where `r`.`created` >= `util`.`yesterday`() group by `r`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87594,7 +86563,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionRoute_freeTickets` AS select `t`.`routeFk` AS `routeFk`,`tss`.`ticketFk` AS `ticket`,`s`.`name` AS `code`,`w`.`name` AS `almacen`,`tss`.`updated` AS `updated`,`p`.`code` AS `parkingCode` from (((((`ticketState` `tss` join `ticket` `t` on(`t`.`id` = `tss`.`ticketFk`)) join `warehouse` `w` on(`w`.`id` = `t`.`warehouseFk`)) join `state` `s` on(`s`.`id` = `tss`.`state`)) left join `ticketParking` `tp` on(`tp`.`ticketFk` = `t`.`id`)) left join `parking` `p` on(`p`.`id` = `tp`.`parkingFk`)) where ifnull(`t`.`packages`,0) = 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87612,7 +86581,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionScan_Monitor` AS select `rs`.`id` AS `truckFk`,`rs`.`eta` AS `ETD`,`rs`.`description` AS `description`,`ep`.`id` AS `palletFk`,`ep`.`position` AS `position`,`ep`.`built` AS `built`,`es`.`id` AS `scanFk`,`es`.`expeditionFk` AS `expeditionFk`,`es`.`scanned` AS `scanned` from ((`roadmapStop` `rs` left join `expeditionPallet` `ep` on(`ep`.`truckFk` = `rs`.`id`)) left join `expeditionScan` `es` on(`es`.`palletFk` = `ep`.`id`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87630,7 +86599,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionSticker` AS select `e`.`id` AS `expeditionFk`,`e`.`ticketFk` AS `ticketFk`,`t`.`addressFk` AS `addressFk`,`t`.`clientFk` AS `clientFk`,`a`.`street` AS `street`,`a`.`postalCode` AS `postalCode`,`a`.`city` AS `city`,`a`.`nickname` AS `nickname`,concat('R(',right(`t`.`routeFk`,3),')') AS `routeFk`,`rm`.`beachFk` AS `beachFk`,if(`t`.`routeFk`,ifnull(`rs`.`description`,replace(`am`.`name`,'ZONA ','Z')),`z`.`name`) AS `zona`,`p`.`name` AS `province`,ifnull(`c`.`mobile`,ifnull(`a`.`mobile`,ifnull(`c`.`phone`,`a`.`phone`))) AS `phone`,`w`.`code` AS `workerCode` from (((((((((((`expedition` `e` join `ticket` `t` on(`t`.`id` = `e`.`ticketFk`)) join `address` `a` on(`a`.`id` = `t`.`addressFk`)) join `province` `p` on(`p`.`id` = `a`.`provinceFk`)) left join `routesMonitor` `rm` on(`rm`.`routeFk` = `t`.`routeFk`)) left join `roadmapStop` `rs` on(`rs`.`id` = `rm`.`roadmapStopFk`)) left join `beach` `b` on(`b`.`code` = `rm`.`beachFk`)) left join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `route` `r` on(`r`.`id` = `t`.`routeFk`)) left join `agencyMode` `am` on(`am`.`id` = `r`.`agencyModeFk`)) join `client` `c` on(`c`.`id` = `a`.`clientFk`)) join `worker` `w` on(`w`.`id` = `e`.`workerFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87648,7 +86617,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionTicket_NoBoxes` AS select `t`.`id` AS `ticketFk`,`t`.`warehouseFk` AS `warehouseFk`,`t`.`routeFk` AS `routeFk`,`rs`.`description` AS `description` from (((`ticket` `t` left join `expedition` `e` on(`e`.`ticketFk` = `t`.`id`)) join `routesMonitor` `rm` on(`rm`.`routeFk` = `t`.`routeFk`)) join `roadmapStop` `rs` on(`rs`.`id` = `rm`.`roadmapStopFk`)) where `e`.`id` is null and `rs`.`eta` > `util`.`VN_CURDATE`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87666,7 +86635,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionTimeExpended` AS select `e`.`ticketFk` AS `ticketFk`,min(`e`.`created`) AS `started`,max(`e`.`created`) AS `finished`,max(`e`.`counter`) AS `cajas`,`w`.`code` AS `code`,`t`.`warehouseFk` AS `warehouseFk` from ((`expedition` `e` join `worker` `w` on(`w`.`id` = `e`.`workerFk`)) join `ticket` `t` on(`t`.`id` = `e`.`ticketFk`)) where `e`.`created` > `util`.`VN_CURDATE`() group by `e`.`ticketFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87684,7 +86653,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `expeditionTruck` AS select `rs`.`id` AS `id`,`rs`.`roadmapFk` AS `roadmapFk`,`rs`.`eta` AS `eta`,`rs`.`description` AS `description`,`rs`.`bufferFk` AS `bufferFk`,`rs`.`created` AS `created`,`rs`.`userFk` AS `userFk` from `roadmapStop` `rs` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87702,7 +86671,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `firstTicketShipped` AS select min(`ticket`.`shipped`) AS `shipped`,`ticket`.`clientFk` AS `clientFk` from `ticket` where `ticket`.`shipped` > '2001-01-01' group by `ticket`.`clientFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87720,7 +86689,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `floraHollandBuyedItems` AS select `b`.`itemFk` AS `itemFk`,`i`.`longName` AS `longName`,`b`.`quantity` AS `quantity`,`b`.`buyingValue` AS `buyingValue`,`tr`.`landed` AS `landed`,`e`.`companyFk` AS `companyFk` from (((((`buy` `b` join `item` `i` on(`b`.`itemFk` = `i`.`id`)) join `itemType` `it` on(`it`.`id` = `i`.`typeFk`)) join `itemCategory` `ic` on(`ic`.`id` = `it`.`categoryFk`)) join `entry` `e` on(`e`.`id` = `b`.`entryFk`)) join `travel` `tr` on(`tr`.`id` = `e`.`travelFk` and `ic`.`id` not in (8,6) and `b`.`buyingValue` <> 0 and `b`.`quantity` <> 0 and `e`.`supplierFk` in (1664,1665,1666,1465,1433))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87738,7 +86707,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `inkL10n` AS select `k`.`id` AS `id`,ifnull(`i`.`name`,`k`.`name`) AS `name` from (`ink` `k` left join `inkI18n` `i` on(`i`.`inkFk` = `k`.`id` and `i`.`lang` = `util`.`lang`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87756,7 +86725,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `invoiceCorrectionDataSource` AS select `s`.`itemFk` AS `itemFk`,`s`.`quantity` AS `quantity`,`s`.`concept` AS `concept`,`s`.`price` AS `price`,`s`.`discount` AS `discount`,`t`.`refFk` AS `refFk`,`s`.`id` AS `saleFk`,`t`.`shipped` AS `shipped` from (`sale` `s` join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) where `t`.`shipped` > `util`.`VN_CURDATE`() + interval -3 year */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87774,7 +86743,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemBotanicalWithGenus` AS select `ib`.`itemFk` AS `itemFk`,concat(`g`.`name`,' ',ifnull(`s`.`name`,'')) AS `ediBotanic` from ((`itemBotanical` `ib` left join `specie` `s` on(`s`.`id` = `ib`.`specieFk`)) left join `genus` `g` on(`g`.`id` = `ib`.`genusFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87792,7 +86761,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemCategoryL10n` AS select `c`.`id` AS `id`,ifnull(`i`.`name`,`c`.`name`) AS `name` from (`itemCategory` `c` left join `itemCategoryI18n` `i` on(`i`.`categoryFk` = `c`.`id` and `i`.`lang` = `util`.`lang`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87810,7 +86779,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemColor` AS select `it`.`itemFk` AS `itemFk`,`it`.`value` AS `color` from (`itemTag` `it` join `tag` `t` on(`t`.`id` = `it`.`tagFk`)) where `t`.`code` = 'COLOR' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87828,7 +86797,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemEntryIn` AS select `t`.`warehouseInFk` AS `warehouseInFk`,`t`.`landed` AS `landed`,`b`.`itemFk` AS `itemFk`,`b`.`quantity` AS `quantity`,`t`.`isReceived` AS `isReceived`,`e`.`isRaid` AS `isVirtualStock`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on(`b`.`entryFk` = `e`.`id`)) join `travel` `t` on(`e`.`travelFk` = `t`.`id`)) where `e`.`isExcludedFromAvailable` = 0 and `b`.`quantity` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87846,7 +86815,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemEntryOut` AS select `t`.`warehouseOutFk` AS `warehouseOutFk`,`t`.`shipped` AS `shipped`,`b`.`itemFk` AS `itemFk`,-`b`.`quantity` AS `quantity`,`t`.`isDelivered` AS `isDelivered`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on(`b`.`entryFk` = `e`.`id`)) join `travel` `t` on(`e`.`travelFk` = `t`.`id`)) where `e`.`isExcludedFromAvailable` = 0 and `e`.`isRaid` = 0 and `b`.`quantity` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87864,7 +86833,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemInk` AS select `i`.`longName` AS `longName`,`i`.`inkFk` AS `inkFk`,`ink`.`name` AS `color` from (`item` `i` join `ink` on(`ink`.`id` = `i`.`inkFk`)) where `ink`.`isRealColor` <> 0 group by `i`.`longName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87882,7 +86851,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemPlacementSupplyList` AS select `ips`.`id` AS `id`,`ips`.`itemFk` AS `itemFk`,`ips`.`quantity` AS `quantity`,`ips`.`priority` AS `priority`,ifnull(`isps`.`created`,`ips`.`created`) AS `created`,`ips`.`userFk` AS `userFk`,`ips`.`repoUserFk` AS `repoUserFk`,`ips`.`quantity` - sum(ifnull(`isps`.`quantity`,0)) AS `saldo`,concat(`i`.`longName`,' ',`i`.`size`) AS `longName`,`i`.`subName` AS `subName`,`i`.`size` AS `size`,`w`.`code` AS `workerCode`,`rw`.`code` AS `repoCode`,`ips`.`sectorFk` AS `sectorFk` from ((((`itemPlacementSupply` `ips` join `item` `i` on(`i`.`id` = `ips`.`itemFk`)) left join `worker` `w` on(`w`.`id` = `ips`.`userFk`)) left join `worker` `rw` on(`rw`.`id` = `ips`.`repoUserFk`)) left join `itemShelvingPlacementSupply` `isps` on(`isps`.`itemPlacementSupplyFk` = `ips`.`id`)) where `ips`.`created` >= `util`.`VN_CURDATE`() group by `ips`.`priority`,`ips`.`id`,`ips`.`sectorFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87900,7 +86869,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemProductor` AS select `it`.`itemFk` AS `itemFk`,`it`.`value` AS `productor` from (`itemTag` `it` join `tag` `t` on(`t`.`id` = `it`.`tagFk`)) where `t`.`code` = 'PRODUCER' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87918,7 +86887,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemSearch` AS select `s`.`itemFk` AS `itemFk`,`s`.`concept` AS `concept`,`s`.`quantity` AS `quantity`,`t`.`nickname` AS `nickname`,`t`.`shipped` AS `shipped` from ((`sale` `s` join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `warehouse` `w` on(`w`.`id` = `t`.`warehouseFk`)) where `t`.`shipped` between `util`.`yesterday`() and `util`.`tomorrow`() and `w`.`name` in ('VNH','Floramondo') */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87936,8 +86905,8 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemShelvingAvailable` AS select `s`.`id` AS `saleFk`,`tst`.`updated` AS `Modificado`,`s`.`ticketFk` AS `ticketFk`,0 AS `isPicked`,`s`.`itemFk` AS `itemFk`,`s`.`quantity` AS `quantity`,`s`.`concept` AS `concept`,`i`.`size` AS `size`,`st`.`name` AS `Estado`,`st`.`sectorProdPriority` AS `sectorProdPriority`,`stock`.`visible` AS `available`,`stock`.`sectorFk` AS `sectorFk`,`stock`.`shelvingFk` AS `matricula`,`stock`.`parkingFk` AS `parking`,`stock`.`itemShelvingFk` AS `itemShelving`,`am`.`name` AS `Agency`,`t`.`shipped` AS `shipped`,`stock`.`grouping` AS `grouping`,`stock`.`packing` AS `packing`,`z`.`hour` AS `hour`,`st`.`isPreviousPreparable` AS `isPreviousPreparable`,`sv`.`physicalVolume` AS `physicalVolume`,`t`.`warehouseFk` AS `warehouseFk` from (((((((((`sale` `s` join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `agencyMode` `am` on(`am`.`id` = `t`.`agencyModeFk`)) join `ticketStateToday` `tst` on(`tst`.`ticketFk` = `t`.`id`)) join `state` `st` on(`st`.`id` = `tst`.`state`)) join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `itemShelvingStock` `stock` on(`stock`.`itemFk` = `i`.`id`)) left join `saleTracking` `stk` on(`stk`.`saleFk` = `s`.`id`)) left join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `saleVolume` `sv` on(`sv`.`saleFk` = `s`.`id`)) where `t`.`shipped` between `util`.`yesterday`() and `util`.`dayend`(`util`.`VN_CURDATE`()) and `stk`.`id` is null and `stock`.`visible` > 0 and `stk`.`saleFk` is null and `st`.`isPreviousPreparable` <> 0 */; +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `itemShelvingAvailable` AS select `s`.`id` AS `saleFk`,`tst`.`updated` AS `Modificado`,`s`.`ticketFk` AS `ticketFk`,0 AS `isPicked`,`s`.`itemFk` AS `itemFk`,`s`.`quantity` AS `quantity`,`s`.`concept` AS `concept`,`i`.`size` AS `size`,`st`.`name` AS `Estado`,`stock`.`visible` AS `available`,`stock`.`sectorFk` AS `sectorFk`,`stock`.`shelvingFk` AS `matricula`,`stock`.`parkingFk` AS `parking`,`stock`.`itemShelvingFk` AS `itemShelving`,`am`.`name` AS `Agency`,`t`.`shipped` AS `shipped`,`stock`.`grouping` AS `grouping`,`stock`.`packing` AS `packing`,`z`.`hour` AS `hour`,`st`.`isPreviousPreparable` AS `isPreviousPreparable`,`sv`.`physicalVolume` AS `physicalVolume`,`t`.`warehouseFk` AS `warehouseFk` from (((((((((`sale` `s` join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `agencyMode` `am` on(`am`.`id` = `t`.`agencyModeFk`)) join `ticketStateToday` `tst` on(`tst`.`ticketFk` = `t`.`id`)) join `state` `st` on(`st`.`id` = `tst`.`state`)) join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `itemShelvingStock` `stock` on(`stock`.`itemFk` = `i`.`id`)) left join `saleTracking` `stk` on(`stk`.`saleFk` = `s`.`id`)) left join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `saleVolume` `sv` on(`sv`.`saleFk` = `s`.`id`)) where `t`.`shipped` between `util`.`yesterday`() and `util`.`dayend`(`util`.`VN_CURDATE`()) and `stk`.`id` is null and `stock`.`visible` > 0 and `stk`.`saleFk` is null and `st`.`isPreviousPreparable` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -87954,7 +86923,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingList` AS select `ish`.`shelvingFk` AS `shelvingFk`,`ish`.`visible` AS `visible`,`ish`.`created` AS `created`,`pk`.`code` AS `parking`,`ish`.`itemFk` AS `itemFk`,`i`.`longName` AS `longName`,`i`.`size` AS `size`,`i`.`subName` AS `subName`,`sh`.`parked` AS `parked`,`pk`.`sectorFk` AS `sectorFk` from (((`itemShelving` `ish` join `shelving` `sh` on(`sh`.`code` = `ish`.`shelvingFk`)) join `item` `i` on(`i`.`id` = `ish`.`itemFk`)) left join `parking` `pk` on(`pk`.`id` = `sh`.`parkingFk`)) order by `ish`.`created` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87972,7 +86941,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingPlacementSupplyStock` AS select `ish`.`id` AS `itemShelvingFk`,`ish`.`itemFk` AS `itemFk`,`ish`.`packing` AS `packing`,`ish`.`visible` AS `stock`,`i`.`longName` AS `longName`,`i`.`size` AS `size`,`i`.`subName` AS `subName`,`sh`.`code` AS `shelving`,`p`.`code` AS `parking`,`ish`.`created` AS `created`,ifnull(`sh`.`priority`,1) AS `priority`,`p`.`id` AS `parkingFk`,`p`.`sectorFk` AS `sectorFk` from (((`itemShelving` `ish` join `shelving` `sh` on(`sh`.`code` = `ish`.`shelvingFk`)) left join `parking` `p` on(`p`.`id` = `sh`.`parkingFk`)) join `item` `i` on(`i`.`id` = `ish`.`itemFk`)) group by `ish`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -87990,7 +86959,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingSaleSum` AS select `iss`.`id` AS `id`,`iss`.`itemShelvingFk` AS `itemShelvingFk`,`iss`.`saleFk` AS `saleFk`,sum(`iss`.`quantity`) AS `quantity`,`iss`.`created` AS `created`,`p`.`sectorFk` AS `sectorFk` from (((`itemShelvingSale` `iss` join `itemShelving` `ish` on(`ish`.`id` = `iss`.`itemShelvingFk`)) join `shelving` `sh` on(`sh`.`code` = `ish`.`shelvingFk`)) join `parking` `p` on(`p`.`id` = `sh`.`parkingFk`)) group by `iss`.`saleFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88008,7 +86977,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingStock` AS select `ish`.`itemFk` AS `itemFk`,sum(`ish`.`visible`) AS `visible`,min(`ish`.`packing`) AS `packing`,min(`ish`.`grouping`) AS `grouping`,`s`.`description` AS `sector`,sum(`ish`.`visible`) AS `visibleOriginal`,0 AS `removed`,`p`.`sectorFk` AS `sectorFk`,`s`.`warehouseFk` AS `warehouseFk`,`ish`.`shelvingFk` AS `shelvingFk`,`p`.`code` AS `parkingCode`,`sh`.`parkingFk` AS `parkingFk`,`ish`.`id` AS `itemShelvingFk`,`ish`.`created` AS `created`,`st`.`code` = 'previousPrepared' AS `isPreviousPrepared` from ((((`itemShelving` `ish` left join `shelving` `sh` on(`sh`.`code` = `ish`.`shelvingFk`)) left join `parking` `p` on(`p`.`id` = `sh`.`parkingFk`)) left join `sector` `s` on(`s`.`id` = `p`.`sectorFk`)) left join `sectorType` `st` on(`st`.`id` = `s`.`typeFk`)) where `ish`.`visible` <> 0 and `p`.`sectorFk` <> 0 group by `ish`.`itemFk`,`p`.`sectorFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88026,7 +86995,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingStockFull` AS select `ish`.`itemFk` AS `itemFk`,`ish`.`visible` AS `quantity`,`ish`.`packing` AS `packing`,`ish`.`grouping` AS `grouping`,`s`.`description` AS `sector`,`issr`.`removed` AS `removed`,`p`.`sectorFk` AS `sectorFk`,`s`.`warehouseFk` AS `warehouseFk`,`ish`.`shelvingFk` AS `shelvingFk`,`p`.`code` AS `parkingCode`,`sh`.`parkingFk` AS `parkingFk`,`ish`.`id` AS `itemShelvingFk`,`ish`.`created` AS `created` from ((((`itemShelving` `ish` join `shelving` `sh` on(`sh`.`code` = `ish`.`shelvingFk`)) join `parking` `p` on(`p`.`id` = `sh`.`parkingFk`)) join `sector` `s` on(`s`.`id` = `p`.`sectorFk`)) left join `itemShelvingStockRemoved` `issr` on(`issr`.`itemShelvingFk` = `ish`.`id`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88044,7 +87013,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemShelvingStockRemoved` AS select `ish`.`id` AS `itemShelvingFk`,`ish`.`itemFk` AS `itemFk`,0 AS `removed` from ((`itemShelving` `ish` left join `itemShelvingSale` `iss` on(`iss`.`itemShelvingFk` = `ish`.`id`)) left join `itemShelvingPlacementSupply` `isps` on(`isps`.`itemShelvingFk` = `ish`.`id`)) group by `ish`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88062,7 +87031,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemTagged` AS select distinct `itemTag`.`itemFk` AS `itemFk` from `itemTag` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88080,7 +87049,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemTaxCountrySpain` AS select `i`.`id` AS `id`,`i`.`name` AS `name`,`i`.`typeFk` AS `typeFk`,`i`.`stems` AS `stems`,`i`.`description` AS `description`,`i`.`intrastatFk` AS `intrastatFk`,`i`.`expenseFk` AS `expenseFk`,`i`.`comment` AS `comment`,`i`.`relevancy` AS `relevancy`,`i`.`image` AS `image`,`i`.`generic` AS `generic`,`itc`.`taxClassFk` AS `taxClassFk` from (`item` `i` join `itemTaxCountry` `itc` on(`itc`.`itemFk` = `i`.`id`)) where `itc`.`countryFk` = 1 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88098,7 +87067,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemTicketOut` AS select `t`.`warehouseFk` AS `warehouseFk`,`t`.`shipped` AS `shipped`,`s`.`itemFk` AS `itemFk`,-`s`.`quantity` AS `quantity`,`s`.`isPicked` AS `isPicked`,`s`.`reserved` AS `reserved`,`t`.`refFk` AS `refFk`,`s`.`id` AS `saleFk`,`s`.`ticketFk` AS `ticketFk` from (`sale` `s` join `ticket` `t` on(`s`.`ticketFk` = `t`.`id`)) where `s`.`quantity` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88116,7 +87085,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `itemTypeL10n` AS select `t`.`id` AS `id`,ifnull(`i`.`name`,`t`.`name`) AS `name` from (`itemType` `t` left join `itemTypeI18n` `i` on(`i`.`typeFk` = `t`.`id` and `i`.`lang` = `util`.`LANG`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88134,7 +87103,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `item_Free_Id` AS select `i1`.`id` + 1 AS `newId` from (`item` `i1` left join `item` `i2` on(`i1`.`id` + 1 = `i2`.`id`)) where `i2`.`id` is null and `i1`.`isFloramondo` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88152,7 +87121,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `labelInfo` AS select `i`.`id` AS `itemId`,`i`.`name` AS `itemName`,`b`.`stickers` AS `stickers`,`b`.`printedStickers` AS `life`,`i`.`inkFk` AS `colorCode`,`i`.`stems` AS `stems`,`i`.`category` AS `category`,`i`.`subName` AS `productor`,`b`.`packing` AS `packing`,`clb`.`warehouse_id` AS `warehouse_id`,`i`.`size` AS `size`,`b`.`isPickedOff` AS `isPickedOff`,`e`.`evaNotes` AS `notes`,`w`.`name` AS `wh_in`,`e`.`id` AS `entryId`,`b`.`id` AS `buyId` from (((((`vn`.`buy` `b` join `vn`.`item` `i` on(`i`.`id` = `b`.`itemFk`)) join `cache`.`last_buy` `clb` on(`clb`.`item_id` = `i`.`id`)) join `vn`.`entry` `e` on(`e`.`id` = `b`.`entryFk`)) left join `vn`.`travel` `tr` on(`tr`.`id` = `e`.`travelFk`)) join `vn`.`warehouse` `w` on(`w`.`id` = `tr`.`warehouseInFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88170,7 +87139,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `lastHourProduction` AS select `t`.`warehouseFk` AS `warehouseFk`,cast(sum(ifnull(`p`.`volume`,`p`.`width` * `p`.`height` * `p`.`depth`) / 1000000) as decimal(5,1)) AS `m3` from (((`warehouse` `w` join `ticket` `t` on(`t`.`warehouseFk` = `w`.`id`)) left join `expedition` `e` on(`t`.`id` = `e`.`ticketFk`)) left join `packaging` `p` on(`p`.`id` = `e`.`packagingFk`)) where `e`.`created` between `util`.`VN_NOW`() - interval 1 hour and `util`.`VN_NOW`() group by `t`.`warehouseFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88188,7 +87157,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `lastPurchases` AS select `tr`.`landed` AS `landed`,`w`.`id` AS `warehouseFk`,`w`.`name` AS `warehouse`,`i`.`longName` AS `longName`,`i`.`subName` AS `subName`,`e`.`id` AS `entryFk`,`b`.`stickers` AS `stickers`,`b`.`packing` AS `packing`,`e`.`invoiceNumber` AS `ref`,`b`.`itemFk` AS `itemFk`,`ek`.`pro` AS `pro`,`ek`.`ref` AS `ektRef`,`ek`.`agj` AS `agj` from (((((`vn`.`buy` `b` join `vn`.`entry` `e` on(`e`.`id` = `b`.`entryFk`)) join `vn`.`item` `i` on(`i`.`id` = `b`.`itemFk`)) join `vn`.`travel` `tr` on(`tr`.`id` = `e`.`travelFk`)) join `vn`.`warehouse` `w` on(`w`.`id` = `tr`.`warehouseInFk`)) left join `edi`.`ekt` `ek` on(`ek`.`id` = `b`.`ektFk`)) where `tr`.`landed` between `util`.`yesterday`() and `util`.`tomorrow`() and `e`.`isRaid` = 0 and `b`.`stickers` > 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88206,7 +87175,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `lastTopClaims` AS select `s`.`itemFk` AS `itemFk`,`i`.`longName` AS `itemName`,`it`.`name` AS `itemTypeName`,count(0) AS `claimsNumber`,round(sum(`cb`.`quantity` * `s`.`price` * (1 - (`c`.`responsibility` - 1) / 4) * (100 - `s`.`discount`) / 100),2) AS `claimedAmount`,round(sum(`cb`.`quantity` * `s`.`price` * (100 - `s`.`discount`) / 100),2) AS `totalAmount` from ((((`claim` `c` join `claimBeginning` `cb` on(`cb`.`claimFk` = `c`.`id`)) join `sale` `s` on(`s`.`id` = `cb`.`saleFk`)) join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `itemType` `it` on(`it`.`id` = `i`.`typeFk`)) where `c`.`created` >= `util`.`VN_CURDATE`() + interval -1 week group by `s`.`itemFk` having `claimedAmount` > 100 and `claimsNumber` > 2 or `claimsNumber` > 4 order by count(0) desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88224,7 +87193,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `mistake` AS select `wr`.`code` AS `revisador`,`s`.`concept` AS `concept`,`w`.`code` AS `sacador`,`w`.`firstName` AS `firstName`,`w`.`lastName` AS `lastName`,`mt`.`description` AS `description`,cast(`iss`.`created` as date) AS `created`,`w`.`id` AS `workerFk` from (((((`saleMistake` `sm` join `mistakeType` `mt` on(`mt`.`id` = `sm`.`typeFk`)) join `worker` `wr` on(`wr`.`id` = `sm`.`userFk`)) join `sale` `s` on(`s`.`id` = `sm`.`saleFk`)) join `itemShelvingSale` `iss` on(`iss`.`saleFk` = `sm`.`saleFk`)) join `worker` `w` on(`w`.`id` = `iss`.`userFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88242,7 +87211,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `mistakeRatio` AS select `wr`.`code` AS `revisador`,`w`.`code` AS `sacador`,`w`.`firstName` AS `firstName`,`w`.`lastName` AS `lastName`,`mt`.`description` AS `description`,cast(`iss`.`created` as date) AS `created`,`w`.`id` AS `workerFk`,`sm`.`saleFk` AS `saleFk` from ((((`itemShelvingSale` `iss` join `worker` `w` on(`w`.`id` = `iss`.`userFk`)) left join `saleMistake` `sm` on(`iss`.`saleFk` = `sm`.`saleFk`)) left join `mistakeType` `mt` on(`mt`.`id` = `sm`.`typeFk`)) left join `worker` `wr` on(`wr`.`id` = `sm`.`userFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88260,7 +87229,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `newBornSales` AS select `v`.`importe` AS `amount`,`v`.`Id_Cliente` AS `clientFk`,`c`.`salesPersonFk` AS `userFk`,`v`.`fecha` AS `dated`,`cn`.`firstShipped` AS `firstShipped` from ((((`bs`.`clientNewBorn` `cn` join `bs`.`ventas` `v` on(`cn`.`firstShipped` + interval 1 year > `v`.`fecha` and `v`.`Id_Cliente` = `cn`.`clientFk`)) join `vn`.`client` `c` on(`c`.`id` = `v`.`Id_Cliente`)) join `account`.`user` `u` on(`u`.`id` = `c`.`salesPersonFk`)) join `account`.`role` `r` on(`r`.`id` = `u`.`role`)) where `r`.`name` = 'salesPerson' and `u`.`name` not in ('ismaelalcolea','ruben') */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88274,11 +87243,11 @@ USE `vn`; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; -/*!50001 SET character_set_client = utf8mb3 */; -/*!50001 SET character_set_results = utf8mb3 */; -/*!50001 SET collation_connection = utf8mb3_general_ci */; +/*!50001 SET character_set_client = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `operatorWorkerCode` AS select `o`.`workerFk` AS `workerFk`,concat(`w`.`firstName`,' ',`w`.`lastName`) AS `fullName`,`w`.`code` AS `code`,`o`.`numberOfWagons` AS `numberOfWagons` from ((`worker` `w` join `operator` `o` on(`o`.`workerFk` = `w`.`id`)) join `sector` `s` on(`o`.`sectorFk` = `s`.`id`)) where `o`.`sectorFk` is not null and `s`.`code` in ('H2','H2','PEQUES_H','ALTILLO COMP','ALTILLO ARTI') */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88296,7 +87265,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `originL10n` AS select `o`.`id` AS `id`,ifnull(`i`.`name`,`o`.`name`) AS `name` from (`origin` `o` left join `originI18n` `i` on(`i`.`originFk` = `o`.`id` and `i`.`lang` = `util`.`lang`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88314,7 +87283,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `packageEquivalentItem` AS select `p`.`itemFk` AS `itemFk`,`p2`.`itemFk` AS `equivalentFk` from ((`packageEquivalent` `pe` join `packaging` `p` on(`p`.`id` = `pe`.`packagingFk`)) join `packaging` `p2` on(`p2`.`id` = `pe`.`equivalentFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88332,7 +87301,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `paymentExchangeInsurance` AS select `ei`.`id` AS `pago_sdc_id`,`ei`.`amount` AS `importe`,`ei`.`dated` AS `fecha`,`ei`.`dueDated` AS `vencimiento`,`ei`.`entityFk` AS `entity_id`,`ei`.`ref` AS `ref`,`ei`.`rate` AS `rate`,`ei`.`companyFk` AS `empresa_id`,`ei`.`financialProductTypefk` AS `financialProductTypefk`,`ei`.`upperBarrier` AS `upperBarrier`,`ei`.`lowerBarrier` AS `lowerBarrier`,`ei`.`strike` AS `strike` from `exchangeInsurance` `ei` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88350,7 +87319,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `payrollCenter` AS select `b`.`workCenterFkA3` AS `codCenter`,`b`.`companyFkA3` AS `companyCode` from `payrollWorkCenter` `b` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88368,7 +87337,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `personMedia` AS select `c`.`id` AS `workerFk`,ifnull(`c`.`mobile`,`c`.`phone`) AS `mediaValue` from (`client` `c` join `worker` `w` on(`w`.`id` = `c`.`id`)) having `mediaValue` is not null */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88386,7 +87355,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `phoneBook` AS select 'C' AS `Tipo`,`client`.`id` AS `Id`,`client`.`name` AS `Cliente`,`client`.`phone` AS `Telefono` from `client` where `client`.`phone` is not null union select 'C' AS `Tipo`,`client`.`id` AS `Id`,`client`.`name` AS `Cliente`,`client`.`mobile` AS `Movil` from `client` where `client`.`mobile` is not null union select 'C' AS `Tipo`,`clientContact`.`clientFk` AS `clientFk`,`clientContact`.`name` AS `name`,`clientContact`.`phone` AS `phone` from `clientContact` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88404,7 +87373,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `productionVolume` AS select hour(`e`.`created`) AS `hora`,minute(`e`.`created`) AS `minuto`,ifnull(`p`.`volume`,ifnull(`p`.`width` * `p`.`height` * `p`.`depth`,94500)) AS `cm3`,`t`.`warehouseFk` AS `warehouseFk`,`e`.`created` AS `created` from (((`expedition` `e` left join `packaging` `p` on(`p`.`id` = `e`.`packagingFk`)) join `ticket` `t` on(`t`.`id` = `e`.`ticketFk`)) join `client` `c` on(`c`.`id` = `t`.`clientFk`)) where `e`.`created` between `util`.`VN_CURDATE`() and `util`.`dayend`(`util`.`VN_CURDATE`()) and `c`.`isRelevant` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88422,7 +87391,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `productionVolume_LastHour` AS select cast(sum(`productionVolume`.`cm3` / 1000000) as decimal(10,0)) AS `m3`,`productionVolume`.`warehouseFk` AS `warehouseFk` from `productionVolume` where `productionVolume`.`created` > `util`.`VN_NOW`() + interval -1 hour and `productionVolume`.`warehouseFk` in (1,44,60) group by `productionVolume`.`warehouseFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88440,7 +87409,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `role` AS select `account`.`role`.`id` AS `id`,`account`.`role`.`name` AS `name`,`account`.`role`.`description` AS `description`,`account`.`role`.`hasLogin` AS `hasLogin` from `account`.`role` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88458,7 +87427,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `routesControl` AS select `t`.`routeFk` AS `routeFk`,count(`e`.`id`) AS `expeditions`,count(`es`.`id`) AS `scanned`,count(distinct `es`.`palletFk`) AS `pallets`,max(`es`.`scanned`) AS `lastScanned`,max(`rs`.`description`) AS `description`,max(`rs`.`eta`) AS `eta` from ((((`ticket` `t` join `expedition` `e` on(`t`.`id` = `e`.`ticketFk`)) left join `expeditionScan` `es` on(`es`.`expeditionFk` = `e`.`id`)) left join `expeditionPallet` `ep` on(`ep`.`id` = `es`.`palletFk`)) left join `roadmapStop` `rs` on(`rs`.`id` = `ep`.`truckFk`)) where `t`.`shipped` >= `util`.`VN_CURDATE`() and `t`.`routeFk` <> 0 group by `t`.`routeFk` order by max(`rs`.`eta`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88476,7 +87445,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleCost` AS select `s`.`itemFk` AS `itemFk`,`s`.`ticketFk` AS `ticketFk`,`s`.`concept` AS `concept`,`s`.`quantity` AS `quantity`,`s`.`discount` AS `discount`,`s`.`price` AS `price`,`c`.`name` AS `component`,`sc`.`value` AS `coste` from (((`sale` `s` join `saleComponent` `sc` on(`sc`.`saleFk` = `s`.`id`)) join `component` `c` on(`c`.`id` = `sc`.`componentFk`)) join `componentType` `ct` on(`ct`.`id` = `c`.`typeFk`)) where `ct`.`code` = 'cost' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88494,7 +87463,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleMistakeList` AS select `st`.`saleFk` AS `saleFk`,`st`.`workerFk` AS `workerFk`,concat(`w2`.`firstName`,' ',`w2`.`lastName`) AS `sacador`,`st`.`created` AS `created`,concat(`w`.`firstName`,' ',`w`.`lastName`) AS `revisador`,`mt`.`description` AS `description`,`sm`.`created` AS `controlled` from (((((`saleTracking` `st` join `worker` `w2` on(`w2`.`id` = `st`.`workerFk`)) join `state` `s` on(`s`.`id` = `st`.`stateFk` and `s`.`code` in ('PREVIOUS_PREPARATION','PREPARED','OK'))) left join `saleMistake` `sm` on(`st`.`saleFk` = `sm`.`saleFk`)) left join `mistakeType` `mt` on(`mt`.`id` = `sm`.`typeFk`)) left join `worker` `w` on(`w`.`id` = `sm`.`userFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88512,7 +87481,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleMistake_list__2` AS select `st`.`saleFk` AS `saleFk`,`st`.`workerFk` AS `workerFk`,concat(`w2`.`firstName`,' ',`w2`.`lastName`) AS `sacador`,`st`.`created` AS `created`,concat(`w`.`firstName`,' ',`w`.`lastName`) AS `revisador`,`mt`.`description` AS `description`,`sm`.`created` AS `controlled` from (((((`saleTracking` `st` join `worker` `w2` on(`w2`.`id` = `st`.`workerFk`)) join `state` `s` on(`s`.`id` = `st`.`stateFk` and `s`.`code` in ('PREVIOUS_PREPARATION','PREPARED','OK'))) left join `saleMistake` `sm` on(`st`.`saleFk` = `sm`.`saleFk`)) left join `mistakeType` `mt` on(`mt`.`id` = `sm`.`typeFk`)) left join `worker` `w` on(`w`.`id` = `sm`.`userFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88530,7 +87499,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleSaleTracking` AS select distinct `st`.`saleFk` AS `saleFk` from `saleTracking` `st` where `st`.`created` >= `util`.`VN_CURDATE`() + interval -1 day */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88548,7 +87517,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleValue` AS select `wh`.`name` AS `warehouse`,`c`.`name` AS `client`,`c`.`typeFk` AS `typeFk`,`u`.`name` AS `buyer`,`it`.`id` AS `itemTypeFk`,`it`.`name` AS `family`,`s`.`itemFk` AS `itemFk`,`s`.`concept` AS `concept`,`s`.`quantity` AS `quantity`,`b`.`buyingValue` + `b`.`freightValue` + `b`.`comissionValue` + `b`.`packageValue` AS `cost`,(`b`.`buyingValue` + `b`.`freightValue` + `b`.`comissionValue` + `b`.`packageValue`) * `s`.`quantity` AS `value`,`tm`.`year` AS `year`,`tm`.`week` AS `week` from (((((((((`vn`.`sale` `s` join `vn`.`item` `i` on(`i`.`id` = `s`.`itemFk`)) join `vn`.`itemType` `it` on(`it`.`id` = `i`.`typeFk`)) join `account`.`user` `u` on(`u`.`id` = `it`.`workerFk`)) join `vn`.`ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `vn`.`client` `c` on(`c`.`id` = `t`.`clientFk`)) join `vn`.`warehouse` `wh` on(`wh`.`id` = `t`.`warehouseFk`)) join `vn`.`time` `tm` on(`tm`.`dated` = cast(`t`.`shipped` as date))) join `cache`.`last_buy` `lb` on(`lb`.`item_id` = `i`.`id` and `lb`.`warehouse_id` = `wh`.`id`)) join `vn`.`buy` `b` on(`b`.`id` = `lb`.`buy_id`)) where `wh`.`isManaged` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88566,7 +87535,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleVolume` AS select `s`.`ticketFk` AS `ticketFk`,`s`.`id` AS `saleFk`,round(`ic`.`cm3delivery` * `s`.`quantity` / 1000,0) AS `litros`,`t`.`routeFk` AS `routeFk`,`t`.`shipped` AS `shipped`,`t`.`landed` AS `landed`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `volume`,`s`.`quantity` * `ic`.`grams` / 1000 AS `physicalWeight`,`s`.`quantity` * `ic`.`cm3delivery` * greatest(`ic`.`grams` / `ic`.`cm3delivery`,`vc`.`aerealVolumetricDensity`) / 1000000 AS `weight`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `physicalVolume`,`s`.`quantity` * `ic`.`cm3delivery` * ifnull(`t`.`zonePrice` - ifnull(`t`.`zoneBonus`,0),`z`.`price` - `z`.`bonus`) / (`vc`.`standardFlowerBox` * 1000) * `z`.`inflation` AS `freight`,`t`.`zoneFk` AS `zoneFk`,`t`.`clientFk` AS `clientFk`,`s`.`isPicked` AS `isPicked`,`s`.`quantity` * `s`.`price` * (100 - `s`.`discount`) / 100 AS `eurosValue`,`i`.`itemPackingTypeFk` AS `itemPackingTypeFk` from (((((`sale` `s` join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) join `volumeConfig` `vc`) join `itemCost` `ic` FORCE INDEX (PRIMARY) on(`ic`.`itemFk` = `s`.`itemFk` and `ic`.`warehouseFk` = `t`.`warehouseFk`)) where `s`.`quantity` > 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88584,7 +87553,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `saleVolume_Today_VNH` AS select `t`.`nickname` AS `Cliente`,`p`.`name` AS `Provincia`,`c`.`name` AS `Pais`,cast(sum(`sv`.`volume`) as decimal(5,1)) AS `volume` from (((((`saleVolume` `sv` join `ticket` `t` on(`t`.`id` = `sv`.`ticketFk`)) join `address` `a` on(`a`.`id` = `t`.`addressFk`)) join `province` `p` on(`p`.`id` = `a`.`provinceFk`)) join `country` `c` on(`c`.`id` = `p`.`countryFk`)) join `warehouse` `w` on(`w`.`id` = `t`.`warehouseFk`)) where `w`.`name` = 'VNH' and `t`.`shipped` between `util`.`VN_CURDATE`() and `util`.`dayend`(`util`.`VN_CURDATE`()) group by `t`.`nickname`,`p`.`name` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88602,7 +87571,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `sale_freightComponent` AS select `t`.`id` AS `ticketFk`,`sc`.`value` * `s`.`quantity` AS `amount`,`t`.`shipped` AS `shipped` from ((((`ticket` `t` straight_join `sale` `s` on(`t`.`id` = `s`.`ticketFk`)) join `saleComponent` `sc` on(`sc`.`saleFk` = `s`.`id`)) join `component` `c` on(`c`.`id` = `sc`.`componentFk`)) join `componentType` `ct` on(`ct`.`id` = `c`.`typeFk` and `ct`.`code` = 'freight')) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88620,7 +87589,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `salesPersonSince` AS select `b`.`workerFk` AS `workerFk`,min(`b`.`started`) AS `started` from ((`business` `b` join `worker` `w` on(`w`.`id` = `b`.`workerFk`)) left join `professionalCategory` `pc` on(`pc`.`id` = `b`.`workerBusinessProfessionalCategoryFk`)) where `pc`.`description` = 'Aux ventas' group by `b`.`workerFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88638,7 +87607,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `salesPreparedLastHour` AS select `t`.`warehouseFk` AS `warehouseFk`,`st`.`saleFk` AS `saleFk`,`st`.`isChecked` AS `isChecked`,`st`.`originalQuantity` AS `originalQuantity`,`st`.`created` AS `created`,`e`.`code` AS `code`,`w`.`firstName` AS `firstname`,`w`.`lastName` AS `lastName`,`w`.`code` AS `workerCode`,`ic`.`cm3delivery` * `s`.`quantity` / 1000 AS `litros`,`s`.`concept` AS `concept`,`d`.`name` AS `departmentName` from ((((((((`saleTracking` `st` left join `salesPreviousPreparated` `prevPrepSales` on(`prevPrepSales`.`saleFk` = `st`.`saleFk`)) join `sale` `s` on(`s`.`id` = `st`.`saleFk`)) join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `itemCost` `ic` on(`ic`.`warehouseFk` = `t`.`warehouseFk` and `ic`.`itemFk` = `s`.`itemFk`)) join `worker` `w` on(`w`.`id` = `st`.`workerFk`)) join `state` `e` on(`e`.`id` = `st`.`stateFk`)) join `workerDepartment` `wd` on(`wd`.`workerFk` = `st`.`workerFk`)) join `department` `d` on(`d`.`id` = `wd`.`departmentFk`)) where `st`.`created` > `util`.`VN_NOW`() + interval -1 hour and `prevPrepSales`.`saleFk` is null and `d`.`name` not like 'EQUIPO%' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88656,7 +87625,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `salesPreviousPreparated` AS select `st`.`saleFk` AS `saleFk` from (`saleTracking` `st` join `state` `e` on(`e`.`id` = `st`.`stateFk`)) where `st`.`created` > `util`.`VN_CURDATE`() and `e`.`code` like 'PREVIOUS_PREPARATION' */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88674,7 +87643,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `supplierPackaging` AS select `e`.`supplierFk` AS `supplierFk`,`b`.`itemFk` AS `itemFk`,`i`.`longName` AS `longName`,`s`.`name` AS `supplier`,`b`.`entryFk` AS `entryFk`,`tr`.`landed` AS `landed`,-least(`b`.`quantity`,0) AS `out`,greatest(`b`.`quantity`,0) AS `in`,`w`.`name` AS `warehouse`,`b`.`buyingValue` AS `buyingValue` from ((((((`buy` `b` join `item` `i` on(`i`.`id` = `b`.`itemFk`)) join `packaging` `p` on(`p`.`itemFk` = `i`.`id`)) join `entry` `e` on(`e`.`id` = `b`.`entryFk`)) join `supplier` `s` on(`s`.`id` = `e`.`supplierFk`)) join `travel` `tr` on(`tr`.`id` = `e`.`travelFk`)) join `warehouse` `w` on(`w`.`id` = `tr`.`warehouseInFk`)) where `p`.`isPackageReturnable` <> 0 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88692,7 +87661,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `tagL10n` AS select `t`.`id` AS `id`,ifnull(`i`.`name`,`t`.`name`) AS `name` from (`tag` `t` left join `tagI18n` `i` on(`i`.`tagFk` = `t`.`id` and `i`.`lang` = `util`.`LANG`())) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88710,7 +87679,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketDownBuffer` AS select `td`.`ticketFk` AS `ticketFk`,`td`.`created` AS `created`,`td`.`selected` AS `selected`,concat(`w`.`firstName`,' ',`w`.`lastName`) AS `sacador`,`pk`.`code` AS `parking` from ((((`ticketDown` `td` join `ticketParking` `tp` on(`tp`.`ticketFk` = `td`.`ticketFk`)) join `parking` `pk` on(`pk`.`id` = `tp`.`parkingFk`)) join `ticketStateToday` `tst` on(`tst`.`ticketFk` = `td`.`ticketFk`)) join `worker` `w` on(`w`.`id` = `tst`.`userFk`)) where `td`.`selected` = 2 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88728,7 +87697,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketLastUpdated` AS select `ticketLastUpdatedList`.`ticketFk` AS `ticketFk`,max(`ticketLastUpdatedList`.`created`) AS `lastUpdated` from `ticketLastUpdatedList` group by `ticketLastUpdatedList`.`ticketFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88746,7 +87715,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketLastUpdatedList` AS select `s`.`ticketFk` AS `ticketFk`,`st`.`created` AS `created` from (`saleTracking` `st` join `sale` `s` on(`s`.`id` = `st`.`saleFk`)) where `st`.`created` > `util`.`VN_CURDATE`() union all select `tt`.`ticketFk` AS `Id_Ticket`,`tt`.`created` AS `odbc_date` from `ticketTracking` `tt` where `tt`.`created` > `util`.`VN_CURDATE`() union all select `s`.`ticketFk` AS `ticketFk`,`iss`.`created` AS `created` from (`itemShelvingSale` `iss` join `sale` `s` on(`s`.`id` = `iss`.`saleFk`)) where `iss`.`created` > `util`.`VN_CURDATE`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88764,7 +87733,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketNotInvoiced` AS select `t`.`companyFk` AS `companyFk`,`cm`.`code` AS `companyCode`,`t`.`clientFk` AS `clientFk`,`c`.`name` AS `clientName`,`t`.`shipped` AS `shipped`,cast(sum(`s`.`quantity` * `s`.`price` * (100 - `s`.`discount`) / 100) as decimal(10,2)) AS `value` from (((`ticket` `t` join `sale` `s` on(`s`.`ticketFk` = `t`.`id`)) join `client` `c` on(`c`.`id` = `t`.`clientFk`)) join `company` `cm` on(`cm`.`id` = `t`.`companyFk`)) where `t`.`refFk` is null and `t`.`shipped` > '2017-01-01' group by `t`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88782,7 +87751,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketPackingList` AS select `t`.`nickname` AS `nickname`,`t`.`id` AS `ticketFk`,`am`.`name` AS `agencyMode`,`am`.`flag` AS `flag`,`p`.`name` AS `province`,`s`.`itemFk` AS `itemFk`,`s`.`concept` AS `concept`,`s`.`quantity` AS `quantity`,`sv`.`litros` AS `litros`,`to`.`description` AS `observaciones` from (((((((`ticket` `t` join `address` `a` on(`a`.`id` = `t`.`addressFk`)) join `province` `p` on(`p`.`id` = `a`.`provinceFk`)) join `agencyMode` `am` on(`am`.`id` = `t`.`agencyModeFk`)) left join `sale` `s` on(`s`.`ticketFk` = `t`.`id`)) left join `saleVolume` `sv` on(`sv`.`saleFk` = `s`.`id`)) join `observationType` `ot` on(`ot`.`code` = 'packager')) left join `ticketObservation` `to` on(`to`.`ticketFk` = `t`.`id` and `ot`.`id` = `to`.`observationTypeFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88800,7 +87769,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketPreviousPreparingList` AS select `s`.`ticketFk` AS `ticketFk`,`w`.`code` AS `code`,count(`s`.`id`) AS `saleLines`,sum(`s`.`isPicked` <> 0) AS `alreadyMadeSaleLines`,sum(`s`.`isPicked` <> 0) / count(`s`.`id`) AS `madeRate`,`sg`.`created` AS `created`,`p`.`code` AS `parking`,`iss`.`sectorFk` AS `sectorFk`,`al`.`code` AS `alertCode` from (((((((`saleGroup` `sg` join `saleGroupDetail` `sgd` on(`sgd`.`saleGroupFk` = `sg`.`id`)) join `sale` `s` FORCE INDEX (PRIMARY) on(`s`.`id` = `sgd`.`saleFk`)) join `ticketState` `tls` on(`tls`.`ticketFk` = `s`.`ticketFk`)) join `alertLevel` `al` on(`al`.`id` = `tls`.`alertLevel`)) join `worker` `w` on(`w`.`id` = `sg`.`userFk`)) left join `parking` `p` on(`p`.`id` = `sg`.`parkingFk`)) join `itemShelvingStock` `iss` on(`iss`.`itemFk` = `s`.`itemFk`)) where `sg`.`created` >= `util`.`VN_CURDATE`() + interval 0.1 day group by `sg`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88818,7 +87787,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `ticketState` AS select `tt`.`created` AS `updated`,`tt`.`stateFk` AS `stateFk`,`tt`.`userFk` AS `userFk`,`tls`.`ticketFk` AS `ticketFk`,`s`.`id` AS `state`,`s`.`order` AS `productionOrder`,`s`.`alertLevel` AS `alertLevel`,`s`.`code` AS `code`,`s`.`isPreviousPreparable` AS `isPreviousPreparable`,`s`.`isPicked` AS `isPicked` from ((`ticketLastState` `tls` join `ticketTracking` `tt` on(`tt`.`id` = `tls`.`ticketTrackingFk`)) join `state` `s` on(`s`.`id` = `tt`.`stateFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88836,8 +87805,8 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `ticketStateToday` AS select `ts`.`ticketFk` AS `ticketFk`,`ts`.`state` AS `state`,`ts`.`productionOrder` AS `productionOrder`,`ts`.`alertLevel` AS `alertLevel`,`ts`.`userFk` AS `userFk`,`ts`.`code` AS `code`,`ts`.`updated` AS `updated`,`ts`.`isPicked` AS `isPicked` from (`ticketState` `ts` join `ticket` `t` on(`t`.`id` = `ts`.`ticketFk`)) where `t`.`shipped` between `util`.`VN_CURDATE`() and `MIDNIGHT`(`util`.`VN_CURDATE`()) */; +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ticketStateToday` AS select `ts`.`ticketFk` AS `ticketFk`,`ts`.`state` AS `state`,`ts`.`productionOrder` AS `productionOrder`,`ts`.`alertLevel` AS `alertLevel`,`ts`.`userFk` AS `userFk`,`ts`.`code` AS `code`,`ts`.`updated` AS `updated`,`ts`.`isPicked` AS `isPicked` from (`ticketState` `ts` join `ticket` `t` on(`t`.`id` = `ts`.`ticketFk`)) where `t`.`shipped` between `util`.`VN_CURDATE`() and `util`.`midnight`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -88854,7 +87823,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `tr2` AS select `travel`.`id` AS `id`,`travel`.`shipped` AS `shipped`,`travel`.`shipmentHour` AS `shipmentHour`,`travel`.`landed` AS `landed`,`travel`.`landingHour` AS `landingHour`,`travel`.`warehouseInFk` AS `warehouseInFk`,`travel`.`warehouseOutFk` AS `warehouseOutFk`,`travel`.`agencyModeFk` AS `agencyFk`,`travel`.`ref` AS `ref`,`travel`.`isDelivered` AS `isDelivered`,`travel`.`isReceived` AS `isReceived`,`travel`.`m3` AS `m3`,`travel`.`kg` AS `kg`,`travel`.`cargoSupplierFk` AS `cargoSupplierFk`,`travel`.`totalEntries` AS `totalEntries` from `travel` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88872,7 +87841,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `traceabilityBuy` AS select `b`.`id` AS `buyFk`,`b`.`quantity` AS `quantity`,`tr`.`landed` AS `landed`,`w`.`name` AS `warehouseName`,`b`.`entryFk` AS `entryFk`,`s`.`name` AS `supplierName`,ifnull(`b`.`itemOriginalFk`,`b`.`itemFk`) AS `itemFk` from ((((`buy` `b` join `entry` `e` on(`e`.`id` = `b`.`entryFk`)) join `travel` `tr` on(`tr`.`id` = `e`.`travelFk`)) join `supplier` `s` on(`s`.`id` = `e`.`supplierFk`)) join `warehouse` `w` on(`w`.`id` = `tr`.`warehouseInFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88890,7 +87859,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `traceabilitySale` AS select `s`.`ticketFk` AS `ticketFk`,`sb`.`buyFk` AS `buyFk`,`t`.`shipped` AS `shipped`,`t`.`nickname` AS `nickname`,`s`.`quantity` AS `quantity`,concat(`w`.`firstName`,' ',`w`.`lastName`) AS `worker` from (((`saleBuy` `sb` join `sale` `s` on(`s`.`id` = `sb`.`saleFk`)) join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `worker` `w` on(`w`.`id` = `sb`.`workerFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88908,7 +87877,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerBusinessDated` AS select `t`.`dated` AS `dated`,`b`.`id` AS `businessFk`,`b`.`workerFk` AS `workerFk` from (`time` `t` left join `business` `b` on(`t`.`dated` between `b`.`started` and ifnull(`b`.`ended`,`util`.`VN_CURDATE`()))) where `t`.`dated` > `util`.`VN_CURDATE`() + interval -2 year */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88926,7 +87895,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerDepartment` AS select `b`.`workerFk` AS `workerFk`,`b`.`departmentFk` AS `departmentFk` from (`business` `b` join `worker` `w` on(`w`.`businessFk` = `b`.`id`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88944,7 +87913,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerLabour` AS select `b`.`id` AS `businessFk`,`b`.`workerFk` AS `workerFk`,`b`.`workcenterFk` AS `workCenterFk`,`b`.`started` AS `started`,`b`.`ended` AS `ended`,`b`.`departmentFk` AS `departmentFk`,`b`.`payedHolidays` AS `payedHolidays` from `business` `b` order by `b`.`started` desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88962,7 +87931,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerMedia` AS select `w`.`id` AS `workerFk`,`w`.`phone` AS `mediaValue` from `worker` `w` where `w`.`phone` is not null */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88980,7 +87949,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerSpeedExpedition` AS select `sv`.`ticketFk` AS `ticketFk`,sum(`sv`.`litros`) AS `litros`,sum(if(`sub`.`started` > `util`.`VN_NOW`() + interval -1 hour,`sv`.`litros`,0)) AS `literLastHour`,cast(60 * sum(`sv`.`litros`) / time_to_sec(timediff(max(`sub`.`finished`),min(`sub`.`started`))) as decimal(10,1)) AS `litersByMinute`,`sub`.`code` AS `workerCode`,`sub`.`cajas` AS `cajas`,`sub`.`warehouseFk` AS `warehouseFk` from (`saleVolume` `sv` join `expeditionTimeExpended` `sub` on(`sub`.`ticketFk` = `sv`.`ticketFk`)) group by `sub`.`code` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -88998,7 +87967,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerSpeedSaleTracking` AS select `salesPreparedLastHour`.`warehouseFk` AS `warehouseFk`,`salesPreparedLastHour`.`code` AS `state`,`salesPreparedLastHour`.`workerCode` AS `workerCode`,sum(`salesPreparedLastHour`.`litros`) AS `sumaLitros`,min(`salesPreparedLastHour`.`created`) AS `started`,max(`salesPreparedLastHour`.`created`) AS `finished`,sum(if(`salesPreparedLastHour`.`created` >= `util`.`VN_NOW`() + interval -1 hour,`salesPreparedLastHour`.`litros`,0)) AS `sumaLitrosLastHour`,cast(60 * sum(`salesPreparedLastHour`.`litros`) / time_to_sec(timediff(max(`salesPreparedLastHour`.`created`),min(`salesPreparedLastHour`.`created`))) as decimal(10,1)) AS `litersByMinute`,`salesPreparedLastHour`.`departmentName` AS `departmentName` from `salesPreparedLastHour` group by `salesPreparedLastHour`.`warehouseFk`,`salesPreparedLastHour`.`code`,`salesPreparedLastHour`.`workerCode` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89016,7 +87985,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerTeamCollegues` AS select distinct `w`.`workerFk` AS `workerFk`,`t`.`workerFk` AS `collegueFk` from (`workerTeam` `w` join `workerTeam` `t` on(`w`.`team` = `t`.`team`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89034,7 +88003,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerTimeControlUserInfo` AS select `u`.`id` AS `userFk`,`w`.`firstName` AS `name`,`w`.`lastName` AS `surname`,`u`.`name` AS `user`,`u`.`password` AS `password`,`wd`.`departmentFk` AS `departmentFk`,left(`c`.`fi`,8) AS `dni` from (((`account`.`user` `u` join `vn`.`worker` `w` on(`w`.`id` = `u`.`id`)) join `vn`.`client` `c` on(`c`.`id` = `u`.`id`)) left join `vn`.`workerDepartment` `wd` on(`wd`.`workerFk` = `w`.`id`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89052,7 +88021,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerTimeJourneyNG` AS select `wtc`.`userFk` AS `userFk`,cast(`wtc`.`timed` as date) AS `dated`,if(`wtc`.`order` MOD 2,-1,1) * (hour(`wtc`.`timed`) + minute(`wtc`.`timed`) / 60) AS `Journey`,dayname(`wtc`.`timed`) AS `dayName`,`w`.`lastName` AS `name`,`w`.`firstName` AS `firstname` from (`workerTimeControl` `wtc` join `worker` `w` on(`w`.`id` = `wtc`.`userFk`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89070,7 +88039,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `workerWithoutTractor` AS select `c`.`workerFk` AS `workerFk`,`cl`.`name` AS `Trabajador`,count(distinct `c`.`id`) AS `Colecciones`,max(`c`.`created`) AS `created` from ((`collection` `c` join `client` `cl` on(`cl`.`id` = `c`.`workerFk`)) left join `machineWorker` `mw` on(`mw`.`workerFk` = `c`.`workerFk` and `mw`.`inTimed` > `util`.`VN_CURDATE`())) where `c`.`created` > `util`.`VN_CURDATE`() and `mw`.`workerFk` is null group by `c`.`workerFk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89088,7 +88057,7 @@ USE `vn`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50013 DEFINER=`vn`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `zoneEstimatedDelivery` AS select `t`.`zoneFk` AS `zoneFk`,`zc`.`hour` AS `zoneClosureHour`,`z`.`hour` AS `zoneHour`,`sv`.`volume` AS `volume`,`al`.`hasToRecalcPrice` AS `hasToRecalcPrice`,`lhp`.`m3` AS `m3`,`dl`.`minSpeed` AS `minSpeed` from (((((((((`vn`.`ticket` `t` join `vn`.`ticketStateToday` `tst` on(`tst`.`ticketFk` = `t`.`id`)) join `vn`.`state` `s` on(`s`.`id` = `tst`.`state`)) join `vn`.`saleVolume` `sv` on(`sv`.`ticketFk` = `t`.`id`)) left join `vn`.`lastHourProduction` `lhp` on(`lhp`.`warehouseFk` = `t`.`warehouseFk`)) join `vn`.`warehouse` `w` on(`w`.`id` = `t`.`warehouseFk`)) straight_join `vn`.`zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `vn`.`zoneClosure` `zc` on(`zc`.`zoneFk` = `t`.`zoneFk` and `zc`.`dated` = `util`.`VN_CURDATE`())) left join `cache`.`departure_limit` `dl` on(`dl`.`warehouse_id` = `t`.`warehouseFk` and `dl`.`fecha` = `util`.`VN_CURDATE`())) join `vn`.`alertLevel` `al` on(`al`.`id` = `s`.`alertLevel`)) where `w`.`hasProduction` <> 0 and cast(`t`.`shipped` as date) = `util`.`VN_CURDATE`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; @@ -89131,7 +88100,7 @@ USE `vn2008`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `Articles` AS select `i`.`id` AS `Id_Article`,`i`.`name` AS `Article`,`i`.`typeFk` AS `tipo_id`,`i`.`size` AS `Medida`,`i`.`inkFk` AS `Color`,`i`.`category` AS `Categoria`,`i`.`stems` AS `Tallos`,`i`.`originFk` AS `id_origen`,`i`.`description` AS `description`,`i`.`producerFk` AS `producer_id`,`i`.`intrastatFk` AS `Codintrastat`,`i`.`box` AS `caja`,`i`.`expenseFk` AS `expenseFk`,`i`.`comment` AS `comments`,`i`.`relevancy` AS `relevancy`,`i`.`image` AS `Foto`,`i`.`generic` AS `generic`,`i`.`density` AS `density`,`i`.`minPrice` AS `PVP`,`i`.`hasMinPrice` AS `Min`,`i`.`isActive` AS `isActive`,`i`.`longName` AS `longName`,`i`.`subName` AS `subName`,`i`.`tag5` AS `tag5`,`i`.`value5` AS `value5`,`i`.`tag6` AS `tag6`,`i`.`value6` AS `value6`,`i`.`tag7` AS `tag7`,`i`.`value7` AS `value7`,`i`.`tag8` AS `tag8`,`i`.`value8` AS `value8`,`i`.`tag9` AS `tag9`,`i`.`value9` AS `value9`,`i`.`tag10` AS `tag10`,`i`.`value10` AS `value10`,`i`.`minimum` AS `minimum`,`i`.`upToDown` AS `upToDown`,`i`.`hasKgPrice` AS `hasKgPrice`,`i`.`equivalent` AS `Equivalente`,`i`.`isToPrint` AS `Imprimir`,`i`.`family` AS `Familia__`,`i`.`doPhoto` AS `do_photo`,`i`.`created` AS `odbc_date`,`i`.`isFloramondo` AS `isFloramondo`,`i`.`supplyResponseFk` AS `supplyResponseFk`,`i`.`stemMultiplier` AS `stemMultiplier`,`i`.`itemPackingTypeFk` AS `itemPackingTypeFk`,`i`.`packingOut` AS `packingOut` from `vn`.`item` `i` */; +/*!50001 VIEW `Articles` AS select `i`.`id` AS `Id_Article`,`i`.`name` AS `Article`,`i`.`typeFk` AS `tipo_id`,`i`.`size` AS `Medida`,`i`.`inkFk` AS `Color`,`i`.`category` AS `Categoria`,`i`.`stems` AS `Tallos`,`i`.`originFk` AS `id_origen`,`i`.`description` AS `description`,`i`.`producerFk` AS `producer_id`,`i`.`intrastatFk` AS `Codintrastat`,`i`.`box` AS `caja`,`i`.`expenseFk` AS `expenseFk`,`i`.`comment` AS `comments`,`i`.`relevancy` AS `relevancy`,`i`.`image` AS `Foto`,`i`.`generic` AS `generic`,`i`.`density` AS `density`,`i`.`minPrice` AS `PVP`,`i`.`hasMinPrice` AS `Min`,`i`.`isActive` AS `isActive`,`i`.`longName` AS `longName`,`i`.`subName` AS `subName`,`i`.`tag5` AS `tag5`,`i`.`value5` AS `value5`,`i`.`tag6` AS `tag6`,`i`.`value6` AS `value6`,`i`.`tag7` AS `tag7`,`i`.`value7` AS `value7`,`i`.`tag8` AS `tag8`,`i`.`value8` AS `value8`,`i`.`tag9` AS `tag9`,`i`.`value9` AS `value9`,`i`.`tag10` AS `tag10`,`i`.`value10` AS `value10`,`i`.`minimum` AS `minimum`,`i`.`upToDown` AS `upToDown`,`i`.`hasKgPrice` AS `hasKgPrice`,`i`.`equivalent` AS `Equivalente`,`i`.`isToPrint` AS `Imprimir`,`i`.`doPhoto` AS `do_photo`,`i`.`created` AS `odbc_date`,`i`.`isFloramondo` AS `isFloramondo`,`i`.`supplyResponseFk` AS `supplyResponseFk`,`i`.`stemMultiplier` AS `stemMultiplier`,`i`.`itemPackingTypeFk` AS `itemPackingTypeFk`,`i`.`packingOut` AS `packingOut` from `vn`.`item` `i` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -89293,7 +88262,7 @@ USE `vn2008`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `Cubos` AS select `p`.`id` AS `Id_Cubo`,`p`.`volume` AS `Volumen`,`p`.`width` AS `X`,`p`.`depth` AS `Y`,`p`.`height` AS `Z`,`p`.`isPackageReturnable` AS `Retornable`,`p`.`created` AS `odbc_date`,`p`.`itemFk` AS `item_id`,`p`.`price` AS `pvp`,`p`.`cubicPackage` AS `bultoCubico`,`p`.`value` AS `Valor`,`p`.`packagingReturnFk` AS `idCubos_Retorno`,`p`.`lower` AS `Bajan`,`p`.`upload` AS `Suben`,`p`.`base` AS `Base`,`p`.`isBox` AS `box`,`p`.`returnCost` AS `costeRetorno` from `vn`.`packaging` `p` */; +/*!50001 VIEW `Cubos` AS select `p`.`id` AS `Id_Cubo`,`p`.`volume` AS `Volumen`,`p`.`width` AS `X`,`p`.`depth` AS `Y`,`p`.`height` AS `Z`,`p`.`isPackageReturnable` AS `Retornable`,`p`.`created` AS `odbc_date`,`p`.`itemFk` AS `item_id`,`p`.`price` AS `pvp`,`p`.`cubicPackage` AS `bultoCubico`,`p`.`value` AS `Valor`,`p`.`packagingReturnFk` AS `idCubos_Retorno`,`p`.`lower` AS `Bajan`,`p`.`upload` AS `Suben`,`p`.`base` AS `Base`,`p`.`isBox` AS `box`,`p`.`returnCost` AS `costeRetorno`,`p`.`isActive` AS `isActive` from `vn`.`packaging` `p` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -91237,7 +90206,7 @@ USE `vn2008`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `state` AS select `s`.`id` AS `id`,`s`.`name` AS `name`,`s`.`order` AS `order`,`s`.`alertLevel` AS `alert_level`,`s`.`code` AS `code`,`s`.`sectorProdPriority` AS `sectorProdPriority`,`s`.`nextStateFk` AS `nextStateFk`,`s`.`isPreviousPreparable` AS `isPreviousPreparable`,`s`.`isPicked` AS `isPicked` from `vn`.`state` `s` */; +/*!50001 VIEW `state` AS select `s`.`id` AS `id`,`s`.`name` AS `name`,`s`.`order` AS `order`,`s`.`alertLevel` AS `alert_level`,`s`.`code` AS `code`,`s`.`nextStateFk` AS `nextStateFk`,`s`.`isPreviousPreparable` AS `isPreviousPreparable`,`s`.`isPicked` AS `isPicked` from `vn`.`state` `s` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -91503,4 +90472,4 @@ USE `vn2008`; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-09-04 7:00:41 +-- Dump completed on 2024-10-03 7:42:53 diff --git a/db/dump/.dump/triggers.sql b/db/dump/.dump/triggers.sql index 70ef63cf4..74190df36 100644 --- a/db/dump/.dump/triggers.sql +++ b/db/dump/.dump/triggers.sql @@ -1,4 +1,5 @@ --- MariaDB dump 10.19 Distrib 10.5.23-MariaDB, for debian-linux-gnu (x86_64) +/*M!999999\- enable the sandbox mode */ +-- MariaDB dump 10.19 Distrib 10.5.26-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: db.verdnatura.es Database: account -- ------------------------------------------------------ @@ -1827,13 +1828,13 @@ USE `vn`; /*!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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`XDiario_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`XDiario_beforeInsert` BEFORE INSERT ON `XDiario` FOR EACH ROW BEGIN @@ -1863,13 +1864,13 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`XDiario_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`XDiario_beforeUpdate` BEFORE UPDATE ON `XDiario` FOR EACH ROW BEGIN @@ -1919,7 +1920,7 @@ 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`.`accountReconciliation_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`accountReconciliation_beforeInsert` BEFORE INSERT ON `accountReconciliation` FOR EACH ROW @@ -1946,7 +1947,31 @@ 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`.`address_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`address_afterInsert` + BEFORE INSERT ON `address` + FOR EACH ROW +BEGIN + IF (SELECT client_hasDifferentCountries(NEW.clientFk)) THEN + UPDATE client + SET hasToInvoiceByAddress = TRUE + WHERE id = NEW.clientFk; + 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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`address_beforeInsert` BEFORE INSERT ON `address` FOR EACH ROW BEGIN @@ -1985,31 +2010,7 @@ 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`.`address_afterInsert` - BEFORE INSERT ON `address` - FOR EACH ROW -BEGIN - IF (SELECT client_hasDifferentCountries(NEW.clientFk)) THEN - UPDATE client - SET hasToInvoiceByAddress = TRUE - WHERE id = NEW.clientFk; - 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`.`address_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`address_beforeUpdate` BEFORE UPDATE ON `address` FOR EACH ROW BEGIN @@ -2039,7 +2040,7 @@ 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`.`address_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`address_afterUpdate` AFTER UPDATE ON `address` FOR EACH ROW BEGIN @@ -2087,7 +2088,7 @@ 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`.`address_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`address_afterDelete` AFTER DELETE ON `address` FOR EACH ROW BEGIN @@ -2111,7 +2112,7 @@ 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`.`agency_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`agency_beforeInsert` BEFORE INSERT ON `agency` FOR EACH ROW BEGIN @@ -2131,7 +2132,7 @@ 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`.`agency_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`agency_afterInsert` AFTER INSERT ON `agency` FOR EACH ROW BEGIN @@ -2151,7 +2152,7 @@ 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`.`autonomy_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`autonomy_beforeInsert` BEFORE INSERT ON `autonomy` FOR EACH ROW BEGIN @@ -2173,7 +2174,7 @@ 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`.`autonomy_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`autonomy_beforeUpdate` BEFORE UPDATE ON `autonomy` FOR EACH ROW BEGIN @@ -2201,7 +2202,7 @@ 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`.`autonomy_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`autonomy_afterDelete` AFTER DELETE ON `autonomy` FOR EACH ROW BEGIN @@ -2221,7 +2222,7 @@ 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`.`awb_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`awb_beforeInsert` BEFORE INSERT ON `awb` FOR EACH ROW BEGIN @@ -2244,7 +2245,7 @@ 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`.`awbInvoiceIn_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`awbInvoiceIn_afterDelete` AFTER DELETE ON `awbInvoiceIn` FOR EACH ROW BEGIN @@ -2271,7 +2272,7 @@ 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`.`bankEntity_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`bankEntity_beforeInsert` BEFORE INSERT ON `bankEntity` FOR EACH ROW BEGIN @@ -2291,7 +2292,7 @@ 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`.`bankEntity_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`bankEntity_beforeUpdate` BEFORE UPDATE ON `bankEntity` FOR EACH ROW BEGIN @@ -2313,7 +2314,7 @@ 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`.`budgetNotes_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`budgetNotes_beforeInsert` BEFORE INSERT ON `budgetNotes` FOR EACH ROW BEGIN @@ -2339,7 +2340,7 @@ 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`.`business_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`business_beforeInsert` BEFORE INSERT ON `business` FOR EACH ROW BEGIN @@ -2363,7 +2364,7 @@ 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`.`business_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`business_afterInsert` AFTER INSERT ON `business` FOR EACH ROW BEGIN @@ -2383,7 +2384,7 @@ 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`.`business_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`business_beforeUpdate` BEFORE UPDATE ON `business` FOR EACH ROW BEGIN @@ -2427,7 +2428,7 @@ 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`.`business_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`business_afterUpdate` AFTER UPDATE ON `business` FOR EACH ROW BEGIN @@ -2451,7 +2452,7 @@ 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`.`business_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`business_afterDelete` AFTER DELETE ON `business` FOR EACH ROW BEGIN @@ -2477,7 +2478,7 @@ 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`.`buy_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_beforeInsert` BEFORE INSERT ON `buy` FOR EACH ROW trig: BEGIN @@ -2582,7 +2583,7 @@ 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`.`buy_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_afterInsert` AFTER INSERT ON `buy` FOR EACH ROW trig: BEGIN @@ -2606,7 +2607,7 @@ 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`.`buy_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_beforeUpdate` BEFORE UPDATE ON `buy` FOR EACH ROW trig:BEGIN @@ -2676,6 +2677,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 @@ -2712,7 +2717,7 @@ 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`.`buy_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_afterUpdate` AFTER UPDATE ON `buy` FOR EACH ROW trig: BEGIN @@ -2773,7 +2778,7 @@ 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`.`buy_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_beforeDelete` BEFORE DELETE ON `buy` FOR EACH ROW BEGIN @@ -2796,7 +2801,7 @@ 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`.`buy_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`buy_afterDelete` AFTER DELETE ON `buy` FOR EACH ROW trig: BEGIN @@ -2824,7 +2829,7 @@ 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`.`calendar_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`calendar_beforeInsert` BEFORE INSERT ON `calendar` FOR EACH ROW BEGIN @@ -2844,11 +2849,11 @@ 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`.`calendar_beforeUpdate` - BEFORE UPDATE ON `calendar` - FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`calendar_beforeUpdate` + BEFORE UPDATE ON `calendar` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -2864,15 +2869,15 @@ 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`.`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(); +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 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(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -2888,7 +2893,7 @@ 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`.`claim_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claim_beforeInsert` BEFORE INSERT ON `claim` FOR EACH ROW BEGIN @@ -2908,7 +2913,7 @@ 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`.`claim_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claim_beforeUpdate` BEFORE UPDATE ON `claim` FOR EACH ROW BEGIN @@ -2928,7 +2933,7 @@ 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`.`claim_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claim_afterDelete` AFTER DELETE ON `claim` FOR EACH ROW BEGIN @@ -2952,7 +2957,7 @@ 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`.`claimBeginning_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimBeginning_beforeInsert` BEFORE INSERT ON `claimBeginning` FOR EACH ROW BEGIN @@ -2972,7 +2977,7 @@ 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`.`claimBeginning_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimBeginning_beforeUpdate` BEFORE UPDATE ON `claimBeginning` FOR EACH ROW BEGIN @@ -2992,7 +2997,7 @@ 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`.`claimBeginning_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimBeginning_afterDelete` AFTER DELETE ON `claimBeginning` FOR EACH ROW BEGIN @@ -3016,7 +3021,7 @@ 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`.`claimDevelopment_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDevelopment_beforeInsert` BEFORE INSERT ON `claimDevelopment` FOR EACH ROW BEGIN @@ -3036,7 +3041,7 @@ 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`.`claimDevelopment_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDevelopment_beforeUpdate` BEFORE UPDATE ON `claimDevelopment` FOR EACH ROW BEGIN @@ -3056,7 +3061,7 @@ 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`.`claimDevelopment_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDevelopment_afterDelete` AFTER DELETE ON `claimDevelopment` FOR EACH ROW BEGIN @@ -3080,7 +3085,7 @@ 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`.`claimDms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDms_beforeInsert` BEFORE INSERT ON `claimDms` FOR EACH ROW BEGIN @@ -3100,7 +3105,7 @@ 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`.`claimDms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDms_beforeUpdate` BEFORE UPDATE ON `claimDms` FOR EACH ROW BEGIN @@ -3120,7 +3125,7 @@ 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`.`claimDms_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimDms_afterDelete` AFTER DELETE ON `claimDms` FOR EACH ROW BEGIN @@ -3144,7 +3149,7 @@ 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`.`claimEnd_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimEnd_beforeInsert` BEFORE INSERT ON `claimEnd` FOR EACH ROW BEGIN @@ -3164,7 +3169,7 @@ 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`.`claimEnd_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimEnd_beforeUpdate` BEFORE UPDATE ON `claimEnd` FOR EACH ROW BEGIN @@ -3184,7 +3189,7 @@ 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`.`claimEnd_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimEnd_afterDelete` AFTER DELETE ON `claimEnd` FOR EACH ROW BEGIN @@ -3208,7 +3213,7 @@ 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`.`claimObservation_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimObservation_beforeInsert` BEFORE INSERT ON `claimObservation` FOR EACH ROW BEGIN @@ -3228,7 +3233,7 @@ 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`.`claimObservation_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimObservation_beforeUpdate` BEFORE UPDATE ON `claimObservation` FOR EACH ROW BEGIN @@ -3248,7 +3253,7 @@ 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`.`claimObservation_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimObservation_afterDelete` AFTER DELETE ON `claimObservation` FOR EACH ROW BEGIN @@ -3272,7 +3277,7 @@ 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`.`claimRatio_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimRatio_afterInsert` AFTER INSERT ON `claimRatio` FOR EACH ROW BEGIN @@ -3295,7 +3300,7 @@ 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`.`claimRatio_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimRatio_afterUpdate` AFTER UPDATE ON `claimRatio` FOR EACH ROW BEGIN @@ -3318,7 +3323,7 @@ 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`.`claimState_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimState_beforeInsert` BEFORE INSERT ON `claimState` FOR EACH ROW BEGIN @@ -3338,7 +3343,7 @@ 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`.`claimState_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimState_beforeUpdate` BEFORE UPDATE ON `claimState` FOR EACH ROW BEGIN @@ -3358,7 +3363,7 @@ 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`.`claimState_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`claimState_afterDelete` AFTER DELETE ON `claimState` FOR EACH ROW BEGIN @@ -3382,7 +3387,7 @@ 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`.`client_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`client_beforeInsert` BEFORE INSERT ON `client` FOR EACH ROW BEGIN @@ -3415,7 +3420,7 @@ 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`.`client_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`client_afterInsert` AFTER INSERT ON `client` FOR EACH ROW BEGIN @@ -3440,7 +3445,7 @@ 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`.`client_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`client_beforeUpdate` BEFORE UPDATE ON `client` FOR EACH ROW BEGIN @@ -3528,7 +3533,7 @@ 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`.`client_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`client_afterUpdate` AFTER UPDATE ON `client` FOR EACH ROW BEGIN @@ -3577,7 +3582,7 @@ 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`.`client_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`client_afterDelete` AFTER DELETE ON `client` FOR EACH ROW BEGIN @@ -3601,7 +3606,7 @@ 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`.`clientContact_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientContact_beforeInsert` BEFORE INSERT ON `clientContact` FOR EACH ROW BEGIN @@ -3621,7 +3626,7 @@ 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`.`clientContact_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientContact_afterDelete` AFTER DELETE ON `clientContact` FOR EACH ROW BEGIN @@ -3645,7 +3650,7 @@ 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`.`clientCredit_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientCredit_afterInsert` AFTER INSERT ON `clientCredit` FOR EACH ROW BEGIN @@ -3680,7 +3685,7 @@ 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`.`clientDms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientDms_beforeInsert` BEFORE INSERT ON `clientDms` FOR EACH ROW BEGIN @@ -3700,7 +3705,7 @@ 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`.`clientDms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientDms_beforeUpdate` BEFORE UPDATE ON `clientDms` FOR EACH ROW BEGIN @@ -3720,7 +3725,7 @@ 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`.`clientDms_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientDms_afterDelete` AFTER DELETE ON `clientDms` FOR EACH ROW BEGIN @@ -3744,7 +3749,7 @@ 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`.`clientObservation_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientObservation_beforeInsert` BEFORE INSERT ON `clientObservation` FOR EACH ROW BEGIN @@ -3764,7 +3769,7 @@ 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`.`clientObservation_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientObservation_beforeUpdate` BEFORE UPDATE ON `clientObservation` FOR EACH ROW BEGIN @@ -3784,7 +3789,7 @@ 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`.`clientObservation_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientObservation_afterDelete` AFTER DELETE ON `clientObservation` FOR EACH ROW BEGIN @@ -3808,7 +3813,7 @@ 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`.`clientSample_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientSample_beforeInsert` BEFORE INSERT ON `clientSample` FOR EACH ROW BEGIN @@ -3828,7 +3833,7 @@ 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`.`clientSample_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientSample_beforeUpdate` BEFORE UPDATE ON `clientSample` FOR EACH ROW BEGIN @@ -3848,7 +3853,7 @@ 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`.`clientSample_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientSample_afterDelete` AFTER DELETE ON `clientSample` FOR EACH ROW BEGIN @@ -3872,7 +3877,7 @@ 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`.`clientUnpaid_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientUnpaid_beforeInsert` BEFORE INSERT ON `clientUnpaid` FOR EACH ROW BEGIN @@ -3892,7 +3897,7 @@ 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`.`clientUnpaid_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`clientUnpaid_beforeUpdate` BEFORE UPDATE ON `clientUnpaid` FOR EACH ROW BEGIN @@ -3912,7 +3917,7 @@ 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`.`cmr_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`cmr_beforeDelete` BEFORE DELETE ON `cmr` FOR EACH ROW BEGIN @@ -3934,7 +3939,7 @@ 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`.`collection_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collection_beforeUpdate` BEFORE UPDATE ON `collection` FOR EACH ROW BEGIN @@ -3982,9 +3987,9 @@ 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.collectionColors_beforeInsert -BEFORE INSERT -ON collectionColors FOR EACH ROW +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collectionColors_beforeInsert` + BEFORE INSERT ON `collectionColors` + FOR EACH ROW BEGIN CALL util.checkHex(NEW.rgb); END */;; @@ -4002,7 +4007,7 @@ 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`.`collectionColors_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collectionColors_beforeUpdate` BEFORE UPDATE ON `collectionColors` FOR EACH ROW BEGIN @@ -4022,7 +4027,7 @@ 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`.`collectionVolumetry_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collectionVolumetry_afterInsert` AFTER INSERT ON `collectionVolumetry` FOR EACH ROW BEGIN @@ -4060,7 +4065,7 @@ 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`.`collectionVolumetry_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collectionVolumetry_afterUpdate` AFTER UPDATE ON `collectionVolumetry` FOR EACH ROW BEGIN @@ -4118,7 +4123,7 @@ 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`.`collectionVolumetry_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`collectionVolumetry_afterDelete` AFTER DELETE ON `collectionVolumetry` FOR EACH ROW BEGIN @@ -4156,7 +4161,7 @@ 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`.`country_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`country_beforeInsert` BEFORE INSERT ON `country` FOR EACH ROW BEGIN @@ -4176,7 +4181,7 @@ 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`.`country_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`country_afterInsert` AFTER INSERT ON `country` FOR EACH ROW BEGIN @@ -4210,7 +4215,7 @@ 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`.`country_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`country_beforeUpdate` BEFORE UPDATE ON `country` FOR EACH ROW BEGIN @@ -4232,7 +4237,7 @@ 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`.`country_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`country_afterUpdate` AFTER UPDATE ON `country` FOR EACH ROW BEGIN @@ -4255,7 +4260,7 @@ 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`.`country_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`country_afterDelete` AFTER DELETE ON `country` FOR EACH ROW BEGIN @@ -4275,7 +4280,7 @@ 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`.`creditClassification_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`creditClassification_beforeUpdate` BEFORE UPDATE ON `creditClassification` FOR EACH ROW BEGIN @@ -4295,41 +4300,19 @@ 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 @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; -DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`creditInsurance_beforeInsert` - BEFORE INSERT ON `creditInsurance` - FOR EACH ROW -BEGIN - IF NEW.creditClassificationFk THEN - SET NEW.creditClassification = NEW.creditClassificationFk; - 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`.`creditInsurance_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`creditInsurance_afterInsert` AFTER INSERT ON `creditInsurance` FOR EACH ROW BEGIN UPDATE `client` c JOIN vn.creditClassification cc ON cc.client = c.id - SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassification; + SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassificationFk; END */;; DELIMITER ; @@ -4346,7 +4329,7 @@ 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`.`delivery_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`delivery_beforeInsert` BEFORE INSERT ON `delivery` FOR EACH ROW BEGIN @@ -4371,7 +4354,7 @@ 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`.`delivery_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`delivery_beforeUpdate` BEFORE UPDATE ON `delivery` FOR EACH ROW BEGIN @@ -4396,7 +4379,7 @@ 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`.`department_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`department_beforeInsert` BEFORE INSERT ON `department` FOR EACH ROW BEGIN @@ -4416,7 +4399,7 @@ 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`.`department_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`department_afterUpdate` AFTER UPDATE ON `department` FOR EACH ROW BEGIN @@ -4445,7 +4428,7 @@ 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`.`department_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`department_beforeDelete` BEFORE DELETE ON `department` FOR EACH ROW BEGIN @@ -4470,7 +4453,7 @@ 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`.`department_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`department_afterDelete` AFTER DELETE ON `department` FOR EACH ROW BEGIN @@ -4496,7 +4479,7 @@ 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`.`deviceProduction_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_beforeInsert` BEFORE INSERT ON `deviceProduction` FOR EACH ROW BEGIN @@ -4516,7 +4499,7 @@ 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`.`deviceProduction_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_beforeUpdate` BEFORE UPDATE ON `deviceProduction` FOR EACH ROW BEGIN @@ -4536,7 +4519,7 @@ 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`.`deviceProduction_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_afterDelete` AFTER DELETE ON `deviceProduction` FOR EACH ROW BEGIN @@ -4560,7 +4543,7 @@ 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`.`deviceProductionModels_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionModels_beforeInsert` BEFORE INSERT ON `deviceProductionModels` FOR EACH ROW BEGIN @@ -4580,7 +4563,7 @@ 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`.`deviceProductionModels_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionModels_beforeUpdate` BEFORE UPDATE ON `deviceProductionModels` FOR EACH ROW BEGIN @@ -4600,7 +4583,7 @@ 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`.`deviceProductionState_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionState_beforeInsert` BEFORE INSERT ON `deviceProductionState` FOR EACH ROW BEGIN @@ -4620,7 +4603,7 @@ 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`.`deviceProductionState_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionState_beforeUpdate` BEFORE UPDATE ON `deviceProductionState` FOR EACH ROW BEGIN @@ -4640,7 +4623,7 @@ 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`.`deviceProductionUser_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeInsert` BEFORE INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN @@ -4660,7 +4643,7 @@ 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`.`deviceProductionUser_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_afterInsert` AFTER INSERT ON `deviceProductionUser` FOR EACH ROW BEGIN @@ -4680,7 +4663,7 @@ 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`.`deviceProductionUser_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeUpdate` BEFORE UPDATE ON `deviceProductionUser` FOR EACH ROW BEGIN @@ -4702,7 +4685,7 @@ 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`.`deviceProductionUser_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_afterDelete` AFTER DELETE ON `deviceProductionUser` FOR EACH ROW BEGIN @@ -4726,7 +4709,7 @@ 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`.`dms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`dms_beforeInsert` BEFORE INSERT ON `dms` FOR EACH ROW BEGIN @@ -4759,13 +4742,13 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`dms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`dms_beforeUpdate` BEFORE UPDATE ON `dms` FOR EACH ROW BEGIN @@ -4805,7 +4788,7 @@ 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`.`dms_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`dms_beforeDelete` BEFORE DELETE ON `dms` FOR EACH ROW BEGIN @@ -4833,7 +4816,7 @@ 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`.`duaTax_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`duaTax_beforeInsert` BEFORE INSERT ON `duaTax` FOR EACH ROW BEGIN @@ -4854,7 +4837,7 @@ 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`.`duaTax_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`duaTax_beforeUpdate` BEFORE UPDATE ON `duaTax` FOR EACH ROW BEGIN @@ -4875,10 +4858,10 @@ 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 ektEntryAssign_afterInsert -AFTER INSERT -ON ektEntryAssign FOR EACH ROW - UPDATE entry SET reference = NEW.`ref` WHERE id = NEW.entryFk */;; +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ektEntryAssign_afterInsert` + AFTER INSERT ON `ektEntryAssign` + FOR EACH ROW +UPDATE entry SET reference = NEW.`ref` WHERE id = NEW.entryFk */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; @@ -4893,8 +4876,8 @@ 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.ektEntryAssign_afterUpdate - AFTER UPDATE ON ektEntryAssign +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ektEntryAssign_afterUpdate` + AFTER UPDATE ON `ektEntryAssign` FOR EACH ROW BEGIN IF NOT(NEW.`ref` <=> OLD.`ref`) OR NOT(NEW.`entryFk` <=> OLD.`entryFk`) THEN @@ -4915,7 +4898,7 @@ 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`.`entry_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entry_beforeInsert` BEFORE INSERT ON `entry` FOR EACH ROW BEGIN @@ -4941,7 +4924,7 @@ 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`.`entry_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entry_beforeUpdate` BEFORE UPDATE ON `entry` FOR EACH ROW BEGIN @@ -5013,7 +4996,10 @@ BEGIN SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk); END IF; - IF NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.currencyFk <=> OLD.currencyFk) THEN + IF NOT (NEW.travelFk <=> OLD.travelFk) + OR NOT (NEW.currencyFk <=> OLD.currencyFk) + OR NOT (NEW.supplierFk <=> OLD.supplierFk) THEN + SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk, NEW.supplierFk); END IF; END */;; @@ -5031,7 +5017,7 @@ 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`.`entry_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entry_afterUpdate` AFTER UPDATE ON `entry` FOR EACH ROW BEGIN @@ -5058,7 +5044,7 @@ 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`.`entry_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entry_beforeDelete` BEFORE DELETE ON `entry` FOR EACH ROW BEGIN @@ -5079,7 +5065,7 @@ 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`.`entry_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entry_afterDelete` AFTER DELETE ON `entry` FOR EACH ROW BEGIN @@ -5103,7 +5089,7 @@ 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`.`entryDms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryDms_beforeInsert` BEFORE INSERT ON `entryDms` FOR EACH ROW BEGIN @@ -5123,7 +5109,7 @@ 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`.`entryDms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryDms_beforeUpdate` BEFORE UPDATE ON `entryDms` FOR EACH ROW BEGIN @@ -5143,7 +5129,7 @@ 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`.`entryDms_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryDms_afterDelete` AFTER DELETE ON `entryDms` FOR EACH ROW BEGIN @@ -5167,7 +5153,7 @@ 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`.`entryObservation_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryObservation_beforeInsert` BEFORE INSERT ON `entryObservation` FOR EACH ROW BEGIN @@ -5187,7 +5173,7 @@ 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`.`entryObservation_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryObservation_beforeUpdate` BEFORE UPDATE ON `entryObservation` FOR EACH ROW BEGIN @@ -5207,7 +5193,7 @@ 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`.`entryObservation_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`entryObservation_afterDelete` AFTER DELETE ON `entryObservation` FOR EACH ROW BEGIN @@ -5231,7 +5217,7 @@ 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`.`expedition_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expedition_beforeInsert` BEFORE INSERT ON `expedition` FOR EACH ROW BEGIN @@ -5270,7 +5256,7 @@ 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`.`expedition_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expedition_beforeUpdate` BEFORE UPDATE ON `expedition` FOR EACH ROW BEGIN @@ -5299,7 +5285,7 @@ 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`.`expedition_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expedition_beforeDelete` BEFORE DELETE ON `expedition` FOR EACH ROW BEGIN @@ -5323,7 +5309,7 @@ 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`.`expedition_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expedition_afterDelete` AFTER DELETE ON `expedition` FOR EACH ROW BEGIN @@ -5347,7 +5333,7 @@ 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`.`expeditionPallet_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionPallet_beforeInsert` BEFORE INSERT ON `expeditionPallet` FOR EACH ROW BEGIN @@ -5375,7 +5361,7 @@ 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`.`expeditionScan_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionScan_beforeInsert` BEFORE INSERT ON `expeditionScan` FOR EACH ROW BEGIN @@ -5397,7 +5383,7 @@ 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`.`expeditionState_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionState_beforeInsert` BEFORE INSERT ON `expeditionState` FOR EACH ROW BEGIN @@ -5417,7 +5403,7 @@ 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`.`expeditionState_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionState_afterInsert` AFTER INSERT ON `expeditionState` FOR EACH ROW BEGIN @@ -5441,7 +5427,7 @@ 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`.`floramondoConfig_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`floramondoConfig_afterInsert` AFTER INSERT ON `floramondoConfig` FOR EACH ROW BEGIN @@ -5461,8 +5447,8 @@ 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`.`gregue_beforeInsert` - BEFORE INSERT ON greuge +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`gregue_beforeInsert` + BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN IF NEW.userFk IS NULL THEN @@ -5483,7 +5469,7 @@ 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`.`greuge_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`greuge_beforeInsert` BEFORE INSERT ON `greuge` FOR EACH ROW BEGIN @@ -5503,7 +5489,7 @@ 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`.`greuge_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`greuge_beforeUpdate` BEFORE UPDATE ON `greuge` FOR EACH ROW BEGIN @@ -5523,7 +5509,7 @@ 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`.`greuge_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`greuge_afterDelete` AFTER DELETE ON `greuge` FOR EACH ROW BEGIN @@ -5547,7 +5533,7 @@ 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` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeInsert` BEFORE INSERT ON `host` FOR EACH ROW BEGIN @@ -5567,7 +5553,7 @@ 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_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeUpdate` BEFORE UPDATE ON `host` FOR EACH ROW BEGIN @@ -5588,7 +5574,7 @@ 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`.`invoiceIn_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceIn_beforeInsert` BEFORE INSERT ON `invoiceIn` FOR EACH ROW BEGIN @@ -5656,7 +5642,7 @@ 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`.`invoiceIn_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceIn_beforeUpdate` BEFORE UPDATE ON `invoiceIn` FOR EACH ROW BEGIN @@ -5700,7 +5686,7 @@ 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`.`invoiceIn_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceIn_afterUpdate` AFTER UPDATE ON `invoiceIn` FOR EACH ROW BEGIN @@ -5738,7 +5724,7 @@ 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`.`invoiceIn_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceIn_beforeDelete` BEFORE DELETE ON `invoiceIn` FOR EACH ROW BEGIN @@ -5758,7 +5744,7 @@ 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`.`invoiceIn_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceIn_afterDelete` AFTER DELETE ON `invoiceIn` FOR EACH ROW BEGIN @@ -5782,7 +5768,7 @@ 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`.`invoiceInDueDay_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_beforeInsert` BEFORE INSERT ON `invoiceInDueDay` FOR EACH ROW BEGIN @@ -5824,7 +5810,7 @@ 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`.`invoiceInDueDay_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_beforeUpdate` BEFORE UPDATE ON `invoiceInDueDay` FOR EACH ROW BEGIN @@ -5866,7 +5852,7 @@ 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`.`invoiceInDueDay_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_afterDelete` AFTER DELETE ON `invoiceInDueDay` FOR EACH ROW BEGIN @@ -5890,7 +5876,7 @@ 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`.`invoiceInTax_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_beforeInsert` BEFORE INSERT ON `invoiceInTax` FOR EACH ROW BEGIN @@ -5911,7 +5897,7 @@ 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`.`invoiceInTax_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_beforeUpdate` BEFORE UPDATE ON `invoiceInTax` FOR EACH ROW BEGIN @@ -5935,7 +5921,7 @@ 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`.`invoiceInTax_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_afterDelete` AFTER DELETE ON `invoiceInTax` FOR EACH ROW BEGIN @@ -5953,13 +5939,13 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_beforeInsert` BEFORE INSERT ON `invoiceOut` FOR EACH ROW BEGIN @@ -6024,13 +6010,13 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_afterInsert` AFTER INSERT ON `invoiceOut` FOR EACH ROW BEGIN @@ -6050,7 +6036,7 @@ 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`.`invoiceOut_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_beforeUpdate` BEFORE UPDATE ON `invoiceOut` FOR EACH ROW BEGIN @@ -6071,7 +6057,7 @@ 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`.`invoiceOut_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceOut_beforeDelete` BEFORE DELETE ON `invoiceOut` FOR EACH ROW BEGIN @@ -6091,7 +6077,7 @@ 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`.`item_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`item_beforeInsert` BEFORE INSERT ON `item` FOR EACH ROW BEGIN @@ -6121,7 +6107,7 @@ 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`.`item_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`item_afterInsert` AFTER INSERT ON `item` FOR EACH ROW BEGIN @@ -6149,7 +6135,7 @@ 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`.`item_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`item_beforeUpdate` BEFORE UPDATE ON `item` FOR EACH ROW BEGIN @@ -6175,7 +6161,7 @@ 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`.`item_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`item_afterUpdate` AFTER UPDATE ON `item` FOR EACH ROW BEGIN @@ -6198,7 +6184,7 @@ 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`.`item_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`item_afterDelete` AFTER DELETE ON `item` FOR EACH ROW BEGIN @@ -6223,7 +6209,7 @@ 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`.`itemBarcode_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBarcode_beforeInsert` BEFORE INSERT ON `itemBarcode` FOR EACH ROW BEGIN @@ -6243,7 +6229,7 @@ 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`.`itemBarcode_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBarcode_beforeUpdate` BEFORE UPDATE ON `itemBarcode` FOR EACH ROW BEGIN @@ -6263,7 +6249,7 @@ 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`.`itemBarcode_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBarcode_afterDelete` AFTER DELETE ON `itemBarcode` FOR EACH ROW BEGIN @@ -6287,7 +6273,7 @@ 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`.`itemBotanical_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBotanical_beforeInsert` BEFORE INSERT ON `itemBotanical` FOR EACH ROW BEGIN @@ -6307,7 +6293,7 @@ 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`.`itemBotanical_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBotanical_beforeUpdate` BEFORE UPDATE ON `itemBotanical` FOR EACH ROW BEGIN @@ -6327,7 +6313,7 @@ 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`.`itemBotanical_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemBotanical_afterDelete` AFTER DELETE ON `itemBotanical` FOR EACH ROW BEGIN @@ -6351,7 +6337,7 @@ 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`.`itemCategory_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemCategory_afterInsert` AFTER INSERT ON `itemCategory` FOR EACH ROW BEGIN @@ -6374,7 +6360,7 @@ 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`.`itemCost_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemCost_beforeInsert` BEFORE INSERT ON `itemCost` FOR EACH ROW BEGIN @@ -6397,7 +6383,7 @@ 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`.`itemCost_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemCost_beforeUpdate` BEFORE UPDATE ON `itemCost` FOR EACH ROW BEGIN @@ -6439,7 +6425,7 @@ 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`.`itemMinimumQuantity_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemMinimumQuantity_beforeInsert` BEFORE INSERT ON `itemMinimumQuantity` FOR EACH ROW BEGIN @@ -6460,7 +6446,7 @@ 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`.`itemMinimumQuantity_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemMinimumQuantity_beforeUpdate` BEFORE UPDATE ON `itemMinimumQuantity` FOR EACH ROW BEGIN @@ -6481,7 +6467,7 @@ 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`.`itemMinimumQuantity_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemMinimumQuantity_afterDelete` AFTER DELETE ON `itemMinimumQuantity` FOR EACH ROW BEGIN @@ -6505,7 +6491,7 @@ 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`.`itemShelving_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_beforeInsert` BEFORE INSERT ON `itemShelving` FOR EACH ROW BEGIN @@ -6528,7 +6514,37 @@ 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`.`itemShelving_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterInsert` + AFTER INSERT ON `itemShelving` + FOR EACH ROW +BEGIN + INSERT INTO itemShelvingLog + SET itemShelvingFk = NEW.id, + workerFk = account.myUser_getId(), + accion = 'CREA REGISTRO', + itemFk = NEW.itemFk, + shelvingFk = NEW.shelvingFk, + visible = NEW.visible, + `grouping` = NEW.`grouping`, + packing = NEW.packing, + available = NEW.available; + +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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_beforeUpdate` BEFORE UPDATE ON `itemShelving` FOR EACH ROW BEGIN @@ -6553,7 +6569,7 @@ 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`.`itemShelving_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterUpdate` AFTER UPDATE ON `itemShelving` FOR EACH ROW BEGIN @@ -6583,7 +6599,7 @@ 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`.`itemShelving_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_beforeDelete` BEFORE DELETE ON `itemShelving` FOR EACH ROW INSERT INTO vn.itemShelvingLog(itemShelvingFk, @@ -6610,13 +6626,13 @@ 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`.`itemShelving _afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterDelete` AFTER DELETE ON `itemShelving` FOR EACH ROW BEGIN INSERT INTO shelvingLog SET `action` = 'delete', - `changedModel` = 'itemShelving', + `changedModel` = 'ItemShelving', `changedModelId` = OLD.id, `userFk` = account.myUser_getId(); END */;; @@ -6634,31 +6650,7 @@ 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`.`itemShelving_afterDelete` - AFTER DELETE ON `itemShelving` - FOR EACH ROW -BEGIN - INSERT INTO shelvingLog - SET `action` = 'delete', - `changedModel` = 'itemShelving', - `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 `vn`.`itemShelvingSale_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelvingSale_afterInsert` AFTER INSERT ON `itemShelvingSale` FOR EACH ROW BEGIN @@ -6682,7 +6674,7 @@ 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`.`itemTag_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_beforeInsert` BEFORE INSERT ON `itemTag` FOR EACH ROW BEGIN @@ -6703,7 +6695,7 @@ 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`.`itemTag_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_afterInsert` AFTER INSERT ON `itemTag` FOR EACH ROW trig: BEGIN @@ -6727,7 +6719,7 @@ 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`.`itemTag_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_beforeUpdate` BEFORE UPDATE ON `itemTag` FOR EACH ROW BEGIN @@ -6752,7 +6744,7 @@ 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`.`itemTag_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_afterUpdate` AFTER UPDATE ON `itemTag` FOR EACH ROW trig: BEGIN @@ -6788,7 +6780,7 @@ 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`.`itemTag_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_afterDelete` AFTER DELETE ON `itemTag` FOR EACH ROW trig: BEGIN @@ -6818,7 +6810,7 @@ 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`.`itemTaxCountry_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTaxCountry_beforeInsert` BEFORE INSERT ON `itemTaxCountry` FOR EACH ROW BEGIN @@ -6838,7 +6830,7 @@ 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`.`itemTaxCountry_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTaxCountry_beforeUpdate` BEFORE UPDATE ON `itemTaxCountry` FOR EACH ROW BEGIN @@ -6858,7 +6850,7 @@ 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`.`itemTaxCountry_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTaxCountry_afterDelete` AFTER DELETE ON `itemTaxCountry` FOR EACH ROW BEGIN @@ -6882,7 +6874,7 @@ 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`.`itemType_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_beforeUpdate` BEFORE UPDATE ON `itemType` FOR EACH ROW BEGIN @@ -6912,7 +6904,7 @@ 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`.`machine_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`machine_beforeInsert` BEFORE INSERT ON `machine` FOR EACH ROW BEGIN @@ -6934,7 +6926,7 @@ 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`.`mail_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`mail_beforeInsert` BEFORE INSERT ON `mail` FOR EACH ROW BEGIN @@ -6960,7 +6952,7 @@ 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`.`mandate_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`mandate_beforeInsert` BEFORE INSERT ON `mandate` FOR EACH ROW BEGIN @@ -6978,13 +6970,13 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`operator_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`operator_beforeInsert` BEFORE INSERT ON `operator` FOR EACH ROW BEGIN @@ -7004,7 +6996,7 @@ 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`.`operator_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`operator_beforeUpdate` BEFORE UPDATE ON `operator` FOR EACH ROW BEGIN @@ -7026,7 +7018,7 @@ 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`.`packaging_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`packaging_beforeInsert` BEFORE INSERT ON `packaging` FOR EACH ROW BEGIN @@ -7046,7 +7038,7 @@ 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`.`packaging_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`packaging_beforeUpdate` BEFORE UPDATE ON `packaging` FOR EACH ROW BEGIN @@ -7066,7 +7058,7 @@ 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`.`packingSite_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`packingSite_beforeInsert` BEFORE INSERT ON `packingSite` FOR EACH ROW BEGIN @@ -7086,7 +7078,7 @@ 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`.`packingSite_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`packingSite_beforeUpdate` BEFORE UPDATE ON `packingSite` FOR EACH ROW BEGIN @@ -7106,7 +7098,7 @@ 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`.`packingSite_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`packingSite_afterDelete` AFTER DELETE ON `packingSite` FOR EACH ROW BEGIN @@ -7130,7 +7122,7 @@ 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`.`parking_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`parking_beforeInsert` BEFORE INSERT ON `parking` FOR EACH ROW BEGIN @@ -7152,7 +7144,7 @@ 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`.`parking_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`parking_beforeUpdate` BEFORE UPDATE ON `parking` FOR EACH ROW BEGIN @@ -7174,7 +7166,7 @@ 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`.`parking_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`parking_afterDelete` AFTER DELETE ON `parking` FOR EACH ROW BEGIN @@ -7198,7 +7190,7 @@ 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`.`payment_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`payment_beforeInsert` BEFORE INSERT ON `payment` FOR EACH ROW BEGIN @@ -7304,7 +7296,7 @@ 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`.`payment_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`payment_afterInsert` AFTER INSERT ON `payment` FOR EACH ROW BEGIN @@ -7346,11 +7338,13 @@ DELIMITER ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; -/*!50003 SET collation_connection = utf8mb4_general_ci */ ; +/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER payment_beforeUpdate BEFORE UPDATE ON payment FOR EACH ROW +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`payment_beforeUpdate` + BEFORE UPDATE ON `payment` + FOR EACH ROW BEGIN IF ISNULL(NEW.workerFk) THEN SET NEW.workerFk = account.myUser_getId(); @@ -7370,7 +7364,7 @@ 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`.`postCode_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`postCode_beforeInsert` BEFORE INSERT ON `postCode` FOR EACH ROW BEGIN @@ -7391,7 +7385,7 @@ 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`.`postCode_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`postCode_beforeUpdate` BEFORE UPDATE ON `postCode` FOR EACH ROW BEGIN @@ -7413,7 +7407,7 @@ 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`.`postCode_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`postCode_afterUpdate` AFTER UPDATE ON `postCode` FOR EACH ROW BEGIN @@ -7441,7 +7435,7 @@ 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`.`postCode_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`postCode_afterDelete` AFTER DELETE ON `postCode` FOR EACH ROW BEGIN @@ -7461,7 +7455,7 @@ 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`.`priceFixed_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`priceFixed_beforeInsert` BEFORE INSERT ON `priceFixed` FOR EACH ROW BEGIN @@ -7486,7 +7480,7 @@ 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`.`priceFixed_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`priceFixed_beforeUpdate` BEFORE UPDATE ON `priceFixed` FOR EACH ROW BEGIN @@ -7511,7 +7505,7 @@ 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`.`productionConfig_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`productionConfig_beforeInsert` BEFORE INSERT ON `productionConfig` FOR EACH ROW BEGIN @@ -7531,7 +7525,7 @@ 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`.`productionConfig_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`productionConfig_beforeUpdate` BEFORE UPDATE ON `productionConfig` FOR EACH ROW BEGIN @@ -7551,7 +7545,7 @@ 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`.`productionConfig_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`productionConfig_afterDelete` AFTER DELETE ON `productionConfig` FOR EACH ROW BEGIN @@ -7575,7 +7569,7 @@ 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`.`projectNotes_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`projectNotes_beforeInsert` BEFORE INSERT ON `projectNotes` FOR EACH ROW BEGIN @@ -7601,7 +7595,7 @@ 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`.`province_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`province_beforeInsert` BEFORE INSERT ON `province` FOR EACH ROW BEGIN @@ -7626,7 +7620,7 @@ 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`.`province_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`province_beforeUpdate` BEFORE UPDATE ON `province` FOR EACH ROW BEGIN @@ -7652,7 +7646,7 @@ 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`.`province_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`province_afterUpdate` AFTER UPDATE ON `province` FOR EACH ROW BEGIN @@ -7680,7 +7674,7 @@ 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`.`province_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`province_afterDelete` AFTER DELETE ON `province` FOR EACH ROW BEGIN @@ -7700,7 +7694,7 @@ 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`.`rate_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_beforeInsert` BEFORE INSERT ON `rate` FOR EACH ROW BEGIN @@ -7720,7 +7714,7 @@ 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`.`rate_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_beforeUpdate` BEFORE UPDATE ON `rate` FOR EACH ROW BEGIN @@ -7740,7 +7734,7 @@ 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`.`rate_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_afterDelete` AFTER DELETE ON `rate` FOR EACH ROW BEGIN @@ -7764,7 +7758,7 @@ 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`.`receipt_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`receipt_beforeInsert` BEFORE INSERT ON `receipt` FOR EACH ROW BEGIN @@ -7793,7 +7787,7 @@ 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`.`receipt_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`receipt_afterInsert` AFTER INSERT ON `receipt` FOR EACH ROW CALL clientRisk_update(NEW.clientFk, NEW.companyFk, -NEW.amountPaid) */;; @@ -7811,7 +7805,7 @@ 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`.`receipt_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`receipt_beforeUpdate` BEFORE UPDATE ON `receipt` FOR EACH ROW BEGIN @@ -7833,7 +7827,7 @@ 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`.`receipt_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`receipt_afterUpdate` AFTER UPDATE ON `receipt` FOR EACH ROW BEGIN @@ -7860,7 +7854,7 @@ 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`.`receipt_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`receipt_beforeDelete` BEFORE DELETE ON `receipt` FOR EACH ROW CALL clientRisk_update(OLD.clientFk, OLD.companyFk, OLD.amountPaid) */;; @@ -7878,7 +7872,7 @@ 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`.`recovery_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`recovery_beforeInsert` BEFORE INSERT ON `recovery` FOR EACH ROW BEGIN @@ -7898,7 +7892,7 @@ 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`.`recovery_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`recovery_beforeUpdate` BEFORE UPDATE ON `recovery` FOR EACH ROW BEGIN @@ -7918,7 +7912,7 @@ 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`.`recovery_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`recovery_afterDelete` AFTER DELETE ON `recovery` FOR EACH ROW BEGIN @@ -7942,7 +7936,7 @@ 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` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeInsert` BEFORE INSERT ON `roadmap` FOR EACH ROW BEGIN @@ -7966,7 +7960,7 @@ 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_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeUpdate` BEFORE UPDATE ON `roadmap` FOR EACH ROW BEGIN @@ -7990,8 +7984,9 @@ 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`.`expeditionTruck_beforeInsert` - BEFORE INSERT ON `roadmapStop` FOR EACH ROW +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmapStop_beforeInsert` + BEFORE INSERT ON `roadmapStop` + FOR EACH ROW BEGIN SET NEW.description = UCASE(NEW.description); @@ -8011,8 +8006,9 @@ 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`.`expeditionTruck_beforeUpdate` - BEFORE UPDATE ON `roadmapStop` FOR EACH ROW +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmapStop_beforeUpdate` + BEFORE UPDATE ON `roadmapStop` + FOR EACH ROW BEGIN SET NEW.description = UCASE(NEW.description); @@ -8032,7 +8028,7 @@ 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`.`route_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_beforeInsert` BEFORE INSERT ON `route` FOR EACH ROW BEGIN @@ -8073,7 +8069,7 @@ 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`.`route_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_afterInsert` AFTER INSERT ON `route` FOR EACH ROW BEGIN @@ -8093,7 +8089,7 @@ 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`.`route_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_beforeUpdate` BEFORE UPDATE ON `route` FOR EACH ROW BEGIN @@ -8134,7 +8130,7 @@ 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`.`route_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_afterUpdate` AFTER UPDATE ON `route` FOR EACH ROW BEGIN @@ -8175,7 +8171,7 @@ 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`.`route_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_afterDelete` AFTER DELETE ON `route` FOR EACH ROW BEGIN @@ -8199,7 +8195,7 @@ 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`.`routesMonitor_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`routesMonitor_beforeInsert` BEFORE INSERT ON `routesMonitor` FOR EACH ROW BEGIN @@ -8219,7 +8215,7 @@ 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`.`routesMonitor_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`routesMonitor_beforeUpdate` BEFORE UPDATE ON `routesMonitor` FOR EACH ROW BEGIN @@ -8239,7 +8235,7 @@ 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`.`routesMonitor_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`routesMonitor_afterDelete` AFTER DELETE ON `routesMonitor` FOR EACH ROW BEGIN @@ -8263,7 +8259,7 @@ 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`.`sale_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_beforeInsert` BEFORE INSERT ON `sale` FOR EACH ROW BEGIN @@ -8284,7 +8280,7 @@ 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`.`sale_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_afterInsert` AFTER INSERT ON `sale` FOR EACH ROW BEGIN @@ -8326,7 +8322,7 @@ 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`.`sale_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_beforeUpdate` BEFORE UPDATE ON `sale` FOR EACH ROW BEGIN @@ -8361,7 +8357,7 @@ 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`.`sale_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_afterUpdate` AFTER UPDATE ON `sale` FOR EACH ROW BEGIN @@ -8446,7 +8442,7 @@ 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`.`sale_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_beforeDelete` BEFORE DELETE ON `sale` FOR EACH ROW BEGIN @@ -8476,7 +8472,7 @@ 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`.`sale_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sale_afterDelete` AFTER DELETE ON `sale` FOR EACH ROW BEGIN @@ -8533,7 +8529,7 @@ 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`.`saleBuy_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleBuy_beforeInsert` BEFORE INSERT ON `saleBuy` FOR EACH ROW BEGIN @@ -8555,7 +8551,7 @@ 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`.`saleGroup_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroup_beforeInsert` BEFORE INSERT ON `saleGroup` FOR EACH ROW BEGIN @@ -8575,7 +8571,7 @@ 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`.`saleGroup_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroup_beforeUpdate` BEFORE UPDATE ON `saleGroup` FOR EACH ROW BEGIN @@ -8595,11 +8591,11 @@ 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`.`saleGroup_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 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, @@ -8619,7 +8615,71 @@ 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`.`saleLabel_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroupDetail_beforeInsert` + BEFORE INSERT ON `saleGroupDetail` + 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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroupDetail_beforeUpdate` + BEFORE UPDATE ON `saleGroupDetail` + 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=`vn`@`localhost`*/ /*!50003 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 ; +/*!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=`vn`@`localhost`*/ /*!50003 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 @@ -8639,7 +8699,7 @@ 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`.`saleTracking_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleTracking_afterInsert` AFTER INSERT ON `saleTracking` FOR EACH ROW BEGIN @@ -8668,7 +8728,7 @@ 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`.`sharingCart_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sharingCart_beforeInsert` BEFORE INSERT ON `sharingCart` FOR EACH ROW BEGIN @@ -8695,7 +8755,7 @@ 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`.`sharingCart_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sharingCart_beforeUpdate` BEFORE UPDATE ON `sharingCart` FOR EACH ROW BEGIN @@ -8728,7 +8788,7 @@ 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`.`sharingCart_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sharingCart_beforeDelete` BEFORE DELETE ON `sharingCart` FOR EACH ROW BEGIN @@ -8751,7 +8811,7 @@ 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`.`sharingClient_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sharingClient_beforeInsert` BEFORE INSERT ON `sharingClient` FOR EACH ROW BEGIN @@ -8772,7 +8832,7 @@ 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`.`sharingClient_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`sharingClient_beforeUpdate` BEFORE UPDATE ON `sharingClient` FOR EACH ROW BEGIN @@ -8793,7 +8853,7 @@ 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`.`shelving_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`shelving_beforeInsert` BEFORE INSERT ON `shelving` FOR EACH ROW BEGIN @@ -8818,7 +8878,7 @@ 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`.`shelving_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`shelving_beforeUpdate` BEFORE UPDATE ON `shelving` FOR EACH ROW BEGIN @@ -8846,7 +8906,7 @@ 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`.`shelving_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`shelving_afterDelete` AFTER DELETE ON `shelving` FOR EACH ROW BEGIN @@ -8870,13 +8930,13 @@ 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`.`solunionCAP_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`solunionCAP_afterInsert` AFTER INSERT ON `solunionCAP` FOR EACH ROW BEGIN UPDATE client c JOIN creditClassification cc ON cc.client = c.id - JOIN creditInsurance ci ON ci.creditClassification = cc.id + JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance; END */;; DELIMITER ; @@ -8893,19 +8953,19 @@ 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`.`solunionCAP_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`solunionCAP_afterUpdate` AFTER UPDATE ON `solunionCAP` FOR EACH ROW BEGIN IF NEW.dateLeaving IS NOT NULL THEN UPDATE client c JOIN creditClassification cc ON cc.client = c.id - JOIN creditInsurance ci ON ci.creditClassification = cc.id + JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance; ELSE UPDATE client c JOIN creditClassification cc ON cc.client = c.id - JOIN creditInsurance ci ON ci.creditClassification = cc.id + JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id SET creditInsurance = ci.credit * 2 WHERE ci.id = OLD.creditInsurance; END IF; END */;; @@ -8923,13 +8983,13 @@ 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`.`solunionCAP_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`solunionCAP_beforeDelete` BEFORE DELETE ON `solunionCAP` FOR EACH ROW BEGIN UPDATE client c JOIN creditClassification cc ON cc.client = c.id - JOIN creditInsurance ci ON ci.creditClassification = cc.id + JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance; END */;; DELIMITER ; @@ -8946,7 +9006,7 @@ 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`.`specie_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`specie_beforeInsert` BEFORE INSERT ON `specie` FOR EACH ROW BEGIN @@ -8966,7 +9026,7 @@ 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`.`specie_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`specie_beforeUpdate` BEFORE UPDATE ON `specie` FOR EACH ROW BEGIN @@ -8986,7 +9046,7 @@ 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`.`supplier_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplier_beforeInsert` BEFORE INSERT ON `supplier` FOR EACH ROW BEGIN @@ -9006,7 +9066,45 @@ 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`.`supplier_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplier_afterUpdate` + BEFORE UPDATE ON `supplier` + FOR EACH ROW +BEGIN + IF NEW.id <> OLD.id + OR NOT (NEW.name <=> OLD.name) + OR NOT (NEW.street <=> OLD.street) + OR NOT (NEW.account <=> OLD.account) + OR NOT (NEW.nif <=> OLD.nif) + OR NOT (NEW.isVies <=> OLD.isVies) + OR NOT (NEW.provinceFk <=> OLD.provinceFk) + OR NOT (NEW.countryFk <=> OLD.countryFk) + OR NOT (NEW.postCode <=> OLD.postCode) + OR NOT (NEW.city <=> OLD.city) + OR NOT (NEW.taxTypeSageFk <=> OLD.taxTypeSageFk) + OR NOT (NEW.transactionTypeSageFk <=> OLD.transactionTypeSageFk) + OR NOT (NEW.withholdingSageFk <=> OLD.withholdingSageFk) THEN + + UPDATE sage.clientSupplier + SET isSync = FALSE + WHERE idClientSupplier IN (NEW.id, OLD.id) + AND `type` = 'P'; + 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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplier_beforeUpdate` BEFORE UPDATE ON `supplier` FOR EACH ROW BEGIN @@ -9062,45 +9160,7 @@ 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`.`supplier_afterUpdate` - BEFORE UPDATE ON `supplier` - FOR EACH ROW -BEGIN - IF NEW.id <> OLD.id - OR NOT (NEW.name <=> OLD.name) - OR NOT (NEW.street <=> OLD.street) - OR NOT (NEW.account <=> OLD.account) - OR NOT (NEW.nif <=> OLD.nif) - OR NOT (NEW.isVies <=> OLD.isVies) - OR NOT (NEW.provinceFk <=> OLD.provinceFk) - OR NOT (NEW.countryFk <=> OLD.countryFk) - OR NOT (NEW.postCode <=> OLD.postCode) - OR NOT (NEW.city <=> OLD.city) - OR NOT (NEW.taxTypeSageFk <=> OLD.taxTypeSageFk) - OR NOT (NEW.transactionTypeSageFk <=> OLD.transactionTypeSageFk) - OR NOT (NEW.withholdingSageFk <=> OLD.withholdingSageFk) THEN - - UPDATE sage.clientSupplier - SET isSync = FALSE - WHERE idClientSupplier IN (NEW.id, OLD.id) - AND `type` = 'P'; - 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`.`supplier_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplier_afterDelete` AFTER DELETE ON `supplier` FOR EACH ROW BEGIN @@ -9124,7 +9184,7 @@ 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`.`supplierAccount_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAccount_beforeInsert` BEFORE INSERT ON `supplierAccount` FOR EACH ROW BEGIN @@ -9144,7 +9204,7 @@ 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`.`supplierAccount_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAccount_beforeUpdate` BEFORE UPDATE ON `supplierAccount` FOR EACH ROW BEGIN @@ -9164,7 +9224,7 @@ 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`.`supplierAccount_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAccount_afterDelete` AFTER DELETE ON `supplierAccount` FOR EACH ROW BEGIN @@ -9188,7 +9248,7 @@ 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`.`supplierAddress_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAddress_beforeInsert` BEFORE INSERT ON `supplierAddress` FOR EACH ROW BEGIN @@ -9208,7 +9268,7 @@ 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`.`supplierAddress_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAddress_beforeUpdate` BEFORE UPDATE ON `supplierAddress` FOR EACH ROW BEGIN @@ -9228,7 +9288,7 @@ 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`.`supplierAddress_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierAddress_afterDelete` AFTER DELETE ON `supplierAddress` FOR EACH ROW BEGIN @@ -9252,7 +9312,7 @@ 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`.`supplierContact_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierContact_beforeInsert` BEFORE INSERT ON `supplierContact` FOR EACH ROW BEGIN @@ -9272,7 +9332,7 @@ 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`.`supplierContact_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierContact_beforeUpdate` BEFORE UPDATE ON `supplierContact` FOR EACH ROW BEGIN @@ -9292,7 +9352,7 @@ 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`.`supplierContact_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierContact_afterDelete` AFTER DELETE ON `supplierContact` FOR EACH ROW BEGIN @@ -9316,7 +9376,7 @@ 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`.`supplierDms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierDms_beforeInsert` BEFORE INSERT ON `supplierDms` FOR EACH ROW BEGIN @@ -9336,7 +9396,7 @@ 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`.`supplierDms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierDms_beforeUpdate` BEFORE UPDATE ON `supplierDms` FOR EACH ROW BEGIN @@ -9356,7 +9416,7 @@ 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`.`supplierDms_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`supplierDms_afterDelete` AFTER DELETE ON `supplierDms` FOR EACH ROW BEGIN @@ -9380,7 +9440,7 @@ 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`.`tag_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`tag_beforeInsert` BEFORE INSERT ON `tag` FOR EACH ROW BEGIN @@ -9402,7 +9462,7 @@ 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`.`ticket_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_beforeInsert` BEFORE INSERT ON `ticket` FOR EACH ROW BEGIN @@ -9422,7 +9482,7 @@ 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`.`ticket_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_afterInsert` AFTER INSERT ON `ticket` FOR EACH ROW BEGIN @@ -9472,7 +9532,7 @@ 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`.`ticket_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_beforeUpdate` BEFORE UPDATE ON `ticket` FOR EACH ROW BEGIN @@ -9560,7 +9620,7 @@ 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`.`ticket_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_afterUpdate` AFTER UPDATE ON `ticket` FOR EACH ROW BEGIN @@ -9588,7 +9648,7 @@ 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`.`ticket_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_beforeDelete` BEFORE DELETE ON `ticket` FOR EACH ROW BEGIN @@ -9618,7 +9678,7 @@ 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`.`ticket_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticket_afterDelete` AFTER DELETE ON `ticket` FOR EACH ROW BEGIN @@ -9636,15 +9696,15 @@ 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 = 'NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER ticketCollection_afterDelete -AFTER DELETE -ON ticketCollection FOR EACH ROW +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketCollection_afterDelete` + AFTER DELETE ON `ticketCollection` + FOR EACH ROW BEGIN DECLARE vSalesRemaining INT; @@ -9682,7 +9742,7 @@ 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`.`ticketDms_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketDms_beforeInsert` BEFORE INSERT ON `ticketDms` FOR EACH ROW BEGIN @@ -9702,7 +9762,7 @@ 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`.`ticketDms_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketDms_beforeUpdate` BEFORE UPDATE ON `ticketDms` FOR EACH ROW BEGIN @@ -9722,7 +9782,7 @@ 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`.`ticketDms_beforeDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketDms_beforeDelete` BEFORE DELETE ON `ticketDms` FOR EACH ROW BEGIN @@ -9750,7 +9810,7 @@ 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`.`ticketDms_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketDms_afterDelete` AFTER DELETE ON `ticketDms` FOR EACH ROW BEGIN @@ -9774,7 +9834,7 @@ 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`.`ticketObservation_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketObservation_beforeInsert` BEFORE INSERT ON `ticketObservation` FOR EACH ROW BEGIN @@ -9794,7 +9854,7 @@ 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`.`ticketObservation_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketObservation_beforeUpdate` BEFORE UPDATE ON `ticketObservation` FOR EACH ROW BEGIN @@ -9814,7 +9874,7 @@ 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`.`ticketObservation_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketObservation_afterDelete` AFTER DELETE ON `ticketObservation` FOR EACH ROW BEGIN @@ -9838,7 +9898,7 @@ 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`.`ticketPackaging_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketPackaging_beforeInsert` BEFORE INSERT ON `ticketPackaging` FOR EACH ROW BEGIN @@ -9858,7 +9918,7 @@ 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`.`ticketPackaging_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketPackaging_beforeUpdate` BEFORE UPDATE ON `ticketPackaging` FOR EACH ROW BEGIN @@ -9878,7 +9938,7 @@ 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`.`ticketPackaging_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketPackaging_afterDelete` AFTER DELETE ON `ticketPackaging` FOR EACH ROW BEGIN @@ -9902,7 +9962,7 @@ 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`.`ticketParking_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketParking_beforeInsert` BEFORE INSERT ON `ticketParking` FOR EACH ROW BEGIN @@ -9924,7 +9984,7 @@ 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`.`ticketRefund_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRefund_beforeInsert` BEFORE INSERT ON `ticketRefund` FOR EACH ROW BEGIN @@ -9944,7 +10004,7 @@ 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`.`ticketRefund_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRefund_beforeUpdate` BEFORE UPDATE ON `ticketRefund` FOR EACH ROW BEGIN @@ -9964,7 +10024,7 @@ 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`.`ticketRefund_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRefund_afterDelete` AFTER DELETE ON `ticketRefund` FOR EACH ROW BEGIN @@ -9988,7 +10048,7 @@ 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`.`ticketRequest_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRequest_beforeInsert` BEFORE INSERT ON `ticketRequest` FOR EACH ROW BEGIN @@ -10020,7 +10080,7 @@ 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`.`ticketRequest_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRequest_beforeUpdate` BEFORE UPDATE ON `ticketRequest` FOR EACH ROW BEGIN @@ -10048,7 +10108,7 @@ 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`.`ticketRequest_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketRequest_afterDelete` AFTER DELETE ON `ticketRequest` FOR EACH ROW BEGIN @@ -10072,7 +10132,7 @@ 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`.`ticketService_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketService_beforeInsert` BEFORE INSERT ON `ticketService` FOR EACH ROW BEGIN @@ -10092,7 +10152,7 @@ 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`.`ticketService_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketService_beforeUpdate` BEFORE UPDATE ON `ticketService` FOR EACH ROW BEGIN @@ -10112,7 +10172,7 @@ 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`.`ticketService_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketService_afterDelete` AFTER DELETE ON `ticketService` FOR EACH ROW BEGIN @@ -10136,7 +10196,7 @@ 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`.`ticketTracking_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_beforeInsert` BEFORE INSERT ON `ticketTracking` FOR EACH ROW BEGIN @@ -10156,7 +10216,7 @@ 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`.`ticketTracking_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_afterInsert` AFTER INSERT ON `ticketTracking` FOR EACH ROW BEGIN @@ -10179,9 +10239,9 @@ DELIMITER ; /*!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,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_beforeUpdate` BEFORE UPDATE ON `ticketTracking` FOR EACH ROW BEGIN @@ -10201,7 +10261,7 @@ 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`.`ticketTracking_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_afterUpdate` AFTER UPDATE ON `ticketTracking` FOR EACH ROW BEGIN @@ -10245,7 +10305,7 @@ 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`.`ticketTracking_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketTracking_afterDelete` AFTER DELETE ON `ticketTracking` FOR EACH ROW BEGIN @@ -10292,7 +10352,7 @@ 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`.`ticketWeekly_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketWeekly_beforeInsert` BEFORE INSERT ON `ticketWeekly` FOR EACH ROW BEGIN @@ -10312,7 +10372,7 @@ 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`.`ticketWeekly_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketWeekly_beforeUpdate` BEFORE UPDATE ON `ticketWeekly` FOR EACH ROW BEGIN @@ -10332,7 +10392,7 @@ 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`.`ticketWeekly_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`ticketWeekly_afterDelete` AFTER DELETE ON `ticketWeekly` FOR EACH ROW BEGIN @@ -10356,7 +10416,7 @@ 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`.`time_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`time_afterUpdate` AFTER UPDATE ON `time` FOR EACH ROW BEGIN @@ -10381,7 +10441,7 @@ 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`.`town_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_beforeInsert` BEFORE INSERT ON `town` FOR EACH ROW BEGIN @@ -10402,7 +10462,7 @@ 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`.`town_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_beforeUpdate` BEFORE UPDATE ON `town` FOR EACH ROW BEGIN @@ -10424,7 +10484,7 @@ 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`.`town_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_afterUpdate` AFTER UPDATE ON `town` FOR EACH ROW BEGIN @@ -10452,7 +10512,7 @@ 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`.`town_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_afterDelete` AFTER DELETE ON `town` FOR EACH ROW BEGIN @@ -10472,7 +10532,7 @@ 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`.`travel_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travel_beforeInsert` BEFORE INSERT ON `travel` FOR EACH ROW BEGIN @@ -10500,7 +10560,7 @@ 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`.`travel_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travel_beforeUpdate` BEFORE UPDATE ON `travel` FOR EACH ROW BEGIN @@ -10552,7 +10612,7 @@ 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`.`travel_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travel_afterUpdate` AFTER UPDATE ON `travel` FOR EACH ROW BEGIN @@ -10589,7 +10649,7 @@ 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`.`travel_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travel_afterDelete` AFTER DELETE ON `travel` FOR EACH ROW BEGIN @@ -10613,7 +10673,7 @@ 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`.`travelThermograph_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travelThermograph_beforeInsert` BEFORE INSERT ON `travelThermograph` FOR EACH ROW BEGIN @@ -10633,7 +10693,7 @@ 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`.`travelThermograph_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travelThermograph_beforeUpdate` BEFORE UPDATE ON `travelThermograph` FOR EACH ROW BEGIN @@ -10653,7 +10713,7 @@ 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`.`travelThermograph_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`travelThermograph_afterDelete` AFTER DELETE ON `travelThermograph` FOR EACH ROW BEGIN @@ -10677,7 +10737,7 @@ 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`.`vehicle_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`vehicle_beforeInsert` BEFORE INSERT ON `vehicle` FOR EACH ROW BEGIN @@ -10697,7 +10757,7 @@ 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`.`vehicle_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`vehicle_beforeUpdate` BEFORE UPDATE ON `vehicle` FOR EACH ROW BEGIN @@ -10717,7 +10777,7 @@ 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`.`warehouse_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`warehouse_afterInsert` BEFORE UPDATE ON `warehouse` FOR EACH ROW BEGIN @@ -10739,7 +10799,7 @@ 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`.`worker_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`worker_beforeInsert` BEFORE INSERT ON `worker` FOR EACH ROW BEGIN @@ -10759,7 +10819,7 @@ 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`.`worker_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`worker_beforeUpdate` BEFORE UPDATE ON `worker` FOR EACH ROW BEGIN @@ -10779,7 +10839,7 @@ 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`.`worker_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`worker_afterDelete` AFTER DELETE ON `worker` FOR EACH ROW BEGIN @@ -10803,8 +10863,8 @@ 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`.`workerDocument_beforeInsert` - BEFORE INSERT ON `workerDocument` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_beforeInsert` + BEFORE INSERT ON `workerDms` FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); @@ -10823,8 +10883,8 @@ 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`.`workerDocument_beforeUpdate` - BEFORE UPDATE ON `workerDocument` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_beforeUpdate` + BEFORE UPDATE ON `workerDms` FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); @@ -10843,13 +10903,13 @@ 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`.`workerDocument_afterDelete` - AFTER DELETE ON `workerDocument` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_afterDelete` + AFTER DELETE ON `workerDms` FOR EACH ROW BEGIN INSERT INTO workerLog SET `action` = 'delete', - `changedModel` = 'WorkerDocument', + `changedModel` = 'WorkerDms', `changedModelId` = OLD.id, `userFk` = account.myUser_getId(); END */;; @@ -10867,7 +10927,7 @@ 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`.`workerIncome_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerIncome_afterInsert` AFTER INSERT ON `workerIncome` FOR EACH ROW BEGIN @@ -10887,7 +10947,7 @@ 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`.`workerIncome_afterUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerIncome_afterUpdate` AFTER UPDATE ON `workerIncome` FOR EACH ROW BEGIN @@ -10909,7 +10969,7 @@ 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`.`workerIncome_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerIncome_afterDelete` AFTER DELETE ON `workerIncome` FOR EACH ROW BEGIN @@ -10929,11 +10989,11 @@ 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`.`workerTimeControl_beforeInsert` - BEFORE INSERT ON `workerTimeControl` - FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerTimeControl_beforeInsert` + BEFORE INSERT ON `workerTimeControl` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -10949,7 +11009,7 @@ 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`.`workerTimeControl_afterInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerTimeControl_afterInsert` AFTER INSERT ON `workerTimeControl` FOR EACH ROW BEGIN @@ -10971,11 +11031,11 @@ 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`.`workerTimeControl_beforeUpdate` - BEFORE UPDATE ON `workerTimeControl` - FOR EACH ROW -BEGIN - SET NEW.editorFk = account.myUser_getId(); +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerTimeControl_beforeUpdate` + BEFORE UPDATE ON `workerTimeControl` + FOR EACH ROW +BEGIN + SET NEW.editorFk = account.myUser_getId(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -10991,15 +11051,15 @@ 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`.`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(); +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 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(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -11015,7 +11075,7 @@ 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`.`workingHours_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workingHours_beforeInsert` BEFORE INSERT ON `workingHours` FOR EACH ROW BEGIN @@ -11037,7 +11097,7 @@ 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`.`zone_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zone_beforeInsert` BEFORE INSERT ON `zone` FOR EACH ROW BEGIN @@ -11057,7 +11117,7 @@ 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`.`zone_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zone_beforeUpdate` BEFORE UPDATE ON `zone` FOR EACH ROW BEGIN @@ -11077,7 +11137,7 @@ 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`.`zone_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zone_afterDelete` AFTER DELETE ON `zone` FOR EACH ROW BEGIN @@ -11101,7 +11161,7 @@ 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`.`zoneEvent_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneEvent_beforeInsert` BEFORE INSERT ON `zoneEvent` FOR EACH ROW BEGIN @@ -11121,7 +11181,7 @@ 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`.`zoneEvent_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneEvent_beforeUpdate` BEFORE UPDATE ON `zoneEvent` FOR EACH ROW BEGIN @@ -11141,7 +11201,7 @@ 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`.`zoneEvent_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneEvent_afterDelete` AFTER DELETE ON `zoneEvent` FOR EACH ROW BEGIN @@ -11165,7 +11225,7 @@ 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`.`zoneExclusion_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneExclusion_beforeInsert` BEFORE INSERT ON `zoneExclusion` FOR EACH ROW BEGIN @@ -11187,7 +11247,7 @@ 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`.`zoneExclusion_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneExclusion_beforeUpdate` BEFORE UPDATE ON `zoneExclusion` FOR EACH ROW BEGIN @@ -11209,7 +11269,7 @@ 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`.`zoneExclusion_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneExclusion_afterDelete` AFTER DELETE ON `zoneExclusion` FOR EACH ROW BEGIN @@ -11233,7 +11293,7 @@ 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`.`zoneGeo_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneGeo_beforeInsert` BEFORE INSERT ON `zoneGeo` FOR EACH ROW BEGIN @@ -11253,7 +11313,7 @@ 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`.`zoneGeo_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneGeo_beforeUpdate` BEFORE UPDATE ON `zoneGeo` FOR EACH ROW BEGIN @@ -11275,7 +11335,7 @@ 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`.`zoneIncluded_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneIncluded_beforeInsert` BEFORE INSERT ON `zoneIncluded` FOR EACH ROW BEGIN @@ -11296,7 +11356,7 @@ 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`.`zoneIncluded_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneIncluded_beforeUpdate` BEFORE UPDATE ON `zoneIncluded` FOR EACH ROW BEGIN @@ -11317,7 +11377,7 @@ 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`.`zoneIncluded_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneIncluded_afterDelete` AFTER DELETE ON `zoneIncluded` FOR EACH ROW BEGIN @@ -11342,7 +11402,7 @@ 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`.`zoneWarehouse_beforeInsert` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneWarehouse_beforeInsert` BEFORE INSERT ON `zoneWarehouse` FOR EACH ROW BEGIN @@ -11362,7 +11422,7 @@ 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`.`zoneWarehouse_beforeUpdate` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneWarehouse_beforeUpdate` BEFORE UPDATE ON `zoneWarehouse` FOR EACH ROW BEGIN @@ -11382,7 +11442,7 @@ 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`.`zoneWarehouse_afterDelete` +/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`zoneWarehouse_afterDelete` AFTER DELETE ON `zoneWarehouse` FOR EACH ROW BEGIN @@ -11409,4 +11469,4 @@ USE `vn2008`; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-09-04 7:01:01 +-- Dump completed on 2024-10-03 7:43:14 diff --git a/db/dump/dump.after.sql b/db/dump/dump.after.sql index 962d8e3f2..f1a121b2a 100644 --- a/db/dump/dump.after.sql +++ b/db/dump/dump.after.sql @@ -1,12 +1 @@ -CREATE USER 'vn'@'localhost'; - -GRANT SELECT, - INSERT, - UPDATE, - DELETE, - DROP, - CREATE TEMPORARY TABLES, - EXECUTE, - EVENT, - TRIGGER - ON *.* TO 'vn'@'localhost'; +-- Executed after dump diff --git a/db/dump/dump.before.sql b/db/dump/dump.before.sql index 24168fe60..20a365c83 100644 --- a/db/dump/dump.before.sql +++ b/db/dump/dump.before.sql @@ -1 +1,14 @@ -- Executed before dump + +CREATE USER 'vn'@'localhost'; + +GRANT SELECT, + INSERT, + UPDATE, + DELETE, + DROP, + CREATE TEMPORARY TABLES, + EXECUTE, + EVENT, + TRIGGER + ON *.* TO 'vn'@'localhost'; diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index c0d151b2c..58a4dc9f1 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -179,12 +179,12 @@ INSERT INTO `vn`.`country`(`id`, `name`, `isUeeMember`, `code`, `currencyFk`, `i (30,'Canarias', 1, 'IC', 1, 24, 4, 1, 2); INSERT INTO `vn`.`warehouse`(`id`, `name`, `code`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`, `hasDms`, `hasComission`, `countryFk`, `hasProduction`, `isOrigin`, `isDestiny`) - VALUES (1, 'Warehouse One', 'ALG', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + VALUES + (1, 'Warehouse One', 'ALG', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), (2, 'Warehouse Two', NULL, 1, 1, 1, 1, 0, 1, 13, 1, 1, 0), (3, 'Warehouse Three', NULL, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0), (4, 'Warehouse Four', NULL, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1), (5, 'Warehouse Five', NULL, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0), - (6, 'Warehouse six', 'VNH', 1, 1, 1, 1, 0, 0, 1, 1, 0, 0), (13, 'Inventory', 'inv', 1, 1, 1, 0, 0, 0, 1, 0, 0, 0), (60, 'Algemesi', NULL, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0); @@ -1506,7 +1506,8 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO (7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1, 7), (8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2, 10), (10, DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), 5, 1, 1, 50.00, 500, 'nineth travel', 1, 2, 10), - (11, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4); + (11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4), + (12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4); INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `evaNotes`) VALUES @@ -1520,7 +1521,7 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, ''), (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 10', 1, 1, ''), - (99, 69, '2000-12-01 00:00:00.000', 11, 0, 442, 'IN2009', 'Movement 99', 1, 1, ''); + (99, 69, '2000-12-01 00:00:00.000', 11, 0, 442, 'IN2009', 'Movement 99', 0, 0, ''); INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`) VALUES (2, 4, 1); @@ -1543,7 +1544,7 @@ INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `sal ('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '186', '0', '51', '53.12', '56.20', '56.20', '56.20'), ('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '277', '0', '53.12', '56.20', '56.20', '56.20', '56.20'); -INSERT INTO vn.buy(id,entryFk,itemFk,buyingValue,quantity,packagingFk,stickers,freightValue,packageValue,comissionValue,packing,grouping,groupingMode,location,price1,price2,price3,printedStickers,isChecked,isIgnored,weight,created) + INSERT INTO vn.buy(id,entryFk,itemFk,buyingValue,quantity,packagingFk,stickers,freightValue,packageValue,comissionValue,packing,grouping,groupingMode,location,price1,price2,price3,printedStickers,isChecked,isIgnored,weight,created) VALUES (1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH), (2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 1 MONTH), @@ -1559,7 +1560,7 @@ INSERT INTO vn.buy(id,entryFk,itemFk,buyingValue,quantity,packagingFk,stickers,f (12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()), (13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()), (14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 7.30, 7.00, 0, 1, 0, 4, util.VN_CURDATE()), - (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()), + (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()), (16, 99,1,50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.60, 99.40, 0, 1, 0, 1.00, '2024-07-30 08:13:51.000'); INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`) @@ -2441,30 +2442,32 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`, ` (1107, CONCAT(util.VN_CURDATE(), ' 10:20'), TRUE, 'middle', 1), (1107, CONCAT(util.VN_CURDATE(), ' 14:50'), TRUE, 'out', 1); -INSERT INTO `vn`.`dmsType`(`id`, `name`, `readRoleFk`, `writeRoleFk`, `code`) +INSERT INTO `vn`.`dmsType` + (`id`, `name`, `readRoleFk`, `writeRoleFk`, `code`) VALUES - (1, 'Facturas Recibidas', NULL, NULL, 'invoiceIn'), - (2, 'Doc oficial', NULL, NULL, 'officialDoc'), - (3, 'Laboral', 37, 37, 'hhrrData'), - (4, 'Albaranes recibidos', NULL, NULL, 'deliveryNote'), - (5, 'Otros', 1, 1, 'miscellaneous'), - (6, 'Pruebas', NULL, NULL, 'tests'), - (7, 'IAE Clientes', 1, 1, 'economicActivitiesTax'), - (8, 'Fiscal', NULL, NULL, 'fiscal'), - (9, 'Vehiculos', NULL, NULL, 'vehicles'), - (10, 'Plantillas', NULL, NULL, 'templates'), - (11, 'Contratos', NULL, NULL, 'contracts'), - (12, 'ley de pagos', 1, 1, 'paymentsLaw'), - (13, 'Basura', 1, 1, 'trash'), - (14, 'Ticket', 1, 1, 'ticket'), - (15, 'Presupuestos', NULL, NULL, 'budgets'), - (16, 'Logistica', NULL, NULL, 'logistics'), - (17, 'cmr', 1, 1, 'cmr'), - (18, 'dua', NULL, NULL, 'dua'), - (19, 'inmovilizado', NULL, NULL, 'fixedAssets'), - (20, 'Reclamación', 1, 1, 'claim'), - (21, 'Entrada', 1, 1, 'entry'), - (22, 'Proveedor', 1, 1, 'supplier'); + (1, 'Facturas Recibidas', NULL, NULL, 'invoiceIn'), + (2, 'Doc oficial', NULL, NULL, 'officialDoc'), + (3, 'Laboral', 37, 37, 'hhrrData'), + (4, 'Albaranes recibidos', NULL, NULL, 'deliveryNote'), + (5, 'Otros', 1, 1, 'miscellaneous'), + (6, 'Pruebas', NULL, NULL, 'tests'), + (7, 'IAE Clientes', 1, 1, 'economicActivitiesTax'), + (8, 'Fiscal', NULL, NULL, 'fiscal'), + (9, 'Vehiculos', NULL, NULL, 'vehicles'), + (10, 'Plantillas', NULL, NULL, 'templates'), + (11, 'Contratos', NULL, NULL, 'contracts'), + (12, 'ley de pagos', 1, 1, 'paymentsLaw'), + (13, 'Basura', 1, 1, 'trash'), + (14, 'Ticket', 1, 1, 'ticket'), + (15, 'Presupuestos', NULL, NULL, 'budgets'), + (16, 'Logistica', NULL, NULL, 'logistics'), + (17, 'cmr', 1, 1, 'cmr'), + (18, 'dua', NULL, NULL, 'dua'), + (19, 'inmovilizado', NULL, NULL, 'fixedAssets'), + (20, 'Reclamación', 1, 1, 'claim'), + (21, 'Entrada', 1, 1, 'entry'), + (22, 'Proveedor', 1, 1, 'supplier'), + (23, 'Termografos', 35, 35, 'thermograph'); INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`) VALUES @@ -2472,7 +2475,7 @@ INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `wa (2, 5, '2.txt', 'text/plain', 5, 1, 442, 1, TRUE, 'Client:104', 'Client:104 dms for the client', util.VN_CURDATE()), (3, 5, '3.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Client: 104', 'Client:104 readme', util.VN_CURDATE()), (4, 3, '4.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Worker: 106', 'Worker:106 readme', util.VN_CURDATE()), - (5, 5, '5.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'travel: 1', 'dmsForThermograph', util.VN_CURDATE()), + (5, 23, '5.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'travel: 1', 'dmsForThermograph', util.VN_CURDATE()), (6, 5, '6.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'NotExists', 'DoesNotExists', util.VN_CURDATE()), (7, 20, '7.jpg', 'image/jpeg', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', util.VN_CURDATE()), (8, 20, '8.mp4', 'video/mp4', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', util.VN_CURDATE()), @@ -2522,14 +2525,15 @@ INSERT INTO `vn`.`thermograph`(`id`, `model`) ('138350-0', 'DISPOSABLE'); -INSERT INTO `vn`.`travelThermograph`(`thermographFk`, `created`, `warehouseFk`, `travelFk`, `temperatureFk`, `result`, `dmsFk`) +INSERT INTO `vn`.`travelThermograph` + (`thermographFk`, `created`, `warehouseFk`, `travelFk`, `temperatureFk`, `minTemperature`, `maxTemperature`, `result`, `dmsFk`) VALUES - ('TMM190901395', util.VN_CURDATE(), 1, 1, 'WARM', 'Ok', NULL), - ('TL.BBA85422', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2, 'COOL', 'Ok', NULL), - ('TL.BBA85422', util.VN_CURDATE(), 2, 1, 'COOL', 'can not read the temperature', NULL), - ('TZ1905012010', util.VN_CURDATE(), 1, 1, 'WARM', 'Temperature in range', 5), - ('138350-0', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 'WARM', NULL, 5), - ('138350-0', util.VN_CURDATE(), 1, NULL, 'COOL', NULL, NULL); + ('TMM190901395', util.VN_CURDATE(), 1, 1, 'WARM', NULL, NULL, 'Ok', NULL), + ('TL.BBA85422', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2, 'COOL', NULL, NULL, 'Ok', NULL), + ('TL.BBA85422', util.VN_CURDATE(), 2, 1, 'COOL', NULL, NULL, 'can not read the temperature', NULL), + ('TZ1905012010', util.VN_CURDATE(), 1, 1, 'WARM', NULL, NULL, 'Temperature in range', 5), + ('138350-0', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 'WARM', 2, 12, NULL, 5), + ('138350-0', util.VN_CURDATE(), 1, NULL, 'COOL', NULL, NULL, NULL, NULL); REPLACE INTO `vn`.`incoterms`(`code`, `name`) VALUES @@ -3186,7 +3190,7 @@ UPDATE vn.department SET workerFk = null; INSERT INTO vn.packaging - VALUES('--', 2745600.00, 100.00, 120.00, 220.00, 0.00, 1, '2001-01-01 00:00:00.000', NULL, NULL, NULL, 0.00, 16, 0.00, 0, NULL, 0.00, NULL, NULL, 0, NULL, 0, 0); + VALUES('--', 2745600.00, 100.00, 120.00, 220.00, 0.00, 1, '2001-01-01 00:00:00.000', NULL, NULL, NULL, 0.00, 16, 0.00, 0, NULL, 0.00, NULL, NULL, 0, NULL, 0, 0,0,1); INSERT IGNORE INTO vn.intrastat @@ -3937,37 +3941,43 @@ 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); -INSERT INTO vn.stockBought (workerFk, bought, reserve, dated) - VALUES(35, 1.00, 1.00, '2001-01-01'); - -INSERT INTO vn.auctionConfig (id,conversionCoefficient,warehouseFk) - VALUES (1,0.6,6); - -INSERT INTO vn.payrollComponent (id, name, isSalaryAgreed, isVariable, isException) - VALUES (1, 'Salario1', 1, 0, 0), +INSERT INTO vn.payrollComponent +(id, name, isSalaryAgreed, isVariable, isException) + VALUES + (1, 'Salario1', 1, 0, 0), (2, 'Salario2', 1, 1, 0), (3, 'Salario3', 1, 0, 1); -INSERT INTO vn.workerIncome (debit, credit, incomeTypeFk, paymentDate, workerFk, concept) - VALUES (1000.00, 900.00, 2, '2000-01-01', 1106, NULL), + +INSERT INTO vn.workerIncome +(debit, credit, incomeTypeFk, paymentDate, workerFk, concept) + VALUES + (1000.00, 900.00, 2, '2000-01-01', 1106, NULL), (1001.00, 800.00, 2, '2000-01-01', 1106, NULL); -INSERT INTO dipole.printer (id, description) VALUES(1, ''); -INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode, truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments) - VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL); +INSERT INTO dipole.printer (id, description) +VALUES(1, ''); -INSERT INTO vn.accountDetail (id, value, accountDetailTypeFk, supplierAccountFk) - VALUES (21, 'ES12345B12345678', 3, 241), - (35, 'ES12346B12345679', 3, 241); +INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode, +truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments) +VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL); -INSERT INTO vn.accountDetailType (id, description, code) - VALUES (1, 'IBAN', 'iban'), - (2, 'SWIFT', 'swift'), - (3, 'Referencia Remesas', 'remRef'), - (4, 'Referencia Transferencias', 'trnRef'), - (5, 'Referencia Nominas', 'payRef'), - (6, 'ABA', 'aba'); +INSERT INTO vn.accountDetail +(id, value, accountDetailTypeFk, supplierAccountFk) +VALUES + (21, 'ES12345B12345678', 3, 241), + (35, 'ES12346B12345679', 3, 241); + +INSERT INTO vn.accountDetailType +(id, description, code) +VALUES + (1, 'IBAN', 'iban'), + (2, 'SWIFT', 'swift'), + (3, 'Referencia Remesas', 'remRef'), + (4, 'Referencia Transferencias', 'trnRef'), + (5, 'Referencia Nominas', 'payRef'), + (6, 'ABA', 'aba'); INSERT IGNORE INTO ormConfig SET id =1, diff --git a/db/routines/hedera/procedures/orderRow_updateOverstocking.sql b/db/routines/hedera/procedures/orderRow_updateOverstocking.sql new file mode 100644 index 000000000..ff8362c65 --- /dev/null +++ b/db/routines/hedera/procedures/orderRow_updateOverstocking.sql @@ -0,0 +1,52 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn`@`localhost` +PROCEDURE `hedera`.`orderRow_updateOverstocking`(vOrderFk INT) +BEGIN +/** +* Set amount = 0 to avoid overbooking sales +* +* @param vOrderFk hedera.order.id +*/ + DECLARE vCalcFk INT; + DECLARE vDone BOOL; + DECLARE vWarehouseFk INT; + + DECLARE cWarehouses CURSOR FOR + SELECT DISTINCT warehouseFk + FROM orderRow + WHERE orderFk = vOrderFk + AND shipped = util.VN_CURDATE(); + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; + + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; + + OPEN cWarehouses; + checking: LOOP + SET vDone = FALSE; + + FETCH cWarehouses INTO vWarehouseFk; + + IF vDone THEN + LEAVE checking; + END IF; + + CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, util.VN_CURDATE()); + + UPDATE orderRow r + JOIN `order` o ON o.id = r.orderFk + JOIN orderConfig oc + JOIN cache.available a ON a.calc_id = vCalcFk AND a.item_id = r.itemFk + SET r.amount = 0 + WHERE ADDTIME(o.rowUpdated, oc.reserveTime) < util.VN_NOW() + AND a.available <= 0 + AND r.warehouseFk = vWarehouseFk + AND r.orderFk = vOrderFk; + END LOOP; + CLOSE cWarehouses; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/routines/hedera/procedures/order_confirmWithUser.sql b/db/routines/hedera/procedures/order_confirmWithUser.sql index 2b033b704..b3aab522e 100644 --- a/db/routines/hedera/procedures/order_confirmWithUser.sql +++ b/db/routines/hedera/procedures/order_confirmWithUser.sql @@ -12,6 +12,7 @@ BEGIN * @param vUser The user identifier */ DECLARE vHasRows BOOL; + DECLARE vHas0Amount BOOL; DECLARE vDone BOOL; DECLARE vWarehouseFk INT; DECLARE vShipment DATE; @@ -101,6 +102,8 @@ BEGIN CALL order_checkEditable(vSelf); + CALL orderRow_updateOverstocking(vSelf); + -- Check order is not empty SELECT COUNT(*) > 0 INTO vHasRows FROM orderRow @@ -111,6 +114,18 @@ BEGIN CALL util.throw('ORDER_EMPTY'); END IF; + -- Check if any product has a quantity of 0 + SELECT EXISTS ( + SELECT id + FROM orderRow + WHERE orderFk = vSelf + AND amount = 0 + ) INTO vHas0Amount; + + IF vHas0Amount THEN + CALL util.throw('Remove lines with quantity = 0 before confirming'); + END IF; + -- Crea los tickets del pedido OPEN vDates; lDates: LOOP diff --git a/db/routines/hedera/triggers/orderRow_afterInsert.sql b/db/routines/hedera/triggers/orderRow_afterInsert.sql new file mode 100644 index 000000000..af1a1479f --- /dev/null +++ b/db/routines/hedera/triggers/orderRow_afterInsert.sql @@ -0,0 +1,10 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`orderRow_afterInsert` + AFTER INSERT ON `orderRow` + FOR EACH ROW +BEGIN + UPDATE `order` + SET rowUpdated = NOW() + WHERE id = NEW.orderFk; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/events/travel_setDelivered.sql b/db/routines/vn/events/travel_setDelivered.sql index 769ee9d24..396f3e144 100644 --- a/db/routines/vn/events/travel_setDelivered.sql +++ b/db/routines/vn/events/travel_setDelivered.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`travel_setDelivered` +CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`travel_setDelivered` ON SCHEDULE EVERY 1 DAY STARTS '2024-07-12 00:10:00.000' ON COMPLETION PRESERVE diff --git a/db/routines/vn/procedures/buy_getUltimate.sql b/db/routines/vn/procedures/buy_getUltimate.sql index 023e81774..1532222ad 100644 --- a/db/routines/vn/procedures/buy_getUltimate.sql +++ b/db/routines/vn/procedures/buy_getUltimate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getUltimate`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getUltimate`( vItemFk INT, vWarehouseFk SMALLINT, vDated DATE diff --git a/db/routines/vn/procedures/buy_getUltimateFromInterval.sql b/db/routines/vn/procedures/buy_getUltimateFromInterval.sql index 2115beb95..24a843eb0 100644 --- a/db/routines/vn/procedures/buy_getUltimateFromInterval.sql +++ b/db/routines/vn/procedures/buy_getUltimateFromInterval.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getUltimateFromInterval`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getUltimateFromInterval`( vItemFk INT, vWarehouseFk SMALLINT, vStarted DATE, diff --git a/db/routines/vn/procedures/buy_getVolumeByAgency.sql b/db/routines/vn/procedures/buy_getVolumeByAgency.sql deleted file mode 100644 index 7393d12d8..000000000 --- a/db/routines/vn/procedures/buy_getVolumeByAgency.sql +++ /dev/null @@ -1,20 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT) -BEGIN - - DROP TEMPORARY TABLE IF EXISTS tmp.buy; - CREATE TEMPORARY TABLE tmp.buy (buyFk INT NOT NULL, PRIMARY KEY (buyFk)) ENGINE = MEMORY; - - INSERT INTO tmp.buy - SELECT b.id - FROM buy b - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed = vDated - AND t.agencyModeFk IN (0, vAgencyFk); - - CALL buy_getVolume(); - DROP TEMPORARY TABLE tmp.buy; - -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/catalog_calculate.sql b/db/routines/vn/procedures/catalog_calculate.sql index 17e7450cc..39bf2b441 100644 --- a/db/routines/vn/procedures/catalog_calculate.sql +++ b/db/routines/vn/procedures/catalog_calculate.sql @@ -126,7 +126,10 @@ BEGIN AND a.available > 0 AND (sub.itemAllowed OR NOT it.isFloramondo OR anr.available > 0) AND (ag.isAnyVolumeAllowed OR NOT itt.isUnconventionalSize) - AND (itc.isReclining OR it.`size` IS NULL OR it.`size` < z.itemMaxSize OR z.itemMaxSize IS NULL) + AND (it.`size` IS NULL + OR IF(itc.isReclining, + it.size <= z.itemMaxLength OR z.itemMaxLength IS NULL, + it.size <= z.itemMaxSize OR z.itemMaxSize IS NULL)) AND cit.id IS NULL AND zit.id IS NULL AND ait.id IS NULL; diff --git a/db/routines/vn/procedures/catalog_componentCalculate.sql b/db/routines/vn/procedures/catalog_componentCalculate.sql index 7ac383e8f..e29e13a8c 100644 --- a/db/routines/vn/procedures/catalog_componentCalculate.sql +++ b/db/routines/vn/procedures/catalog_componentCalculate.sql @@ -7,7 +7,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_componentCalc ) BEGIN /** - * Calcula los componentes de los articulos de tmp.ticketLot + * Calcula los componentes de los articulos de la tabla tmp.ticketLot * * @param vZoneFk para calcular el transporte * @param vAddressFk Consignatario @@ -25,18 +25,41 @@ BEGIN FROM address WHERE id = vAddressFk; - CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice + CREATE OR REPLACE TEMPORARY TABLE tPriceDelta (INDEX (itemFk)) - ENGINE = MEMORY - SELECT * FROM ( + ENGINE = MEMORY + SELECT i.id itemFk, + SUM(IFNULL(pd.absIncreasing,0)) absIncreasing, + SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing, + pd.warehouseFk + FROM item i + JOIN priceDelta pd + ON pd.itemTypeFk = i.typeFk + AND (pd.minSize IS NULL OR pd.minSize <= i.`size`) + AND (pd.maxSize IS NULL OR pd.maxSize >= i.`size`) + AND (pd.inkFk IS NULL OR pd.inkFk = i.inkFk) + AND (pd.originFk IS NULL OR pd.originFk = i.originFk) + AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk) + AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk) + LEFT JOIN zoneGeo zg ON zg.id = pd.zoneGeoFk + LEFT JOIN zoneGeo zg2 ON zg2.id = address_getGeo(vAddressFk) + WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped) + AND (pd.toDated IS NULL OR pd.toDated >= vShipped) + AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt) + GROUP BY itemFk; + + CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice + (INDEX (itemFk)) + ENGINE = MEMORY + SELECT * FROM ( SELECT * - FROM specialPrice - WHERE (clientFk = vClientFk OR clientFk IS NULL) - AND started <= vShipped - AND (ended >= vShipped OR ended IS NULL) - ORDER BY (clientFk = vClientFk) DESC, id DESC - LIMIT 10000000000000000000) t - GROUP BY itemFk; + FROM specialPrice + WHERE (clientFk = vClientFk OR clientFk IS NULL) + AND started <= vShipped + AND (ended >= vShipped OR ended IS NULL) + ORDER BY (clientFk = vClientFk) DESC, id DESC + LIMIT 10000000000000000000) t + GROUP BY itemFk; CREATE OR REPLACE TEMPORARY TABLE tmp.ticketComponentCalculate (PRIMARY KEY (itemFk, warehouseFk)) @@ -108,6 +131,19 @@ BEGIN JOIN tmp.ticketComponentCalculate tcc ON tcc.itemFk = tc.itemFk AND tcc.warehouseFk = tc.warehouseFk GROUP BY tc.itemFk, warehouseFk; + -- Bonus del comprador a un rango de productos + INSERT INTO tmp.ticketComponent(warehouseFk, itemFk, componentFk, cost) + SELECT + tcb.warehouseFk, + tcb.itemFk, + c.id, + IFNULL(tcb.base * tpd.ratIncreasing / 100,0) + IFNULL(tpd.absIncreasing,0) + FROM tmp.ticketComponentBase tcb + JOIN component c ON c.code = 'bonus' + JOIN tPriceDelta tpd + ON tpd.itemFk = tcb.itemFk + AND tpd.warehouseFk = tcb.warehouseFk; + -- RECOBRO INSERT INTO tmp.ticketComponent(warehouseFk, itemFk, componentFk, cost) SELECT tcb.warehouseFk, tcb.itemFk, c2.id, @@ -303,6 +339,7 @@ BEGIN tmp.ticketComponentBase, tmp.ticketComponentRate, tmp.ticketComponentCopy, - tSpecialPrice; + tPriceDelta, + tSpecialPrice; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index a8ca68e5f..ad6d66e12 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -50,16 +50,10 @@ BEGIN DELETE FROM claim WHERE ticketCreated < v4Years; -- Robert ubicacion anterior de travelLog comentario para debug DELETE FROM zoneEvent WHERE `type` = 'day' AND dated < v3Months; - DELETE bm - FROM buyMark bm - JOIN buy b ON b.id = bm.id - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - WHERE t.landed <= v2Months; DELETE b FROM buy b JOIN entryConfig e ON e.defaultEntry = b.entryFk WHERE b.created < v2Months; - DELETE FROM stockBuyed WHERE creationDate < v2Months; + DELETE FROM stockBought WHERE dated < v2Months; DELETE FROM printQueue WHERE statusCode = 'printed' AND created < v2Months; -- Equipos duplicados DELETE w.* diff --git a/db/routines/vn/procedures/clearShelvingList.sql b/db/routines/vn/procedures/clearShelvingList.sql deleted file mode 100644 index 1ba726e85..000000000 --- a/db/routines/vn/procedures/clearShelvingList.sql +++ /dev/null @@ -1,8 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`clearShelvingList`(vShelvingFk VARCHAR(8)) -BEGIN - UPDATE vn.itemShelving - SET visible = 0 - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk COLLATE utf8_unicode_ci; -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/collectionPlacement_get.sql b/db/routines/vn/procedures/collectionPlacement_get.sql index d81847375..239dbd3a2 100644 --- a/db/routines/vn/procedures/collectionPlacement_get.sql +++ b/db/routines/vn/procedures/collectionPlacement_get.sql @@ -55,24 +55,20 @@ BEGIN SELECT ts.saleFk, ts.itemFk, CAST(0 AS DECIMAL(10,0)) saleOrder, - IF(ish.visible > 0 OR iss.id, 1, 100000) * - IFNULL(p2.pickingOrder, p.pickingOrder) `order`, - TO_SECONDS(IF(iss.id, - iss.created - INTERVAL vCurrentYear YEAR, - ish.created - INTERVAL YEAR(ish.created) YEAR)) priority, + (IF(ish.visible > 0 OR iss.id, 1, 100000) * + COALESCE(p2.pickingOrder, p.pickingOrder)) `order`, + TO_SECONDS(COALESCE(iss.created, ish.created)) - TO_SECONDS(MAKEDATE(IFNULL(YEAR(iss.created), YEAR(ish.created)), 1)) priority, CONCAT( - IF(iss.id, - CONCAT('< ', IFNULL(wk.`code`, '---'),' > '), - ''), - p.`code`) COLLATE utf8_general_ci placement, + IF(iss.id, CONCAT('< ', COALESCE(wk.`code`, '---'),' > '), ''), + p.`code` + ) COLLATE utf8_general_ci placement, sh.priority shelvingPriority, sh.code COLLATE utf8_general_ci shelving, ish.created, ish.visible, - IFNULL( - IF(st.code = 'previousByPacking', ish.packing, g.`grouping`), - 1) `grouping`, - st.code = 'previousPrepared' isPreviousPrepared, + COALESCE( + IF(st.code = 'previousByPacking', ish.packing, g.`grouping`),1) `grouping`, + (st.code = 'previousPrepared') isPreviousPrepared, iss.id itemShelvingSaleFk, ts.ticketFk, iss.id, @@ -80,11 +76,12 @@ BEGIN iss.userFk, ts.quantity FROM tSale ts - LEFT JOIN (SELECT DISTINCT saleFk - FROM saleTracking st - JOIN state s ON s.id = st.stateFk - WHERE st.isChecked - AND s.semaphore = 1) st ON st.saleFk = ts.saleFk + LEFT JOIN (SELECT st.saleFk + FROM saleTracking st + JOIN state s ON s.id = st.stateFk + WHERE st.isChecked + AND s.semaphore = 1 + GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk JOIN itemShelving ish ON ish.itemFk = ts.itemFk JOIN shelving sh ON sh.code = ish.shelvingFk JOIN parking p ON p.id = sh.parkingFk @@ -93,14 +90,14 @@ BEGIN JOIN warehouse w ON w.id = sc.warehouseFk LEFT JOIN tGrouping g ON g.itemFk = ts.itemFk LEFT JOIN itemShelvingSale iss ON iss.saleFk = ts.saleFk - AND iss.itemShelvingFk = ish.id + AND iss.itemShelvingFk = ish.id LEFT JOIN worker wk ON wk.id = iss.userFk LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = ts.saleFk LEFT JOIN saleGroup sg ON sg.id = sgd.saleGroupFk LEFT JOIN parking p2 ON p2.id = sg.parkingFk WHERE w.id = vWarehouseFk - AND NOT sc.isHideForPickers - HAVING (iss.id AND st.saleFk) OR salePreviousPrepared IS NULL; + AND NOT sc.isHideForPickers + AND ((iss.id AND st.saleFk) OR st.saleFk IS NULL); CREATE OR REPLACE TEMPORARY TABLE tSalePlacementList2 (INDEX(saleFk), INDEX(olderPriority)) diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index 0f675041a..6b7a794a9 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -21,9 +21,8 @@ BEGIN SELECT tob.ticketFk, tob.description FROM vn.ticketObservation tob JOIN vn.ticketCollection tc ON tc.ticketFk = tob.ticketFk - LEFT JOIN vn.observationType ot ON ot.id = tob.observationTypeFk - WHERE ot.`code` = 'itemPicker' - AND tc.collectionFk = vParamFk + JOIN vn.observationType ot ON ot.id = tob.observationTypeFk AND ot.`code` = 'itemPicker' + WHERE tc.collectionFk = vParamFk OR tc.ticketFk = vParamFk ) SELECT t.id ticketFk, IF(!(vItemPackingTypeFk <=> 'V'), cc.code, CONCAT(SUBSTRING('ABCDEFGH', tc.wagon, 1), '-', tc.`level`)) `level`, diff --git a/db/routines/vn/procedures/collection_mergeSales.sql b/db/routines/vn/procedures/collection_mergeSales.sql index 26444d6f9..297bdb97e 100644 --- a/db/routines/vn/procedures/collection_mergeSales.sql +++ b/db/routines/vn/procedures/collection_mergeSales.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT) +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT) BEGIN DECLARE vDone BOOL; DECLARE vTicketFk INT; diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 53f5500a0..480a88f35 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -1,6 +1,6 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_new`( - vUserFk INT, + vUserFk INT, OUT vCollectionFk INT ) BEGIN @@ -128,8 +128,9 @@ BEGIN SELECT TRUE FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state - WHERE s.code = 'PICKER_DESIGNED' - AND pb.workerCode = vWorkerCode + WHERE (s.code = 'PICKER_DESIGNED' + AND pb.workerCode = vWorkerCode) + OR s.code = 'LAST_CALL' ) INTO vHasAssignedTickets; -- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados @@ -138,8 +139,9 @@ BEGIN DELETE pb FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state - WHERE s.code <> 'PICKER_DESIGNED' - OR pb.workerCode <> vWorkerCode; + WHERE (s.code <> 'PICKER_DESIGNED' + OR pb.workerCode <> vWorkerCode) + AND s.code <> 'LAST_CALL'; ELSE DELETE pb FROM tmp.productionBuffer pb @@ -172,27 +174,26 @@ BEGIN END IF; -- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede + IF vHasUniqueCollectionTime THEN - - 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); - + AND (pb.HH <> pb2.HH OR pb.mm <> pb2.mm); END IF; + SELECT ticketFk INTO vFirstTicketFk + FROM tmp.productionBuffer + ORDER BY HH, + mm, + productionOrder DESC, + m3 DESC, + agency, + zona, + routeFk, + ticketFk + LIMIT 1; + OPEN vTickets; l: LOOP SET vDone = FALSE; @@ -246,7 +247,7 @@ BEGIN SELECT wagon INTO vFreeWagonFk FROM tTrain GROUP BY wagon - HAVING SUM(IFNULL(ticketFk, 0)) = 0 + HAVING COUNT(ticketFk) = 0 ORDER BY wagon LIMIT 1; @@ -263,7 +264,7 @@ BEGIN JOIN (SELECT wagon FROM tTrain GROUP BY wagon - HAVING SUM(IFNULL(ticketFk, 0)) = 0 + HAVING COUNT(ticketFk) = 0 ) sub ON sub.wagon = tt.wagon; END IF; END IF; @@ -323,4 +324,4 @@ BEGIN tTrain, tmp.productionBuffer; END$$ -DELIMITER ; +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/procedures/invoiceOut_newFromAddress.sql b/db/routines/vn/procedures/invoiceOut_newFromAddress.sql new file mode 100644 index 000000000..495ace608 --- /dev/null +++ b/db/routines/vn/procedures/invoiceOut_newFromAddress.sql @@ -0,0 +1,56 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`invoiceOut_newFromAddress`( + IN vAddressFk INT, + IN vSerial CHAR(2), + IN vMaxShipped DATE, + IN vCompanyFk INT, + IN vTaxArea VARCHAR(25), + IN vRef VARCHAR(25), + OUT vInvoiceId INT) +BEGIN +/** + * Factura los tickets de un consignatario hasta una fecha dada + * @param vAddressFk Id del consignatario a facturar + * @param vSerial Serie de factura + * @param vMaxShipped Fecha hasta la cual cogerá tickets para facturar + * @param vCompanyFk Id de la empresa desde la que se factura + * @param vTaxArea Tipo de iva en relacion a la empresa y al cliente, NULL por defecto + * @param vRef Referencia de la factura en caso que se quiera forzar, NULL por defecto + * @return vInvoiceId factura + */ + DECLARE vIsRefEditable BOOLEAN; + + IF vRef IS NOT NULL AND vSerial IS NOT NULL THEN + SELECT isRefEditable INTO vIsRefEditable + FROM invoiceOutSerial + WHERE code = vSerial; + + IF NOT vIsRefEditable THEN + CALL util.throw('serial non editable'); + END IF; + END IF; + + DROP TEMPORARY TABLE IF EXISTS `tmp`.`ticketToInvoice`; + CREATE TEMPORARY TABLE `tmp`.`ticketToInvoice` + (PRIMARY KEY (`id`)) + ENGINE = MEMORY + SELECT id FROM ticket t + WHERE t.addressFk = vAddressFk + AND t.refFk IS NULL + AND t.companyFk = vCompanyFk + AND t.shipped BETWEEN + util.firstDayOfYear(vMaxShipped - INTERVAL 1 YEAR) + AND util.dayend(vMaxShipped); + + CALL invoiceOut_new(vSerial, util.VN_CURDATE(), vTaxArea, vInvoiceId); + + UPDATE invoiceOut + SET `ref` = vRef + WHERE id = vInvoiceId + AND vRef IS NOT NULL; + + IF vSerial <> 'R' AND NOT ISNULL(vInvoiceId) AND vInvoiceId <> 0 THEN + CALL invoiceOutBooking(vInvoiceId); + END IF; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/itemFuentesBalance.sql b/db/routines/vn/procedures/itemFuentesBalance.sql deleted file mode 100644 index d6961a05f..000000000 --- a/db/routines/vn/procedures/itemFuentesBalance.sql +++ /dev/null @@ -1,79 +0,0 @@ -DELIMITER $$ -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 - * - * @param vDaysInFuture Rango de dias para calcular entradas y salidas - * - */ - - DECLARE vWarehouseFk INT; - - SELECT s.warehouseFk INTO vWarehouseFk - FROM vn.sector s - WHERE s.code = 'FUENTES_PICASSE'; - - CALL cache.stock_refresh(FALSE); - - SELECT i.id itemFk, - i.longName, - i.size, - i.subName, - v.amount - IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as visible, - fue.Fuentes, - alb.Albenfruit, - sale.venta, - IFNULL(buy.compra,0) + IFNULL(mov.traslado,0) as compra, - IFNULL(v.amount,0) + IFNULL(sale.venta,0) + IFNULL(buy.compra,0) + IFNULL(mov.traslado,0) - - IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as saldo - FROM vn.item i - JOIN vn.itemType it ON it.id = i.typeFk - JOIN vn.itemCategory ic ON ic.id = it.categoryFk - LEFT JOIN ( - SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Fuentes - FROM vn.itemShelving ish - JOIN vn.shelving sh ON sh.code = ish.shelvingFk - JOIN vn.parking p ON p.id = sh.parkingFk - JOIN vn.sector s ON s.id = p.sectorFk - WHERE s.code = 'FUENTES_PICASSE' - GROUP BY ish.itemFk - ) fue ON fue.itemFk = i.id - LEFT JOIN ( - SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Albenfruit - FROM vn.itemShelving ish - JOIN vn.shelving sh ON sh.code = ish.shelvingFk - JOIN vn.parking p ON p.id = sh.parkingFk - JOIN vn.sector s ON s.id = p.sectorFk - WHERE s.code = 'ALBENFRUIT' - GROUP BY ish.itemFk - ) alb ON alb.itemFk = i.id - LEFT JOIN cache.stock v ON i.id = v.item_id AND v.warehouse_id = vWarehouseFk - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as venta - FROM itemTicketOut - WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseFk = vWarehouseFk - GROUP BY itemFk - ) sale ON sale.item_id = i.id - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as compra - FROM itemEntryIn - WHERE landed BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseInFk = vWarehouseFk - AND isVirtualStock = FALSE - GROUP BY itemFk - ) buy ON buy.item_id = i.id - LEFT JOIN ( - SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as traslado - FROM itemEntryOut - WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE())) - AND warehouseOutFk = vWarehouseFk - GROUP BY itemFk - ) mov ON mov.item_id = i.id - WHERE (v.amount OR fue.Fuentes OR alb.Albenfruit) - AND i.itemPackingTypeFk = 'H' - AND ic.shortLife; - -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/itemMinimumQuantity_check.sql b/db/routines/vn/procedures/itemMinimumQuantity_check.sql index fef7cdbdb..a4b15b90a 100644 --- a/db/routines/vn/procedures/itemMinimumQuantity_check.sql +++ b/db/routines/vn/procedures/itemMinimumQuantity_check.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemMinimumQuantity_check`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemMinimumQuantity_check`( vSelf INT, vItemFk INT, vStarted DATE, diff --git a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql b/db/routines/vn/procedures/itemShelvingMakeFromDate.sql deleted file mode 100644 index 4918d55e1..000000000 --- a/db/routines/vn/procedures/itemShelvingMakeFromDate.sql +++ /dev/null @@ -1,58 +0,0 @@ -DELIMITER $$ -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; - - SELECT vn.barcodeToItem(vBarcode) INTO vItemFk; - - SELECT itemFk INTO vItemFk - FROM vn.buy b - WHERE b.id = vItemFk; - - IF (SELECT COUNT(*) FROM vn.shelving WHERE code = vShelvingFk COLLATE utf8_unicode_ci) = 0 THEN - - INSERT IGNORE INTO vn.parking(`code`) VALUES(vShelvingFk); - INSERT INTO vn.shelving(`code`, parkingFk) - SELECT vShelvingFk, id - FROM vn.parking - WHERE `code` = vShelvingFk COLLATE utf8_unicode_ci; - - END IF; - - IF (SELECT COUNT(*) FROM vn.itemShelving - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk - AND packing = vPacking) = 1 THEN - - UPDATE vn.itemShelving - SET visible = visible+vQuantity, - created = vCreated - WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk - AND packing = vPacking; - - ELSE - CALL cache.last_buy_refresh(FALSE); - INSERT INTO itemShelving( itemFk, - shelvingFk, - visible, - created, - `grouping`, - packing, - packagingFk) - SELECT vItemFk, - vShelvingFk, - vQuantity, - vCreated, - IF(vGrouping = 0, IFNULL(b.packing, vPacking), vGrouping) `grouping`, - IF(vPacking = 0, b.packing, vPacking) packing, - IF(vPackagingFk = '', b.packagingFk, vPackagingFk) packaging - FROM vn.item i - LEFT JOIN cache.last_buy lb ON i.id = lb.item_id AND lb.warehouse_id = vWarehouseFk - LEFT JOIN vn.buy b ON b.id = lb.buy_id - WHERE i.id = vItemFk; - END IF; - -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql b/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql deleted file mode 100644 index 085a3fe4b..000000000 --- a/db/routines/vn/procedures/itemShelvingPlacementSupplyAdd.sql +++ /dev/null @@ -1,20 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT) -BEGIN - - INSERT INTO vn.itemShelvingPlacementSupply( itemShelvingFk, - itemPlacementSupplyFk, - quantity, - userFk) - VALUES (vItemShelvingFk, - vItemPlacementSupplyFk, - vQuantity, - getUser()); - - UPDATE vn.itemShelving - SET visible = visible - vQuantity - WHERE id = vItemShelvingFk; - - -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/itemShelvingSale_Add.sql b/db/routines/vn/procedures/itemShelvingSale_Add.sql index 05b6b9d45..c00f25150 100644 --- a/db/routines/vn/procedures/itemShelvingSale_Add.sql +++ b/db/routines/vn/procedures/itemShelvingSale_Add.sql @@ -18,7 +18,8 @@ BEGIN getUser()); UPDATE itemShelving - SET visible = visible - vQuantity + SET visible = visible - vQuantity, + available = available - vQuantity WHERE id = vItemShelvingFk; UPDATE vn.saleTracking diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql index aa50f0ed8..6625e89b8 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySale.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySale.sql @@ -48,6 +48,13 @@ proc: BEGIN RESIGNAL; END; + START TRANSACTION; + + SELECT id INTO vSaleFk + FROM sale + WHERE id = vSaleFk + FOR UPDATE; + SELECT MAX(p.pickingOrder), s.quantity - SUM(IFNULL(iss.quantity, 0)), s.quantity INTO vLastPickingOrder, vOutStanding, vSaleQuantity FROM sale s @@ -57,7 +64,8 @@ proc: BEGIN LEFT JOIN parking p ON p.id = sh.parkingFk WHERE s.id = vSaleFk; - IF vOutStanding <= 0 THEN + IF vOutStanding <= 0 THEN + COMMIT; LEAVE proc; END IF; @@ -84,10 +92,8 @@ proc: BEGIN END IF; LEAVE l; END IF; - - START TRANSACTION; - - SELECT id INTO vItemShelvingFk + + SELECT id INTO vItemShelvingFk FROM itemShelving WHERE id = vItemShelvingFk FOR UPDATE; @@ -115,9 +121,8 @@ proc: BEGIN WHERE id = vItemShelvingFk; END IF; - - COMMIT; END LOOP; CLOSE vItemShelvingAvailable; + COMMIT; END$$ DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySaleGroup.sql b/db/routines/vn/procedures/itemShelvingSale_addBySaleGroup.sql index 285b9f93f..08d09c63e 100644 --- a/db/routines/vn/procedures/itemShelvingSale_addBySaleGroup.sql +++ b/db/routines/vn/procedures/itemShelvingSale_addBySaleGroup.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySaleGroup`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySaleGroup`( vSaleGroupFk INT(11) ) BEGIN diff --git a/db/routines/vn/procedures/itemShelving_addList.sql b/db/routines/vn/procedures/itemShelving_addList.sql index 05b392485..ade92b9fd 100644 --- a/db/routines/vn/procedures/itemShelving_addList.sql +++ b/db/routines/vn/procedures/itemShelving_addList.sql @@ -1,16 +1,22 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`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. +/** + * Recorre cada elemento en la colección vList. * Si el parámetro isChecking = FALSE, llama a itemShelving_add. * * Cuando es TRUE sólo inserta los elementos de la colección que no están ya en - * ese shelving, actualizando los valores del campo vn.itemShelving.isChecked + * ese shelving, actualizando los valores del campo itemShelving.isChecked * - * param vShelvingFk Identificador de vn.shelving - * param vList JSON array con esta estructura: '[value1, value2, ...]' - * param vIsChecking Define si hay que añadir o comprobar los items - * param vWarehouseFk Identificador de vn.warehouse + * @param vShelvingFk Identificador de shelving + * @param vList JSON array con esta estructura: '[value1, value2, ...]' + * @param vIsChecking Define si hay que añadir o comprobar los items + * @param vWarehouseFk Identificador de warehouse */ DECLARE vListLength INT DEFAULT JSON_LENGTH(vList); DECLARE vCounter INT DEFAULT 0; @@ -20,26 +26,27 @@ BEGIN DECLARE vIsChecked BOOL; WHILE vCounter < vListLength DO - SET vPath = CONCAT('$[',vCounter,']'); - SET vBarcode = JSON_EXTRACT(vList,vPath); + SET vPath = CONCAT('$[', vCounter, ']'); + SET vBarcode = JSON_EXTRACT(vList, vPath); SET vIsChecked = NULL; IF vIsChecking THEN SELECT barcodeToItem(vBarcode) INTO vItemFk; - SELECT COUNT(*) INTO vIsChecked - FROM vn.itemShelving + SELECT IF(COUNT(*), TRUE, FALSE) INTO vIsChecked + FROM itemShelving WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk; END IF; - IF NOT (vIsChecking AND vIsChecked) THEN - CALL vn.itemShelving_add(vShelvingFk, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk); + IF NOT vIsChecking OR NOT vIsChecked THEN + CALL itemShelving_add(vShelvingFk, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk); END IF; - UPDATE vn.itemShelving + UPDATE itemShelving SET isChecked = vIsChecked WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk AND isChecked IS NULL; + AND itemFk = vItemFk + AND isChecked IS NULL; SET vCounter = vCounter + 1; END WHILE; diff --git a/db/routines/vn/procedures/itemShelving_selfConsumption.sql b/db/routines/vn/procedures/itemShelving_selfConsumption.sql index 25ff2363c..083d8d74c 100644 --- a/db/routines/vn/procedures/itemShelving_selfConsumption.sql +++ b/db/routines/vn/procedures/itemShelving_selfConsumption.sql @@ -6,12 +6,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_selfCons ) BEGIN /** - * Leave the indicated amount on the shelf + * Leave the indicated amount on the shelve * and create a ticket with the difference. * - * @param vShelvingFk id of the shelf where the item is located. + * @param vShelvingFk id of the shelve where the item is located. * @param vItemFk article of which the self-consumption ticket is to be created. - * @param vQuantity amount that will stay on the shelf + * @param vQuantity amount that will stay on the shelve */ DECLARE vVisible INT; DECLARE vClientFk INT; @@ -80,7 +80,8 @@ BEGIN WHERE id = vItemFk; UPDATE itemShelving - SET visible = IF(id = vItemShelvingFk, vQuantity, 0) + SET visible = IF(id = vItemShelvingFk, vQuantity, 0), + available = IF(id = vItemShelvingFk, vQuantity, 0) WHERE shelvingFk = vShelvingFk AND itemFk = vItemFk; diff --git a/db/routines/vn/procedures/itemShelving_transfer.sql b/db/routines/vn/procedures/itemShelving_transfer.sql index 3597da7e1..95d70227f 100644 --- a/db/routines/vn/procedures/itemShelving_transfer.sql +++ b/db/routines/vn/procedures/itemShelving_transfer.sql @@ -31,7 +31,8 @@ BEGIN IF vNewItemShelvingFk THEN UPDATE itemShelving ish JOIN itemShelving ish2 ON ish2.id = vItemShelvingFk - SET ish.visible = ish.visible + ish2.visible + SET ish.visible = ish.visible + ish2.visible, + ish.available = ish.available + ish2.available WHERE ish.id = vNewItemShelvingFk; DELETE FROM itemShelving diff --git a/db/routines/vn/procedures/stockTraslation.sql b/db/routines/vn/procedures/item_calculateStock.sql similarity index 71% rename from db/routines/vn/procedures/stockTraslation.sql rename to db/routines/vn/procedures/item_calculateStock.sql index 4cc64fe3b..976ac10e4 100644 --- a/db/routines/vn/procedures/stockTraslation.sql +++ b/db/routines/vn/procedures/item_calculateStock.sql @@ -1,15 +1,13 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockTraslation`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_calculateStock`( vDated DATE ) BEGIN /** - * Calcula el stock del almacén de subasta desde FechaInventario hasta vDated - * sin tener en cuenta las salidas del mismo dia vDated - * para ver el transporte a reservar + * Calculate the stock of the auction warehouse from the inventory date to vDated * - * @param vDated Fecha hasta la cual calcula el stock - * @return tmp.item + * @param vDated Date to calculate the stock. + * @return tmp.item, tmp.buyUltimate */ DECLARE vAuctionWarehouseFk INT; diff --git a/db/routines/vn/procedures/item_devalueA2.sql b/db/routines/vn/procedures/item_devalueA2.sql index 44ae306ec..d0178f6a7 100644 --- a/db/routines/vn/procedures/item_devalueA2.sql +++ b/db/routines/vn/procedures/item_devalueA2.sql @@ -303,7 +303,8 @@ BEGIN WHERE id = vTargetItemShelvingFk; ELSE UPDATE itemShelving - SET visible = vCurrentVisible - vQuantity + SET visible = vCurrentVisible - vQuantity, + available = GREATEST(0, available - vQuantity) WHERE id = vTargetItemShelvingFk; END IF; diff --git a/db/routines/vn/procedures/item_getSimilar.sql b/db/routines/vn/procedures/item_getSimilar.sql index b524e30a7..243aacc2f 100644 --- a/db/routines/vn/procedures/item_getSimilar.sql +++ b/db/routines/vn/procedures/item_getSimilar.sql @@ -1,10 +1,10 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getSimilar`( - vSelf INT, - vWarehouseFk INT, - vDated DATE, - vShowType BOOL, - vDaysInForward INT + vSelf INT, + vWarehouseFk INT, + vDated DATE, + vShowType BOOL, + vDaysInForward INT ) BEGIN /** @@ -17,48 +17,44 @@ BEGIN * @param vShowType Mostrar tipos * @param vDaysInForward Días de alcance para las ventas */ - DECLARE vAvailableCalcFk INT; - DECLARE vPriority INT DEFAULT 1; + DECLARE vAvailableCalcFk INT; + DECLARE vVisibleCalcFk INT; + DECLARE vPriority INT DEFAULT 1; - CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated); + CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated); + CALL cache.visible_refresh(vVisibleCalcFk, FALSE, vWarehouseFk); - WITH itemTags AS ( - SELECT i.id, - typeFk, - tag5, - value5, - tag6, - value6, - tag7, - value7, - tag8, - value8, - t.name, - it.value + WITH itemTags AS ( + SELECT i.id, + typeFk, + tag5, + value5, + tag6, + value6, + tag7, + value7, + tag8, + value8, + t.name, + it.value FROM vn.item i LEFT JOIN vn.itemTag it ON it.itemFk = i.id AND it.priority = vPriority LEFT JOIN vn.tag t ON t.id = it.tagFk WHERE i.id = vSelf - ), - stock AS ( - SELECT itemFk, SUM(visible) stock - FROM vn.itemShelvingStock - WHERE warehouseFk = vWarehouseFk - GROUP BY itemFk - ), - sold AS ( - SELECT SUM(s.quantity) quantity, s.itemFk + ), + sold AS ( + SELECT SUM(s.quantity) quantity, s.itemFk FROM vn.sale s JOIN vn.ticket t ON t.id = s.ticketFk LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id - WHERE t.shipped BETWEEN CURDATE() AND CURDATE() + INTERVAL vDaysInForward DAY + WHERE t.shipped >= CURDATE() + INTERVAL vDaysInForward DAY AND iss.saleFk IS NULL AND t.warehouseFk = vWarehouseFk GROUP BY s.itemFk - ) - SELECT i.id itemFk, - CAST(sd.quantity AS INT) advanceable, + ) + SELECT i.id itemFk, + LEAST(CAST(sd.quantity AS INT), v.visible) advanceable, i.longName, i.subName, i.tag5, @@ -80,13 +76,14 @@ BEGIN WHEN b.groupingMode = 'packing' THEN b.packing ELSE 1 END minQuantity, - sk.stock located, + v.visible located, b.price2 FROM vn.item i LEFT JOIN sold sd ON sd.itemFk = i.id JOIN cache.available a ON a.item_id = i.id AND a.calc_id = vAvailableCalcFk - LEFT JOIN stock sk ON sk.itemFk = i.id + LEFT JOIN cache.visible v ON v.item_id = i.id + AND v.calc_id = vVisibleCalcFk LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = vWarehouseFk LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id @@ -96,7 +93,7 @@ BEGIN LEFT JOIN vn.tag t ON t.id = it.tagFk LEFT JOIN vn.buy b ON b.id = lb.buy_id JOIN itemTags its - WHERE (a.available > 0 OR sd.quantity < sk.stock) + WHERE (a.available > 0 OR sd.quantity < v.visible) AND (i.typeFk = its.typeFk OR NOT vShowType) AND i.id <> vSelf ORDER BY (a.available > 0) DESC, diff --git a/db/routines/vn/procedures/previousSticker_get.sql b/db/routines/vn/procedures/previousSticker_get.sql index 90f2bec37..ad3dbd1c4 100644 --- a/db/routines/vn/procedures/previousSticker_get.sql +++ b/db/routines/vn/procedures/previousSticker_get.sql @@ -1,58 +1,64 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`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. - * Actualiza el valor de vn.saleGroup.parkingFk en el caso de que exista un + * Actualiza el valor de saleGroup.parkingFk en el caso de que exista un * saleGroup del mismo ticket con parking, del mismo sector, para que todos se * pongan juntos. * - * @param vSaleGroupFk Identificador de vn.saleGroup + * @param vSaleGroupFk Identificador de saleGroup */ DECLARE vTicketFk INT; DECLARE vParkingFk INT; DECLARE vSectorFk INT; + DECLARE vTicketLines INT; - SELECT s.ticketFk - INTO vTicketFk - FROM vn.saleGroupDetail sgd - JOIN vn.sale s ON s.id = sgd.saleFk - WHERE sgd.saleGroupFk = vSaleGroupFk - LIMIT 1; + WITH ticketData AS( + SELECT DISTINCT s.ticketFk + FROM vn.saleGroupDetail sgd + JOIN vn.sale s ON s.id = sgd.saleFk + WHERE sgd.saleGroupFk = vSaleGroupFk + ) + SELECT COUNT(*), s.ticketFk INTO vTicketLines, vTicketFk + FROM vn.sale s + JOIN ticketData td ON td.ticketFk = s.ticketFk; SELECT sg.parkingFk, sc.sectorFk INTO vParkingFk, vSectorFk - FROM vn.saleGroup sg - JOIN vn.sectorCollectionSaleGroup scsg ON scsg.saleGroupFk = sg.id - JOIN vn.sectorCollection sc ON sc.id = scsg.sectorCollectionFk - JOIN vn.saleGroupDetail sgd ON sgd.saleGroupFk = sg.id - JOIN vn.sale s ON s.id = sgd.saleFk + FROM saleGroup sg + JOIN sectorCollectionSaleGroup scsg ON scsg.saleGroupFk = sg.id + JOIN sectorCollection sc ON sc.id = scsg.sectorCollectionFk + JOIN saleGroupDetail sgd ON sgd.saleGroupFk = sg.id + JOIN sale s ON s.id = sgd.saleFk WHERE s.ticketFk = vTicketFk AND sg.parkingFk IS NOT NULL LIMIT 1; - UPDATE vn.saleGroup sg + UPDATE saleGroup sg SET sg.parkingFk = vParkingFk WHERE sg.id = vSaleGroupFk AND sg.sectorFk = vSectorFk; SELECT sgd.saleGroupFk, t.id ticketFk, - p.code as location, - t.observations, + COUNT(*) previousLines, IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) shippingHour, IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) shippingMinute , IFNULL(MAX(i.itemPackingTypeFk),'H') itemPackingTypeFk , - count(*) items, + vTicketLines ticketLines, + p.code `location`, sc.description sector - FROM vn.sale s - JOIN vn.item i ON i.id = s.itemFk - JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id - JOIN vn.saleGroup sg ON sg.id = sgd.saleGroupFk - JOIN vn.sector sc ON sc.id = sg.sectorFk - JOIN vn.ticket t ON t.id = s.ticketFk - LEFT JOIN vn.parking p ON p.id = sg.parkingFk - LEFT JOIN vn.`zone` z ON z.id = t.zoneFk + FROM sale s + JOIN item i ON i.id = s.itemFk + JOIN saleGroupDetail sgd ON sgd.saleFk = s.id + JOIN saleGroup sg ON sg.id = sgd.saleGroupFk + JOIN sector sc ON sc.id = sg.sectorFk + JOIN ticket t ON t.id = s.ticketFk + LEFT JOIN parking p ON p.id = sg.parkingFk + LEFT JOIN `zone` z ON z.id = t.zoneFk WHERE sgd.saleGroupFk = vSaleGroupFk; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/productionControl.sql b/db/routines/vn/procedures/productionControl.sql index 3bd53c311..1d206e20d 100644 --- a/db/routines/vn/procedures/productionControl.sql +++ b/db/routines/vn/procedures/productionControl.sql @@ -15,13 +15,11 @@ proc: BEGIN DECLARE vEndingDate DATETIME; DECLARE vIsTodayRelative BOOLEAN; - SELECT util.dayEnd(util.VN_CURDATE()) + INTERVAL LEAST(vScopeDays, maxProductionScopeDays) DAY - INTO vEndingDate - FROM productionConfig; - - SELECT isTodayRelative INTO vIsTodayRelative - FROM worker - WHERE id = getUser(); -- Cambiar por account.myUser_getId(), falta dar permisos + SELECT w.isTodayRelative, util.dayEnd(util.VN_CURDATE()) + INTERVAL LEAST(vScopeDays, pc.maxProductionScopeDays) DAY + INTO vIsTodayRelative,vEndingDate + FROM worker w + JOIN productionConfig pc + WHERE w.id = account.myUser_getId(); CALL prepareTicketList(util.yesterday(), vEndingDate); @@ -268,16 +266,14 @@ proc: BEGIN UPDATE tmp.productionBuffer pb JOIN sale s ON s.ticketFk = pb.ticketFk 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 cache.last_buy lb ON lb.warehouse_id = vWarehouseFk AND lb.item_id = s.itemFk + JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk + AND lb.item_id = s.itemFk JOIN buy b ON b.id = lb.buy_id JOIN packaging p ON p.id = b.packagingFk - JOIN productionConfig pc - SET hasPlantTray = TRUE - WHERE ic.code = 'plant' - AND p.`depth` >= pc.minPlantTrayLength - AND pb.isOwn; + SET pb.hasPlantTray = TRUE + WHERE p.isPlantTray + AND s.quantity >= b.packing + AND pb.isOwn; DROP TEMPORARY TABLE tmp.productionTicket, diff --git a/db/routines/vn/procedures/shelving_clean.sql b/db/routines/vn/procedures/shelving_clean.sql index d2cb7caad..0b29968bc 100644 --- a/db/routines/vn/procedures/shelving_clean.sql +++ b/db/routines/vn/procedures/shelving_clean.sql @@ -25,8 +25,9 @@ UPDATE shelving sh AND ( sh.parked IS NULL OR - sh.parked < TIMESTAMPADD(MONTH,-1,util.VN_CURDATE()) - ) + sh.parked < util.VN_CURDATE() - INTERVAL 2 WEEK + ) + AND IF(code REGEXP '^[A-Za-z]{2}[0-9]', LEFT (code, 2) NOT IN ( SELECT DISTINCT LEFT(its.shelvingFk, 2) FROM itemShelving its diff --git a/db/routines/vn/procedures/stockBought_calculate.sql b/db/routines/vn/procedures/stockBought_calculate.sql index 6eabe015c..8b2a32e5d 100644 --- a/db/routines/vn/procedures/stockBought_calculate.sql +++ b/db/routines/vn/procedures/stockBought_calculate.sql @@ -1,41 +1,47 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`stockBought_calculate`() -BEGIN +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBought_calculate`( + vDated DATE +) +proc: BEGIN /** - * Inserts the purchase volume per buyer - * into stockBought according to the current date. + * Calculate the stock of the auction warehouse from the inventory date to vDated + * without taking into account the outputs of the same day vDated + * + * @param vDated Date to calculate the stock. */ - DECLARE vDated DATE; - SET vDated = util.VN_CURDATE(); + IF vDated < util.VN_CURDATE() THEN + LEAVE proc; + END IF; CREATE OR REPLACE TEMPORARY TABLE tStockBought - SELECT workerFk, reserve - FROM stockBought + SELECT workerFk, reserve + FROM stockBought WHERE dated = vDated AND reserve; DELETE FROM stockBought WHERE dated = vDated; - INSERT INTO stockBought (workerFk, bought, dated) + CALL item_calculateStock(vDated); + + INSERT INTO stockBought(workerFk, bought, dated) SELECT it.workerFk, ROUND(SUM( - (ac.conversionCoefficient * - (b.quantity / b.packing) * + (ti.quantity / b.packing) * buy_getVolume(b.id) - ) / (vc.trolleyM3 * 1000000) - ), 1), + ) / vc.palletM3 / 1000000, 1) bought, vDated - FROM entry e - JOIN travel t ON t.id = e.travelFk - JOIN warehouse w ON w.id = t.warehouseInFk - JOIN buy b ON b.entryFk = e.id - JOIN item i ON i.id = b.itemFk - JOIN itemType it ON it.id = i.typeFk - JOIN auctionConfig ac + FROM itemType it + JOIN item i ON i.typeFk = it.id + LEFT JOIN tmp.item ti ON ti.itemFk = i.id + JOIN itemCategory ic ON ic.id = it.categoryFk + JOIN warehouse wh ON wh.code = 'VNH' + JOIN tmp.buyUltimate bu ON bu.itemFk = i.id + AND bu.warehouseFk = wh.id + JOIN buy b ON b.id = bu.buyFk JOIN volumeConfig vc - WHERE t.shipped = vDated - AND t.warehouseInFk = ac.warehouseFk - GROUP BY it.workerFk; + WHERE ic.display + GROUP BY it.workerFk + HAVING bought; UPDATE stockBought s JOIN tStockBought ts ON ts.workerFk = s.workerFk @@ -45,8 +51,12 @@ BEGIN INSERT INTO stockBought (workerFk, reserve, dated) SELECT ts.workerFk, ts.reserve, vDated FROM tStockBought ts - WHERE ts.workerFk NOT IN (SELECT workerFk FROM stockBought WHERE dated = vDated); + WHERE ts.workerFk NOT IN ( + SELECT workerFk + FROM stockBought + WHERE dated = vDated + ); - DROP TEMPORARY TABLE tStockBought; + DROP TEMPORARY TABLE tStockBought, tmp.item, tmp.buyUltimate; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/stockBuyedByWorker.sql b/db/routines/vn/procedures/stockBuyedByWorker.sql deleted file mode 100644 index a0bad78d4..000000000 --- a/db/routines/vn/procedures/stockBuyedByWorker.sql +++ /dev/null @@ -1,74 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`( - vDated DATE, - vWorker INT -) -BEGIN -/** - * Inserta el volumen de compra de un comprador - * en stockBuyed de acuerdo con la fecha. - * - * @param vDated Fecha de compra - * @param vWorker Id de trabajador - */ - CREATE OR REPLACE TEMPORARY TABLE tStockBuyed - (INDEX (userFk)) - ENGINE = MEMORY - SELECT requested, reserved, userFk - FROM stockBuyed - WHERE dated = vDated - AND userFk = vWorker; - - DELETE FROM stockBuyed - WHERE dated = vDated - AND userFk = vWorker; - - CALL stockTraslation(vDated); - - INSERT INTO stockBuyed(userFk, buyed, `dated`, reserved, requested, description) - SELECT it.workerFk, - SUM((ti.quantity / b.packing) * buy_getVolume(b.id)) / vc.palletM3 / 1000000, - vDated, - sb.reserved, - sb.requested, - u.name - FROM itemType it - JOIN item i ON i.typeFk = it.id - LEFT JOIN tmp.item ti ON ti.itemFk = i.id - JOIN itemCategory ic ON ic.id = it.categoryFk - JOIN warehouse wh ON wh.code = 'VNH' - JOIN tmp.buyUltimate bu ON bu.itemFk = i.id - AND bu.warehouseFk = wh.id - JOIN buy b ON b.id = bu.buyFk - JOIN volumeConfig vc - JOIN account.`user` u ON u.id = it.workerFk - LEFT JOIN tStockBuyed sb ON sb.userFk = it.workerFk - WHERE ic.display - AND it.workerFk = vWorker; - - SELECT b.entryFk Id_Entrada, - i.id Id_Article, - i.name Article, - ti.quantity Cantidad, - (ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id)) - / (vc.trolleyM3 * 1000000) buyed, - b.packagingFk id_cubo, - b.packing - FROM tmp.item ti - JOIN item i ON i.id = ti.itemFk - JOIN itemType it ON i.typeFk = it.id - JOIN itemCategory ic ON ic.id = it.categoryFk - JOIN worker w ON w.id = it.workerFk - JOIN auctionConfig ac - JOIN tmp.buyUltimate bu ON bu.itemFk = i.id - AND bu.warehouseFk = ac.warehouseFk - JOIN buy b ON b.id = bu.buyFk - JOIN volumeConfig vc - WHERE ic.display - AND w.id = vWorker; - - DROP TEMPORARY TABLE tmp.buyUltimate, - tmp.item, - tStockBuyed; -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/stockBuyed_add.sql b/db/routines/vn/procedures/stockBuyed_add.sql deleted file mode 100644 index 104a2d34d..000000000 --- a/db/routines/vn/procedures/stockBuyed_add.sql +++ /dev/null @@ -1,70 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyed_add`( - vDated DATE -) -BEGIN -/** - * Inserta el volumen de compra por comprador - * en stockBuyed de acuerdo con la fecha. - * - * @param vDated Fecha de compra - */ - CREATE OR REPLACE TEMPORARY TABLE tStockBuyed - (INDEX (userFk)) - ENGINE = MEMORY - SELECT requested, reserved, userFk - FROM stockBuyed - WHERE dated = vDated; - - DELETE FROM stockBuyed WHERE dated = vDated; - - CALL stockTraslation(vDated); - - INSERT INTO stockBuyed(userFk, buyed, `dated`, description) - SELECT it.workerFk, - SUM((ti.quantity / b.packing) * buy_getVolume(b.id)) / vc.palletM3 / 1000000, - vDated, - u.name - FROM itemType it - JOIN item i ON i.typeFk = it.id - LEFT JOIN tmp.item ti ON ti.itemFk = i.id - JOIN itemCategory ic ON ic.id = it.categoryFk - JOIN warehouse wh ON wh.code = 'VNH' - JOIN tmp.buyUltimate bu ON bu.itemFk = i.id AND bu.warehouseFk = wh.id - JOIN buy b ON b.id = bu.buyFk - JOIN volumeConfig vc - JOIN account.`user` u ON u.id = it.workerFk - JOIN workerDepartment wd ON wd.workerFk = u.id - JOIN department d ON d.id = wd.departmentFk - WHERE ic.display - AND d.code IN ('shopping', 'logistic', 'franceTeam') - GROUP BY it.workerFk; - - INSERT INTO stockBuyed(buyed, dated, description) - SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000), - vDated, - IF(c.code = 'ES', p.name, c.name) destiny - FROM itemTicketOut ito - JOIN ticket t ON t.id = ito.ticketFk - JOIN `address` a ON a.id = t.addressFk - JOIN province p ON p.id = a.provinceFk - JOIN country c ON c.id = p.countryFk - JOIN warehouse wh ON wh.id = t.warehouseFk - JOIN itemCost ic ON ic.itemFk = ito.itemFk - AND ic.warehouseFk = t.warehouseFk - JOIN volumeConfig vc - WHERE ito.shipped BETWEEN vDated AND util.dayend(vDated) - AND wh.code = 'VNH' - GROUP BY destiny; - - UPDATE stockBuyed s - JOIN tStockBuyed ts ON ts.userFk = s.userFk - SET s.requested = ts.requested, - s.reserved = ts.reserved - WHERE s.dated = vDated; - - DROP TEMPORARY TABLE tmp.buyUltimate, - tmp.item, - tStockBuyed; -END$$ -DELIMITER ; diff --git a/db/routines/vn/procedures/supplier_statementWithEntries.sql b/db/routines/vn/procedures/supplier_statementWithEntries.sql index 55b271296..c0014f8e5 100644 --- a/db/routines/vn/procedures/supplier_statementWithEntries.sql +++ b/db/routines/vn/procedures/supplier_statementWithEntries.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.supplier_statementWithEntries( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE vn.supplier_statementWithEntries( vSupplierFk INT, vCurrencyFk INT, vCompanyFk INT, diff --git a/db/routines/vn/procedures/ticketRefund_upsert.sql b/db/routines/vn/procedures/ticketRefund_upsert.sql new file mode 100644 index 000000000..fb22e6e8c --- /dev/null +++ b/db/routines/vn/procedures/ticketRefund_upsert.sql @@ -0,0 +1,25 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticketRefund_upsert`( + vRefundTicketFk INT, + vOriginalTicketFk INT +) + READS SQL DATA +BEGIN +/** + * Common code for ticketRefund triggers + * + * @param vRefundTicketFk + * @param vOriginalTicketFk + */ + DECLARE vIsDeleted BOOL; + + SELECT COUNT(*) INTO vIsDeleted + FROM ticket + WHERE id IN (vRefundTicketFk, vOriginalTicketFk) + AND isDeleted; + + IF vIsDeleted THEN + CALL util.throw('The refund ticket cannot be deleted tickets'); + END IF; +END$$ +DELIMITER ; diff --git a/db/routines/vn/procedures/ticket_mergeSales.sql b/db/routines/vn/procedures/ticket_mergeSales.sql index 2dc3a39da..8ef5f6d90 100644 --- a/db/routines/vn/procedures/ticket_mergeSales.sql +++ b/db/routines/vn/procedures/ticket_mergeSales.sql @@ -1,8 +1,14 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_mergeSales`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_mergeSales`( vSelf INT ) BEGIN +/** + * Para un ticket se agrupa las diferentes líneas de venta de un mismo artículo en una sola + * siempre y cuando tengan el mismo precio y dto. + * + * @param vSelf Id de ticket + */ DECLARE vHasSalesToMerge BOOL; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN @@ -19,7 +25,7 @@ BEGIN CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve (PRIMARY KEY (id)) ENGINE = MEMORY - SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity + 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 @@ -28,8 +34,7 @@ BEGIN GROUP BY s.itemFk, s.price, s.discount HAVING COUNT(*) > 1; - SELECT COUNT(*) INTO vHasSalesToMerge - FROM tSalesToPreserve; + SELECT COUNT(*) INTO vHasSalesToMerge FROM tSalesToPreserve; IF vHasSalesToMerge THEN UPDATE sale s diff --git a/db/routines/vn/procedures/ticket_setProblemRiskByClient.sql b/db/routines/vn/procedures/ticket_setProblemRiskByClient.sql index 8479550de..1652fd29e 100644 --- a/db/routines/vn/procedures/ticket_setProblemRiskByClient.sql +++ b/db/routines/vn/procedures/ticket_setProblemRiskByClient.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRiskByClient`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemRiskByClient`( vClientFk INT ) BEGIN diff --git a/db/routines/vn/procedures/ticket_setVolume.sql b/db/routines/vn/procedures/ticket_setVolume.sql index 060a6fa57..c3cf0d057 100644 --- a/db/routines/vn/procedures/ticket_setVolume.sql +++ b/db/routines/vn/procedures/ticket_setVolume.sql @@ -1,10 +1,10 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolume`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setVolume`( vSelf INT ) BEGIN /** - * Update the volume ticket + * Update the volume ticket. * * @param vSelf Ticket id */ diff --git a/db/routines/vn/procedures/ticket_setVolumeItemCost.sql b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql index f266cd769..3c23b7c34 100644 --- a/db/routines/vn/procedures/ticket_setVolumeItemCost.sql +++ b/db/routines/vn/procedures/ticket_setVolumeItemCost.sql @@ -1,29 +1,39 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolumeItemCost`( +CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setVolumeItemCost`( vItemFk INT ) BEGIN /** - * Update the volume tickets of item + * Update the volume of tickets containing the item. * - * @param vSelf Ticket id + * @param vItemFk Item id */ - CREATE OR REPLACE TEMPORARY TABLE tTicket - (PRIMARY KEY (id)) - ENGINE = MEMORY - SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume + DECLARE vTicket INT; + DECLARE vDone BOOL; + + DECLARE vTickets CURSOR FOR + SELECT DISTINCT t.id 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 s.itemFk = vItemFk AND t.shipped >= util.VN_CURDATE() - GROUP BY t.id; + AND t.refFk IS NULL; - UPDATE ticket t - JOIN tTicket tt ON tt.id = t.id - SET t.volume = tt.volume; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - DROP TEMPORARY TABLE tTicket; + OPEN vTickets; + l: LOOP + FETCH vTickets INTO vTicket; + + IF vDone THEN + LEAVE l; + END IF; + + CALL ticket_setVolume(vTicket); + + END LOOP l; + CLOSE vTickets; END$$ DELIMITER ; diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index 407b8cdde..9a4bc01eb 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -3,13 +3,13 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPacki vSelf INT, vOriginalItemPackingTypeFk VARCHAR(1) ) -BEGIN +proc:BEGIN /** * 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. + * Respeta el id de ticket original para el tipo de empaquetado propuesto. * * @param vSelf Id ticket - * @param vOriginalItemPackingTypeFk Tipo empaquetado al que se mantiene el ticket original + * @param vOriginalItemPackingTypeFk Tipo empaquetado que se mantiene el ticket original * @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk) */ DECLARE vDone INT DEFAULT FALSE; @@ -30,8 +30,14 @@ BEGIN WHERE t.id = vSelf AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk; + CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT( + ticketFk INT, + itemPackingTypeFk VARCHAR(1) + ) ENGINE=MEMORY + SELECT vSelf ticketFk, vOriginalItemPackingTypeFk itemPackingTypeFk; + IF NOT vHasItemPackingType THEN - CALL util.throw('The ticket has not sales with the itemPackingType'); + LEAVE proc; END IF; CREATE OR REPLACE TEMPORARY TABLE tSalesToMove ( @@ -69,20 +75,15 @@ BEGIN CLOSE vItemPackingTypes; UPDATE sale s - JOIN tSalesToMove stm ON stm.saleFk = s.id + JOIN tSalesToMove stm ON stm.saleFk = s.id SET s.ticketFk = stm.ticketFk WHERE stm.ticketFk; - CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT( - ticketFk INT, - itemPackingTypeFk VARCHAR(1) - ) ENGINE=MEMORY + INSERT INTO tmp.ticketIPT (ticketFk, itemPackingTypeFk) SELECT ticketFk, itemPackingTypeFk FROM tSalesToMove - GROUP BY ticketFk - UNION - SELECT vSelf, vOriginalItemPackingTypeFk; + GROUP BY ticketFk; DROP TEMPORARY TABLE tSalesToMove; END$$ -DELIMITER ; \ No newline at end of file +DELIMITER ; diff --git a/db/routines/vn/procedures/worker_getHierarchy.sql b/db/routines/vn/procedures/worker_getHierarchy.sql index a858c5ff7..cbcdd8131 100644 --- a/db/routines/vn/procedures/worker_getHierarchy.sql +++ b/db/routines/vn/procedures/worker_getHierarchy.sql @@ -1,5 +1,7 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`vn`@`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 @@ -12,15 +14,16 @@ BEGIN (PRIMARY KEY (workerFk)) ENGINE = MEMORY WITH RECURSIVE workerHierarchy AS ( - SELECT id workerFk, bossFk, 0 depth + SELECT id workerFk, bossFk, 0 `depth`, CAST(id AS CHAR(255)) `path` FROM vn.worker WHERE id = vUserFk UNION ALL - SELECT w.id, w.bossFk, wh.depth + 1 + SELECT w.id, w.bossFk, wh.`depth` + 1, CONCAT(wh.`path`, ',', w.id) FROM vn.worker w JOIN workerHierarchy wh ON w.bossFk = wh.workerFk + WHERE NOT FIND_IN_SET(w.id, wh.`path`) ) - SELECT * + SELECT * FROM workerHierarchy ORDER BY depth, workerFk; END$$ diff --git a/db/routines/vn/triggers/host_beforeInsert.sql b/db/routines/vn/triggers/host_beforeInsert.sql index c2cb82334..96b78bfb7 100644 --- a/db/routines/vn/triggers/host_beforeInsert.sql +++ b/db/routines/vn/triggers/host_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`host_beforeInsert` BEFORE INSERT ON `host` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/itemShelving_afterInsert.sql b/db/routines/vn/triggers/itemShelving_afterInsert.sql new file mode 100644 index 000000000..92243ca03 --- /dev/null +++ b/db/routines/vn/triggers/itemShelving_afterInsert.sql @@ -0,0 +1,18 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterInsert` + AFTER INSERT ON `itemShelving` + FOR EACH ROW +BEGIN + INSERT INTO itemShelvingLog + SET itemShelvingFk = NEW.id, + workerFk = account.myUser_getId(), + accion = 'CREA REGISTRO', + itemFk = NEW.itemFk, + shelvingFk = NEW.shelvingFk, + visible = NEW.visible, + `grouping` = NEW.`grouping`, + packing = NEW.packing, + available = NEW.available; + +END$$ +DELIMITER ; diff --git a/db/routines/vn/triggers/roadmap_beforeInsert.sql b/db/routines/vn/triggers/roadmap_beforeInsert.sql index df07d5540..2f9481140 100644 --- a/db/routines/vn/triggers/roadmap_beforeInsert.sql +++ b/db/routines/vn/triggers/roadmap_beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert` BEFORE INSERT ON `roadmap` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/roadmap_beforeUpdate.sql b/db/routines/vn/triggers/roadmap_beforeUpdate.sql index 4905a0442..a2a02e96a 100644 --- a/db/routines/vn/triggers/roadmap_beforeUpdate.sql +++ b/db/routines/vn/triggers/roadmap_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate` BEFORE UPDATE ON `roadmap` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql b/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql index 9513be46a..da975933c 100644 --- a/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql +++ b/db/routines/vn/triggers/saleGroupDetail._beforeInsert.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeInsert` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeInsert` BEFORE INSERT ON `saleGroupDetail` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql b/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql index 1698ad8ce..37c3e9a2b 100644 --- a/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql +++ b/db/routines/vn/triggers/saleGroupDetail_afterDelete.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_afterDelete` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_afterDelete` AFTER DELETE ON `saleGroupDetail` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql b/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql index 0da18fd98..1f4238cdc 100644 --- a/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql +++ b/db/routines/vn/triggers/saleGroupDetail_beforeUpdate.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeUpdate` +CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeUpdate` BEFORE UPDATE ON `saleGroupDetail` FOR EACH ROW BEGIN diff --git a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql index 61d9fe7a2..dd1da6650 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeInsert.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeInsert.sql @@ -3,6 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRefund_beforeInse BEFORE INSERT ON `ticketRefund` FOR EACH ROW BEGIN + CALL ticketRefund_upsert(NEW.refundTicketFk, NEW.originalTicketFk); + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql index 807695de6..f27e3f092 100644 --- a/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql +++ b/db/routines/vn/triggers/ticketRefund_beforeUpdate.sql @@ -3,6 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUpda BEFORE UPDATE ON `ticketRefund` FOR EACH ROW BEGIN + CALL ticketRefund_upsert(NEW.refundTicketFk, NEW.originalTicketFk); + SET NEW.editorFk = account.myUser_getId(); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql index f56109fba..256ee12a6 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeInsert.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeInsert.sql @@ -4,5 +4,14 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travelThermograph_befor FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); + + IF NEW.travelFk IS NULL AND + (SELECT COUNT(*) FROM travelThermograph + WHERE thermographFk = NEW.thermographFk + AND travelFk IS NULL + AND id <> NEW.id) > 0 + THEN + CALL util.throw('Duplicate thermographFk without travelFk not allowed.'); + END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql index 49f52f181..ffe81b38d 100644 --- a/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql +++ b/db/routines/vn/triggers/travelThermograph_beforeUpdate.sql @@ -4,5 +4,14 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`travelThermograph_befor FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); + + IF NEW.travelFk IS NULL AND + (SELECT COUNT(*) FROM travelThermograph + WHERE thermographFk = NEW.thermographFk + AND travelFk IS NULL + AND id <> NEW.id) > 0 + THEN + CALL util.throw('Duplicate thermographFk without travelFk not allowed.'); + END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/views/buyer.sql b/db/routines/vn/views/buyer.sql index e690dc16f..4f668d35d 100644 --- a/db/routines/vn/views/buyer.sql +++ b/db/routines/vn/views/buyer.sql @@ -2,12 +2,10 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` SQL SECURITY DEFINER VIEW `vn`.`buyer` AS SELECT DISTINCT `u`.`id` AS `userFk`, - `u`.`nickname` AS `nickname`, - `ic`.`display` AS `display` + `u`.`nickname` AS `nickname` FROM ( `account`.`user` `u` JOIN `vn`.`itemType` `it` ON(`it`.`workerFk` = `u`.`id`) - JOIN `vn`.`itemCategory` `ic` ON(`ic`.`id` = `it`.`categoryFk`) ) WHERE `u`.`active` <> 0 ORDER BY `u`.`nickname` diff --git a/db/routines/vn2008/views/Agencias.sql b/db/routines/vn2008/views/Agencias.sql index d70ec73f4..1176d02c4 100644 --- a/db/routines/vn2008/views/Agencias.sql +++ b/db/routines/vn2008/views/Agencias.sql @@ -13,6 +13,5 @@ AS SELECT `am`.`id` AS `Id_Agencia`, `am`.`reportMail` AS `send_mail`, `am`.`isActive` AS `tpv`, `am`.`code` AS `code`, - `am`.`showAgencyName` AS `show_AgencyName`, `am`.`isRiskFree` AS `isRiskFree` FROM `vn`.`agencyMode` `am` diff --git a/db/routines/vn2008/views/Compres_mark.sql b/db/routines/vn2008/views/Compres_mark.sql deleted file mode 100644 index 7138c4e4c..000000000 --- a/db/routines/vn2008/views/Compres_mark.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE OR REPLACE DEFINER=`root`@`localhost` - SQL SECURITY DEFINER - VIEW `vn2008`.`Compres_mark` -AS SELECT `bm`.`id` AS `Id_Compra`, - `bm`.`comment` AS `comment`, - `bm`.`mark` AS `mark`, - `bm`.`odbcDate` AS `odbc_date` -FROM `vn`.`buyMark` `bm` diff --git a/db/routines/vn2008/views/Cubos.sql b/db/routines/vn2008/views/Cubos.sql index 4ece9c435..1b23af4fc 100644 --- a/db/routines/vn2008/views/Cubos.sql +++ b/db/routines/vn2008/views/Cubos.sql @@ -17,5 +17,6 @@ AS SELECT `p`.`id` AS `Id_Cubo`, `p`.`upload` AS `Suben`, `p`.`base` AS `Base`, `p`.`isBox` AS `box`, - `p`.`returnCost` AS `costeRetorno` + `p`.`returnCost` AS `costeRetorno`, + `p`.`isActive` AS `isActive` FROM `vn`.`packaging` `p` diff --git a/db/versions/11196-blackCymbidium/00-firstScript.sql b/db/versions/11196-blackCymbidium/00-firstScript.sql new file mode 100644 index 000000000..e05225204 --- /dev/null +++ b/db/versions/11196-blackCymbidium/00-firstScript.sql @@ -0,0 +1,7 @@ +RENAME TABLE vn.quadMindsApiConfig TO vn.quadmindsApiConfig; + +ALTER TABLE vn.quadmindsApiConfig + ADD maxObjects INT NULL COMMENT 'Número máximo de objetos en el array por petición', + ADD `limit` INT NULL COMMENT 'Limite de objetos solicitados por petición', + ADD `orderTimeFrom` VARCHAR(5) NULL COMMENT 'Inicio de ventana horaria de pedido', + ADD `orderTimeTo` VARCHAR(5) NULL COMMENT 'Fin de ventana horaria de pedido'; diff --git a/db/versions/11198-blackPhormium/00-firstScript.sql b/db/versions/11198-blackPhormium/00-firstScript.sql new file mode 100644 index 000000000..6c181ed21 --- /dev/null +++ b/db/versions/11198-blackPhormium/00-firstScript.sql @@ -0,0 +1,7 @@ +UPDATE vn.itemShelving + SET isChecked = TRUE + WHERE isChecked; + +UPDATE vn.itemShelving + SET isChecked = FALSE + WHERE NOT isChecked; diff --git a/db/versions/11239-goldenBirch/00-firstScript.sql b/db/versions/11239-goldenBirch/00-firstScript.sql new file mode 100644 index 000000000..559982081 --- /dev/null +++ b/db/versions/11239-goldenBirch/00-firstScript.sql @@ -0,0 +1,2 @@ +-- Place your SQL code here +ALTER TABLE vn.packaging ADD IF NOT EXISTS isPlantTray BOOL DEFAULT FALSE NOT NULL COMMENT 'The container is a plant tray. Used to restrict the picking of full plant trays, to make previous picking.'; diff --git a/db/versions/11241-grayPalmetto/00-firstScript.sql b/db/versions/11241-grayPalmetto/00-firstScript.sql new file mode 100644 index 000000000..b9ae692c6 --- /dev/null +++ b/db/versions/11241-grayPalmetto/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.packaging ADD IF NOT EXISTS isPlantTray BOOL DEFAULT FALSE NOT NULL + COMMENT 'The container is a plant tray. Used to restrict the picking of full plant trays, to make previous picking.'; \ No newline at end of file diff --git a/db/versions/11246-whiteMonstera/00-firstScript.sql b/db/versions/11246-whiteMonstera/00-firstScript.sql new file mode 100644 index 000000000..72c46cf79 --- /dev/null +++ b/db/versions/11246-whiteMonstera/00-firstScript.sql @@ -0,0 +1 @@ +DELETE FROM salix.ACL WHERE model = 'Worker' AND property = 'findById' AND principalId = 'employee'; \ No newline at end of file diff --git a/db/versions/11247-chocolateChico/00-firstScript.sql b/db/versions/11247-chocolateChico/00-firstScript.sql new file mode 100644 index 000000000..8cbfebdde --- /dev/null +++ b/db/versions/11247-chocolateChico/00-firstScript.sql @@ -0,0 +1,4 @@ +UPDATE salix.ACL SET principalId = 'employee' WHERE model = 'Worker' AND principalId = '$subordinate'; +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) +VALUES ('Worker', '__get__advancedSummary', 'READ', 'ALLOW', 'ROLE', 'hr'), + ('Worker', '__get__summary', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql new file mode 100644 index 000000000..a4a4bd740 --- /dev/null +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -0,0 +1,3 @@ +ALTER TABLE vn.`zone` + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos acostados que esa agencia puede transportar', + MODIFY COLUMN itemMaxSize int(11) DEFAULT NULL NULL COMMENT 'Altura maxima de los articulos que esa agencia puede transportar'; diff --git a/db/versions/11249-crimsonPhormium/00-firstScript.sql b/db/versions/11249-crimsonPhormium/00-firstScript.sql new file mode 100644 index 000000000..32410c561 --- /dev/null +++ b/db/versions/11249-crimsonPhormium/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +ALTER TABLE vn.parking DROP FOREIGN KEY IF EXISTS parking_fk1; +ALTER TABLE vn.parking ADD CONSTRAINT parking_fk1 FOREIGN KEY (sectorFk) REFERENCES vn.sector(id) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11253-limeChico/00-firstScript.sql b/db/versions/11253-limeChico/00-firstScript.sql new file mode 100644 index 000000000..acf1de15c --- /dev/null +++ b/db/versions/11253-limeChico/00-firstScript.sql @@ -0,0 +1,3 @@ +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Postcode','*','WRITE','ALLOW','ROLE','administrative'); + diff --git a/db/versions/11254-tealCarnation/00-thermographTemperature.sql b/db/versions/11254-tealCarnation/00-thermographTemperature.sql new file mode 100644 index 000000000..123e6c665 --- /dev/null +++ b/db/versions/11254-tealCarnation/00-thermographTemperature.sql @@ -0,0 +1,3 @@ +ALTER TABLE `vn`.`travelThermograph` +ADD COLUMN `maxTemperature` DECIMAL(5,2) NULL AFTER `temperatureFk`, +ADD COLUMN `minTemperature` DECIMAL(5,2) NULL AFTER `maxTemperature`; diff --git a/db/versions/11254-tealCarnation/01-thermographFk.sql b/db/versions/11254-tealCarnation/01-thermographFk.sql new file mode 100644 index 000000000..2baf99a45 --- /dev/null +++ b/db/versions/11254-tealCarnation/01-thermographFk.sql @@ -0,0 +1,2 @@ +ALTER TABLE `vn`.`travelThermograph` DROP FOREIGN KEY travelThermographDmsFgn; +ALTER TABLE `vn`.`travelThermograph` ADD CONSTRAINT travelThermographDmsFgn FOREIGN KEY (dmsFk) REFERENCES vn.dms(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/db/versions/11255-maroonRaphis/00-firstScript.sql b/db/versions/11255-maroonRaphis/00-firstScript.sql new file mode 100644 index 000000000..7febf0e6c --- /dev/null +++ b/db/versions/11255-maroonRaphis/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.worker + CHANGE isF11Allowed isF11Allowed__ TINYINT(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-09-22'; \ No newline at end of file diff --git a/db/versions/11256-grayFern/00-firstScript.sql b/db/versions/11256-grayFern/00-firstScript.sql new file mode 100644 index 000000000..7dcd380a7 --- /dev/null +++ b/db/versions/11256-grayFern/00-firstScript.sql @@ -0,0 +1,6 @@ +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Province','*','WRITE','ALLOW','ROLE','administrative'); + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Town','*','WRITE','ALLOW','ROLE','administrative'); + diff --git a/db/versions/11258-silverTulip/00-firstScript.sql b/db/versions/11258-silverTulip/00-firstScript.sql new file mode 100644 index 000000000..79910fa76 --- /dev/null +++ b/db/versions/11258-silverTulip/00-firstScript.sql @@ -0,0 +1,31 @@ +-- vn.priceDelta definition + +CREATE OR REPLACE TABLE vn.priceDelta ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size', + `maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size', + `inkFk` varchar(3) DEFAULT NULL, + `originFk` tinyint(2) unsigned DEFAULT NULL, + `producerFk` mediumint(3) unsigned DEFAULT NULL, + `fromDated` date DEFAULT NULL, + `toDated` date DEFAULT NULL, + `absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price', + `ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price', + `warehouseFk` smallint(6) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `priceDelta_itemType_FK` (`itemTypeFk`), + KEY `priceDelta_ink_FK` (`inkFk`), + KEY `priceDelta_producer_FK` (`producerFk`), + KEY `priceDelta_warehouse_FK` (`warehouseFk`), + KEY `priceDelta_worker_FK` (`editorFk`), + CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items'; + +GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer; \ No newline at end of file diff --git a/db/versions/11260-navyCyca/00-firstScript.sql b/db/versions/11260-navyCyca/00-firstScript.sql new file mode 100644 index 000000000..0824ea5f7 --- /dev/null +++ b/db/versions/11260-navyCyca/00-firstScript.sql @@ -0,0 +1,32 @@ +-- Place your SQL code here +-- vn.priceDelta definition + +CREATE OR REPLACE TABLE vn.priceDelta ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size', + `maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size', + `inkFk` varchar(3) DEFAULT NULL, + `originFk` tinyint(2) unsigned DEFAULT NULL, + `producerFk` mediumint(3) unsigned DEFAULT NULL, + `fromDated` date DEFAULT NULL, + `toDated` date DEFAULT NULL, + `absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price', + `ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price', + `warehouseFk` smallint(6) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `priceDelta_itemType_FK` (`itemTypeFk`), + KEY `priceDelta_ink_FK` (`inkFk`), + KEY `priceDelta_producer_FK` (`producerFk`), + KEY `priceDelta_warehouse_FK` (`warehouseFk`), + KEY `priceDelta_worker_FK` (`editorFk`), + CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items'; + +GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer; \ No newline at end of file diff --git a/db/versions/11261-bronzeDracena/00-firstScript.sql b/db/versions/11261-bronzeDracena/00-firstScript.sql new file mode 100644 index 000000000..1ef944db2 --- /dev/null +++ b/db/versions/11261-bronzeDracena/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.agencyMode + CHANGE IF EXISTS showAgencyName showAgencyName__ tinyint(1) DEFAULT 1 COMMENT '@deprecated 2024-09-24'; \ No newline at end of file diff --git a/db/versions/11262-chocolateCamellia/00-firstScript.sql b/db/versions/11262-chocolateCamellia/00-firstScript.sql new file mode 100644 index 000000000..79910fa76 --- /dev/null +++ b/db/versions/11262-chocolateCamellia/00-firstScript.sql @@ -0,0 +1,31 @@ +-- vn.priceDelta definition + +CREATE OR REPLACE TABLE vn.priceDelta ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size', + `maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size', + `inkFk` varchar(3) DEFAULT NULL, + `originFk` tinyint(2) unsigned DEFAULT NULL, + `producerFk` mediumint(3) unsigned DEFAULT NULL, + `fromDated` date DEFAULT NULL, + `toDated` date DEFAULT NULL, + `absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price', + `ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price', + `warehouseFk` smallint(6) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `priceDelta_itemType_FK` (`itemTypeFk`), + KEY `priceDelta_ink_FK` (`inkFk`), + KEY `priceDelta_producer_FK` (`producerFk`), + KEY `priceDelta_warehouse_FK` (`warehouseFk`), + KEY `priceDelta_worker_FK` (`editorFk`), + CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items'; + +GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer; \ No newline at end of file diff --git a/db/versions/11263-brownAnthurium/00-firstScript.sql b/db/versions/11263-brownAnthurium/00-firstScript.sql new file mode 100644 index 000000000..0824ea5f7 --- /dev/null +++ b/db/versions/11263-brownAnthurium/00-firstScript.sql @@ -0,0 +1,32 @@ +-- Place your SQL code here +-- vn.priceDelta definition + +CREATE OR REPLACE TABLE vn.priceDelta ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size', + `maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size', + `inkFk` varchar(3) DEFAULT NULL, + `originFk` tinyint(2) unsigned DEFAULT NULL, + `producerFk` mediumint(3) unsigned DEFAULT NULL, + `fromDated` date DEFAULT NULL, + `toDated` date DEFAULT NULL, + `absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price', + `ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price', + `warehouseFk` smallint(6) unsigned NOT NULL, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `editorFk` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `priceDelta_itemType_FK` (`itemTypeFk`), + KEY `priceDelta_ink_FK` (`inkFk`), + KEY `priceDelta_producer_FK` (`producerFk`), + KEY `priceDelta_warehouse_FK` (`warehouseFk`), + KEY `priceDelta_worker_FK` (`editorFk`), + CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, + CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items'; + +GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer; \ No newline at end of file diff --git a/db/versions/11264-turquoisePaniculata/00-firstScript.sql b/db/versions/11264-turquoisePaniculata/00-firstScript.sql new file mode 100644 index 000000000..8ca3df265 --- /dev/null +++ b/db/versions/11264-turquoisePaniculata/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE dipole.expedition_PrintOut DROP COLUMN IF EXISTS isChecked; diff --git a/db/versions/11271-blackMastic/00-firstScript.sql b/db/versions/11271-blackMastic/00-firstScript.sql new file mode 100644 index 000000000..dcc8349a5 --- /dev/null +++ b/db/versions/11271-blackMastic/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL COMMENT 'Application area for the bonus component'; +ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11272-azureLilium/00-firstScript.sql b/db/versions/11272-azureLilium/00-firstScript.sql new file mode 100644 index 000000000..0194ece18 --- /dev/null +++ b/db/versions/11272-azureLilium/00-firstScript.sql @@ -0,0 +1,4 @@ +-- Place your SQL code here +RENAME TABLE vn.stockBuyed TO vn.stockBuyed__; +ALTER TABLE vn.stockBuyed__ +COMMENT='@deprecated 2024-10-01 rename and refactor to stockBought'; diff --git a/db/versions/11273-goldenDendro/00-firstScript.sql b/db/versions/11273-goldenDendro/00-firstScript.sql new file mode 100644 index 000000000..2fc6809e5 --- /dev/null +++ b/db/versions/11273-goldenDendro/00-firstScript.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS `vn`.`itemStateTag` ( + `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=1 DEFAULT + CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Artificial'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Inactivo'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Preservado'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Seco'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Seco y preservado'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Estabilizada'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Natural y seco'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Preservado y artificial'); +INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Usado'); + +UPDATE vn.tag + SET isFree=0, + sourceTable='itemStateTag' + WHERE name= 'Estado'; diff --git a/db/versions/11274-redGerbera/00-firstScript copy 2.sql b/db/versions/11274-redGerbera/00-firstScript copy 2.sql new file mode 100644 index 000000000..452accf2e --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy 2.sql @@ -0,0 +1 @@ +ALTER TABLE vn.address MODIFY COLUMN isEqualizated tinyint(1) DEFAULT FALSE NOT NULL; diff --git a/db/versions/11274-redGerbera/00-firstScript copy 3.sql b/db/versions/11274-redGerbera/00-firstScript copy 3.sql new file mode 100644 index 000000000..c1f574379 --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy 3.sql @@ -0,0 +1 @@ +ALTER TABLE vn.autonomy MODIFY COLUMN isUeeMember tinyint(1) DEFAULT FALSE NOT NULL; \ No newline at end of file diff --git a/db/versions/11274-redGerbera/00-firstScript copy 4.sql b/db/versions/11274-redGerbera/00-firstScript copy 4.sql new file mode 100644 index 000000000..18a4d3314 --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy 4.sql @@ -0,0 +1 @@ +ALTER TABLE vn.chat MODIFY COLUMN checkUserStatus tinyint(1) DEFAULT FALSE NOT NULL; diff --git a/db/versions/11274-redGerbera/00-firstScript copy 5.sql b/db/versions/11274-redGerbera/00-firstScript copy 5.sql new file mode 100644 index 000000000..c75965735 --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy 5.sql @@ -0,0 +1,3 @@ +ALTER TABLE vn.warehouse + MODIFY COLUMN isOrigin tinyint(1) DEFAULT FALSE NOT NULL, + MODIFY COLUMN isDestiny tinyint(1) DEFAULT FALSE NOT NULL; \ No newline at end of file diff --git a/db/versions/11274-redGerbera/00-firstScript copy 6.sql b/db/versions/11274-redGerbera/00-firstScript copy 6.sql new file mode 100644 index 000000000..63b942e9d --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy 6.sql @@ -0,0 +1 @@ +ALTER TABLE vn.zoneIncluded MODIFY COLUMN isIncluded tinyint(1) DEFAULT FALSE NOT NULL; diff --git a/db/versions/11274-redGerbera/00-firstScript copy.sql b/db/versions/11274-redGerbera/00-firstScript copy.sql new file mode 100644 index 000000000..f14ff371d --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript copy.sql @@ -0,0 +1 @@ +ALTER TABLE bs.defaulter MODIFY COLUMN hasChanged tinyint(1) DEFAULT FALSE NOT NULL; diff --git a/db/versions/11274-redGerbera/00-firstScript.sql b/db/versions/11274-redGerbera/00-firstScript.sql new file mode 100644 index 000000000..8bcf7e027 --- /dev/null +++ b/db/versions/11274-redGerbera/00-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE account.user MODIFY COLUMN emailVerified tinyint(1) DEFAULT FALSE NOT NULL; diff --git a/db/versions/11277-wheatChico/00-firstScript.sql b/db/versions/11277-wheatChico/00-firstScript.sql new file mode 100644 index 000000000..c2b5963a4 --- /dev/null +++ b/db/versions/11277-wheatChico/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +ALTER TABLE hedera.`order` ADD IF NOT EXISTS rowUpdated DATETIME NULL + COMMENT 'Timestamp for last updated record in orderRow table'; diff --git a/db/versions/11278-crimsonEucalyptus/00-firstScript.sql b/db/versions/11278-crimsonEucalyptus/00-firstScript.sql new file mode 100644 index 000000000..f69f75f1d --- /dev/null +++ b/db/versions/11278-crimsonEucalyptus/00-firstScript.sql @@ -0,0 +1,6 @@ +-- Place your SQL code here + +ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL; + +ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) +REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11279-turquoiseDendro/00-firstScript.sql b/db/versions/11279-turquoiseDendro/00-firstScript.sql new file mode 100644 index 000000000..a241e6af2 --- /dev/null +++ b/db/versions/11279-turquoiseDendro/00-firstScript.sql @@ -0,0 +1,6 @@ +-- Place your SQL code here + +ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL; + +ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) +REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE; \ No newline at end of file diff --git a/db/versions/11280-goldenCamellia/00-firstScript.sql b/db/versions/11280-goldenCamellia/00-firstScript.sql new file mode 100644 index 000000000..fd55760c1 --- /dev/null +++ b/db/versions/11280-goldenCamellia/00-firstScript.sql @@ -0,0 +1,24 @@ +ALTER TABLE `vn`.`packaging` + ADD COLUMN IF NOT EXISTS `isActive` TINYINT(1) DEFAULT 1; + +UPDATE vn.packaging + SET isActive = FALSE + WHERE id IN('06x04x06','07x04x03','1000','100SM','1031','104','105','1060','10x04x06','10x04x07','1100','118','119','1200','129','1300', + '134','146','147','148','158','159','17x01x02','17X01X03','17x01x04','17x01x05','18X01X04','198','199', + '20P','20x01x03','246','273','278','279','280','290','359','37247','382','40P','453','463','464','465','466', + '467','469','471','473','494','508','509','511','512','514','515','516','518','519-50B','575','598-3x6','604','605','606', + '607','609','647','67515','676','680','682','685','687','688','691','692','693','694','695','730','751','7808','790','7910', + '7920','79450','7950','7952','7960','7976','7982','7986','7988', + '7993','8000','8046','8049','8053','8057','8058','8065','8076','8085','8086','8088', + '8091','8095','8096','8097','8101','8106','8108','8110','8112','8124','8134','8140','8141','8143','8145','8149','8150', + '8170','8174','8192','8200','8210','8249','8270','8275','8288','8300','8350','8375','8399','8400','8420','845','847','8480','8500', + '855','858','8600','862','869','871','872','8720','878','879','880','8800','882','885','910','911','912','914','916','917','918','919', + '920','921','922','923','924','925','926','927','930','9300','932','934','935','936','938','942','948','9600','980','984','9920', + 'B20x16','B43x13','Bande Rota','bb3','Bcesta','BcestaOVAL','BcestaRED','Bcirios','BciriosG','BjarronBLN','BjarronNGR', + 'Btazon','Bvelas','cactus200','Caja040','CajaTGLF','CC Alza Pl','CC_falso', + 'EB-RSMINA','EMB 1_4','EMB 2_5','espuma','FB-BENCH','granel','Grenex','guzma1200','guzma1400','guzma330','guzma400','guzma650','guzma900','HB-ALEX', + 'HB-APOSENT','HB-MAGIC','HB-NATUF','HB-RSMINA','HB-TES-RSR','HB068','HB117','HB2-CIRCA','JB-AROMA','jumboX3','kalan330','kalan400', + 'kalan577','kalan900','L12','L120','L14','L2-120','L200','L3-120','L4-120','L44','L6','L6-180','L8','L8-200','MB-BENCH','MBOLA','mc_11', + 'mc_13','Msp','NO VALIDO','NO-002','PANIC','PBLG','PISOCC/3','PISOCC/4','PISOCC/5','PISOCC/6', + 'procona','QB-CARDENA','QB-PANDERO','QB-TES-RSR','QB7-TOSCA','QB9-TOSCA','RB-BENCH','SemiEuroPa','spolette','t_flori11','T26x23', + 'T26x25','T27x24','T27x30','T28x26','T30x24','T33x30','THA50','ti_13','Tumbado','UB-BENCH') \ No newline at end of file diff --git a/db/versions/11281-purpleCyca/00-firstScript.sql b/db/versions/11281-purpleCyca/00-firstScript.sql new file mode 100644 index 000000000..eadba5ae1 --- /dev/null +++ b/db/versions/11281-purpleCyca/00-firstScript.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS vn.buyMark; diff --git a/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js b/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js deleted file mode 100644 index 9c37ce9ba..000000000 --- a/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('SmartTable SearchBar integration', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('salesPerson', 'item'); - await page.waitToClick(selectors.globalItems.searchButton); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should search by type in searchBar, reload page and have same results', async() => { - await page.waitToClick(selectors.itemsIndex.openAdvancedSearchButton); - await page.autocompleteSearch(selectors.itemsIndex.advancedSearchItemType, 'Anthurium'); - await page.waitToClick(selectors.itemsIndex.advancedSearchButton); - await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 4); - - await page.reload({ - waitUntil: 'networkidle2' - }); - - await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 4); - - await page.write(selectors.itemsIndex.advancedSmartTableGrouping, '1'); - await page.keyboard.press('Enter'); - await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2); - - await page.reload({ - waitUntil: 'networkidle2' - }); - - await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1); - }); - - it('should filter in section without smart-table and search in searchBar go to zone section', async() => { - await page.loginAndModule('salesPerson', 'zone'); - await page.waitToClick(selectors.globalItems.searchButton); - - await page.doSearch('A'); - const firstCount = await page.countElement(selectors.zoneIndex.searchResult); - - await page.doSearch('A'); - const secondCount = await page.countElement(selectors.zoneIndex.searchResult); - - expect(firstCount).toEqual(7); - expect(secondCount).toEqual(7); - }); - - it('should order orders by first id and order by last id, reload page and have same order', async() => { - await page.loginAndModule('developer', 'item'); - await page.accessToSection('item.fixedPrice'); - await page.keyboard.press('Enter'); - - await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '1'); - - await page.waitToClick(selectors.itemFixedPrice.orderColumnId); - await page.reload({ - waitUntil: 'networkidle2' - }); - await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '3'); - }); -}); diff --git a/e2e/paths/10-travel/01_create.spec.js b/e2e/paths/10-travel/01_create.spec.js deleted file mode 100644 index 98ade4852..000000000 --- a/e2e/paths/10-travel/01_create.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel create path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should create a new travel and check it was created with the correct data', async() => { - const date = Date.vnNew(); - date.setDate(15); - date.setUTCHours(0, 0, 0, 0); - - await page.waitToClick(selectors.travelIndex.newTravelButton); - await page.waitForState('travel.create'); - - const values = { - reference: 'Testing reference', - agencyMode: 'inhouse pickup', - shipped: date, - landed: date, - warehouseOut: 'Warehouse One', - warehouseIn: 'Warehouse Five' - }; - - const message = await page.sendForm('vn-travel-create form', values); - await page.waitForState('travel.card.basicData'); - const formValues = await page.fetchForm('vn-travel-basic-data form', Object.keys(values)); - - expect(message.isSuccess).toBeTrue(); - expect(formValues).toEqual(values); - }); -}); diff --git a/e2e/paths/10-travel/02_basic_data_and_log.spec.js b/e2e/paths/10-travel/02_basic_data_and_log.spec.js deleted file mode 100644 index 701e6b1b4..000000000 --- a/e2e/paths/10-travel/02_basic_data_and_log.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - await page.write(selectors.travelIndex.generalSearchFilter, '3'); - await page.keyboard.press('Enter'); - await page.accessToSection('travel.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the thermograph section', async() => { - await page.waitForState('travel.card.basicData'); - }); - - it('should set a wrong delivery date then receive an error on submit', async() => { - await page.loginAndModule('buyer', 'travel'); - await page.write(selectors.travelIndex.generalSearchFilter, '4'); - await page.keyboard.press('Enter'); - await page.accessToSection('travel.card.basicData'); - await page.waitForState('travel.card.basicData'); - - const lastMonth = Date.vnNew(); - lastMonth.setMonth(lastMonth.getMonth() - 2); - - await page.pickDate(selectors.travelBasicData.deliveryDate, lastMonth); - await page.waitToClick(selectors.travelBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Landing cannot be lesser than shipment'); - }); - - it('should undo the changes', async() => { - await page.clearInput(selectors.travelBasicData.reference); - await page.write(selectors.travelBasicData.reference, 'totally pointless ref'); - await page.waitToClick(selectors.travelBasicData.undoChanges); - const result = await page.waitToGetProperty(selectors.travelBasicData.reference, 'value'); - - expect(result).toEqual('fourth travel'); - }); - - it('should now edit the whole form then save', async() => { - await page.clearInput(selectors.travelBasicData.reference); - await page.write(selectors.travelBasicData.reference, 'new reference!'); - await page.autocompleteSearch(selectors.travelBasicData.agency, 'Entanglement'); - await page.autocompleteSearch(selectors.travelBasicData.outputWarehouse, 'Warehouse Three'); - await page.autocompleteSearch(selectors.travelBasicData.inputWarehouse, 'Warehouse Four'); - await page.waitToClick(selectors.travelBasicData.delivered); - await page.waitToClick(selectors.travelBasicData.received); - await page.waitToClick(selectors.travelBasicData.save); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reload the section and check the reference was saved', async() => { - await page.reloadSection('travel.card.basicData'); - const result = await page.waitToGetProperty(selectors.travelBasicData.reference, 'value'); - - expect(result).toEqual('new reference!'); - }); - - it('should check the agency was saved', async() => { - const result = await page.waitToGetProperty(selectors.travelBasicData.agency, 'value'); - - expect(result).toEqual('Entanglement'); - }); - - it('should check the output warehouse date was saved', async() => { - const result = await page.waitToGetProperty(selectors.travelBasicData.outputWarehouse, 'value'); - - expect(result).toEqual('Warehouse Three'); - }); - - it('should check the input warehouse date was saved', async() => { - const result = await page.waitToGetProperty(selectors.travelBasicData.inputWarehouse, 'value'); - - expect(result).toEqual('Warehouse Four'); - }); - - it(`should check the delivered checkbox was saved even tho it doesn't make sense`, async() => { - await page.waitForClassPresent(selectors.travelBasicData.delivered, 'checked'); - }); - - it(`should check the received checkbox was saved even tho it doesn't make sense`, async() => { - await page.waitForClassPresent(selectors.travelBasicData.received, 'checked'); - }); -}); diff --git a/e2e/paths/10-travel/03_descriptor.spec.js b/e2e/paths/10-travel/03_descriptor.spec.js deleted file mode 100644 index f066a74ca..000000000 --- a/e2e/paths/10-travel/03_descriptor.spec.js +++ /dev/null @@ -1,36 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel descriptor path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - await page.write(selectors.travelIndex.generalSearchFilter, '3'); - await page.keyboard.press('Enter'); - await page.waitForState('travel.card.summary'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should click the descriptor button to navigate to the travel index showing all travels with current agency', async() => { - await page.waitToClick(selectors.travelDescriptor.filterByAgencyButton); - await page.waitForState('travel.index'); - const result = await page.countElement(selectors.travelIndex.anySearchResult); - - expect(result).toBeGreaterThanOrEqual(1); - }); - - it('should navigate to the first search result', async() => { - await page.waitToClick(selectors.travelIndex.firstSearchResult); - await page.waitForState('travel.card.summary'); - const state = await page.getState(); - - expect(state).toBe('travel.card.summary'); - }); -}); diff --git a/e2e/paths/10-travel/04_extra_community.spec.js b/e2e/paths/10-travel/04_extra_community.spec.js deleted file mode 100644 index c5975c958..000000000 --- a/e2e/paths/10-travel/04_extra_community.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel extra community path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - await page.accessToSection('travel.extraCommunity'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should edit the travel reference and the locked kilograms', async() => { - await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter); - await page.waitForSpinnerLoad(); - await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelReference, 'edited reference'); - await page.waitForSpinnerLoad(); - await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelLockedKg, '1500'); - - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should reload the index and confirm the reference and locked kg were edited', async() => { - await page.accessToSection('travel.index'); - await page.accessToSection('travel.extraCommunity'); - await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter); - await page.waitForTextInElement(selectors.travelExtraCommunity.firstTravelReference, 'edited reference'); - const reference = await page.getProperty(selectors.travelExtraCommunity.firstTravelReference, 'innerText'); - const lockedKg = await page.getProperty(selectors.travelExtraCommunity.firstTravelLockedKg, 'innerText'); - - expect(reference).toContain('edited reference'); - expect(lockedKg).toContain(1500); - }); -}); diff --git a/e2e/paths/10-travel/05_thermograph.spec.js b/e2e/paths/10-travel/05_thermograph.spec.js deleted file mode 100644 index c9709f2f5..000000000 --- a/e2e/paths/10-travel/05_thermograph.spec.js +++ /dev/null @@ -1,64 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel thermograph path', () => { - const thermographName = '7H3-37H3RN4L-FL4M3'; - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - await page.write(selectors.travelIndex.generalSearchFilter, '3'); - await page.keyboard.press('Enter'); - await page.accessToSection('travel.card.thermograph.index'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the thermograph section', async() => { - await page.waitForState('travel.card.thermograph.index'); - }); - - it('should click the add thermograph floating button', async() => { - await page.waitToClick(selectors.travelThermograph.add); - await page.waitForState('travel.card.thermograph.create'); - }); - - it('should click on the add thermograph icon of the thermograph autocomplete', async() => { - await page.waitToClick(selectors.travelThermograph.addThermographIcon); - await page.write(selectors.travelThermograph.newThermographId, thermographName); - await page.autocompleteSearch(selectors.travelThermograph.newThermographModel, 'TEMPMATE'); - await page.autocompleteSearch(selectors.travelThermograph.newThermographWarehouse, 'Warehouse Two'); - await page.autocompleteSearch(selectors.travelThermograph.newThermographTemperature, 'Warm'); - await page.waitToClick(selectors.travelThermograph.createThermographButton); - }); - - it('should select the file to upload', async() => { - let currentDir = process.cwd(); - let filePath = `${currentDir}/e2e/assets/thermograph.jpeg`; - - const [fileChooser] = await Promise.all([ - page.waitForFileChooser(), - page.waitToClick(selectors.travelThermograph.uploadIcon) - ]); - await fileChooser.accept([filePath]); - - await page.waitToClick(selectors.travelThermograph.upload); - - const message = await page.waitForSnackbar(); - const state = await page.getState(); - - expect(message.text).toContain('Data saved!'); - expect(state).toBe('travel.card.thermograph.index'); - }); - - it('should check everything was saved correctly', async() => { - const result = await page.waitToGetProperty(selectors.travelThermograph.createdThermograph, 'innerText'); - - expect(result).toContain(thermographName); - }); -}); diff --git a/e2e/paths/10-travel/06_search_panel.spec.js b/e2e/paths/10-travel/06_search_panel.spec.js deleted file mode 100644 index 420ceaf48..000000000 --- a/e2e/paths/10-travel/06_search_panel.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Travel search panel path', () => { - let browser; - let page; - let httpRequest; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'travel'); - page.on('request', req => { - if (req.url().includes(`Travels/filter`)) - httpRequest = req.url(); - }); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should filter using all the fields', async() => { - await page.click(selectors.travelIndex.chip); - await page.write(selectors.travelIndex.generalSearchFilter, 'travel'); - await page.keyboard.press('Enter'); - - expect(httpRequest).toContain('search=travel'); - - await page.click(selectors.travelIndex.chip); - await page.autocompleteSearch(selectors.travelIndex.agencyFilter, 'Entanglement'); - - expect(httpRequest).toContain('agencyModeFk'); - - await page.click(selectors.travelIndex.chip); - await page.autocompleteSearch(selectors.travelIndex.warehouseOutFilter, 'Warehouse One'); - - expect(httpRequest).toContain('warehouseOutFk'); - - await page.click(selectors.travelIndex.chip); - await page.autocompleteSearch(selectors.travelIndex.warehouseInFilter, 'Warehouse Two'); - - expect(httpRequest).toContain('warehouseInFk'); - - await page.click(selectors.travelIndex.chip); - await page.overwrite(selectors.travelIndex.scopeDaysFilter, '15'); - await page.keyboard.press('Enter'); - - expect(httpRequest).toContain('scopeDays=15'); - - await page.click(selectors.travelIndex.chip); - await page.autocompleteSearch(selectors.travelIndex.continentFilter, 'Asia'); - - expect(httpRequest).toContain('continent'); - - await page.click(selectors.travelIndex.chip); - await page.write(selectors.travelIndex.totalEntriesFilter, '1'); - await page.keyboard.press('Enter'); - - expect(httpRequest).toContain('totalEntries=1'); - }); -}); diff --git a/e2e/paths/11-zone/01_basic-data.spec.js b/e2e/paths/11-zone/01_basic-data.spec.js deleted file mode 100644 index 34d08c57f..000000000 --- a/e2e/paths/11-zone/01_basic-data.spec.js +++ /dev/null @@ -1,104 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Zone basic data path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - - await page.loginAndModule('deliveryAssistant', - 'zone'); // turns up the zone module name and route aint the same lol - await page.accessToSearchResult('10'); - await page.accessToSection('zone.card.basicData'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should reach the basic data section', async() => { - await page.waitForState('zone.card.basicData'); - }); - - it('should edit de form and then save', async() => { - await page.clearInput(selectors.zoneBasicData.name); - await page.write(selectors.zoneBasicData.name, 'Brimstone teleportation'); - await page.autocompleteSearch(selectors.zoneBasicData.agency, 'Quantum break device'); - await page.clearInput(selectors.zoneBasicData.maxVolume); - await page.write(selectors.zoneBasicData.maxVolume, '10'); - await page.clearInput(selectors.zoneBasicData.travelingDays); - await page.write(selectors.zoneBasicData.travelingDays, '1'); - await page.clearInput(selectors.zoneBasicData.closing); - await page.pickTime(selectors.zoneBasicData.closing, '21:00'); - await page.clearInput(selectors.zoneBasicData.price); - await page.write(selectors.zoneBasicData.price, '999'); - await page.clearInput(selectors.zoneBasicData.bonus); - await page.write(selectors.zoneBasicData.bonus, '100'); - await page.clearInput(selectors.zoneBasicData.inflation); - await page.write(selectors.zoneBasicData.inflation, '200'); - await page.waitToClick(selectors.zoneBasicData.volumetric); - await page.waitToClick(selectors.zoneBasicData.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it('should now reload the section', async() => { - await page.reloadSection('zone.card.basicData'); - }); - - it('should confirm the name was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.name, 'value'); - - expect(result).toEqual('Brimstone teleportation'); - }); - - it('should confirm the agency was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.agency, 'value'); - - expect(result).toEqual('Quantum break device'); - }); - - it('should confirm the max volume was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.maxVolume, 'value'); - - expect(result).toEqual('10'); - }); - - it('should confirm the traveling days were updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.travelingDays, 'value'); - - expect(result).toEqual('1'); - }); - - it('should confirm the closing hour was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.closing, 'value'); - - expect(result).toEqual('21:00'); - }); - - it('should confirm the price was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.price, 'value'); - - expect(result).toEqual('999'); - }); - - it('should confirm the bonus was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.bonus, 'value'); - - expect(result).toEqual('100'); - }); - - it('should confirm the inflation was updated', async() => { - const result = await page.waitToGetProperty(selectors.zoneBasicData.inflation, 'value'); - - expect(result).toEqual('200'); - }); - - it('should confirm the volumetric checkbox was checked', async() => { - await page.waitForClassPresent(selectors.zoneBasicData.volumetric, 'checked'); - }); -}); diff --git a/e2e/paths/11-zone/02_descriptor.spec.js b/e2e/paths/11-zone/02_descriptor.spec.js deleted file mode 100644 index baccc910f..000000000 --- a/e2e/paths/11-zone/02_descriptor.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Zone descriptor path', () => { - let browser; - let page; - - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('deliveryAssistant', 'zone'); - await page.accessToSearchResult('13'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it('should eliminate the zone using the descriptor option', async() => { - await page.waitToClick(selectors.zoneDescriptor.menu); - await page.waitToClick(selectors.zoneDescriptor.deleteZone); - await page.respondToDialog('accept'); - await page.waitForState('zone.index'); - }); - - it('should search for the deleted zone to find no results', async() => { - await page.doSearch('13'); - const count = await page.countElement(selectors.zoneIndex.searchResult); - - expect(count).toEqual(0); - }); -}); diff --git a/front/core/services/app.js b/front/core/services/app.js index cec7bea7f..b8fcc43e1 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -57,7 +57,7 @@ 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); + let newRoute = index < 0 ? route : window.location.hash.substring(index); const env = process.env.NODE_ENV; const filter = { where: {and: [ @@ -66,6 +66,11 @@ export default class App { ]} }; + + if (this.logger.$params.q) + newRoute = newRoute.concat(`?table=${this.logger.$params.q}`); + + return this.logger.$http.get('Urls/findOne', {filter}) .then(res => { if (res && res.data) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 352e08826..ea84cb6eb 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -235,10 +235,10 @@ "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", "Original invoice not found": "Original invoice not found", "There is already a tray with the same height": "There is already a tray with the same height", "The height must be greater than 50cm": "The height must be greater than 50cm", "The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm", - "This postcode already exists": "This postcode already exists", - "This buyer has already made a reservation for this date": "This buyer has already made a reservation for this date" -} \ No newline at end of file + "The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line" +} diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 49c44a4d8..796c945e8 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -366,9 +366,11 @@ "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": "No se ha podido enviar el correo", + "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", "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", "Weight already set": "El peso ya está establecido", @@ -377,6 +379,7 @@ "The height must be greater than 50cm": "La altura debe ser superior a 50cm", "The maximum height of the wagon is 200cm": "La altura máxima es 200cm", "The entry does not have stickers": "La entrada no tiene etiquetas", - "Too many records": "Demasiados registros", - "This buyer has already made a reservation for this date": "Este comprador ya ha hecho una reserva para esta fecha" -} \ No newline at end of file + "This buyer has already made a reservation for this date": "Este comprador ya ha hecho una reserva para esta fecha", + "No valid travel thermograph found": "No se encontró un termógrafo válido", + "The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea" +} diff --git a/loopback/locale/fr.json b/loopback/locale/fr.json index 601fe35f5..a6648b186 100644 --- a/loopback/locale/fr.json +++ b/loopback/locale/fr.json @@ -361,6 +361,6 @@ "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", - "Original invoice not found": "Facture originale introuvable" - + "Original invoice not found": "Facture originale introuvable", + "The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne" } diff --git a/loopback/locale/pt.json b/loopback/locale/pt.json index 6425db9ed..a43f0e780 100644 --- a/loopback/locale/pt.json +++ b/loopback/locale/pt.json @@ -360,6 +360,7 @@ "It was not able to create the invoice": "Não foi possível criar a fatura", "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" - + "Original invoice not found": "Fatura original não encontrada", + "Cannot send mail": "Não é possível enviar o email", + "The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha" } diff --git a/loopback/server/boot/role-resolver.js b/loopback/server/boot/role-resolver.js index cf70abb39..183d64de1 100644 --- a/loopback/server/boot/role-resolver.js +++ b/loopback/server/boot/role-resolver.js @@ -1,12 +1,9 @@ -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`); + if (!ctx.accessToken) return false; + const httpCtx = {req: {accessToken: {userId: ctx.accessToken.userId}}}; + return models.Worker.isSubordinate(httpCtx, +ctx.modelId); }); }; diff --git a/modules/account/back/models/mail-alias-account.js b/modules/account/back/models/mail-alias-account.js index 0eee6a123..61ca344e9 100644 --- a/modules/account/back/models/mail-alias-account.js +++ b/modules/account/back/models/mail-alias-account.js @@ -1,6 +1,5 @@ const ForbiddenError = require('vn-loopback/util/forbiddenError'); -const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.rewriteDbError(function(err) { diff --git a/modules/claim/back/methods/claim-beginning/specs/claim-beginning.spec.js b/modules/claim/back/methods/claim-beginning/specs/claim-beginning.spec.js new file mode 100644 index 000000000..b7974ad23 --- /dev/null +++ b/modules/claim/back/methods/claim-beginning/specs/claim-beginning.spec.js @@ -0,0 +1,55 @@ +const models = require('vn-loopback/server/server').models; +const LoopBackContext = require('loopback-context'); + +describe('ClaimBeginning model()', () => { + const claimFk = 1; + const activeCtx = { + accessToken: {userId: 18}, + headers: {origin: 'localhost:5000'}, + __: () => {} + }; + + beforeEach(() => { + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ + active: activeCtx + }); + }); + + it('should change quantity claimed', async() => { + const tx = await models.ClaimBeginning.beginTransaction({}); + + let error; + try { + const options = {transaction: tx}; + const claim = await models.ClaimBeginning.findOne({where: {claimFk}}, options); + const sale = await models.Sale.findById(claim.saleFk, {}, options); + await claim.updateAttribute('quantity', sale.quantity - 1, options); + + await tx.rollback(); + } catch (e) { + error = e; + await tx.rollback(); + } + + expect(error).toBeUndefined(); + }); + + it('should throw error when quantity claimed is greater than quantity of the sale', async() => { + const tx = await models.ClaimBeginning.beginTransaction({}); + + let error; + try { + const options = {transaction: tx}; + const claim = await models.ClaimBeginning.findOne({where: {claimFk}}, options); + const sale = await models.Sale.findById(claim.saleFk, {}, options); + await claim.updateAttribute('quantity', sale.quantity + 1, options); + + await tx.rollback(); + } catch (e) { + error = e; + await tx.rollback(); + } + + expect(error.toString()).toContain('The quantity claimed cannot be greater than the quantity of the line'); + }); +}); diff --git a/modules/claim/back/models/claim-beginning.js b/modules/claim/back/models/claim-beginning.js index d269b2285..3dc9261c3 100644 --- a/modules/claim/back/models/claim-beginning.js +++ b/modules/claim/back/models/claim-beginning.js @@ -10,16 +10,21 @@ module.exports = Self => { }); Self.observe('before save', async ctx => { + const options = ctx.options; + const models = Self.app.models; + const saleFk = ctx?.currentInstance?.saleFk || ctx?.instance?.saleFk; + const sale = await models.Sale.findById(saleFk, {fields: ['ticketFk', 'quantity']}, options); + if (ctx.isNewInstance) { - const models = Self.app.models; - const options = ctx.options; - const instance = ctx.instance; - const ticket = await models.Sale.findById(instance.saleFk, {fields: ['ticketFk']}, options); - const claim = await models.Claim.findById(instance.claimFk, {fields: ['ticketFk']}, options); - if (ticket.ticketFk != claim.ticketFk) + const claim = await models.Claim.findById(ctx.instance.claimFk, {fields: ['ticketFk']}, options); + if (sale.ticketFk != claim.ticketFk) throw new UserError(`Cannot create a new claimBeginning from a different ticket`); } + await claimIsEditable(ctx); + + if (sale?.quantity && ctx.data?.quantity && ctx.data.quantity > sale?.quantity) + throw new UserError('The quantity claimed cannot be greater than the quantity of the line'); }); Self.observe('before delete', async ctx => { diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index 776544bc6..f4703245c 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -106,10 +106,15 @@ module.exports = Self => { description: `The to shipped date filter` }, { - arg: 'days', + arg: 'daysOnward', type: 'number', description: `N days interval` }, + { + arg: 'daysAgo', + type: 'number', + description: `N days ago interval` + }, { arg: 'invoiceAmount', type: 'number', @@ -216,16 +221,29 @@ module.exports = Self => { JOIN vn.currency cu ON cu.id = e.currencyFk` ); - if (ctx.args.days) { - stmt.merge({ - sql: ` - AND t.shipped <= util.VN_CURDATE() + INTERVAL ? DAY - AND t.shipped >= util.VN_CURDATE() - `, - params: [ctx.args.days] - }); + stmt.merge(conn.makeWhere(filter.where)); + + const {daysAgo, daysOnward} = ctx.args; + if (daysOnward || daysAgo) { + const params = []; + let today = 'util.VN_CURDATE()'; + let from = today; + let to = today; + + if (daysAgo) { + from += ' - INTERVAL ? DAY'; + params.push(daysAgo); + } + if (daysOnward) { + to += ' + INTERVAL ? DAY'; + params.push(daysOnward); + } + + const whereDays = (filter.where ? 'AND' : 'WHERE') + ` t.shipped BETWEEN ${from} AND ${to}`; + stmt.merge({sql: whereDays, params}); } - stmt.merge(conn.makeSuffix(filter)); + + stmt.merge(conn.makePagination(filter)); const itemsIndex = stmts.push(stmt) - 1; const sql = ParameterizedSQL.join(stmts, ';'); diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js index 11abf0788..5b9de9a69 100644 --- a/modules/entry/back/methods/entry/print.js +++ b/modules/entry/back/methods/entry/print.js @@ -52,7 +52,7 @@ module.exports = Self => { await merger.add(new Uint8Array(pdfBuffer[0])); } - if (!merger._doc) throw new UserError('The entry does not have stickers'); + if (!merger._doc) throw new UserError('The entry not have stickers'); await Self.rawSql(` UPDATE buy diff --git a/modules/entry/back/methods/entry/specs/filter.spec.js b/modules/entry/back/methods/entry/specs/filter.spec.js index 145da170a..105838858 100644 --- a/modules/entry/back/methods/entry/specs/filter.spec.js +++ b/modules/entry/back/methods/entry/specs/filter.spec.js @@ -39,7 +39,7 @@ describe('Entry filter()', () => { const result = await models.Entry.filter(ctx, options); - expect(result.length).toEqual(12); + expect(result.length).toEqual(11); await tx.rollback(); } catch (e) { @@ -49,13 +49,13 @@ describe('Entry filter()', () => { }); describe('should return the entry matching the supplier', () => { - it('when userId is supplier ', async() => { + it('when userId is supplier and searching days onward', async() => { const tx = await models.Entry.beginTransaction({}); const options = {transaction: tx}; try { const ctx = { - args: {days: 6}, + args: {daysOnward: 6}, req: {accessToken: {userId: 1102}} }; @@ -70,6 +70,27 @@ describe('Entry filter()', () => { } }); + it('when userId is supplier and searching days ago', async() => { + const tx = await models.Entry.beginTransaction({}); + const options = {transaction: tx}; + + try { + const ctx = { + args: {daysAgo: 31}, + req: {accessToken: {userId: 1102}} + }; + + const result = await models.Entry.filter(ctx, options); + + expect(result.length).toEqual(6); + + await tx.rollback(); + } catch (e) { + await tx.rollback(); + throw e; + } + }); + it('when userId is supplier fetching other supplier', async() => { const tx = await models.Entry.beginTransaction({}); const options = {transaction: tx}; @@ -131,7 +152,7 @@ describe('Entry filter()', () => { const result = await models.Entry.filter(ctx, options); - expect(result.length).toEqual(11); + expect(result.length).toEqual(10); await tx.rollback(); } catch (e) { diff --git a/modules/entry/back/methods/stock-bought/getStockBought.js b/modules/entry/back/methods/stock-bought/getStockBought.js index 94e206ece..c1f99c496 100644 --- a/modules/entry/back/methods/stock-bought/getStockBought.js +++ b/modules/entry/back/methods/stock-bought/getStockBought.js @@ -29,15 +29,13 @@ module.exports = Self => { dated.setHours(0, 0, 0, 0); today.setHours(0, 0, 0, 0); - if (dated.getTime() === today.getTime()) - await models.StockBought.rawSql(`CALL vn.stockBought_calculate()`); + await models.StockBought.rawSql(`CALL vn.stockBought_calculate(?)`, [dated]); const filter = { - where: { - dated: dated - }, + where: {dated}, include: [ { + fields: ['workerFk', 'reserve', 'bought'], relation: 'worker', scope: { include: [ diff --git a/modules/entry/back/methods/stock-bought/getStockBoughtDetail.js b/modules/entry/back/methods/stock-bought/getStockBoughtDetail.js index 6f09f1f67..3e040d0d3 100644 --- a/modules/entry/back/methods/stock-bought/getStockBoughtDetail.js +++ b/modules/entry/back/methods/stock-bought/getStockBoughtDetail.js @@ -11,6 +11,7 @@ module.exports = Self => { arg: 'dated', type: 'string', description: 'The date to filter', + required: true, } ], returns: { @@ -24,35 +25,50 @@ module.exports = Self => { }); Self.getStockBoughtDetail = async(workerFk, dated) => { - if (!dated) { - dated = Date.vnNew(); - dated.setHours(0, 0, 0, 0); + const models = Self.app.models; + const myOptions = {}; + let tx; + let result; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } + + try { + await models.StockBought.rawSql(`CALL vn.item_calculateStock(?)`, [dated], myOptions); + result = await Self.rawSql( + `SELECT b.entryFk entryFk, + i.id itemFk, + i.name itemName, + ti.quantity, + (ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id)) + / (vc.trolleyM3 * 1000000) volume, + b.packagingFk packagingFk, + b.packing + FROM tmp.item ti + JOIN item i ON i.id = ti.itemFk + JOIN itemType it ON i.typeFk = it.id + JOIN itemCategory ic ON ic.id = it.categoryFk + JOIN worker w ON w.id = it.workerFk + JOIN auctionConfig ac + JOIN tmp.buyUltimate bu ON bu.itemFk = i.id + AND bu.warehouseFk = ac.warehouseFk + JOIN buy b ON b.id = bu.buyFk + JOIN volumeConfig vc + WHERE ic.display + AND w.id = ?`, + [workerFk], myOptions + ); + await Self.rawSql(`DROP TEMPORARY TABLE tmp.item, tmp.buyUltimate;`, [], myOptions); + if (tx) await tx.commit(); + return result; + } catch (e) { + await tx.rollback(); + throw e; } - return Self.rawSql( - `SELECT e.id entryFk, - i.id itemFk, - i.longName itemName, - b.quantity, - ROUND((ac.conversionCoefficient * - (b.quantity / b.packing) * - buy_getVolume(b.id) - ) / (vc.trolleyM3 * 1000000), - 2 - ) volume, - b.packagingFk, - b.packing - FROM entry e - JOIN travel t ON t.id = e.travelFk - JOIN buy b ON b.entryFk = e.id - JOIN item i ON i.id = b.itemFk - JOIN itemType it ON it.id = i.typeFk - JOIN worker w ON w.id = it.workerFk - JOIN auctionConfig ac - JOIN volumeConfig vc - WHERE t.warehouseInFk = ac.warehouseFk - AND it.workerFk = ? - AND t.shipped = util.VN_CURDATE()`, - [workerFk] - ); }; }; diff --git a/modules/entry/back/model-config.json b/modules/entry/back/model-config.json index 85f5e8285..5c45b6e07 100644 --- a/modules/entry/back/model-config.json +++ b/modules/entry/back/model-config.json @@ -29,4 +29,4 @@ "StockBought": { "dataSource": "vn" } -} \ No newline at end of file +} diff --git a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js index c46da0ba5..a06128848 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/createManualInvoice.js @@ -10,6 +10,11 @@ module.exports = Self => { type: 'any', description: 'The invoiceable client id' }, + { + arg: 'addressFk', + type: 'any', + description: 'The address id' + }, { arg: 'ticketFk', type: 'any', @@ -23,7 +28,8 @@ module.exports = Self => { { arg: 'serial', type: 'string', - description: 'The invoice serial' + description: 'The invoice serial', + required: true }, { arg: 'taxArea', @@ -46,108 +52,126 @@ module.exports = Self => { } }); - Self.createManualInvoice = async(ctx, clientFk, ticketFk, maxShipped, serial, taxArea, reference, options) => { - if (!clientFk && !ticketFk) throw new UserError(`Select ticket or client`); - const models = Self.app.models; - const myOptions = {userId: ctx.req.accessToken.userId}; - let tx; + Self.createManualInvoice = + async(ctx, clientFk, addressFk, ticketFk, maxShipped, serial, taxArea, reference, options) => { + if (!clientFk && !ticketFk) throw new UserError(`Select ticket or client`); + const models = Self.app.models; + const myOptions = {userId: ctx.req.accessToken.userId}; + let tx; - if (typeof options == 'object') - Object.assign(myOptions, options); + if (typeof options == 'object') + Object.assign(myOptions, options); - if (!myOptions.transaction) { - tx = await Self.beginTransaction({}); - myOptions.transaction = tx; - } + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } - let companyId; - let newInvoice; - let query; - try { - if (ticketFk) { - const ticket = await models.Ticket.findById(ticketFk, null, myOptions); - const company = await models.Company.findById(ticket.companyFk, null, myOptions); + let companyFk; + let newInvoice; + let query; + try { + if (ticketFk) { + const ticket = await models.Ticket.findById(ticketFk, { + fields: ['clientFk', 'companyFk', 'shipped', 'refFk', 'totalWithVat'] + }, myOptions); + const company = await models.Company.findById(ticket.companyFk, { + fields: ['code'] + }, myOptions); - clientFk = ticket.clientFk; - maxShipped = ticket.shipped; - companyId = ticket.companyFk; + clientFk = ticket.clientFk; + maxShipped = ticket.shipped; + companyFk = ticket.companyFk; - // Validates invoiced ticket - if (ticket.refFk) - throw new UserError('This ticket is already invoiced'); + if (ticket.refFk) + throw new UserError('This ticket is already invoiced'); - // Validates ticket amount - if (ticket.totalWithVat == 0) - throw new UserError(`A ticket with an amount of zero can't be invoiced`); + if (ticket.totalWithVat == 0) + throw new UserError(`A ticket with an amount of zero can't be invoiced`); - // Validates ticket nagative base - const hasNegativeBase = await getNegativeBase(maxShipped, clientFk, companyId, myOptions); - if (hasNegativeBase && company.code == 'VNL') - throw new UserError(`A ticket with a negative base can't be invoiced`); - } else { - if (!maxShipped) - throw new UserError(`Max shipped required`); + const hasNegativeBase = await getNegativeBase(maxShipped, clientFk, companyFk, myOptions); + if (hasNegativeBase && company.code == 'VNL') + throw new UserError(`A ticket with a negative base can't be invoiced`); + } else { + if (!maxShipped) + throw new UserError(`Max shipped required`); - const company = await models.Ticket.findOne({ - fields: ['companyFk'], - where: { - clientFk: clientFk, - shipped: {lte: maxShipped} + if (addressFk) { + const address = await models.Address.findById(addressFk, { + fields: ['clientFk'] + }, myOptions); + + if (clientFk && clientFk !== address.clientFk) + throw new UserError('The provided clientFk does not match'); } - }, myOptions); - companyId = company.companyFk; + const company = await models.Ticket.findOne({ + fields: ['companyFk'], + where: { + clientFk: clientFk, + shipped: {lte: maxShipped} + } + }, myOptions); + companyFk = company.companyFk; + } + + const isClientInvoiceable = await isInvoiceable(clientFk, myOptions); + if (!isClientInvoiceable) + throw new UserError(`This client is not invoiceable`); + + const tomorrow = Date.vnNew(); + tomorrow.setDate(tomorrow.getDate() + 1); + + if (maxShipped >= tomorrow) + throw new UserError(`Can't invoice to future`); + + const maxInvoiceDate = await getMaxIssued(serial, companyFk, myOptions); + if (Date.vnNew() < maxInvoiceDate) + throw new UserError(`Can't invoice to past`); + + if (ticketFk) { + query = `CALL invoiceOut_newFromTicket(?, ?, ?, ?, @newInvoiceId)`; + await Self.rawSql(query, [ + ticketFk, + serial, + taxArea, + reference + ], myOptions); + } else if (addressFk) { + query = `CALL invoiceOut_newFromAddress(?, ?, ?, ?, ?, ?, @newInvoiceId)`; + await Self.rawSql(query, [ + addressFk, + serial, + maxShipped, + companyFk, + taxArea, + reference + ], myOptions); + } else { + query = `CALL invoiceOut_newFromClient(?, ?, ?, ?, ?, ?, @newInvoiceId)`; + await Self.rawSql(query, [ + clientFk, + serial, + maxShipped, + companyFk, + taxArea, + reference + ], myOptions); + } + + [newInvoice] = await Self.rawSql(`SELECT @newInvoiceId id`, null, myOptions); + + if (tx) await tx.commit(); + } catch (e) { + if (tx) await tx.rollback(); + throw e; } - // Validate invoiceable client - const isClientInvoiceable = await isInvoiceable(clientFk, myOptions); - if (!isClientInvoiceable) - throw new UserError(`This client is not invoiceable`); + if (!newInvoice.id) throw new UserError('It was not able to create the invoice'); - // Can't invoice tickets into future - const tomorrow = Date.vnNew(); - tomorrow.setDate(tomorrow.getDate() + 1); + await Self.createPdf(ctx, newInvoice.id); - if (maxShipped >= tomorrow) - throw new UserError(`Can't invoice to future`); - - const maxInvoiceDate = await getMaxIssued(serial, companyId, myOptions); - if (Date.vnNew() < maxInvoiceDate) - throw new UserError(`Can't invoice to past`); - - if (ticketFk) { - query = `CALL invoiceOut_newFromTicket(?, ?, ?, ?, @newInvoiceId)`; - await Self.rawSql(query, [ - ticketFk, - serial, - taxArea, - reference - ], myOptions); - } else { - query = `CALL invoiceOut_newFromClient(?, ?, ?, ?, ?, ?, @newInvoiceId)`; - await Self.rawSql(query, [ - clientFk, - serial, - maxShipped, - companyId, - taxArea, - reference - ], myOptions); - } - - [newInvoice] = await Self.rawSql(`SELECT @newInvoiceId id`, null, myOptions); - - if (tx) await tx.commit(); - } catch (e) { - if (tx) await tx.rollback(); - throw e; - } - - if (!newInvoice.id) throw new UserError('It was not able to create the invoice'); - - await Self.createPdf(ctx, newInvoice.id); - - return newInvoice; - }; + return newInvoice; + }; async function isInvoiceable(clientFk, options) { const models = Self.app.models; @@ -159,10 +183,10 @@ module.exports = Self => { return result.invoiceable; } - async function getNegativeBase(maxShipped, clientFk, companyId, options) { + async function getNegativeBase(maxShipped, clientFk, companyFk, options) { const models = Self.app.models; await models.InvoiceOut.rawSql('CALL invoiceOut_exportationFromClient(?,?,?)', - [maxShipped, clientFk, companyId], options + [maxShipped, clientFk, companyFk], options ); const query = 'SELECT vn.hasAnyNegativeBase() AS base'; const [result] = await models.InvoiceOut.rawSql(query, [], options); @@ -170,14 +194,14 @@ module.exports = Self => { return result.base; } - async function getMaxIssued(serial, companyId, options) { + async function getMaxIssued(serial, companyFk, options) { const models = Self.app.models; const query = `SELECT MAX(issued) AS issued FROM invoiceOut WHERE serial = ? AND companyFk = ?`; const [maxIssued] = await models.InvoiceOut.rawSql(query, - [serial, companyId], options); - const maxInvoiceDate = maxIssued && maxIssued.issued || Date.vnNew(); + [serial, companyFk], options); + const maxInvoiceDate = maxIssued?.issued || Date.vnNew(); return maxInvoiceDate; } diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index bf7e7d3cb..2fad1afd8 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -64,7 +64,7 @@ module.exports = Self => { try { const client = await models.Client.findById(args.clientId, { fields: ['id', 'hasToInvoiceByAddress'] - }, options); + }, myOptions); if (client.hasToInvoiceByAddress) { await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [ @@ -72,13 +72,13 @@ module.exports = Self => { args.maxShipped, args.addressId, args.companyFk - ], options); + ], myOptions); } else { await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [ args.maxShipped, client.id, args.companyFk - ], options); + ], myOptions); } const invoiceId = await models.Ticket.makeInvoice( @@ -87,7 +87,7 @@ module.exports = Self => { args.companyFk, args.invoiceDate, null, - options + myOptions ); if (tx) await tx.commit(); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/createManualInvoice.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/createManualInvoice.spec.js index 55739e570..58c18b730 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/createManualInvoice.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/createManualInvoice.spec.js @@ -6,110 +6,90 @@ describe('InvoiceOut createManualInvoice()', () => { const clientId = 1106; const activeCtx = {accessToken: {userId: 1}}; const ctx = {req: activeCtx}; + let tx; let options; + + beforeEach(async() => { + spyOn(models.InvoiceOut, 'createPdf').and.returnValue(Promise.resolve(true)); + spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ + active: activeCtx + }); + + tx = await models.InvoiceOut.beginTransaction({}); + options = {transaction: tx}; + }); + + afterEach(async() => { + await tx.rollback(); + }); it('should throw an error trying to invoice again', async() => { - spyOn(models.InvoiceOut, 'createPdf').and.returnValue(new Promise(resolve => resolve(true))); - - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - let error; try { - await createInvoice(ctx, options, undefined, ticketId); - await createInvoice(ctx, options, undefined, ticketId); - - await tx.rollback(); + await createInvoice(ctx, options, undefined, undefined, ticketId); + await createInvoice(ctx, options, undefined, undefined, ticketId); } catch (e) { error = e; - await tx.rollback(); } expect(error.message).toContain('This ticket is already invoiced'); }); it('should throw an error for a ticket with an amount of zero', async() => { - spyOn(models.InvoiceOut, 'createPdf').and.returnValue(new Promise(resolve => resolve(true))); - spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ - active: activeCtx - }); - - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - let error; try { const ticket = await models.Ticket.findById(ticketId, null, options); await ticket.updateAttributes({totalWithVat: 0}, options); - await createInvoice(ctx, options, undefined, ticketId); - await tx.rollback(); + await createInvoice(ctx, options, undefined, undefined, ticketId); } catch (e) { error = e; - await tx.rollback(); } expect(error.message).toContain(`A ticket with an amount of zero can't be invoiced`); }); it('should throw an error when the clientFk property is set without the max shipped date', async() => { - spyOn(models.InvoiceOut, 'createPdf').and.returnValue(new Promise(resolve => resolve(true))); - - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - let error; try { await createInvoice(ctx, options, clientId); - await tx.rollback(); } catch (e) { error = e; - await tx.rollback(); } expect(error.message).toContain(`Max shipped required`); }); it('should throw an error for a non-invoiceable client', async() => { - spyOn(models.InvoiceOut, 'createPdf').and.returnValue(new Promise(resolve => resolve(true))); - spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ - active: activeCtx - }); - - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; - let error; try { const client = await models.Client.findById(clientId, null, options); await client.updateAttributes({isTaxDataChecked: false}, options); - await createInvoice(ctx, options, undefined, ticketId); - - await tx.rollback(); + await createInvoice(ctx, options, undefined, undefined, ticketId); } catch (e) { error = e; - await tx.rollback(); } expect(error.message).toContain(`This client is not invoiceable`); }); - it('should create a manual invoice', async() => { - spyOn(models.InvoiceOut, 'createPdf').and.returnValue(new Promise(resolve => resolve(true))); + it('should create a manual invoice with ticket', async() => { + const result = await createInvoice(ctx, options, undefined, undefined, ticketId); - const tx = await models.InvoiceOut.beginTransaction({}); - const options = {transaction: tx}; + expect(result.id).toEqual(jasmine.any(Number)); + }); - try { - const result = await createInvoice(ctx, options, undefined, ticketId); + it('should create a manual invoice with client', async() => { + const result = await createInvoice(ctx, options, clientId, undefined, undefined, Date.vnNew()); - expect(result.id).toEqual(jasmine.any(Number)); + expect(result.id).toEqual(jasmine.any(Number)); + }); - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } + it('should create a manual invoice with address', async() => { + const addressFk = 126; + const result = await createInvoice(ctx, options, clientId, addressFk, undefined, Date.vnNew()); + + expect(result.id).toEqual(jasmine.any(Number)); }); }); @@ -117,6 +97,7 @@ function createInvoice( ctx, options, clientFk = undefined, + addressFk = undefined, ticketFk = undefined, maxShipped = undefined, serial = 'T', @@ -124,6 +105,6 @@ function createInvoice( reference = undefined ) { return models.InvoiceOut.createManualInvoice( - ctx, clientFk, ticketFk, maxShipped, serial, taxArea, reference, options + ctx, clientFk, addressFk, ticketFk, maxShipped, serial, taxArea, reference, options ); } diff --git a/modules/item/back/methods/item-shelving/getListItemNewer.js b/modules/item/back/methods/item-shelving/getListItemNewer.js index dafefe712..74c73532a 100644 --- a/modules/item/back/methods/item-shelving/getListItemNewer.js +++ b/modules/item/back/methods/item-shelving/getListItemNewer.js @@ -33,7 +33,7 @@ module.exports = Self => { const [isParkingToReview] = await Self.rawSql(` SELECT COUNT(p.id) parkingToReview - FROM vn.parking p + FROM vn.parking p JOIN vn.sector s ON s.id = p.sectorFk JOIN vn.productionConfig pc WHERE p.code = ? AND s.code = pc.sectorToCode;`, @@ -59,11 +59,11 @@ module.exports = Self => { JOIN vn.productionConfig pc WHERE is2.shelvingFk <> ? AND s.code = pc.sectorFromCode) - SELECT ti.itemFK, tis.shelvingFk + SELECT ti.itemFK, tis.shelvingFk FROM tItemShelving ti JOIN tItemInSector tis ON tis.itemFk = ti.itemFk JOIN vn.productionConfig pc - WHERE ti.created + INTERVAL pc.itemOlderReviewHours HOUR < tis.created ;`, + WHERE ti.created + INTERVAL pc.itemOlderReviewHours HOUR < tis.created;`, [shelvingFk, shelvingFk], myOptions); return result; }; diff --git a/modules/item/back/methods/item-shelving/updateFromSale.js b/modules/item/back/methods/item-shelving/updateFromSale.js index 167509074..47ca2a010 100644 --- a/modules/item/back/methods/item-shelving/updateFromSale.js +++ b/modules/item/back/methods/item-shelving/updateFromSale.js @@ -38,9 +38,13 @@ module.exports = Self => { const itemShelving = itemShelvingSale.itemShelving(); const quantity = itemShelving.visible + itemShelvingSale.quantity; + const available = itemShelving.available + itemShelvingSale.quantity; await itemShelving.updateAttributes( - {visible: quantity}, + { + visible: quantity, + available: available + }, myOptions ); if (tx) await tx.commit(); diff --git a/modules/route/back/methods/route/driverRouteEmail.js b/modules/route/back/methods/route/driverRouteEmail.js index bbac2b0e8..62147db87 100644 --- a/modules/route/back/methods/route/driverRouteEmail.js +++ b/modules/route/back/methods/route/driverRouteEmail.js @@ -39,6 +39,8 @@ module.exports = Self => { const {reportMail} = agencyMode(); let user; let account; + let userEmail; + ctx.args.recipients = reportMail ? reportMail.split(',').map(email => email.trim()) : []; if (workerFk) { user = await models.VnUser.findById(workerFk, { @@ -48,10 +50,17 @@ module.exports = Self => { account = await models.Account.findById(workerFk); } - if (user?.active && account) ctx.args.recipient = user.emailUser().email; - else ctx.args.recipient = reportMail; + if (user?.active && account) + userEmail = user.emailUser().email; + + if (userEmail) + ctx.args.recipients.push(userEmail); + + ctx.args.recipients = [...new Set(ctx.args.recipients)]; + + if (!ctx.args.recipients.length) + throw new UserError('An email is necessary'); - if (!ctx.args.recipient) throw new UserError('An email is necessary'); return Self.sendTemplate(ctx, 'driver-route'); }; }; diff --git a/modules/supplier/back/methods/supplier/filter.js b/modules/supplier/back/methods/supplier/filter.js index 0b473f7df..a52eb6444 100644 --- a/modules/supplier/back/methods/supplier/filter.js +++ b/modules/supplier/back/methods/supplier/filter.js @@ -81,7 +81,7 @@ module.exports = Self => { let stmts = []; let stmt; stmt = new ParameterizedSQL( - `SELECT + `SELECT s.id, s.name AS socialName, s.nickname AS alias, @@ -92,10 +92,13 @@ module.exports = Self => { s.payDay, s.phone, s.city, + s.countryFk, + c.name country, pm.name AS payMethod, pd.payDem AS payDem FROM vn.supplier s LEFT JOIN vn.payMethod pm ON pm.id = s.payMethodFk + LEFT JOIN vn.country c ON c.id = s.countryFk LEFT JOIN vn.payDem pd ON pd.id = s.payDemFk` ); diff --git a/modules/ticket/back/methods/sale-tracking/setPicked.js b/modules/ticket/back/methods/sale-tracking/setPicked.js index ed3656cf4..b63a0474f 100644 --- a/modules/ticket/back/methods/sale-tracking/setPicked.js +++ b/modules/ticket/back/methods/sale-tracking/setPicked.js @@ -75,7 +75,11 @@ module.exports = Self => { const itemShelving = await models.ItemShelving.findById(itemShelvingFk, null, myOptions); - await itemShelving.updateAttributes({visible: itemShelving.visible - quantity}, myOptions); + await itemShelving.updateAttributes( + { + visible: itemShelving.visible - quantity, + available: itemShelving.available - quantity + }, myOptions); await Self.updateAll( {saleFk}, diff --git a/modules/ticket/back/methods/sale/clone.js b/modules/ticket/back/methods/sale/clone.js index 24346f3ba..0b658a69e 100644 --- a/modules/ticket/back/methods/sale/clone.js +++ b/modules/ticket/back/methods/sale/clone.js @@ -142,12 +142,19 @@ module.exports = Self => { ctx.args.addressId = ticket.addressFk; const newTicket = await models.Ticket.new(ctx, myOptions); - - await models.TicketRefund.create({ - originalTicketFk: ticketId, - refundTicketFk: newTicket.id - }, myOptions); - + const existingRefund = await models.TicketRefund.findOne({ + where: { + originalTicketFk: ticketId, + refundTicketFk: newTicket.id + }, + myOptions + }); + if (!existingRefund) { + await models.TicketRefund.create({ + originalTicketFk: ticketId, + refundTicketFk: newTicket.id + }, myOptions); + } return newTicket; } }; diff --git a/modules/ticket/back/methods/ticket-weekly/filter.js b/modules/ticket/back/methods/ticket-weekly/filter.js index 6c9ed4f8b..512faa4cf 100644 --- a/modules/ticket/back/methods/ticket-weekly/filter.js +++ b/modules/ticket/back/methods/ticket-weekly/filter.js @@ -67,7 +67,7 @@ module.exports = Self => { FROM ticketWeekly tw JOIN ticket t ON t.id = tw.ticketFk JOIN client c ON c.id = t.clientFk - JOIN account.user u ON u.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = c.salesPersonFk JOIN warehouse wh ON wh.id = t.warehouseFk LEFT JOIN agencyMode am ON am.id = tw.agencyModeFk` ); diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index c98ddaab6..06781c3c8 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -76,7 +76,8 @@ module.exports = Self => { { arg: 'myTeam', type: 'boolean', - description: `Whether to show only tickets for the current logged user team (For now it shows only the current user tickets)` + description: `Whether to show only tickets for the current logged user team + (For now it shows only the current user tickets)` }, { arg: 'problems', @@ -258,7 +259,8 @@ module.exports = Self => { MINUTE(z.hour) zoneMinute, z.name zoneName, z.id zoneFk, - CAST(z.hour AS CHAR) hour + CAST(z.hour AS CHAR) hour, + a.nickname addressNickname FROM ticket t LEFT JOIN invoiceOut io ON t.refFk = io.ref LEFT JOIN zone z ON z.id = t.zoneFk diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html index 82094d7b8..b861b0c0e 100644 --- a/modules/ticket/front/descriptor-menu/index.html +++ b/modules/ticket/front/descriptor-menu/index.html @@ -349,13 +349,6 @@ message="Recalculate components"> - - - - { model: model }, myOptions); - await Self.rawSql(` - INSERT INTO travelThermograph(thermographFk, warehouseFk, temperatureFk, created) - VALUES (?, ?, ?, ?) - `, [thermograph.id, warehouseId, temperatureFk, date], myOptions); + const travelThermograph = await models.TravelThermograph.create({ + thermographFk: thermograph.id, + warehouseFk: warehouseId, + temperatureFk: temperatureFk, + created: date + }, myOptions); if (tx) await tx.commit(); - return thermograph; + return travelThermograph; } catch (err) { if (tx) await tx.rollback(); throw err; diff --git a/modules/travel/back/methods/thermograph/specs/createThermograph.spec.js b/modules/travel/back/methods/thermograph/specs/createThermograph.spec.js index 71b9fcccb..f9b2a19f9 100644 --- a/modules/travel/back/methods/thermograph/specs/createThermograph.spec.js +++ b/modules/travel/back/methods/thermograph/specs/createThermograph.spec.js @@ -6,47 +6,42 @@ describe('Termograph createThermograph()', () => { const temperatureFk = 'COOL'; const warehouseId = 1; const ctx = beforeAll.getCtx(); + let tx; + + beforeEach(async() => { + tx = await models.Thermograph.beginTransaction({}); + }); + + afterEach(async() => { + await tx.rollback(); + }); it(`should create a thermograph which is saved in both thermograph and travelThermograph`, async() => { - const tx = await models.Thermograph.beginTransaction({}); + const options = {transaction: tx}; - try { - const options = {transaction: tx}; + const createdThermograph = await models.Thermograph.createThermograph( + ctx, thermographId, model, temperatureFk, warehouseId, options); - const createdThermograph = await models.Thermograph.createThermograph(ctx, thermographId, model, temperatureFk, warehouseId, options); + expect(createdThermograph.thermographFk).toEqual(thermographId); - expect(createdThermograph.id).toEqual(thermographId); - expect(createdThermograph.model).toEqual(model); + const createdTravelThermograph = + await models.TravelThermograph.findOne({where: {thermographFk: thermographId}}, options); - const createdTravelThermograpth = await models.TravelThermograph.findOne({where: {thermographFk: thermographId}}, options); - - expect(createdTravelThermograpth.warehouseFk).toEqual(warehouseId); - expect(createdTravelThermograpth.temperatureFk).toEqual(temperatureFk); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } + expect(createdTravelThermograph.warehouseFk).toEqual(warehouseId); + expect(createdTravelThermograph.temperatureFk).toEqual(temperatureFk); }); - it(`should throw an error when trying to created repeated thermograph`, async() => { - const tx = await models.Thermograph.beginTransaction({}); - - let error; - + it(`should throw an error when trying to create a repeated thermograph`, async() => { try { const options = {transaction: tx}; - await models.Thermograph.createThermograph(ctx, thermographId, model, temperatureFk, warehouseId, options); - await models.Thermograph.createThermograph(ctx, thermographId, model, temperatureFk, warehouseId, options); - - await tx.rollback(); + await models.Thermograph.createThermograph( + ctx, thermographId, model, temperatureFk, warehouseId, options); + await models.Thermograph.createThermograph( + ctx, thermographId, model, temperatureFk, warehouseId, options); + fail('Expected an error to be thrown when trying to create a repeated thermograph'); } catch (e) { - await tx.rollback(); - error = e; + expect(e.message).toBe('This thermograph id already exists'); } - - expect(error.message).toBe('This thermograph id already exists'); }); }); diff --git a/modules/travel/back/methods/travel/createThermograph.js b/modules/travel/back/methods/travel/createThermograph.js deleted file mode 100644 index aac3a22b9..000000000 --- a/modules/travel/back/methods/travel/createThermograph.js +++ /dev/null @@ -1,103 +0,0 @@ -const UserError = require('vn-loopback/util/user-error'); - -module.exports = Self => { - Self.remoteMethodCtx('createThermograph', { - description: 'Creates a new travel thermograph', - accessType: 'WRITE', - accepts: [{ - arg: 'id', - type: 'number', - description: 'The travel id', - http: {source: 'path'} - }, - { - arg: 'thermographId', - type: 'string', - description: 'The thermograph id', - required: true - }, - { - arg: 'state', - type: 'string', - required: true - }, - { - arg: 'warehouseId', - type: 'number', - description: 'The warehouse id', - required: true - }, - { - arg: 'companyId', - type: 'number', - description: 'The company id', - required: true - }, - { - arg: 'dmsTypeId', - type: 'number', - description: 'The dms type id', - required: true - }, - { - arg: 'reference', - type: 'string', - required: true - }, - { - arg: 'description', - type: 'string', - required: true - }], - returns: { - type: 'object', - root: true - }, - http: { - path: `/:id/createThermograph`, - verb: 'POST' - } - }); - - Self.createThermograph = async(ctx, id, thermographId, state, 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; - } - - try { - const travelThermograph = await models.TravelThermograph.findOne({ - where: { - thermographFk: thermographId, - travelFk: null - } - }, myOptions); - - if (!travelThermograph) - throw new UserError('No valid travel thermograph found'); - - const uploadedFiles = await models.Dms.uploadFile(ctx, myOptions); - const firstDms = uploadedFiles[0]; - - await travelThermograph.updateAttributes({ - dmsFk: firstDms.id, - travelFk: id, - result: state - }, myOptions); - - if (tx) await tx.commit(); - - return travelThermograph; - } catch (err) { - if (tx) await tx.rollback(); - throw err; - } - }; -}; diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js index 9f26423ce..e24a7659c 100644 --- a/modules/travel/back/methods/travel/filter.js +++ b/modules/travel/back/methods/travel/filter.js @@ -79,6 +79,10 @@ module.exports = Self => { arg: 'landingHour', type: 'string', description: 'The landing hour' + }, { + arg: 'daysOnward', + type: 'number', + description: 'The days onward' } ], returns: { @@ -92,8 +96,11 @@ module.exports = Self => { }); Self.filter = async(ctx, filter) => { - let conn = Self.dataSource.connector; - let where = buildFilter(ctx.args, (param, value) => { + const conn = Self.dataSource.connector; + const today = Date.vnNew(); + const future = Date.vnNew(); + + const where = buildFilter(ctx.args, (param, value) => { switch (param) { case 'search': return /^\d+$/.test(value) @@ -109,6 +116,12 @@ module.exports = Self => { return {'t.landed': {gte: value}}; case 'landedTo': return {'t.landed': {lte: value}}; + case 'daysOnward': + + today.setHours(0, 0, 0, 0); + future.setDate(today.getDate() + value); + future.setHours(23, 59, 59, 999); + return {'t.landed': {between: [today, future]}}; case 'id': case 'agencyModeFk': case 'warehouseOutFk': diff --git a/modules/travel/back/methods/travel/saveThermograph.js b/modules/travel/back/methods/travel/saveThermograph.js new file mode 100644 index 000000000..6f7e1c8bf --- /dev/null +++ b/modules/travel/back/methods/travel/saveThermograph.js @@ -0,0 +1,132 @@ +const UserError = require('vn-loopback/util/user-error'); + +module.exports = Self => { + Self.remoteMethodCtx('saveThermograph', { + description: 'Creates or updates a travel thermograph', + accessType: 'WRITE', + accepts: [{ + arg: 'id', + type: 'number', + description: 'The travel id', + http: {source: 'path'} + }, + { + arg: 'travelThermographFk', + type: 'number', + description: 'The travel thermograph id', + required: true + }, + { + arg: 'state', + type: 'string', + required: true + }, + { + arg: 'maxTemperature', + type: 'number', + description: 'The maximum temperature' + }, + { + arg: 'minTemperature', + type: 'number', + description: 'The minimum temperature' + }, + { + arg: 'temperatureFk', + type: 'string', + description: 'Range of temperature' + }, { + arg: 'warehouseId', + type: 'Number', + description: 'The warehouse id' + }, { + arg: 'companyId', + type: 'Number', + description: 'The company id' + }, { + arg: 'dmsTypeId', + type: 'Number', + description: 'The dms type id' + }, { + arg: 'reference', + type: 'String' + }, { + arg: 'description', + type: 'String' + }, { + arg: 'hasFileAttached', + type: 'Boolean', + description: 'True if has an attached file' + }], + returns: {type: 'object', root: true}, + http: {path: `/:id/saveThermograph`, verb: 'POST'} + }); + + Self.saveThermograph = async( + ctx, + id, + travelThermographFk, + state, + maxTemperature, + minTemperature, + temperatureFk, + warehouseId, + companyId, + dmsTypeId, + reference, + description, + hasFileAttached, + options + ) => { + const models = Self.app.models; + let tx; + const myOptions = {}; + + if (typeof options == 'object') + Object.assign(myOptions, options); + + let dmsFk; + + if (!myOptions.transaction) { + tx = await Self.beginTransaction({}); + myOptions.transaction = tx; + } + + try { + const travelThermograph = await models.TravelThermograph.findById( + travelThermographFk, + {fields: ['id', 'dmsFk', 'warehouseFk']}, + myOptions + ); + + if (!travelThermograph) + throw new UserError('No valid travel thermograph found'); + + if (travelThermograph.dmsFk) { + await models.Dms.updateFile(ctx, travelThermograph.dmsFk, myOptions); + dmsFk = travelThermograph.dmsFk; + } else { + const uploadedFiles = await models.Dms.uploadFile(ctx, myOptions); + const firstDms = uploadedFiles[0]; + dmsFk = firstDms.id; + } + + await travelThermograph.updateAttributes({ + dmsFk, + travelFk: id, + result: state, + maxTemperature, + minTemperature, + temperatureFk, + warehouseFk: warehouseId, + }, myOptions); + + if (tx) await tx.commit(); + + return travelThermograph; + } catch (err) { + if (tx) await tx.rollback(); + throw err; + } + }; +}; diff --git a/modules/travel/back/methods/travel/specs/createThermograph.spec.js b/modules/travel/back/methods/travel/specs/createThermograph.spec.js deleted file mode 100644 index f70e27368..000000000 --- a/modules/travel/back/methods/travel/specs/createThermograph.spec.js +++ /dev/null @@ -1,51 +0,0 @@ -const models = require('vn-loopback/server/server').models; - -describe('Travel createThermograph()', () => { - beforeAll.mockLoopBackContext(); - const travelId = 3; - const currentUserId = 1102; - const thermographId = '138350-0'; - const ctx = {req: {accessToken: {userId: currentUserId}}, args: {dmsTypeId: 1}}; - - it(`should set the travelFk and dmsFk properties to the travel thermograph`, async() => { - const tx = await models.Travel.beginTransaction({}); - - try { - const options = {transaction: tx}; - - spyOn(models.Dms, 'uploadFile').and.returnValue([{id: 5}]); - - travelThermographBefore = await models.TravelThermograph.findOne({ - where: { - thermographFk: thermographId, - travelFk: null - } - }, options); - - await models.Travel.createThermograph(ctx, travelId, thermographId, options); - - const travelThermographAfter = await models.TravelThermograph.findOne({ - where: { - thermographFk: thermographId, - travelFk: travelId - } - }, options); - - expect(models.Dms.uploadFile).toHaveBeenCalledWith(ctx, jasmine.any(Object)); - - expect(travelThermographBefore).toBeDefined(); - expect(travelThermographBefore.thermographFk).toEqual(thermographId); - expect(travelThermographBefore.travelFk).toBeNull(); - expect(travelThermographAfter).toBeDefined(); - - expect(travelThermographAfter.thermographFk).toEqual(thermographId); - expect(travelThermographAfter.travelFk).toEqual(travelId); - expect(travelThermographAfter.dmsFk).toEqual(5); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - throw e; - } - }); -}); diff --git a/modules/travel/back/methods/travel/specs/saveThermograph.spec.js b/modules/travel/back/methods/travel/specs/saveThermograph.spec.js new file mode 100644 index 000000000..c2da4234e --- /dev/null +++ b/modules/travel/back/methods/travel/specs/saveThermograph.spec.js @@ -0,0 +1,69 @@ +const models = require('vn-loopback/server/server').models; + +describe('Thermograph saveThermograph()', () => { + const ctx = beforeAll.getCtx(); + const travelFk = 1; + const thermographId = '138350-0'; + const warehouseFk = 1; + const state = 'COMPLETED'; + const maxTemperature = 30; + const minTemperature = 10; + const temperatureFk = 'COOL'; + let tx; + let options; + + beforeEach(async() => { + options = {transaction: tx}; + tx = await models.Sale.beginTransaction({}); + options.transaction = tx; + }); + + afterEach(async() => { + await tx.rollback(); + }); + + it('should update an existing travel thermograph', async() => { + const dmsFk = 5; + spyOn(models.Dms, 'uploadFile').and.returnValue([{id: dmsFk}]); + + const travelThermograph = await models.TravelThermograph.create({ + travelFk, + thermographFk: thermographId, + temperatureFk, + warehouseFk, + }, options); + + const updatedThermograph = await models.Travel.saveThermograph( + ctx, + travelFk, + travelThermograph.id, + state, + maxTemperature, + minTemperature, + temperatureFk, + warehouseFk, + null, + null, + null, + null, + null, options + ); + + expect(updatedThermograph.result).toEqual(state); + expect(updatedThermograph.maxTemperature).toEqual(maxTemperature); + expect(updatedThermograph.minTemperature).toEqual(minTemperature); + expect(updatedThermograph.temperatureFk).toEqual(temperatureFk); + expect(updatedThermograph.dmsFk).toEqual(dmsFk); + }); + + it('should throw an error if no valid travel thermograph is found', async() => { + try { + await models.Travel.saveThermograph( + ctx, null, 'notExists', state, maxTemperature, minTemperature, temperatureFk, options + ); + fail('Expected an error to be thrown when no valid travel thermograph is found'); + } catch (e) { + expect(e.message).toBe('No valid travel thermograph found'); + } + }); +}); diff --git a/modules/travel/back/methods/travel/updateThermograph.js b/modules/travel/back/methods/travel/updateThermograph.js deleted file mode 100644 index d89725920..000000000 --- a/modules/travel/back/methods/travel/updateThermograph.js +++ /dev/null @@ -1,83 +0,0 @@ -const UserError = require('vn-loopback/util/user-error'); - -module.exports = Self => { - Self.remoteMethodCtx('updateThermograph', { - description: 'Updates a travel thermograph', - accessType: 'WRITE', - accepts: [{ - arg: 'id', - type: 'Number', - description: 'The travel id', - http: {source: 'path'} - }, { - arg: 'thermographId', - type: 'String', - description: 'The thermograph id', - required: true - }, { - arg: 'state', - type: 'String', - required: true - }, { - arg: 'warehouseId', - type: 'Number', - description: 'The warehouse id' - }, { - arg: 'companyId', - type: 'Number', - description: 'The company id' - }, { - arg: 'dmsTypeId', - type: 'Number', - description: 'The dms type id' - }, { - arg: 'reference', - type: 'String' - }, { - arg: 'description', - type: 'String' - }, { - arg: 'hasFileAttached', - type: 'Boolean', - description: 'True if has an attached file' - }], - returns: { - type: 'Object', - root: true - }, - http: { - path: `/:id/updateThermograph`, - verb: 'POST' - } - }); - - Self.updateThermograph = async(ctx, id, thermographId, state) => { - const models = Self.app.models; - const tx = await Self.beginTransaction({}); - - try { - const options = {transaction: tx}; - const travelThermograph = await models.TravelThermograph.findOne({ - where: { - thermographFk: thermographId, - travelFk: id - } - }, options); - - if (!travelThermograph) - throw new UserError('No valid travel thermograph found'); - - const dmsFk = travelThermograph.dmsFk; - await models.Dms.updateFile(ctx, dmsFk, options); - await travelThermograph.updateAttributes({ - result: state - }, options); - - await tx.commit(); - return travelThermograph; - } catch (e) { - await tx.rollback(); - throw e; - } - }; -}; diff --git a/modules/travel/back/models/travel-thermograph.json b/modules/travel/back/models/travel-thermograph.json index cc8e60aaf..cb0a9b4f8 100644 --- a/modules/travel/back/models/travel-thermograph.json +++ b/modules/travel/back/models/travel-thermograph.json @@ -28,6 +28,14 @@ "warehouseFk": { "type": "number", "required": true + }, + "maxTemperature": { + "type": "number", + "description": "Maximum temperature" + }, + "minTemperature": { + "type": "number", + "description": "Minimum temperature" } }, "relations": { diff --git a/modules/travel/back/models/travel.js b/modules/travel/back/models/travel.js index 4bcf7b31d..369be7919 100644 --- a/modules/travel/back/models/travel.js +++ b/modules/travel/back/models/travel.js @@ -4,9 +4,8 @@ module.exports = Self => { require('../methods/travel/getTravel')(Self); require('../methods/travel/getEntries')(Self); require('../methods/travel/filter')(Self); - require('../methods/travel/createThermograph')(Self); require('../methods/travel/deleteThermograph')(Self); - require('../methods/travel/updateThermograph')(Self); + require('../methods/travel/saveThermograph')(Self); require('../methods/travel/extraCommunityFilter')(Self); require('../methods/travel/getAverageDays')(Self); require('../methods/travel/cloneWithEntries')(Self); diff --git a/modules/travel/front/basic-data/index.html b/modules/travel/front/basic-data/index.html deleted file mode 100644 index 783208d9a..000000000 --- a/modules/travel/front/basic-data/index.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/travel/front/basic-data/index.js b/modules/travel/front/basic-data/index.js deleted file mode 100644 index 581fd71e5..000000000 --- a/modules/travel/front/basic-data/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - onSubmit() { - return this.$.watcher.submit().then(() => - this.card.reload() - ); - } -} - -ngModule.vnComponent('vnTravelBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - travel: '<' - }, - require: { - card: '^vnTravelCard' - } -}); diff --git a/modules/travel/front/basic-data/index.spec.js b/modules/travel/front/basic-data/index.spec.js deleted file mode 100644 index 11894d6e0..000000000 --- a/modules/travel/front/basic-data/index.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import './index.js'; - -describe('Travel Component vnTravelBasicData', () => { - let controller; - - beforeEach(angular.mock.module('travel', $translateProvider => { - $translateProvider.translations('en', {}); - })); - - beforeEach(inject($componentController => { - const $element = angular.element(''); - controller = $componentController('vnTravelBasicData', {$element}); - controller.card = {reload: () => {}}; - controller.$.watcher = {submit: () => {}}; - })); - - describe('onSubmit()', () => { - it('should call the card reload method after the watcher submits', done => { - jest.spyOn(controller.card, 'reload'); - jest.spyOn(controller.$.watcher, 'submit').mockReturnValue(Promise.resolve()); - - controller.onSubmit().then(() => { - expect(controller.card.reload).toHaveBeenCalledWith(); - done(); - }).catch(done.fail); - }); - }); -}); diff --git a/modules/travel/front/basic-data/locale/es.yml b/modules/travel/front/basic-data/locale/es.yml deleted file mode 100644 index d95675612..000000000 --- a/modules/travel/front/basic-data/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -Undo changes: Deshacer cambios diff --git a/modules/travel/front/card/index.html b/modules/travel/front/card/index.html deleted file mode 100644 index 91964be21..000000000 --- a/modules/travel/front/card/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/travel/front/card/index.js b/modules/travel/front/card/index.js deleted file mode 100644 index d46244cb5..000000000 --- a/modules/travel/front/card/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import ngModule from '../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - let filter = { - include: [ - { - relation: 'warehouseIn', - scope: { - fields: ['id', 'name'] - } - }, { - relation: 'warehouseOut', - scope: { - fields: ['id', 'name'] - } - } - ] - }; - - this.$http.get(`Travels/${this.$params.id}`, {filter}) - .then(response => this.travel = response.data); - } -} - -ngModule.vnComponent('vnTravelCard', { - template: require('./index.html'), - controller: Controller -}); - diff --git a/modules/travel/front/create/index.html b/modules/travel/front/create/index.html deleted file mode 100644 index 593887a22..000000000 --- a/modules/travel/front/create/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/travel/front/create/index.js b/modules/travel/front/create/index.js deleted file mode 100644 index a85917ca8..000000000 --- a/modules/travel/front/create/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - $onChanges() { - if (this.$params && this.$params.q) - this.travel = JSON.parse(this.$params.q); - } - - onShippedChange(value) { - let hasFilledProperties; - let hasAgencyMode; - if (this.travel) { - hasAgencyMode = Boolean(this.travel.agencyModeFk); - hasFilledProperties = this.travel.landed || this.travel.warehouseInFk || this.travel.warehouseOutFk; - } - if (!hasAgencyMode || hasFilledProperties) - return; - - const query = `travels/getAverageDays`; - const params = { - agencyModeFk: this.travel.agencyModeFk - }; - this.$http.get(query, {params}).then(res => { - if (!res.data) - return; - - const landed = new Date(value); - const futureDate = landed.getDate() + res.data.dayDuration; - landed.setDate(futureDate); - - this.travel.landed = landed; - this.travel.warehouseInFk = res.data.warehouseInFk; - this.travel.warehouseOutFk = res.data.warehouseOutFk; - }); - } - - onSubmit() { - return this.$.watcher.submit().then( - res => this.$state.go('travel.card.basicData', {id: res.data.id}) - ); - } -} - -ngModule.vnComponent('vnTravelCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/travel/front/create/index.spec.js b/modules/travel/front/create/index.spec.js deleted file mode 100644 index cdff8cfb9..000000000 --- a/modules/travel/front/create/index.spec.js +++ /dev/null @@ -1,88 +0,0 @@ -import './index'; -import watcher from 'core/mocks/watcher'; - -describe('Travel Component vnTravelCreate', () => { - let $scope; - let $state; - let controller; - let $httpBackend; - - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, $rootScope, _$state_, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - $state = _$state_; - $scope.watcher = watcher; - const $element = angular.element(''); - controller = $componentController('vnTravelCreate', {$element, $scope}); - })); - - describe('onSubmit()', () => { - it(`should call submit() on the watcher then expect a callback`, () => { - jest.spyOn($state, 'go'); - - controller.onSubmit(); - - expect(controller.$state.go).toHaveBeenCalledWith('travel.card.basicData', {id: 1234}); - }); - }); - - describe('$onChanges()', () => { - it('should update the travel data when $params.q is defined', () => { - controller.$params = {q: '{"ref": 1,"agencyModeFk": 1}'}; - - const params = {q: '{"ref": 1, "agencyModeFk": 1}'}; - const json = JSON.parse(params.q); - - controller.$onChanges(); - - expect(controller.travel).toEqual(json); - }); - }); - - describe('onShippedChange()', () => { - it(`should do nothing if there's no agencyModeFk in the travel.`, () => { - controller.travel = {}; - controller.onShippedChange(); - - expect(controller.travel.landed).toBeUndefined(); - expect(controller.travel.warehouseInFk).toBeUndefined(); - expect(controller.travel.warehouseOutFk).toBeUndefined(); - }); - - it(`should do nothing if there's no response data.`, () => { - controller.travel = {agencyModeFk: 4}; - const tomorrow = Date.vnNew(); - - const query = `travels/getAverageDays?agencyModeFk=${controller.travel.agencyModeFk}`; - $httpBackend.expectGET(query).respond(undefined); - controller.onShippedChange(tomorrow); - $httpBackend.flush(); - - expect(controller.travel.warehouseInFk).toBeUndefined(); - expect(controller.travel.warehouseOutFk).toBeUndefined(); - expect(controller.travel.dayDuration).toBeUndefined(); - }); - - it(`should fill the fields when it's selected a date and agency.`, () => { - controller.travel = {agencyModeFk: 1}; - const tomorrow = Date.vnNew(); - tomorrow.setDate(tomorrow.getDate() + 9); - const expectedResponse = { - id: 8, - dayDuration: 9, - warehouseInFk: 5, - warehouseOutFk: 1 - }; - - const query = `travels/getAverageDays?agencyModeFk=${controller.travel.agencyModeFk}`; - $httpBackend.expectGET(query).respond(expectedResponse); - controller.onShippedChange(tomorrow); - $httpBackend.flush(); - - expect(controller.travel.warehouseInFk).toEqual(expectedResponse.warehouseInFk); - expect(controller.travel.warehouseOutFk).toEqual(expectedResponse.warehouseOutFk); - }); - }); -}); diff --git a/modules/travel/front/descriptor-menu/index.html b/modules/travel/front/descriptor-menu/index.html deleted file mode 100644 index 19831860b..000000000 --- a/modules/travel/front/descriptor-menu/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - Clone travel - - - Clone travel and his entries - - - Delete travel - - - Add entry - - - - - - - - - - - - - - - diff --git a/modules/travel/front/descriptor-menu/index.js b/modules/travel/front/descriptor-menu/index.js deleted file mode 100644 index f68502ec3..000000000 --- a/modules/travel/front/descriptor-menu/index.js +++ /dev/null @@ -1,95 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - } - - get travelId() { - return this._travelId; - } - - set travelId(value) { - this._travelId = value; - - if (value) this.loadData(); - } - - loadData() { - const filter = { - fields: [ - 'id', - 'ref', - 'shipped', - 'landed', - 'totalEntries', - 'agencyModeFk', - 'warehouseInFk', - 'warehouseOutFk', - 'cargoSupplierFk' - ], - include: [ - { - relation: 'warehouseIn', - scope: { - fields: ['name'] - } - }, { - relation: 'warehouseOut', - scope: { - fields: ['name'] - } - } - ] - }; - this.$http.get(`Travels/${this.travelId}`, {filter}) - .then(res => this.travel = res.data); - - this.$http.get(`Travels/${this.travelId}/getEntries`) - .then(res => this.entries = res.data); - } - - get isBuyer() { - return this.aclService.hasAny(['buyer']); - } - - onDeleteAccept() { - this.$http.delete(`Travels/${this.travelId}`) - .then(() => this.$state.go('travel.index')) - .then(() => this.vnApp.showSuccess(this.$t('Travel deleted'))); - } - - onCloneAccept() { - const params = JSON.stringify({ - ref: this.travel.ref, - agencyModeFk: this.travel.agencyModeFk, - shipped: this.travel.shipped, - landed: this.travel.landed, - warehouseInFk: this.travel.warehouseInFk, - warehouseOutFk: this.travel.warehouseOutFk - }); - this.$state.go('travel.create', {q: params}); - } - - async redirectToCreateEntry() { - this.$state.go('home'); - window.location.href = await this.vnApp.getUrl(`entry/create?travelFk=${this.travelId}`); - } - - onCloneWithEntriesAccept() { - this.$http.post(`Travels/${this.travelId}/cloneWithEntries`) - .then(res => this.$state.go('travel.card.basicData', {id: res.data})); - } -} - -Controller.$inject = ['$element', '$scope']; - -ngModule.vnComponent('vnTravelDescriptorMenu', { - template: require('./index.html'), - controller: Controller, - bindings: { - travelId: '<', - } -}); diff --git a/modules/travel/front/descriptor-menu/index.spec.js b/modules/travel/front/descriptor-menu/index.spec.js deleted file mode 100644 index 40319e8e2..000000000 --- a/modules/travel/front/descriptor-menu/index.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -import './index.js'; - -describe('Travel Component vnTravelDescriptorMenu', () => { - let controller; - let $httpBackend; - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - const $element = angular.element(''); - controller = $componentController('vnTravelDescriptorMenu', {$element}); - controller._travelId = 5; - })); - - describe('onCloneAccept()', () => { - it('should call state.go with the travel data', () => { - jest.spyOn(controller.$state, 'go').mockReturnValue('ok'); - - controller.travel = { - ref: 'the ref', - agencyModeFk: 'the agency', - shipped: 'the shipped date', - landed: 'the landing date', - warehouseInFk: 'the receiver warehouse', - warehouseOutFk: 'the sender warehouse' - }; - - controller.onCloneAccept(); - - const params = JSON.stringify({ - ref: controller.travel.ref, - agencyModeFk: controller.travel.agencyModeFk, - shipped: controller.travel.shipped, - landed: controller.travel.landed, - warehouseInFk: controller.travel.warehouseInFk, - warehouseOutFk: controller.travel.warehouseOutFk - }); - - expect(controller.$state.go).toHaveBeenCalledWith('travel.create', {'q': params}); - }); - }); - - describe('onDeleteAccept()', () => { - it('should perform a delete query', () => { - jest.spyOn(controller.$state, 'go').mockReturnValue('ok'); - controller.travelId = 1; - - $httpBackend.when('GET', `Travels/${controller.travelId}`).respond(200); - $httpBackend.when('GET', `Travels/${controller.travelId}/getEntries`).respond(200); - $httpBackend.expect('DELETE', `Travels/${controller.travelId}`).respond(200); - controller.onDeleteAccept(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('travel.index'); - }); - }); - - describe('onCloneWithEntriesAccept()', () => { - it('should make an HTTP query and then call to the $state.go method with the returned id', () => { - jest.spyOn(controller.$state, 'go').mockReturnValue('ok'); - - $httpBackend.expect('POST', `Travels/${controller.travelId}/cloneWithEntries`).respond(200, 9); - controller.onCloneWithEntriesAccept(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith('travel.card.basicData', { - id: jasmine.any(Number) - }); - }); - }); -}); diff --git a/modules/travel/front/descriptor-menu/locale/es.yml b/modules/travel/front/descriptor-menu/locale/es.yml deleted file mode 100644 index e019d1769..000000000 --- a/modules/travel/front/descriptor-menu/locale/es.yml +++ /dev/null @@ -1,8 +0,0 @@ -Clone travel: Clonar envío -Add entry: Añadir entrada -Clone travel and his entries: Clonar travel y sus entradas -Do you want to clone this travel and all containing entries?: ¿Quieres clonar este travel y todas las entradas que contiene? -Delete travel: Eliminar envío -The travel will be deleted: El envío será eliminado -Do you want to delete this travel?: ¿Quieres eliminar este envío? -Travel deleted: Envío eliminado \ No newline at end of file diff --git a/modules/travel/front/descriptor-menu/style.scss b/modules/travel/front/descriptor-menu/style.scss deleted file mode 100644 index beab9335e..000000000 --- a/modules/travel/front/descriptor-menu/style.scss +++ /dev/null @@ -1,24 +0,0 @@ -@import "./effects"; -@import "variables"; - -vn-travel-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; - } - } -} \ No newline at end of file diff --git a/modules/travel/front/descriptor-popover/index.html b/modules/travel/front/descriptor-popover/index.html deleted file mode 100644 index 376423bbc..000000000 --- a/modules/travel/front/descriptor-popover/index.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/modules/travel/front/descriptor-popover/index.js b/modules/travel/front/descriptor-popover/index.js deleted file mode 100644 index 12c5908ca..000000000 --- a/modules/travel/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('vnTravelDescriptorPopover', { - slotTemplate: require('./index.html'), - controller: Controller -}); diff --git a/modules/travel/front/descriptor/index.html b/modules/travel/front/descriptor/index.html deleted file mode 100644 index bbf5721fd..000000000 --- a/modules/travel/front/descriptor/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -
- - - - - - - - - - -
- -
-
- - - \ No newline at end of file diff --git a/modules/travel/front/descriptor/index.js b/modules/travel/front/descriptor/index.js deleted file mode 100644 index b1f2f53be..000000000 --- a/modules/travel/front/descriptor/index.js +++ /dev/null @@ -1,63 +0,0 @@ -import ngModule from '../module'; -import Descriptor from 'salix/components/descriptor'; - -class Controller extends Descriptor { - get travel() { - return this.entity; - } - - set travel(value) { - this.entity = value; - } - - get travelFilter() { - let travelFilter; - const travel = this.travel; - - if (travel && travel.agencyModeFk) { - travelFilter = this.travel && JSON.stringify({ - agencyModeFk: this.travel.agencyModeFk - }); - } - return travelFilter; - } - - loadData() { - const filter = { - fields: [ - 'id', - 'ref', - 'shipped', - 'landed', - 'totalEntries', - 'warehouseInFk', - 'warehouseOutFk', - 'cargoSupplierFk' - ], - include: [ - { - relation: 'warehouseIn', - scope: { - fields: ['name'] - } - }, { - relation: 'warehouseOut', - scope: { - fields: ['name'] - } - } - ] - }; - - return this.getData(`Travels/${this.id}`, {filter}) - .then(res => this.entity = res.data); - } -} - -ngModule.vnComponent('vnTravelDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - travel: '<' - } -}); diff --git a/modules/travel/front/descriptor/index.spec.js b/modules/travel/front/descriptor/index.spec.js deleted file mode 100644 index 0a88c8607..000000000 --- a/modules/travel/front/descriptor/index.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -import './index.js'; - -describe('vnTravelDescriptor', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - controller = $componentController('vnTravelDescriptor', {$element: null}); - })); - - describe('loadData()', () => { - it(`should perform a get query to store the worker data into the controller`, () => { - const id = 1; - const response = 'foo'; - - $httpBackend.expectRoute('GET', `Travels/${id}`).respond(response); - controller.id = id; - $httpBackend.flush(); - - expect(controller.travel).toEqual(response); - }); - }); -}); diff --git a/modules/travel/front/descriptor/locale/es.yml b/modules/travel/front/descriptor/locale/es.yml deleted file mode 100644 index 3e6d62735..000000000 --- a/modules/travel/front/descriptor/locale/es.yml +++ /dev/null @@ -1,6 +0,0 @@ -Reference: Referencia -Wh. In: Alm. entrada -Wh. Out: Alm. salida -Shipped: F. envío -Landed: F. entrega -Total entries: Entradas totales \ No newline at end of file diff --git a/modules/travel/front/extra-community-search-panel/index.html b/modules/travel/front/extra-community-search-panel/index.html deleted file mode 100644 index c0d726718..000000000 --- a/modules/travel/front/extra-community-search-panel/index.html +++ /dev/null @@ -1,92 +0,0 @@ -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/travel/front/extra-community-search-panel/index.js b/modules/travel/front/extra-community-search-panel/index.js deleted file mode 100644 index 1add11dce..000000000 --- a/modules/travel/front/extra-community-search-panel/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import ngModule from '../module'; -import SearchPanel from 'core/components/searchbar/search-panel'; - -class Controller extends SearchPanel { - constructor($, $element) { - super($, $element); - - this.filter = this.$.filter; - } - - get shippedFrom() { - return this.filter.shippedFrom; - } - - set shippedFrom(value) { - this.filter.shippedFrom = value; - } - - get landedTo() { - return this.filter.landedTo; - } - - set landedTo(value) { - this.filter.landedTo = value; - } -} - -ngModule.vnComponent('vnExtraCommunitySearchPanel', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/travel/front/extra-community/index.html b/modules/travel/front/extra-community/index.html deleted file mode 100644 index 8132bddb1..000000000 --- a/modules/travel/front/extra-community/index.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - -
- - - - -
-
- -
Id ColaRuta ImpresoraInformeEstadoTrabajadorError
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Id - - Supplier - - Agency - - Amount - - Reference - - Packages - - Bl. KG - - Phy. KG - - Vol. KG - - Wh. Out - - W. Shipped - - Wh. In - - W. Landed -
- - {{::travel.id}} - - - - {{::travel.cargoSupplierNickname}} - - {{::travel.agencyModeName}} - - {{travel.ref}} - - - - - - {{::travel.stickers}} - - {{travel.kg}} - - - - - - {{::travel.loadedKg}}{{::travel.volumeKg}}{{::travel.warehouseOutName}}{{::travel.shipped | date: 'dd/MM/yyyy'}}{{::travel.warehouseInName}}{{::travel.landed | date: 'dd/MM/yyyy'}}
- - {{::entry.id}} - - - - {{::entry.supplierName}} - - {{::entry.invoiceAmount | currency: 'EUR': 2}}{{::entry.reference}}{{::entry.stickers}}{{::entry.loadedkg}}{{::entry.volumeKg}}
- - - - - - - - - diff --git a/modules/travel/front/extra-community/index.js b/modules/travel/front/extra-community/index.js deleted file mode 100644 index 6e9c39f43..000000000 --- a/modules/travel/front/extra-community/index.js +++ /dev/null @@ -1,162 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $, vnReport) { - super($element, $); - - this.vnReport = vnReport; - - const draggable = this.element.querySelector('.travel-list'); - draggable.addEventListener('dragstart', - event => this.dragStart(event)); - draggable.addEventListener('dragend', - event => this.dragEnd(event)); - - draggable.addEventListener('dragover', - event => this.dragOver(event)); - draggable.addEventListener('dragenter', - event => this.dragEnter(event)); - draggable.addEventListener('dragleave', - event => this.dragLeave(event)); - - this.draggableElement = 'tr[draggable]'; - this.droppableElement = 'tbody[vn-droppable]'; - - const twoDays = 2; - const shippedFrom = Date.vnNew(); - shippedFrom.setDate(shippedFrom.getDate() - twoDays); - shippedFrom.setHours(0, 0, 0, 0); - - const sevenDays = 7; - const landedTo = Date.vnNew(); - landedTo.setDate(landedTo.getDate() + sevenDays); - landedTo.setHours(23, 59, 59, 59); - - this.defaultFilter = { - shippedFrom: shippedFrom, - landedTo: landedTo, - continent: 'AM' - }; - - this.smartTableOptions = {}; - } - - onDragInterval() { - if (this.dragClientY > 0 && this.dragClientY < 75) - this.$window.scrollTo(0, this.$window.scrollY - 10); - - const maxHeight = window.screen.availHeight - (window.outerHeight - window.innerHeight); - if (this.dragClientY > maxHeight - 75 && this.dragClientY < maxHeight) - this.$window.scrollTo(0, this.$window.scrollY + 10); - } - - findDraggable($event) { - const target = $event.target; - const draggable = target.closest(this.draggableElement); - - return draggable; - } - - findDroppable($event) { - const target = $event.target; - const droppable = target.closest(this.droppableElement); - - return droppable; - } - - dragStart($event) { - const draggable = this.findDraggable($event); - draggable.classList.add('dragging'); - - const id = parseInt(draggable.id); - this.entryId = id; - this.entry = draggable; - this.interval = setInterval(() => this.onDragInterval(), 50); - } - - dragEnd($event) { - const draggable = this.findDraggable($event); - draggable.classList.remove('dragging'); - this.entryId = null; - this.entry = null; - - clearInterval(this.interval); - } - - onDrop($event) { - const model = this.$.model; - const droppable = this.findDroppable($event); - const travelId = parseInt(droppable.id); - - const currentDroppable = this.entry.closest(this.droppableElement); - - if (currentDroppable == droppable) return; - - if (this.entryId && travelId) { - const path = `Entries/${this.entryId}`; - this.$http.patch(path, {travelFk: travelId}) - .then(() => model.refresh()) - .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); - } - } - - undrop() { - if (!this.dropping) return; - this.dropping.classList.remove('dropping'); - this.dropping = null; - } - - dragOver($event) { - this.dragClientY = $event.clientY; - $event.preventDefault(); - } - - dragEnter($event) { - let element = this.findDroppable($event); - if (element) this.dropCount++; - - if (element != this.dropping) { - this.undrop(); - if (element) element.classList.add('dropping'); - this.dropping = element; - } - } - - dragLeave($event) { - let element = this.findDroppable($event); - - if (element) { - this.dropCount--; - if (this.dropCount == 0) this.undrop(); - } - } - - save(id, data) { - const endpoint = `Travels/${id}`; - this.$http.patch(endpoint, data) - .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); - } - - get reportParams() { - const userParams = this.$.model.userParams; - const currentFilter = this.$.model.currentFilter; - - return Object.assign({ - authorization: this.vnToken.tokenMultimedia, - filter: currentFilter - }, userParams); - } - - showReport() { - this.vnReport.show(`Travels/extra-community-pdf`, this.reportParams); - } -} - -Controller.$inject = ['$element', '$scope', 'vnReport']; - -ngModule.vnComponent('vnTravelExtraCommunity', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/travel/front/extra-community/index.spec.js b/modules/travel/front/extra-community/index.spec.js deleted file mode 100644 index 18ddee665..000000000 --- a/modules/travel/front/extra-community/index.spec.js +++ /dev/null @@ -1,128 +0,0 @@ -import './index.js'; - -describe('Travel Component vnTravelExtraCommunity', () => { - let controller; - let $httpBackend; - - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - const $element = angular.element('
'); - controller = $componentController('vnTravelExtraCommunity', {$element}); - controller.$.model = {}; - controller.$.model.refresh = jest.fn(); - })); - - describe('findDraggable()', () => { - it('should find the draggable element', () => { - const draggable = document.createElement('tr'); - draggable.setAttribute('draggable', true); - - const $event = new Event('dragstart'); - const target = document.createElement('div'); - draggable.appendChild(target); - target.dispatchEvent($event); - - const result = controller.findDraggable($event); - - expect(result).toEqual(draggable); - }); - }); - - describe('findDroppable()', () => { - it('should find the droppable element', () => { - const droppable = document.createElement('tbody'); - droppable.setAttribute('vn-droppable', true); - - const $event = new Event('drop'); - const target = document.createElement('div'); - droppable.appendChild(target); - target.dispatchEvent($event); - - const result = controller.findDroppable($event); - - expect(result).toEqual(droppable); - }); - }); - - describe('dragStart()', () => { - it(`should add the class "dragging" to the draggable element - and then set the entryId controller property`, () => { - const draggable = document.createElement('tr'); - draggable.setAttribute('draggable', true); - draggable.setAttribute('id', 3); - - jest.spyOn(controller, 'findDraggable').mockReturnValue(draggable); - - const $event = new Event('dragStart'); - controller.dragStart($event); - - const firstClass = draggable.classList[0]; - - expect(firstClass).toEqual('dragging'); - expect(controller.entryId).toEqual(3); - expect(controller.entry).toEqual(draggable); - }); - }); - - describe('dragEnd()', () => { - it(`should remove the class "dragging" from the draggable element - and then set the entryId controller property to null`, () => { - const draggable = document.createElement('tr'); - draggable.setAttribute('draggable', true); - draggable.setAttribute('id', 3); - draggable.classList.add('dragging'); - - jest.spyOn(controller, 'findDraggable').mockReturnValue(draggable); - - const $event = new Event('dragStart'); - controller.dragEnd($event); - - const classList = draggable.classList; - - expect(classList.length).toEqual(0); - expect(controller.entryId).toBeNull(); - expect(controller.entry).toBeNull(); - }); - }); - - describe('onDrop()', () => { - it('should make an HTTP patch query', () => { - const droppable = document.createElement('tbody'); - droppable.setAttribute('vn-droppable', true); - droppable.setAttribute('id', 1); - - jest.spyOn(controller, 'findDroppable').mockReturnValue(droppable); - - const oldDroppable = document.createElement('tbody'); - oldDroppable.setAttribute('vn-droppable', true); - const entry = document.createElement('div'); - oldDroppable.appendChild(entry); - - controller.entryId = 3; - controller.entry = entry; - - const $event = new Event('drop'); - const expectedData = {travelFk: 1}; - $httpBackend.expect('PATCH', `Entries/3`, expectedData).respond(200); - controller.onDrop($event); - $httpBackend.flush(); - }); - }); - - describe('save()', () => { - it('should make an HTTP query', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - - const travelId = 1; - const data = {ref: 'New reference'}; - const expectedData = {ref: 'New reference'}; - $httpBackend.expect('PATCH', `Travels/${travelId}`, expectedData).respond(200); - controller.save(travelId, data); - $httpBackend.flush(); - - expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!'); - }); - }); -}); diff --git a/modules/travel/front/extra-community/locale/es.yml b/modules/travel/front/extra-community/locale/es.yml deleted file mode 100644 index ed6179c91..000000000 --- a/modules/travel/front/extra-community/locale/es.yml +++ /dev/null @@ -1,11 +0,0 @@ -Family: Familia -Extra community: Extra comunitarios -Freighter: Transitario -Bl. KG: KG Bloq. -Phy. KG: KG físico -Vol. KG: KG Vol. -Search by travel id or reference: Buscar por id de travel o referencia -Search by extra community travel: Buscar por envío extra comunitario -Continent Out: Cont. salida -W. Shipped: F. envío -W. Landed: F. llegada diff --git a/modules/travel/front/extra-community/style.scss b/modules/travel/front/extra-community/style.scss deleted file mode 100644 index fb64822f9..000000000 --- a/modules/travel/front/extra-community/style.scss +++ /dev/null @@ -1,67 +0,0 @@ -@import "variables"; - -vn-travel-extra-community { - .header { - margin-bottom: 16px; - line-height: 1; - padding: 7px; - padding-bottom: 7px; - padding-bottom: 4px; - font-weight: lighter; - background-color: $color-bg; - color: white; - border-bottom: 1px solid #f7931e; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - cursor: pointer; - .multi-line{ - padding-top: 15px; - padding-bottom: 15px; - } - } - - table[vn-droppable] { - border-radius: 0; - } - - tr[draggable] { - transition: all .5s; - cursor: move; - overflow: auto; - outline: 0; - height: 65px; - pointer-events: fill; - user-select: all; - } - - tr[draggable] *::selection { - background-color: transparent; - } - - tr[draggable]:hover { - background-color: $color-hover-cd; - } - - tr[draggable].dragging { - background-color: $color-primary-light; - color: $color-font-light; - font-weight: bold; - } - - - .multi-line{ - max-width: 200px; - word-wrap: normal; - white-space: normal; - } - - vn-td-editable text { - background-color: transparent; - padding: 0; - border: 0; - border-bottom: 1px dashed $color-active; - border-radius: 0; - color: $color-active - } -} diff --git a/modules/travel/front/index.js b/modules/travel/front/index.js index e4375c59d..a7209a0bd 100644 --- a/modules/travel/front/index.js +++ b/modules/travel/front/index.js @@ -1,18 +1,3 @@ export * from './module'; import './main'; -import './index/'; -import './search-panel'; -import './descriptor'; -import './card'; -import './summary'; -import './basic-data'; -import './log'; -import './create'; -import './thermograph/index/'; -import './thermograph/create/'; -import './thermograph/edit/'; -import './descriptor-popover'; -import './descriptor-menu'; -import './extra-community'; -import './extra-community-search-panel'; diff --git a/modules/travel/front/index/index.html b/modules/travel/front/index/index.html deleted file mode 100644 index a768e4a29..000000000 --- a/modules/travel/front/index/index.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - Reference - Agency - Warehouse Out - Shipped - - Warehouse In - Landed - - Total entries - - - - - - {{::travel.ref}} - {{::travel.agencyModeName}} - {{::travel.warehouseOutName}} - - - {{::travel.shipped | date:'dd/MM/yyyy'}} - - - - - - - {{::travel.warehouseInName}} - - - {{::travel.landed | date:'dd/MM/yyyy'}} - - - - - - - {{::travel.totalEntries}} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/travel/front/index/index.js b/modules/travel/front/index/index.js deleted file mode 100644 index a570146fe..000000000 --- a/modules/travel/front/index/index.js +++ /dev/null @@ -1,39 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -export default class Controller extends Section { - preview(travel) { - this.travelSelected = travel; - this.$.summary.show(); - } - - onCloneAccept(travel) { - const params = JSON.stringify({ - ref: travel.ref, - agencyModeFk: travel.agencyModeFk, - shipped: travel.shipped, - landed: travel.landed, - warehouseInFk: travel.warehouseInFk, - warehouseOutFk: travel.warehouseOutFk - }); - this.$state.go('travel.create', {q: params}); - } - - compareDate(date) { - let today = Date.vnNew(); - today.setHours(0, 0, 0, 0); - - date = new Date(date); - date.setHours(0, 0, 0, 0); - - const timeDifference = today - date; - if (timeDifference == 0) return 'warning'; - if (timeDifference < 0) return 'success'; - } -} - -ngModule.vnComponent('vnTravelIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/travel/front/index/index.spec.js b/modules/travel/front/index/index.spec.js deleted file mode 100644 index 9083c4519..000000000 --- a/modules/travel/front/index/index.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -import './index.js'; - -describe('Travel Component vnTravelIndex', () => { - let controller; - let travel = { - id: 1, - warehouseInFk: 1, - totalEntries: 3, - isDelivered: false - }; - - beforeEach(ngModule('travel')); - - beforeEach(inject($componentController => { - const $element = angular.element(''); - controller = $componentController('vnTravelIndex', {$element}); - controller.$.summary = {show: jasmine.createSpy('show')}; - })); - - describe('preview()', () => { - it('should show the dialog summary', () => { - let event = new MouseEvent('click', { - bubbles: true, - cancelable: true - }); - controller.preview(event, travel); - - expect(controller.$.summary.show).toHaveBeenCalledWith(); - }); - }); - - describe('onCloneAccept()', () => { - it('should call go() then update travelSelected in the controller', () => { - jest.spyOn(controller.$state, 'go'); - - const travel = { - ref: 1, - agencyModeFk: 1 - }; - const travelParams = { - ref: travel.ref, - agencyModeFk: travel.agencyModeFk - }; - const queryParams = JSON.stringify(travelParams); - controller.onCloneAccept(travel); - - expect(controller.$state.go).toHaveBeenCalledWith('travel.create', {q: queryParams}); - }); - }); - - describe('compareDate()', () => { - it('should return warning if the date passed to compareDate() is todays', () => { - const today = Date.vnNew(); - - const result = controller.compareDate(today); - - expect(result).toEqual('warning'); - }); - - it('should return success if the date passed to compareDate() is in the future', () => { - const tomorrow = Date.vnNew(); - tomorrow.setDate(tomorrow.getDate() + 1); - - const result = controller.compareDate(tomorrow); - - expect(result).toEqual('success'); - }); - - it('should return undefined if the date passed to compareDate() is in the past', () => { - const yesterday = Date.vnNew(); - yesterday.setDate(yesterday.getDate() - 1); - - const result = controller.compareDate(yesterday); - - expect(result).toBeUndefined(); - }); - }); -}); diff --git a/modules/travel/front/index/locale/es.yml b/modules/travel/front/index/locale/es.yml deleted file mode 100644 index 5ce4c502f..000000000 --- a/modules/travel/front/index/locale/es.yml +++ /dev/null @@ -1,3 +0,0 @@ -Do you want to clone this travel?: ¿Desea clonar este envio? -All it's properties will be copied: Todas sus propiedades serán copiadas -Clone: Clonar \ No newline at end of file diff --git a/modules/travel/front/index/style.scss b/modules/travel/front/index/style.scss deleted file mode 100644 index ca1cf538b..000000000 --- a/modules/travel/front/index/style.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import "variables"; - -vn-travel-index { - vn-icon { - color: $color-font-secondary - } - - vn-icon.active { - color: $color-success - } -} diff --git a/modules/travel/front/log/index.html b/modules/travel/front/log/index.html deleted file mode 100644 index fc4622e5a..000000000 --- a/modules/travel/front/log/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/modules/travel/front/log/index.js b/modules/travel/front/log/index.js deleted file mode 100644 index 7af601b5c..000000000 --- a/modules/travel/front/log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnTravelLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/travel/front/main/index.html b/modules/travel/front/main/index.html index 131d9409e..e69de29bb 100644 --- a/modules/travel/front/main/index.html +++ b/modules/travel/front/main/index.html @@ -1,6 +0,0 @@ - - - - - - diff --git a/modules/travel/front/main/index.js b/modules/travel/front/main/index.js index 6a153f21a..37dcbb0dc 100644 --- a/modules/travel/front/main/index.js +++ b/modules/travel/front/main/index.js @@ -5,6 +5,10 @@ export default class Travel extends ModuleMain { constructor() { super(); } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`travel/`); + } } ngModule.vnComponent('vnTravel', { diff --git a/modules/travel/front/routes.json b/modules/travel/front/routes.json index 5a63620d4..6ae61bd02 100644 --- a/modules/travel/front/routes.json +++ b/modules/travel/front/routes.json @@ -27,80 +27,6 @@ "state": "travel.index", "component": "vn-travel-index", "description": "Travels" - }, { - "url": "/:id", - "state": "travel.card", - "abstract": true, - "component": "vn-travel-card" - }, { - "url": "/summary", - "state": "travel.card.summary", - "component": "vn-travel-summary", - "description": "Summary", - "params": { - "travel": "$ctrl.travel" - } - }, { - "url": "/basic-data", - "state": "travel.card.basicData", - "component": "vn-travel-basic-data", - "description": "Basic data", - "acl": ["buyer","logistic"], - "params": { - "travel": "$ctrl.travel" - } - }, { - "url" : "/log", - "state": "travel.card.log", - "component": "vn-travel-log", - "description": "Log" - }, { - "url": "/create?q", - "state": "travel.create", - "component": "vn-travel-create", - "description": "New travel" - }, { - "url": "/thermograph", - "state": "travel.card.thermograph", - "abstract": true, - "component": "ui-view" - }, { - "url" : "/index", - "state": "travel.card.thermograph.index", - "component": "vn-travel-thermograph-index", - "description": "Thermographs", - "params": { - "travel": "$ctrl.travel" - }, - "acl": ["buyer"] - }, { - "url" : "/create", - "state": "travel.card.thermograph.create", - "component": "vn-travel-thermograph-create", - "description": "Add thermograph", - "params": { - "travel": "$ctrl.travel" - }, - "acl": ["buyer"] - }, { - "url" : "/:thermographId/edit", - "state": "travel.card.thermograph.edit", - "component": "vn-travel-thermograph-edit", - "description": "Edit thermograph", - "params": { - "travel": "$ctrl.travel" - }, - "acl": ["buyer"] - }, - { - "url": "/extra-community?q", - "state": "travel.extraCommunity", - "component": "vn-travel-extra-community", - "description": "Extra community", - "acl": ["buyer"], - "params": { - "travel": "$ctrl.travel" - } } ] } diff --git a/modules/travel/front/search-panel/index.html b/modules/travel/front/search-panel/index.html deleted file mode 100644 index dd8d98af1..000000000 --- a/modules/travel/front/search-panel/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Id/{{$ctrl.$t('Reference')}}: {{$ctrl.filter.search}} - - - {{$ctrl.$t('Agency')}}: {{agency.selection.name}} - - - {{$ctrl.$t('Warehouse Out')}}: {{warehouseOut.selection.name}} - - - {{$ctrl.$t('Warehouse In')}}: {{warehouseIn.selection.name}} - - - {{$ctrl.$t('Days onward')}}: {{$ctrl.filter.scopeDays}} - - - {{$ctrl.$t('Landed from')}}: {{$ctrl.filter.landedFrom | date:'dd/MM/yyyy'}} - - - {{$ctrl.$t('Landed to')}}: {{$ctrl.filter.landedTo | date:'dd/MM/yyyy'}} - - - {{$ctrl.$t('Continent Out')}}: {{continent.selection.name}} - - - {{$ctrl.$t('Total entries')}}: {{$ctrl.filter.totalEntries}} - -
-
diff --git a/modules/travel/front/search-panel/index.js b/modules/travel/front/search-panel/index.js deleted file mode 100644 index 5969a8c3f..000000000 --- a/modules/travel/front/search-panel/index.js +++ /dev/null @@ -1,72 +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.initFilter(); - this.fetchData(); - } - - $onChanges() { - if (this.model) - this.applyFilters(); - } - - fetchData() { - this.$http.get('AgencyModes').then(res => { - this.agencyModes = res.data; - }); - this.$http.get('Warehouses').then(res => { - this.warehouses = res.data; - }); - this.$http.get('Continents').then(res => { - this.continents = res.data; - }); - } - - initFilter() { - this.filter = {}; - if (this.$params.q) { - this.filter = JSON.parse(this.$params.q); - this.search = this.filter.search; - this.totalEntries = this.filter.totalEntries; - } - if (!this.filter.scopeDays) this.filter.scopeDays = 7; - } - - applyFilters(param) { - if (this.filter?.search) - delete this.filter.scopeDays; - - this.model.applyFilter({}, this.filter) - .then(() => { - if (param && this.model._orgData.length === 1) - this.$state.go('travel.card.summary', {id: this.model._orgData[0].id}); - else - this.$state.go(this.$state.current.name, {q: JSON.stringify(this.filter)}, {location: 'replace'}); - }); - } - - removeParamFilter(param) { - if (this[param]) delete this[param]; - delete this.filter[param]; - this.applyFilters(); - } - - onKeyPress($event, param) { - if ($event.key === 'Enter') { - this.filter[param] = this[param]; - this.applyFilters(param === 'search'); - } - } -} - -ngModule.vnComponent('vnTravelSearchPanel', { - template: require('./index.html'), - controller: Controller, - bindings: { - model: '<' - } -}); diff --git a/modules/travel/front/search-panel/index.spec.js b/modules/travel/front/search-panel/index.spec.js deleted file mode 100644 index 488143e80..000000000 --- a/modules/travel/front/search-panel/index.spec.js +++ /dev/null @@ -1,38 +0,0 @@ -import './index'; - -describe('Travel Component vnTravelSearchPanel', () => { - let controller; - - beforeEach(ngModule('travel')); - - beforeEach(inject($componentController => { - controller = $componentController('vnTravelSearchPanel', {$element: null}); - controller.$t = () => {}; - })); - - describe('applyFilters()', () => { - it('should apply filters', async() => { - controller.filter = {foo: 'bar'}; - controller.model = { - applyFilter: jest.fn().mockResolvedValue(), - _orgData: [{id: 1}] - }; - controller.$state = { - current: { - name: 'foo' - }, - go: jest.fn() - }; - - await controller.applyFilters(true); - - expect(controller.model.applyFilter).toHaveBeenCalledWith({}, controller.filter); - expect(controller.$state.go).toHaveBeenCalledWith('travel.card.summary', {id: 1}); - - await controller.applyFilters(false); - - expect(controller.$state.go).toHaveBeenCalledWith(controller.$state.current.name, - {q: JSON.stringify(controller.filter)}, {location: 'replace'}); - }); - }); -}); diff --git a/modules/travel/front/search-panel/locale/es.yml b/modules/travel/front/search-panel/locale/es.yml deleted file mode 100644 index 1f892a742..000000000 --- a/modules/travel/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/travel/front/search-panel/style.scss b/modules/travel/front/search-panel/style.scss deleted file mode 100644 index 0da52408a..000000000 --- a/modules/travel/front/search-panel/style.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import "variables"; - -vn-travel-search-panel vn-side-menu { - .menu { - min-width: $menu-width; - } - & > div { - .input { - padding-left: $spacing-md; - padding-right: $spacing-md; - border-color: $color-spacer; - border-bottom: $border-thin; - } - .horizontal { - padding-left: $spacing-md; - padding-right: $spacing-md; - 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; - } - - .or { - align-self: center; - font-weight: bold; - font-size: 26px; - color: $color-font-secondary; - } - } -} diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html deleted file mode 100644 index d9dbb0f90..000000000 --- a/modules/travel/front/summary/index.html +++ /dev/null @@ -1,167 +0,0 @@ - -
- - - - {{$ctrl.travelData.id}} - {{$ctrl.travelData.ref}} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Entries

- - - - Confirmed - Entry Id - Supplier - Reference - HB - Freight - Package - CC - Pallet - - - - - - - - - - - - - {{entry.id}} - - - {{entry.supplierName}} - {{entry.reference}} - {{entry.hb}} - {{entry.freightValue | currency: 'EUR': 2}} - {{entry.packageValue | currency: 'EUR': 2}} - {{entry.cc}} - {{entry.pallet}} - {{entry.m3}} - - - - - - - - - - - - - {{$ctrl.total('hb')}} - {{$ctrl.total('freightValue') | currency: 'EUR': 2}} - {{$ctrl.total('packageValue') | currency: 'EUR': 2}} - {{$ctrl.total('cc') | number:2}} - {{$ctrl.total('pallet') | number:2}} - {{$ctrl.total('m3') | number:2}} - - - - -
- -

- - Thermograph - -

-

- Thermograph -

- - - - Code - Temperature - State - Destination - Created - - - - - {{thermograph.thermographFk}} - {{thermograph.temperatureFk}} - {{thermograph.result}} - {{thermograph.warehouse.name}} - {{thermograph.created | date: 'dd/MM/yyyy'}} - - - -
-
-
- - diff --git a/modules/travel/front/summary/index.js b/modules/travel/front/summary/index.js deleted file mode 100644 index 5144a0bb5..000000000 --- a/modules/travel/front/summary/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import ngModule from '../module'; -import Summary from 'salix/components/summary'; -import './style.scss'; - -class Controller extends Summary { - $onInit() { - this.entries = []; - } - - get travel() { - return this._travel; - } - - set travel(value) { - this._travel = value; - - if (value && value.id) { - this.getTravel(); - this.getEntries(); - this.getThermographs(); - } - } - - getTravel() { - return this.$http.get(`Travels/${this.travel.id}/getTravel`) - .then(res => this.travelData = res.data); - } - - getEntries() { - return this.$http.get(`Travels/${this.travel.id}/getEntries`) - .then(res => this.entries = res.data); - } - - getThermographs() { - const filter = { - include: { - relation: 'warehouse', - scope: { - fields: ['id', 'name'] - } - }, - where: { - travelFk: this.travel.id - } - }; - - return this.$http.get(`TravelThermographs`, {filter}) - .then(res => this.travelThermographs = res.data); - } - - total(field) { - let total = 0; - - for (let entry of this.entries) - total += entry[field]; - - return total; - } - - get isBuyer() { - return this.aclService.hasAny(['buyer']); - } -} - -ngModule.vnComponent('vnTravelSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - travel: '<' - } -}); diff --git a/modules/travel/front/summary/index.spec.js b/modules/travel/front/summary/index.spec.js deleted file mode 100644 index b1b750689..000000000 --- a/modules/travel/front/summary/index.spec.js +++ /dev/null @@ -1,86 +0,0 @@ -import './index'; - -describe('component vnTravelSummary', () => { - let controller; - let $httpBackend; - let $scope; - let $httpParamSerializer; - - beforeEach(angular.mock.module('travel', $translateProvider => { - $translateProvider.translations('en', {}); - })); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnTravelSummary', {$element, $scope}); - })); - - describe('travel setter/getter', () => { - it('should return the travel and then call both getTravel() and getEntries()', () => { - jest.spyOn(controller, 'getTravel'); - jest.spyOn(controller, 'getEntries'); - jest.spyOn(controller, 'getThermographs'); - controller.travel = {id: 99}; - - expect(controller._travel.id).toEqual(99); - expect(controller.getTravel).toHaveBeenCalledWith(); - expect(controller.getEntries).toHaveBeenCalledWith(); - expect(controller.getThermographs).toHaveBeenCalledWith(); - }); - }); - - describe('getTravel()', () => { - it('should perform a get and then store data on the controller', () => { - controller._travel = {id: 999}; - - const query = `Travels/${controller._travel.id}/getTravel`; - $httpBackend.expectGET(query).respond('I am the travelData'); - controller.getTravel(); - $httpBackend.flush(); - - expect(controller.travelData).toEqual('I am the travelData'); - }); - }); - - describe('getEntries()', () => { - it('should call the getEntries method to get the entries data', () => { - controller._travel = {id: 999}; - - const query = `Travels/${controller._travel.id}/getEntries`; - $httpBackend.expectGET(query).respond('I am the entries'); - controller.getEntries(); - $httpBackend.flush(); - - expect(controller.entries).toEqual('I am the entries'); - }); - }); - - describe('getThermographs()', () => { - it('should call the getThermographs method to get the thermographs', () => { - controller._travel = {id: 2}; - - $httpBackend.expectGET(`TravelThermographs`).respond('I am the thermographs'); - controller.getThermographs(); - $httpBackend.flush(); - - expect(controller.travelThermographs).toEqual('I am the thermographs'); - }); - }); - - describe('total()', () => { - it('should calculate the total amount of a given property for every row', () => { - controller.entries = [ - {id: 1, freightValue: 1, packageValue: 2, cc: 0.01}, - {id: 2, freightValue: 1, packageValue: 2, cc: 0.01}, - {id: 3, freightValue: 1, packageValue: 2, cc: 0.01} - ]; - - expect(controller.total('freightValue')).toEqual(3); - expect(controller.total('packageValue')).toEqual(6); - expect(controller.total('cc')).toEqual(0.03); - }); - }); -}); diff --git a/modules/travel/front/summary/locale/es.yml b/modules/travel/front/summary/locale/es.yml deleted file mode 100644 index aa6adc938..000000000 --- a/modules/travel/front/summary/locale/es.yml +++ /dev/null @@ -1,18 +0,0 @@ -Reference: Referencia -Warehouse In: Alm. entrada -Warehouse Out: Alm. salida -Shipped: F. envío -Landed: F. entrega -Total entries: Ent. totales -Delivered: Enviada -Received: Recibida -Agency: Agencia -Entries: Entradas -Confirmed: Confirmada -Entry Id: Id entrada -Supplier: Proveedor -Pallet: Pallet -Freight: Porte -Package: Embalaje -Half box: Media caja -Go to the travel: Ir al envío diff --git a/modules/travel/front/summary/style.scss b/modules/travel/front/summary/style.scss deleted file mode 100644 index dd4cfa72d..000000000 --- a/modules/travel/front/summary/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import "variables"; - - -vn-travel-summary .summary { - max-width: $width-lg; -} \ No newline at end of file diff --git a/modules/travel/front/thermograph/create/index.html b/modules/travel/front/thermograph/create/index.html deleted file mode 100644 index 41709e1fb..000000000 --- a/modules/travel/front/thermograph/create/index.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - -
-
- - - - - {{thermographFk}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/travel/front/thermograph/create/index.js b/modules/travel/front/thermograph/create/index.js deleted file mode 100644 index fa2c1261a..000000000 --- a/modules/travel/front/thermograph/create/index.js +++ /dev/null @@ -1,122 +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, $) { - super($element, $); - this.dms = {files: [], state: 'Ok'}; - } - - get travel() { - return this._travel; - } - - set travel(value) { - this._travel = 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: 'miscellaneous'} - }}; - this.$http.get('DmsTypes/findOne', {params}).then(res => { - const dmsTypeId = res.data && res.data.id; - const companyId = this.vnConfig.companyFk; - const warehouseId = this.vnConfig.warehouseFk; - const defaultParams = { - reference: this.travel.id, - warehouseId: warehouseId, - companyId: companyId, - dmsTypeId: dmsTypeId, - description: this.$t('TravelFileDescription', { - travelId: this.travel.id - }).toUpperCase() - }; - - this.dms = Object.assign(this.dms, defaultParams); - }); - } - - onAddThermographClick(event) { - const defaultTemperature = 'cool'; - const defaultModel = 'DISPOSABLE'; - - event.preventDefault(); - this.newThermograph = { - thermographId: this.thermographId, - warehouseId: this.warehouseId, - temperatureFk: defaultTemperature, - model: defaultModel - }; - - this.$.modelsModel.refresh(); - this.$.newThermographDialog.show(); - } - - onNewThermographAccept() { - const hasMissingField = - !this.newThermograph.thermographId || - !this.newThermograph.warehouseId || - !this.newThermograph.temperatureFk || - !this.newThermograph.model; - - if (hasMissingField) - throw new UserError(`Some fields are invalid`); - - return this.$http.post(`Thermographs/createThermograph`, this.newThermograph) - .then(res => this.dms.thermographId = res.data.id); - } - - onSubmit() { - const query = `Travels/${this.travel.id}/createThermograph`; - 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 => { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.$.watcher.updateOriginalData(); - this.$state.go('travel.card.thermograph.index'); - }); - } -} - -ngModule.vnComponent('vnTravelThermographCreate', { - template: require('./index.html'), - controller: Controller, - bindings: { - travel: '<' - } -}); diff --git a/modules/travel/front/thermograph/create/index.spec.js b/modules/travel/front/thermograph/create/index.spec.js deleted file mode 100644 index 1ad263d31..000000000 --- a/modules/travel/front/thermograph/create/index.spec.js +++ /dev/null @@ -1,108 +0,0 @@ -import './index'; - -describe('Ticket', () => { - describe('Component vnTravelThermographCreate', () => { - let controller; - let $httpBackend; - let $httpParamSerializer; - const travelId = 3; - const dmsTypeId = 5; - - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => { - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - const $element = angular.element(''); - controller = $componentController('vnTravelThermographCreate', {$element}); - controller._travel = { - id: travelId - }; - })); - - describe('travel() setter', () => { - it('should set the travel data and then call setDefaultParams() and getAllowedContentTypes()', () => { - jest.spyOn(controller, 'setDefaultParams'); - jest.spyOn(controller, 'getAllowedContentTypes'); - controller.travel = { - id: travelId - }; - - expect(controller.travel).toBeDefined(); - expect(controller.setDefaultParams).toHaveBeenCalledWith(); - expect(controller.getAllowedContentTypes).toHaveBeenCalledWith(); - }); - }); - - describe('setDefaultParams()', () => { - it('should perform a GET query and define the dms property on controller', () => { - const params = {filter: { - where: {code: 'miscellaneous'} - }}; - let serializedParams = $httpParamSerializer(params); - $httpBackend.expect('GET', `DmsTypes/findOne?${serializedParams}`).respond({id: dmsTypeId, code: 'miscellaneous'}); - controller.setDefaultParams(); - $httpBackend.flush(); - - expect(controller.dms).toBeDefined(); - expect(controller.dms.reference).toEqual(travelId); - expect(controller.dms.dmsTypeId).toEqual(dmsTypeId); - }); - }); - - describe('getAllowedContentTypes()', () => { - it('should make an HTTP GET request to get the allowed content types', () => { - const expectedResponse = ['application/pdf', 'image/png', 'image/jpg']; - $httpBackend.expect('GET', `DmsContainers/allowedContentTypes`).respond(expectedResponse); - controller.getAllowedContentTypes(); - $httpBackend.flush(); - - expect(controller.allowedContentTypes).toBeDefined(); - expect(controller.allowedContentTypes).toEqual('application/pdf, image/png, image/jpg'); - }); - }); - - describe('onAddThermographClick()', () => { - it('should call the show() function of the create thermograph dialog', () => { - controller.$.newThermographDialog = {show: jest.fn()}; - controller.$.modelsModel = {refresh: jest.fn()}; - controller.$.temperaturesModel = {refresh: jest.fn()}; - - const event = new Event('click'); - jest.spyOn(event, 'preventDefault'); - - controller.onAddThermographClick(event); - - expect(event.preventDefault).toHaveBeenCalledTimes(1); - expect(controller.$.newThermographDialog.show).toHaveBeenCalledTimes(1); - }); - }); - - describe('onNewThermographAccept()', () => { - it('should set the created thermograph data on to the controller for the autocomplete to use it', () => { - const id = 'the created id'; - const warehouseId = 1; - const temperatureId = 'cool'; - const model = 'my model'; - - controller.newThermograph = { - thermographId: id, - warehouseId: warehouseId, - temperatureFk: temperatureId, - model: model - }; - const response = { - id: id, - warehouseId: warehouseId, - temperatureFk: temperatureId, - model: model - }; - $httpBackend.when('POST', `Thermographs/createThermograph`).respond(response); - controller.onNewThermographAccept(); - $httpBackend.flush(); - - expect(controller.dms.thermographId).toEqual(response.id); - }); - }); - }); -}); diff --git a/modules/travel/front/thermograph/edit/index.html b/modules/travel/front/thermograph/edit/index.html deleted file mode 100644 index 3fe448b56..000000000 --- a/modules/travel/front/thermograph/edit/index.html +++ /dev/null @@ -1,87 +0,0 @@ - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/modules/travel/front/thermograph/edit/index.js b/modules/travel/front/thermograph/edit/index.js deleted file mode 100644 index a8df3142d..000000000 --- a/modules/travel/front/thermograph/edit/index.js +++ /dev/null @@ -1,98 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - get travel() { - return this._travel; - } - - set travel(value) { - this._travel = 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 filterObj = {include: {relation: 'dms'}}; - const filter = encodeURIComponent(JSON.stringify(filterObj)); - const path = `TravelThermographs/${this.$params.thermographId}?filter=${filter}`; - this.$http.get(path).then(res => { - const thermograph = res.data && res.data; - this.thermograph = { - thermographId: thermograph.thermographFk, - state: thermograph.result, - reference: thermograph.dms.reference, - warehouseId: thermograph.dms.warehouseFk, - companyId: thermograph.dms.companyFk, - dmsTypeId: thermograph.dms.dmsTypeFk, - description: thermograph.dms.description, - hasFile: thermograph.dms.hasFile, - hasFileAttached: false, - files: [] - }; - }); - } - - onSubmit() { - const query = `travels/${this.$params.id}/updateThermograph`; - const options = { - method: 'POST', - url: query, - params: this.thermograph, - 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.thermograph.files - }; - this.$http(options).then(res => { - if (res) { - this.vnApp.showSuccess(this.$t('Data saved!')); - this.$.watcher.updateOriginalData(); - this.$state.go('travel.card.thermograph.index'); - } - }); - } - - onFileChange(files) { - let hasFileAttached = false; - if (files.length > 0) - hasFileAttached = true; - - this.$.$applyAsync(() => { - this.thermograph.hasFileAttached = hasFileAttached; - }); - } -} - -ngModule.vnComponent('vnTravelThermographEdit', { - template: require('./index.html'), - controller: Controller, - bindings: { - travel: '<' - } -}); diff --git a/modules/travel/front/thermograph/edit/index.spec.js b/modules/travel/front/thermograph/edit/index.spec.js deleted file mode 100644 index c0b044a8d..000000000 --- a/modules/travel/front/thermograph/edit/index.spec.js +++ /dev/null @@ -1,120 +0,0 @@ -import './index'; -import watcher from 'core/mocks/watcher.js'; - -describe('Worker', () => { - describe('Component vnTravelThermographEdit', () => { - let controller; - let $scope; - let $httpBackend; - let $httpParamSerializer; - - beforeEach(ngModule('travel')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { - $scope = $rootScope.$new(); - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - const $element = angular.element(` { - it('should set the travel data and then call setDefaultParams() and getAllowedContentTypes()', () => { - jest.spyOn(controller, 'setDefaultParams'); - jest.spyOn(controller, 'getAllowedContentTypes'); - controller._travel = undefined; - controller.travel = { - id: 3 - }; - - expect(controller.setDefaultParams).toHaveBeenCalledWith(); - expect(controller.travel).toBeDefined(); - expect(controller.getAllowedContentTypes).toHaveBeenCalledWith(); - }); - }); - - describe('setDefaultParams()', () => { - it('should perform a GET query and define the dms property on controller', () => { - const thermographId = 6; - const expectedResponse = { - thermographFk: 6, - result: 'Ok', - dms: { - reference: '123456-01', - warehouseFk: 1, - companyFk: 442, - dmsTypeFk: 3, - description: 'Test' - } - }; - - const filterObj = {include: {relation: 'dms'}}; - const filter = encodeURIComponent(JSON.stringify(filterObj)); - const query = `TravelThermographs/${thermographId}?filter=${filter}`; - $httpBackend.expect('GET', query).respond(expectedResponse); - controller.setDefaultParams(); - $httpBackend.flush(); - - expect(controller.thermograph).toBeDefined(); - expect(controller.thermograph.reference).toEqual('123456-01'); - expect(controller.thermograph.dmsTypeId).toEqual(3); - expect(controller.thermograph.state).toEqual('Ok'); - }); - }); - - describe('onFileChange()', () => { - it('should set dms hasFileAttached property to true if has any files', () => { - const files = [{id: 1, name: 'MyFile'}]; - controller.thermograph = {hasFileAttached: false}; - controller.onFileChange(files); - $scope.$apply(); - - expect(controller.thermograph.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'); - }); - }); - - describe('contentTypesInfo()', () => { - it('should return a description with a list of allowed content types', () => { - controller.allowedContentTypes = ['image/png', 'image/jpg']; - const expectedTypes = controller.allowedContentTypes.join(', '); - - const expectedResult = `Allowed content types: ${expectedTypes}`; - jest.spyOn(controller.$translate, 'instant').mockReturnValue(expectedResult); - - const result = controller.contentTypesInfo; - - expect(result).toEqual(expectedResult); - }); - }); - - describe('onSubmit()', () => { - it('should make an HTTP POST request to save the form data', () => { - jest.spyOn(controller.$.watcher, 'updateOriginalData'); - - const files = [{id: 1, name: 'MyFile'}]; - controller.thermograph = {files}; - const serializedParams = $httpParamSerializer(controller.thermograph); - const query = `travels/${controller.$params.id}/updateThermograph?${serializedParams}`; - - $httpBackend.expect('POST', query).respond({}); - controller.onSubmit(); - $httpBackend.flush(); - }); - }); - }); -}); diff --git a/modules/travel/front/thermograph/edit/style.scss b/modules/travel/front/thermograph/edit/style.scss deleted file mode 100644 index 73f136fc1..000000000 --- a/modules/travel/front/thermograph/edit/style.scss +++ /dev/null @@ -1,7 +0,0 @@ -vn-ticket-request { - .vn-textfield { - margin: 0!important; - max-width: 100px; - } -} - diff --git a/modules/travel/front/thermograph/index/index.html b/modules/travel/front/thermograph/index/index.html deleted file mode 100644 index 4d711613d..000000000 --- a/modules/travel/front/thermograph/index/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -
- - - - - Code - Temperature - State - Destination - Created - - - - - - {{::thermograph.thermographFk}} - {{::thermograph.temperatureFk}} - {{::thermograph.result}} - {{::thermograph.warehouse.name}} - {{::thermograph.created | date: 'dd/MM/yyyy'}} - - - - - - - - - - - - - - - - -
-
- - - - - - - \ No newline at end of file diff --git a/modules/travel/front/thermograph/index/index.js b/modules/travel/front/thermograph/index/index.js deleted file mode 100644 index f8b239cfe..000000000 --- a/modules/travel/front/thermograph/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -import ngModule from '../../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $, vnFile) { - super($element, $); - this.vnFile = vnFile; - this.filter = { - include: - {relation: 'warehouse', - scope: { - fields: ['id', 'name'] - } - } - }; - } - - showDeleteConfirm(index) { - this.thermographIndex = index; - this.$.confirm.show(); - } - - deleteThermograph() { - const data = this.travelThermographs; - const thermographId = data[this.thermographIndex].id; - const query = `Travels/deleteThermograph?id=${thermographId}`; - this.$http.delete(query).then(() => { - this.vnApp.showSuccess(this.$t('Thermograph deleted')); - this.$.model.remove(this.thermographIndex); - this.thermographIndex = null; - }); - } - - downloadFile(dmsId) { - this.vnFile.download(`api/dms/${dmsId}/downloadFile`); - } -} - -Controller.$inject = ['$element', '$scope', 'vnFile']; - -ngModule.vnComponent('vnTravelThermographIndex', { - template: require('./index.html'), - controller: Controller, - require: { - card: '^vnTravelCard' - }, - bindings: { - travel: '<' - } -}); diff --git a/modules/travel/front/thermograph/index/style.scss b/modules/travel/front/thermograph/index/style.scss deleted file mode 100644 index 2c287ed9d..000000000 --- a/modules/travel/front/thermograph/index/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import "variables"; - -vn-route-tickets form{ - margin: 0 auto; - max-width: $width-lg; -} \ No newline at end of file diff --git a/modules/travel/front/thermograph/locale/es.yml b/modules/travel/front/thermograph/locale/es.yml deleted file mode 100644 index 1fdb98c8e..000000000 --- a/modules/travel/front/thermograph/locale/es.yml +++ /dev/null @@ -1,20 +0,0 @@ -Code: Código -Temperature: Temperatura -State: Estado -Destination: Destino -Created: Creado -Remove thermograph: Eliminar termógrafo -Upload file: Subir fichero -Edit file: Editar fichero -Upload: Subir -File: Fichero -TravelFileDescription: Travel id {{travelId}} -ContentTypesInfo: 'Tipos de archivo permitidos: {{allowedContentTypes}}' -Are you sure you want to continue?: ¿Seguro que quieres continuar? -Add thermograph: Añadir termógrafo -Edit thermograph: Editar termógrafo -Thermograph deleted: Termógrafo eliminado -Thermograph: Termógrafo -New thermograph: Nuevo termógrafo -Are you sure you want to remove the thermograph?: ¿Seguro que quieres quitar el termógrafo? -Identifier: Identificador \ No newline at end of file diff --git a/modules/worker/back/locale/worker/en.yml b/modules/worker/back/locale/worker/en.yml index 8438c15cf..ae3053af1 100644 --- a/modules/worker/back/locale/worker/en.yml +++ b/modules/worker/back/locale/worker/en.yml @@ -14,7 +14,6 @@ columns: hasMachineryAuthorized: machinery authorized seniority: seniority isTodayRelative: today relative - isF11Allowed: F11 allowed sectorFk: sector maritalStatus: marital status labelerFk: labeler diff --git a/modules/worker/back/locale/worker/es.yml b/modules/worker/back/locale/worker/es.yml index 96616d7d2..330d266c8 100644 --- a/modules/worker/back/locale/worker/es.yml +++ b/modules/worker/back/locale/worker/es.yml @@ -14,7 +14,6 @@ columns: hasMachineryAuthorized: maquinaria autorizada seniority: antigüedad isTodayRelative: relativo hoy - isF11Allowed: F11 autorizado sectorFk: sector maritalStatus: estado civil labelerFk: etiquetadora diff --git a/modules/worker/back/methods/device/handle-user.js b/modules/worker/back/methods/device/handle-user.js index ac4ff2704..55302c1cb 100644 --- a/modules/worker/back/methods/device/handle-user.js +++ b/modules/worker/back/methods/device/handle-user.js @@ -82,7 +82,7 @@ module.exports = Self => { const getDataOperator = await models.Operator.findOne({ where: {workerFk: user.id}, fields: ['numberOfWagons', 'warehouseFk', 'itemPackingTypeFk', 'sectorFk', 'sector', - 'trainFk', 'train', 'labelerFk', 'printer'], + 'trainFk', 'train', 'labelerFk', 'printer', 'isOnReservationMode'], include: [ { relation: 'sector', diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 568d23b91..b00f8037e 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -55,9 +55,6 @@ "birth": { "type": "date" }, - "isF11Allowed": { - "type": "boolean" - }, "sex": { "type": "string" }, @@ -215,6 +212,74 @@ } } ] + }, + "summary": { + "include": [ + { + "relation": "user", + "scope": { + "fields": [ + "name", + "nickname", + "roleFk" + ], + "include": [ + { + "relation": "role", + "scope": { + "fields": [ + "name" + ] + } + }, + { + "relation": "emailUser", + "scope": { + "fields": [ + "email" + ] + } + } + ] + } + }, + { + "relation": "department", + "scope": { + "include": { + "relation": "department", + "scope": { + "fields": [ + "name" + ] + } + } + } + }, + { + "relation": "boss" + }, + { + "relation": "client" + }, + { + "relation": "sip" + } + ] + }, + "advancedSummary": { + "fields": [ + "id", + "fiDueDate", + "sex", + "seniority", + "fi", + "isFreelance", + "isSsDiscounted", + "hasMachineryAuthorized", + "isDisable", + "birth" + ] } } } diff --git a/modules/zone/back/models/zone.json b/modules/zone/back/models/zone.json index cf7371053..5b25e40d1 100644 --- a/modules/zone/back/models/zone.json +++ b/modules/zone/back/models/zone.json @@ -42,6 +42,9 @@ }, "itemMaxSize": { "type": "number" + }, + "itemMaxLength": { + "type": "number" } }, "relations": { diff --git a/modules/zone/front/basic-data/index.html b/modules/zone/front/basic-data/index.html deleted file mode 100644 index 5070a3aea..000000000 --- a/modules/zone/front/basic-data/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/zone/front/basic-data/index.js b/modules/zone/front/basic-data/index.js deleted file mode 100644 index 402b471fc..000000000 --- a/modules/zone/front/basic-data/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - onSubmit() { - this.$.watcher.submit().then(() => - this.card.reload() - ); - } -} - -ngModule.vnComponent('vnZoneBasicData', { - template: require('./index.html'), - controller: Controller, - bindings: { - zone: '<' - }, - require: { - card: '^vnZoneCard' - } -}); diff --git a/modules/zone/front/calendar/index.html b/modules/zone/front/calendar/index.html deleted file mode 100644 index cfcebf359..000000000 --- a/modules/zone/front/calendar/index.html +++ /dev/null @@ -1,33 +0,0 @@ - -
- - -
- {{$ctrl.firstDay | date:'MMMM'}} - {{$ctrl.firstDay | date:'yyyy'}} - - {{$ctrl.lastDay | date:'MMMM'}} - {{$ctrl.lastDay | date:'yyyy'}} -
- - -
-
- - -
-
\ No newline at end of file diff --git a/modules/zone/front/calendar/index.js b/modules/zone/front/calendar/index.js deleted file mode 100644 index 288a8f328..000000000 --- a/modules/zone/front/calendar/index.js +++ /dev/null @@ -1,191 +0,0 @@ -import ngModule from '../module'; -import Component from 'core/lib/component'; -import './style.scss'; - -class Controller extends Component { - constructor($element, $, vnWeekDays) { - super($element, $); - this.vnWeekDays = vnWeekDays; - this.nMonths = 4; - - let date = Date.vnNew(); - date.setDate(1); - date.setHours(0, 0, 0, 0); - this.date = date; - } - - get date() { - return this._date; - } - - set date(value) { - this._date = value; - let stamp = value.getTime(); - - let firstDay = new Date(stamp); - firstDay.setDate(1); - this.firstDay = firstDay; - - let lastDay = new Date(stamp); - lastDay.setMonth(lastDay.getMonth() + this.nMonths); - lastDay.setDate(0); - this.lastDay = lastDay; - - this.months = []; - for (let i = 0; i < this.nMonths; i++) { - let monthDate = new Date(stamp); - monthDate.setMonth(value.getMonth() + i); - this.months.push(monthDate); - } - - this.refreshEvents(); - } - - step(direction) { - let date = new Date(this.date.getTime()); - date.setMonth(date.getMonth() + (this.nMonths * direction)); - this.date = date; - - this.emit('step'); - } - - get data() { - return this._data; - } - - set data(value) { - this._data = value; - - value = value || {}; - - this.events = value.events; - - function toStamp(date) { - return date && new Date(date).setHours(0, 0, 0, 0); - } - - this.exclusions = {}; - let exclusions = value.exclusions; - - if (exclusions) { - for (let exclusion of exclusions) { - let stamp = toStamp(exclusion.dated); - if (!this.exclusions[stamp]) this.exclusions[stamp] = []; - this.exclusions[stamp].push(exclusion); - } - } - - this.geoExclusions = {}; - let geoExclusions = value.geoExclusions; - - if (geoExclusions) { - for (let geoExclusion of geoExclusions) { - let stamp = toStamp(geoExclusion.dated); - if (!this.geoExclusions[stamp]) this.geoExclusions[stamp] = []; - this.geoExclusions[stamp].push(geoExclusion); - } - } - - let events = value.events; - - if (events) { - for (let event of events) { - event.dated = toStamp(event.dated); - event.ended = toStamp(event.ended); - event.started = toStamp(event.started); - event.wdays = this.vnWeekDays.fromSet(event.weekDays); - } - } - - this.refreshEvents(); - - let calendars = this.element.querySelectorAll('vn-calendar'); - for (let calendar of calendars) - calendar.$ctrl.repaint(); - } - - refreshEvents() { - this.days = {}; - if (!this.data) return; - - let day = new Date(this.firstDay.getTime()); - - while (day <= this.lastDay) { - let stamp = day.getTime(); - let wday = day.getDay(); - let dayEvents = []; - let exclusions = this.exclusions[stamp] || []; - - if (this.events) { - for (let event of this.events) { - let match; - - switch (event.type) { - case 'day': - match = event.dated == stamp; - break; - default: - match = event.wdays[wday] - && (!event.started || stamp >= event.started) - && (!event.ended || stamp <= event.ended); - break; - } - - if (match && !exclusions.find(e => e.zoneFk == event.zoneFk)) - dayEvents.push(event); - } - } - - if (dayEvents.length) - this.days[stamp] = dayEvents; - - day.setDate(day.getDate() + 1); - } - } - - onSelection($event, $days, $type, $weekday) { - let $events = []; - let $exclusions = []; - let $geoExclusions = []; - - for (let day of $days) { - let stamp = day.getTime(); - $events = $events.concat(this.days[stamp] || []); - $exclusions = $exclusions.concat(this.exclusions[stamp] || []); - $geoExclusions = $geoExclusions.concat(this.geoExclusions[stamp] || []); - } - - this.emit('selection', { - $event, - $days, - $type, - $weekday, - $events, - $exclusions, - $geoExclusions - }); - } - - hasEvents(day) { - let stamp = day.getTime(); - return this.days[stamp] || this.exclusions[stamp] || this.geoExclusions[stamp]; - } - - getClass(day) { - let stamp = day.getTime(); - if (this.geoExclusions[stamp]) - return 'geoExcluded'; - else if (this.exclusions[stamp]) - return 'excluded'; - else return ''; - } -} -Controller.$inject = ['$element', '$scope', 'vnWeekDays']; - -ngModule.vnComponent('vnZoneCalendar', { - template: require('./index.html'), - controller: Controller, - bindings: { - data: ' { - let $scope; - let controller; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope) => { - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnZoneCalendar', {$element, $scope}); - controller.$.model = crudModel; - controller.zone = {id: 1}; - controller.days = []; - controller.exclusions = []; - controller.geoExclusions = []; - })); - - describe('date() setter', () => { - it('should set the month property and then call the refreshEvents() method', () => { - jest.spyOn(controller, 'refreshEvents').mockReturnThis(); - - controller.date = Date.vnNew(); - - expect(controller.refreshEvents).toHaveBeenCalledWith(); - expect(controller.months.length).toEqual(4); - }); - }); - - describe('step()', () => { - it('should set the date month to 4 months backwards', () => { - const now = Date.vnNew(); - now.setDate(15); - now.setMonth(now.getMonth() - 4); - - controller.step(-1); - - const expectedMonth = now.getMonth(); - const currentMonth = controller.date.getMonth(); - - expect(currentMonth).toEqual(expectedMonth); - }); - - it('should set the date month to 4 months forwards', () => { - const now = Date.vnNew(); - now.setDate(15); - now.setMonth(now.getMonth() + 4); - - controller.step(1); - - const expectedMonth = now.getMonth(); - const currentMonth = controller.date.getMonth(); - - expect(currentMonth).toEqual(expectedMonth); - }); - }); - - describe('data() setter', () => { - it('should set the events, exclusions and geoExclusions and then call the refreshEvents() method', () => { - jest.spyOn(controller, 'refreshEvents').mockReturnThis(); - - controller.data = { - exclusions: [{ - dated: Date.vnNew() - }], - events: [{ - dated: Date.vnNew() - }], - geoExclusions: [{ - dated: Date.vnNew() - }], - }; - - expect(controller.refreshEvents).toHaveBeenCalledWith(); - expect(controller.events).toBeDefined(); - expect(controller.events.length).toEqual(1); - expect(controller.exclusions).toBeDefined(); - expect(controller.geoExclusions).toBeDefined(); - expect(Object.keys(controller.exclusions).length).toEqual(1); - }); - }); - - describe('refreshEvents()', () => { - it('should fill the days property with the events.', () => { - controller.data = []; - controller.firstDay = Date.vnNew(); - - const lastDay = Date.vnNew(); - lastDay.setDate(lastDay.getDate() + 10); - controller.lastDay = lastDay; - - const firstEventStamp = controller.firstDay.getTime(); - const lastEventStamp = controller.lastDay.getTime(); - controller.events = [{ - type: 'day', - dated: firstEventStamp - }, - { - type: 'day', - dated: lastEventStamp - }]; - - controller.refreshEvents(); - const expectedDays = Object.keys(controller.days); - - expect(expectedDays.length).toEqual(2); - }); - }); - - describe('onSelection()', () => { - it('should call the emit() method', () => { - jest.spyOn(controller, 'emit'); - - const $event = {}; - const $days = [Date.vnNew()]; - const $type = 'day'; - const $weekday = 1; - - controller.onSelection($event, $days, $type, $weekday); - - expect(controller.emit).toHaveBeenCalledWith('selection', - { - $days: $days, - $event: {}, - $events: [], - $exclusions: [], - $type: 'day', - $weekday: 1, - $geoExclusions: [], - } - ); - }); - }); - - describe('hasEvents()', () => { - it('should return true for an existing event on a date', () => { - const dated = Date.vnNew(); - - controller.days[dated.getTime()] = true; - - const result = controller.hasEvents(dated); - - expect(result).toBeTruthy(); - }); - }); - - describe('getClass()', () => { - it('should return the className "excluded" for an excluded date', () => { - const dated = Date.vnNew(); - - controller.exclusions = []; - controller.exclusions[dated.getTime()] = true; - - const result = controller.getClass(dated); - - expect(result).toEqual('excluded'); - }); - - it('should return the className "geoExcluded" for a date with geo excluded', () => { - const dated = Date.vnNew(); - - controller.geoExclusions = []; - controller.geoExclusions[dated.getTime()] = true; - - const result = controller.getClass(dated); - - expect(result).toEqual('geoExcluded'); - }); - }); -}); diff --git a/modules/zone/front/calendar/style.scss b/modules/zone/front/calendar/style.scss deleted file mode 100644 index 38491af58..000000000 --- a/modules/zone/front/calendar/style.scss +++ /dev/null @@ -1,43 +0,0 @@ -@import "variables"; - -vn-zone-calendar { - display: block; - - & > vn-card { - & > .header { - display: flex; - align-items: center; - justify-content: space-between; - background-color: $color-main; - color: white; - font-weight: bold; - height: 45px; - - & > .vn-button { - color: inherit; - height: 100%; - } - } - & > .calendars { - display: flex; - flex-wrap: wrap; - justify-content: space-evenly; - - & > .vn-calendar { - max-width: 288px; - - #days-container .day { - &.event .day-number { - background-color: $color-success; - } - &.excluded .day-number { - background-color: $color-alert; - } - &.geoExcluded .day-number { - background-color: $color-main; - } - } - } - } - } -} \ No newline at end of file diff --git a/modules/zone/front/card/index.html b/modules/zone/front/card/index.html deleted file mode 100644 index ae6a7f10a..000000000 --- a/modules/zone/front/card/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/zone/front/card/index.js b/modules/zone/front/card/index.js deleted file mode 100644 index 4e8ac7e8c..000000000 --- a/modules/zone/front/card/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import ModuleCard from 'salix/components/module-card'; - -class Controller extends ModuleCard { - reload() { - let filter = { - include: { - relation: 'agencyMode', - scope: {fields: ['name']} - } - }; - - this.$http.get(`Zones/${this.$params.id}`, {filter}) - .then(res => this.zone = res.data); - } -} - -ngModule.vnComponent('vnZoneCard', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/card/index.spec.js b/modules/zone/front/card/index.spec.js deleted file mode 100644 index 64127990f..000000000 --- a/modules/zone/front/card/index.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -import './index.js'; - -describe('Zone Component vnZoneCard', () => { - let controller; - let $httpBackend; - let data = {id: 1, name: 'fooName'}; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => { - $httpBackend = _$httpBackend_; - - let $element = angular.element('
'); - controller = $componentController('vnZoneCard', {$element}); - - $stateParams.id = data.id; - $httpBackend.whenRoute('GET', 'Zones/:id').respond(data); - })); - - it('should request data and set it on the controller', () => { - controller.reload(); - $httpBackend.flush(); - - expect(controller.zone).toEqual(data); - }); -}); diff --git a/modules/zone/front/create/index.html b/modules/zone/front/create/index.html deleted file mode 100644 index f8c7df391..000000000 --- a/modules/zone/front/create/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/zone/front/create/index.js b/modules/zone/front/create/index.js deleted file mode 100644 index db337a9a3..000000000 --- a/modules/zone/front/create/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - $onInit() { - this.zone = { - travelingDays: 0, - price: 0.20, - bonus: 0.20, - hour: Date.vnNew() - }; - } - - onSubmit() { - return this.$.watcher.submit().then(res => - this.$state.go('zone.card.location', {id: res.data.id}) - ); - } -} - -ngModule.vnComponent('vnZoneCreate', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/create/index.spec.js b/modules/zone/front/create/index.spec.js deleted file mode 100644 index fe0088225..000000000 --- a/modules/zone/front/create/index.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -import './index'; -import watcher from 'core/mocks/watcher'; - -describe('Zone Component vnZoneCreate', () => { - let $scope; - let $state; - let controller; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope, _$state_) => { - $scope = $rootScope.$new(); - $state = _$state_; - $scope.watcher = watcher; - $scope.watcher.submit = () => { - return { - then: callback => { - callback({data: {id: 1234}}); - } - }; - }; - const $element = angular.element(''); - controller = $componentController('vnZoneCreate', {$element, $scope}); - })); - - describe('onSubmit()', () => { - it(`should call submit() on the watcher then expect a callback`, () => { - jest.spyOn($state, 'go'); - - controller.zone = { - name: 'Zone One' - }; - - controller.onSubmit(); - - expect(controller.$state.go).toHaveBeenCalledWith('zone.card.location', Object({id: 1234})); - }); - }); -}); - diff --git a/modules/zone/front/create/locale/es.yml b/modules/zone/front/create/locale/es.yml deleted file mode 100644 index 4827ced37..000000000 --- a/modules/zone/front/create/locale/es.yml +++ /dev/null @@ -1,3 +0,0 @@ -Traveling days: Días de viaje -Closing hour: Hora de cierre -Bonus: Bonificación \ No newline at end of file diff --git a/modules/zone/front/delivery-days/index.html b/modules/zone/front/delivery-days/index.html deleted file mode 100644 index c47d89982..000000000 --- a/modules/zone/front/delivery-days/index.html +++ /dev/null @@ -1,102 +0,0 @@ -
- - -
- -
- - - - - - -
- {{code}} {{town.name}} -
-
- {{town.province.name}}, {{town.province.country.name}} -
-
-
- - - -
-
- - - -
-
Zones
- - - - - - Id - Name - Agency - Closing - Price - - - - - - {{::zone.id}} - {{::zone.name}} - {{::zone.agencyModeName}} - {{::zone.hour | date: 'HH:mm'}} - {{::zone.price | currency: 'EUR':2}} - - - - - - - - - - - -
-
- - - \ No newline at end of file diff --git a/modules/zone/front/delivery-days/index.js b/modules/zone/front/delivery-days/index.js deleted file mode 100644 index 71e8c8ab7..000000000 --- a/modules/zone/front/delivery-days/index.js +++ /dev/null @@ -1,95 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - $onInit() { - this.setParams(); - } - - $postLink() { - this.deliveryMethodFk = 'delivery'; - } - - setParams() { - const hasParams = this.$params.deliveryMethodFk || this.$params.geoFk || this.$params.agencyModeFk; - if (hasParams) { - if (this.$params.deliveryMethodFk) - this.deliveryMethodFk = this.$params.deliveryMethodFk; - - if (this.$params.geoFk) - this.geoFk = this.$params.geoFk; - - if (this.$params.agencyModeFk) - this.agencyModeFk = this.$params.agencyModeFk; - - this.fetchData(); - } - } - - fetchData() { - const params = { - deliveryMethodFk: this.deliveryMethodFk, - geoFk: this.geoFk, - agencyModeFk: this.agencyModeFk - }; - this.$.data = null; - this.$http.get(`Zones/getEvents`, {params}) - .then(res => { - let data = res.data; - this.$.data = data; - if (!data.events.length) - this.vnApp.showMessage(this.$t('No service for the specified zone')); - - this.$state.go(this.$state.current.name, params); - }); - } - - get deliveryMethodFk() { - return this._deliveryMethodFk; - } - - set deliveryMethodFk(value) { - this._deliveryMethodFk = value; - - let filter; - - if (value === 'pickUp') - filter = {where: {code: 'PICKUP'}}; - else - filter = {where: {code: {inq: ['DELIVERY', 'AGENCY']}}}; - - this.$http.get(`DeliveryMethods`, {filter}).then(res => { - const deliveryMethods = res.data.map(deliveryMethod => deliveryMethod.id); - this.agencyFilter = {deliveryMethodFk: {inq: deliveryMethods}}; - }); - } - - onSelection($event, $events, $days) { - if (!$events.length) return; - - const day = $days[0]; - const zoneIds = []; - for (let event of $events) - zoneIds.push(event.zoneFk); - - const params = { - zoneIds: zoneIds, - date: day - }; - - this.$http.post(`Zones/getZoneClosing`, params) - .then(res => this.zoneClosing = res.data) - .then(() => this.$.zoneEvents.show($event.target)); - } - - preview(zone) { - this.selectedZone = zone; - this.$.summary.show(); - } -} - -ngModule.vnComponent('vnZoneDeliveryDays', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/delivery-days/index.spec.js b/modules/zone/front/delivery-days/index.spec.js deleted file mode 100644 index 28705880c..000000000 --- a/modules/zone/front/delivery-days/index.spec.js +++ /dev/null @@ -1,126 +0,0 @@ -import './index.js'; -import popover from 'core/mocks/popover'; -import crudModel from 'core/mocks/crud-model'; - -describe('Zone Component vnZoneDeliveryDays', () => { - let $httpBackend; - let controller; - let $element; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $element = angular.element(' { - it('should set the deliveryMethodFk property as pickup and then perform a query that sets the filter', () => { - $httpBackend.expect('GET', 'DeliveryMethods').respond([{id: 999}]); - controller.deliveryMethodFk = 'pickUp'; - $httpBackend.flush(); - - expect(controller.agencyFilter).toEqual({deliveryMethodFk: {inq: [999]}}); - }); - }); - - describe('setParams()', () => { - it('should do nothing when no params are received', () => { - controller.setParams(); - - expect(controller.deliveryMethodFk).toBeUndefined(); - expect(controller.geoFk).toBeUndefined(); - expect(controller.agencyModeFk).toBeUndefined(); - }); - - it('should set the controller properties when the params are provided', () => { - controller.$params = { - deliveryMethodFk: 3, - geoFk: 2, - agencyModeFk: 1 - }; - controller.setParams(); - - expect(controller.deliveryMethodFk).toEqual(controller.$params.deliveryMethodFk); - expect(controller.geoFk).toEqual(controller.$params.geoFk); - expect(controller.agencyModeFk).toEqual(controller.$params.agencyModeFk); - }); - }); - - describe('fetchData()', () => { - it('should make an HTTP GET query and then call the showMessage() method', () => { - jest.spyOn(controller.vnApp, 'showMessage'); - jest.spyOn(controller.$state, 'go'); - - controller.agencyModeFk = 1; - controller.deliveryMethodFk = 2; - controller.geoFk = 3; - controller.$state.current.name = 'myState'; - - const expectedData = {events: []}; - - const url = 'Zones/getEvents?agencyModeFk=1&deliveryMethodFk=2&geoFk=3'; - - $httpBackend.when('GET', 'DeliveryMethods').respond([]); - $httpBackend.expect('GET', url).respond({events: []}); - controller.fetchData(); - $httpBackend.flush(); - - expect(controller.$.data).toEqual(expectedData); - expect(controller.vnApp.showMessage).toHaveBeenCalledWith('No service for the specified zone'); - expect(controller.$state.go).toHaveBeenCalledWith( - controller.$state.current.name, - { - agencyModeFk: 1, - deliveryMethodFk: 2, - geoFk: 3 - } - ); - }); - }); - - describe('onSelection()', () => { - it('should not call the show popover method if events array is empty', () => { - jest.spyOn(controller.$.zoneEvents, 'show'); - - const event = new Event('click'); - const target = document.createElement('div'); - target.dispatchEvent(event); - const events = []; - controller.onSelection(event, events); - - expect(controller.$.zoneEvents.show).not.toHaveBeenCalled(); - }); - - it('should call the show() method and call getZoneClosing() with the expected ids', () => { - jest.spyOn(controller.$.zoneEvents, 'show'); - - const event = new Event('click'); - const target = document.createElement('div'); - target.dispatchEvent(event); - - const day = Date.vnNew(); - const events = [ - {zoneFk: 1}, - {zoneFk: 2}, - {zoneFk: 8} - ]; - const params = { - zoneIds: [1, 2, 8], - date: [day][0] - }; - const response = [{id: 1, hour: ''}]; - - $httpBackend.when('POST', 'Zones/getZoneClosing', params).respond({response}); - controller.onSelection(event, events, [day]); - $httpBackend.flush(); - - expect(controller.$.zoneEvents.show).toHaveBeenCalledWith(target); - expect(controller.zoneClosing.id).toEqual(response.id); - }); - }); -}); diff --git a/modules/zone/front/delivery-days/style.scss b/modules/zone/front/delivery-days/style.scss deleted file mode 100644 index 3dd4abb7c..000000000 --- a/modules/zone/front/delivery-days/style.scss +++ /dev/null @@ -1,36 +0,0 @@ -@import "variables"; - -vn-zone-delivery-days { - vn-zone-calendar { - display: flex; - justify-content: center; - flex-wrap: wrap; - - & > vn-calendar { - min-width: 264px; - } - } - form { - display: flex; - flex-direction: column; - } -} - -.zoneEvents { - width: 700px; - max-height: 450px; - - vn-data-viewer { - margin-bottom: 0; - vn-pagination { - padding: 0 - } - } - - & > .header { - background-color: $color-main; - color: white; - font-weight: bold; - text-align: center - } -} \ No newline at end of file diff --git a/modules/zone/front/descriptor-popover/index.html b/modules/zone/front/descriptor-popover/index.html deleted file mode 100644 index 7e4e8f5d8..000000000 --- a/modules/zone/front/descriptor-popover/index.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/modules/zone/front/descriptor-popover/index.js b/modules/zone/front/descriptor-popover/index.js deleted file mode 100644 index a21232e41..000000000 --- a/modules/zone/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('vnZoneDescriptorPopover', { - slotTemplate: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/descriptor/index.html b/modules/zone/front/descriptor/index.html deleted file mode 100644 index a3432a99d..000000000 --- a/modules/zone/front/descriptor/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - Delete - - - Clone - - - -
- - - - - - - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/modules/zone/front/descriptor/index.js b/modules/zone/front/descriptor/index.js deleted file mode 100644 index 3f4863a60..000000000 --- a/modules/zone/front/descriptor/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import ngModule from '../module'; -import Descriptor from 'salix/components/descriptor'; - -class Controller extends Descriptor { - get zone() { - return this.entity; - } - - set zone(value) { - this.entity = value; - } - - loadData() { - const filter = { - include: [ - { - relation: 'agencyMode', - scope: { - fields: ['name'], - } - } - ] - }; - - return this.getData(`Zones/${this.id}`, {filter}) - .then(res => this.entity = res.data); - } - - onDelete() { - const $t = this.$translate.instant; - const today = Date.vnNew(); - today.setHours(0, 0, 0, 0); - const filter = {where: {zoneFk: this.id, shipped: {gte: today}}}; - this.$http.get(`Tickets`, {filter}).then(res => { - const ticketsAmount = res.data.length; - if (ticketsAmount) { - const params = {ticketsAmount}; - const question = $t('This zone contains tickets', params, null, null, 'sanitizeParameters'); - this.$.deleteZone.question = question; - this.$.deleteZone.show(); - } else - this.deleteZone(); - }); - } - - deleteZone() { - return this.$http.post(`Zones/${this.id}/deleteZone`).then(() => { - this.$state.go('zone.index'); - this.vnApp.showSuccess(this.$t('Zone deleted')); - }); - } - - onCloneAccept() { - return this.$http.post(`Zones/${this.id}/clone`). - then(res => this.$state.go('zone.card.basicData', {id: res.data.id})); - } -} - -ngModule.vnComponent('vnZoneDescriptor', { - template: require('./index.html'), - controller: Controller, - bindings: { - zone: '<' - } -}); diff --git a/modules/zone/front/descriptor/index.spec.js b/modules/zone/front/descriptor/index.spec.js deleted file mode 100644 index 435a1d00f..000000000 --- a/modules/zone/front/descriptor/index.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -import './index.js'; - -describe('Zone descriptor', () => { - let $httpBackend; - let controller; - let $element; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $element = angular.element(' {}, - show: () => {} - }; - })); - - describe('onDelete()', () => { - it('should make an HTTP POST query and then call the deleteZone show() method', () => { - jest.spyOn(controller.$.deleteZone, 'show'); - - const expectedData = [{id: 16}]; - $httpBackend.when('GET', 'Tickets').respond(expectedData); - controller.onDelete(); - $httpBackend.flush(); - - expect(controller.$.deleteZone.show).toHaveBeenCalledWith(); - }); - - it('should make an HTTP POST query and then call the deleteZone() method', () => { - jest.spyOn(controller, 'deleteZone').mockReturnThis(); - - const expectedData = []; - $httpBackend.when('GET', 'Tickets').respond(expectedData); - controller.onDelete(); - $httpBackend.flush(); - - expect(controller.deleteZone).toHaveBeenCalledWith(); - }); - }); - - describe('deleteZone()', () => { - it('should make an HTTP POST query and then call the showMessage() method', () => { - jest.spyOn(controller.$state, 'go').mockReturnThis(); - jest.spyOn(controller.vnApp, 'showSuccess'); - - const stateName = 'zone.index'; - $httpBackend.when('POST', 'Zones/1/deleteZone').respond(200); - controller.deleteZone(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith(stateName); - expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Zone deleted'); - }); - }); - - describe('onCloneAccept()', () => { - it('should make an HTTP POST query and then call the state go() method', () => { - jest.spyOn(controller.$state, 'go').mockReturnThis(); - - const stateName = 'zone.card.basicData'; - const expectedData = {id: 1}; - $httpBackend.when('POST', 'Zones/1/clone').respond(expectedData); - controller.onCloneAccept(); - $httpBackend.flush(); - - expect(controller.$state.go).toHaveBeenCalledWith(stateName, expectedData); - }); - }); -}); diff --git a/modules/zone/front/descriptor/locale/es.yml b/modules/zone/front/descriptor/locale/es.yml deleted file mode 100644 index 0581ee93a..000000000 --- a/modules/zone/front/descriptor/locale/es.yml +++ /dev/null @@ -1,4 +0,0 @@ -This zone contains tickets: Esta zona contiene {{ticketsAmount}} tickets por servir. ¿Seguro que quieres eliminar esta zona? -Do you want to clone this zone?: ¿Quieres clonar esta zona? -All it's properties will be copied: Todas sus propiedades serán copiadas -Zone deleted: Zona eliminada \ No newline at end of file diff --git a/modules/zone/front/events/index.html b/modules/zone/front/events/index.html deleted file mode 100644 index 157b2a669..000000000 --- a/modules/zone/front/events/index.html +++ /dev/null @@ -1,277 +0,0 @@ - - - -
-
- Edit mode -
- - - - - - -
-
- Events -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-
-
-
- - - - - - - -
diff --git a/modules/zone/front/events/index.js b/modules/zone/front/events/index.js deleted file mode 100644 index b86330126..000000000 --- a/modules/zone/front/events/index.js +++ /dev/null @@ -1,316 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $, vnWeekDays) { - super($element, $); - this.vnWeekDays = vnWeekDays; - this.editMode = 'include'; - } - - $onInit() { - this.refresh(); - } - - get path() { - return `Zones/${this.$params.id}/events`; - } - - get exclusionsPath() { - return `Zones/${this.$params.id}/exclusions`; - } - - get checked() { - const geos = this.$.model.data || []; - const checkedLines = []; - for (let geo of geos) { - if (geo.checked) - checkedLines.push(geo); - } - return checkedLines; - } - - refresh() { - this.$.data = null; - this.$.$applyAsync(() => { - const params = { - zoneFk: this.$params.id, - started: this.$.calendar.firstDay, - ended: this.$.calendar.lastDay - }; - - this.$http.get(`Zones/getEventsFiltered`, {params}).then(res => { - const data = res.data; - this.$.data = data; - }); - }); - } - - formatWdays(weekDays) { - if (!weekDays) return; - - let abrWdays = weekDays - .split(',') - .map(wday => this.vnWeekDays.map[wday].localeAbr); - - return abrWdays.length < 7 - ? abrWdays.join(', ') - : this.$t('Everyday'); - } - - onSelection(days, type, weekday, events, exclusions, exclusionGeos) { - if (this.editMode == 'include') { - if (events.length) - return this.editInclusion(events[0]); - return this.createInclusion(type, days, weekday); - } else if (this.editMode == 'exclude') { - if (exclusions.length || exclusionGeos.length) - return this.editExclusion(exclusions[0] || {}, exclusionGeos); - return this.createExclusion(days); - } - } - - editExclusion(exclusion, exclusionGeos) { - this.isNew = false; - this.excludeSelected = angular.copy(exclusion); - this.excludeSelected.type = exclusionGeos.length ? - 'specificLocations' : 'all'; - - this.exclusionGeos = new Set(); - if (exclusionGeos.length) { - this.excludeSelected.id = exclusionGeos[0].zoneExclusionFk; - exclusionGeos.forEach(x => this.exclusionGeos.add(x.geoFk)); - } - - this.$.excludeDialog.show(); - } - - createExclusion(days) { - this.isNew = true; - this.excludeSelected = { - type: 'all', - dated: days[0] - }; - this.exclusionGeos = new Set(); - this.$.excludeDialog.show(); - } - - onEditClick(row, event) { - if (event.defaultPrevented) return; - this.editInclusion(row); - } - - editInclusion(row) { - this.isNew = false; - this.selected = angular.copy(row); - this.selected.wdays = this.vnWeekDays.fromSet(row.weekDays); - this.$.includeDialog.show(); - } - - createInclusion(type, days, weekday) { - this.isNew = true; - - if (type == 'weekday') { - let wdays = []; - if (weekday) wdays[weekday] = true; - - this.selected = { - type: 'indefinitely', - wdays - }; - } else { - this.selected = { - type: 'day', - dated: days[0] - }; - } - - this.$.includeDialog.show(); - } - - onIncludeResponse(response) { - switch (response) { - case 'accept': { - let selected = this.selected; - let type = selected.type; - - selected.weekDays = this.vnWeekDays.toSet(selected.wdays); - - if (type == 'day') - selected.weekDays = ''; - else - selected.dated = null; - - if (type != 'range') { - selected.started = null; - selected.ended = null; - } - - let req; - - if (this.isNew) - req = this.$http.post(this.path, selected); - else - req = this.$http.put(`${this.path}/${selected.id}`, selected); - - return req.then(() => { - this.selected = null; - this.isNew = null; - this.refresh(); - }); - } - case 'delete': - return this.onDelete(this.selected.id) - .then(response => response == 'accept'); - } - } - - onExcludeResponse(response) { - const type = this.excludeSelected.type; - switch (response) { - case 'accept': { - if (type == 'all') - return this.exclusionCreate(); - return this.exclusionGeoCreate(); - } - case 'delete': - return this.exclusionDelete(this.excludeSelected); - } - } - - onDeleteClick(id, event) { - if (event.defaultPrevented) return; - event.preventDefault(); - this.onDelete(id); - } - - onDelete(id) { - return this.$.confirm.show( - response => this.onDeleteResponse(response, id)); - } - - onDeleteResponse(response, id) { - if (response != 'accept' || !id) return; - return this.$http.delete(`${this.path}/${id}`) - .then(() => this.refresh()); - } - - exclusionCreate() { - const excludeSelected = this.excludeSelected; - const dated = excludeSelected.dated; - let req; - - if (this.isNew) - req = this.$http.post(this.exclusionsPath, [{dated}]); - if (!this.isNew) - req = this.$http.put(`${this.exclusionsPath}/${excludeSelected.id}`, {dated}); - - return req.then(() => { - this.refresh(); - }); - } - - exclusionGeoCreate() { - const excludeSelected = this.excludeSelected; - let req; - const geoIds = []; - this.exclusionGeos.forEach(id => geoIds.push(id)); - - if (this.isNew) { - const params = { - zoneFk: parseInt(this.$params.id), - date: excludeSelected.dated, - geoIds - }; - req = this.$http.post(`Zones/exclusionGeo`, params); - } else { - const params = { - zoneExclusionFk: this.excludeSelected.id, - geoIds - }; - req = this.$http.post(`Zones/updateExclusionGeo`, params); - } - return req.then(() => this.refresh()); - } - - exclusionDelete(exclusion) { - const path = `${this.exclusionsPath}/${exclusion.id}`; - return this.$http.delete(path) - .then(() => this.refresh()); - } - - set excludeSearch(value) { - this._excludeSearch = value; - if (!value) this.onSearch(); - } - - get excludeSearch() { - return this._excludeSearch; - } - - onKeyDown(event) { - if (event.key == 'Enter') { - event.preventDefault(); - this.onSearch(); - } - } - - onSearch() { - const params = {search: this._excludeSearch}; - if (this.excludeSelected.type == 'specificLocations') { - this.$.model.applyFilter({}, params).then(() => { - const data = this.$.model.data; - this.getChecked(data); - this.$.treeview.data = data; - }); - } - } - - onFetch(item) { - const params = item ? {parentId: item.id} : null; - return this.$.model.applyFilter({}, params).then(() => { - const data = this.$.model.data; - this.getChecked(data); - return data; - }); - } - - onSort(a, b) { - if (b.selected !== a.selected) { - if (a.selected == null) - return 1; - if (b.selected == null) - return -1; - return b.selected - a.selected; - } - - return a.name.localeCompare(b.name); - } - - getChecked(data) { - for (let geo of data) { - geo.checked = this.exclusionGeos.has(geo.id); - if (geo.childs) this.getChecked(geo.childs); - } - } - - onItemCheck(geoId, checked) { - if (checked) - this.exclusionGeos.add(geoId); - else - this.exclusionGeos.delete(geoId); - } -} -Controller.$inject = ['$element', '$scope', 'vnWeekDays']; - -ngModule.vnComponent('vnZoneEvents', { - template: require('./index.html'), - controller: Controller, - bindings: { - zone: '<' - }, - require: { - card: '^vnZoneCard' - } -}); diff --git a/modules/zone/front/events/index.spec.js b/modules/zone/front/events/index.spec.js deleted file mode 100644 index 558d97b6f..000000000 --- a/modules/zone/front/events/index.spec.js +++ /dev/null @@ -1,340 +0,0 @@ -import './index'; -import crudModel from 'core/mocks/crud-model'; - -describe('component vnZoneEvents', () => { - let $scope; - let controller; - let $httpBackend; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnZoneEvents', {$element, $scope}); - controller.$params = {id: 1}; - })); - - describe('refresh()', () => { - it('should set the zone and then call both getSummary() and getWarehouses()', () => { - const date = '2021-10-01'; - - controller.$params.id = 999; - controller.$.calendar = { - firstDay: date, - lastDay: date - }; - - const params = { - zoneFk: controller.$params.id, - started: date, - ended: date - }; - - const query = `Zones/getEventsFiltered?ended=${date}&started=${date}&zoneFk=${params.zoneFk}`; - const response = { - events: 'myEvents', - exclusions: 'myExclusions', - geoExclusions: 'myGeoExclusions', - }; - $httpBackend.whenGET(query).respond(response); - controller.refresh(); - $httpBackend.flush(); - - const data = controller.$.data; - - expect(data.events).toBeDefined(); - expect(data.exclusions).toBeDefined(); - }); - }); - - describe('onSelection()', () => { - it('should call the editInclusion() method', () => { - jest.spyOn(controller, 'editInclusion').mockReturnThis(); - - const weekday = {}; - const days = []; - const type = 'EventType'; - const events = [{name: 'Event'}]; - const exclusions = []; - const exclusionsGeo = []; - controller.editMode = 'include'; - controller.onSelection(days, type, weekday, events, exclusions, exclusionsGeo); - - expect(controller.editInclusion).toHaveBeenCalledWith({name: 'Event'}); - }); - - it('should call the createInclusion() method', () => { - jest.spyOn(controller, 'createInclusion').mockReturnThis(); - - const weekday = {dated: Date.vnNew()}; - const days = [weekday]; - const type = 'EventType'; - const events = []; - const exclusions = []; - const exclusionsGeo = []; - controller.editMode = 'include'; - controller.onSelection(days, type, weekday, events, exclusions, exclusionsGeo); - - expect(controller.createInclusion).toHaveBeenCalledWith(type, days, weekday); - }); - - it('should call the editExclusion() method with exclusions', () => { - jest.spyOn(controller, 'editExclusion').mockReturnThis(); - - const weekday = {}; - const days = []; - const type = 'EventType'; - const events = []; - const exclusions = [{name: 'Exclusion'}]; - const exclusionsGeo = []; - controller.editMode = 'exclude'; - controller.onSelection(days, type, weekday, events, exclusions, exclusionsGeo); - - expect(controller.editExclusion).toHaveBeenCalled(); - }); - - it('should call the editExclusion() method with exclusionsGeo', () => { - jest.spyOn(controller, 'editExclusion').mockReturnThis(); - - const weekday = {}; - const days = []; - const type = 'EventType'; - const events = []; - const exclusions = []; - const exclusionsGeo = [{name: 'GeoExclusion'}]; - controller.editMode = 'exclude'; - controller.onSelection(days, type, weekday, events, exclusions, exclusionsGeo); - - expect(controller.editExclusion).toHaveBeenCalled(); - }); - - it('should call the createExclusion() method', () => { - jest.spyOn(controller, 'createExclusion').mockReturnThis(); - - const weekday = {}; - const days = [{dated: Date.vnNew()}]; - const type = 'EventType'; - const events = []; - const exclusions = []; - const exclusionsGeo = []; - controller.editMode = 'exclude'; - controller.onSelection(days, type, weekday, events, exclusions, exclusionsGeo); - - expect(controller.createExclusion).toHaveBeenCalledWith(days); - }); - }); - - describe('editExclusion()', () => { - it('shoud set the excludeSelected.type = "specificLocations" and then call the excludeDialog show() method', () => { - controller.$.excludeDialog = {show: jest.fn()}; - - const exclusionGeos = [{id: 1}]; - const exclusions = []; - - controller.editExclusion(exclusions, exclusionGeos); - - expect(controller.excludeSelected.type).toEqual('specificLocations'); - expect(controller.$.excludeDialog.show).toHaveBeenCalledWith(); - }); - - it('shoud set the excludeSelected.type = "all" and then call the excludeDialog show() method', () => { - controller.$.excludeDialog = {show: jest.fn()}; - - const exclusionGeos = []; - const exclusions = [{id: 1}]; - - controller.editExclusion(exclusions, exclusionGeos); - - expect(controller.excludeSelected.type).toEqual('all'); - expect(controller.$.excludeDialog.show).toHaveBeenCalledWith(); - }); - }); - - describe('createExclusion()', () => { - it('shoud set the excludeSelected property and then call the excludeDialog show() method', () => { - controller.$.excludeDialog = {show: jest.fn()}; - - const days = [Date.vnNew()]; - controller.createExclusion(days); - - expect(controller.excludeSelected).toBeDefined(); - expect(controller.isNew).toBeTruthy(); - expect(controller.$.excludeDialog.show).toHaveBeenCalledWith(); - }); - }); - - describe('createInclusion()', () => { - it('shoud set the selected property and then call the includeDialog show() method', () => { - controller.$.includeDialog = {show: jest.fn()}; - - const type = 'weekday'; - const days = [Date.vnNew()]; - const weekday = 1; - controller.createInclusion(type, days, weekday); - - const selection = controller.selected; - const firstWeekday = selection.wdays[weekday]; - - expect(selection.type).toEqual('indefinitely'); - expect(firstWeekday).toBeTruthy(); - expect(controller.isNew).toBeTruthy(); - expect(controller.$.includeDialog.show).toHaveBeenCalledWith(); - }); - - it('shoud set the selected property with the first day and then call the includeDialog show() method', () => { - controller.$.includeDialog = {show: jest.fn()}; - - const type = 'nonListedType'; - const days = [Date.vnNew()]; - const weekday = 1; - controller.createInclusion(type, days, weekday); - - const selection = controller.selected; - - expect(selection.type).toEqual('day'); - expect(selection.dated).toEqual(days[0]); - expect(controller.isNew).toBeTruthy(); - expect(controller.$.includeDialog.show).toHaveBeenCalledWith(); - }); - }); - - describe('onIncludeResponse()', () => { - it('shoud call the onDelete() method', () => { - jest.spyOn(controller, 'onDelete').mockReturnValue( - new Promise(accept => accept()) - ); - - controller.selected = {id: 1}; - controller.onIncludeResponse('delete'); - - expect(controller.onDelete).toHaveBeenCalledWith(1); - }); - - it('shoud make an HTTP POST query to create a new one and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - controller.selected = {id: 1}; - controller.isNew = true; - - $httpBackend.when('POST', `Zones/1/events`).respond(200); - controller.onIncludeResponse('accept'); - $httpBackend.flush(); - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - - it('shoud make an HTTP PUT query and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - controller.selected = {id: 1}; - controller.isNew = false; - - const eventId = 1; - $httpBackend.when('PUT', `Zones/1/events/${eventId}`).respond(200); - controller.onIncludeResponse('accept'); - $httpBackend.flush(); - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('onExcludeResponse()', () => { - it('should call the exclusionCreate() method', () => { - jest.spyOn(controller, 'exclusionCreate').mockReturnThis(); - - controller.excludeSelected = {type: 'all'}; - controller.onExcludeResponse('accept'); - - expect(controller.exclusionCreate).toHaveBeenCalledWith(); - }); - - it('should call the exclusionGeoCreate() method', () => { - jest.spyOn(controller, 'exclusionGeoCreate').mockReturnThis(); - - controller.excludeSelected = {type: 'specificLocations'}; - controller.onExcludeResponse('accept'); - - expect(controller.exclusionGeoCreate).toHaveBeenCalledWith(); - }); - - it('should call the exclusionDelete() method', () => { - jest.spyOn(controller, 'exclusionDelete').mockReturnThis(); - - controller.excludeSelected = {id: 1, type: 'all'}; - controller.onExcludeResponse('delete'); - - expect(controller.exclusionDelete).toHaveBeenCalledWith(controller.excludeSelected); - }); - }); - - describe('onDeleteResponse()', () => { - it('shoud make an HTTP DELETE query and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - const eventId = 1; - $httpBackend.expect('DELETE', `Zones/1/events/1`).respond({id: 1}); - controller.onDeleteResponse('accept', eventId); - $httpBackend.flush(); - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('exclusionCreate()', () => { - it('shoud make an HTTP POST query and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - controller.excludeSelected = {}; - controller.isNew = true; - $httpBackend.expect('POST', `Zones/1/exclusions`).respond({id: 1}); - controller.exclusionCreate(); - $httpBackend.flush(); - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('exclusionDelete()', () => { - it('shoud make an HTTP DELETE query once and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - const exclusions = {id: 1}; - const firstExclusionId = 1; - $httpBackend.expectDELETE(`Zones/1/exclusions/${firstExclusionId}`).respond(200); - controller.exclusionDelete(exclusions); - $httpBackend.flush(); - - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('onSearch()', () => { - it('should call the applyFilter() method and then set the data', () => { - jest.spyOn(controller, 'getChecked').mockReturnValue([1, 2, 3]); - - controller.$.treeview = {}; - controller.$.model = crudModel; - controller.excludeSelected = {type: 'specificLocations'}; - controller._excludeSearch = 'es'; - - controller.onSearch(); - const treeviewData = controller.$.treeview.data; - - expect(treeviewData).toBeDefined(); - expect(treeviewData.length).toEqual(3); - }); - }); - - describe('onFetch()', () => { - it('should call the applyFilter() method and then return the model data', () => { - jest.spyOn(controller, 'getChecked').mockReturnValue([1, 2, 3]); - - controller.$.model = crudModel; - const result = controller.onFetch(); - - expect(result.length).toEqual(3); - }); - }); -}); diff --git a/modules/zone/front/events/locale/es.yml b/modules/zone/front/events/locale/es.yml deleted file mode 100644 index d6eee9f67..000000000 --- a/modules/zone/front/events/locale/es.yml +++ /dev/null @@ -1,12 +0,0 @@ -Edit mode: Modo de edición -Include: Incluir -Exclude: Excluir -Events: Eventos -Add event: Añadir evento -Edit event: Editar evento -All: Todo -Specific locations: Localizaciones concretas -Locations where it is not distributed: Localizaciones en las que no se reparte -You must select a location: Debes seleccionar una localización -Add exclusion: Añadir exclusión -Edit exclusion: Editar exclusión diff --git a/modules/zone/front/events/style.scss b/modules/zone/front/events/style.scss deleted file mode 100644 index 49a6e87a6..000000000 --- a/modules/zone/front/events/style.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import "variables"; - - .width{ - width: 600px - } - - .treeview{ - max-height: 300px; - overflow: auto; - } - diff --git a/modules/zone/front/index.js b/modules/zone/front/index.js index dc20eea47..a7209a0bd 100644 --- a/modules/zone/front/index.js +++ b/modules/zone/front/index.js @@ -1,19 +1,3 @@ export * from './module'; import './main'; -import './index/'; -import './delivery-days'; -import './summary'; -import './card'; -import './descriptor'; -import './descriptor-popover'; -import './search-panel'; -import './create'; -import './basic-data'; -import './warehouses'; -import './events'; -import './calendar'; -import './location'; -import './calendar'; -import './upcoming-deliveries'; -import './log'; diff --git a/modules/zone/front/index/index.html b/modules/zone/front/index/index.html deleted file mode 100644 index 78e3f2cd8..000000000 --- a/modules/zone/front/index/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - Id - Name - Agency - Closing - Price - - - - - - {{::zone.id}} - {{::zone.name}} - {{::zone.agencyMode.name}} - {{::zone.hour | date: 'HH:mm'}} - {{::zone.price | currency: 'EUR':2}} - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/zone/front/index/index.js b/modules/zone/front/index/index.js deleted file mode 100644 index ad54f7df4..000000000 --- a/modules/zone/front/index/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(zone) { - this.selectedZone = zone; - this.$.summary.show(); - } - - onCloneAccept(zone) { - return this.$http.post(`Zones/${zone.id}/clone`) - .then(res => { - this.$state.go('zone.card.basicData', {id: res.data.id}); - }); - } -} - -ngModule.vnComponent('vnZoneIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/index/locale/es.yml b/modules/zone/front/index/locale/es.yml deleted file mode 100644 index 14195e869..000000000 --- a/modules/zone/front/index/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Do you want to clone this zone?: ¿Seguro que quieres clonar esta zona? -All it's properties will be copied: Todas sus propiedades serán copiadas \ No newline at end of file diff --git a/modules/zone/front/locale/es.yml b/modules/zone/front/locale/es.yml index 7c9e783ab..4d528f37a 100644 --- a/modules/zone/front/locale/es.yml +++ b/modules/zone/front/locale/es.yml @@ -13,7 +13,7 @@ Indefinitely: Indefinido Inflation: Inflación Locations: Localizaciones Maximum m³: M³ máximo -Max m³: Medida máxima +Max m³: Medida máxima New zone: Nueva zona One day: Un día Pick up: Recogida @@ -32,4 +32,4 @@ Warehouses: Almacenes Week days: Días de la semana Zones: Zonas zone: zona -Go to the zone: Ir a la zona \ No newline at end of file +Go to the zone: Ir a la zona diff --git a/modules/zone/front/location/index.html b/modules/zone/front/location/index.html deleted file mode 100644 index b86c618b7..000000000 --- a/modules/zone/front/location/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - -
- - - - - - -
diff --git a/modules/zone/front/location/index.js b/modules/zone/front/location/index.js deleted file mode 100644 index 0f92f37de..000000000 --- a/modules/zone/front/location/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - onSearch(params) { - this.$.model.applyFilter({}, params).then(() => { - const data = this.$.model.data; - this.$.treeview.data = data; - }); - } - - onFetch(item) { - const params = item ? {parentId: item.id} : null; - return this.$.model.applyFilter({}, params) - .then(() => this.$.model.data); - } - - onSort(a, b) { - if (b.selected !== a.selected) { - if (a.selected == null) - return 1; - if (b.selected == null) - return -1; - return b.selected - a.selected; - } - - return a.name.localeCompare(b.name); - } - - exprBuilder(param, value) { - switch (param) { - case 'search': - return {name: {like: `%${value}%`}}; - } - } - - onSelection(value, item) { - if (value == null) - value = undefined; - const params = {geoId: item.id, isIncluded: value}; - const path = `zones/${this.zone.id}/toggleIsIncluded`; - this.$http.post(path, params); - } -} - -ngModule.vnComponent('vnZoneLocation', { - template: require('./index.html'), - controller: Controller, - bindings: { - zone: '<' - }, - require: { - card: '^vnZoneCard' - } -}); diff --git a/modules/zone/front/location/index.spec.js b/modules/zone/front/location/index.spec.js deleted file mode 100644 index 30968209c..000000000 --- a/modules/zone/front/location/index.spec.js +++ /dev/null @@ -1,50 +0,0 @@ -import './index'; -import crudModel from 'core/mocks/crud-model'; - -describe('component vnZoneLocation', () => { - let $scope; - let controller; - let $httpBackend; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnZoneLocation', {$element, $scope}); - controller.$.model = crudModel; - controller.zone = {id: 1}; - })); - - describe('onSearch()', () => { - it('should call the applyFilter() method and then set the data', () => { - controller.$.treeview = {}; - controller.onSearch({}); - - const treeviewData = controller.$.treeview.data; - - expect(treeviewData).toBeDefined(); - expect(treeviewData.length).toEqual(3); - }); - }); - - describe('onFetch()', () => { - it('should call the applyFilter() method and then return the model data', () => { - const result = controller.onFetch(); - - expect(result.length).toEqual(3); - }); - }); - - describe('onSelection()', () => { - it('should make an HTTP POST query', () => { - const item = {id: 123}; - - const expectedParams = {geoId: 123, isIncluded: true}; - $httpBackend.expect('POST', `zones/1/toggleIsIncluded`, expectedParams).respond(200); - controller.onSelection(true, item); - $httpBackend.flush(); - }); - }); -}); diff --git a/modules/zone/front/location/style.scss b/modules/zone/front/location/style.scss deleted file mode 100644 index 24d685a51..000000000 --- a/modules/zone/front/location/style.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "variables"; - -vn-zone-location { - vn-treeview-child { - .content > .vn-check:not(.indeterminate):not(.checked) { - color: $color-alert; - - & > .btn { - border-color: $color-alert; - } - } - .content > .vn-check.checked { - color: $color-notice; - - & > .btn { - background-color: $color-notice; - border-color: $color-notice - } - } - } -} diff --git a/modules/zone/front/log/index.html b/modules/zone/front/log/index.html deleted file mode 100644 index 539afda82..000000000 --- a/modules/zone/front/log/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/modules/zone/front/log/index.js b/modules/zone/front/log/index.js deleted file mode 100644 index 8c3be2423..000000000 --- a/modules/zone/front/log/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -ngModule.vnComponent('vnZoneLog', { - template: require('./index.html'), - controller: Section, -}); diff --git a/modules/zone/front/main/index.html b/modules/zone/front/main/index.html index 8dd6cdf78..e69de29bb 100644 --- a/modules/zone/front/main/index.html +++ b/modules/zone/front/main/index.html @@ -1,19 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/zone/front/main/index.js b/modules/zone/front/main/index.js index 3be60c5a1..38896d418 100644 --- a/modules/zone/front/main/index.js +++ b/modules/zone/front/main/index.js @@ -4,25 +4,10 @@ import ModuleMain from 'salix/components/module-main'; export default class Zone extends ModuleMain { constructor($element, $) { super($element, $); - this.filter = { - include: { - relation: 'agencyMode', - scope: {fields: ['name']} - } - }; } - - exprBuilder(param, value) { - switch (param) { - case 'search': - return /^\d+$/.test(value) - ? {id: value} - : {name: {like: `%${value}%`}}; - case 'name': - return {[param]: {like: `%${value}%`}}; - case 'agencyModeFk': - return {[param]: value}; - } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`zone/`); } } diff --git a/modules/zone/front/main/index.spec.js b/modules/zone/front/main/index.spec.js deleted file mode 100644 index 1e50cee80..000000000 --- a/modules/zone/front/main/index.spec.js +++ /dev/null @@ -1,30 +0,0 @@ -import './index.js'; - -describe('Zone Component vnZone', () => { - let controller; - - beforeEach(ngModule('zone')); - - beforeEach(inject($componentController => { - const $element = angular.element(''); - controller = $componentController('vnZone', {$element}); - })); - - describe('exprBuilder()', () => { - it('should return a formated object with the id in case of search', () => { - let param = 'search'; - let value = 1; - let result = controller.exprBuilder(param, value); - - expect(result).toEqual({id: 1}); - }); - - it('should return a formated object with the agencyModeFk in case of agencyModeFk', () => { - let param = 'agencyModeFk'; - let value = 'My Delivery'; - let result = controller.exprBuilder(param, value); - - expect(result).toEqual({agencyModeFk: 'My Delivery'}); - }); - }); -}); diff --git a/modules/zone/front/routes.json b/modules/zone/front/routes.json index 7f67260da..a4993007d 100644 --- a/modules/zone/front/routes.json +++ b/modules/zone/front/routes.json @@ -7,15 +7,6 @@ "menus": { "main": [ {"state": "zone.index", "icon": "icon-zone"}, - {"state": "zone.deliveryDays", "icon": "today"}, - {"state": "zone.upcomingDeliveries", "icon": "today"} - ], - "card": [ - {"state": "zone.card.basicData", "icon": "settings"}, - {"state": "zone.card.location", "icon": "my_location"}, - {"state": "zone.card.warehouses", "icon": "home"}, - {"state": "zone.card.log", "icon": "history"}, - {"state": "zone.card.events", "icon": "today"} ] }, "keybindings": [ @@ -34,79 +25,6 @@ "state": "zone.index", "component": "vn-zone-index", "description": "Zones" - }, - { - "url": "/delivery-days?q&deliveryMethodFk&geoFk&agencyModeFk", - "state": "zone.deliveryDays", - "component": "vn-zone-delivery-days", - "description": "Delivery days" - }, - { - "url": "/upcoming-deliveries", - "state": "zone.upcomingDeliveries", - "component": "vn-upcoming-deliveries", - "description": "Upcoming deliveries" - }, - { - "url": "/create", - "state": "zone.create", - "component": "vn-zone-create", - "description": "New zone" - }, - { - "url": "/:id", - "state": "zone.card", - "component": "vn-zone-card", - "abstract": true, - "description": "Detail" - }, - { - "url": "/summary", - "state": "zone.card.summary", - "component": "vn-zone-summary", - "description": "Summary", - "params": { - "zone": "$ctrl.zone" - } - }, - { - "url": "/basic-data", - "state": "zone.card.basicData", - "component": "vn-zone-basic-data", - "description": "Basic data", - "params": { - "zone": "$ctrl.zone" - } - }, - { - "url": "/warehouses", - "state": "zone.card.warehouses", - "component": "vn-zone-warehouses", - "description": "Warehouses" - }, - { - "url": "/events?q", - "state": "zone.card.events", - "component": "vn-zone-events", - "description": "Calendar", - "params": { - "zone": "$ctrl.zone" - } - }, - { - "url": "/location?q", - "state": "zone.card.location", - "component": "vn-zone-location", - "description": "Locations", - "params": { - "zone": "$ctrl.zone" - } - }, - { - "url" : "/log", - "state": "zone.card.log", - "component": "vn-zone-log", - "description": "Log" } ] -} \ No newline at end of file +} diff --git a/modules/zone/front/search-panel/index.html b/modules/zone/front/search-panel/index.html deleted file mode 100644 index bda8a946e..000000000 --- a/modules/zone/front/search-panel/index.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
- - - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/modules/zone/front/search-panel/index.js b/modules/zone/front/search-panel/index.js deleted file mode 100644 index 598af02b2..000000000 --- a/modules/zone/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('vnZoneSearchPanel', { - template: require('./index.html'), - controller: SearchPanel -}); diff --git a/modules/zone/front/summary/index.html b/modules/zone/front/summary/index.html deleted file mode 100644 index 2fe94388f..000000000 --- a/modules/zone/front/summary/index.html +++ /dev/null @@ -1,59 +0,0 @@ - -
- - - - #{{$ctrl.summary.id}} - {{$ctrl.summary.name}} -
- - - - - - - - - - - - - - - - - - - - - - -

- - Warehouse - -

- - - - Name - - - - - {{zoneWarehouse.warehouse.name}} - - - -
-
-
\ No newline at end of file diff --git a/modules/zone/front/summary/index.js b/modules/zone/front/summary/index.js deleted file mode 100644 index ad33f28be..000000000 --- a/modules/zone/front/summary/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import ngModule from '../module'; -import Summary from 'salix/components/summary'; - -class Controller extends Summary { - get zone() { - return this._zone; - } - - set zone(value) { - this._zone = value; - - if (!value) return; - - this.getSummary(); - this.getWarehouses(); - } - - getSummary() { - const params = { - filter: { - include: { - relation: 'agencyMode', - fields: ['name'] - }, - where: { - id: this.zone.id - } - } - }; - this.$http.get(`Zones/findOne`, {params}).then(res => { - this.summary = res.data; - }); - } - - getWarehouses() { - const params = { - filter: { - include: { - relation: 'warehouse', - fields: ['name'] - } - } - }; - this.$http.get(`Zones/${this.zone.id}/warehouses`, {params}).then(res => { - this.zoneWarehouses = res.data; - }); - } -} - -ngModule.vnComponent('vnZoneSummary', { - template: require('./index.html'), - controller: Controller, - bindings: { - zone: '<' - } -}); diff --git a/modules/zone/front/summary/index.spec.js b/modules/zone/front/summary/index.spec.js deleted file mode 100644 index 7541ee795..000000000 --- a/modules/zone/front/summary/index.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -import './index'; - -describe('component vnZoneSummary', () => { - let $scope; - let controller; - let $httpBackend; - let $httpParamSerializer; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnZoneSummary', {$element, $scope}); - })); - - describe('zone setter', () => { - it('should set the zone and then call both getSummary() and getWarehouses()', () => { - jest.spyOn(controller, 'getSummary'); - jest.spyOn(controller, 'getWarehouses'); - - controller.zone = {id: 1}; - - expect(controller.getSummary).toHaveBeenCalledWith(); - expect(controller.getWarehouses).toHaveBeenCalledWith(); - }); - }); - - describe('getSummary()', () => { - it('should perform a get and then store data on the controller', () => { - controller._zone = {id: 1}; - let params = { - filter: { - include: { - relation: 'agencyMode', - fields: ['name'] - }, - where: { - id: controller._zone.id - } - } - }; - const serializedParams = $httpParamSerializer(params); - const query = `Zones/findOne?${serializedParams}`; - $httpBackend.expectGET(query).respond({id: 1}); - controller.getSummary(); - $httpBackend.flush(); - - expect(controller.summary).toBeDefined(); - }); - }); - - describe('getWarehouses()', () => { - it('should make an HTTP get query and then store data on the controller', () => { - controller._zone = {id: 1}; - const params = { - filter: { - include: { - relation: 'warehouse', - fields: ['name'] - } - } - }; - - const serializedParams = $httpParamSerializer(params); - const query = `Zones/1/warehouses?${serializedParams}`; - $httpBackend.expect('GET', query).respond([{id: 1}]); - controller.getWarehouses(); - $httpBackend.flush(); - - expect(controller.zoneWarehouses.length).toEqual(1); - }); - }); -}); diff --git a/modules/zone/front/upcoming-deliveries/index.html b/modules/zone/front/upcoming-deliveries/index.html deleted file mode 100644 index afcd0bbc6..000000000 --- a/modules/zone/front/upcoming-deliveries/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -
- -
{{$ctrl.getWeekDay(detail.shipped)}} - {{detail.shipped | date: 'dd/MM/yyyy'}}
-
- - - - Province - Closing - Id - - - - - {{::zone.name}} - {{::zone.hour}} - {{::zone.zoneFk}} - - - -
-
-
diff --git a/modules/zone/front/upcoming-deliveries/index.js b/modules/zone/front/upcoming-deliveries/index.js deleted file mode 100644 index 371321711..000000000 --- a/modules/zone/front/upcoming-deliveries/index.js +++ /dev/null @@ -1,23 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; -import './style.scss'; - -class Controller extends Section { - constructor($element, $, vnWeekDays) { - super($element, $); - this.days = vnWeekDays.days; - } - - getWeekDay(jsonDate) { - const weekDay = new Date(jsonDate).getDay(); - - return this.days[weekDay].locale; - } -} - -Controller.$inject = ['$element', '$scope', 'vnWeekDays']; - -ngModule.vnComponent('vnUpcomingDeliveries', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/upcoming-deliveries/index.spec.js b/modules/zone/front/upcoming-deliveries/index.spec.js deleted file mode 100644 index 95eb999f9..000000000 --- a/modules/zone/front/upcoming-deliveries/index.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -import './index'; - -describe('component vnUpcomingDeliveries', () => { - let $scope; - let controller; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, $rootScope) => { - $scope = $rootScope.$new(); - const $element = angular.element(``); - controller = $componentController('vnUpcomingDeliveries', {$element, $scope}); - })); - - describe('getWeekDay()', () => { - it('should retrieve a weekday for a json passed', () => { - let jsonDate = '1970-01-01T22:00:00.000Z'; - - expect(controller.getWeekDay(jsonDate)).toEqual('Thursday'); - }); - }); -}); diff --git a/modules/zone/front/upcoming-deliveries/locale/es.yml b/modules/zone/front/upcoming-deliveries/locale/es.yml deleted file mode 100644 index 9f08e3a72..000000000 --- a/modules/zone/front/upcoming-deliveries/locale/es.yml +++ /dev/null @@ -1,3 +0,0 @@ -Family: Familia -Percentage: Porcentaje -Dwindle: Mermas \ No newline at end of file diff --git a/modules/zone/front/upcoming-deliveries/style.scss b/modules/zone/front/upcoming-deliveries/style.scss deleted file mode 100644 index b52231a09..000000000 --- a/modules/zone/front/upcoming-deliveries/style.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import "variables"; - -vn-upcoming-deliveries { - .header { - margin-bottom: 16px; - text-transform: uppercase; - font-size: 1.25rem; - line-height: 1; - padding: 7px; - padding-bottom: 7px; - padding-bottom: 4px; - font-weight: lighter; - background-color: $color-main-light; - border-bottom: 1px solid $color-primary; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - background-color: $color-bg; - } - - vn-table vn-th.waste-family, - vn-table vn-td.waste-family { - max-width: 64px; - width: 64px - } -} \ No newline at end of file diff --git a/modules/zone/front/warehouses/index.html b/modules/zone/front/warehouses/index.html deleted file mode 100644 index acd85f182..000000000 --- a/modules/zone/front/warehouses/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - {{::row.warehouse.name}} - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/zone/front/warehouses/index.js b/modules/zone/front/warehouses/index.js deleted file mode 100644 index 85b398658..000000000 --- a/modules/zone/front/warehouses/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - $onInit() { - this.refresh(); - } - - get path() { - return `Zones/${this.$params.id}/warehouses`; - } - - refresh() { - let filter = {include: 'warehouse'}; - this.$http.get(this.path, {params: {filter}}) - .then(res => this.$.data = res.data); - } - - onCreate() { - this.selected = {}; - this.$.dialog.show(); - } - - onSave() { - this.$http.post(this.path, this.selected) - .then(() => { - this.selected = null; - this.isNew = null; - this.$.dialog.hide(); - this.refresh(); - }); - - return false; - } - - onDelete(row) { - this.$.confirm.show(); - this.deleteRow = row; - } - - delete() { - let row = this.deleteRow; - if (!row) return; - return this.$http.delete(`${this.path}/${row.id}`) - .then(() => { - let index = this.$.data.indexOf(row); - if (index !== -1) this.$.data.splice(index, 1); - this.deleteRow = null; - }); - } -} - -ngModule.vnComponent('vnZoneWarehouses', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/zone/front/warehouses/index.spec.js b/modules/zone/front/warehouses/index.spec.js deleted file mode 100644 index 0e71d541c..000000000 --- a/modules/zone/front/warehouses/index.spec.js +++ /dev/null @@ -1,60 +0,0 @@ -import './index.js'; - -describe('Zone warehouses', () => { - let $httpBackend; - let $httpParamSerializer; - let controller; - let $element; - - beforeEach(ngModule('zone')); - - beforeEach(inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => { - $httpBackend = _$httpBackend_; - $httpParamSerializer = _$httpParamSerializer_; - $element = angular.element(' { - it('should make an HTTP GET query and then set the data', () => { - const params = {filter: {include: 'warehouse'}}; - const serializedParams = $httpParamSerializer(params); - const path = `Zones/1/warehouses?${serializedParams}`; - $httpBackend.expect('GET', path).respond([{id: 1, name: 'Warehouse one'}]); - controller.refresh(); - $httpBackend.flush(); - - expect(controller.$.data).toBeDefined(); - }); - }); - - describe('onSave()', () => { - it('should make an HTTP POST query and then call the refresh() method', () => { - jest.spyOn(controller, 'refresh').mockReturnThis(); - - $httpBackend.expect('POST', `Zones/1/warehouses`).respond(200); - controller.onSave(); - $httpBackend.flush(); - - expect(controller.selected).toBeNull(); - expect(controller.isNew).toBeNull(); - expect(controller.$.dialog.hide).toHaveBeenCalledWith(); - expect(controller.refresh).toHaveBeenCalledWith(); - }); - }); - - describe('delete()', () => { - it('should make an HTTP DELETE query and then set deleteRow property to null value', () => { - controller.deleteRow = {id: 1}; - controller.$.data = [{id: 1}]; - $httpBackend.expect('DELETE', `Zones/1/warehouses/1`).respond(200); - controller.delete(); - $httpBackend.flush(); - - expect(controller.deleteRow).toBeNull(); - }); - }); -}); diff --git a/myt.config.yml b/myt.config.yml index 663b1aec2..25f94f1bd 100755 --- a/myt.config.yml +++ b/myt.config.yml @@ -69,6 +69,7 @@ fixtures: - siiTypeInvoiceOut - state - ticketUpdateAction + - ticketCanAdvanceConfig - volumeConfig - workCenter - workerTimeControlError diff --git a/package.json b/package.json index 2ae7c3764..8f9670903 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "24.40.0", + "version": "24.42.0", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", diff --git a/print/templates/reports/previa-label/previa-label.html b/print/templates/reports/previa-label/previa-label.html index 1dc9b14d0..68042e978 100644 --- a/print/templates/reports/previa-label/previa-label.html +++ b/print/templates/reports/previa-label/previa-label.html @@ -19,7 +19,7 @@
{{previa.itemPackingTypeFk}}
{{previa.shippingHour}}:{{previa.shippingMinute}}
-
{{previa.items}}
+
{{previa.previousLines}}