From 3428dfa6e00d3629a9ec6eca61dc05d841fa193c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 11 Dec 2019 15:01:01 +0100 Subject: [PATCH 1/6] Migration complete & test --- db/Dockerfile | 39 +++++++++---------- .../10081-agency/01-zone_getWarehouse.sql | 7 ++-- db/docker.cnf | 4 -- db/{ => docker}/docker-boot.sh | 0 db/docker/docker-init.sh | 17 ++++++++ db/{ => docker}/docker-start.sh | 0 db/docker/docker.cnf | 10 +++++ db/dump/fixtures.sql | 3 ++ db/dump/mysqlPlugins.sql | 2 +- .../06-claim-module/02_development.spec.js | 6 +-- .../common/methods/vn-model/getSetValues.js | 36 ++++++++--------- .../vn-model/specs/getSetValues.spec.js | 7 ---- .../worker-calendar/specs/absences.spec.js | 22 +++++++++-- 13 files changed, 89 insertions(+), 64 deletions(-) delete mode 100644 db/docker.cnf rename db/{ => docker}/docker-boot.sh (100%) create mode 100755 db/docker/docker-init.sh rename db/{ => docker}/docker-start.sh (100%) create mode 100644 db/docker/docker.cnf diff --git a/db/Dockerfile b/db/Dockerfile index bedcf75d6..c376e6893 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,4 +1,4 @@ -FROM mysql:5.6.42 +FROM mysql:8.0.18 ENV MYSQL_ROOT_PASSWORD root ENV TZ Europe/Madrid @@ -7,36 +7,33 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends curl ca-certificates \ && curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \ - && echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \ + && echo "deb http://apt.verdnatura.es/ stretch main" > /etc/apt/sources.list.d/vn.list \ && apt-get update \ - && apt-get install -y --allow-unauthenticated vn-mysql \ + && apt-get install -y vn-mysql libmysqlclient21 \ && apt-get purge -y --auto-remove curl ca-certificates \ && rm -rf /var/lib/apt/lists/* -# XXX: Removes the last script line to avoid daemon to be started -RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-init.sh \ - && sed -i '$ d' /usr/local/bin/docker-init.sh - -WORKDIR /docker-entrypoint-initdb.d -ARG STAMP=unknown - -COPY import-changes.sh config.ini /docker-entrypoint-initdb.d/import/ -COPY docker.cnf /etc/mysql/mysql.conf.d/ -COPY changes /docker-entrypoint-initdb.d/import/changes - -COPY docker-boot.sh /docker-entrypoint-initdb.d/ -COPY dump /docker-entrypoint-initdb.d/dump +COPY docker/docker.cnf /etc/mysql/conf.d/ +COPY docker/docker-init.sh docker/docker-start.sh /usr/local/bin/ RUN mkdir /mysql-data \ - && /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \ - && chown -R mysql:mysql /mysql-data \ + && chown -R mysql:mysql /mysql-data + +WORKDIR /docker-entrypoint-initdb.d + +COPY dump dump +COPY docker/docker-boot.sh /docker-entrypoint-initdb.d/ +COPY changes import/changes +COPY import-changes.sh config.ini import/ + +ARG STAMP=unknown +RUN gosu mysql docker-init.sh mysqld \ && rm -rf /docker-entrypoint-initdb.d/* -COPY docker-start.sh /usr/local/bin/ +USER mysql ENTRYPOINT ["docker-start.sh"] -USER mysql -CMD ["mysqld", "--datadir", "/mysql-data"] +CMD ["mysqld"] #HEALTHCHECK --interval=5s --timeout=10s --retries=200 \ # CMD mysqladmin ping -h 127.0.0.1 -u root || exit 1 diff --git a/db/changes/10081-agency/01-zone_getWarehouse.sql b/db/changes/10081-agency/01-zone_getWarehouse.sql index 838c225f8..28478e2cc 100644 --- a/db/changes/10081-agency/01-zone_getWarehouse.sql +++ b/db/changes/10081-agency/01-zone_getWarehouse.sql @@ -6,8 +6,8 @@ USE `vn`$$ CREATE DEFINER=`root`@`%` PROCEDURE `zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT) BEGIN /** -* Devuelve el listado de agencias disponibles para la fecha, - * dirección y warehouse pasadas + * Devuelve el listado de agencias disponibles para la fecha, + * dirección y almacén pasados. * * @param vAddress * @param vWarehouse warehouse @@ -30,7 +30,8 @@ BEGIN JOIN agencyMode am ON am.id = z.agencyModeFk JOIN zoneWarehouse zw ON zw.zoneFk = zo.zoneFk WHERE zw.warehouseFk - GROUP BY z.agencyModeFk; + GROUP BY z.agencyModeFk + ORDER BY agencyMode; DROP TEMPORARY TABLE tmp.zone, diff --git a/db/docker.cnf b/db/docker.cnf deleted file mode 100644 index 2b593b972..000000000 --- a/db/docker.cnf +++ /dev/null @@ -1,4 +0,0 @@ -[mysqld] -innodb_log_file_size = 4M -innodb_autoextend_increment = 4 -innodb_page_size = 8K \ No newline at end of file diff --git a/db/docker-boot.sh b/db/docker/docker-boot.sh similarity index 100% rename from db/docker-boot.sh rename to db/docker/docker-boot.sh diff --git a/db/docker/docker-init.sh b/db/docker/docker-init.sh new file mode 100755 index 000000000..19d13a15d --- /dev/null +++ b/db/docker/docker-init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +. /usr/local/bin/docker-entrypoint.sh + +mysql_check_config "$@" +docker_setup_env "$@" +docker_create_db_directories + +docker_verify_minimum_env +docker_init_database_dir "$@" +docker_temp_server_start "$@" +docker_setup_db + +docker_process_init_files /docker-entrypoint-initdb.d/* + +mysql_expire_root_user +docker_temp_server_stop diff --git a/db/docker-start.sh b/db/docker/docker-start.sh similarity index 100% rename from db/docker-start.sh rename to db/docker/docker-start.sh diff --git a/db/docker/docker.cnf b/db/docker/docker.cnf new file mode 100644 index 000000000..1a0241487 --- /dev/null +++ b/db/docker/docker.cnf @@ -0,0 +1,10 @@ +[mysqld] +innodb_log_file_size = 4M +innodb_autoextend_increment = 4 +innodb_page_size = 8K +innodb_default_row_format = COMPACT +log_bin_trust_function_creators = ON +datadir = /mysql-data +sql_mode = NO_ENGINE_SUBSTITUTION +innodb_temp_data_file_path = /tmp/ibtmp1:12M:autoextend +skip-log-bin diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 4fc94e59e..cb810fa1c 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1,10 +1,13 @@ -- FIXME: cuando se eliminen los procedimientos de la cache, se podra eliminar esta linea CREATE SCHEMA IF NOT EXISTS `vn2008`; +CREATE SCHEMA IF NOT EXISTS `tmp`; +ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root'; ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1; ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1; ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1; +ALTER TABLE `vn`.`ticket` AUTO_INCREMENT = 1; INSERT INTO `vn`.`ticketConfig` (`id`, `scopeDays`) VALUES diff --git a/db/dump/mysqlPlugins.sql b/db/dump/mysqlPlugins.sql index 861db4afe..c3b6f6ee4 100644 --- a/db/dump/mysqlPlugins.sql +++ b/db/dump/mysqlPlugins.sql @@ -1,4 +1,4 @@ -- Import compiled functions CREATE AGGREGATE FUNCTION minacum RETURNS INT SONAME 'minacum.so'; -CREATE AGGREGATE FUNCTION multimax RETURNS INT SONAME 'multimax.so'; \ No newline at end of file +CREATE AGGREGATE FUNCTION multimax RETURNS INT SONAME 'multimax.so'; diff --git a/e2e/paths/06-claim-module/02_development.spec.js b/e2e/paths/06-claim-module/02_development.spec.js index 7df38e945..7ee94497f 100644 --- a/e2e/paths/06-claim-module/02_development.spec.js +++ b/e2e/paths/06-claim-module/02_development.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -describe('Claim development', () => { +fdescribe('Claim development', () => { const nightmare = createNightmare(); beforeAll(() => { @@ -116,16 +116,12 @@ describe('Claim development', () => { const responsible = await nightmare .waitToGetProperty(`${selectors.claimDevelopment.secondClaimResponsibleAutocomplete} input`, 'value'); - const worker = await nightmare - .waitToGetProperty(`${selectors.claimDevelopment.secondClaimWorkerAutocomplete} input`, 'value'); - const redelivery = await nightmare .waitToGetProperty(`${selectors.claimDevelopment.secondClaimRedeliveryAutocomplete} input`, 'value'); expect(reason).toEqual('Prisas'); expect(result).toEqual('Otros daños'); expect(responsible).toEqual('Compradores'); - expect(worker).toEqual('managerNick'); expect(redelivery).toEqual('Cliente'); }); }); diff --git a/loopback/common/methods/vn-model/getSetValues.js b/loopback/common/methods/vn-model/getSetValues.js index 74403e65c..ac6485d3c 100644 --- a/loopback/common/methods/vn-model/getSetValues.js +++ b/loopback/common/methods/vn-model/getSetValues.js @@ -1,3 +1,5 @@ +const UserError = require('vn-loopback/util/user-error'); + module.exports = Self => { /** * Returns a set of allowed values defined on table scheme @@ -7,7 +9,6 @@ module.exports = Self => { Self.getSetValues = async function(column) { let model = this.app.models[this.modelName].definition; let properties = model.properties; - let columnName; let tableName = this.modelName; let schema = null; @@ -17,35 +18,32 @@ module.exports = Self => { schema = tableSplit.pop() || null; } - if (properties[column]) { - columnName = column; + let property = properties[column]; - if (properties[column].mysql) - columnName = properties[column].mysql.columnName; - } + if (!property) + throw new UserError(`Column does not exist`); - let findColumn = Object.keys(properties).find(prop => { - return properties[prop].mysql && properties[prop].mysql.columnName === column; - }); + let columnName = property.mysql + ? property.mysql.columnName + : column; - if (findColumn) - columnName = properties[findColumn].mysql.columnName; - - let type = await this.rawSql( - `SELECT DISTINCT column_type FROM information_schema.columns + let columnInfo = await this.rawSql( + `SELECT column_type columnType + FROM information_schema.columns WHERE table_name = ? AND table_schema = IFNULL(?, DATABASE()) AND column_name = ?`, [tableName, schema, columnName] ); - if (!type) return; + if (!columnInfo || !columnInfo[0]) + throw new UserError(`Cannot fetch column values`); let setValues; - setValues = type[0].column_type; - setValues = setValues.replace(/set\((.*)\)/i, '$1'); - setValues = setValues.replace(/'/g, ''); - setValues = setValues.match(new RegExp(/(\w+)+/, 'ig')); + setValues = columnInfo[0].columnType + .replace(/^set\((.*)\)$/i, '$1') + .replace(/'/g, '') + .match(new RegExp(/(\w+)+/, 'ig')); let values = []; setValues.forEach(setValue => { diff --git a/loopback/common/methods/vn-model/specs/getSetValues.spec.js b/loopback/common/methods/vn-model/specs/getSetValues.spec.js index d14a9113f..cd64697c9 100644 --- a/loopback/common/methods/vn-model/specs/getSetValues.spec.js +++ b/loopback/common/methods/vn-model/specs/getSetValues.spec.js @@ -13,11 +13,4 @@ describe('Model getSetValues()', () => { expect(result.length).toEqual(6); expect(result[5].value).toEqual('TABLET_VN'); }); - - it('should return an array of set values from table column source_app', async() => { - let result = await app.models.Order.getSetValues('source_app'); - - expect(result.length).toEqual(6); - expect(result[5].value).toEqual('TABLET_VN'); - }); }); diff --git a/modules/worker/back/methods/worker-calendar/specs/absences.spec.js b/modules/worker/back/methods/worker-calendar/specs/absences.spec.js index 6cc204e28..a306d9e39 100644 --- a/modules/worker/back/methods/worker-calendar/specs/absences.spec.js +++ b/modules/worker/back/methods/worker-calendar/specs/absences.spec.js @@ -34,7 +34,11 @@ describe('Worker absences()', () => { let workerFk = 106; let worker = await app.models.WorkerLabour.findById(workerFk); let endedDate = worker.ended; - await worker.updateAttributes({ended: null}); + + await app.models.WorkerLabour.rawSql( + `UPDATE postgresql.business SET date_end = ? WHERE business_id = ?`, + [null, worker.businessFk] + ); let ctx = {req: {accessToken: {userId: 9}}}; @@ -63,7 +67,10 @@ describe('Worker absences()', () => { expect(sixthType).toEqual('Holidays'); // restores the contract end date - await worker.updateAttributes({ended: endedDate}); + await app.models.WorkerLabour.rawSql( + `UPDATE postgresql.business SET date_end = ? WHERE business_id = ?`, + [endedDate, worker.businessFk] + ); }); it('should give the same holidays as worked days since the holidays amount matches the amount of days in a year', async() => { @@ -112,7 +119,10 @@ describe('Worker absences()', () => { startingContract.setMonth(today.getMonth()); startingContract.setDate(1); - await contract.updateAttributes({started: startingContract}); + await app.models.WorkerLabour.rawSql( + `UPDATE postgresql.business SET date_start = ? WHERE business_id = ?`, + [startingContract, contract.businessFk] + ); let ctx = {req: {accessToken: {userId: 106}}}; let workerFk = 106; @@ -148,6 +158,10 @@ describe('Worker absences()', () => { days: originalHolidaysValue } ); - await contract.updateAttributes({started: contractStartDate}); + + await app.models.WorkerLabour.rawSql( + `UPDATE postgresql.business SET date_start = ? WHERE business_id = ?`, + [contractStartDate, contract.businessFk] + ); }); }); From 34bbf16e14eb26276a6898f19d182fdc7d48ea55 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 11 Dec 2019 15:01:27 +0100 Subject: [PATCH 2/6] Focus removed from test --- e2e/paths/06-claim-module/02_development.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/paths/06-claim-module/02_development.spec.js b/e2e/paths/06-claim-module/02_development.spec.js index 7ee94497f..2c6edcabb 100644 --- a/e2e/paths/06-claim-module/02_development.spec.js +++ b/e2e/paths/06-claim-module/02_development.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -fdescribe('Claim development', () => { +describe('Claim development', () => { const nightmare = createNightmare(); beforeAll(() => { From e8c216799c05e4fff9653c583faca5e2a53d8098 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 12 Dec 2019 14:28:58 +0100 Subject: [PATCH 3/6] update estructure --- db/dump/fixtures.sql | 12 +- db/dump/structure.sql | 3261 ++++----------------------------------- db/export-structure.sh | 78 + loopback/locale/es.json | 3 +- 4 files changed, 412 insertions(+), 2942 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 927afe743..e2d146c27 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1499,13 +1499,13 @@ INSERT INTO `vn`.`ticketServiceType`(`id`, `name`) (4, 'Cargo FITOSANITARIO'), (5, 'Documentos'); -INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`) +INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`, `ticketServiceTypeFk`) VALUES - (1, 'Documentos', 1, 2.00, 1, 1), - (2, 'Porte Agencia', 1, 10.00, 1, 2), - (3, 'Documentos', 1, 5.50, 1, 11), - (4, 'Documentos', 1, 2.00, 1, 9), - (5, 'Documentos', 1, 2.00, 1, 8); + (1, 'Documentos', 1, 2.00, 1, 1, 1), + (2, 'Porte Agencia', 1, 10.00, 1, 2, 1), + (3, 'Documentos', 1, 5.50, 1, 11, 1), + (4, 'Documentos', 1, 2.00, 1, 9, 1), + (5, 'Documentos', 1, 2.00, 1, 8, 1); INSERT INTO `pbx`.`sip`(`user_id`, `extension`) VALUES diff --git a/db/dump/structure.sql b/db/dump/structure.sql index 3ae27c752..46992d055 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -365,7 +365,7 @@ CREATE TABLE `user` ( KEY `nickname` (`nickname`), KEY `lang` (`lang`), CONSTRAINT `user_ibfk_2` FOREIGN KEY (`role`) REFERENCES `role` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=16982 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users'; +) ENGINE=InnoDB AUTO_INCREMENT=17013 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -1923,7 +1923,7 @@ CREATE TABLE `XDiario_ALL` ( KEY `Cuenta` (`SUBCTA`), KEY `empresa` (`empresa_id`), KEY `Fecha` (`Fecha`) -) ENGINE=InnoDB AUTO_INCREMENT=15200321 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=16385456 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1977,7 +1977,7 @@ CREATE TABLE `analisis_ventas` ( `Importe` double NOT NULL, PRIMARY KEY (`id`), KEY `Año` (`Año`,`Semana`) -) ENGINE=InnoDB AUTO_INCREMENT=120136075 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=122429800 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2279,22 +2279,6 @@ CREATE TABLE `facturacion_media_anual` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `last_Id_Cubo` --- - -DROP TABLE IF EXISTS `last_Id_Cubo`; -/*!50001 DROP VIEW IF EXISTS `last_Id_Cubo`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `last_Id_Cubo` AS SELECT - 1 AS `Id_Compra`, - 1 AS `Id_Article`, - 1 AS `warehouse_id`, - 1 AS `Id_Cubo`, - 1 AS `Packing`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `lastaction` -- @@ -2458,7 +2442,7 @@ CREATE TABLE `rutasBoard` ( KEY `rutasBoard_ix1` (`year`), KEY `rutasBoard_ix2` (`month`), KEY `rutasBoard_ix3` (`warehouse_id`) -) ENGINE=InnoDB AUTO_INCREMENT=202289 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=204333 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2543,35 +2527,6 @@ CREATE TABLE `tarifa_warehouse` ( ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los valores de gasto por almacen'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `v_clientes_jerarquia` --- - -DROP TABLE IF EXISTS `v_clientes_jerarquia`; -/*!50001 DROP VIEW IF EXISTS `v_clientes_jerarquia`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `v_clientes_jerarquia` AS SELECT - 1 AS `Id_Cliente`, - 1 AS `Cliente`, - 1 AS `Comercial`, - 1 AS `Jefe`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `v_ventas_contables` --- - -DROP TABLE IF EXISTS `v_ventas_contables`; -/*!50001 DROP VIEW IF EXISTS `v_ventas_contables`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `v_ventas_contables` AS SELECT - 1 AS `year`, - 1 AS `month`, - 1 AS `importe`*/; -SET character_set_client = @saved_cs_client; - -- -- Dumping events for database 'bi' -- @@ -3353,34 +3308,14 @@ BEGIN FROM bs.ventas v JOIN vn2008.time tm ON tm.date = v.fecha JOIN vn2008.Movimientos m ON m.Id_Movimiento = v.Id_Movimiento - JOIN vn2008.Articles a ON a.Id_Article = m.Id_Article - JOIN vn2008.Tipos tp ON tp.tipo_id = a.tipo_id + JOIN vn2008.Tipos tp ON tp.tipo_id = v.tipo_id JOIN vn2008.reinos r ON r.id = tp.reino_id JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket WHERE tm.period BETWEEN lastCOMP AND vn2008.vnperiod(CURDATE())- 3 AND t.Id_Cliente NOT IN(400,200) AND r.display <> 0 AND t.warehouse_id NOT IN (0,13) - GROUP BY Id_Article, Periodo, warehouse_id; - - -/* - REPLACE vn2008.Comparativa(Periodo, Id_Article, warehouse_id, Cantidad,price) - SELECT vn2008.vnperiod(T.Fecha) AS Periodo - , Id_Article - , warehouse_id - , SUM(Cantidad) AS Total - , SUM(Cantidad * Preu * (100 - Descuento) / 100) precio - FROM vn2008.Movimientos M - JOIN vn2008.Tickets T USING (Id_Ticket) - JOIN vn2008.Articles A USING (Id_Article) - LEFT JOIN vn2008.Tipos ti ON ti.tipo_id = A.tipo_id - LEFT JOIN vn2008.reinos r ON r.id = ti.reino_id - WHERE T.Fecha BETWEEN TIMESTAMPADD(DAY,-60,CURDATE()) AND TIMESTAMPADD(DAY,-30,CURDATE()) - AND T.Id_Cliente NOT IN(400,200) - AND display <> 0 AND warehouse_id NOT IN (0,13) - GROUP BY Id_Article, Periodo, warehouse_id; -*/ + GROUP BY m.Id_Article, Periodo, t.warehouse_id; END IF; END ;; @@ -4913,21 +4848,6 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `bs` /*!40100 DEFAULT CHARACTER SET utf USE `bs`; --- --- Temporary view structure for view `VentasPorCliente` --- - -DROP TABLE IF EXISTS `VentasPorCliente`; -/*!50001 DROP VIEW IF EXISTS `VentasPorCliente`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `VentasPorCliente` AS SELECT - 1 AS `Id_Cliente`, - 1 AS `VentaBasica`, - 1 AS `year`, - 1 AS `month`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `bajasLaborales` -- @@ -5085,21 +5005,6 @@ CREATE TABLE `fondo_maniobra` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `horasSilla` --- - -DROP TABLE IF EXISTS `horasSilla`; -/*!50001 DROP VIEW IF EXISTS `horasSilla`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `horasSilla` AS SELECT - 1 AS `Fecha`, - 1 AS `Departamento`, - 1 AS `Horas`, - 1 AS `Salarios`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `indicators` -- @@ -5195,7 +5100,7 @@ CREATE TABLE `m3` ( `dayName` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, `euros` decimal(10,2) DEFAULT '0.00', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=384953 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=392114 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5447,7 +5352,7 @@ CREATE TABLE `payMethodClient` ( KEY `FkDateClientPayMethod` (`dated`,`clientFk`), CONSTRAINT `FkClientPayMethod` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FkPayMethodClient` FOREIGN KEY (`payMethodFk`) REFERENCES `vn`.`payMethod` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=6084646 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB AUTO_INCREMENT=6199327 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5468,27 +5373,6 @@ CREATE TABLE `payMethodClientEvolution` ( ) ENGINE=InnoDB AUTO_INCREMENT=2048 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `productionIndicators` --- - -DROP TABLE IF EXISTS `productionIndicators`; -/*!50001 DROP VIEW IF EXISTS `productionIndicators`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `productionIndicators` AS SELECT - 1 AS `dated`, - 1 AS `productionHours`, - 1 AS `dailyWorkersCost`, - 1 AS `VolumeM3`, - 1 AS `salesValue`, - 1 AS `valueM3`, - 1 AS `hoursM3`, - 1 AS `Dia`, - 1 AS `workerCostM3`, - 1 AS `salesWorkersCostRate`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `productivity` -- @@ -5522,7 +5406,7 @@ CREATE TABLE `productivity` ( `m3PCA` double NOT NULL DEFAULT '0', `m3Artificial` decimal(10,2) NOT NULL DEFAULT '0.00', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=63108688 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=63968428 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5616,23 +5500,6 @@ CREATE TABLE `salesByWeek` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `v_ventas` --- - -DROP TABLE IF EXISTS `v_ventas`; -/*!50001 DROP VIEW IF EXISTS `v_ventas`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `v_ventas` AS SELECT - 1 AS `importe`, - 1 AS `recargo`, - 1 AS `year`, - 1 AS `month`, - 1 AS `week`, - 1 AS `day`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `vendedores` -- @@ -8487,7 +8354,7 @@ CREATE TABLE `cache_calc` ( KEY `cache_id` (`cache_id`), KEY `cacheName` (`cacheName`), KEY `expires` (`expires`) -) ENGINE=InnoDB AUTO_INCREMENT=443363 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=445891 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8555,7 +8422,7 @@ CREATE TABLE `prod_graphic_source` ( `alert_level` int(11) NOT NULL DEFAULT '0', `Agencia` varchar(45) CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2344377 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2507885 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9939,7 +9806,7 @@ CREATE TABLE `deliveryInformation` ( KEY `fgbSupplyResponse_idx2` (`FirstOrderDateTime`), KEY `fgbSupplyResponse_idx3` (`LatestOrderDateTime`), CONSTRAINT `fgbSupplyResponse` FOREIGN KEY (`supplyResponseID`) REFERENCES `supplyResponse` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=24992905 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=25289769 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9997,7 +9864,7 @@ CREATE TABLE `ekt` ( KEY `barcode` (`barcode`), KEY `fec` (`fec`), KEY `putOrderFk` (`putOrderFk`) -) ENGINE=InnoDB AUTO_INCREMENT=1126338 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1132880 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -10018,7 +9885,7 @@ CREATE TABLE `exchange` ( KEY `buy_edi_id` (`ektFk`), CONSTRAINT `exchange_ibfk_1` FOREIGN KEY (`mailFk`) REFERENCES `mail` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `exchange_ibfk_2` FOREIGN KEY (`ektFk`) REFERENCES `ekt` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=666917 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=673452 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -10280,7 +10147,7 @@ CREATE TABLE `mail` ( UNIQUE KEY `mail_id` (`messageId`), KEY `sender_id` (`senderFk`), CONSTRAINT `mail_ibfk_2` FOREIGN KEY (`senderFk`) REFERENCES `mailSender` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=696782 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=702838 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -10436,47 +10303,6 @@ CREATE TABLE `supplier` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='/tmp/floricode/FEC010104/CC090916.txt'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `supplyOffer` --- - -DROP TABLE IF EXISTS `supplyOffer`; -/*!50001 DROP VIEW IF EXISTS `supplyOffer`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `supplyOffer` AS SELECT - 1 AS `diId`, - 1 AS `srId`, - 1 AS `Item_ArticleCode`, - 1 AS `product_name`, - 1 AS `company_name`, - 1 AS `Price`, - 1 AS `Quality`, - 1 AS `s1`, - 1 AS `s2`, - 1 AS `s3`, - 1 AS `s4`, - 1 AS `s5`, - 1 AS `s6`, - 1 AS `NumberOfUnits`, - 1 AS `EmbalageCode`, - 1 AS `LatestDeliveryDateTime`, - 1 AS `EarliestDespatchDateTime`, - 1 AS `FirstOrderDateTime`, - 1 AS `LatestOrderDateTime`, - 1 AS `NumberOfItemsPerCask`, - 1 AS `NumberOfLayersPerTrolley`, - 1 AS `MinimumNumberToOrder`, - 1 AS `MaximumNumberToOrder`, - 1 AS `IncrementalOrderableQuantity`, - 1 AS `PackingPrice`, - 1 AS `MarketPlaceID`, - 1 AS `PictureReference`, - 1 AS `marketPlace`, - 1 AS `OrderUnit`, - 1 AS `IncrementalOrderUnit`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `supplyResponse` -- @@ -10536,7 +10362,7 @@ CREATE TABLE `supplyResponse` ( PRIMARY KEY (`ID`), UNIQUE KEY `ID_UNIQUE` (`ID`), KEY `IX_TransNumber` (`TransactionNumber`) COMMENT 'Agregado por Ernesto 11.6.2019\nSe ejecutaba 1 consulta por segundo desde MAIL y consumia un 20% de CPU de todo el servidor !!!!!\nCPU usada es mas estable que Indice en SendererID, cpu vs espacio que ocupa?\n' -) ENGINE=InnoDB AUTO_INCREMENT=9184685 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=9300006 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11233,7 +11059,7 @@ CREATE TABLE `image` ( PRIMARY KEY (`id`), UNIQUE KEY `collection` (`collectionFk`,`name`), CONSTRAINT `image_ibfk_1` FOREIGN KEY (`collectionFk`) REFERENCES `imageCollection` (`name`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=175046 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=176704 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11914,7 +11740,7 @@ CREATE TABLE `order` ( CONSTRAINT `order_ibfk_5` FOREIGN KEY (`address_id`) REFERENCES `vn`.`address` (`id`) ON UPDATE CASCADE, CONSTRAINT `order_ibfk_8` FOREIGN KEY (`delivery_method_id`) REFERENCES `vn`.`deliveryMethod` (`id`) ON UPDATE CASCADE, CONSTRAINT `order_ibfk_9` FOREIGN KEY (`agency_id`) REFERENCES `vn`.`agencyMode` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2274503 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2285812 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -12033,7 +11859,7 @@ CREATE TABLE `orderRow` ( KEY `warehouse_shipment` (`warehouseFk`,`shipment`), CONSTRAINT `orderRow_ibfk_2` FOREIGN KEY (`itemFk`) REFERENCES `vn`.`item` (`id`) ON UPDATE CASCADE, CONSTRAINT `orderRow_ibfk_3` FOREIGN KEY (`orderFk`) REFERENCES `order` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=13617979 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=13680799 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -12457,7 +12283,7 @@ CREATE TABLE `tpvTransaction` ( CONSTRAINT `receipt_id` FOREIGN KEY (`receiptFk`) REFERENCES `vn`.`receipt` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `tpvTransaction_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tpvTransaction_ibfk_2` FOREIGN KEY (`merchantFk`) REFERENCES `tpvMerchant` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=377563 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV'; +) ENGINE=InnoDB AUTO_INCREMENT=379573 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12492,7 +12318,7 @@ CREATE TABLE `visit` ( PRIMARY KEY (`id`), KEY `firstAgent` (`firstAgentFk`), CONSTRAINT `visit_ibfk_1` FOREIGN KEY (`firstAgentFk`) REFERENCES `visitAgent` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2026231 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2034464 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12512,7 +12338,7 @@ CREATE TABLE `visitAccess` ( KEY `visit_access_idx_agent` (`agentFk`), KEY `stamp` (`stamp`), CONSTRAINT `visitAccess_ibfk_1` FOREIGN KEY (`agentFk`) REFERENCES `visitAgent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=4534627 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4556453 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12537,7 +12363,7 @@ CREATE TABLE `visitAgent` ( KEY `firstAccess` (`firstAccessFk`), CONSTRAINT `visitAgent_ibfk_1` FOREIGN KEY (`visitFk`) REFERENCES `visit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `visitAgent_ibfk_2` FOREIGN KEY (`firstAccessFk`) REFERENCES `visitAccess` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2677108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2686350 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12557,7 +12383,7 @@ CREATE TABLE `visitUser` ( KEY `date_time` (`stamp`), KEY `user_id` (`userFk`), CONSTRAINT `visitUser_ibfk_1` FOREIGN KEY (`accessFk`) REFERENCES `visitAccess` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3969298 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3986549 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -16295,7 +16121,7 @@ CREATE TABLE `cdr` ( KEY `dstchannel` (`dst_channel`), KEY `disposition` (`disposition`), KEY `src` (`src`) -) ENGINE=InnoDB AUTO_INCREMENT=319164 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=320884 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -16557,7 +16383,7 @@ CREATE TABLE `queueMember` ( KEY `extension` (`extension`), CONSTRAINT `queueMember_ibfk_1` FOREIGN KEY (`queue`) REFERENCES `queue` (`name`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `queueMember_ibfk_2` FOREIGN KEY (`extension`) REFERENCES `sip` (`extension`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=778 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queue members'; +) ENGINE=InnoDB AUTO_INCREMENT=792 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queue members'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -17182,7 +17008,7 @@ CREATE TABLE `business` ( KEY `bussiness_provider` (`provider_id`), CONSTRAINT `business_client` FOREIGN KEY (`client_id`) REFERENCES `profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bussiness_provider` FOREIGN KEY (`provider_id`) REFERENCES `profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3041 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3051 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -17358,25 +17184,6 @@ CREATE TABLE `currency` ( ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `currentWorkersStats` --- - -DROP TABLE IF EXISTS `currentWorkersStats`; -/*!50001 DROP VIEW IF EXISTS `currentWorkersStats`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `currentWorkersStats` AS SELECT - 1 AS `business_id`, - 1 AS `sex`, - 1 AS `name`, - 1 AS `firstname`, - 1 AS `department`, - 1 AS `category_name`, - 1 AS `level_name`, - 1 AS `salarioMedio`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `income_employee` -- @@ -17397,7 +17204,7 @@ CREATE TABLE `income_employee` ( KEY `fperson_id` (`person_id`), CONSTRAINT `fincometype_id` FOREIGN KEY (`id_incomeType`) REFERENCES `incometype_employee` (`id_incometype`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fperson_id` FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=75574 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=76246 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -17430,8 +17237,8 @@ CREATE TABLE `journey` ( `business_id` int(11) NOT NULL, PRIMARY KEY (`journey_id`), KEY `fki_business_journey` (`business_id`), - CONSTRAINT `business_journey` FOREIGN KEY (`business_id`) REFERENCES `business_labour` (`business_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2714 DEFAULT CHARSET=utf8; + CONSTRAINT `business_journey` FOREIGN KEY (`business_id`) REFERENCES `business_labour` (`business_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2715 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -20198,7 +20005,7 @@ CREATE TABLE `XDiario` ( PRIMARY KEY (`id`), KEY `empresa_id` (`empresa_id`), CONSTRAINT `XDiario_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `company` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=4090192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4095187 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -20246,84 +20053,6 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; --- --- Temporary view structure for view `XDiario__` --- - -DROP TABLE IF EXISTS `XDiario__`; -/*!50001 DROP VIEW IF EXISTS `XDiario__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `XDiario__` AS SELECT - 1 AS `id`, - 1 AS `ASIEN`, - 1 AS `FECHA`, - 1 AS `SUBCTA`, - 1 AS `CONTRA`, - 1 AS `CONCEPTO`, - 1 AS `EURODEBE`, - 1 AS `EUROHABER`, - 1 AS `BASEEURO`, - 1 AS `SERIE`, - 1 AS `FACTURA`, - 1 AS `BASEIMPO`, - 1 AS `IVA`, - 1 AS `RECEQUIV`, - 1 AS `DOCUMENTO`, - 1 AS `DEPARTA`, - 1 AS `CLAVE`, - 1 AS `ESTADO`, - 1 AS `NCASADO`, - 1 AS `TCASADO`, - 1 AS `TRANS`, - 1 AS `CAMBIO`, - 1 AS `DEBEME`, - 1 AS `HABERME`, - 1 AS `PTAHABER`, - 1 AS `AUXILIAR`, - 1 AS `SUCURSAL`, - 1 AS `PTADEBE`, - 1 AS `CODDIVISA`, - 1 AS `IMPAUXME`, - 1 AS `MONEDAUSO`, - 1 AS `NOCONV`, - 1 AS `NUMEROINV`, - 1 AS `TIPOOPE`, - 1 AS `NFACTICK`, - 1 AS `TERIDNIF`, - 1 AS `TERNIF`, - 1 AS `TERNOM`, - 1 AS `OPBIENES`, - 1 AS `TIPOFAC`, - 1 AS `TIPOIVA`, - 1 AS `L340`, - 1 AS `enlazado`, - 1 AS `FECHA_EX`, - 1 AS `LRECT349`, - 1 AS `empresa_id`, - 1 AS `LDIFADUAN`, - 1 AS `METAL`, - 1 AS `METALIMP`, - 1 AS `CLIENTE`, - 1 AS `METALEJE`, - 1 AS `FECHA_OP`, - 1 AS `FACTURAEX`, - 1 AS `TIPOCLAVE`, - 1 AS `TIPOEXENCI`, - 1 AS `TIPONOSUJE`, - 1 AS `TIPOFACT`, - 1 AS `TIPORECTIF`, - 1 AS `SERIE_RT`, - 1 AS `FACTU_RT`, - 1 AS `BASEIMP_RT`, - 1 AS `BASEIMP_RF`, - 1 AS `RECTIFICA`, - 1 AS `FECHA_RT`, - 1 AS `created`, - 1 AS `updated`, - 1 AS `FECREGCON`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `absenceType` -- @@ -20353,23 +20082,6 @@ CREATE TABLE `accountingType` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='descripcio dels valors de la columna "cash" de la taula vn2008.Bancios'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `accounting__` --- - -DROP TABLE IF EXISTS `accounting__`; -/*!50001 DROP VIEW IF EXISTS `accounting__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `accounting__` AS SELECT - 1 AS `id`, - 1 AS `bank`, - 1 AS `account`, - 1 AS `accountingTypeFk`, - 1 AS `entityFk`, - 1 AS `isActive`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `activeContrat` -- @@ -20442,7 +20154,7 @@ CREATE TABLE `address` ( CONSTRAINT `address_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `address_ibfk_3` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE, CONSTRAINT `address_ibfk_4` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=29774 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=29838 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -20562,7 +20274,7 @@ CREATE TABLE `addressObservation` ( KEY `addressObservationFgn_idx` (`observationTypeFk`), CONSTRAINT `addressFgn` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `addressObservationFgn` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=4234 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios'; +) ENGINE=InnoDB AUTO_INCREMENT=4245 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -20593,7 +20305,7 @@ CREATE TABLE `agency` ( CONSTRAINT `agency_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE, CONSTRAINT `agency_ibfk_3` FOREIGN KEY (`workCenterFk`) REFERENCES `workCenter` (`id`) ON UPDATE CASCADE, CONSTRAINT `agency_ibfk_4` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=286 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -20642,57 +20354,9 @@ CREATE TABLE `agencyMode` ( PRIMARY KEY (`id`), KEY `Agencias` (`name`), KEY `Vista` (`deliveryMethodFk`) -) ENGINE=InnoDB AUTO_INCREMENT=1240 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1243 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `agencyModeZone` --- - -DROP TABLE IF EXISTS `agencyModeZone`; -/*!50001 DROP VIEW IF EXISTS `agencyModeZone`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `agencyModeZone` AS SELECT - 1 AS `agencyModeFk`, - 1 AS `zone`, - 1 AS `price`, - 1 AS `itemFk`, - 1 AS `warehouseFk`, - 1 AS `minimCost`, - 1 AS `inflation`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `agencyProvince` --- - -DROP TABLE IF EXISTS `agencyProvince`; -/*!50001 DROP VIEW IF EXISTS `agencyProvince`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `agencyProvince` AS SELECT - 1 AS `provinceFk`, - 1 AS `agencyFk`, - 1 AS `zone`, - 1 AS `warehouseFk`, - 1 AS `isVolumetric`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `agencyWarehouse` --- - -DROP TABLE IF EXISTS `agencyWarehouse`; -/*!50001 DROP VIEW IF EXISTS `agencyWarehouse`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `agencyWarehouse` AS SELECT - 1 AS `agencyFk`, - 1 AS `warehouseFk`, - 1 AS `agencyType`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `alertLevel` -- @@ -20773,7 +20437,7 @@ CREATE TABLE `autoRadioLogCall` ( PRIMARY KEY (`id`), KEY `ticket_idx` (`ticketFk`), CONSTRAINT `ticket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=1860 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1896 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -20794,39 +20458,6 @@ CREATE TABLE `autonomousRegion` ( ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `awb` --- - -DROP TABLE IF EXISTS `awb`; -/*!50001 DROP VIEW IF EXISTS `awb`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `awb` AS SELECT - 1 AS `id`, - 1 AS `code`, - 1 AS `package`, - 1 AS `weight`, - 1 AS `created`, - 1 AS `transitoryFk`, - 1 AS `taxFk`, - 1 AS `docFk`, - 1 AS `amount`, - 1 AS `freightFk`, - 1 AS `m3`, - 1 AS `stems`, - 1 AS `flightFk`, - 1 AS `volumeWeight`, - 1 AS `hb`, - 1 AS `rate`, - 1 AS `booked`, - 1 AS `issued`, - 1 AS `operated`, - 1 AS `bookEntried`, - 1 AS `invoiceInFk`, - 1 AS `isChecked`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `bank` -- @@ -20958,24 +20589,6 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; --- --- Temporary view structure for view `botanicExport__` --- - -DROP TABLE IF EXISTS `botanicExport__`; -/*!50001 DROP VIEW IF EXISTS `botanicExport__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `botanicExport__` AS SELECT - 1 AS `id`, - 1 AS `ediGenusFk`, - 1 AS `ediSpecieFk`, - 1 AS `countryFk`, - 1 AS `restriction`, - 1 AS `description`, - 1 AS `isProtectedZone`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `businessReasonEnd` -- @@ -21039,7 +20652,7 @@ CREATE TABLE `buy` ( CONSTRAINT `buy_ibfk_2` FOREIGN KEY (`packageFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE, CONSTRAINT `buy_id` FOREIGN KEY (`entryFk`) REFERENCES `entry` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT `buy_itemfk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=356198896 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB AUTO_INCREMENT=357955065 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -21168,7 +20781,7 @@ trig: BEGIN CALL buy_afterUpsert(NEW.id); - IF !(NEW.weight <=> OLD.weight) OR !(NEW.packing <=> OLD.packing) OR !(NEW.packageFk <=> OLD.packageFk) THEN + IF (!(NEW.weight <=> OLD.weight) OR !(NEW.packing <=> OLD.packing) OR !(NEW.packageFk <=> OLD.packageFk)) AND NEW.weight THEN UPDATE item SET density = NEW.weight / (item_getVolume(NEW.itemFk, NEW.packageFk) / 1000000) WHERE id = NEW.itemFk; @@ -21349,7 +20962,7 @@ CREATE TABLE `claim` ( CONSTRAINT `claim_ibfk_3` FOREIGN KEY (`claimStateFk`) REFERENCES `claimState` (`id`) ON UPDATE CASCADE, CONSTRAINT `claim_ibfk_4` FOREIGN KEY (`claimDepartmentFk`) REFERENCES `vn2008`.`cl_dep` (`id`) ON UPDATE CASCADE, CONSTRAINT `claim_ibfk_5` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=72313 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal'; +) ENGINE=InnoDB AUTO_INCREMENT=72670 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21371,7 +20984,7 @@ CREATE TABLE `claimBeginning` ( KEY `cl_main_id` (`claimFk`), CONSTRAINT `claimBeginning_ibfk_7` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `claimBeginning_ibfk_8` FOREIGN KEY (`claimFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=158400 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones'; +) ENGINE=InnoDB AUTO_INCREMENT=159074 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -21450,7 +21063,7 @@ CREATE TABLE `claimDevelopment` ( CONSTRAINT `claimDevelopment_ibfk_7` FOREIGN KEY (`claimReasonFk`) REFERENCES `claimReason` (`id`) ON UPDATE CASCADE, CONSTRAINT `claimDevelopment_ibfk_8` FOREIGN KEY (`claimResultFk`) REFERENCES `claimResult` (`id`) ON UPDATE CASCADE, CONSTRAINT `claimDevelopment_ibfk_9` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=61811 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones'; +) ENGINE=InnoDB AUTO_INCREMENT=61977 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21492,7 +21105,7 @@ CREATE TABLE `claimEnd` ( CONSTRAINT `claimEnd_ibfk_1` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `claimEnd_ibfk_3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `claimEnd_ibfk_4` FOREIGN KEY (`claimFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=120830 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones'; +) ENGINE=InnoDB AUTO_INCREMENT=121304 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21519,7 +21132,7 @@ CREATE TABLE `claimLog` ( KEY `userFk` (`userFk`), CONSTRAINT `claimOriginFk` FOREIGN KEY (`originFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `claimUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=7990 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8531 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21708,7 +21321,7 @@ CREATE TABLE `client` ( CONSTRAINT `client_ibfk_5` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE, CONSTRAINT `tipos_de_cliente` FOREIGN KEY (`clientTypeFk`) REFERENCES `clientType` (`id`) ON UPDATE CASCADE, CONSTRAINT `typeFk` FOREIGN KEY (`typeFk`) REFERENCES `clientType` (`code`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=16982 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=17013 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -21857,7 +21470,7 @@ CREATE TABLE `clientContact` ( `name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4160 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4161 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21878,7 +21491,7 @@ CREATE TABLE `clientCredit` ( KEY `credit_ClienteFk` (`clientFk`), CONSTRAINT `credit_ClienteFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `workers_fk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=85845 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=86067 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21896,22 +21509,6 @@ CREATE TABLE `clientCreditLimit` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `clientDefaultCompany` --- - -DROP TABLE IF EXISTS `clientDefaultCompany`; -/*!50001 DROP VIEW IF EXISTS `clientDefaultCompany`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `clientDefaultCompany` AS SELECT - 1 AS `id`, - 1 AS `clientFk`, - 1 AS `companyFk`, - 1 AS `started`, - 1 AS `finished`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `clientDms` -- @@ -21954,7 +21551,7 @@ CREATE TABLE `clientLog` ( KEY `userFk` (`userFk`), CONSTRAINT `clientLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `clientLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=242651 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=243689 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -21989,7 +21586,7 @@ CREATE TABLE `clientObservation` ( KEY `Id_Cliente` (`clientFk`), CONSTRAINT `clientObservation_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `clientObservation_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=79079 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket'; +) ENGINE=InnoDB AUTO_INCREMENT=79266 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -22084,7 +21681,7 @@ CREATE TABLE `clientSample` ( PRIMARY KEY (`id`), KEY `empresa_id` (`companyFk`), CONSTRAINT `clientSample_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=18617 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=18668 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -22123,7 +21720,7 @@ CREATE TABLE `cmr` ( PRIMARY KEY (`id`), KEY `cmr_fk1_idx` (`ticketFk`), CONSTRAINT `cmr_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -22221,7 +21818,7 @@ CREATE TABLE `collection` ( PRIMARY KEY (`id`), KEY `ticketCollection_idx` (`workerFk`), CONSTRAINT `ticketCollection` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=133 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -22243,19 +21840,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `level`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `color` --- - -DROP TABLE IF EXISTS `color`; -/*!50001 DROP VIEW IF EXISTS `color`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `color` AS SELECT - 1 AS `id`, - 1 AS `name`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `company` -- @@ -22311,36 +21895,6 @@ CREATE TABLE `companyGroup` ( ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `comparative` --- - -DROP TABLE IF EXISTS `comparative`; -/*!50001 DROP VIEW IF EXISTS `comparative`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `comparative` AS SELECT - 1 AS `timePeriod`, - 1 AS `itemFk`, - 1 AS `warehouseFk`, - 1 AS `quantity`, - 1 AS `price`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `comparativeFilter` --- - -DROP TABLE IF EXISTS `comparativeFilter`; -/*!50001 DROP VIEW IF EXISTS `comparativeFilter`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `comparativeFilter` AS SELECT - 1 AS `id`, - 1 AS `name`, - 1 AS `whereSql`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `component` -- @@ -22507,33 +22061,6 @@ CREATE TABLE `contactChannel` ( ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Canal por el que nos ha conocido un cliente y se ha dado de'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `coolerPath` --- - -DROP TABLE IF EXISTS `coolerPath`; -/*!50001 DROP VIEW IF EXISTS `coolerPath`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `coolerPath` AS SELECT - 1 AS `id`, - 1 AS `description`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `coolerPathDetail` --- - -DROP TABLE IF EXISTS `coolerPathDetail`; -/*!50001 DROP VIEW IF EXISTS `coolerPathDetail`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `coolerPathDetail` AS SELECT - 1 AS `id`, - 1 AS `coolerPathFk`, - 1 AS `hallway`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `country` -- @@ -22780,7 +22307,7 @@ CREATE TABLE `creditClassification` ( KEY `creditClassifClientFk_idx` (`client`), KEY `creditClassifdateEnd_idx` (`dateEnd`), CONSTRAINT `creditClassifClientFk` FOREIGN KEY (`client`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3273 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3277 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -22824,7 +22351,7 @@ CREATE TABLE `creditInsurance` ( PRIMARY KEY (`id`), KEY `CreditInsurance_Fk1_idx` (`creditClassification`), CONSTRAINT `CreditInsurance_Fk1` FOREIGN KEY (`creditClassification`) REFERENCES `creditClassification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3193 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito'; +) ENGINE=InnoDB AUTO_INCREMENT=3200 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -22915,6 +22442,21 @@ CREATE TABLE `deliveryMethod` ( ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `deliveryPoint` +-- + +DROP TABLE IF EXISTS `deliveryPoint`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `deliveryPoint` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8_unicode_ci NOT NULL, + `ubication` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `delivery_zip` -- @@ -23034,6 +22576,28 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; +-- +-- Table structure for table `departmentItemType` +-- + +DROP TABLE IF EXISTS `departmentItemType`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `departmentItemType` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `departmentFk` int(11) NOT NULL, + `itemTypeFk` smallint(5) unsigned NOT NULL, + `workerFk` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `departmentItemTypeIdx1_idx` (`departmentFk`,`itemTypeFk`), + KEY `departmentItemTypeIdx2_idx` (`itemTypeFk`), + KEY `departmentItemTypeIdx3_idx` (`workerFk`), + CONSTRAINT `departmentItemTypeIdx1` FOREIGN KEY (`departmentFk`) REFERENCES `department` (`id`) ON UPDATE CASCADE, + CONSTRAINT `departmentItemTypeIdx2` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, + CONSTRAINT `departmentItemTypeIdx3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Temporary view structure for view `departmentTree` -- @@ -23047,25 +22611,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `dep`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `department__` --- - -DROP TABLE IF EXISTS `department__`; -/*!50001 DROP VIEW IF EXISTS `department__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `department__` AS SELECT - 1 AS `id`, - 1 AS `name`, - 1 AS `isProduction`, - 1 AS `lft`, - 1 AS `rgt`, - 1 AS `isSelected`, - 1 AS `depth`, - 1 AS `sons`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `department_recalc` -- @@ -23095,7 +22640,7 @@ CREATE TABLE `device` ( PRIMARY KEY (`id`), KEY `device_fk1_idx` (`userFk`), CONSTRAINT `device_fk1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=372 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=375 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23120,7 +22665,7 @@ CREATE TABLE `deviceProduction` ( KEY `departmentFgn` (`departmentFk`), CONSTRAINT `departmentFgn` FOREIGN KEY (`departmentFk`) REFERENCES `department` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `deviceProductionModelsFgn` FOREIGN KEY (`modelFk`) REFERENCES `deviceProductionModels` (`code`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=378 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23177,14 +22722,14 @@ CREATE TABLE `dms` ( UNIQUE KEY `emp_id` (`companyFk`,`hardCopyNumber`,`warehouseFk`), KEY `trabajador_id` (`workerFk`), KEY `warehouse_id` (`warehouseFk`) -) ENGINE=InnoDB AUTO_INCREMENT=1403357 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system'; +) ENGINE=InnoDB AUTO_INCREMENT=1409028 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system'; /*!40101 SET character_set_client = @saved_cs_client */; /*!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 character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; @@ -23192,16 +22737,10 @@ DELIMITER ;; BEGIN DECLARE vHardCopyNumber INT; DECLARE vDmsTypeCode INT; - -- DECLARE vHasDms INT; IF NEW.warehouseFk = 44 THEN SET NEW.warehouseFk = 1; END IF; - -- SELECT hasDms INTO vHasDms FROM warehouse WHERE id = NEW.warehouseFk; - --- IF !vHasDms THEN --- CALL util.throw ('DMS_UNAVAILABLE_FOR_THIS_WAREHOUSE'); --- END IF; IF NEW.hasFile THEN SELECT 1 + MAX(hardCopyNumber) INTO vHardCopyNumber @@ -23211,12 +22750,12 @@ BEGIN SET NEW.hardCopyNumber = IFNULL(vHardCopyNumber,1) ; END IF; --- Marca Firmado a uno cada vez que se escanea un Ticket de forma que desaparezca del TNAC JGF 27/08/13 - SELECT code INTO vDmsTypeCode - FROM dmsType WHERE NEW.dmsTypeFk = id; - IF (vDmsTypeCode ='ticket') THEN - UPDATE ticket SET isSigned = 1 WHERE id = NEW.reference; - END IF; + + SELECT code INTO vDmsTypeCode + FROM dmsType WHERE NEW.dmsTypeFk = id; + IF (vDmsTypeCode ='ticket') THEN + UPDATE ticket SET isSigned = 1 WHERE id = NEW.reference; + END IF; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -23277,27 +22816,6 @@ CREATE TABLE `dmsType` ( ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `doc` --- - -DROP TABLE IF EXISTS `doc`; -/*!50001 DROP VIEW IF EXISTS `doc`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `doc` AS SELECT - 1 AS `id`, - 1 AS `sref`, - 1 AS `brief`, - 1 AS `companyFk`, - 1 AS `order`, - 1 AS `file`, - 1 AS `original`, - 1 AS `workerFk`, - 1 AS `created`, - 1 AS `warehouseFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `dua` -- @@ -23324,7 +22842,7 @@ CREATE TABLE `dua` ( CONSTRAINT `dua_fk1` FOREIGN KEY (`gestdocFk`) REFERENCES `dms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `dua_fk2` FOREIGN KEY (`awbFk`) REFERENCES `vn2008`.`awb` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `dua_fk4` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=19523 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=19541 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23365,7 +22883,7 @@ CREATE TABLE `duaIntrastat` ( KEY `duaIntrastat_fk2_idx` (`duaFk`), CONSTRAINT `duaIntrastat_fk1` FOREIGN KEY (`intrastatFk`) REFERENCES `intrastat` (`id`) ON UPDATE CASCADE, CONSTRAINT `duaIntrastat_fk2` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=7293 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=7318 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23385,7 +22903,7 @@ CREATE TABLE `duaInvoiceIn` ( KEY `duaInvoiceIn_fk2_idx` (`invoiceInFk`), CONSTRAINT `duaInvoiceIn_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `duaInvoiceIn_fk2` FOREIGN KEY (`invoiceInFk`) REFERENCES `vn2008`.`recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=5312 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario'; +) ENGINE=InnoDB AUTO_INCREMENT=5330 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23410,7 +22928,7 @@ CREATE TABLE `duaTax` ( CONSTRAINT `duaTax_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `duaTax_fk2` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE, CONSTRAINT `duaTax_fk3` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=10616 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=10711 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23492,21 +23010,6 @@ CREATE TABLE `energyMeter` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='History of consumption of each input with one hour intervals'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `entity` --- - -DROP TABLE IF EXISTS `entity`; -/*!50001 DROP VIEW IF EXISTS `entity`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `entity` AS SELECT - 1 AS `id`, - 1 AS `description`, - 1 AS `countryFk`, - 1 AS `bic`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `entry` -- @@ -23546,7 +23049,7 @@ CREATE TABLE `entry` ( CONSTRAINT `entry_ibfk_1` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE, CONSTRAINT `entry_ibfk_6` FOREIGN KEY (`travelFk`) REFERENCES `travel` (`id`) ON UPDATE CASCADE, CONSTRAINT `entry_ibfk_7` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=183147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee'; +) ENGINE=InnoDB AUTO_INCREMENT=183567 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -23748,7 +23251,7 @@ CREATE TABLE `entryLog` ( KEY `entryLog_ibfk_2` (`userFk`), CONSTRAINT `entryLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=180342 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=181388 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -23836,44 +23339,6 @@ CREATE TABLE `envialiaConfig` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `especialPrice` --- - -DROP TABLE IF EXISTS `especialPrice`; -/*!50001 DROP VIEW IF EXISTS `especialPrice`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `especialPrice` AS SELECT - 1 AS `id`, - 1 AS `clientFk`, - 1 AS `itemFk`, - 1 AS `value`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `exchangeInsurance` --- - -DROP TABLE IF EXISTS `exchangeInsurance`; -/*!50001 DROP VIEW IF EXISTS `exchangeInsurance`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `exchangeInsurance` AS SELECT - 1 AS `id`, - 1 AS `amount`, - 1 AS `dated`, - 1 AS `finished`, - 1 AS `entityFk`, - 1 AS `ref`, - 1 AS `rate`, - 1 AS `companyFk`, - 1 AS `financialProductTypefk`, - 1 AS `upperBarrier`, - 1 AS `lowerBarrier`, - 1 AS `strike`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `exchangeInsuranceEntry` -- @@ -23902,20 +23367,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `rate`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `exchangeInsuranceInPrevious` --- - -DROP TABLE IF EXISTS `exchangeInsuranceInPrevious`; -/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceInPrevious`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `exchangeInsuranceInPrevious` AS SELECT - 1 AS `dated`, - 1 AS `amount`, - 1 AS `rate`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `exchangeInsuranceOut` -- @@ -23930,25 +23381,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `rate`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `exchangeReportSource` --- - -DROP TABLE IF EXISTS `exchangeReportSource`; -/*!50001 DROP VIEW IF EXISTS `exchangeReportSource`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `exchangeReportSource` AS SELECT - 1 AS `dated`, - 1 AS `amountIn`, - 1 AS `rateIn`, - 1 AS `amountOut`, - 1 AS `rateOut`, - 1 AS `amountEntry`, - 1 AS `rateEntry`, - 1 AS `rateECB`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `exchangeReportSourcePrevious` -- @@ -24009,7 +23441,7 @@ CREATE TABLE `expedition` ( KEY `index4` (`ticketFk`), CONSTRAINT `Id_Agencia` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticket_id` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3458565 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3472587 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -24129,15 +23561,15 @@ DROP TABLE IF EXISTS `expence`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `expence` ( - `id` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `id` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `taxTypeFk` tinyint(4) NOT NULL, - `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, `isConbase` tinyint(4) NOT NULL DEFAULT '1', `isWithheld` tinyint(4) NOT NULL DEFAULT '0', `isForSale` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`,`taxTypeFk`), KEY `iva_tipo_id` (`taxTypeFk`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -24201,34 +23633,6 @@ CREATE TABLE `gateArea` ( ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `grant` --- - -DROP TABLE IF EXISTS `grant`; -/*!50001 DROP VIEW IF EXISTS `grant`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `grant` AS SELECT - 1 AS `group`, - 1 AS `worker`, - 1 AS `company`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `grantGroup` --- - -DROP TABLE IF EXISTS `grantGroup`; -/*!50001 DROP VIEW IF EXISTS `grantGroup`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `grantGroup` AS SELECT - 1 AS `id`, - 1 AS `description`, - 1 AS `observationType`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `greuge` -- @@ -24251,7 +23655,7 @@ CREATE TABLE `greuge` ( KEY `Greuges_cliente_idx` (`clientFk`), CONSTRAINT `Id_Ticket_Greuge_Ticket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `greuges_type_fk` FOREIGN KEY (`greugeTypeFk`) REFERENCES `greugeType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3837585 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT; +) ENGINE=InnoDB AUTO_INCREMENT=3848781 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -24440,7 +23844,7 @@ CREATE TABLE `inventoryFailure` ( CONSTRAINT `inventoryFailure_fk3` FOREIGN KEY (`guiltyFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `inventoryFailure_fk4` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `inventoryFailure_fk5` FOREIGN KEY (`causeFk`) REFERENCES `inventoryFailureCause` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=28524 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=29586 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -24517,116 +23921,6 @@ CREATE TABLE `invoiceCorrectionType` ( ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `invoiceCorrection__` --- - -DROP TABLE IF EXISTS `invoiceCorrection__`; -/*!50001 DROP VIEW IF EXISTS `invoiceCorrection__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceCorrection__` AS SELECT - 1 AS `correctingFk`, - 1 AS `correctedFk`, - 1 AS `cplusRectificationTypeFk`, - 1 AS `cplusInvoiceType477Fk`, - 1 AS `invoiceCorrectionTypeFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `invoiceIn` --- - -DROP TABLE IF EXISTS `invoiceIn`; -/*!50001 DROP VIEW IF EXISTS `invoiceIn`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceIn` AS SELECT - 1 AS `id`, - 1 AS `serialNumber`, - 1 AS `serial`, - 1 AS `supplierFk`, - 1 AS `issued`, - 1 AS `supplierRef`, - 1 AS `isBooked`, - 1 AS `currencyFk`, - 1 AS `created`, - 1 AS `companyFk`, - 1 AS `docFk`, - 1 AS `booked`, - 1 AS `operated`, - 1 AS `cplusInvoiceType472Fk`, - 1 AS `cplusRectificationTypeFk`, - 1 AS `cplusSubjectOpFk`, - 1 AS `cplusTaxBreakFk`, - 1 AS `cplusTrascendency472Fk`, - 1 AS `bookEntried`, - 1 AS `isVatDeductible`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `invoiceInAwb` --- - -DROP TABLE IF EXISTS `invoiceInAwb`; -/*!50001 DROP VIEW IF EXISTS `invoiceInAwb`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceInAwb` AS SELECT - 1 AS `invoiceInFk`, - 1 AS `awbFk`, - 1 AS `dua`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `invoiceInDueDay` --- - -DROP TABLE IF EXISTS `invoiceInDueDay`; -/*!50001 DROP VIEW IF EXISTS `invoiceInDueDay`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceInDueDay` AS SELECT - 1 AS `id`, - 1 AS `invoiceInFk`, - 1 AS `dueDated`, - 1 AS `bankFk`, - 1 AS `amount`, - 1 AS `foreignValue`, - 1 AS `created`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `invoiceInEntry` --- - -DROP TABLE IF EXISTS `invoiceInEntry`; -/*!50001 DROP VIEW IF EXISTS `invoiceInEntry`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceInEntry` AS SELECT - 1 AS `id`, - 1 AS `invoiceInFk`, - 1 AS `entryFk`, - 1 AS `percentage`, - 1 AS `invoiceInAwbFk`, - 1 AS `isBooked`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `invoiceInIntrastat` --- - -DROP TABLE IF EXISTS `invoiceInIntrastat`; -/*!50001 DROP VIEW IF EXISTS `invoiceInIntrastat`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceInIntrastat` AS SELECT - 1 AS `invoiceInFk`, - 1 AS `intrastatFk`, - 1 AS `amount`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `invoiceInSerial` -- @@ -24647,24 +23941,6 @@ CREATE TABLE `invoiceInSerial` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `invoiceInTax` --- - -DROP TABLE IF EXISTS `invoiceInTax`; -/*!50001 DROP VIEW IF EXISTS `invoiceInTax`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `invoiceInTax` AS SELECT - 1 AS `id`, - 1 AS `invoiceInFk`, - 1 AS `taxCodeFk`, - 1 AS `taxableBase`, - 1 AS `expenceFk`, - 1 AS `foreignValue`, - 1 AS `created`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `invoiceInTaxBookingAccount` -- @@ -24744,7 +24020,7 @@ CREATE TABLE `invoiceOut` ( CONSTRAINT `invoiceOut_ibfk_4` FOREIGN KEY (`cplusTaxBreakFk`) REFERENCES `cplusTaxBreak` (`id`) ON UPDATE CASCADE, CONSTRAINT `invoice_bank_id` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE, CONSTRAINT `invoice_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=525169 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=525244 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -24870,7 +24146,7 @@ CREATE TABLE `invoiceOutExpence` ( KEY `invoiceOutExpence_FK_2_idx` (`expenceFk`), CONSTRAINT `invoiceOutExpence_FK_1` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoiceOutExpence_FK_2` FOREIGN KEY (`expenceFk`) REFERENCES `expence` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=139574 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta'; +) ENGINE=InnoDB AUTO_INCREMENT=139696 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -24913,7 +24189,7 @@ CREATE TABLE `invoiceOutTax` ( KEY `pgcFk` (`pgcFk`), CONSTRAINT `invoiceOutFk` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoiceOutTax_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1193042 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1193198 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -24992,7 +24268,7 @@ CREATE TABLE `item` ( CONSTRAINT `item_ibfk_5` FOREIGN KEY (`typeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE, CONSTRAINT `item_ibfk_6` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `producer_id` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=378775 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=379949 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -25062,9 +24338,9 @@ 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_general_ci */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; @@ -25075,7 +24351,9 @@ BEGIN CALL hedera.image_unref('catalog', OLD.image); CALL hedera.image_ref('catalog', NEW.image); END IF; - + IF NEW.density = 0 THEN + CALL util.throw('error densidad = 0'); + END IF; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -25119,7 +24397,7 @@ CREATE TABLE `itemBarcode` ( UNIQUE KEY `Id_Article_2` (`itemFk`,`code`), KEY `Id_Article` (`itemFk`), CONSTRAINT `itemBarcode_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=43077 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=43102 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -25334,7 +24612,7 @@ CREATE TABLE `itemLog` ( KEY `itemLogUserFk_idx` (`userFk`), CONSTRAINT `itemLogItemFk` FOREIGN KEY (`originFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=105062 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=107230 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -25361,7 +24639,7 @@ CREATE TABLE `itemPlacement` ( CONSTRAINT `Articles_nicho_wh_fk` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `Articles_nichos_fk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemPlacement_fk3` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1173556 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1178731 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -25411,7 +24689,7 @@ CREATE TABLE `itemPlacementSupply` ( CONSTRAINT `itemPlacementSupply_fk2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemPlacementSupply_fk3` FOREIGN KEY (`repoUserFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemPlacementSupply_fk4` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=84841 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer'; +) ENGINE=InnoDB AUTO_INCREMENT=86699 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -25512,7 +24790,7 @@ CREATE TABLE `itemShelving` ( CONSTRAINT `itemShelving_fk1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemShelving_fk2` FOREIGN KEY (`shelvingFk`) REFERENCES `shelving` (`code`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemShelving_fk3` FOREIGN KEY (`packagingFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=147330 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla utilizada para localizar los artículos dentro de los carros. Usado para la gestión del almacén en el altillo '; +) ENGINE=InnoDB AUTO_INCREMENT=150860 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla utilizada para localizar los artículos dentro de los carros. Usado para la gestión del almacén en el altillo '; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -25629,7 +24907,7 @@ CREATE TABLE `itemShelvingPlacementSupply` ( KEY `itemShelvingPlacementSupply_fk3_idx` (`userFk`), CONSTRAINT `itemShelvingPlacementSupply_fk1` FOREIGN KEY (`itemShelvingFk`) REFERENCES `itemShelving` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemShelvingPlacementSupply_fk2` FOREIGN KEY (`itemPlacementSupplyFk`) REFERENCES `itemPlacementSupply` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=79537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de los itemShelving afectados por las ordenes de reposicion de nicho'; +) ENGINE=InnoDB AUTO_INCREMENT=81417 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de los itemShelving afectados por las ordenes de reposicion de nicho'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -25701,7 +24979,7 @@ CREATE TABLE `itemShelvingSale` ( CONSTRAINT `itemShelvingSale_fk1` FOREIGN KEY (`itemShelvingFk`) REFERENCES `itemShelving` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemShelvingSale_fk2` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemShelvingSale_fk3` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=50807 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente'; +) ENGINE=InnoDB AUTO_INCREMENT=55950 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -25828,7 +25106,7 @@ CREATE TABLE `itemTag` ( KEY `itemFk_2` (`itemFk`,`tagFk`,`intValue`), CONSTRAINT `itemTagItemFk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `itemTagTagFk` FOREIGN KEY (`tagFk`) REFERENCES `tag` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1418382 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1427447 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -25972,32 +25250,9 @@ CREATE TABLE `itemTaxCountry` ( CONSTRAINT `countryFK_paises` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE, CONSTRAINT `itemFK_Article` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `taxClassFK_Iva_Group` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=903211 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais'; +) ENGINE=InnoDB AUTO_INCREMENT=910669 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `itemTaxCountrySpain` --- - -DROP TABLE IF EXISTS `itemTaxCountrySpain`; -/*!50001 DROP VIEW IF EXISTS `itemTaxCountrySpain`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `itemTaxCountrySpain` AS SELECT - 1 AS `id`, - 1 AS `name`, - 1 AS `typeFk`, - 1 AS `stems`, - 1 AS `description`, - 1 AS `intrastatFk`, - 1 AS `expenceFk`, - 1 AS `comment`, - 1 AS `relevancy`, - 1 AS `image`, - 1 AS `generic`, - 1 AS `taxClassFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `itemTicketOut` -- @@ -26219,7 +25474,7 @@ CREATE TABLE `mail` ( PRIMARY KEY (`id`), KEY `sent_idx` (`sent`), KEY `creation_idx` (`creationDate`) -) ENGINE=InnoDB AUTO_INCREMENT=1960438 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1967627 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -26237,48 +25492,6 @@ CREATE TABLE `mailTemplates` ( ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `mail__` --- - -DROP TABLE IF EXISTS `mail__`; -/*!50001 DROP VIEW IF EXISTS `mail__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `mail__` AS SELECT - 1 AS `id`, - 1 AS `senderFk`, - 1 AS `recipientFk`, - 1 AS `sender`, - 1 AS `replyTo`, - 1 AS `subject`, - 1 AS `body`, - 1 AS `plainTextBody`, - 1 AS `attachment`, - 1 AS `creationDate`, - 1 AS `sent`, - 1 AS `status`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `manaSpellers` --- - -DROP TABLE IF EXISTS `manaSpellers`; -/*!50001 DROP VIEW IF EXISTS `manaSpellers`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `manaSpellers` AS SELECT - 1 AS `worker`, - 1 AS `size`, - 1 AS `used`, - 1 AS `pricesModifierRate`, - 1 AS `pricesModifierActivated`, - 1 AS `workerCode`, - 1 AS `firstname`, - 1 AS `name`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `mandate` -- @@ -26301,7 +25514,7 @@ CREATE TABLE `mandate` ( CONSTRAINT `mandato_fgkey1` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT `mandato_fgkey2` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT `mandato_fgkey3` FOREIGN KEY (`mandateTypeFk`) REFERENCES `mandateType` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=17319 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=17348 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -26416,7 +25629,7 @@ CREATE TABLE `message` ( KEY `sender` (`sender`), KEY `recipient` (`recipient`), KEY `uuid` (`uuid`(8)) -) ENGINE=InnoDB AUTO_INCREMENT=2071554 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2077011 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -26438,7 +25651,7 @@ CREATE TABLE `messageInbox` ( PRIMARY KEY (`id`), KEY `uuid` (`uuid`(8)), KEY `finalRecipient` (`finalRecipient`) -) ENGINE=InnoDB AUTO_INCREMENT=2248005 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2253664 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -26573,31 +25786,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `name`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `outgoingInvoiceKk` --- - -DROP TABLE IF EXISTS `outgoingInvoiceKk`; -/*!50001 DROP VIEW IF EXISTS `outgoingInvoiceKk`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `outgoingInvoiceKk` AS SELECT - 1 AS `id`, - 1 AS `serie`, - 1 AS `dateInvoice`, - 1 AS `total`, - 1 AS `dueDate`, - 1 AS `bank`, - 1 AS `client`, - 1 AS `remittance`, - 1 AS `remit`, - 1 AS `worker`, - 1 AS `creationDate`, - 1 AS `company`, - 1 AS `liquidacion?`, - 1 AS `isPdf`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `outgoingInvoiceVat` -- @@ -26627,7 +25815,7 @@ CREATE TABLE `packageChecked` ( PRIMARY KEY (`id`), UNIQUE KEY `entryFk_UNIQUE` (`itemFk`), KEY `fkItem_idx` (`itemFk`) -) ENGINE=InnoDB AUTO_INCREMENT=3391 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3417 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -26710,7 +25898,7 @@ CREATE TABLE `parking` ( 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 -) ENGINE=InnoDB AUTO_INCREMENT=27790 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla con los parkings del altillo'; +) ENGINE=InnoDB AUTO_INCREMENT=27886 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla con los parkings del altillo'; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -26786,71 +25974,6 @@ CREATE TABLE `payMethod` ( ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `payment` --- - -DROP TABLE IF EXISTS `payment`; -/*!50001 DROP VIEW IF EXISTS `payment`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `payment` AS SELECT - 1 AS `id`, - 1 AS `received`, - 1 AS `dueDated`, - 1 AS `supplierFk`, - 1 AS `amount`, - 1 AS `currencyFk`, - 1 AS `divisa`, - 1 AS `bankFk`, - 1 AS `payMethod`, - 1 AS `companyFk`, - 1 AS `exchangeInsuranceFk`, - 1 AS `isConciliate`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `paymentExchangeInsurance` --- - -DROP TABLE IF EXISTS `paymentExchangeInsurance`; -/*!50001 DROP VIEW IF EXISTS `paymentExchangeInsurance`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `paymentExchangeInsurance` AS SELECT - 1 AS `id`, - 1 AS `amount`, - 1 AS `created`, - 1 AS `dueDay`, - 1 AS `entityFk`, - 1 AS `ref`, - 1 AS `rate`, - 1 AS `companyFk`, - 1 AS `financialProductTypefk`, - 1 AS `upperBarrier`, - 1 AS `lowerBarrier`, - 1 AS `strike`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `payrollCenter` --- - -DROP TABLE IF EXISTS `payrollCenter`; -/*!50001 DROP VIEW IF EXISTS `payrollCenter`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `payrollCenter` AS SELECT - 1 AS `codCenter`, - 1 AS `name`, - 1 AS `nss`, - 1 AS `street`, - 1 AS `city`, - 1 AS `postcode`, - 1 AS `companyFk`, - 1 AS `companyCode`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `pedidosInternos` -- @@ -26945,34 +26068,6 @@ CREATE TABLE `pgcEqu` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Recoge las cuentas contables con recargo de equivalencia e identifica a la que corresponde al iva y la que corresponde al recargo'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `plantpassport` --- - -DROP TABLE IF EXISTS `plantpassport`; -/*!50001 DROP VIEW IF EXISTS `plantpassport`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `plantpassport` AS SELECT - 1 AS `producerFk`, - 1 AS `plantpassportAuthorityFk`, - 1 AS `number`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `plantpassportAuthority` --- - -DROP TABLE IF EXISTS `plantpassportAuthority`; -/*!50001 DROP VIEW IF EXISTS `plantpassportAuthority`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `plantpassportAuthority` AS SELECT - 1 AS `id`, - 1 AS `denomination`, - 1 AS `countryFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `postCode` -- @@ -27093,20 +26188,6 @@ CREATE TABLE `postCodeBack__` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `preparationException` --- - -DROP TABLE IF EXISTS `preparationException`; -/*!50001 DROP VIEW IF EXISTS `preparationException`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `preparationException` AS SELECT - 1 AS `exceptionDay`, - 1 AS `warehouseFk`, - 1 AS `percentage`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `priceBuilderTag__` -- @@ -27198,7 +26279,7 @@ CREATE TABLE `priceFixed` ( KEY `date_end` (`ended`), KEY `warehouse_id` (`warehouseFk`), CONSTRAINT `priceFixed_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=65055 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=65155 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -27249,31 +26330,6 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; --- --- Temporary view structure for view `priceFixed__` --- - -DROP TABLE IF EXISTS `priceFixed__`; -/*!50001 DROP VIEW IF EXISTS `priceFixed__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `priceFixed__` AS SELECT - 1 AS `itemFk`, - 1 AS `rate0`, - 1 AS `rate1`, - 1 AS `rate2`, - 1 AS `rate3`, - 1 AS `started`, - 1 AS `ended`, - 1 AS `bonus`, - 1 AS `warehouseFk`, - 1 AS `created`, - 1 AS `id`, - 1 AS `grouping`, - 1 AS `packing`, - 1 AS `box`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `printServerQueue` -- @@ -27303,72 +26359,9 @@ CREATE TABLE `printServerQueue` ( KEY `Id_Trabajador` (`workerFk`), CONSTRAINT `printServerQueue_ibfk_3` FOREIGN KEY (`priorityFk`) REFERENCES `queuePriority` (`id`) ON UPDATE CASCADE, CONSTRAINT `printServerQueue_ibfk_4` FOREIGN KEY (`printerFk`) REFERENCES `vn2008`.`Impresoras` (`Id_Impresora`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3795 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=17516 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `printServerQueue__` --- - -DROP TABLE IF EXISTS `printServerQueue__`; -/*!50001 DROP VIEW IF EXISTS `printServerQueue__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `printServerQueue__` AS SELECT - 1 AS `id`, - 1 AS `printerFk`, - 1 AS `priorityFk`, - 1 AS `reportFk`, - 1 AS `statusFk`, - 1 AS `started`, - 1 AS `finished`, - 1 AS `param1`, - 1 AS `workerFk`, - 1 AS `param2`, - 1 AS `param3`, - 1 AS `error`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `printer` --- - -DROP TABLE IF EXISTS `printer`; -/*!50001 DROP VIEW IF EXISTS `printer`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `printer` AS SELECT - 1 AS `id`, - 1 AS `path`, - 1 AS `name`, - 1 AS `reference`, - 1 AS `isLabeler`, - 1 AS `description`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `printingQueue` --- - -DROP TABLE IF EXISTS `printingQueue`; -/*!50001 DROP VIEW IF EXISTS `printingQueue`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `printingQueue` AS SELECT - 1 AS `id`, - 1 AS `printer`, - 1 AS `priority`, - 1 AS `report`, - 1 AS `state`, - 1 AS `startingTime`, - 1 AS `endingTime`, - 1 AS `text`, - 1 AS `worker`, - 1 AS `text2`, - 1 AS `text3`, - 1 AS `error`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `printingQueueCheck` -- @@ -27397,7 +26390,7 @@ CREATE TABLE `producer` ( `isVisible` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=17832 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=39907 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -27449,20 +26442,6 @@ CREATE TABLE `profileType` ( ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `promissoryNote` --- - -DROP TABLE IF EXISTS `promissoryNote`; -/*!50001 DROP VIEW IF EXISTS `promissoryNote`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `promissoryNote` AS SELECT - 1 AS `id`, - 1 AS `Concept`, - 1 AS `paymentFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `province` -- @@ -27486,7 +26465,7 @@ CREATE TABLE `province` ( CONSTRAINT `province_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE, CONSTRAINT `province_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `vn2008`.`zones` (`zone_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `warehouse_Id` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -27500,17 +26479,8 @@ DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`province_beforeInsert` BEFORE INSERT ON `province` FOR EACH ROW BEGIN - DECLARE vParentFk INT; - - IF NEW.`name` = '' THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'Column `name` cannot be empty'; - END IF; - - SELECT geoFk INTO vParentFk - FROM country WHERE id = NEW.countryFk; - - SET NEW.geoFk = zoneGeo_new('province', NEW.`name`, vParentFk); + SET NEW.geoFk = zoneGeo_new('province', NEW.`name`, + (SELECT geoFk FROM country WHERE id = NEW.countryFk)); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -27550,23 +26520,14 @@ DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`province_afterUpdate` AFTER UPDATE ON `province` FOR EACH ROW BEGIN - DECLARE vParentFk INT; - - IF !(OLD.`name` <=> NEW.`name`) THEN - IF NEW.`name` = '' THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'Column `name` cannot be empty'; - END IF; - - UPDATE zoneGeo SET `name` = NEW.`name` - WHERE id = NEW.geoFk; + IF !(OLD.countryFk <=> NEW.countryFk) THEN + CALL zoneGeo_setParent(NEW.geoFk, + (SELECT geoFk FROM country WHERE id = NEW.countryFk)); END IF; - IF !(OLD.countryFk <=> NEW.countryFk) THEN - SELECT geoFk INTO vParentFk - FROM country WHERE id = NEW.countryFk; - - CALL zoneGeo_setParent(NEW.geoFk, vParentFk); + IF !(OLD.`name` <=> NEW.`name`) THEN + UPDATE zoneGeo SET `name` = NEW.`name` + WHERE id = NEW.geoFk; END IF; END */;; DELIMITER ; @@ -27622,24 +26583,6 @@ CREATE TABLE `queuePriority` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `rate` --- - -DROP TABLE IF EXISTS `rate`; -/*!50001 DROP VIEW IF EXISTS `rate`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `rate` AS SELECT - 1 AS `id`, - 1 AS `dated`, - 1 AS `warehouseFk`, - 1 AS `rate0`, - 1 AS `rate1`, - 1 AS `rate2`, - 1 AS `rate3`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `rateConfig` -- @@ -27686,7 +26629,7 @@ CREATE TABLE `receipt` ( CONSTRAINT `receipt_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, CONSTRAINT `receipt_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE, CONSTRAINT `recibo_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=614423 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=616002 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -27805,20 +26748,6 @@ CREATE TABLE `referenceRateConfig` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `referenceRate__` --- - -DROP TABLE IF EXISTS `referenceRate__`; -/*!50001 DROP VIEW IF EXISTS `referenceRate__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `referenceRate__` AS SELECT - 1 AS `currencyFk`, - 1 AS `dated`, - 1 AS `value`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `role` -- @@ -27864,7 +26793,7 @@ CREATE TABLE `route` ( KEY `route_ibfk_2_idx` (`workerFk`), CONSTRAINT `route_ibfk_1` FOREIGN KEY (`gestdocFk`) REFERENCES `dms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `route_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=60738 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=61032 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -27955,7 +26884,7 @@ CREATE TABLE `routeComplement` ( KEY `fgn_routeActionFk_idx` (`routeActionFk`), CONSTRAINT `fgn_routeActionFk` FOREIGN KEY (`routeActionFk`) REFERENCES `routeAction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fgn_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1114 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1134 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28058,7 +26987,7 @@ CREATE TABLE `routeLog` ( KEY `userFk` (`userFk`), CONSTRAINT `routeLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `route` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `routeLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=217941 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=227044 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28101,22 +27030,6 @@ CREATE TABLE `routeUserPercentage` ( ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `routesControl` --- - -DROP TABLE IF EXISTS `routesControl`; -/*!50001 DROP VIEW IF EXISTS `routesControl`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `routesControl` AS SELECT - 1 AS `routeFk`, - 1 AS `expeditions`, - 1 AS `scanned`, - 1 AS `pallets`, - 1 AS `lastScanned`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `sale` -- @@ -28143,7 +27056,7 @@ CREATE TABLE `sale` ( KEY `itemFk_ticketFk` (`itemFk`,`ticketFk`), CONSTRAINT `movement_ticket_id` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sale_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=26550874 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=26610738 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -28358,7 +27271,7 @@ CREATE TABLE `saleTracking` ( KEY `saleTracking_fk2_idx` (`actionFk`), CONSTRAINT `fgnStateFk` FOREIGN KEY (`stateFk`) REFERENCES `state` (`id`) ON UPDATE CASCADE, CONSTRAINT `saleTracking_fk2` FOREIGN KEY (`actionFk`) REFERENCES `vncontrol`.`accion` (`accion_id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=21381834 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=21523116 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -28405,35 +27318,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `physicalVolume`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `salesToPrePrepare` --- - -DROP TABLE IF EXISTS `salesToPrePrepare`; -/*!50001 DROP VIEW IF EXISTS `salesToPrePrepare`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `salesToPrePrepare` AS SELECT - 1 AS `Id_Ticket`, - 1 AS `Id_Movimiento`, - 1 AS `Id_Movimiento_mark`, - 1 AS `Id_Trabjador`, - 1 AS `Id_Article`, - 1 AS `Concepte`, - 1 AS `subName`, - 1 AS `Cantidad`, - 1 AS `original_quantity`, - 1 AS `Hora`, - 1 AS `Departure`, - 1 AS `Minuto`, - 1 AS `agency_id`, - 1 AS `warehouse_id`, - 1 AS `province_id`, - 1 AS `picked`, - 1 AS `trabajador`, - 1 AS `sectorFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `sample` -- @@ -28492,7 +27376,7 @@ CREATE TABLE `sharingCart` ( KEY `Suplent` (`workerSubstitute`), CONSTRAINT `Suplent_key` FOREIGN KEY (`workerSubstitute`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `Trabajador_key` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2236 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2250 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -28668,7 +27552,7 @@ CREATE TABLE `sms` ( `status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=157507 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=158358 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28805,21 +27689,6 @@ CREATE TABLE `specialPrice` ( ) ENGINE=InnoDB AUTO_INCREMENT=713 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `specialPrice__` --- - -DROP TABLE IF EXISTS `specialPrice__`; -/*!50001 DROP VIEW IF EXISTS `specialPrice__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `specialPrice__` AS SELECT - 1 AS `id`, - 1 AS `clientFk`, - 1 AS `itemFk`, - 1 AS `value`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `state` -- @@ -28861,7 +27730,7 @@ CREATE TABLE `stockBuyed` ( UNIQUE KEY `date_UNIQUE` (`date`,`user`), KEY `stockBuyed_user_idx` (`user`), CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`user`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=857460 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=863187 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28924,7 +27793,7 @@ CREATE TABLE `supplier` ( CONSTRAINT `pay_dem_id` FOREIGN KEY (`payDemFk`) REFERENCES `payDem` (`id`) ON UPDATE CASCADE, CONSTRAINT `pay_met_id` FOREIGN KEY (`payMethodFk`) REFERENCES `payMethod` (`id`) ON UPDATE CASCADE, CONSTRAINT `province_id` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2980 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2992 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28949,7 +27818,7 @@ CREATE TABLE `supplierAccount` ( KEY `fk_proveedores_proveedores_account_idx` (`supplierFk`), KEY `fk_Proveedores_account_entity1_idx` (`bankEntityFk`), KEY `fk_banco_prov_account_idx` (`bankFk`) -) ENGINE=InnoDB AUTO_INCREMENT=891 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=893 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -28982,7 +27851,7 @@ CREATE TABLE `supplierExpense` ( CONSTRAINT `pago_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, CONSTRAINT `pago_moneda` FOREIGN KEY (`currencyFk`) REFERENCES `currency` (`id`) ON UPDATE CASCADE, CONSTRAINT `proveedor_pago` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29056,7 +27925,7 @@ CREATE TABLE `tag` ( PRIMARY KEY (`id`), KEY `tagEdiTypeFkIdx` (`ediTypeFk`), CONSTRAINT `fgnTag` FOREIGN KEY (`ediTypeFk`) REFERENCES `edi`.`type` (`type_id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Categorias para etiquetar los productos'; +) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Categorias para etiquetar los productos'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29236,6 +28105,7 @@ CREATE TABLE `ticket` ( `isBoxed` tinyint(2) NOT NULL DEFAULT '0', `isDeleted` tinyint(2) NOT NULL DEFAULT '0', `zoneFk` int(11) DEFAULT NULL, + `collectionFk` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `Id_Cliente` (`clientFk`), KEY `Id_Consigna` (`addressFk`), @@ -29248,6 +28118,7 @@ CREATE TABLE `ticket` ( KEY `warehouse_date` (`warehouseFk`,`shipped`), KEY `Fecha` (`shipped`,`clientFk`), KEY `tickets_zone_fk_idx` (`zoneFk`), + KEY `tickets_fk11_idx` (`collectionFk`), CONSTRAINT `ticket_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticket_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticket_ibfk_5` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE, @@ -29255,8 +28126,9 @@ CREATE TABLE `ticket` ( CONSTRAINT `ticket_ibfk_8` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`), CONSTRAINT `ticket_ibfk_9` FOREIGN KEY (`routeFk`) REFERENCES `route` (`id`) ON UPDATE CASCADE, CONSTRAINT `tickets_fk10` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE, + CONSTRAINT `tickets_fk11` FOREIGN KEY (`collectionFk`) REFERENCES `collection` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `tickets_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2504721 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2513084 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -29405,7 +28277,7 @@ CREATE TABLE `ticketCollection` ( KEY `ticketCollection_fk2_idx` (`ticketFk`), CONSTRAINT `ticketCollection_fk1` FOREIGN KEY (`collectionFk`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticketCollection_fk2` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=919 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1241 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29477,22 +28349,6 @@ CREATE TABLE `ticketDown` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Cola de impresion para los tickets que se van a solicitar al altillo'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `ticketDownBuffer` --- - -DROP TABLE IF EXISTS `ticketDownBuffer`; -/*!50001 DROP VIEW IF EXISTS `ticketDownBuffer`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `ticketDownBuffer` AS SELECT - 1 AS `ticketFk`, - 1 AS `created`, - 1 AS `selected`, - 1 AS `sacador`, - 1 AS `parking`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `ticketDown_SelectionType` -- @@ -29566,7 +28422,7 @@ CREATE TABLE `ticketLog` ( KEY `logTicketuserFk` (`userFk`), CONSTRAINT `ticketLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticketLog_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=8332163 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8404073 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29603,24 +28459,9 @@ CREATE TABLE `ticketObservation` ( KEY `observation_type_id` (`observationTypeFk`), CONSTRAINT `ticketObservation_ibfk_1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticketObservation_ibfk_2` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1525157 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket'; +) ENGINE=InnoDB AUTO_INCREMENT=1530354 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `ticketObservation__` --- - -DROP TABLE IF EXISTS `ticketObservation__`; -/*!50001 DROP VIEW IF EXISTS `ticketObservation__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `ticketObservation__` AS SELECT - 1 AS `id`, - 1 AS `ticketFk`, - 1 AS `observationTypeFk`, - 1 AS `description`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `ticketPackage` -- @@ -29658,7 +28499,7 @@ CREATE TABLE `ticketPackaging` ( CONSTRAINT `ticketPackaging_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticketPackaging_fk2` FOREIGN KEY (`packagingFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE, CONSTRAINT `ticketPackaging_fk3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=78708 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=79173 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -29721,7 +28562,7 @@ CREATE TABLE `ticketParking` ( KEY `ticketParking_fk1_idx` (`parkingFk`), CONSTRAINT `ticketParking_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ticketParking_fk2` FOREIGN KEY (`parkingFk`) REFERENCES `parking` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=15354 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos'; +) ENGINE=InnoDB AUTO_INCREMENT=16658 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29787,7 +28628,7 @@ CREATE TABLE `ticketRequest` ( CONSTRAINT `fgnAtender` FOREIGN KEY (`atenderFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `fgnRequester` FOREIGN KEY (`requesterFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE, CONSTRAINT `fgnTicket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=52480 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=52591 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -29860,11 +28701,14 @@ CREATE TABLE `ticketService` ( `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00', `taxClassFk` tinyint(3) unsigned DEFAULT NULL, `ticketFk` int(11) NOT NULL, + `ticketServiceTypeFk` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `ticketServiceIvaGroup_idx` (`taxClassFk`), KEY `fgn_ticketFk_idx` (`ticketFk`), + KEY `ticketService_ticketServiceType_idx` (`ticketServiceTypeFk`), CONSTRAINT `fgn_ticketFk` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `ticketServiceIvaGroup` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE + CONSTRAINT `ticketServiceIvaGroup` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE, + CONSTRAINT `ticketService_ticketServiceType` FOREIGN KEY (`ticketServiceTypeFk`) REFERENCES `ticketServiceType` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Servicios asociadas a un ticket'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -29877,9 +28721,12 @@ DROP TABLE IF EXISTS `ticketServiceType`; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `ticketServiceType` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de los posibles servicios a elegir'; + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `expenceFk` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '7001000000', + PRIMARY KEY (`id`), + KEY `ticketServiceType_expence_idx` (`expenceFk`), + CONSTRAINT `ticketServiceType_expence` FOREIGN KEY (`expenceFk`) REFERENCES `expence` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='Lista de los posibles servicios a elegir'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -29924,35 +28771,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `isPicked`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `ticketToPrepare` --- - -DROP TABLE IF EXISTS `ticketToPrepare`; -/*!50001 DROP VIEW IF EXISTS `ticketToPrepare`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `ticketToPrepare` AS SELECT - 1 AS `Id_Ticket`, - 1 AS `Id_Movimiento`, - 1 AS `Id_Movimiento_mark`, - 1 AS `Id_Trabjador`, - 1 AS `Id_Article`, - 1 AS `Concepte`, - 1 AS `subName`, - 1 AS `Cantidad`, - 1 AS `original_quantity`, - 1 AS `Hora`, - 1 AS `Departure`, - 1 AS `Minuto`, - 1 AS `agency_id`, - 1 AS `warehouse_id`, - 1 AS `province_id`, - 1 AS `picked`, - 1 AS `zoneFk`, - 1 AS `sectorFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `ticketTracking` -- @@ -30010,38 +28828,9 @@ CREATE TABLE `ticketWeekly` ( `weekDay` tinyint(1) DEFAULT NULL COMMENT 'funcion de mysql Lunes = 0, Domingo = 6', PRIMARY KEY (`ticketFk`), CONSTRAINT `Id_Ticket_fk` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2491202 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2511082 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `ticketeToPreparePrepared` --- - -DROP TABLE IF EXISTS `ticketeToPreparePrepared`; -/*!50001 DROP VIEW IF EXISTS `ticketeToPreparePrepared`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `ticketeToPreparePrepared` AS SELECT - 1 AS `Id_Ticket`, - 1 AS `Id_Movimiento`, - 1 AS `Id_Movimiento_mark`, - 1 AS `Id_Trabjador`, - 1 AS `Id_Article`, - 1 AS `Concepte`, - 1 AS `subName`, - 1 AS `Cantidad`, - 1 AS `original_quantity`, - 1 AS `Hora`, - 1 AS `Departure`, - 1 AS `Minuto`, - 1 AS `agency_id`, - 1 AS `warehouse_id`, - 1 AS `province_id`, - 1 AS `picked`, - 1 AS `trabajador`, - 1 AS `sectorFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `till` -- @@ -30080,7 +28869,7 @@ CREATE TABLE `till` ( KEY `fk_Cajas_Proveedores_account1_idx` (`supplierAccountFk`), CONSTRAINT `till_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE, CONSTRAINT `till_ibfk_3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=748410 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=750528 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -30118,46 +28907,6 @@ CREATE TABLE `tillConfig` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `till__` --- - -DROP TABLE IF EXISTS `till__`; -/*!50001 DROP VIEW IF EXISTS `till__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `till__` AS SELECT - 1 AS `id`, - 1 AS `dated`, - 1 AS `serie`, - 1 AS `concept`, - 1 AS `in`, - 1 AS `out`, - 1 AS `bankFk`, - 1 AS `companyFk`, - 1 AS `isAccountable`, - 1 AS `inForeignValue`, - 1 AS `outForeignValue`, - 1 AS `workerFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `time` --- - -DROP TABLE IF EXISTS `time`; -/*!50001 DROP VIEW IF EXISTS `time`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `time` AS SELECT - 1 AS `dated`, - 1 AS `period`, - 1 AS `month`, - 1 AS `year`, - 1 AS `day`, - 1 AS `week`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `town` -- @@ -30303,7 +29052,7 @@ CREATE TABLE `trainingCourse` ( CONSTRAINT `frgnCenter` FOREIGN KEY (`centerFk`) REFERENCES `trainingCenter` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `frgnTrainingCourseType` FOREIGN KEY (`trainingCourseTypeFk`) REFERENCES `trainingCourseType` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `frgnWorker` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=444 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación'; +) ENGINE=InnoDB AUTO_INCREMENT=451 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -30355,7 +29104,7 @@ CREATE TABLE `travel` ( CONSTRAINT `travel_ibfk_2` FOREIGN KEY (`warehouseOutFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `travel_ibfk_3` FOREIGN KEY (`agencyFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE, CONSTRAINT `travel_ibfk_4` FOREIGN KEY (`cargoSupplierFk`) REFERENCES `vn2008`.`Proveedores_cargueras` (`Id_Proveedor`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=142546 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB AUTO_INCREMENT=143477 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -30494,112 +29243,6 @@ CREATE TABLE `travelThermograph` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Registra cada termografo que se ha introducido en cada travel'; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `travelThermograph__` --- - -DROP TABLE IF EXISTS `travelThermograph__`; -/*!50001 DROP VIEW IF EXISTS `travelThermograph__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `travelThermograph__` AS SELECT - 1 AS `thermographFk`, - 1 AS `created`, - 1 AS `warehouseFk`, - 1 AS `travelFk`, - 1 AS `temperature`, - 1 AS `result`, - 1 AS `dmsFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `travel_cloneWeekly` --- - -DROP TABLE IF EXISTS `travel_cloneWeekly`; -/*!50001 DROP VIEW IF EXISTS `travel_cloneWeekly`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `travel_cloneWeekly` AS SELECT - 1 AS `id`, - 1 AS `warehouseOutFk`, - 1 AS `warehouseInFk`, - 1 AS `agencyModeFk`, - 1 AS `weekDay`, - 1 AS `duration`, - 1 AS `ref`, - 1 AS `cargoSupplierFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `unary` --- - -DROP TABLE IF EXISTS `unary`; -/*!50001 DROP VIEW IF EXISTS `unary`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `unary` AS SELECT - 1 AS `id`, - 1 AS `parent`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `unaryScan` --- - -DROP TABLE IF EXISTS `unaryScan`; -/*!50001 DROP VIEW IF EXISTS `unaryScan`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `unaryScan` AS SELECT - 1 AS `unaryFk`, - 1 AS `name`, - 1 AS `created`, - 1 AS `type`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `unaryScanLine` --- - -DROP TABLE IF EXISTS `unaryScanLine`; -/*!50001 DROP VIEW IF EXISTS `unaryScanLine`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `unaryScanLine` AS SELECT - 1 AS `id`, - 1 AS `code`, - 1 AS `created`, - 1 AS `unaryScanFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `unaryScanLineBuy` --- - -DROP TABLE IF EXISTS `unaryScanLineBuy`; -/*!50001 DROP VIEW IF EXISTS `unaryScanLineBuy`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `unaryScanLineBuy` AS SELECT - 1 AS `unaryScanLineFk`, - 1 AS `itemFk`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `unaryScanLineExpedition` --- - -DROP TABLE IF EXISTS `unaryScanLineExpedition`; -/*!50001 DROP VIEW IF EXISTS `unaryScanLineExpedition`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `unaryScanLineExpedition` AS SELECT - 1 AS `unaryScanLineFk`, - 1 AS `expeditionFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Temporary view structure for view `user` -- @@ -30652,10 +29295,13 @@ CREATE TABLE `vehicle` ( `isActive` tinyint(4) NOT NULL DEFAULT '1', `warehouseFk` smallint(6) unsigned DEFAULT NULL, `description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, + `deliveryPointFk` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `empresa_id` (`companyFk`), KEY `provinceFk_idx` (`warehouseFk`), + KEY `vehicle_deliveryPointFk_idx` (`deliveryPointFk`), CONSTRAINT `provinceFk` FOREIGN KEY (`warehouseFk`) REFERENCES `province` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `vehicle_deliveryPointFk` FOREIGN KEY (`deliveryPointFk`) REFERENCES `deliveryPoint` (`id`) ON UPDATE CASCADE, CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=453 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -30752,32 +29398,6 @@ CREATE TABLE `warehouseAlias` ( ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Temporary view structure for view `warehouseAlias__` --- - -DROP TABLE IF EXISTS `warehouseAlias__`; -/*!50001 DROP VIEW IF EXISTS `warehouseAlias__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `warehouseAlias__` AS SELECT - 1 AS `id`, - 1 AS `name`*/; -SET character_set_client = @saved_cs_client; - --- --- Temporary view structure for view `warehouseJoined` --- - -DROP TABLE IF EXISTS `warehouseJoined`; -/*!50001 DROP VIEW IF EXISTS `warehouseJoined`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `warehouseJoined` AS SELECT - 1 AS `warehouseFk`, - 1 AS `warehouseAliasFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `workCenter` -- @@ -30854,7 +29474,7 @@ CREATE TABLE `worker` ( KEY `empresa_id` (`companyFk`), CONSTRAINT `Clientes` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE, CONSTRAINT `worker_ibfk_1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=101329 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=101330 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -31001,7 +29621,7 @@ CREATE TABLE `workerDocument` ( KEY `workerDocument_ibfk_2` (`document`), CONSTRAINT `workerDocument_ibfk_1` FOREIGN KEY (`worker`) REFERENCES `worker` (`userFk`) ON UPDATE CASCADE, CONSTRAINT `workerDocument_ibfk_2` FOREIGN KEY (`document`) REFERENCES `dms` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=12963 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=12991 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -31066,7 +29686,7 @@ CREATE TABLE `workerJourney` ( UNIQUE KEY `userFk_UNIQUE` (`userFk`,`dated`), KEY `fk_workerJourney_user_idx` (`userFk`), CONSTRAINT `fk_workerJourney_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=65513384 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=66102133 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -31105,7 +29725,7 @@ CREATE TABLE `workerLog` ( KEY `userFk_idx` (`userFk`), CONSTRAINT `userFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `workerFk` FOREIGN KEY (`originFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=16287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=16399 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -31152,20 +29772,6 @@ SET @saved_cs_client = @@character_set_client; 1 AS `collegueFk`*/; SET character_set_client = @saved_cs_client; --- --- Temporary view structure for view `workerTeam__` --- - -DROP TABLE IF EXISTS `workerTeam__`; -/*!50001 DROP VIEW IF EXISTS `workerTeam__`*/; -SET @saved_cs_client = @@character_set_client; -/*!50503 SET character_set_client = utf8mb4 */; -/*!50001 CREATE VIEW `workerTeam__` AS SELECT - 1 AS `team`, - 1 AS `id`, - 1 AS `workerFk`*/; -SET character_set_client = @saved_cs_client; - -- -- Table structure for table `workerTimeControl` -- @@ -31186,7 +29792,7 @@ CREATE TABLE `workerTimeControl` ( KEY `warehouseFkfk1_idx` (`warehouseFk`), CONSTRAINT `warehouseFk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `workerTimeControl_fk1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=8308187 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas'; +) ENGINE=InnoDB AUTO_INCREMENT=8312462 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -31542,7 +30148,7 @@ CREATE TABLE `zone` ( KEY `zone_name_idx` (`name`), CONSTRAINT `fk_zone_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT `fk_zone_2` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=489 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=491 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -31584,7 +30190,7 @@ CREATE TABLE `zoneGeo` ( KEY `name_idx` (`name`), KEY `parentFk` (`parentFk`), KEY `path` (`path`) -) ENGINE=InnoDB AUTO_INCREMENT=597478 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=597479 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -32722,9 +31328,9 @@ 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_general_ci */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; @@ -32749,7 +31355,7 @@ BEGIN FROM worker WHERE id = vSalesPersonFk; - RETURN IFNULL(vWorkerCode, '---'); + RETURN vWorkerCode; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -40209,14 +38815,57 @@ 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 = utf8 */ ; -/*!50003 SET character_set_results = utf8 */ ; -/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`%` PROCEDURE `invoiceExpenceMake`(IN vInvoice INT) BEGIN +/* Inserta las partidas de gasto correspondientes a la factura + * REQUIERE tabla ticketToInvoice + * @param vInvoice Numero de factura + */ + DELETE FROM invoiceOutExpence + WHERE invoiceOutFk = vInvoice; + + INSERT INTO invoiceOutExpence(invoiceOutFk, expenceFk, amount) + SELECT vInvoice, + expenceFk, + SUM(ROUND(quantity * price * (100 - discount)/100,2)) amount + FROM ticketToInvoice t + JOIN sale s ON s.ticketFk = t.id + JOIN item i ON i.id = s.itemFk + GROUP BY i.expenceFk + HAVING amount != 0; + + INSERT INTO invoiceOutExpence(invoiceOutFk, expenceFk, amount) + SELECT vInvoice, + tst.expenceFk, + SUM(ROUND(ts.quantity * ts.price ,2)) amount + FROM ticketToInvoice t + JOIN ticketService ts ON ts.ticketFk = t.id + JOIN ticketServiceType tst ON tst.id = ts.ticketServiceTypeFk + HAVING amount != 0; +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 DROP PROCEDURE IF EXISTS `invoiceExpenceMake__` */; +/*!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 @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `invoiceExpenceMake__`(IN vInvoice INT) +BEGIN /* Inserta las partidas de gasto correspondientes a la factura * REQUIERE tabla ticketToInvoice * @@ -41120,7 +39769,7 @@ BEGIN io.companyFk, RIGHT(io.ref, LENGTH(io.ref) - 1) AS invoiceNum, IF(ct.politicalCountryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember = vIsUeeMember,2,4)) AS TERIDNIF, - CONCAT(IF(ct.isUeeMember = vIsUeeMember,ct.code,''),c.fi) AS TERNIF, + CONCAT(IF(ct.isUeeMember = vIsUeeMember AND ct.politicalCountryFk <> vSpainCountryFk,ct.code,''),c.fi) AS TERNIF, c.socialName AS TERNOM, ior.serial AS SERIE_RT, RIGHT(ior.ref, LENGTH(ior.ref) - 1) AS FACTU_RT, @@ -47040,6 +45689,80 @@ DELIMITER ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; +/*!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 = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `sale_calculateComponent`(vSale INT, vOption INT) +proc: BEGIN + + DECLARE vShipped DATE; + DECLARE vWarehouseFk SMALLINT; + DECLARE vAgencyModeFk INT; + DECLARE vAddressFk INT; + DECLARE vTicket BIGINT; + DECLARE vItem BIGINT; + DECLARE vLanded DATE; + DECLARE vTicketFree BOOLEAN DEFAULT TRUE; + DECLARE vZoneFk INTEGER; + + SELECT NOT (t.refFk IS NOT NULL OR ts.alertLevel > 0) OR s.price = 0, s.ticketFk, s.itemFk , t.zoneFk + INTO vTicketFree, vTicket, vItem, vZoneFk + FROM vn.ticket t + JOIN vn.sale s ON s.ticketFk = t.id + LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id + WHERE s.id = vSale + LIMIT 1; + + SELECT t.warehouseFk, DATE(t.shipped), t.addressFk, t.agencyModeFk, t.landed + INTO vWarehouseFk, vShipped, vAddressFk, vAgencyModeFk, vLanded + FROM agencyMode a + JOIN ticket t ON t.agencyModeFk = a.id + WHERE t.id = vTicket; + + IF IFNULL(vZoneFk,0) = 0 THEN + CALL util.throw('ticket dont have zone'); + END IF; + + CALL buyUltimate (vWarehouseFk, vShipped); + + DELETE FROM tmp.buyUltimate WHERE itemFk != vItem; + + DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; + CREATE TEMPORARY TABLE tmp.ticketLot + SELECT vWarehouseFk warehouseFk, NULL available, vItem itemFk, buyFk + FROM tmp.buyUltimate + WHERE itemFk = vItem; + + CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped); + + DROP TEMPORARY TABLE IF EXISTS tmp.sale; + CREATE TEMPORARY TABLE tmp.sale + (PRIMARY KEY (saleFk)) ENGINE = MEMORY + SELECT vSale saleFk,vWarehouseFk warehouseFk; + + IF vOption IS NULL THEN + SET vOption = IF(vTicketFree,1,6); + END IF; + + CALL ticketComponentUpdateSale(vOption); + + INSERT INTO vn.ticketLog (originFk, userFk, `action`, description) + VALUES (vTicket, account.userGetId(), 'update', CONCAT('Bionizo linea id ', vSale)); + + 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 DROP PROCEDURE IF EXISTS `saveLoadWorker` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -48391,7 +47114,7 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateSale`(IN vSale BIGINT) proc: BEGIN - +-- OBSOLETO USAR: sale_calculateComponent(vSale, NULL) DECLARE vShipped DATE; DECLARE vWarehouseFk SMALLINT; DECLARE vAgencyModeFk INT; @@ -55200,7 +53923,7 @@ CREATE TABLE `inter` ( CONSTRAINT `inter_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn`.`ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `inter_state` FOREIGN KEY (`state_id`) REFERENCES `vn`.`state` (`id`) ON UPDATE CASCADE, CONSTRAINT `responsable` FOREIGN KEY (`Id_Supervisor`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=22003588 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=22140483 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -55544,24 +54267,6 @@ USE `bi`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `last_Id_Cubo` --- - -/*!50001 DROP VIEW IF EXISTS `last_Id_Cubo`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `last_Id_Cubo` AS select `C`.`Id_Compra` AS `Id_Compra`,`C`.`Id_Article` AS `Id_Article`,`tr`.`warehouse_id` AS `warehouse_id`,`C`.`Id_Cubo` AS `Id_Cubo`,`C`.`Packing` AS `Packing` from ((`vn2008`.`Compres` `C` join `vn2008`.`Entradas` `E` on((`C`.`Id_Entrada` = `E`.`Id_Entrada`))) join `vn2008`.`travel` `tr` on((`E`.`travel_id` = `tr`.`id`))) where ((`C`.`Id_Cubo` is not null) and (`C`.`Id_Cubo` <> '--') and (`tr`.`landing` > (curdate() - interval 18 month))) order by `C`.`Id_Compra` desc */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `saleVolume` -- @@ -55580,66 +54285,12 @@ USE `bi`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `v_clientes_jerarquia` --- - -/*!50001 DROP VIEW IF EXISTS `v_clientes_jerarquia`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `v_clientes_jerarquia` AS select `c`.`id_cliente` AS `Id_Cliente`,`c`.`cliente` AS `Cliente`,`t`.`CodigoTrabajador` AS `Comercial`,`tj`.`CodigoTrabajador` AS `Jefe` from (((`vn2008`.`Clientes` `c` join `vn2008`.`Trabajadores` `t` on((`t`.`Id_Trabajador` = `c`.`Id_Trabajador`))) join `vn2008`.`jerarquia` on((`vn2008`.`jerarquia`.`worker_id` = `c`.`Id_Trabajador`))) join `vn2008`.`Trabajadores` `tj` on((`tj`.`Id_Trabajador` = `vn2008`.`jerarquia`.`boss_id`))) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `v_ventas_contables` --- - -/*!50001 DROP VIEW IF EXISTS `v_ventas_contables`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `v_ventas_contables` AS select `vn2008`.`time`.`year` AS `year`,`vn2008`.`time`.`month` AS `month`,cast(sum((((`m`.`Cantidad` * `m`.`Preu`) * (100 - `m`.`Descuento`)) / 100)) as decimal(10,0)) AS `importe` from (((`vn2008`.`Tickets` `t` join `bi`.`f_tvc` on((`t`.`Id_Ticket` = `bi`.`f_tvc`.`Id_Ticket`))) join `vn2008`.`Movimientos` `m` on((`t`.`Id_Ticket` = `m`.`Id_Ticket`))) join `vn2008`.`time` on((`vn2008`.`time`.`date` = cast(`t`.`Fecha` as date)))) where (`t`.`Fecha` >= '2014-01-01') group by `vn2008`.`time`.`year`,`vn2008`.`time`.`month` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Current Database: `bs` -- USE `bs`; --- --- Final view structure for view `VentasPorCliente` --- - -/*!50001 DROP VIEW IF EXISTS `VentasPorCliente`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `VentasPorCliente` AS select `v`.`Id_Cliente` AS `Id_Cliente`,round(sum(`v`.`importe`),0) AS `VentaBasica`,`t`.`year` AS `year`,`t`.`month` AS `month` from (`vn2008`.`time` `t` join `bs`.`ventas` `v` on((`v`.`fecha` = `t`.`date`))) group by `v`.`Id_Cliente`,`t`.`year`,`t`.`month` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `bajasLaborales` -- @@ -55658,24 +54309,6 @@ USE `bs`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `horasSilla` --- - -/*!50001 DROP VIEW IF EXISTS `horasSilla`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `horasSilla` AS select `wj`.`dated` AS `Fecha`,`d`.`name` AS `Departamento`,cast(sum(`wj`.`total`) as decimal(10,2)) AS `Horas`,cast(sum(((`wj`.`total` + `wj`.`lunch`) * `wj`.`priceOrdinaryHour`)) as decimal(10,2)) AS `Salarios` from ((`vn`.`workerJourney` `wj` join `postgresql`.`business_labour` `bl` on((`bl`.`business_id` = `wj`.`businessFk`))) join `vn2008`.`department` `d` on((`d`.`department_id` = `bl`.`department_id`))) where (`d`.`name` in ('CAMARA','ENCAJADO','PALETIZADORES','PRODUCCION','SACADORES')) group by `wj`.`dated`,`d`.`name` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `lastIndicators` -- @@ -55766,42 +54399,6 @@ USE `bs`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `productionIndicators` --- - -/*!50001 DROP VIEW IF EXISTS `productionIndicators`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `productionIndicators` AS select `wj`.`dated` AS `dated`,cast(sum((`wj`.`total` + `wj`.`lunch`)) as decimal(10,1)) AS `productionHours`,cast(sum(((`wj`.`total` + `wj`.`lunch`) * `wj`.`priceOrdinaryHour`)) as decimal(10,0)) AS `dailyWorkersCost`,`ms`.`Volumen` AS `VolumeM3`,`ms`.`Euros` AS `salesValue`,cast((`ms`.`Euros` / `ms`.`Volumen`) as decimal(10,0)) AS `valueM3`,cast((sum((`wj`.`total` + `wj`.`lunch`)) / `ms`.`Volumen`) as decimal(5,2)) AS `hoursM3`,`ms`.`dayName` AS `Dia`,cast((sum(((`wj`.`total` + `wj`.`lunch`) * `wj`.`priceOrdinaryHour`)) / `ms`.`Volumen`) as decimal(10,1)) AS `workerCostM3`,cast((sum(((`wj`.`total` + `wj`.`lunch`) * `wj`.`priceOrdinaryHour`)) / `ms`.`Euros`) as decimal(10,2)) AS `salesWorkersCostRate` from (((`vn`.`workerJourney` `wj` join `postgresql`.`business_labour` `bl` on((`bl`.`business_id` = `wj`.`businessFk`))) join `vn2008`.`department` `d` on((`d`.`department_id` = `bl`.`department_id`))) join `bs`.`m3Silla` `ms` on((`ms`.`fecha` = `wj`.`dated`))) where (`d`.`production` and (`wj`.`dated` >= '2017-01-01')) group by `wj`.`dated` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `v_ventas` --- - -/*!50001 DROP VIEW IF EXISTS `v_ventas`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `v_ventas` AS select (`bs`.`ventas`.`importe` * `Movimientos`.`Cantidad`) AS `importe`,`bs`.`ventas`.`recargo` AS `recargo`,`vn2008`.`time`.`year` AS `year`,`vn2008`.`time`.`month` AS `month`,`vn2008`.`time`.`week` AS `week`,`vn2008`.`time`.`day` AS `day` from ((`bs`.`ventas` join `vn2008`.`time` on((`vn2008`.`time`.`date` = `bs`.`ventas`.`fecha`))) join `vn2008`.`Movimientos` on((`bs`.`ventas`.`Id_Movimiento` = `Movimientos`.`Id_Movimiento`))) group by `vn2008`.`time`.`date` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `workerMana` -- @@ -55832,24 +54429,6 @@ USE `cache`; USE `edi`; --- --- Final view structure for view `supplyOffer` --- - -/*!50001 DROP VIEW IF EXISTS `supplyOffer`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `supplyOffer` AS select `di`.`ID` AS `diId`,`sr`.`ID` AS `srId`,`sr`.`Item_ArticleCode` AS `Item_ArticleCode`,`sr`.`VBNOmschrijving` AS `product_name`,`s`.`company_name` AS `company_name`,`sr`.`Price` AS `Price`,`sr`.`Quality` AS `Quality`,`sr`.`s1` AS `s1`,`sr`.`s2` AS `s2`,`sr`.`s3` AS `s3`,`sr`.`s4` AS `s4`,`sr`.`s5` AS `s5`,`sr`.`s6` AS `s6`,`sr`.`NumberOfUnits` AS `NumberOfUnits`,`sr`.`EmbalageCode` AS `EmbalageCode`,`di`.`LatestDeliveryDateTime` AS `LatestDeliveryDateTime`,`di`.`EarliestDespatchDateTime` AS `EarliestDespatchDateTime`,`di`.`FirstOrderDateTime` AS `FirstOrderDateTime`,`di`.`LatestOrderDateTime` AS `LatestOrderDateTime`,`sr`.`NumberOfItemsPerCask` AS `NumberOfItemsPerCask`,`sr`.`NumberOfLayersPerTrolley` AS `NumberOfLayersPerTrolley`,`sr`.`MinimumNumberToOrder` AS `MinimumNumberToOrder`,`sr`.`MaximumNumberToOrder` AS `MaximumNumberToOrder`,`sr`.`IncrementalOrderableQuantity` AS `IncrementalOrderableQuantity`,`sr`.`PackingPrice` AS `PackingPrice`,`sr`.`MarketPlaceID` AS `MarketPlaceID`,`sr`.`PictureReference` AS `PictureReference`,`mp`.`name` AS `marketPlace`,cast((`sr`.`MinimumNumberToOrder` * (case `sr`.`MinimumOrderUnitType` when 1 then 1 when 2 then (`sr`.`NumberOfItemsPerCask` / `sr`.`NumberBunchesPerCask`) when 3 then `sr`.`NumberOfItemsPerCask` when 4 then (floor(((128 * 56) / (`c`.`X` * `c`.`Y`))) * `sr`.`NumberOfItemsPerCask`) when 5 then ((floor(((128 * 56) / (`c`.`X` * `c`.`Y`))) * `sr`.`NumberOfItemsPerCask`) * `sr`.`NumberOfLayersPerTrolley`) end)) as decimal(10,0)) AS `OrderUnit`,cast((`sr`.`IncrementalOrderableQuantity` * (case `sr`.`IncrementalOrderableQuantityType` when 1 then 1 when 2 then (`sr`.`NumberOfItemsPerCask` / `sr`.`NumberBunchesPerCask`) when 3 then `sr`.`NumberOfItemsPerCask` when 4 then (floor(((128 * 56) / (`c`.`X` * `c`.`Y`))) * `sr`.`NumberOfItemsPerCask`) when 5 then ((floor(((128 * 56) / (`c`.`X` * `c`.`Y`))) * `sr`.`NumberOfItemsPerCask`) * `sr`.`NumberOfLayersPerTrolley`) end)) as decimal(10,0)) AS `IncrementalOrderUnit` from ((((((`edi`.`deliveryInformation` `di` join `edi`.`supplyResponse` `sr` on((`sr`.`ID` = `di`.`supplyResponseID`))) join `edi`.`supplier` `s` on((`s`.`glnAddressCode` = `sr`.`SupplierGLN`))) join `edi`.`bucket` `b` on((`b`.`bucket_id` = `sr`.`EmbalageCode`))) join `edi`.`item` `i` on((`i`.`id` = `sr`.`Item_ArticleCode`))) join `vn2008`.`Cubos` `c` on((`c`.`Id_Cubo` = `sr`.`EmbalageCode`))) left join `edi`.`marketPlace` `mp` on((`mp`.`id` = `sr`.`MarketPlaceID`))) where ((`sr`.`NumberOfUnits` > 0) and (now() between `di`.`FirstOrderDateTime` and `di`.`LatestOrderDateTime`)) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Current Database: `hedera` -- @@ -56312,24 +54891,6 @@ USE `pbx`; USE `postgresql`; --- --- Final view structure for view `currentWorkersStats` --- - -/*!50001 DROP VIEW IF EXISTS `currentWorkersStats`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `currentWorkersStats` AS select `b`.`business_id` AS `business_id`,`p`.`sex` AS `sex`,`p`.`name` AS `name`,`p`.`firstname` AS `firstname`,`d`.`name` AS `department`,`pc`.`category_name` AS `category_name`,`pl`.`level_name` AS `level_name`,cast(((40 * `blp`.`importepactado`) / `clt`.`hours_week`) as decimal(10,2)) AS `salarioMedio` from ((((((((`postgresql`.`person` `p` join `postgresql`.`profile` `pr` on((`pr`.`person_id` = `p`.`person_id`))) join `postgresql`.`business` `b` on((`b`.`client_id` = `pr`.`profile_id`))) join `postgresql`.`business_labour` `bl` on((`bl`.`business_id` = `b`.`business_id`))) join `vn2008`.`department` `d` on((`d`.`department_id` = `bl`.`department_id`))) join `postgresql`.`professional_category` `pc` on((`pc`.`professional_category_id` = `bl`.`professional_category_id`))) join `postgresql`.`professional_levels` `pl` on((`pl`.`professional_levels_id` = `pc`.`professional_levels_id`))) join `postgresql`.`business_labour_payroll` `blp` on((`blp`.`business_id` = `b`.`business_id`))) join `postgresql`.`calendar_labour_type` `clt` on((`clt`.`calendar_labour_type_id` = `bl`.`calendar_labour_type_id`))) where ((`b`.`date_start` <= curdate()) and (ifnull(`b`.`date_end`,curdate()) >= curdate()) and (`b`.`provider_id` = 442)) order by `blp`.`importepactado` desc */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Current Database: `salix` -- @@ -56408,24 +54969,6 @@ USE `util`; USE `vn`; --- --- Final view structure for view `XDiario__` --- - -/*!50001 DROP VIEW IF EXISTS `XDiario__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `XDiario__` AS select `d`.`id` AS `id`,`d`.`ASIEN` AS `ASIEN`,`d`.`FECHA` AS `FECHA`,`d`.`SUBCTA` AS `SUBCTA`,`d`.`CONTRA` AS `CONTRA`,`d`.`CONCEPTO` AS `CONCEPTO`,`d`.`EURODEBE` AS `EURODEBE`,`d`.`EUROHABER` AS `EUROHABER`,`d`.`BASEEURO` AS `BASEEURO`,`d`.`SERIE` AS `SERIE`,`d`.`FACTURA` AS `FACTURA`,`d`.`BASEIMPO` AS `BASEIMPO`,`d`.`IVA` AS `IVA`,`d`.`RECEQUIV` AS `RECEQUIV`,`d`.`DOCUMENTO` AS `DOCUMENTO`,`d`.`DEPARTA` AS `DEPARTA`,`d`.`CLAVE` AS `CLAVE`,`d`.`ESTADO` AS `ESTADO`,`d`.`NCASADO` AS `NCASADO`,`d`.`TCASADO` AS `TCASADO`,`d`.`TRANS` AS `TRANS`,`d`.`CAMBIO` AS `CAMBIO`,`d`.`DEBEME` AS `DEBEME`,`d`.`HABERME` AS `HABERME`,`d`.`PTAHABER` AS `PTAHABER`,`d`.`AUXILIAR` AS `AUXILIAR`,`d`.`SUCURSAL` AS `SUCURSAL`,`d`.`PTADEBE` AS `PTADEBE`,`d`.`CODDIVISA` AS `CODDIVISA`,`d`.`IMPAUXME` AS `IMPAUXME`,`d`.`MONEDAUSO` AS `MONEDAUSO`,`d`.`NOCONV` AS `NOCONV`,`d`.`NUMEROINV` AS `NUMEROINV`,`d`.`TIPOOPE` AS `TIPOOPE`,`d`.`NFACTICK` AS `NFACTICK`,`d`.`TERIDNIF` AS `TERIDNIF`,`d`.`TERNIF` AS `TERNIF`,`d`.`TERNOM` AS `TERNOM`,`d`.`OPBIENES` AS `OPBIENES`,`d`.`TIPOFAC` AS `TIPOFAC`,`d`.`TIPOIVA` AS `TIPOIVA`,`d`.`L340` AS `L340`,`d`.`enlazado` AS `enlazado`,`d`.`FECHA_EX` AS `FECHA_EX`,`d`.`LRECT349` AS `LRECT349`,`d`.`empresa_id` AS `empresa_id`,`d`.`LDIFADUAN` AS `LDIFADUAN`,`d`.`METAL` AS `METAL`,`d`.`METALIMP` AS `METALIMP`,`d`.`CLIENTE` AS `CLIENTE`,`d`.`METALEJE` AS `METALEJE`,`d`.`FECHA_OP` AS `FECHA_OP`,`d`.`FACTURAEX` AS `FACTURAEX`,`d`.`TIPOCLAVE` AS `TIPOCLAVE`,`d`.`TIPOEXENCI` AS `TIPOEXENCI`,`d`.`TIPONOSUJE` AS `TIPONOSUJE`,`d`.`TIPOFACT` AS `TIPOFACT`,`d`.`TIPORECTIF` AS `TIPORECTIF`,`d`.`SERIE_RT` AS `SERIE_RT`,`d`.`FACTU_RT` AS `FACTU_RT`,`d`.`BASEIMP_RT` AS `BASEIMP_RT`,`d`.`BASEIMP_RF` AS `BASEIMP_RF`,`d`.`RECTIFICA` AS `RECTIFICA`,`d`.`FECHA_RT` AS `FECHA_RT`,`d`.`created` AS `created`,`d`.`updated` AS `updated`,`d`.`FECREGCON` AS `FECREGCON` from `vn2008`.`XDiario` `d` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `absenceType` -- @@ -56444,78 +54987,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `accounting__` --- - -/*!50001 DROP VIEW IF EXISTS `accounting__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `accounting__` AS select `b`.`Id_Banco` AS `id`,`b`.`Banco` AS `bank`,`b`.`Cuenta` AS `account`,`b`.`cash` AS `accountingTypeFk`,`b`.`entity_id` AS `entityFk`,`b`.`activo` AS `isActive` from `vn2008`.`Bancos` `b` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `agencyModeZone` --- - -/*!50001 DROP VIEW IF EXISTS `agencyModeZone`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `agencyModeZone` AS select `a`.`Id_Agencia` AS `agencyModeFk`,`a`.`zona` AS `zone`,`a`.`price` AS `price`,`a`.`Id_Article` AS `itemFk`,`a`.`warehouse_id` AS `warehouseFk`,`a`.`porte_minimo` AS `minimCost`,`a`.`inflacion` AS `inflation` from `vn2008`.`Agencias_zonas` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `agencyProvince` --- - -/*!50001 DROP VIEW IF EXISTS `agencyProvince`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `agencyProvince` AS select `a`.`province_id` AS `provinceFk`,`a`.`agency_id` AS `agencyFk`,`a`.`zona` AS `zone`,`a`.`warehouse_id` AS `warehouseFk`,`a`.`isVolumetric` AS `isVolumetric` from `vn2008`.`Agencias_province` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `agencyWarehouse` --- - -/*!50001 DROP VIEW IF EXISTS `agencyWarehouse`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `agencyWarehouse` AS select `a`.`agency_id` AS `agencyFk`,`a`.`warehouse_id` AS `warehouseFk`,`a`.`Vista` AS `agencyType` from `vn2008`.`agency_warehouse` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `annualAverageInvoiced` -- @@ -56534,42 +55005,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `awb` --- - -/*!50001 DROP VIEW IF EXISTS `awb`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `awb` AS select `a`.`id` AS `id`,`a`.`codigo` AS `code`,`a`.`bultos` AS `package`,`a`.`peso` AS `weight`,`a`.`MYSQL_TIME` AS `created`,`a`.`transitario_id` AS `transitoryFk`,`a`.`iva_id` AS `taxFk`,`a`.`gestdoc_id` AS `docFk`,`a`.`importe` AS `amount`,`a`.`carguera_id` AS `freightFk`,`a`.`m3` AS `m3`,`a`.`stems` AS `stems`,`a`.`flight_id` AS `flightFk`,`a`.`volume_weight` AS `volumeWeight`,`a`.`hb` AS `hb`,`a`.`rate` AS `rate`,`a`.`booked` AS `booked`,`a`.`issued` AS `issued`,`a`.`operated` AS `operated`,`a`.`bookEntried` AS `bookEntried`,`a`.`invoiceInFk` AS `invoiceInFk`,`a`.`isChecked` AS `isChecked` from `vn2008`.`awb` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `botanicExport__` --- - -/*!50001 DROP VIEW IF EXISTS `botanicExport__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `botanicExport__` AS select `be`.`botanic_export_id` AS `id`,`be`.`edi_genus_id` AS `ediGenusFk`,`be`.`edi_specie_id` AS `ediSpecieFk`,`be`.`Id_Paises` AS `countryFk`,`be`.`restriction` AS `restriction`,`be`.`description` AS `description`,`be`.`isProtectedZone` AS `isProtectedZone` from `vn2008`.`botanic_export` `be` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `claimRatio` -- @@ -56588,24 +55023,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `clientDefaultCompany` --- - -/*!50001 DROP VIEW IF EXISTS `clientDefaultCompany`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `clientDefaultCompany` AS select `t`.`Id_Clientes_empresa` AS `id`,`t`.`Id_Cliente` AS `clientFk`,`t`.`empresa_id` AS `companyFk`,`t`.`fecha_ini` AS `started`,`t`.`fecha_fin` AS `finished` from `vn2008`.`Clientes_empresa` `t` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `clientManaCache` -- @@ -56678,60 +55095,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `color` --- - -/*!50001 DROP VIEW IF EXISTS `color`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `color` AS select `c`.`Id_Color` AS `id`,`c`.`Color` AS `name` from `vn2008`.`Colores` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `comparative` --- - -/*!50001 DROP VIEW IF EXISTS `comparative`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `comparative` AS select `c`.`Periodo` AS `timePeriod`,`c`.`Id_Article` AS `itemFk`,`c`.`warehouse_id` AS `warehouseFk`,`c`.`Cantidad` AS `quantity`,`c`.`price` AS `price` from `vn2008`.`Comparativa` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `comparativeFilter` --- - -/*!50001 DROP VIEW IF EXISTS `comparativeFilter`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `comparativeFilter` AS select `f`.`id` AS `id`,`f`.`name` AS `name`,`f`.`sql` AS `whereSql` from `vn2008`.`filtros` `f` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `component` -- @@ -56804,42 +55167,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `coolerPath` --- - -/*!50001 DROP VIEW IF EXISTS `coolerPath`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `coolerPath` AS select `c`.`cooler_path_id` AS `id`,`c`.`description` AS `description` from `vn2008`.`cooler_path` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `coolerPathDetail` --- - -/*!50001 DROP VIEW IF EXISTS `coolerPathDetail`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `coolerPathDetail` AS select `c`.`cooler_path_detail_id` AS `id`,`c`.`cooler_path_id` AS `coolerPathFk`,`c`.`pasillo` AS `hallway` from `vn2008`.`cooler_path_detail` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `defaulter` -- @@ -56876,42 +55203,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `department__` --- - -/*!50001 DROP VIEW IF EXISTS `department__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `department__` AS select `b`.`department_id` AS `id`,`b`.`name` AS `name`,`b`.`production` AS `isProduction`,`b`.`lft` AS `lft`,`b`.`rgt` AS `rgt`,`b`.`isSelected` AS `isSelected`,`b`.`depth` AS `depth`,`b`.`sons` AS `sons` from `vn2008`.`department` `b` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `doc` --- - -/*!50001 DROP VIEW IF EXISTS `doc`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `doc` AS select `g`.`id` AS `id`,`g`.`sref` AS `sref`,`g`.`brief` AS `brief`,`g`.`emp_id` AS `companyFk`,`g`.`orden` AS `order`,`g`.`file` AS `file`,`g`.`original` AS `original`,`g`.`trabajador_id` AS `workerFk`,`g`.`odbc_date` AS `created`,`g`.`warehouse_id` AS `warehouseFk` from `vn2008`.`gestdoc` `g` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `ediGenus` -- @@ -56948,60 +55239,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `entity` --- - -/*!50001 DROP VIEW IF EXISTS `entity`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `entity` AS select `e`.`entity_id` AS `id`,`e`.`description` AS `description`,`e`.`pais_id` AS `countryFk`,`e`.`bic` AS `bic` from `vn2008`.`entity` `e` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `especialPrice` --- - -/*!50001 DROP VIEW IF EXISTS `especialPrice`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `especialPrice` AS select `p`.`Id_PrecioEspecial` AS `id`,`p`.`Id_Cliente` AS `clientFk`,`p`.`Id_Article` AS `itemFk`,`p`.`PrecioEspecial` AS `value` from `vn2008`.`PreciosEspeciales` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `exchangeInsurance` --- - -/*!50001 DROP VIEW IF EXISTS `exchangeInsurance`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `exchangeInsurance` AS select `vn2008`.`pago_sdc`.`pago_sdc_id` AS `id`,`vn2008`.`pago_sdc`.`importe` AS `amount`,`vn2008`.`pago_sdc`.`fecha` AS `dated`,`vn2008`.`pago_sdc`.`vencimiento` AS `finished`,`vn2008`.`pago_sdc`.`entity_id` AS `entityFk`,`vn2008`.`pago_sdc`.`ref` AS `ref`,`vn2008`.`pago_sdc`.`rate` AS `rate`,`vn2008`.`pago_sdc`.`empresa_id` AS `companyFk`,`vn2008`.`pago_sdc`.`financialProductTypefk` AS `financialProductTypefk`,`vn2008`.`pago_sdc`.`upperBarrier` AS `upperBarrier`,`vn2008`.`pago_sdc`.`lowerBarrier` AS `lowerBarrier`,`vn2008`.`pago_sdc`.`strike` AS `strike` from `vn2008`.`pago_sdc` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `exchangeInsuranceEntry` -- @@ -57038,24 +55275,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `exchangeInsuranceInPrevious` --- - -/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceInPrevious`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `exchangeInsuranceInPrevious` AS select `ei`.`finished` AS `dated`,`ei`.`amount` AS `amount`,`ei`.`rate` AS `rate` from `vn`.`exchangeInsurance` `ei` where (`ei`.`amount` and (`ei`.`financialProductTypefk` = 'SC')) union all select `ei`.`finished` AS `vencimiento`,`ard`.`amount` AS `amount`,`ei`.`rate` AS `rate` from ((`vn2008`.`accumulatorsReadingDate` `ard` join `vn`.`exchangeInsurance` `ei` on((`ei`.`id` = `ard`.`pagoSdcfk`))) join `vn2008`.`financialProductType` `fpt` on((`fpt`.`id` = `ei`.`financialProductTypefk`))) where (`ard`.`amount` and `fpt`.`isAcumulattor`) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `exchangeInsuranceOut` -- @@ -57074,24 +55293,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `exchangeReportSource` --- - -/*!50001 DROP VIEW IF EXISTS `exchangeReportSource`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `exchangeReportSource` AS select `e`.`dated` AS `dated`,cast(sum(`e`.`amountIn`) as decimal(10,2)) AS `amountIn`,cast(sum(`e`.`rateIn`) as decimal(10,4)) AS `rateIn`,cast(sum(`e`.`amountOut`) as decimal(10,2)) AS `amountOut`,cast(sum(`e`.`rateOut`) as decimal(10,4)) AS `rateOut`,cast(sum(`e`.`amountEntry`) as decimal(10,2)) AS `amountEntry`,cast(sum(`e`.`rateEntry`) as decimal(10,4)) AS `rateEntry`,cast(ifnull(`rr`.`value`,`rrc`.`simulatedValue`) as decimal(10,4)) AS `rateECB` from ((`vn`.`exchangeReportSourcePrevious` `e` left join `vn`.`referenceRate` `rr` on((`rr`.`dated` = `e`.`dated`))) join `vn`.`referenceRateConfig` `rrc` on(1)) group by `e`.`dated` order by `e`.`dated` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `exchangeReportSourcePrevious` -- @@ -57146,42 +55347,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `grant` --- - -/*!50001 DROP VIEW IF EXISTS `grant`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `grant` AS select `vn2008`.`Permisos`.`Id_Grupo` AS `group`,`vn2008`.`Permisos`.`Id_Trabajador` AS `worker`,`vn2008`.`Permisos`.`empresa_id` AS `company` from `vn2008`.`Permisos` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `grantGroup` --- - -/*!50001 DROP VIEW IF EXISTS `grantGroup`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `grantGroup` AS select `vn2008`.`Grupos`.`id` AS `id`,`vn2008`.`Grupos`.`Grupo` AS `description`,`vn2008`.`Grupos`.`observation_type_id` AS `observationType` from `vn2008`.`Grupos` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `holiday` -- @@ -57290,132 +55455,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `invoiceCorrection__` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceCorrection__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceCorrection__` AS select `ic`.`correctingFk` AS `correctingFk`,`ic`.`correctedFk` AS `correctedFk`,`ic`.`cplusRectificationTypeFk` AS `cplusRectificationTypeFk`,`ic`.`cplusInvoiceType477Fk` AS `cplusInvoiceType477Fk`,`ic`.`invoiceCorrectionTypeFk` AS `invoiceCorrectionTypeFk` from `vn2008`.`invoiceCorrection` `ic` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceIn` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceIn`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceIn` AS select `r`.`id` AS `id`,`r`.`num_recibida` AS `serialNumber`,`r`.`serie` AS `serial`,`r`.`proveedor_id` AS `supplierFk`,`r`.`fecha` AS `issued`,`r`.`sref` AS `supplierRef`,`r`.`contabilizada` AS `isBooked`,`r`.`moneda_id` AS `currencyFk`,`r`.`MYSQL_TIME` AS `created`,`r`.`empresa_id` AS `companyFk`,`r`.`gestdoc_id` AS `docFk`,`r`.`dateBooking` AS `booked`,`r`.`dateOperation` AS `operated`,`r`.`cplusInvoiceType472Fk` AS `cplusInvoiceType472Fk`,`r`.`cplusRectificationTypeFk` AS `cplusRectificationTypeFk`,`r`.`cplusSubjectOpFk` AS `cplusSubjectOpFk`,`r`.`cplusTaxBreakFk` AS `cplusTaxBreakFk`,`r`.`cplusTrascendency472Fk` AS `cplusTrascendency472Fk`,`r`.`bookEntried` AS `bookEntried`,`r`.`isVatDeductible` AS `isVatDeductible` from `vn2008`.`recibida` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceInAwb` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceInAwb`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceInAwb` AS select `a`.`recibida_id` AS `invoiceInFk`,`a`.`awb_id` AS `awbFk`,`a`.`dua` AS `dua` from `vn2008`.`awb_recibida` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceInDueDay` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceInDueDay`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceInDueDay` AS select `r`.`id` AS `id`,`r`.`recibida_id` AS `invoiceInFk`,`r`.`fecha` AS `dueDated`,`r`.`banco_id` AS `bankFk`,`r`.`cantidad` AS `amount`,`r`.`divisa` AS `foreignValue`,`r`.`stamp` AS `created` from `vn2008`.`recibida_vencimiento` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceInEntry` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceInEntry`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceInEntry` AS select `i`.`recibida_entrada_id` AS `id`,`i`.`recibida_id` AS `invoiceInFk`,`i`.`Id_Entrada` AS `entryFk`,`i`.`percentage` AS `percentage`,`i`.`awb_recibida` AS `invoiceInAwbFk`,`i`.`Contabilizado` AS `isBooked` from `vn2008`.`recibida_entrada` `i` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceInIntrastat` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceInIntrastat`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceInIntrastat` AS select `r`.`recibida_id` AS `invoiceInFk`,`r`.`Codintrastat` AS `intrastatFk`,`r`.`importe` AS `amount` from `vn2008`.`recibida_intrastat` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `invoiceInTax` --- - -/*!50001 DROP VIEW IF EXISTS `invoiceInTax`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `invoiceInTax` AS select `r`.`id` AS `id`,`r`.`recibida_id` AS `invoiceInFk`,`r`.`iva_id` AS `taxCodeFk`,`r`.`bi` AS `taxableBase`,`r`.`gastos_id` AS `expenceFk`,`r`.`divisa` AS `foreignValue`,`r`.`MYSQL_TIME` AS `created` from `vn2008`.`recibida_iva` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `itemBotanicalWithGenus` -- @@ -57686,24 +55725,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `itemTaxCountrySpain` --- - -/*!50001 DROP VIEW IF EXISTS `itemTaxCountrySpain`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemTaxCountrySpain` AS select `t`.`Id_Article` AS `id`,`t`.`Article` AS `name`,`t`.`tipo_id` AS `typeFk`,`t`.`Tallos` AS `stems`,`t`.`description` AS `description`,`t`.`Codintrastat` AS `intrastatFk`,`t`.`expenceFk` AS `expenceFk`,`t`.`comments` AS `comment`,`t`.`relevancy` AS `relevancy`,`t`.`Foto` AS `image`,`t`.`generic` AS `generic`,`itc`.`taxClassFk` AS `taxClassFk` from (`vn2008`.`Articles` `t` join `vn`.`itemTaxCountry` `itc` on((`t`.`Id_Article` = `itc`.`itemFk`))) where (`itc`.`countryFk` = 1) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `itemTicketOut` -- @@ -57740,42 +55761,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `mail__` --- - -/*!50001 DROP VIEW IF EXISTS `mail__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `mail__` AS select `m`.`id` AS `id`,`m`.`senderFk` AS `senderFk`,`m`.`recipientFk` AS `recipientFk`,`m`.`to` AS `sender`,`m`.`reply_to` AS `replyTo`,`m`.`subject` AS `subject`,`m`.`text` AS `body`,`m`.`plainTextBody` AS `plainTextBody`,`m`.`path` AS `attachment`,`m`.`DATE_ODBC` AS `creationDate`,`m`.`sent` AS `sent`,`m`.`error` AS `status` from `vn2008`.`mail` `m` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `manaSpellers` --- - -/*!50001 DROP VIEW IF EXISTS `manaSpellers`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `manaSpellers` AS select `bs`.`mana_spellers`.`Id_Trabajador` AS `worker`,`bs`.`mana_spellers`.`size` AS `size`,`bs`.`mana_spellers`.`used` AS `used`,`bs`.`mana_spellers`.`prices_modifier_rate` AS `pricesModifierRate`,`bs`.`mana_spellers`.`prices_modifier_activated` AS `pricesModifierActivated`,`Trabajadores`.`CodigoTrabajador` AS `workerCode`,`Trabajadores`.`Nombre` AS `firstname`,`Trabajadores`.`Apellidos` AS `name` from (`bs`.`mana_spellers` join `vn2008`.`Trabajadores` on((`bs`.`mana_spellers`.`Id_Trabajador` = `Trabajadores`.`Id_Trabajador`))) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `originL10n` -- @@ -57794,24 +55779,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `outgoingInvoiceKk` --- - -/*!50001 DROP VIEW IF EXISTS `outgoingInvoiceKk`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `outgoingInvoiceKk` AS select `Facturas`.`Id_Factura` AS `id`,`Facturas`.`Serie` AS `serie`,`Facturas`.`Fecha` AS `dateInvoice`,`Facturas`.`Importe` AS `total`,`Facturas`.`Vencimiento` AS `dueDate`,`Facturas`.`Id_Banco` AS `bank`,`Facturas`.`Id_Cliente` AS `client`,`Facturas`.`Id_Remesa` AS `remittance`,`Facturas`.`Remesar` AS `remit`,`Facturas`.`Id_Trabajador` AS `worker`,`Facturas`.`odbc_date` AS `creationDate`,`Facturas`.`empresa_id` AS `company`,`Facturas`.`liquidacion` AS `liquidacion?`,`Facturas`.`pdf` AS `isPdf` from `vn2008`.`Facturas` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `packageEquivalentItem` -- @@ -57830,60 +55797,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `payment` --- - -/*!50001 DROP VIEW IF EXISTS `payment`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `payment` AS select `p`.`id` AS `id`,`p`.`fecha` AS `received`,`p`.`dueDated` AS `dueDated`,`p`.`id_proveedor` AS `supplierFk`,`p`.`importe` AS `amount`,`p`.`id_moneda` AS `currencyFk`,`p`.`divisa` AS `divisa`,`p`.`id_banco` AS `bankFk`,`p`.`pay_met_id` AS `payMethod`,`p`.`empresa_id` AS `companyFk`,`p`.`pago_sdc_id` AS `exchangeInsuranceFk`,`p`.`conciliado` AS `isConciliate` from `vn2008`.`pago` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `paymentExchangeInsurance` --- - -/*!50001 DROP VIEW IF EXISTS `paymentExchangeInsurance`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `paymentExchangeInsurance` AS select `p`.`pago_sdc_id` AS `id`,`p`.`importe` AS `amount`,`p`.`fecha` AS `created`,`p`.`vencimiento` AS `dueDay`,`p`.`entity_id` AS `entityFk`,`p`.`ref` AS `ref`,`p`.`rate` AS `rate`,`p`.`empresa_id` AS `companyFk`,`p`.`financialProductTypefk` AS `financialProductTypefk`,`p`.`upperBarrier` AS `upperBarrier`,`p`.`lowerBarrier` AS `lowerBarrier`,`p`.`strike` AS `strike` from `vn2008`.`pago_sdc` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `payrollCenter` --- - -/*!50001 DROP VIEW IF EXISTS `payrollCenter`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `payrollCenter` AS select `b`.`cod_centro` AS `codCenter`,`b`.`Centro` AS `name`,`b`.`nss_cotizacion` AS `nss`,`b`.`domicilio` AS `street`,`b`.`poblacion` AS `city`,`b`.`cp` AS `postcode`,`b`.`empresa_id` AS `companyFk`,`b`.`codempresa` AS `companyCode` from `vn2008`.`payroll_centros` `b` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `personMedia` -- @@ -57902,186 +55815,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `plantpassport` --- - -/*!50001 DROP VIEW IF EXISTS `plantpassport`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `plantpassport` AS select `pp`.`producer_id` AS `producerFk`,`pp`.`plantpassport_authority_id` AS `plantpassportAuthorityFk`,`pp`.`number` AS `number` from `vn2008`.`plantpassport` `pp` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `plantpassportAuthority` --- - -/*!50001 DROP VIEW IF EXISTS `plantpassportAuthority`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `plantpassportAuthority` AS select `ppa`.`plantpassport_authority_id` AS `id`,`ppa`.`denomination` AS `denomination`,`ppa`.`Paises_Id` AS `countryFk` from `vn2008`.`plantpassport_authority` `ppa` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `preparationException` --- - -/*!50001 DROP VIEW IF EXISTS `preparationException`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `preparationException` AS select `p`.`exception_day` AS `exceptionDay`,`p`.`warehouse_id` AS `warehouseFk`,`p`.`percentage` AS `percentage` from `vn2008`.`preparation_exception` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `priceFixed__` --- - -/*!50001 DROP VIEW IF EXISTS `priceFixed__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `priceFixed__` AS select `p`.`item_id` AS `itemFk`,`p`.`rate_0` AS `rate0`,`p`.`rate_1` AS `rate1`,`p`.`rate_2` AS `rate2`,`p`.`rate_3` AS `rate3`,`p`.`date_start` AS `started`,`p`.`date_end` AS `ended`,`p`.`bonus` AS `bonus`,`p`.`warehouse_id` AS `warehouseFk`,`p`.`odbc_date` AS `created`,`p`.`price_fixed_id` AS `id`,`p`.`grouping` AS `grouping`,`p`.`Packing` AS `packing`,`p`.`caja` AS `box` from `vn2008`.`price_fixed` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `printServerQueue__` --- - -/*!50001 DROP VIEW IF EXISTS `printServerQueue__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `printServerQueue__` AS select `c`.`Id_Cola` AS `id`,`c`.`Id_Impresora` AS `printerFk`,`c`.`Id_Prioridad` AS `priorityFk`,`c`.`Id_Informe` AS `reportFk`,`c`.`Id_Estado` AS `statusFk`,`c`.`Hora_Inicio` AS `started`,`c`.`Hora_Fin` AS `finished`,`c`.`Cola` AS `param1`,`c`.`Id_Trabajador` AS `workerFk`,`c`.`Cola2` AS `param2`,`c`.`Cola3` AS `param3`,`c`.`error` AS `error` from `vn2008`.`Colas` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `printer` --- - -/*!50001 DROP VIEW IF EXISTS `printer`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `printer` AS select `i`.`Id_Impresora` AS `id`,`i`.`Ruta` AS `path`,`i`.`Impresora` AS `name`,`i`.`referencia` AS `reference`,`i`.`isLabeler` AS `isLabeler`,`i`.`description` AS `description` from `vn2008`.`Impresoras` `i` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `printingQueue` --- - -/*!50001 DROP VIEW IF EXISTS `printingQueue`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `printingQueue` AS select `c`.`Id_Cola` AS `id`,`c`.`Id_Impresora` AS `printer`,`c`.`Id_Prioridad` AS `priority`,`c`.`Id_Informe` AS `report`,`c`.`Id_Estado` AS `state`,`c`.`Hora_Inicio` AS `startingTime`,`c`.`Hora_Fin` AS `endingTime`,`c`.`Cola` AS `text`,`c`.`Id_Trabajador` AS `worker`,`c`.`Cola2` AS `text2`,`c`.`Cola3` AS `text3`,`c`.`error` AS `error` from `vn2008`.`Colas` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `promissoryNote` --- - -/*!50001 DROP VIEW IF EXISTS `promissoryNote`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `promissoryNote` AS select `p`.`Id_Pagare` AS `id`,`p`.`Concepto` AS `Concept`,`p`.`pago_id` AS `paymentFk` from `vn2008`.`Pagares` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `rate` --- - -/*!50001 DROP VIEW IF EXISTS `rate`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `rate` AS select `r`.`tarifa_id` AS `id`,`r`.`fecha` AS `dated`,`r`.`warehouse_id` AS `warehouseFk`,`r`.`t0` AS `rate0`,`r`.`t1` AS `rate1`,`r`.`t2` AS `rate2`,`r`.`t3` AS `rate3` from `vn2008`.`tarifas` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `referenceRate__` --- - -/*!50001 DROP VIEW IF EXISTS `referenceRate__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `referenceRate__` AS select `r`.`moneda_id` AS `currencyFk`,`r`.`date` AS `dated`,`r`.`rate` AS `value` from `vn2008`.`reference_rate` `r` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `role` -- @@ -58100,24 +55833,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `routesControl` --- - -/*!50001 DROP VIEW IF EXISTS `routesControl`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `routesControl` AS select `t`.`Id_Ruta` AS `routeFk`,count(`e`.`expeditions_id`) AS `expeditions`,count(`sl`.`scan_line_id`) AS `scanned`,count(distinct `sl`.`scan_id`) AS `pallets`,max(`sl`.`odbc_date`) AS `lastScanned` from ((`vn2008`.`Tickets` `t` join `vn2008`.`expeditions` `e` on((`t`.`Id_Ticket` = `e`.`ticket_id`))) left join `vn2008`.`scan_line` `sl` on((`e`.`expeditions_id` = `sl`.`code`))) where (`t`.`Fecha` >= curdate()) group by `t`.`Id_Ruta` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `saleFreight` -- @@ -58154,42 +55869,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `salesToPrePrepare` --- - -/*!50001 DROP VIEW IF EXISTS `salesToPrePrepare`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `salesToPrePrepare` AS select `m`.`Id_Ticket` AS `Id_Ticket`,`mk`.`Id_Movimiento` AS `Id_Movimiento`,`mk`.`Id_Movimiento_mark` AS `Id_Movimiento_mark`,`mk`.`Id_Trabajador` AS `Id_Trabjador`,`m`.`Id_Article` AS `Id_Article`,`m`.`Concepte` AS `Concepte`,`art`.`subName` AS `subName`,(`mk`.`original_quantity` - ifnull(`is`.`quantity`,0)) AS `Cantidad`,`mk`.`original_quantity` AS `original_quantity`,hour(`t`.`shipped`) AS `Hora`,hour(`t`.`shipped`) AS `Departure`,minute(`t`.`shipped`) AS `Minuto`,`am`.`agencyFk` AS `agency_id`,`t`.`warehouseFk` AS `warehouse_id`,`a`.`provinceFk` AS `province_id`,`is`.`quantity` AS `picked`,`t`.`CodigoTrabajador` AS `trabajador`,`is`.`sectorFk` AS `sectorFk` from ((((((((`vn2008`.`Movimientos_mark` `mk` join `vn`.`state` `st` on((`st`.`id` = `mk`.`stateFk`))) join `vn2008`.`Movimientos` `m` on((`m`.`Id_Movimiento` = `mk`.`Id_Movimiento`))) join `vn`.`ticket` `t` on((`m`.`Id_Ticket` = `t`.`id`))) join `vn`.`agencyMode` `am` on((`am`.`id` = `t`.`agencyModeFk`))) join `vn`.`address` `a` on((`a`.`id` = `t`.`addressFk`))) left join `vn`.`itemShelvingSaleSum` `is` on((`is`.`saleFk` = `mk`.`Id_Movimiento`))) join `vn2008`.`Articles` `art` on((`art`.`Id_Article` = `m`.`Id_Article`))) left join `vn2008`.`Trabajadores` `t` on((`t`.`Id_Trabajador` = `mk`.`Id_Trabajador`))) where (`st`.`code` like 'PREVIOUS_PREPARATION') */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `specialPrice__` --- - -/*!50001 DROP VIEW IF EXISTS `specialPrice__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `specialPrice__` AS select `p`.`Id_PrecioEspecial` AS `id`,`p`.`Id_Cliente` AS `clientFk`,`p`.`Id_Article` AS `itemFk`,`p`.`PrecioEspecial` AS `value` from `vn2008`.`PreciosEspeciales` `p` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `supplierPackaging` -- @@ -58226,24 +55905,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `ticketDownBuffer` --- - -/*!50001 DROP VIEW IF EXISTS `ticketDownBuffer`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `ticketDownBuffer` AS select `td`.`ticketFk` AS `ticketFk`,`td`.`created` AS `created`,`td`.`selected` AS `selected`,concat(`tr`.`Nombre`,' ',`tr`.`Apellidos`) AS `sacador`,`pk`.`code` AS `parking` from ((((`vn`.`ticketDown` `td` left join `vn`.`shelving` `s` on((`s`.`code` = `td`.`ticketFk`))) left join `vn`.`parking` `pk` on((`s`.`parkingFk` = `pk`.`id`))) join `vn`.`ticketStateToday` `tst` on((`tst`.`ticket` = `td`.`ticketFk`))) join `vn2008`.`Trabajadores` `tr` on((`tr`.`Id_Trabajador` = `tst`.`worker`))) where (`td`.`selected` = 2) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `ticketGetVolume__` -- @@ -58280,24 +55941,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `ticketObservation__` --- - -/*!50001 DROP VIEW IF EXISTS `ticketObservation__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `ticketObservation__` AS select `to`.`ticket_observation_id` AS `id`,`to`.`Id_Ticket` AS `ticketFk`,`to`.`observation_type_id` AS `observationTypeFk`,`to`.`text` AS `description` from `vn2008`.`ticket_observation` `to` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `ticketPreviousPreparingList` -- @@ -58352,24 +55995,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `ticketToPrepare` --- - -/*!50001 DROP VIEW IF EXISTS `ticketToPrepare`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `ticketToPrepare` AS select `m`.`Id_Ticket` AS `Id_Ticket`,`mk`.`Id_Movimiento` AS `Id_Movimiento`,`mk`.`Id_Movimiento_mark` AS `Id_Movimiento_mark`,`mk`.`Id_Trabajador` AS `Id_Trabjador`,`m`.`Id_Article` AS `Id_Article`,`m`.`Concepte` AS `Concepte`,`art`.`subName` AS `subName`,(`mk`.`original_quantity` - ifnull(`is`.`quantity`,0)) AS `Cantidad`,`mk`.`original_quantity` AS `original_quantity`,if(hour(`t`.`shipped`),hour(`t`.`shipped`),hour(`z`.`hour`)) AS `Hora`,hour(`t`.`shipped`) AS `Departure`,minute(`t`.`shipped`) AS `Minuto`,`am`.`agencyFk` AS `agency_id`,`t`.`warehouseFk` AS `warehouse_id`,`a`.`provinceFk` AS `province_id`,`is`.`quantity` AS `picked`,`t`.`zoneFk` AS `zoneFk`,`p`.`sectorFk` AS `sectorFk` from ((((((((((`vn2008`.`Movimientos_mark` `mk` join `vn2008`.`Movimientos` `m` on((`m`.`Id_Movimiento` = `mk`.`Id_Movimiento`))) join `vn`.`ticket` `t` on((`m`.`Id_Ticket` = `t`.`id`))) join `vn`.`agencyMode` `am` on((`am`.`id` = `t`.`agencyModeFk`))) join `vn`.`address` `a` on((`a`.`id` = `t`.`addressFk`))) left join `vn`.`itemShelvingSale` `is` on((`is`.`saleFk` = `mk`.`Id_Movimiento`))) left join `vn`.`itemShelving` `ish` on((`ish`.`id` = `is`.`itemShelvingFk`))) left join `vn`.`shelving` `sh` on((`sh`.`code` = `ish`.`shelvingFk`))) left join `vn`.`parking` `p` on((`p`.`id` = `sh`.`parkingFk`))) left join `vn2008`.`Articles` `art` on((`art`.`Id_Article` = `m`.`Id_Article`))) left join `vn`.`zone` `z` on((`z`.`id` = `t`.`zoneFk`))) where ((`mk`.`stateFk` = 26) and (`mk`.`valor` <> 1)) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `ticketTracking` -- @@ -58388,186 +56013,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `ticketeToPreparePrepared` --- - -/*!50001 DROP VIEW IF EXISTS `ticketeToPreparePrepared`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `ticketeToPreparePrepared` AS select `m`.`Id_Ticket` AS `Id_Ticket`,`mk`.`Id_Movimiento` AS `Id_Movimiento`,`mk`.`Id_Movimiento_mark` AS `Id_Movimiento_mark`,`mk`.`Id_Trabajador` AS `Id_Trabjador`,`m`.`Id_Article` AS `Id_Article`,`m`.`Concepte` AS `Concepte`,`art`.`subName` AS `subName`,(`mk`.`original_quantity` - ifnull(`is`.`quantity`,0)) AS `Cantidad`,`mk`.`original_quantity` AS `original_quantity`,hour(`t`.`shipped`) AS `Hora`,hour(`t`.`shipped`) AS `Departure`,minute(`t`.`shipped`) AS `Minuto`,`am`.`agencyFk` AS `agency_id`,`t`.`warehouseFk` AS `warehouse_id`,`a`.`provinceFk` AS `province_id`,`is`.`quantity` AS `picked`,`t`.`CodigoTrabajador` AS `trabajador`,`is`.`sectorFk` AS `sectorFk` from ((((((((`vn2008`.`Movimientos_mark` `mk` join `vn`.`state` `st` on((`st`.`id` = `mk`.`stateFk`))) join `vn2008`.`Movimientos` `m` on((`m`.`Id_Movimiento` = `mk`.`Id_Movimiento`))) join `vn`.`ticket` `t` on((`m`.`Id_Ticket` = `t`.`id`))) join `vn`.`agencyMode` `am` on((`am`.`id` = `t`.`agencyModeFk`))) join `vn`.`address` `a` on((`a`.`id` = `t`.`addressFk`))) left join `vn`.`itemShelvingSaleSum` `is` on((`is`.`saleFk` = `mk`.`Id_Movimiento`))) join `vn2008`.`Articles` `art` on((`art`.`Id_Article` = `m`.`Id_Article`))) left join `vn2008`.`Trabajadores` `t` on((`t`.`Id_Trabajador` = `mk`.`Id_Trabajador`))) where (`st`.`code` like 'PREVIOUS_PREPARATION') */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `till__` --- - -/*!50001 DROP VIEW IF EXISTS `till__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `till__` AS select `c`.`Id_Caja` AS `id`,`c`.`Cajafecha` AS `dated`,`c`.`Serie` AS `serie`,`c`.`Concepto` AS `concept`,`c`.`Entrada` AS `in`,`c`.`Salida` AS `out`,`c`.`Id_Banco` AS `bankFk`,`c`.`empresa_id` AS `companyFk`,`c`.`Partida` AS `isAccountable`,`c`.`InForeignValue` AS `inForeignValue`,`c`.`OutForeignValue` AS `outForeignValue`,`c`.`Id_Trabajador` AS `workerFk` from `vn2008`.`Cajas` `c` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `time` --- - -/*!50001 DROP VIEW IF EXISTS `time`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `time` AS select `t`.`date` AS `dated`,`t`.`period` AS `period`,`t`.`month` AS `month`,`t`.`year` AS `year`,`t`.`day` AS `day`,`t`.`week` AS `week` from `vn2008`.`time` `t` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `travelThermograph__` --- - -/*!50001 DROP VIEW IF EXISTS `travelThermograph__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `travelThermograph__` AS select `tt`.`thermograph_id` AS `thermographFk`,`tt`.`odbc_date` AS `created`,`tt`.`warehouse_id` AS `warehouseFk`,`tt`.`travel_id` AS `travelFk`,`tt`.`temperature` AS `temperature`,`tt`.`result` AS `result`,`tt`.`gestdoc_id` AS `dmsFk` from `vn2008`.`travel_thermograph` `tt` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `travel_cloneWeekly` --- - -/*!50001 DROP VIEW IF EXISTS `travel_cloneWeekly`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `travel_cloneWeekly` AS select `tp`.`travel_pattern_id` AS `id`,`tp`.`warehouse_out` AS `warehouseOutFk`,`tp`.`warehouse_in` AS `warehouseInFk`,`tp`.`agency_id` AS `agencyModeFk`,`tp`.`day_out` AS `weekDay`,`tp`.`duration` AS `duration`,`tp`.`ref` AS `ref`,`tp`.`cargoSupplierFk` AS `cargoSupplierFk` from `vn2008`.`travel_pattern` `tp` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `unary` --- - -/*!50001 DROP VIEW IF EXISTS `unary`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `unary` AS select `a`.`id` AS `id`,`a`.`parent` AS `parent` from `vn2008`.`unary` `a` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `unaryScan` --- - -/*!50001 DROP VIEW IF EXISTS `unaryScan`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `unaryScan` AS select `u`.`unary_id` AS `unaryFk`,`u`.`name` AS `name`,`u`.`odbc_date` AS `created`,`u`.`type` AS `type` from `vn2008`.`unary_scan` `u` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `unaryScanLine` --- - -/*!50001 DROP VIEW IF EXISTS `unaryScanLine`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `unaryScanLine` AS select `u`.`id` AS `id`,`u`.`code` AS `code`,`u`.`odbc_date` AS `created`,`u`.`unary_id` AS `unaryScanFk` from `vn2008`.`unary_scan_line` `u` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `unaryScanLineBuy` --- - -/*!50001 DROP VIEW IF EXISTS `unaryScanLineBuy`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `unaryScanLineBuy` AS select `u`.`scan_line_id` AS `unaryScanLineFk`,`u`.`Id_Article` AS `itemFk` from `vn2008`.`unary_scan_line_buy` `u` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `unaryScanLineExpedition` --- - -/*!50001 DROP VIEW IF EXISTS `unaryScanLineExpedition`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `unaryScanLineExpedition` AS select `u`.`scan_line_id` AS `unaryScanLineFk`,`u`.`expedition_id` AS `expeditionFk` from `vn2008`.`unary_scan_line_expedition` `u` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `user` -- @@ -58586,42 +56031,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `warehouseAlias__` --- - -/*!50001 DROP VIEW IF EXISTS `warehouseAlias__`*/; -/*!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 = utf8 */; -/*!50001 SET character_set_results = utf8 */; -/*!50001 SET collation_connection = utf8_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `warehouseAlias__` AS select `wa`.`warehouse_alias_id` AS `id`,`wa`.`alias` AS `name` from `vn2008`.`warehouse_alias` `wa` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - --- --- Final view structure for view `warehouseJoined` --- - -/*!50001 DROP VIEW IF EXISTS `warehouseJoined`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `warehouseJoined` AS select `wj`.`warehouse_id` AS `warehouseFk`,`wj`.`warehouse_alias_id` AS `warehouseAliasFk` from `vn2008`.`warehouse_joined` `wj` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `workerCalendar` -- @@ -58712,24 +56121,6 @@ USE `vn`; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; --- --- Final view structure for view `workerTeam__` --- - -/*!50001 DROP VIEW IF EXISTS `workerTeam__`*/; -/*!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 = utf8mb4 */; -/*!50001 SET character_set_results = utf8mb4 */; -/*!50001 SET collation_connection = utf8mb4_general_ci */; -/*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */ -/*!50001 VIEW `workerTeam__` AS select `w`.`team` AS `team`,`w`.`id` AS `id`,`w`.`user` AS `workerFk` from `vn2008`.`workerTeam` `w` */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; - -- -- Final view structure for view `workerTimeControlUserInfo` -- @@ -58817,4 +56208,4 @@ USE `vncontrol`; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-12-05 14:02:43 +-- Dump completed on 2019-12-12 14:08:06 diff --git a/db/export-structure.sh b/db/export-structure.sh index 621020859..da1d23daf 100755 --- a/db/export-structure.sh +++ b/db/export-structure.sh @@ -17,6 +17,83 @@ SCHEMAS=( vncontrol ) +IGNORETABLES=( + --ignore-table=bi.last_Id_Cubo + --ignore-table=bi.v_clientes_jerarquia + --ignore-table=bi.v_ventas_contables + --ignore-table=bs.horasSilla + --ignore-table=bs.productionIndicators + --ignore-table=bs.VentasPorCliente + --ignore-table=bs.v_ventas + --ignore-table=edi.supplyOffer + --ignore-table=postgresql.currentWorkersStats + --ignore-table=vn.accounting__ + --ignore-table=vn.agencyModeZone + --ignore-table=vn.agencyProvince + --ignore-table=vn.agencyWarehouse + --ignore-table=vn.awb + --ignore-table=vn.botanicExport__ + --ignore-table=vn.clientDefaultCompany + --ignore-table=vn.color + --ignore-table=vn.comparative + --ignore-table=vn.comparativeFilter + --ignore-table=vn.coolerPath + --ignore-table=vn.coolerPathDetail + --ignore-table=vn.department__ + --ignore-table=vn.doc + --ignore-table=vn.entity + --ignore-table=vn.especialPrice + --ignore-table=vn.exchangeInsurance + --ignore-table=vn.exchangeInsuranceInPrevious + --ignore-table=vn.exchangeReportSource + --ignore-table=vn.grant + --ignore-table=vn.grantGroup + --ignore-table=vn.invoiceCorrection__ + --ignore-table=vn.invoiceIn + --ignore-table=vn.invoiceInAwb + --ignore-table=vn.invoiceInDueDay + --ignore-table=vn.invoiceInEntry + --ignore-table=vn.invoiceInIntrastat + --ignore-table=vn.invoiceInTax + --ignore-table=vn.itemTaxCountrySpain + --ignore-table=vn.mail__ + --ignore-table=vn.manaSpellers + --ignore-table=vn.outgoingInvoiceKk + --ignore-table=vn.payment + --ignore-table=vn.paymentExchangeInsurance + --ignore-table=vn.payrollCenter + --ignore-table=vn.plantpassport + --ignore-table=vn.plantpassportAuthority + --ignore-table=vn.preparationException + --ignore-table=vn.priceFixed__ + --ignore-table=vn.printer + --ignore-table=vn.printingQueue + --ignore-table=vn.printServerQueue__ + --ignore-table=vn.promissoryNote + --ignore-table=vn.rate + --ignore-table=vn.referenceRate__ + --ignore-table=vn.routesControl + --ignore-table=vn.salesToPrePrepare + --ignore-table=vn.specialPrice__ + --ignore-table=vn.ticketDownBuffer + --ignore-table=vn.ticketeToPreparePrepared + --ignore-table=vn.ticketObservation__ + --ignore-table=vn.ticketRequest__ + --ignore-table=vn.ticketToPrepare + --ignore-table=vn.till__ + --ignore-table=vn.time + --ignore-table=vn.travelThermograph__ + --ignore-table=vn.travel_cloneWeekly + --ignore-table=vn.unary + --ignore-table=vn.unaryScan + --ignore-table=vn.unaryScanLine + --ignore-table=vn.unaryScanLineBuy + --ignore-table=vn.unaryScanLineExpedition + --ignore-table=vn.warehouseAlias__ + --ignore-table=vn.warehouseJoined + --ignore-table=vn.workerTeam__ + --ignore-table=vn.XDiario__ +) mysqldump \ --defaults-file=config.production.ini \ --default-character-set=utf8 \ @@ -25,4 +102,5 @@ mysqldump \ --triggers --routines --events \ --databases \ ${SCHEMAS[@]} \ + ${IGNORETABLES[@]} \ > dump/structure.sql diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 70293a965..78a7992b5 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -117,5 +117,6 @@ "You should specify a date": "Debes especificar una fecha", "You should specify at least a start or end date": "Debes especificar al menos una fecha de inicio o de fín", "Start date should be lower than end date": "La fecha de inicio debe ser menor que la fecha de fín", - "You should mark at least one week day": "Debes marcar al menos un día de la semana" + "You should mark at least one week day": "Debes marcar al menos un día de la semana", + "Swift / BIC can't be empty": "Swift / BIC can't be empty" } \ No newline at end of file From 1194f735a63dae215b60ee50f80d03f2d2fdb326 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 12 Dec 2019 14:31:08 +0100 Subject: [PATCH 4/6] traduccion --- loopback/locale/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 78a7992b5..b5a3973b7 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -118,5 +118,5 @@ "You should specify at least a start or end date": "Debes especificar al menos una fecha de inicio o de fín", "Start date should be lower than end date": "La fecha de inicio debe ser menor que la fecha de fín", "You should mark at least one week day": "Debes marcar al menos un día de la semana", - "Swift / BIC can't be empty": "Swift / BIC can't be empty" + "Swift / BIC can't be empty": "Swift / BIC no puedo estar vacio" } \ No newline at end of file From 0ef036caf997d85365f0dd3a5fb94f1b8c293c93 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 12 Dec 2019 14:31:22 +0100 Subject: [PATCH 5/6] traduccion --- loopback/locale/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index b5a3973b7..8bede0048 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -118,5 +118,5 @@ "You should specify at least a start or end date": "Debes especificar al menos una fecha de inicio o de fín", "Start date should be lower than end date": "La fecha de inicio debe ser menor que la fecha de fín", "You should mark at least one week day": "Debes marcar al menos un día de la semana", - "Swift / BIC can't be empty": "Swift / BIC no puedo estar vacio" + "Swift / BIC can't be empty": "Swift / BIC no puede estar vacio" } \ No newline at end of file From 7e5f6e6acf9472ec28773c42c42237914392a8c8 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 12 Dec 2019 15:02:58 +0100 Subject: [PATCH 6/6] Pull request check test --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7fcf95a79..58a3f1773 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,4 +19,4 @@ services: volumes: - /containers/salix:/etc/salix - /mnt/storage/pdfs:/var/lib/salix/pdfs - - /mnt/storage/dms:/var/lib/salix/dms \ No newline at end of file + - /mnt/storage/dms:/var/lib/salix/dms