Tarea #1673 exportar estructura y datos de produccion a la local
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-09-04 09:06:08 +02:00
parent d3441fa1b3
commit a2228fa15f
14 changed files with 3200 additions and 1837 deletions

View File

@ -1,24 +0,0 @@
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`invoiceOut` AS
SELECT
`f`.`factura_id` AS `id`,
`f`.`Id_Factura` AS `ref`,
`f`.`Serie` AS `serial`,
`f`.`Fecha` AS `issued`,
`f`.`Importe` AS `amount`,
`f`.`Id_Cliente` AS `clientFk`,
`f`.`odbc_date` AS `created`,
`f`.`empresa_id` AS `companyFk`,
`f`.`Vencimiento` AS `dued`,
`f`.`booked` AS `booked`,
`f`.`Id_Banco` AS `bankFk`,
`f`.`cplusInvoiceType477Fk` AS `cplusInvoiceType477Fk`,
`f`.`cplusTaxBreakFk` AS `cplusTaxBreakFk`,
`f`.`cplusSubjectOpFk` AS `cplusSubjectOpFk`,
`f`.`cplusTrascendency477Fk` AS `cplusTrascendency477Fk`,
`f`.`pdf` AS `hasPdf`
FROM
`vn2008`.`Facturas` `f`;

View File

@ -1,60 +0,0 @@
DROP procedure IF EXISTS `vn`.`invoiceOutAgain`;
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25))
BEGIN
/* Para tickets ya facturados, vuelve a repetir el proceso de facturación.
*
* @param vInvoiceFk Numero de factura
* @param vTaxArea Numero de factura
*/
DECLARE vInvoiceFk INT;
DECLARE vCountry INT;
DECLARE vTaxArea VARCHAR(15);
DECLARE vSpainCountryCode INT DEFAULT 1;
SELECT id INTO vInvoiceFk
FROM invoiceOut
WHERE ref = vInvoiceRef;
UPDATE invoiceOut
SET hasPdf = 0
WHERE id = vInvoiceFk;
SELECT s.countryFk INTO vCountry
FROM supplier s
JOIN invoiceOut io ON io.companyFk = s.id
WHERE io.id = vInvoiceFk;
DROP TEMPORARY TABLE IF EXISTS ticketToInvoice;
CREATE TEMPORARY TABLE ticketToInvoice
SELECT id
FROM ticket
WHERE refFk = vInvoiceRef;
CALL invoiceExpenceMake(vInvoiceFk);
CALL invoiceTaxMake(vInvoiceFk,vTaxArea);
UPDATE invoiceOut io
JOIN (
SELECT SUM(amount) AS total
FROM invoiceOutExpence
WHERE invoiceOutFk = vInvoiceFk
) base
JOIN (
SELECT SUM(vat) AS total
FROM invoiceOutTax
WHERE invoiceOutFk = vInvoiceFk
) vat
SET io.amount = base.total + vat.total
WHERE io.id = vInvoiceFk;
CALL vn.invoiceOutBooking(vInvoiceFk);
END$$
DELIMITER ;

View File

@ -1,38 +0,0 @@
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`ticket_componentMakeUpdate`(
vTicketFk INT,
vClientFk INT,
vAgencyModeFk INT,
vAddressFk INT,
vZoneFk INT,
vWarehouseFk TINYINT,
vCompanyFk SMALLINT,
vShipped DATETIME,
vLanded DATE,
vIsDeleted BOOLEAN,
vHasToBeUnrouted BOOLEAN,
vOption INT)
BEGIN
CALL vn.ticket_componentPreview (vTicketFk, vLanded, vAddressFk, vZoneFk, vWarehouseFk);
CALL vn.ticket_componentUpdate (
vTicketFk,
vClientFk,
vAgencyModeFk,
vAddressFk,
vZoneFk,
vWarehouseFk,
vCompanyFk,
vShipped,
vLanded,
vIsDeleted,
vHasToBeUnrouted,
vOption
);
DROP TEMPORARY TABLE
tmp.ticketComponent,
tmp.ticketComponentPrice;
END$$
DELIMITER ;

View File

@ -1,111 +0,0 @@
USE `vn`;
DROP procedure IF EXISTS `ticket_componentPreview`;
DELIMITER $$
USE `vn`$$
CREATE DEFINER=`root`@`%` PROCEDURE `ticket_componentPreview`(
vTicketFk INT,
vLanded DATE,
vAddressFk INT,
vZoneFk INT,
vWarehouseFk SMALLINT)
BEGIN
/**
* Calcula los componentes de los articulos de un ticket
*
* @param vTicketFk id del ticket
* @param vLanded nueva fecha de entrega
* @param vAddressFk nuevo consignatario
* @param vZoneFk nueva zona
* @param vWarehouseFk nuevo warehouse
*
* @return tmp.ticketComponent (warehouseFk, itemFk, componentFk, cost)
*/
DECLARE vShipped DATE;
DECLARE vBuyOrderItem INT DEFAULT 100;
DECLARE vHasDataChanged BOOL DEFAULT FALSE;
DECLARE vHasAddressChanged BOOL;
DECLARE vHasZoneChanged BOOL DEFAULT FALSE;
DECLARE vHasWarehouseChanged BOOL DEFAULT FALSE;
DECLARE vAddressTypeRateFk INT DEFAULT NULL;
DECLARE vAgencyModeTypeRateFk INT DEFAULT NULL;
DECLARE vHasChangeAll BOOL DEFAULT FALSE;
SELECT DATE(landed) <> vLanded,
addressFk <> vAddressFk,
zoneFk <> vZoneFk,
warehouseFk <> vWarehouseFk
INTO
vHasDataChanged,
vHasAddressChanged,
vHasZoneChanged,
vHasWarehouseChanged
FROM vn.ticket t
WHERE t.id = vTicketFk;
IF vHasDataChanged OR vHasWarehouseChanged THEN
SET vHasChangeAll = TRUE;
END IF;
IF vHasAddressChanged THEN
SET vAddressTypeRateFk = 5;
END IF;
IF vHasZoneChanged THEN
SET vAgencyModeTypeRateFk = 6;
END IF;
SELECT TIMESTAMPADD(DAY, -travelingDays, vLanded) INTO vShipped
FROM zone
WHERE id = vZoneFk;
CALL buyUltimate(vWarehouseFk, vShipped);
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
CREATE TEMPORARY TABLE tmp.ticketLot ENGINE = MEMORY (
SELECT
vWarehouseFk AS warehouseFk,
NULL AS available,
s.itemFk,
bu.buyFk
FROM sale s
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
WHERE s.ticketFk = vTicketFk
AND s.itemFk != vBuyOrderItem
GROUP BY bu.warehouseFk, bu.itemFk);
CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped);
REPLACE INTO tmp.ticketComponent (warehouseFk, itemFk, componentFk, cost)
SELECT t.warehouseFk, s.itemFk, sc.componentFk, sc.value
FROM saleComponent sc
JOIN sale s ON s.id = sc.saleFk
JOIN ticket t ON t.id = s.ticketFk
JOIN componentRate cr ON cr.id = sc.componentFk
WHERE s.ticketFk = vTicketFk
AND (cr.isRenewable = FALSE
OR
(NOT vHasChangeAll
AND (NOT (cr.componentTypeRate <=> vAddressTypeRateFk
OR cr.componentTypeRate <=> vAgencyModeTypeRateFk))));
SET @shipped = vShipped;
DROP TEMPORARY TABLE
tmp.buyUltimate,
tmp.ticketLot;
IF vShipped IS NULL THEN
CALL util.throw('NO_ZONE_AVAILABLE');
END IF;
IF vShipped < CURDATE() THEN
CALL util.throw('ERROR_PAST_SHIPMENT');
END IF;
END$$
DELIMITER ;

View File

@ -1,52 +0,0 @@
DROP procedure IF EXISTS `vn`.`ticket_priceDifference`;
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`ticket_priceDifference`(
vTicketFk INT,
vLanded DATE,
vAddressFk INT,
vZoneFk INT,
vWarehouseFk INT)
BEGIN
/**
* Devuelve las diferencias de precio
* de los movimientos de un ticket.
*
* @param vTicketFk Id del ticket
* @param vLanded Fecha de recepcion
* @param vAddressFk Id del consignatario
* @param vZoneFk Id de la zona
* @param vWarehouseFk Id del almacén
*/
CALL vn.ticket_componentPreview(vTicketFk, vLanded, vAddressFk, vZoneFk, vWarehouseFk);
SELECT s.itemFk,
i.name,
i.size,
i.category,
IFNULL(s.quantity, 0) AS quantity,
IFNULL(s.price, 0) AS price,
ROUND(SUM(tc.cost), 2) AS newPrice,
s.quantity * (s.price - ROUND(SUM(tc.cost), 2)) difference,
s.id AS saleFk
FROM sale s
JOIN item i ON i.id = s.itemFk
JOIN ticket t ON t.id = s.ticketFk
LEFT JOIN tmp.ticketComponent tc ON tc.itemFk = s.itemFk
AND tc.warehouseFk = t.warehouseFk
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
AND sc.componentFk = tc.componentFk
LEFT JOIN componentRate cr ON cr.id = tc.componentFk
WHERE
t.id = vTicketFk
AND IF(sc.componentFk IS NULL
AND cr.classRate IS NOT NULL, FALSE, TRUE)
GROUP BY s.id ORDER BY s.id;
DROP TEMPORARY TABLE
tmp.ticketComponent,
tmp.ticketComponentPrice;
END$$
DELIMITER ;

View File

@ -1,147 +0,0 @@
DROP procedure IF EXISTS `cache`.`available_refresh`;
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDate` DATE)
proc: BEGIN
DECLARE vStartDate DATE;
DECLARE vEndDate DATETIME;
DECLARE vReserveDate DATETIME;
DECLARE vParams CHAR(100);
DECLARE vInventoryDate DATE;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
CALL cache_calc_unlock (vCalc);
RESIGNAL;
END;
IF vDate < CURDATE() THEN
LEAVE proc;
END IF;
CALL vn2008.item_stock (vWarehouse, vDate, NULL);
SET vParams = CONCAT_WS('/', vWarehouse, vDate);
CALL cache_calc_start (vCalc, vRefresh, 'available', vParams);
IF !vRefresh THEN
LEAVE proc;
END IF;
-- Calcula algunos parámetros necesarios
SET vStartDate = TIMESTAMP(vDate, '00:00:00');
SET vEndDate = TIMESTAMP(TIMESTAMPADD(DAY, 4, vDate), '23:59:59');
SELECT FechaInventario INTO vInventoryDate FROM vn2008.tblContadores;
SELECT SUBTIME(NOW(), reserveTime) INTO vReserveDate
FROM hedera.orderConfig;
-- Calcula el ultimo dia de vida para cada producto
DROP TEMPORARY TABLE IF EXISTS item_range;
CREATE TEMPORARY TABLE item_range
(PRIMARY KEY (item_id))
ENGINE = MEMORY
SELECT c.item_id, IF(t.life IS NULL, NULL,
TIMESTAMP(TIMESTAMPADD(DAY, t.life, c.landing), '23:59:59')) AS date_end
FROM (
SELECT c.Id_Article item_id, MAX(landing) landing
FROM vn2008.Compres c
JOIN vn2008.Entradas e ON c.Id_Entrada = e.Id_Entrada
JOIN vn2008.travel t ON t.id = e.travel_id
JOIN vn2008.warehouse w ON w.id = t.warehouse_id
WHERE t.landing BETWEEN vInventoryDate AND vStartDate
AND t.warehouse_id = vWarehouse
AND NOT e.Inventario
AND NOT e.Redada
GROUP BY Id_Article
) c
JOIN vn2008.Articles a ON a.Id_Article = c.item_id
JOIN vn2008.Tipos t ON t.tipo_id = a.tipo_id
HAVING date_end >= vStartDate OR date_end IS NULL;
-- Replica la tabla item_range para poder usarla varias veces en la misma consulta
DROP TEMPORARY TABLE IF EXISTS item_range_copy1;
CREATE TEMPORARY TABLE item_range_copy1 LIKE item_range;
INSERT INTO item_range_copy1
SELECT * FROM item_range;
DROP TEMPORARY TABLE IF EXISTS item_range_copy2;
CREATE TEMPORARY TABLE item_range_copy2 LIKE item_range;
INSERT INTO item_range_copy2
SELECT * FROM item_range;
DROP TEMPORARY TABLE IF EXISTS item_range_copy3;
CREATE TEMPORARY TABLE item_range_copy3 LIKE item_range;
INSERT INTO item_range_copy3
SELECT * FROM item_range;
DROP TEMPORARY TABLE IF EXISTS item_range_copy4;
CREATE TEMPORARY TABLE item_range_copy4 LIKE item_range;
INSERT INTO item_range_copy4
SELECT * FROM item_range;
-- Calcula el ATP
DELETE FROM available WHERE calc_id = vCalc;
INSERT INTO available (calc_id, item_id, available)
SELECT vCalc, t.item_id, SUM(stock) amount FROM (
SELECT ti.item_id, stock
FROM vn2008.tmp_item ti
JOIN item_range ir ON ir.item_id = ti.item_id
UNION ALL
SELECT t.item_id, minacum(dt, amount, vDate) AS available FROM (
SELECT item_id, DATE(dat) dt, SUM(amount) amount FROM (
SELECT i.item_id, i.dat, i.amount
FROM vn2008.item_out i
JOIN item_range_copy1 ir ON ir.item_id = i.item_id
WHERE i.dat >= vStartDate
AND (ir.date_end IS NULL OR i.dat <= ir.date_end)
AND i.warehouse_id = vWarehouse
UNION ALL
SELECT i.item_id, i.dat, i.amount
FROM vn2008.item_entry_in i
JOIN item_range_copy2 ir ON ir.item_id = i.item_id
WHERE i.dat >= vStartDate
AND (ir.date_end IS NULL OR i.dat <= ir.date_end)
AND i.warehouse_id = vWarehouse
UNION ALL
SELECT i.item_id, i.dat, i.amount
FROM vn2008.item_entry_out i
JOIN item_range_copy3 ir ON ir.item_id = i.item_id
WHERE i.dat >= vStartDate
AND (ir.date_end IS NULL OR i.dat <= ir.date_end)
AND i.warehouse_id = vWarehouse
UNION ALL
SELECT r.item_id, r.shipment, -r.amount
FROM hedera.order_row r
JOIN hedera.`order` o ON o.id = r.order_id
JOIN item_range_copy4 ir ON ir.item_id = r.item_id
WHERE r.shipment >= vStartDate
AND (ir.date_end IS NULL OR r.shipment <= ir.date_end)
AND r.warehouse_id = vWarehouse
AND r.created >= vReserveDate
AND NOT o.confirmed
) t
GROUP BY item_id, dt
) t
GROUP BY t.item_id
) t GROUP BY t.item_id;
DROP TEMPORARY TABLE
vn2008.tmp_item
,item_range
,item_range_copy1
,item_range_copy2
,item_range_copy3
,item_range_copy4;
CALL cache_calc_end (vCalc);
END$$
DELIMITER ;

View File

@ -1,5 +0,0 @@
ALTER TABLE `postgresql`.`calendar_state`
ADD COLUMN `code` VARCHAR(45) NULL AFTER `permissionRate`;
UPDATE `postgresql`.`calendar_state` SET `code` = 'holiday' WHERE `calendar_state_id` = 1;
UPDATE `postgresql`.`calendar_state` SET `code` = 'halfHoliday' WHERE `calendar_state_id` = 6;

View File

@ -1,12 +0,0 @@
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`absenceType` AS
SELECT
`cs`.`calendar_state_id` AS `id`,
`cs`.`type` AS `name`,
`cs`.`rgb` AS `rgb`,
`cs`.`code` AS `code`
FROM
`postgresql`.`calendar_state` `cs`;

View File

@ -1,12 +0,0 @@
DROP VIEW IF EXISTS `vn`.`queuePriority` ;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`queuePriority` AS
SELECT
`p`.`Id_Prioridad` AS `id`,
`p`.`Prioridad` AS `priority`
FROM
`vn2008`.`Prioridades` `p`;

View File

@ -23,7 +23,7 @@ USE `util`;
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
INSERT INTO `config` VALUES (1,'10060',0,'production',NULL);
INSERT INTO `config` VALUES (1,'10070',0,'production',NULL);
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -36,7 +36,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:55
-- Dump completed on 2019-09-04 7:52:06
USE `account`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -61,7 +61,7 @@ USE `account`;
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES (0,'root','Rol con todos los privilegios',0,'2018-04-23 14:33:36','2018-04-23 14:33:59'),(1,'employee','Empleado básico',1,'2017-05-19 07:04:58','2017-11-29 10:06:31'),(2,'customer','Privilegios básicos de un cliente',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(3,'agency','Consultar tablas de predicciones de bultos',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(5,'administrative','Tareas relacionadas con la contabilidad',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(6,'guest','Privilegios para usuarios sin cuenta',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(9,'developer','Desarrolladores del sistema',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(11,'account','Privilegios relacionados con el login',0,'2017-05-19 07:04:58','2017-09-20 17:06:35'),(13,'teamBoss','Jefe de departamento',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(15,'logistic','Departamento de compras, responsables de la logistica',1,'2017-05-19 07:04:58','2018-02-12 10:50:10'),(16,'logisticBoss','Jefe del departamento de logística',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(17,'adminBoss','Jefe del departamento de administración',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(18,'salesPerson','Departamento de ventas',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(19,'salesBoss','Jefe del departamento de ventas',1,'2017-05-19 07:04:58','2017-08-16 12:38:27'),(20,'manager','Departamento de gerencia',1,'2017-06-01 14:57:02','2017-06-01 14:57:51'),(21,'salesAssistant','Jefe auxiliar de ventas',1,'2017-08-16 12:40:52','2017-08-16 12:40:52'),(22,'teamManager','Jefe de departamento con privilegios de auxiliar de venta.',1,'2017-09-07 09:08:12','2017-09-07 09:08:12'),(30,'financialBoss','Director finaciero',1,'2017-09-21 11:05:36','2017-09-21 11:05:36'),(31,'freelancer','Trabajadores por cuenta ajena',1,'2017-10-10 12:57:26','2017-10-10 12:59:27'),(32,'ett','Trabajadores de empresa temporal',1,'2017-10-10 12:58:58','2017-10-10 12:59:20'),(33,'invoicing','Personal con acceso a facturación',0,'2018-01-29 16:43:34','2018-01-29 16:43:34'),(34,'agencyBoss','Jefe/a del departamento de agencias',1,'2018-01-29 16:44:39','2018-02-23 07:58:53'),(35,'buyer','Departamento de compras',1,'2018-02-12 10:35:42','2018-02-12 10:35:42'),(36,'replenisher','Trabajadores de camara',1,'2018-02-16 14:07:10','2019-04-12 05:38:08'),(37,'hr','Gestor/a de recursos humanos',1,'2018-02-22 17:34:53','2018-02-22 17:34:53'),(38,'hrBoss','Jefe/a de recursos humanos',1,'2018-02-22 17:35:09','2018-02-22 17:35:09'),(39,'adminAssistant','Jefe auxiliar administrativo',1,'2018-02-23 10:37:36','2018-02-23 10:38:41'),(40,'handmade','Departamento de confección',1,'2018-02-23 11:14:53','2018-02-23 11:39:12'),(41,'handmadeBoss','Jefe de departamento de confección',1,'2018-02-23 11:15:09','2018-02-23 11:39:26'),(42,'artificial','Departamento de artificial',1,'2018-02-23 11:39:59','2018-02-23 11:39:59'),(43,'artificialBoss','Jefe del departamento de artificial',1,'2018-02-23 11:40:16','2018-02-23 11:40:16'),(44,'accessory','Departamento de complementos',1,'2018-02-23 11:41:12','2018-02-23 11:41:12'),(45,'accessoryBoss','Jefe del departamento de complementos',1,'2018-02-23 11:41:23','2018-02-23 11:41:23'),(47,'cooler','Empleados de cámara',1,'2018-02-23 13:08:18','2018-02-23 13:08:18'),(48,'coolerBoss','Jefe del departamento de cámara',1,'2018-02-23 13:12:01','2018-02-23 13:12:01'),(49,'production','Empleado de producción',0,'2018-02-26 15:28:23','2019-01-21 12:57:21'),(50,'productionBoss','Jefe de producción',1,'2018-02-26 15:34:12','2018-02-26 15:34:12'),(51,'marketing','Departamento de marketing',1,'2018-03-01 07:28:39','2018-03-01 07:28:39'),(52,'marketingBoss','Jefe del departamento de marketing',1,'2018-03-01 07:28:57','2018-03-01 07:28:57'),(53,'insurance','Gestor de seguros de cambio',0,'2018-03-05 07:44:35','2019-02-01 13:47:57'),(54,'itemPicker','Sacador en cámara',1,'2018-03-05 12:08:17','2018-03-05 12:08:17'),(55,'itemPickerBoss','Jefe de sacadores',1,'2018-03-05 12:08:31','2018-03-05 12:08:31'),(56,'delivery','Personal de reparto',1,'2018-05-30 06:07:02','2018-05-30 06:07:02'),(57,'deliveryBoss','Jefe de personal de reparto',1,'2018-05-30 06:07:19','2018-05-30 06:07:19'),(58,'packager','Departamento encajadores',1,'2019-01-21 12:43:45','2019-01-21 12:43:45'),(59,'packagerBoss','Jefe departamento encajadores',1,'2019-01-21 12:44:10','2019-01-21 12:44:10'),(60,'productionAssi','Tareas relacionadas con producción y administración',1,'2019-01-29 13:29:01','2019-01-29 13:29:01'),(61,'replenisherBos','Jefe de Complementos/Camara',1,'2019-07-01 06:44:07','2019-07-01 06:44:07'),(62,'noLogin','Role without login access to MySQL',0,'2019-07-01 06:50:19','2019-07-02 13:42:05'),(64,'balanceSheet','Consulta de Balance',0,'2019-07-16 12:12:08','2019-07-16 12:12:08');
INSERT INTO `role` VALUES (0,'root','Rol con todos los privilegios',0,'2018-04-23 14:33:36','2018-04-23 14:33:59'),(1,'employee','Empleado básico',1,'2017-05-19 07:04:58','2017-11-29 10:06:31'),(2,'customer','Privilegios básicos de un cliente',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(3,'agency','Consultar tablas de predicciones de bultos',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(5,'administrative','Tareas relacionadas con la contabilidad',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(6,'guest','Privilegios para usuarios sin cuenta',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(9,'developer','Desarrolladores del sistema',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(11,'account','Privilegios relacionados con el login',0,'2017-05-19 07:04:58','2017-09-20 17:06:35'),(13,'teamBoss','Jefe de departamento',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(15,'logistic','Departamento de compras, responsables de la logistica',1,'2017-05-19 07:04:58','2018-02-12 10:50:10'),(16,'logisticBoss','Jefe del departamento de logística',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(17,'adminBoss','Jefe del departamento de administración',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(18,'salesPerson','Departamento de ventas',1,'2017-05-19 07:04:58','2017-05-19 07:04:58'),(19,'salesBoss','Jefe del departamento de ventas',1,'2017-05-19 07:04:58','2017-08-16 12:38:27'),(20,'manager','Departamento de gerencia',1,'2017-06-01 14:57:02','2017-06-01 14:57:51'),(21,'salesAssistant','Jefe auxiliar de ventas',1,'2017-08-16 12:40:52','2017-08-16 12:40:52'),(22,'teamManager','Jefe de departamento con privilegios de auxiliar de venta.',1,'2017-09-07 09:08:12','2017-09-07 09:08:12'),(30,'financialBoss','Director finaciero',1,'2017-09-21 11:05:36','2017-09-21 11:05:36'),(31,'freelancer','Trabajadores por cuenta ajena',1,'2017-10-10 12:57:26','2017-10-10 12:59:27'),(32,'ett','Trabajadores de empresa temporal',1,'2017-10-10 12:58:58','2017-10-10 12:59:20'),(33,'invoicing','Personal con acceso a facturación',0,'2018-01-29 16:43:34','2018-01-29 16:43:34'),(34,'agencyBoss','Jefe/a del departamento de agencias',1,'2018-01-29 16:44:39','2018-02-23 07:58:53'),(35,'buyer','Departamento de compras',1,'2018-02-12 10:35:42','2018-02-12 10:35:42'),(36,'replenisher','Trabajadores de camara',1,'2018-02-16 14:07:10','2019-04-12 05:38:08'),(37,'hr','Gestor/a de recursos humanos',1,'2018-02-22 17:34:53','2018-02-22 17:34:53'),(38,'hrBoss','Jefe/a de recursos humanos',1,'2018-02-22 17:35:09','2018-02-22 17:35:09'),(39,'adminAssistant','Jefe auxiliar administrativo',1,'2018-02-23 10:37:36','2018-02-23 10:38:41'),(40,'handmade','Departamento de confección',1,'2018-02-23 11:14:53','2018-02-23 11:39:12'),(41,'handmadeBoss','Jefe de departamento de confección',1,'2018-02-23 11:15:09','2018-02-23 11:39:26'),(42,'artificial','Departamento de artificial',1,'2018-02-23 11:39:59','2018-02-23 11:39:59'),(43,'artificialBoss','Jefe del departamento de artificial',1,'2018-02-23 11:40:16','2018-02-23 11:40:16'),(44,'accessory','Departamento de complementos',1,'2018-02-23 11:41:12','2018-02-23 11:41:12'),(45,'accessoryBoss','Jefe del departamento de complementos',1,'2018-02-23 11:41:23','2018-02-23 11:41:23'),(47,'cooler','Empleados de cámara',1,'2018-02-23 13:08:18','2018-02-23 13:08:18'),(48,'coolerBoss','Jefe del departamento de cámara',1,'2018-02-23 13:12:01','2018-02-23 13:12:01'),(49,'production','Empleado de producción',0,'2018-02-26 15:28:23','2019-01-21 12:57:21'),(50,'productionBoss','Jefe de producción',1,'2018-02-26 15:34:12','2018-02-26 15:34:12'),(51,'marketing','Departamento de marketing',1,'2018-03-01 07:28:39','2018-03-01 07:28:39'),(52,'marketingBoss','Jefe del departamento de marketing',1,'2018-03-01 07:28:57','2018-03-01 07:28:57'),(53,'insurance','Gestor de seguros de cambio',0,'2018-03-05 07:44:35','2019-02-01 13:47:57'),(54,'itemPicker','Sacador en cámara',1,'2018-03-05 12:08:17','2018-03-05 12:08:17'),(55,'itemPickerBoss','Jefe de sacadores',1,'2018-03-05 12:08:31','2018-03-05 12:08:31'),(56,'delivery','Personal de reparto',1,'2018-05-30 06:07:02','2018-05-30 06:07:02'),(57,'deliveryBoss','Jefe de personal de reparto',1,'2018-05-30 06:07:19','2018-05-30 06:07:19'),(58,'packager','Departamento encajadores',1,'2019-01-21 12:43:45','2019-01-21 12:43:45'),(59,'packagerBoss','Jefe departamento encajadores',1,'2019-01-21 12:44:10','2019-01-21 12:44:10'),(60,'productionAssi','Tareas relacionadas con producción y administración',1,'2019-01-29 13:29:01','2019-01-29 13:29:01'),(61,'replenisherBos','Jefe de Complementos/Camara',1,'2019-07-01 06:44:07','2019-07-01 06:44:07'),(62,'noLogin','Role without login access to MySQL',0,'2019-07-01 06:50:19','2019-07-02 13:42:05'),(64,'balanceSheet','Consulta de Balance',0,'2019-07-16 12:12:08','2019-07-16 12:12:08'),(65,'officeBoss','Jefe de filial',1,'2019-08-02 06:54:26','2019-08-02 06:54:26'),(66,'sysadmin','Administrador de sistema',1,'2019-08-08 06:58:56','2019-08-08 06:58:56');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
@ -71,7 +71,7 @@ UNLOCK TABLES;
LOCK TABLES `roleInherit` WRITE;
/*!40000 ALTER TABLE `roleInherit` DISABLE KEYS */;
INSERT INTO `roleInherit` VALUES (9,0),(5,1),(13,1),(18,1),(31,1),(32,1),(34,1),(35,1),(37,1),(40,1),(42,1),(44,1),(47,1),(51,1),(53,1),(54,1),(56,1),(58,1),(1,2),(1,3),(30,5),(39,5),(60,5),(11,6),(1,11),(2,11),(3,11),(16,13),(20,13),(21,13),(22,13),(34,13),(41,13),(43,13),(45,13),(48,13),(50,13),(52,13),(55,13),(57,13),(59,13),(61,13),(16,15),(21,18),(5,19),(52,19),(17,20),(30,20),(19,21),(22,21),(39,21),(30,22),(5,33),(34,33),(15,35),(20,35),(52,35),(49,36),(61,36),(17,37),(38,37),(17,39),(41,40),(43,42),(36,44),(45,44),(36,47),(48,47),(50,49),(60,50),(52,51),(21,53),(30,53),(55,54),(57,56),(50,57),(60,57),(49,58),(59,58),(50,59),(17,64),(30,64),(38,64);
INSERT INTO `roleInherit` VALUES (9,0),(66,0),(5,1),(13,1),(18,1),(31,1),(32,1),(34,1),(35,1),(37,1),(40,1),(42,1),(44,1),(47,1),(51,1),(53,1),(54,1),(56,1),(58,1),(1,2),(1,3),(30,5),(39,5),(60,5),(11,6),(1,11),(2,11),(3,11),(16,13),(20,13),(21,13),(22,13),(34,13),(41,13),(43,13),(45,13),(48,13),(50,13),(52,13),(55,13),(57,13),(59,13),(61,13),(16,15),(20,16),(21,18),(5,19),(52,19),(65,19),(17,20),(30,20),(19,21),(22,21),(39,21),(30,22),(5,33),(34,33),(15,35),(52,35),(49,36),(61,36),(17,37),(38,37),(17,39),(41,40),(43,42),(36,44),(45,44),(36,47),(48,47),(50,49),(60,50),(65,50),(52,51),(21,53),(30,53),(55,54),(57,56),(50,57),(60,57),(49,58),(59,58),(50,59),(17,64),(30,64),(38,64),(20,65);
/*!40000 ALTER TABLE `roleInherit` ENABLE KEYS */;
UNLOCK TABLES;
@ -81,7 +81,7 @@ UNLOCK TABLES;
LOCK TABLES `roleRole` WRITE;
/*!40000 ALTER TABLE `roleRole` DISABLE KEYS */;
INSERT INTO `roleRole` VALUES (0,0),(0,1),(0,2),(0,3),(0,5),(0,6),(0,9),(0,11),(0,13),(0,15),(0,16),(0,17),(0,18),(0,19),(0,20),(0,21),(0,22),(0,30),(0,31),(0,32),(0,33),(0,34),(0,35),(0,36),(0,37),(0,38),(0,39),(0,40),(0,41),(0,42),(0,43),(0,44),(0,45),(0,47),(0,48),(0,49),(0,50),(0,51),(0,52),(0,53),(0,54),(0,55),(0,56),(0,57),(0,58),(0,59),(0,60),(0,61),(0,62),(0,64),(1,1),(1,2),(1,3),(1,6),(1,11),(2,2),(2,6),(2,11),(3,3),(3,6),(3,11),(5,1),(5,2),(5,3),(5,5),(5,6),(5,11),(5,13),(5,18),(5,19),(5,21),(5,33),(5,53),(6,6),(9,0),(9,1),(9,2),(9,3),(9,5),(9,6),(9,9),(9,11),(9,13),(9,15),(9,16),(9,17),(9,18),(9,19),(9,20),(9,21),(9,22),(9,30),(9,31),(9,32),(9,33),(9,34),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40),(9,41),(9,42),(9,43),(9,44),(9,45),(9,47),(9,48),(9,49),(9,50),(9,51),(9,52),(9,53),(9,54),(9,55),(9,56),(9,57),(9,58),(9,59),(9,60),(9,61),(9,62),(9,64),(11,6),(11,11),(13,1),(13,2),(13,3),(13,6),(13,11),(13,13),(15,1),(15,2),(15,3),(15,6),(15,11),(15,15),(15,35),(16,1),(16,2),(16,3),(16,6),(16,11),(16,13),(16,15),(16,16),(16,35),(17,1),(17,2),(17,3),(17,5),(17,6),(17,11),(17,13),(17,17),(17,18),(17,19),(17,20),(17,21),(17,33),(17,35),(17,37),(17,39),(17,53),(17,64),(18,1),(18,2),(18,3),(18,6),(18,11),(18,18),(19,1),(19,2),(19,3),(19,6),(19,11),(19,13),(19,18),(19,19),(19,21),(19,53),(20,1),(20,2),(20,3),(20,6),(20,11),(20,13),(20,20),(20,35),(21,1),(21,2),(21,3),(21,6),(21,11),(21,13),(21,18),(21,21),(21,53),(22,1),(22,2),(22,3),(22,6),(22,11),(22,13),(22,18),(22,21),(22,22),(22,53),(30,1),(30,2),(30,3),(30,5),(30,6),(30,11),(30,13),(30,18),(30,19),(30,20),(30,21),(30,22),(30,30),(30,33),(30,35),(30,53),(30,64),(31,1),(31,2),(31,3),(31,6),(31,11),(31,31),(32,1),(32,2),(32,3),(32,6),(32,11),(32,32),(33,33),(34,1),(34,2),(34,3),(34,6),(34,11),(34,13),(34,33),(34,34),(35,1),(35,2),(35,3),(35,6),(35,11),(35,35),(36,1),(36,2),(36,3),(36,6),(36,11),(36,36),(36,44),(36,47),(37,1),(37,2),(37,3),(37,6),(37,11),(37,37),(38,1),(38,2),(38,3),(38,6),(38,11),(38,37),(38,38),(38,64),(39,1),(39,2),(39,3),(39,5),(39,6),(39,11),(39,13),(39,18),(39,19),(39,21),(39,33),(39,39),(39,53),(40,1),(40,2),(40,3),(40,6),(40,11),(40,40),(41,1),(41,2),(41,3),(41,6),(41,11),(41,13),(41,40),(41,41),(42,1),(42,2),(42,3),(42,6),(42,11),(42,42),(43,1),(43,2),(43,3),(43,6),(43,11),(43,13),(43,42),(43,43),(44,1),(44,2),(44,3),(44,6),(44,11),(44,44),(45,1),(45,2),(45,3),(45,6),(45,11),(45,13),(45,44),(45,45),(47,1),(47,2),(47,3),(47,6),(47,11),(47,47),(48,1),(48,2),(48,3),(48,6),(48,11),(48,13),(48,47),(48,48),(49,1),(49,2),(49,3),(49,6),(49,11),(49,36),(49,44),(49,47),(49,49),(49,58),(50,1),(50,2),(50,3),(50,6),(50,11),(50,13),(50,36),(50,44),(50,47),(50,49),(50,50),(50,56),(50,57),(50,58),(50,59),(51,1),(51,2),(51,3),(51,6),(51,11),(51,51),(52,1),(52,2),(52,3),(52,6),(52,11),(52,13),(52,18),(52,19),(52,21),(52,35),(52,51),(52,52),(52,53),(53,1),(53,2),(53,3),(53,6),(53,11),(53,53),(54,1),(54,2),(54,3),(54,6),(54,11),(54,54),(55,1),(55,2),(55,3),(55,6),(55,11),(55,13),(55,54),(55,55),(56,1),(56,2),(56,3),(56,6),(56,11),(56,56),(57,1),(57,2),(57,3),(57,6),(57,11),(57,13),(57,56),(57,57),(58,1),(58,2),(58,3),(58,6),(58,11),(58,58),(59,1),(59,2),(59,3),(59,6),(59,11),(59,13),(59,58),(59,59),(60,1),(60,2),(60,3),(60,5),(60,6),(60,11),(60,13),(60,18),(60,19),(60,21),(60,33),(60,36),(60,44),(60,47),(60,49),(60,50),(60,53),(60,56),(60,57),(60,58),(60,59),(60,60),(61,1),(61,2),(61,3),(61,6),(61,11),(61,13),(61,36),(61,44),(61,47),(61,61),(62,62),(64,64);
INSERT INTO `roleRole` VALUES (0,0),(0,1),(0,2),(0,3),(0,5),(0,6),(0,9),(0,11),(0,13),(0,15),(0,16),(0,17),(0,18),(0,19),(0,20),(0,21),(0,22),(0,30),(0,31),(0,32),(0,33),(0,34),(0,35),(0,36),(0,37),(0,38),(0,39),(0,40),(0,41),(0,42),(0,43),(0,44),(0,45),(0,47),(0,48),(0,49),(0,50),(0,51),(0,52),(0,53),(0,54),(0,55),(0,56),(0,57),(0,58),(0,59),(0,60),(0,61),(0,62),(0,64),(0,65),(0,66),(1,1),(1,2),(1,3),(1,6),(1,11),(2,2),(2,6),(2,11),(3,3),(3,6),(3,11),(5,1),(5,2),(5,3),(5,5),(5,6),(5,11),(5,13),(5,18),(5,19),(5,21),(5,33),(5,53),(6,6),(9,0),(9,1),(9,2),(9,3),(9,5),(9,6),(9,9),(9,11),(9,13),(9,15),(9,16),(9,17),(9,18),(9,19),(9,20),(9,21),(9,22),(9,30),(9,31),(9,32),(9,33),(9,34),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40),(9,41),(9,42),(9,43),(9,44),(9,45),(9,47),(9,48),(9,49),(9,50),(9,51),(9,52),(9,53),(9,54),(9,55),(9,56),(9,57),(9,58),(9,59),(9,60),(9,61),(9,62),(9,64),(9,65),(9,66),(11,6),(11,11),(13,1),(13,2),(13,3),(13,6),(13,11),(13,13),(15,1),(15,2),(15,3),(15,6),(15,11),(15,15),(15,35),(16,1),(16,2),(16,3),(16,6),(16,11),(16,13),(16,15),(16,16),(16,35),(17,1),(17,2),(17,3),(17,5),(17,6),(17,11),(17,13),(17,15),(17,16),(17,17),(17,18),(17,19),(17,20),(17,21),(17,33),(17,35),(17,36),(17,37),(17,39),(17,44),(17,47),(17,49),(17,50),(17,53),(17,56),(17,57),(17,58),(17,59),(17,64),(17,65),(18,1),(18,2),(18,3),(18,6),(18,11),(18,18),(19,1),(19,2),(19,3),(19,6),(19,11),(19,13),(19,18),(19,19),(19,21),(19,53),(20,1),(20,2),(20,3),(20,6),(20,11),(20,13),(20,15),(20,16),(20,18),(20,19),(20,20),(20,21),(20,35),(20,36),(20,44),(20,47),(20,49),(20,50),(20,53),(20,56),(20,57),(20,58),(20,59),(20,65),(21,1),(21,2),(21,3),(21,6),(21,11),(21,13),(21,18),(21,21),(21,53),(22,1),(22,2),(22,3),(22,6),(22,11),(22,13),(22,18),(22,21),(22,22),(22,53),(30,1),(30,2),(30,3),(30,5),(30,6),(30,11),(30,13),(30,15),(30,16),(30,18),(30,19),(30,20),(30,21),(30,22),(30,30),(30,33),(30,35),(30,36),(30,44),(30,47),(30,49),(30,50),(30,53),(30,56),(30,57),(30,58),(30,59),(30,64),(30,65),(31,1),(31,2),(31,3),(31,6),(31,11),(31,31),(32,1),(32,2),(32,3),(32,6),(32,11),(32,32),(33,33),(34,1),(34,2),(34,3),(34,6),(34,11),(34,13),(34,33),(34,34),(35,1),(35,2),(35,3),(35,6),(35,11),(35,35),(36,1),(36,2),(36,3),(36,6),(36,11),(36,36),(36,44),(36,47),(37,1),(37,2),(37,3),(37,6),(37,11),(37,37),(38,1),(38,2),(38,3),(38,6),(38,11),(38,37),(38,38),(38,64),(39,1),(39,2),(39,3),(39,5),(39,6),(39,11),(39,13),(39,18),(39,19),(39,21),(39,33),(39,39),(39,53),(40,1),(40,2),(40,3),(40,6),(40,11),(40,40),(41,1),(41,2),(41,3),(41,6),(41,11),(41,13),(41,40),(41,41),(42,1),(42,2),(42,3),(42,6),(42,11),(42,42),(43,1),(43,2),(43,3),(43,6),(43,11),(43,13),(43,42),(43,43),(44,1),(44,2),(44,3),(44,6),(44,11),(44,44),(45,1),(45,2),(45,3),(45,6),(45,11),(45,13),(45,44),(45,45),(47,1),(47,2),(47,3),(47,6),(47,11),(47,47),(48,1),(48,2),(48,3),(48,6),(48,11),(48,13),(48,47),(48,48),(49,1),(49,2),(49,3),(49,6),(49,11),(49,36),(49,44),(49,47),(49,49),(49,58),(50,1),(50,2),(50,3),(50,6),(50,11),(50,13),(50,36),(50,44),(50,47),(50,49),(50,50),(50,56),(50,57),(50,58),(50,59),(51,1),(51,2),(51,3),(51,6),(51,11),(51,51),(52,1),(52,2),(52,3),(52,6),(52,11),(52,13),(52,18),(52,19),(52,21),(52,35),(52,51),(52,52),(52,53),(53,1),(53,2),(53,3),(53,6),(53,11),(53,53),(54,1),(54,2),(54,3),(54,6),(54,11),(54,54),(55,1),(55,2),(55,3),(55,6),(55,11),(55,13),(55,54),(55,55),(56,1),(56,2),(56,3),(56,6),(56,11),(56,56),(57,1),(57,2),(57,3),(57,6),(57,11),(57,13),(57,56),(57,57),(58,1),(58,2),(58,3),(58,6),(58,11),(58,58),(59,1),(59,2),(59,3),(59,6),(59,11),(59,13),(59,58),(59,59),(60,1),(60,2),(60,3),(60,5),(60,6),(60,11),(60,13),(60,18),(60,19),(60,21),(60,33),(60,36),(60,44),(60,47),(60,49),(60,50),(60,53),(60,56),(60,57),(60,58),(60,59),(60,60),(61,1),(61,2),(61,3),(61,6),(61,11),(61,13),(61,36),(61,44),(61,47),(61,61),(62,62),(64,64),(65,1),(65,2),(65,3),(65,6),(65,11),(65,13),(65,18),(65,19),(65,21),(65,36),(65,44),(65,47),(65,49),(65,50),(65,53),(65,56),(65,57),(65,58),(65,59),(65,65),(66,0),(66,1),(66,2),(66,3),(66,5),(66,6),(66,9),(66,11),(66,13),(66,15),(66,16),(66,17),(66,18),(66,19),(66,20),(66,21),(66,22),(66,30),(66,31),(66,32),(66,33),(66,34),(66,35),(66,36),(66,37),(66,38),(66,39),(66,40),(66,41),(66,42),(66,43),(66,44),(66,45),(66,47),(66,48),(66,49),(66,50),(66,51),(66,52),(66,53),(66,54),(66,55),(66,56),(66,57),(66,58),(66,59),(66,60),(66,61),(66,62),(66,64),(66,65),(66,66);
/*!40000 ALTER TABLE `roleRole` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -94,7 +94,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:56
-- Dump completed on 2019-09-04 7:52:06
USE `salix`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -142,7 +142,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:56
-- Dump completed on 2019-09-04 7:52:06
USE `vn`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -227,7 +227,7 @@ UNLOCK TABLES;
LOCK TABLES `tag` WRITE;
/*!40000 ALTER TABLE `tag` DISABLE KEYS */;
INSERT INTO `tag` VALUES (1,'Color',0,0,'ink',NULL,NULL),(2,'Forma',1,0,NULL,NULL,NULL),(3,'Material',1,0,NULL,NULL,NULL),(4,'Longitud',1,1,NULL,'mm',NULL),(5,'Diámetro',1,1,NULL,'mm',NULL),(6,'Perímetro',1,1,NULL,'mm',NULL),(7,'Ancho de la base',1,1,NULL,'mm',NULL),(8,'Altura',1,1,NULL,'mm',NULL),(9,'Volumen',1,1,NULL,'ml',NULL),(10,'Densidad',1,1,NULL,NULL,NULL),(11,'Calidad',1,0,NULL,NULL,NULL),(12,'Textura',1,0,NULL,NULL,NULL),(13,'Material del mango',1,0,NULL,NULL,NULL),(14,'Compra mínima',1,0,NULL,NULL,NULL),(15,'Nº pétalos',1,1,NULL,NULL,NULL),(16,'Ancho',1,1,NULL,'mm',NULL),(17,'Alto',1,1,NULL,'mm',NULL),(18,'Profundidad',1,1,NULL,'mm',NULL),(19,'Largo',1,1,NULL,'mm',NULL),(20,'Ancho superior',1,1,NULL,'mm',NULL),(21,'Ancho inferior',1,1,NULL,'mm',NULL),(22,'Gramaje',1,0,NULL,'g',NULL),(23,'Tallos',1,1,NULL,NULL,NULL),(24,'Estado',0,0,NULL,NULL,NULL),(25,'Color principal',0,0,NULL,NULL,NULL),(26,'Color secundario',0,0,NULL,NULL,NULL),(27,'Longitud(cm)',1,1,NULL,'cm',NULL),(28,'Diámetro base',1,1,'','mm',NULL),(29,'Colección',1,0,NULL,NULL,NULL),(30,'Uds / caja',1,1,NULL,NULL,NULL),(31,'Contenido',1,0,NULL,NULL,NULL),(32,'Peso',1,1,NULL,'g',NULL),(33,'Grosor',1,1,NULL,'mm',NULL),(34,'Marca',1,0,NULL,NULL,NULL),(35,'Origen',0,0,'origin',NULL,NULL),(36,'Proveedor',1,0,NULL,NULL,NULL),(37,'Productor',1,0,'producer',NULL,NULL),(38,'Duración',1,1,NULL,'s',NULL),(39,'Flor',1,0,NULL,NULL,NULL),(40,'Soporte',1,0,NULL,NULL,NULL),(41,'Tamaño flor',1,0,NULL,NULL,NULL),(42,'Apertura',1,0,NULL,NULL,NULL),(43,'Tallo',0,0,NULL,NULL,NULL),(44,'Numero hojas',1,1,NULL,NULL,NULL),(45,'Dimensiones',1,0,NULL,NULL,NULL),(46,'Diámetro boca',1,1,NULL,'mm',NULL),(47,'Nº flores',1,1,NULL,NULL,NULL),(48,'Uds / paquete',1,1,NULL,NULL,NULL),(49,'Maceta',1,0,NULL,NULL,NULL),(50,'Textura flor',1,0,NULL,NULL,NULL),(51,'Textura hoja',1,0,NULL,NULL,NULL),(52,'Tipo de IVA',1,0,NULL,NULL,NULL),(53,'Tronco',1,0,NULL,NULL,NULL),(54,'Hoja',1,0,NULL,NULL,NULL),(55,'Formato',1,0,NULL,NULL,NULL),(56,'Genero',1,0,NULL,NULL,NULL),(57,'Especie',1,0,NULL,NULL,NULL),(58,'Variedad',1,0,NULL,NULL,NULL),(59,'Medida grande',1,0,NULL,NULL,NULL),(60,'Medida mediano',1,0,NULL,NULL,NULL),(61,'Medida pequeño',1,0,NULL,NULL,NULL),(62,'Medida pequeño',1,0,NULL,NULL,NULL),(63,'Recipiente interior',1,0,NULL,NULL,NULL),(64,'Material secundario',1,0,NULL,NULL,NULL),(65,'Colores',1,0,NULL,NULL,NULL),(66,'Referencia',1,0,NULL,NULL,NULL),(67,'Categoria',1,0,NULL,NULL,NULL),(68,'Amb',0,0,NULL,NULL,NULL),(69,'Anchura',1,1,NULL,'cm',NULL),(70,'Hueco interior',-1,0,NULL,NULL,NULL),(71,'Tamaño',1,0,NULL,NULL,NULL),(72,'Color botón',1,0,NULL,NULL,NULL),(73,'Tamaño minimo del botón',1,0,NULL,NULL,NULL),(74,'Obtentor',1,0,NULL,NULL,NULL),(75,'Logitud del brote',1,0,NULL,NULL,NULL),(76,'Tallos / u.v.',1,0,NULL,NULL,NULL),(77,'Madera de',1,0,NULL,NULL,NULL),(78,'Unidad de venta',1,0,NULL,NULL,NULL),(79,'Temporal',1,0,NULL,NULL,NULL),(80,'Gramaje/tallo',1,1,NULL,'g',NULL),(81,'Peso/paquete',1,1,NULL,'g',NULL),(82,'Flexibilidad del tallo',1,0,NULL,NULL,NULL),(83,'Nº planchas',1,1,NULL,NULL,NULL),(84,'Nº páginas',1,1,NULL,NULL,NULL),(85,'Editorial',1,0,NULL,NULL,NULL),(86,'Idioma',1,0,NULL,NULL,NULL),(87,'Fecha publicación',1,0,NULL,NULL,NULL),(88,'Cubierta',1,0,NULL,NULL,NULL),(89,'Encuadernación',1,0,NULL,NULL,NULL),(90,'Autor',1,0,NULL,NULL,NULL),(91,'Envoltorio',1,0,NULL,NULL,NULL),(92,'Nombre temporal',1,0,NULL,NULL,NULL),(93,'Modelo',1,0,NULL,NULL,NULL),(94,'Producto',1,0,NULL,NULL,NULL),(95,'Título',1,0,NULL,NULL,NULL),(96,'Tomo',1,0,NULL,NULL,NULL),(97,'Articulo',1,0,NULL,NULL,NULL),(98,'Metodo de cultivo',1,0,NULL,NULL,NULL),(99,'Edad',1,0,NULL,NULL,NULL),(100,'Agotado',1,0,NULL,NULL,NULL),(101,'Altura con asa',1,0,NULL,NULL,NULL),(102,'Nº tallos',1,1,NULL,NULL,NULL),(103,'Cultivo',1,0,NULL,NULL,NULL);
INSERT INTO `tag` VALUES (1,'Color',0,0,'ink',NULL,NULL),(2,'Forma',1,0,NULL,NULL,NULL),(3,'Material',1,0,NULL,NULL,NULL),(4,'Longitud',1,1,NULL,'mm',NULL),(5,'Diámetro',1,1,NULL,'mm',NULL),(6,'Perímetro',1,1,NULL,'mm',NULL),(7,'Ancho de la base',1,1,NULL,'mm',NULL),(8,'Altura',1,1,NULL,'mm',NULL),(9,'Volumen',1,1,NULL,'ml',NULL),(10,'Densidad',1,1,NULL,NULL,NULL),(11,'Calidad',1,0,NULL,NULL,NULL),(12,'Textura',1,0,NULL,NULL,NULL),(13,'Material del mango',1,0,NULL,NULL,NULL),(14,'Compra mínima',1,0,NULL,NULL,NULL),(15,'Nº pétalos',1,1,NULL,NULL,NULL),(16,'Ancho',1,1,NULL,'mm',NULL),(17,'Alto',1,1,NULL,'mm',NULL),(18,'Profundidad',1,1,NULL,'mm',NULL),(19,'Largo',1,1,NULL,'mm',NULL),(20,'Ancho superior',1,1,NULL,'mm',NULL),(21,'Ancho inferior',1,1,NULL,'mm',NULL),(22,'Gramaje',1,0,NULL,'g',NULL),(23,'Tallos',1,1,NULL,NULL,NULL),(24,'Estado',0,0,NULL,NULL,NULL),(25,'Color principal',0,0,NULL,NULL,NULL),(26,'Color secundario',0,0,NULL,NULL,NULL),(27,'Longitud(cm)',1,1,NULL,'cm',NULL),(28,'Diámetro base',1,1,'','mm',NULL),(29,'Colección',1,0,NULL,NULL,NULL),(30,'Uds / caja',1,1,NULL,NULL,NULL),(31,'Contenido',1,0,NULL,NULL,NULL),(32,'Peso',1,1,NULL,'g',NULL),(33,'Grosor',1,1,NULL,'mm',NULL),(34,'Marca',1,0,NULL,NULL,NULL),(35,'Origen',0,0,'origin',NULL,NULL),(36,'Proveedor',1,0,NULL,NULL,NULL),(37,'Productor',0,0,'producer',NULL,NULL),(38,'Duración',1,1,NULL,'s',NULL),(39,'Flor',1,0,NULL,NULL,NULL),(40,'Soporte',1,0,NULL,NULL,NULL),(41,'Tamaño flor',1,0,NULL,NULL,NULL),(42,'Apertura',1,0,NULL,NULL,NULL),(43,'Tallo',0,0,NULL,NULL,NULL),(44,'Nº hojas',1,1,NULL,NULL,NULL),(45,'Dimensiones',1,0,NULL,NULL,NULL),(46,'Diámetro boca',1,1,NULL,'mm',NULL),(47,'Nº flores',1,1,NULL,NULL,NULL),(48,'Uds / paquete',1,1,NULL,NULL,NULL),(49,'Maceta',1,0,NULL,NULL,NULL),(50,'Textura flor',1,0,NULL,NULL,NULL),(51,'Textura hoja',1,0,NULL,NULL,NULL),(52,'Tipo de IVA',1,0,NULL,NULL,NULL),(53,'Tronco',1,0,NULL,NULL,NULL),(54,'Hoja',1,0,NULL,NULL,NULL),(55,'Formato',1,0,NULL,NULL,NULL),(56,'Genero',1,0,NULL,NULL,NULL),(57,'Especie',1,0,NULL,NULL,NULL),(58,'Variedad',1,0,NULL,NULL,NULL),(59,'Medida grande',1,0,NULL,NULL,NULL),(60,'Medida mediano',1,0,NULL,NULL,NULL),(61,'Medida pequeño',1,0,NULL,NULL,NULL),(62,'Medida pequeño',1,0,NULL,NULL,NULL),(63,'Recipiente interior',1,0,NULL,NULL,NULL),(64,'Material secundario',1,0,NULL,NULL,NULL),(65,'Colores',1,0,NULL,NULL,NULL),(66,'Referencia',1,0,NULL,NULL,NULL),(67,'Categoria',1,0,NULL,NULL,NULL),(68,'Amb',0,0,NULL,NULL,NULL),(69,'Anchura',1,1,NULL,'cm',NULL),(70,'Hueco interior',-1,0,NULL,NULL,NULL),(71,'Tamaño',1,0,NULL,NULL,NULL),(72,'Color botón',1,0,NULL,NULL,NULL),(73,'Tamaño minimo del botón',1,0,NULL,NULL,NULL),(74,'Obtentor',1,0,NULL,NULL,NULL),(75,'Longitud del brote',1,0,NULL,NULL,NULL),(76,'Tallos / u.v.',1,0,NULL,NULL,NULL),(77,'Madera de',1,0,NULL,NULL,NULL),(78,'Unidad de venta',1,0,NULL,NULL,NULL),(79,'Temporal',1,0,NULL,NULL,NULL),(80,'Gramaje/tallo',1,1,NULL,'g',NULL),(81,'Peso/paquete',1,1,NULL,'g',NULL),(82,'Flexibilidad del tallo',1,0,NULL,NULL,NULL),(83,'Nº planchas',1,1,NULL,NULL,NULL),(84,'Nº páginas',1,1,NULL,NULL,NULL),(85,'Editorial',1,0,NULL,NULL,NULL),(86,'Idioma',1,0,NULL,NULL,NULL),(87,'Fecha publicación',1,0,NULL,NULL,NULL),(88,'Cubierta',1,0,NULL,NULL,NULL),(89,'Encuadernación',1,0,NULL,NULL,NULL),(90,'Autor',1,0,NULL,NULL,NULL),(91,'Envoltorio',1,0,NULL,NULL,NULL),(92,'Nombre temporal',1,0,NULL,NULL,NULL),(93,'Modelo',1,0,NULL,NULL,NULL),(94,'Producto',1,0,NULL,NULL,NULL),(95,'Título',1,0,NULL,NULL,NULL),(96,'Tomo',1,0,NULL,NULL,NULL),(97,'Articulo',1,0,NULL,NULL,NULL),(98,'Metodo de cultivo',1,0,NULL,NULL,NULL),(99,'Edad',1,0,NULL,NULL,NULL),(100,'Agotado',1,0,NULL,NULL,NULL),(101,'Altura con asa',1,0,NULL,NULL,NULL),(102,'Nº tallos',1,1,NULL,NULL,NULL),(103,'Cultivo',1,0,NULL,NULL,NULL),(104,'Sabor',1,0,NULL,NULL,NULL),(105,'Talla',1,0,NULL,NULL,NULL);
/*!40000 ALTER TABLE `tag` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -240,7 +240,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:56
-- Dump completed on 2019-09-04 7:52:07
USE `vn2008`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -285,7 +285,7 @@ UNLOCK TABLES;
LOCK TABLES `businessReasonEnd` WRITE;
/*!40000 ALTER TABLE `businessReasonEnd` DISABLE KEYS */;
INSERT INTO `businessReasonEnd` VALUES (1,'Baja voluntaria'),(2,'No supera PP empresa'),(3,'Despido'),(4,'Fin de contrato'),(5,'Baja por fijo discontinuo'),(6,'Modificación de jornada'),(7,'No se incorpora'),(8,'Fin Obra'),(9,'Ninguno'),(10,'Cambio departamento'),(11,'Modificación de contrato'),(12,'Cambio categoria'),(13,'Sanción/suspensión'),(14,'Pago directo Mutua'),(15,'Renovación'),(16,'No supera PP trabajador'),(17,'Cambio de salario'),(18,'Jubilación');
INSERT INTO `businessReasonEnd` VALUES (1,'Baja voluntaria'),(2,'No supera PP empresa'),(3,'Despido'),(4,'Fin de contrato'),(5,'Baja por fijo discontinuo'),(6,'Modificación de jornada'),(7,'No se incorpora'),(8,'Fin Obra'),(9,'Ninguno'),(10,'Cambio departamento'),(11,'Modificación de contrato'),(12,'Cambio categoria'),(13,'Sanción/suspensión'),(14,'Pago directo Mutua'),(15,'Renovación'),(16,'No supera PP trabajador'),(17,'Cambio de salario'),(18,'Jubilación'),(19,'Cambio horario');
/*!40000 ALTER TABLE `businessReasonEnd` ENABLE KEYS */;
UNLOCK TABLES;
@ -408,7 +408,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:56
-- Dump completed on 2019-09-04 7:52:07
USE `bi`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -456,7 +456,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:57
-- Dump completed on 2019-09-04 7:52:07
USE `cache`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -494,7 +494,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:57
-- Dump completed on 2019-09-04 7:52:07
USE `hedera`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -562,7 +562,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:57
-- Dump completed on 2019-09-04 7:52:08
USE `postgresql`;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
@ -637,7 +637,7 @@ UNLOCK TABLES;
LOCK TABLES `workcenter` WRITE;
/*!40000 ALTER TABLE `workcenter` DISABLE KEYS */;
INSERT INTO `workcenter` VALUES (1,'Silla',20,943,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20006,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2847,5),(6,'Vilassar',88,88016,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,NULL,NULL);
INSERT INTO `workcenter` VALUES (1,'Silla',20,952,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20007,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2847,5),(6,'Vilassar',88,88016,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,2,NULL);
/*!40000 ALTER TABLE `workcenter` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -650,4 +650,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-07-29 10:12:57
-- Dump completed on 2019-09-04 7:52:08

View File

@ -2,11 +2,11 @@ ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1;
ALTER TABLE `vn2008`.`Consignatarios` AUTO_INCREMENT = 1;
INSERT INTO `vn`.`ticketConfig` (`id`, `scopeDays`)
VALUES
VALUES
('1', '6');
INSERT INTO `account`.`mailConfig` (`id`, `domain`)
VALUES
INSERT INTO `account`.`mailConfig` (`id`, `domain`)
VALUES
('1', 'verdnatura.es');
INSERT INTO `account`.`user`(`id`,`name`, `nickname`, `password`,`role`,`active`,`email`, `lang`)
@ -148,12 +148,12 @@ INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`)
(3, 'Algemesi', 1),
(4, 'Alzira', 1);
INSERT INTO `vn`.`postCode`(`code`, `townFk`)
INSERT INTO `vn`.`postCode`(`code`, `townFk`, `geoFk`)
VALUES
('46000', 1),
('46460', 2),
('46680', 3),
('46600', 4);
('46000', 1, 6),
('46460', 2, 6),
('46680', 3, 6),
('46600', 4, 7);
INSERT INTO `vn`.`clientType`(`id`, `code`, `type`)
VALUES

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
expect(result.length).toEqual(12);
expect(result.length).toEqual(15);
expect(isSalesPerson).toBeTruthy();
});
@ -17,7 +17,7 @@ describe('Client activeWorkersWithRole', () => {
let isBuyer = await app.models.Account.hasRole(result[0].id, 'buyer');
expect(result.length).toEqual(9);
expect(result.length).toEqual(10);
expect(isBuyer).toBeTruthy();
});
});

View File

@ -6,7 +6,7 @@ describe('Client listWorkers', () => {
.then(result => {
let amountOfEmployees = Object.keys(result).length;
expect(amountOfEmployees).toEqual(48);
expect(amountOfEmployees).toEqual(50);
done();
})
.catch(done.fail);