diff --git a/Dockerfile b/Dockerfile
index a574e61fd..b42249099 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,6 +8,11 @@ RUN apt-get update \
ca-certificates \
gnupg2 \
libfontconfig \
+ && apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
+ libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
+ libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
+ libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
+ libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y --no-install-recommends \
nodejs \
diff --git a/back/model-config.json b/back/model-config.json
index 323e5f233..dc5cde217 100644
--- a/back/model-config.json
+++ b/back/model-config.json
@@ -2,6 +2,9 @@
"Account": {
"dataSource": "vn"
},
+ "AccountingType": {
+ "dataSource": "vn"
+ },
"Bank": {
"dataSource": "vn"
},
diff --git a/back/models/accounting-type.json b/back/models/accounting-type.json
new file mode 100644
index 000000000..796793342
--- /dev/null
+++ b/back/models/accounting-type.json
@@ -0,0 +1,30 @@
+{
+ "name": "AccountingType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "accountingType"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "description": {
+ "type": "String",
+ "required": true
+ },
+ "receiptDescription": {
+ "type": "String",
+ "required": true
+ }
+ },
+ "acls": [{
+ "accessType": "READ",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "ALLOW"
+ }]
+}
\ No newline at end of file
diff --git a/back/models/bank.json b/back/models/bank.json
index 119ea9743..33a2637d6 100644
--- a/back/models/bank.json
+++ b/back/models/bank.json
@@ -2,39 +2,49 @@
"name": "Bank",
"base": "VnModel",
"options": {
- "mysql": {
- "table": "bank"
- }
+ "mysql": {
+ "table": "bank"
+ }
},
"properties": {
- "id": {
- "type": "Number",
- "id": true,
- "description": "Identifier"
- },
- "bank": {
- "type": "string",
- "required": true
- },
- "account": {
- "type": "string",
- "required": true
- },
- "cash": {
- "type": "string",
- "required": true
- },
- "entityFk": {
- "type": "string",
- "required": true
- },
- "isActive": {
- "type": "string",
- "required": true
- },
- "currencyFk": {
- "type": "string",
- "required": true
- }
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "bank": {
+ "type": "String",
+ "required": true
+ },
+ "account": {
+ "type": "String",
+ "required": true
+ },
+ "accountingTypeFk": {
+ "type": "Number",
+ "required": true,
+ "mysql": {
+ "columnName": "cash"
+ }
+ },
+ "entityFk": {
+ "type": "Number",
+ "required": true
+ },
+ "isActive": {
+ "type": "Boolean",
+ "required": true
+ },
+ "currencyFk": {
+ "type": "Number",
+ "required": true
+ }
+ },
+ "relations": {
+ "accountingType": {
+ "type": "belongsTo",
+ "model": "AccountingType",
+ "foreignKey": "accountingTypeFk"
+ }
}
- }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/back/models/image.js b/back/models/image.js
index 079acd293..113bc7084 100644
--- a/back/models/image.js
+++ b/back/models/image.js
@@ -55,8 +55,9 @@ module.exports = Self => {
};
await fs.mkdir(dstDir, {recursive: true});
- await sharp(srcFilePath)
+ await sharp(srcFilePath, {failOnError: false})
.resize(collection.maxWidth, collection.maxHeight, resizeOpts)
+ .png()
.toFile(dstFile);
const sizes = collection.sizes();
@@ -69,8 +70,9 @@ module.exports = Self => {
};
await fs.mkdir(dstDir, {recursive: true});
- await sharp(srcFilePath)
+ await sharp(srcFilePath, {failOnError: false})
.resize(size.width, size.height, resizeOpts)
+ .png()
.toFile(dstFile);
}
@@ -88,7 +90,9 @@ module.exports = Self => {
);
}
- await fs.unlink(srcFilePath);
+ if (fs.existsSync(srcFilePath))
+ await fs.unlink(srcFilePath);
+
await tx.commit();
return newImage;
} catch (e) {
diff --git a/db/changes/10180-holyWeek/00-ACL.sql b/db/changes/10180-holyWeek/00-ACL.sql
deleted file mode 100644
index b0ab68a97..000000000
--- a/db/changes/10180-holyWeek/00-ACL.sql
+++ /dev/null
@@ -1 +0,0 @@
-INSERT IGNORE INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('WorkerLog', '*', 'READ', 'ALLOW', 'ROLE', 'hr');
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/00-claim.sql b/db/changes/10180-holyWeek/00-claim.sql
deleted file mode 100644
index e3b979efe..000000000
--- a/db/changes/10180-holyWeek/00-claim.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE `vn`.`claim`
-ADD COLUMN `hasToPickUp` TINYINT(1) NOT NULL AFTER `ticketFk`;
diff --git a/db/changes/10180-holyWeek/00-claimState.sql b/db/changes/10180-holyWeek/00-claimState.sql
deleted file mode 100644
index c39ba751d..000000000
--- a/db/changes/10180-holyWeek/00-claimState.sql
+++ /dev/null
@@ -1,28 +0,0 @@
-ALTER TABLE `vn`.`claimState`
-DROP FOREIGN KEY `roleFgn`;
-ALTER TABLE `vn`.`claimState`
-ADD COLUMN `code` VARCHAR(45) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER `id`,
-CHANGE COLUMN `roleFk` `roleFk` INT(10) UNSIGNED NOT NULL DEFAULT '1' ;
-ALTER TABLE `vn`.`claimState`
-ADD CONSTRAINT `roleFgn`
- FOREIGN KEY (`roleFk`)
- REFERENCES `account`.`role` (`id`)
- ON UPDATE CASCADE;
-
-UPDATE `vn`.`claimState` SET `code` = 'pending' WHERE (`id` = '1');
-UPDATE `vn`.`claimState` SET `code` = 'canceled' WHERE (`id` = '4');
-UPDATE `vn`.`claimState` SET `code` = 'resolved' WHERE (`id` = '3');
-UPDATE `vn`.`claimState` SET `code` = 'disputed' WHERE (`id` = '5');
-UPDATE `vn`.`claimState` SET `code` = 'mana' WHERE (`id` = '6');
-UPDATE `vn`.`claimState` SET `code` = 'managed' WHERE (`id` = '2');
-
-ALTER TABLE `vn`.`claimState`
-ADD COLUMN `priority` INT NOT NULL DEFAULT 1 AFTER `roleFk`;
-
-UPDATE `vn`.`claimState` SET `priority` = '1' WHERE (`id` = '1');
-UPDATE `vn`.`claimState` SET `priority` = '5' WHERE (`id` = '2');
-UPDATE `vn`.`claimState` SET `priority` = '7' WHERE (`id` = '3');
-UPDATE `vn`.`claimState` SET `priority` = '6' WHERE (`id` = '4');
-UPDATE `vn`.`claimState` SET `priority` = '3' WHERE (`id` = '5');
-UPDATE `vn`.`claimState` SET `priority` = '4' WHERE (`id` = '6');
-UPDATE `vn`.`claimState` SET `priority` = '2' WHERE (`id` = '7');
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/00-ticketWeekly.sql b/db/changes/10180-holyWeek/00-ticketWeekly.sql
deleted file mode 100644
index 05d65e124..000000000
--- a/db/changes/10180-holyWeek/00-ticketWeekly.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-ALTER TABLE `vn`.`ticketWeekly`
-ADD COLUMN `agencyModeFk` INT(11) NULL DEFAULT NULL AFTER `weekDay`,
-ADD INDEX `agencyModeFk_idx` (`agencyModeFk` ASC);
-
-ALTER TABLE `vn`.`ticketWeekly`
-ADD CONSTRAINT `agencyModeFk`
- FOREIGN KEY (`agencyModeFk`)
- REFERENCES `vn`.`agencyMode` (`id`)
- ON DELETE SET NULL
- ON UPDATE CASCADE;
-
-ALTER TABLE `vn`.`ticketWeekly`
-CHANGE COLUMN `weekDay` `weekDay` TINYINT(1) NOT NULL COMMENT 'funcion de mysql Lunes = 0, Domingo = 6' ;
diff --git a/db/changes/10180-holyWeek/00-ticket_cloneWeekly.sql b/db/changes/10180-holyWeek/00-ticket_cloneWeekly.sql
deleted file mode 100644
index 544296feb..000000000
--- a/db/changes/10180-holyWeek/00-ticket_cloneWeekly.sql
+++ /dev/null
@@ -1,130 +0,0 @@
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_cloneWeekly`(IN vWeek INT)
-BEGIN
- DECLARE vIsDone BOOL;
- DECLARE vLanding DATE;
- DECLARE vShipment DATE;
- DECLARE vWarehouse INT;
- DECLARE vTicket INT;
- DECLARE vWeekDay INT;
- DECLARE vClient INT;
- DECLARE vEmpresa INT;
- DECLARE vAddressFk INT;
- DECLARE vAgencyModeFk INT;
- DECLARE vNewTicket INT;
- DECLARE vYear INT;
-
- DECLARE rsTicket CURSOR FOR
- SELECT tw.ticketFk, weekDay, t.clientFk, t.warehouseFk, t.companyFk, t.addressFk, tw.agencyModeFk
- FROM ticketWeekly tw
- JOIN ticket t ON tt.ticketFk = t.id;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE;
-
- SET vYear = YEAR(CURDATE()) + IF(vWeek < WEEK(CURDATE()),1, 0);
-
- OPEN rsTicket;
-
- myLoop: LOOP
- BEGIN
- DECLARE vError TEXT;
- DECLARE vSalesPersonEmail VARCHAR(150);
- DECLARE vMailSent BOOL;
- DECLARE vSubject VARCHAR(150);
- DECLARE vMessage TEXT;
- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
- BEGIN
- GET DIAGNOSTICS CONDITION 1
- vError = MESSAGE_TEXT;
-
- END;
-
- SET vIsDone = FALSE;
- FETCH rsTicket INTO vTicket, vWeekDay, vClient, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk;
-
- IF vIsDone THEN
-
- LEAVE myLoop;
- END IF;
- SELECT date INTO vShipment
- FROM `time`
- WHERE `year` = vYear AND `week` = vWeek
- AND WEEKDAY(date) = vWeekDay;
-
- -- busca si el ticket ya ha sido clonado
- IF (SELECT COUNT(*) FROM vn.ticket tOrig
- JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk
- JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id
- JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk
- JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk
- WHERE tOrig.id = vTicket AND DATE(tClon.shipped) = vShipment) > 0
- THEN
- ITERATE myLoop;
- END IF;
- CALL vn.zone_getLanded(vShipment, vAddressFk, vAgencyModeFk, vWarehouse);
-
- SELECT landed INTO vLanding from tmp.zoneGetLanded LIMIT 1;
-
- CALL vn.ticketCreateWithoutZone(vClient, vShipment, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk, NULL, vLanding, account.userGetId(), vNewTicket);
-
- IF (vLanding IS NULL) THEN
-
- SELECT e.email INTO vSalesPersonEmail
- FROM vn.client c
- JOIN vn.worker sp ON sp.id = c.salesPersonFk
- JOIN account.emailUser e ON e.userFk = sp.userFk
- WHERE c.id = vClient;
-
- SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', vTicket,
- ' para el dia: ', vShipment);
- SET vMessage = CONCAT('No se ha podido clonar el ticket ', vTicket,
- ' para el dia: ', vShipment,
- ' porque no hay una zona de envío disponible. Se ha creado el ticket: ', vNewTicket,
- ' pero ha que revisar las fechas y la agencia');
-
- SELECT COUNT(*) INTO vMailSent
- FROM vn.mail
- WHERE sender = vSalesPersonEmail
- AND subject = vSubject;
-
- IF NOT vMailSent THEN
- INSERT INTO vn.mail (sender,`subject`,body)
- VALUES (vSalesPersonEmail, vSubject, vMessage);
- END IF;
- CALL vn.ticketStateUpdate (vNewTicket, 'FIXING');
- END IF;
-
- INSERT INTO vn.sale (ticketFk, itemFk, concept, quantity, price, discount, priceFixed, isPriceFixed)
- SELECT vNewTicket, saleOrig.itemFk , saleOrig.concept , saleOrig.quantity, saleOrig.price , saleOrig.discount, saleOrig.priceFixed, saleOrig.isPriceFixed
- FROM vn.ticket tOrig
- JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk
- LEFT JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id
- LEFT JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk
- LEFT JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk AND DATE(tClon.shipped) = vShipment
- WHERE tOrig.id = vTicket AND saleClon.id IS NULL;
-
- INSERT IGNORE INTO vn.saleCloned(saleOriginalFk, saleClonedFk)
- SELECT saleOriginal.id, saleClon.id
- FROM vn.sale saleOriginal
- JOIN vn.sale saleClon ON saleOriginal.itemFk = saleClon.itemFk AND saleOriginal.quantity = saleClon.quantity
- WHERE saleOriginal.ticketFk = vTicket AND saleClon.ticketFk = vNewTicket;
-
- INSERT INTO ticketRequest (description, ordered, shipped, salesPersonCode, buyerCode, quantity, price,
- itemFk ,clientFk, response, total, buyed, saleFk)
- SELECT tr.description, tr.ordered, tr.shipped, tr.salesPersonCode, tr.buyerCode, tr.quantity, tr.price,
- tr.itemFk, tr.clientFk, tr.response, tr.total, tr.buyed, tr.saleFk
- FROM sale s JOIN ticketRequest tr ON tr.saleFk = s.id
- JOIN sale s2 ON s.concept = s2.concept AND s.quantity = s2.quantity AND m.Id_Article = m2.Id_Article
- WHERE s.ticketFk = vTicket AND s2.ticketFk = vNewTicket;
-
- CALL vn.ticketCalculateClon(vNewTicket, vTicket);
- END;
- END LOOP;
-
- CLOSE rsTicket;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/00-time_createTable.sql b/db/changes/10180-holyWeek/00-time_createTable.sql
deleted file mode 100644
index 62b60c4bf..000000000
--- a/db/changes/10180-holyWeek/00-time_createTable.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-USE `util`;
-DROP procedure IF EXISTS `time_createTable`;
-
-DELIMITER $$
-USE `util`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `time_createTable`(vStarted DATE, vEnded DATE)
-BEGIN
- DECLARE vCurrentDate DATE;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.time;
- CREATE TEMPORARY TABLE tmp.time (dated DATE PRIMARY KEY) ENGINE = MEMORY;
- SET vCurrentDate = vStarted;
- WHILE vCurrentDate <= vEnded DO
- INSERT INTO tmp.time (dated) VALUES (vCurrentDate);
- SET vCurrentDate = DATE_ADD(vCurrentDate, INTERVAL 1 DAY);
- END WHILE;
-
-END$$
-
-DELIMITER ;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/00-workerLog.sql b/db/changes/10180-holyWeek/00-workerLog.sql
deleted file mode 100644
index f3f76f274..000000000
--- a/db/changes/10180-holyWeek/00-workerLog.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-ALTER TABLE `vn`.`workerLog`
-ADD COLUMN `changedModel` VARCHAR(45) NULL DEFAULT NULL AFTER `description`,
-ADD COLUMN `oldInstance` TEXT NULL DEFAULT NULL AFTER `changedModel`,
-ADD COLUMN `newInstance` TEXT NULL DEFAULT NULL AFTER `oldInstance`,
-ADD COLUMN `changedModelId` INT(11) NULL DEFAULT NULL AFTER `newInstance`,
-ADD COLUMN `changedModelValue` VARCHAR(45) NULL DEFAULT NULL AFTER `changedModelId`;
diff --git a/db/changes/10180-holyWeek/01-componentRenameMismatchXImbalance.sql b/db/changes/10180-holyWeek/01-componentRenameMismatchXImbalance.sql
deleted file mode 100644
index 34dd3be3c..000000000
--- a/db/changes/10180-holyWeek/01-componentRenameMismatchXImbalance.sql
+++ /dev/null
@@ -1 +0,0 @@
-UPDATE `vn`.`component` SET `code` = 'imbalance' WHERE (`id` = '36');
diff --git a/db/changes/10180-holyWeek/01-migrateFromTicketToTicketWeekly.sql b/db/changes/10180-holyWeek/01-migrateFromTicketToTicketWeekly.sql
deleted file mode 100644
index 939a8e73c..000000000
--- a/db/changes/10180-holyWeek/01-migrateFromTicketToTicketWeekly.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-UPDATE vn.ticketWeekly tw
- JOIN vn.ticket t ON t.id = tw.ticketFk
- JOIN vn.agencyMode am ON am.id = t.agencyModeFk
-SET tw.agencyModeFk = t.agencyModeFk
-WHERE am.name NOT LIKE '%turno%';
-
diff --git a/db/changes/10180-holyWeek/01-zoneConfigAlterTable.sql b/db/changes/10180-holyWeek/01-zoneConfigAlterTable.sql
deleted file mode 100644
index 5f4e7114b..000000000
--- a/db/changes/10180-holyWeek/01-zoneConfigAlterTable.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE `vn`.`zoneConfig`
-ADD COLUMN `forwardDays` INT(10) NOT NULL DEFAULT 7 COMMENT 'days forward to show zone_upcomingDeliveries' AFTER `scope`;
diff --git a/db/changes/10180-holyWeek/02-catalog_calculate.sql b/db/changes/10180-holyWeek/02-catalog_calculate.sql
deleted file mode 100644
index eeadb7241..000000000
--- a/db/changes/10180-holyWeek/02-catalog_calculate.sql
+++ /dev/null
@@ -1,148 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `catalog_calculate`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `catalog_calculate`(
- vLanded DATE,
- vAddressFk INT,
- vAgencyModeFk INT)
-proc: BEGIN
-/**
- * Calcula los articulos disponibles y sus precios
- *
- * @table tmp.item(itemFk) Listado de artÃculos a calcular
- * @param vLanded Fecha de recepcion de mercancia
- * @param vAddressFk Id del consignatario
- * @param vAgencyModeFk Id de la agencia
- * @return tmp.ticketCalculateItem(itemFk, available, producer,
- * item, size, stems, category, inkFk, image, origin, price)
- * @return tmp.ticketLot(warehouseFk, itemFk, available, buyFk)
- * @return tmp.ticketComponent
- * @return tmp.ticketComponentPrice
- * @return tmp.zoneGetShipped
- */
-
- DECLARE vAvailableCalc INT;
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vZoneFk INT;
- DECLARE vDone BOOL;
- DECLARE cTravelTree CURSOR FOR
- SELECT zoneFk, warehouseFk, shipped FROM tmp.zoneGetShipped;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
-
- -- Establece los almacenes y las fechas que van a entrar al disponible
-
- CALL vn.zone_getShipped (vLanded, vAddressFk, vAgencyModeFk, FALSE);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot(
- `warehouseFk` smallint(5) unsigned NOT NULL,
- `itemFk` int(11) NOT NULL,
- `available` double DEFAULT NULL,
- `buyFk` int(11) DEFAULT NULL,
- `fix` tinyint(3) unsigned DEFAULT '0',
- `zoneFk` int(11) NOT NULL,
- KEY `itemFk` (`itemFk`),
- KEY `item_warehouse` (`itemFk`,`warehouseFk`) USING HASH
- ) ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
- CALL catalog_componentPrepare();
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketCalculateItem;
- CREATE TEMPORARY TABLE tmp.ticketCalculateItem(
- itemFk INT(11) NOT NULL,
- available INT(11),
- producer VARCHAR(50),
- item VARCHAR(50),
- size INT(10) UNSIGNED,
- stems INT(11),
- category VARCHAR(3),
- inkFk VARCHAR(3),
- image VARCHAR(50),
- origin VARCHAR(3),
- price DECIMAL(10,2),
- priceKg DECIMAL(10,2),
- KEY `itemFk` (`itemFk`)
- ) ENGINE = MEMORY DEFAULT CHARSET=utf8;
-
- OPEN cTravelTree;
-
- l: LOOP
- SET vDone = FALSE;
- FETCH cTravelTree INTO vZoneFk, vWarehouseFk, vShipped;
-
- IF vDone THEN
- LEAVE l;
- END IF;
-
- CALL `cache`.available_refresh (vAvailableCalc, FALSE, vWarehouseFk, vShipped);
- CALL buyUltimate (vWarehouseFk, vShipped);
-
- INSERT INTO tmp.ticketLot (warehouseFk, itemFk, available, buyFk, zoneFk)
- SELECT vWarehouseFk,
- i.item_id,
- IFNULL(i.available, 0),
- bu.buyFk,
- vZoneFk
- FROM `cache`.available i
- JOIN tmp.item br ON br.itemFk = i.item_id
- LEFT JOIN item it ON it.id = i.item_id
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = i.item_id
- WHERE i.calc_id = vAvailableCalc
- AND i.available > 0;
-
- DROP TEMPORARY TABLE tmp.buyUltimate;
-
- CALL vn.catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- INSERT INTO tmp.ticketCalculateItem (
- itemFk,
- available,
- producer,
- item,
- size,
- stems,
- category,
- inkFk,
- image,
- origin,
- price,
- priceKg)
- SELECT
- tl.itemFk,
- SUM(tl.available) available,
- p.name producer,
- i.name item,
- i.size size,
- i.stems,
- i.category,
- i.inkFk,
- i.image,
- o.code origin,
- bl.price,
- bl.priceKg
- FROM tmp.ticketLot tl
- JOIN item i ON tl.itemFk = i.id
- LEFT JOIN producer p ON p.id = i.producerFk AND p.isVisible
- JOIN origin o ON o.id = i.originFk
- JOIN (
- SELECT MIN(price) price, itemFk, priceKg
- FROM tmp.ticketComponentPrice
- WHERE warehouseFk = vWarehouseFk
- GROUP BY itemFk
- ) bl ON bl.itemFk = tl.itemFk
- WHERE tl.zoneFk = vZoneFk AND tl.warehouseFk = vWarehouseFk
- GROUP BY tl.itemFk;
- -- on duplicatekey update
-
- END LOOP;
-
- CLOSE cTravelTree;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-catalog_componentCalculate.sql b/db/changes/10180-holyWeek/02-catalog_componentCalculate.sql
deleted file mode 100644
index 04ec1330a..000000000
--- a/db/changes/10180-holyWeek/02-catalog_componentCalculate.sql
+++ /dev/null
@@ -1,262 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `catalog_componentCalculate`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `catalog_componentCalculate`(
- vZoneFk INT,
- vAddressFk INT,
- vShipped DATE,
- vWarehouseFk INT)
-proc: BEGIN
-/**
- * Calcula los componentes de los articulos de tmp.ticketLot
- *
- * @param vZoneFk para calcular el transporte
- * @param vAddressFk Consignatario
- * @param vShipped dia de salida del pedido
- * @param tmp.ticketLot (warehouseFk, available, itemFk, buyFk, zoneFk)
- *
- * @return tmp.ticketComponent(itemFk, warehouseFk, available, rate2, rate3, minPrice,
- * packing, grouping, groupingMode, buyFk, typeFk)
- * @return tmp.ticketComponentPrice (warehouseFk, itemFk, rate, grouping, price)
- */
- DECLARE vClientFk INT;
- DECLARE vGeneralInflationCoefficient INT DEFAULT 1;
- DECLARE vMinimumDensityWeight INT DEFAULT 167;
- DECLARE vBoxVolume BIGINT; -- DEFAULT 138000;
- DECLARE vSpecialPriceComponent INT DEFAULT 10;
- DECLARE vDeliveryComponent INT DEFAULT 15;
- DECLARE vRecoveryComponent INT DEFAULT 17;
- DECLARE vSellByPacketComponent INT DEFAULT 22;
- DECLARE vBuyValueComponent INT DEFAULT 28;
- DECLARE vMarginComponent INT DEFAULT 29;
- DECLARE vDiscountLastItemComponent INT DEFAULT 32;
- DECLARE vExtraBaggedComponent INT DEFAULT 38;
- DECLARE vManaAutoComponent INT DEFAULT 39;
-
- SELECT volume INTO vBoxVolume
- FROM vn.packaging
- WHERE id = '94';
-
- SELECT clientFk INTO vClientFK
- FROM address
- WHERE id = vAddressFk;
-
- SET @rate2 := 0;
- SET @rate3 := 0;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentCalculate;
- CREATE TEMPORARY TABLE tmp.ticketComponentCalculate
- (PRIMARY KEY (itemFk, warehouseFk))
- ENGINE = MEMORY
- SELECT
- tl.itemFk, tl.warehouseFk, tl.available,
- IF((@rate2 := IFNULL(pf.rate2, b.price2)) < i.minPrice AND i.hasMinPrice, i.minPrice, @rate2) * 1.0 rate2,
- IF((@rate3 := IFNULL(pf.rate3, b.price3)) < i.minPrice AND i.hasMinPrice, i.minPrice, @rate3) * 1.0 rate3,
- IFNULL(pf.rate3, 0) AS minPrice,
- IFNULL(pf.packing, b.packing) packing,
- IFNULL(pf.`grouping`, b.`grouping`) `grouping`,
- ABS(IFNULL(pf.box, b.groupingMode)) groupingMode,
- tl.buyFk,
- i.typeFk,
- IF(i.hasKgPrice, b.weight / b.packing, NULL) weightGrouping
- FROM tmp.ticketLot tl
- JOIN buy b ON b.id = tl.buyFk
- JOIN item i ON i.id = tl.itemFk
- JOIN itemType it ON it.id = i.typeFk
- LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
- LEFT JOIN specialPrice sp ON sp.itemFk = i.id AND sp.clientFk = vClientFk
- LEFT JOIN (
- SELECT * FROM (
- SELECT pf.itemFk, pf.`grouping`, pf.packing, pf.box, pf.rate2, pf.rate3, zw.warehouseFk
- FROM priceFixed pf
- JOIN zoneWarehouse zw ON zw.zoneFk = vZoneFk AND (zw.warehouseFk = pf.warehouseFk OR pf.warehouseFk = 0)
- WHERE vShipped BETWEEN pf.started AND pf.ended ORDER BY pf.itemFk, pf.warehouseFk DESC
- ) tpf
- GROUP BY tpf.itemFk, tpf.warehouseFk
- ) pf ON pf.itemFk = tl.itemFk AND pf.warehouseFk = tl.warehouseFk
- WHERE b.buyingValue + b.freightValue + b.packageValue + b.comissionValue > 0.01 AND ic.display <> 0
- AND tl.zoneFk = vZoneFk AND tl.warehouseFk = vWarehouseFk;
-
- INSERT INTO tmp.ticketComponent (warehouseFk, itemFk, componentFk, cost)
- SELECT
- tcc.warehouseFk,
- tcc.itemFk,
- vBuyValueComponent,
- b.buyingValue + b.freightValue + b.packageValue + b.comissionValue
- FROM tmp.ticketComponentCalculate tcc
- JOIN buy b ON b.id = tcc.buyFk;
-
- INSERT INTO tmp.ticketComponent (warehouseFk, itemFk, componentFk, cost)
- SELECT
- tcc.warehouseFk,
- tcc.itemFk,
- vMarginComponent,
- tcc.rate3 - b.buyingValue - b.freightValue - b.packageValue - b.comissionValue
- FROM tmp.ticketComponentCalculate tcc
- JOIN buy b ON b.id = tcc.buyFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentBase;
- CREATE TEMPORARY TABLE tmp.ticketComponentBase ENGINE = MEMORY
- SELECT tc.itemFk, ROUND(SUM(tc.cost), 4) AS base, tc.warehouseFk
- FROM tmp.ticketComponent tc
- JOIN tmp.ticketComponentCalculate tcc ON tcc.itemFk = tc.itemFk AND tcc.warehouseFk = tc.warehouseFk
- GROUP BY tc.itemFk, warehouseFk;
-
- INSERT INTO tmp.ticketComponent
- SELECT tcb.warehouseFk, tcb.itemFk, vRecoveryComponent, ROUND(tcb.base * LEAST(cr.priceIncreasing, 0.25), 3)
- FROM tmp.ticketComponentBase tcb
- JOIN claimRatio cr ON cr.clientFk = vClientFk
- WHERE cr.priceIncreasing > 0.009;
-
- INSERT INTO tmp.ticketComponent
- SELECT tcb.warehouseFk, tcb.itemFk, vManaAutoComponent, ROUND(base * (0.01 + wm.pricesModifierRate), 3) as manaAuto
- FROM tmp.ticketComponentBase tcb
- JOIN `client` c on c.id = vClientFk
- JOIN workerMana wm ON c.salesPersonFk = wm.workerFk
- WHERE wm.isPricesModifierActivated
- HAVING manaAuto <> 0;
-
- INSERT INTO tmp.ticketComponent
- SELECT tcb.warehouseFk,
- tcb.itemFk,
- c.id,
- GREATEST(IFNULL(ROUND(tcb.base * c.tax, 4), 0), tcc.minPrice - tcc.rate3)
- FROM tmp.ticketComponentBase tcb
- JOIN component c
- JOIN tmp.ticketComponentCalculate tcc ON tcc.itemFk = tcb.itemFk AND tcc.warehouseFk = tcb.warehouseFk
- LEFT JOIN specialPrice sp ON sp.clientFk = vClientFk AND sp.itemFk = tcc.itemFk
- WHERE c.id = vDiscountLastItemComponent AND c.tax <> 0 AND tcc.minPrice < tcc.rate3 AND sp.value IS NULL;
-
- INSERT INTO tmp.ticketComponent
- SELECT tcc.warehouseFk, tcc.itemFk, vSellByPacketComponent, tcc.rate2 - tcc.rate3
- FROM tmp.ticketComponentCalculate tcc
- JOIN buy b ON b.id = tcc.buyFk
- LEFT JOIN specialPrice sp ON sp.clientFk = vClientFk AND sp.itemFk = tcc.itemFk
- WHERE sp.value IS NULL;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.zone;
- CREATE TEMPORARY TABLE IF NOT EXISTS tmp.zone (INDEX (id))
- ENGINE = MEMORY
- SELECT vZoneFk id;
-
- CALL zone_getOptionsForShipment(vShipped, TRUE);
-
- INSERT INTO tmp.ticketComponent
- SELECT tcc.warehouseFK,
- tcc.itemFk,
- vDeliveryComponent,
- vGeneralInflationCoefficient
- * ROUND((
- i.compression
- * ic.cm3
- * IF(am.deliveryMethodFk = 1, (GREATEST(i.density, vMinimumDensityWeight) / vMinimumDensityWeight), 1)
- * IFNULL((zo.price - zo.bonus)
- * 1/*amz.inflation*/ , 50)) / vBoxVolume, 4
- ) cost
- FROM tmp.ticketComponentCalculate tcc
- JOIN item i ON i.id = tcc.itemFk
- JOIN tmp.zoneOption zo ON zo.zoneFk = vZoneFk
- JOIN zone z ON z.id = vZoneFk
- JOIN agencyMode am ON am.id = z.agencyModeFk
- LEFT JOIN itemCost ic ON ic.warehouseFk = tcc.warehouseFk
- AND ic.itemFk = tcc.itemFk
- HAVING cost <> 0;
-
- DROP TEMPORARY TABLE tmp.zoneOption;
-
- IF (SELECT COUNT(*) FROM vn.addressForPackaging WHERE addressFk = vAddressFk) THEN
- INSERT INTO tmp.ticketComponent
- SELECT tcc.warehouseFk, b.itemFk, vExtraBaggedComponent, ap.packagingValue cost
- FROM tmp.ticketComponentCalculate tcc
- JOIN vn.addressForPackaging ap
- WHERE ap.addressFk = vAddressFk;
- END IF;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentCopy;
- CREATE TEMPORARY TABLE tmp.ticketComponentCopy ENGINE = MEMORY
- SELECT * FROM tmp.ticketComponent;
-
- INSERT INTO tmp.ticketComponent
- SELECT tcc.warehouseFk,
- tcc.itemFk,
- vSpecialPriceComponent,
- sp.value - SUM(tcc.cost) sumCost
- FROM tmp.ticketComponentCopy tcc
- JOIN component c ON c.id = tcc.componentFk
- JOIN specialPrice sp ON sp.clientFk = vClientFK AND sp.itemFk = tcc.itemFk
- WHERE c.classRate IS NULL
- GROUP BY tcc.itemFk, tcc.warehouseFk
- HAVING ABS(sumCost) > 0.001;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentSum;
- CREATE TEMPORARY TABLE tmp.ticketComponentSum
- (INDEX (itemFk, warehouseFk))
- ENGINE = MEMORY
- SELECT SUM(cost) sumCost, tc.itemFk, tc.warehouseFk, c.classRate
- FROM tmp.ticketComponent tc
- JOIN component c ON c.id = tc.componentFk
- GROUP BY tc.itemFk, tc.warehouseFk, c.classRate;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentRate;
- CREATE TEMPORARY TABLE tmp.ticketComponentRate ENGINE = MEMORY
- SELECT tcc.warehouseFk,
- tcc.itemFk,
- 1 rate,
- IF(tcc.groupingMode = 1, tcc.`grouping`, 1) `grouping`,
- CAST(SUM(tcs.sumCost) AS DECIMAL(10,2)) price,
- CAST(SUM(tcs.sumCost) AS DECIMAL(10,2)) / weightGrouping priceKg
- FROM tmp.ticketComponentCalculate tcc
- JOIN tmp.ticketComponentSum tcs ON tcs.itemFk = tcc.itemFk
- AND tcs.warehouseFk = tcc.warehouseFk
- WHERE IFNULL(tcs.classRate, 1) = 1
- AND tcc.groupingMode < 2 AND (tcc.packing > tcc.`grouping` or tcc.groupingMode = 0)
- GROUP BY tcs.warehouseFk, tcs.itemFk;
-
- INSERT INTO tmp.ticketComponentRate (warehouseFk, itemFk, rate, `grouping`, price, priceKg)
- SELECT
- tcc.warehouseFk,
- tcc.itemFk,
- 2 rate,
- tcc.packing `grouping`,
- SUM(tcs.sumCost) price,
- SUM(tcs.sumCost) / weightGrouping priceKg
- FROM tmp.ticketComponentCalculate tcc
- JOIN tmp.ticketComponentSum tcs ON tcs.itemFk = tcc.itemFk
- AND tcs.warehouseFk = tcc.warehouseFk
- WHERE tcc.available IS NULL OR (IFNULL(tcs.classRate, 2) = 2
- AND tcc.packing > 0 AND tcc.available >= tcc.packing)
- GROUP BY tcs.warehouseFk, tcs.itemFk;
-
- INSERT INTO tmp.ticketComponentRate (warehouseFk, itemFk, rate, `grouping`, price, priceKg)
- SELECT
- tcc.warehouseFk,
- tcc.itemFk,
- 3 rate,
- tcc.available `grouping`,
- SUM(tcs.sumCost) price,
- SUM(tcs.sumCost) / weightGrouping priceKg
- FROM tmp.ticketComponentCalculate tcc
- JOIN tmp.ticketComponentSum tcs ON tcs.itemFk = tcc.itemFk
- AND tcs.warehouseFk = tcc.warehouseFk
- WHERE IFNULL(tcs.classRate, 3) = 3
- GROUP BY tcs.warehouseFk, tcs.itemFk;
-
- INSERT INTO tmp.ticketComponentPrice (warehouseFk, itemFk, rate, `grouping`, price, priceKg)
- SELECT * FROM (
- SELECT * FROM tmp.ticketComponentRate ORDER BY price
- ) t
- GROUP BY itemFk, warehouseFk, `grouping`;
-
- DROP TEMPORARY TABLE
- tmp.ticketComponentCalculate,
- tmp.ticketComponentSum,
- tmp.ticketComponentBase,
- tmp.ticketComponentRate,
- tmp.ticketComponentCopy;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-catalog_componentPrepare.sql b/db/changes/10180-holyWeek/02-catalog_componentPrepare.sql
deleted file mode 100644
index 98b93a97e..000000000
--- a/db/changes/10180-holyWeek/02-catalog_componentPrepare.sql
+++ /dev/null
@@ -1,33 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `catalog_componentPrepare`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE PROCEDURE `catalog_componentPrepare` ()
-BEGIN
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent;
- CREATE TEMPORARY TABLE tmp.ticketComponent (
- `warehouseFk` INT UNSIGNED NOT NULL,
- `itemFk` INT NOT NULL,
- `componentFk` INT UNSIGNED NOT NULL,
- `cost` DECIMAL(10,4) NOT NULL,
- INDEX `itemWarehouse` USING BTREE (`itemFk` ASC, `warehouseFk` ASC),
- UNIQUE `fkItemWarehouseComponent` (`itemFk` ASC, `warehouseFk` ASC, `componentFk` ASC)
- )ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentPrice;
- CREATE TEMPORARY TABLE tmp.ticketComponentPrice (
- `warehouseFk` INT UNSIGNED NOT NULL,
- `itemFk` INT NOT NULL,
- `rate` INT NOT NULL,
- `grouping` INT UNSIGNED NOT NULL,
- `price` DECIMAL(10,4) NOT NULL,
- `priceKg` DECIMAL(10,4),
- INDEX `itemWarehouse` USING BTREE (`itemFk` ASC, `warehouseFk` ASC),
- UNIQUE `fkItemWarehouseRate` (`itemFk` ASC, `warehouseFk` ASC, `rate` ASC)
- )ENGINE=MEMORY DEFAULT CHARSET=utf8;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-catalog_componentPurge.sql b/db/changes/10180-holyWeek/02-catalog_componentPurge.sql
deleted file mode 100644
index 2b744b5f0..000000000
--- a/db/changes/10180-holyWeek/02-catalog_componentPurge.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-
-USE `vn`;
-DROP procedure IF EXISTS `vn`.`catalog_componentPurge`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `catalog_componentPurge`()
-BEGIN
- DROP TEMPORARY TABLE
- tmp.ticketComponentPrice,
- tmp.ticketComponent,
- tmp.ticketLot;
-END$$
-
-DELIMITER ;
-;
diff --git a/db/changes/10180-holyWeek/02-order_confirmWithUser.sql b/db/changes/10180-holyWeek/02-order_confirmWithUser.sql
deleted file mode 100644
index c9acdc038..000000000
--- a/db/changes/10180-holyWeek/02-order_confirmWithUser.sql
+++ /dev/null
@@ -1,250 +0,0 @@
-USE `hedera`;
-DROP procedure IF EXISTS `order_confirmWithUser`;
-
-DELIMITER $$
-USE `hedera`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `order_confirmWithUser`(IN `vOrder` INT, IN `vUserId` INT)
-BEGIN
-/**
- * Confirms an order, creating each of its tickets on the corresponding
- * date, store and user.
- *
- * @param vOrder The order identifier
- * @param vUser The user identifier
- */
- DECLARE vOk BOOL;
- DECLARE vDone BOOL DEFAULT FALSE;
- DECLARE vWarehouse INT;
- DECLARE vShipment DATETIME;
- DECLARE vTicket INT;
- DECLARE vNotes VARCHAR(255);
- DECLARE vItem INT;
- DECLARE vConcept VARCHAR(30);
- DECLARE vAmount INT;
- DECLARE vPrice DECIMAL(10,2);
- DECLARE vSale INT;
- DECLARE vRate INT;
- DECLARE vRowId INT;
- DECLARE vDelivery DATE;
- DECLARE vAddress INT;
- DECLARE vIsConfirmed BOOL;
- DECLARE vClientId INT;
- DECLARE vCompanyId INT;
- DECLARE vAgencyModeId INT;
- DECLARE TICKET_FREE INT DEFAULT 2;
-
- DECLARE cDates CURSOR FOR
- SELECT zgs.shipped, r.warehouse_id
- FROM `order` o
- JOIN order_row r ON r.order_id = o.id
- LEFT JOIN tmp.zoneGetShipped zgs ON zgs.warehouseFk = r.warehouse_id
- WHERE o.id = vOrder AND r.amount != 0
- GROUP BY r.warehouse_id;
-
- DECLARE cRows CURSOR FOR
- SELECT r.id, r.item_id, i.name, r.amount, r.price, r.rate
- FROM order_row r
- JOIN vn.item i ON i.id = r.item_id
- WHERE r.amount != 0
- AND r.warehouse_id = vWarehouse
- AND r.order_id = vOrder
- ORDER BY r.rate DESC;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND
- SET vDone = TRUE;
-
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- ROLLBACK;
- RESIGNAL;
- END;
-
- -- Carga los datos del pedido
-
- SELECT o.date_send, o.address_id, o.note,
- o.confirmed, a.clientFk, o.company_id, o.agency_id
- INTO vDelivery, vAddress, vNotes,
- vIsConfirmed, vClientId, vCompanyId, vAgencyModeId
- FROM hedera.`order` o
- JOIN vn.address a ON a.id = o.address_id
- WHERE o.id = vOrder;
-
- -- Comprueba que el pedido no está confirmado
-
- IF vIsConfirmed THEN
- CALL util.throw ('ORDER_ALREADY_CONFIRMED');
- END IF;
-
- -- Comprueba que el pedido no está vacío
-
- SELECT COUNT(*) > 0 INTO vOk
- FROM order_row WHERE order_id = vOrder AND amount > 0;
-
- IF NOT vOk THEN
- CALL util.throw ('ORDER_EMPTY');
- END IF;
-
- -- Carga las fechas de salida de cada almacén
-
- CALL vn.zone_getShipped (vDelivery, vAddress, vAgencyModeId, FALSE);
-
- -- Trabajador que realiza la acción
-
- IF vUserId IS NULL THEN
- SELECT employeeFk INTO vUserId FROM orderConfig;
- END IF;
-
- -- Crea los tickets del pedido
-
- START TRANSACTION;
-
- OPEN cDates;
-
- lDates:
- LOOP
- SET vTicket = NULL;
- SET vDone = FALSE;
- FETCH cDates INTO vShipment, vWarehouse;
-
- IF vDone THEN
- LEAVE lDates;
- END IF;
-
- -- Busca un ticket existente que coincida con los parametros
-
- SELECT t.id INTO vTicket
- FROM vn.ticket t
- LEFT JOIN vn.ticketState tls on tls.ticket = t.id
- JOIN `order` o
- ON o.address_id = t.addressFk
- AND vWarehouse = t.warehouseFk
- AND o.agency_id = t.agencyModeFk
- AND o.date_send = t.landed
- AND vShipment = DATE(t.shipped)
- WHERE o.id = vOrder
- AND t.invoiceOutFk IS NULL
- AND IFNULL(tls.alertLevel,0) = 0
- AND t.clientFk <> 1118
- LIMIT 1;
-
- -- Crea el ticket en el caso de no existir uno adecuado
-
- IF vTicket IS NULL
- THEN
- CALL vn.ticketCreateWithUser(
- vClientId,
- IFNULL(vShipment, CURDATE()),
- vWarehouse,
- vCompanyId,
- vAddress,
- vAgencyModeId,
- NULL,
- vDelivery,
- vUserId,
- vTicket
- );
- ELSE
- INSERT INTO vncontrol.inter
- SET Id_Ticket = vTicket,
- Id_Trabajador = vUserId,
- state_id = TICKET_FREE;
- END IF;
-
- INSERT IGNORE INTO vn.orderTicket
- SET orderFk = vOrder,
- ticketFk = vTicket;
-
- -- Añade las notas
-
- IF vNotes IS NOT NULL AND vNotes != ''
- THEN
- INSERT INTO vn.ticketObservation SET
- ticketFk = vTicket,
- observationTypeFk = 4 /* salesperson */ ,
- `description` = vNotes
- ON DUPLICATE KEY UPDATE
- `description` = CONCAT(VALUES(`description`),'. ', `description`);
- END IF;
-
- -- Añade los movimientos y sus componentes
-
- OPEN cRows;
-
- lRows:
- LOOP
- SET vDone = FALSE;
- FETCH cRows INTO vRowId, vItem, vConcept, vAmount, vPrice, vRate;
-
- IF vDone THEN
- LEAVE lRows;
- END IF;
- SET vSale = NULL;
- SELECT s.id INTO vSale
- FROM vn.sale s
- WHERE ticketFk = vTicket
- AND price = vPrice
- AND itemFk = vItem
- LIMIT 1;
- IF vSale THEN
- UPDATE vn.sale
- SET quantity = quantity + vAmount
- WHERE id = vSale;
- ELSE
- INSERT INTO vn.sale
- SET
- itemFk = vItem,
- ticketFk = vTicket,
- concept = vConcept,
- quantity = vAmount,
- price = vPrice,
- priceFixed = 0,
- isPriceFixed = TRUE;
-
- SET vSale = LAST_INSERT_ID();
-
- INSERT INTO vn.saleComponent
- (saleFk, componentFk, `value`)
- SELECT vSale, cm.component_id, cm.price
- FROM order_component cm
- JOIN vn.component c ON c.id = cm.component_id
- WHERE cm.order_row_id = vRowId
- GROUP BY vSale, cm.component_id;
- END IF;
- UPDATE order_row SET Id_Movimiento = vSale
- WHERE id = vRowId;
-
- END LOOP;
-
- CLOSE cRows;
-
- -- Fija el coste
-
- DROP TEMPORARY TABLE IF EXISTS tComponents;
- CREATE TEMPORARY TABLE tComponents
- (INDEX (saleFk))
- ENGINE = MEMORY
- SELECT SUM(sc.`value`) valueSum, sc.saleFk
- FROM vn.saleComponent sc
- JOIN vn.component c ON c.id = sc.componentFk
- JOIN vn.componentType ct ON ct.id = c.typeFk AND ct.isBase
- JOIN vn.sale s ON s.id = sc.saleFk
- WHERE s.ticketFk = vTicket
- GROUP BY sc.saleFk;
-
- UPDATE vn.sale s
- JOIN tComponents mc ON mc.saleFk = s.id
- SET s.priceFixed = valueSum;
-
- DROP TEMPORARY TABLE tComponents;
- END LOOP;
-
- CLOSE cDates;
-
- DELETE FROM basketOrder WHERE orderFk = vOrder;
- UPDATE `order` SET confirmed = TRUE, confirm_date = NOW()
- WHERE id = vOrder;
-
- COMMIT;
-END$$
-
-DELIMITER ;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/02-sale_calculateComponent.sql b/db/changes/10180-holyWeek/02-sale_calculateComponent.sql
deleted file mode 100644
index 979608a35..000000000
--- a/db/changes/10180-holyWeek/02-sale_calculateComponent.sql
+++ /dev/null
@@ -1,103 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `sale_calculateComponent`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `sale_calculateComponent`(vSale INT, vOption INT)
-proc: BEGIN
-/**
- * Actualiza los componentes
- *
- * @param vSale Delivery date
- * @param vOption indica en que componente pone el descuadre, NULL en casos habituales
- */
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vAgencyModeFk INT;
- DECLARE vAddressFk INT;
- DECLARE vTicketFk BIGINT;
- DECLARE vItemFk BIGINT;
- DECLARE vLanded DATE;
- DECLARE vIsEditable BOOLEAN;
- DECLARE vZoneFk INTEGER;
-
- SELECT t.refFk IS NULL AND (IFNULL(ts.alertLevel, 0) = 0 OR s.price = 0),
- s.ticketFk,
- s.itemFk ,
- t.zoneFk,
- t.warehouseFk,
- t.shipped,
- t.addressFk,
- t.agencyModeFk,
- t.landed
- INTO vIsEditable,
- vTicketFk,
- vItemFk,
- vZoneFk,
- vWarehouseFk,
- vShipped,
- vAddressFk,
- vAgencyModeFk,
- vLanded
- FROM ticket t
- JOIN sale s ON s.ticketFk = t.id
- LEFT JOIN ticketState ts ON ts.ticketFk = t.id
- WHERE s.id = vSale;
-
- IF vLanded IS NULL OR vZoneFk IS NULL THEN
-
- CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk);
-
- IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN
- CALL util.throw('There is no zone for these parameters');
- END IF;
-
- UPDATE ticket t
- SET t.landed = (SELECT landed FROM tmp.zoneGetLanded LIMIT 1)
- WHERE t.id = vTicketFk AND t.landed IS NULL;
-
- IF vZoneFk IS NULL THEN
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- UPDATE ticket t
- SET t.zoneFk = vZoneFk
- WHERE t.id = vTicketFk AND t.zoneFk IS NULL;
- END IF;
- DROP TEMPORARY TABLE tmp.zoneGetLanded;
-
- END IF;
-
- -- rellena la tabla buyUltimate con la ultima compra
- CALL buyUltimate (vWarehouseFk, vShipped);
-
- DELETE FROM tmp.buyUltimate WHERE itemFk != vItemFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouseFk warehouseFk, NULL available, vItemFk itemFk, buyFk, vZoneFk zoneFk
- FROM tmp.buyUltimate
- WHERE itemFk = vItemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- 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(vIsEditable, 1, 6);
- END IF;
-
- CALL ticketComponentUpdateSale(vOption);
-
- INSERT INTO ticketLog (originFk, userFk, `action`, description)
- VALUES (vTicketFk, account.userGetId(), 'update', CONCAT('Bionizo linea id ', vSale));
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE tmp.buyUltimate;
- DROP TEMPORARY TABLE tmp.sale;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticketCalculateClon.sql b/db/changes/10180-holyWeek/02-ticketCalculateClon.sql
deleted file mode 100644
index 6c9518b3b..000000000
--- a/db/changes/10180-holyWeek/02-ticketCalculateClon.sql
+++ /dev/null
@@ -1,93 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateClon`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT)
-BEGIN
-/*
- * Recalcula los componentes un ticket clonado,
- * las lineas a precio cero fuerza para que tengan precio, el resto lo respeta
- * @param vTicketNew nuevo ticket clonado
- * @param vTicketOld icket original, a partir del qual se clonara el nuevo
-*/
- DECLARE vShipped DATE;
- DECLARE vClient INT;
- DECLARE vWarehouse SMALLINT;
- DECLARE vAgencyMode INT;
- DECLARE vAddress INT;
- DECLARE vLanded DATE;
- DECLARE vAgency INT;
- DECLARE vZoneFk INT;
-
- REPLACE INTO orderTicket(orderFk,ticketFk)
- SELECT orderFk, vTicketNew
- FROM orderTicket
- WHERE ticketFk = vTicketOld;
-
- SELECT t.clientFk, t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk, t.zoneFk
- INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency, vZoneFk
- FROM agencyMode a
- JOIN ticket t ON t.agencyModeFk = a.id
- WHERE t.id = vTicketNew;
-
- IF vLanded IS NULL THEN
- CALL zone_getLanded(vShipped, vAddress, vAgency, vWarehouse);
- UPDATE ticket t
- JOIN tmp.zoneGetLanded zgl ON t.warehouseFk = zgl.warehouseFk
- SET t.landed = zgl.landed,
- t.zone = zgl.zoneFk
- WHERE t.id = vTicketNew;
-
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- DROP TEMPORARY TABLE IF EXISTS tmp.zoneGetLanded;
- END IF;
-
- -- rellena la tabla tmp.buyUltimate con la ultima compra
- CALL buyUltimate(vWarehouse, vShipped);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouse warehouseFk, NULL available, s.itemFk, bu.buyFk, vZoneFk zoneFk
- FROM sale s
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
- WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddress, vAgencyMode, vWarehouse);
-
- -- Bionizamos lineas con Preu = 0
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT s.id saleFk, vWarehouse warehouseFk
- FROM sale s
- JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew AND s.price = 0;
-
- CALL ticketComponentUpdateSale(1);
-
- -- Bionizamos lineas con Preu > 0
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT s.id saleFk, vWarehouse warehouseFk
- FROM sale s
- JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew
- AND s.price > 0;
-
- CALL ticketComponentUpdateSale(6);
-
- -- Log
- CALL `logAdd`(vTicketNew, 'update', ' ticket' , 'Bioniza Ticket');
-
- -- Limpieza
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE IF EXISTS
- tmp.buyUltimate,
- tmp.sale,
- tmp.zoneGetLanded;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticketCalculateSaleForcePrice.sql b/db/changes/10180-holyWeek/02-ticketCalculateSaleForcePrice.sql
deleted file mode 100644
index 99ecf739e..000000000
--- a/db/changes/10180-holyWeek/02-ticketCalculateSaleForcePrice.sql
+++ /dev/null
@@ -1,61 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateSaleForcePrice`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateSaleForcePrice`(IN vSale BIGINT)
-proc: BEGIN
-
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vAddressFk INT;
- DECLARE vTicket BIGINT;
- DECLARE vItem BIGINT;
- DECLARE vZoneFk INT;
-
- SELECT ticketFk, itemFk
- INTO vTicket, vItem
- FROM sale
- WHERE id = vSale;
-
- SELECT t.warehouseFk, DATE(t.shipped), t.addressFk, t.zoneFk
- INTO vWarehouseFk, vShipped, vAddressFk, vZoneFk
- FROM agencyMode a
- JOIN ticket t ON t.agencyModeFk = a.id
- WHERE t.id = vTicket;
-
- IF vZoneFk IS NULL THEN
- CALL util.throw('ticket without 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, vZoneFk zoneFk
- FROM tmp.buyUltimate
- WHERE itemFk = vItem;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT vSale saleFk,vWarehouseFk warehouseFk;
-
- CALL ticketComponentUpdateSale(1);
-
- INSERT INTO vn.ticketLog (originFk, userFk, `action`, description)
- VALUES (vTicket, account.userGetId(), 'update', CONCAT('Bionizo linea id ', vSale));
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE tmp.buyUltimate;
- DROP TEMPORARY TABLE tmp.sale;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticketComponentUpdateSale.sql b/db/changes/10180-holyWeek/02-ticketComponentUpdateSale.sql
deleted file mode 100644
index b58189ae6..000000000
--- a/db/changes/10180-holyWeek/02-ticketComponentUpdateSale.sql
+++ /dev/null
@@ -1,154 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketComponentUpdateSale`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticketComponentUpdateSale`(vOption INT)
-BEGIN
-/**
- * A partir de la tabla tmp.sale, crea los Movimientos_componentes
- * y modifica el campo Preu de la tabla Movimientos
- *
- * @param i_option integer tipo de actualizacion
- * @param table tmp.sale tabla memory con el campo saleFk, warehouseFk
- **/
- DECLARE vComponentFk INT;
- DECLARE vRenewComponents BOOLEAN;
- DECLARE vKeepPrices BOOLEAN;
-
- CASE vOption
- WHEN 1 THEN
- SET vRenewComponents = TRUE;
- SET vKeepPrices = FALSE;
- WHEN 2 THEN
- SELECT id INTO vComponentFk FROM component WHERE `code` = 'debtCollection';
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;
- WHEN 3 THEN
- SELECT id INTO vComponentFk FROM component WHERE `code` = 'mana';
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;
- WHEN 4 THEN
- SELECT id INTO vComponentFk FROM component WHERE `code` = 'buyerDiscount';
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;
- /* WHEN 5 THEN
- SET vComponentFk = 35;
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;*/
- WHEN 6 THEN
- SELECT id INTO vComponentFk FROM component WHERE `code` = 'imbalance';
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;
- WHEN 7 THEN
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, 28, ROUND(((s.price * (100 - s.discount) / 100) - SUM(IFNULL(sc.value, 0))) * 0.8, 3)
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- LEFT JOIN saleComponent sc ON sc.saleFk = s.id
- AND sc.componentFk NOT IN (28, 29)
- GROUP BY s.id;
-
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, 29, ROUND(((s.price * (100 - s.discount) / 100) - SUM(IFNULL(sc.value, 0))) * 0.2, 3)
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- LEFT JOIN saleComponent sc ON sc.saleFk = s.id
- AND sc.componentFk NOT IN (28, 29)
- GROUP BY s.id;
-
- SET vRenewComponents = FALSE;
- SET vKeepPrices = FALSE;
- WHEN 8 THEN
- DELETE sc.*
- FROM tmp.sale tmps JOIN saleComponent sc ON sc.saleFk = tmps.saleFk;
-
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, 28, ROUND(((s.price * (100 - s.discount) / 100)), 3)
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id;
-
- SET vRenewComponents = FALSE;
- SET vKeepPrices = FALSE;
- WHEN 9 THEN
- SET vRenewComponents = TRUE;
- SET vKeepPrices = TRUE;
- END CASE;
-
- IF vRenewComponents THEN
- DELETE sc.*
- FROM tmp.sale tmps
- JOIN saleComponent sc ON sc.saleFk = tmps.saleFk
- JOIN `component` c ON c.id = sc.componentFk
- WHERE c.isRenewable;
-
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, tc.componentFk, tc.cost
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- JOIN tmp.ticketComponent tc ON tc.itemFk = s.itemFk AND tc.warehouseFk = tmps.warehouseFk
- LEFT JOIN saleComponent sc ON sc.saleFk = s.id
- AND sc.componentFk = tc.componentFk
- LEFT JOIN `component` c ON c.id = tc.componentFk
- WHERE IF(sc.componentFk IS NULL AND NOT c.isRenewable, FALSE, TRUE);
- END IF;
-
- IF vKeepPrices THEN
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, vComponentFk, ROUND((s.price * (100 - s.discount) / 100) - SUM(sc.value), 3) dif
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- LEFT JOIN saleComponent sc ON sc.saleFk = s.id
- WHERE sc.saleFk <> vComponentFk
- GROUP BY s.id
- HAVING dif <> 0;
- ELSE
- UPDATE sale s
- JOIN item i on i.id = s.itemFk
- JOIN itemType it on it.id = i.typeFk
- JOIN (SELECT SUM(sc.value) sumValue, sc.saleFk
- FROM saleComponent sc
- JOIN tmp.sale tmps ON tmps.saleFk = sc.saleFk
- GROUP BY sc.saleFk) sc ON sc.saleFk = s.id
- SET s.price = sumValue
- WHERE it.code != 'PRT' ;
-
- REPLACE INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, 21, ROUND((s.price * (100 - s.discount) / 100) - SUM(value), 3) saleValue
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- LEFT JOIN saleComponent sc ON sc.saleFk = s.id
- WHERE sc.componentFk != 21
- GROUP BY s.id
- HAVING ROUND(saleValue, 4) <> 0;
- END IF;
-
- UPDATE sale s
- JOIN (
- SELECT SUM(sc.value) sumValue, sc.saleFk
- FROM saleComponent sc
- JOIN tmp.sale tmps ON tmps.saleFk = sc.saleFk
- JOIN `component` c ON c.id = sc.componentFk
- JOIN componentType ct on ct.id = c.typeFk AND ct.isBase
- GROUP BY sc.saleFk) sc ON sc.saleFk = s.id
- SET s.priceFixed = sumValue, s.isPriceFixed = 1;
-
- DELETE sc.*
- FROM saleComponent sc
- JOIN tmp.sale tmps ON tmps.saleFk = sc.saleFk
- JOIN sale s on s.id = sc.saleFk
- JOIN item i ON i.id = s.itemFk
- JOIN itemType it ON it.id = i.typeFk
- WHERE it.code = 'PRT';
-
- INSERT INTO saleComponent(saleFk, componentFk, value)
- SELECT s.id, 15, s.price
- FROM sale s
- JOIN tmp.sale tmps ON tmps.saleFk = s.id
- JOIN item i ON i.id = s.itemFK
- JOIN itemType it ON it.id = i.typeFk
- WHERE it.code = 'PRT' AND s.price > 0;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticket_componentMakeUpdate.sql b/db/changes/10180-holyWeek/02-ticket_componentMakeUpdate.sql
deleted file mode 100644
index 7fdf3f193..000000000
--- a/db/changes/10180-holyWeek/02-ticket_componentMakeUpdate.sql
+++ /dev/null
@@ -1,107 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_componentMakeUpdate`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `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
-/**
- * Modifica en el ticket los campos que se le pasan por parámetro
- * y cambia sus componentes
- *
- * @param vTicketFk Id del ticket a modificar
- * @param vClientFk nuevo cliente
- * @param vAgencyModeFk nueva agencia
- * @param vAddressFk nuevo consignatario
- * @param vZoneFk nueva zona
- * @param vWarehouseFk nuevo almacen
- * @param vCompanyFk nueva empresa
- * @param vShipped nueva fecha del envio de mercancia
- * @param vLanded nueva fecha de recepcion de mercancia
- * @param vIsDeleted si se borra el ticket
- * @param vHasToBeUnrouted si se le elimina la ruta al ticket
- * @param vOption opcion para el case del proc ticketComponentUpdateSale
- */
- DECLARE vPrice DECIMAL(10,2);
- DECLARE vBonus DECIMAL(10,2);
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- ROLLBACK;
- RESIGNAL;
- END;
-
- CALL ticket_componentPreview (vTicketFk, vLanded, vAddressFk, vZoneFk, vWarehouseFk);
-
- START TRANSACTION;
-
- IF (SELECT addressFk FROM ticket WHERE id = vTicketFk) <> vAddressFk THEN
-
- UPDATE ticket t
- JOIN address a ON a.id = vAddressFk
- SET t.nickname = a.nickname
- WHERE t.id = vTicketFk;
-
- END IF;
-
- CALL zone_getShippedWarehouse(vlanded, vAddressFk, vAgencyModeFk);
-
- SELECT zoneFk, price, bonus INTO vZoneFk, vPrice, vBonus
- FROM tmp.zoneGetShipped
- WHERE shipped = vShipped AND warehouseFk = vWarehouseFk LIMIT 1;
-
- UPDATE ticket t
- SET
- t.clientFk = vClientFk,
- t.agencyModeFk = vAgencyModeFk,
- t.addressFk = vAddressFk,
- t.zoneFk = vZoneFk,
- t.zonePrice = vPrice,
- t.zoneBonus = vBonus,
- t.warehouseFk = vWarehouseFk,
- t.companyFk = vCompanyFk,
- t.landed = vLanded,
- t.shipped = vShipped,
- t.isDeleted = vIsDeleted
- WHERE
- t.id = vTicketFk;
-
- IF vHasToBeUnrouted THEN
- UPDATE ticket t SET t.routeFk = NULL
- WHERE t.id = vTicketFk;
- END IF;
-
- IF vOption <> 8 THEN
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk))
- ENGINE = MEMORY
- SELECT id AS saleFk, vWarehouseFk warehouseFk
- FROM sale s WHERE s.ticketFk = vTicketFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent;
- CREATE TEMPORARY TABLE tmp.ticketComponent
- SELECT * FROM tmp.ticketComponentPreview;
-
- CALL ticketComponentUpdateSale (vOption);
-
- DROP TEMPORARY TABLE tmp.sale;
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent;
- END IF;
- COMMIT;
-
- DROP TEMPORARY TABLE tmp.zoneGetShipped, tmp.ticketComponentPreview;
-END$$
-
-DELIMITER ;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/02-ticket_componentPreview.sql b/db/changes/10180-holyWeek/02-ticket_componentPreview.sql
deleted file mode 100644
index d69435bb7..000000000
--- a/db/changes/10180-holyWeek/02-ticket_componentPreview.sql
+++ /dev/null
@@ -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.ticketComponentPreview (warehouseFk, itemFk, componentFk, cost)
- */
- DECLARE vHasDataChanged BOOL DEFAULT FALSE;
- DECLARE vHasAddressChanged BOOL;
- DECLARE vHasZoneChanged BOOL DEFAULT FALSE;
- DECLARE vHasWarehouseChanged BOOL DEFAULT FALSE;
-
- DECLARE vShipped DATE;
- 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,
- vZoneFk zoneFk
- FROM sale s
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
- WHERE s.ticketFk = vTicketFk
- GROUP BY bu.warehouseFk, bu.itemFk);
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- 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 `component` c ON c.id = sc.componentFk
- WHERE s.ticketFk = vTicketFk
- AND (c.isRenewable = FALSE
- OR
- (NOT vHasChangeAll
- AND (NOT (c.typeFk <=> vAddressTypeRateFk
- OR c.typeFk <=> vAgencyModeTypeRateFk))));
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponentPreview;
- CREATE TEMPORARY TABLE tmp.ticketComponentPreview
- SELECT * FROM tmp.ticketComponent;
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE tmp.buyUltimate;
-
- 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 ;
-
diff --git a/db/changes/10180-holyWeek/02-ticket_priceDifference.sql b/db/changes/10180-holyWeek/02-ticket_priceDifference.sql
deleted file mode 100644
index b80ea7f88..000000000
--- a/db/changes/10180-holyWeek/02-ticket_priceDifference.sql
+++ /dev/null
@@ -1,50 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_priceDifference`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `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.ticketComponentPreview 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 `component` c ON c.id = tc.componentFk
- WHERE t.id = vTicketFk
- AND IF(sc.componentFk IS NULL
- AND c.classRate IS NOT NULL, FALSE, TRUE)
- GROUP BY s.id ORDER BY s.id;
-
- DROP TEMPORARY TABLE tmp.ticketComponentPreview;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticket_recalcComponents.sql b/db/changes/10180-holyWeek/02-ticket_recalcComponents.sql
deleted file mode 100644
index 9ac4942f9..000000000
--- a/db/changes/10180-holyWeek/02-ticket_recalcComponents.sql
+++ /dev/null
@@ -1,94 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_recalcComponents`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_recalcComponents`(IN vTicketFk BIGINT, vIsTicketEditable BOOLEAN)
-proc: BEGIN
-
-/**
- * Este procedimiento recalcula los componentes de un ticket,
- * eliminando los componentes existentes e insertandolos de nuevo
- *
- * @param vTicketFk Id del ticket
- * @param vIsTicketEditable si no se quiere forzar llamar con NULL
- */
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vAgencyModeFk INT;
- DECLARE vAddressFk INT;
- DECLARE vLanded DATE;
- DECLARE vZoneFk INTEGER;
-
- IF vIsTicketEditable IS NULL THEN
- SELECT IFNULL(ts.alertLevel,0) = 0 AND IFNULL(t.refFk,'') = ''
- INTO vIsTicketEditable
- FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket
- WHERE id = vTicketFk;
- END IF;
-
- SELECT t.warehouseFk,
- t.shipped,
- t.addressFk,
- t.agencyModeFk,
- t.landed,
- t.zoneFk
- INTO vWarehouseFk, vShipped, vAddressFk, vAgencyModeFk, vLanded, vZoneFk
- FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket
- WHERE t.id = vTicketFk;
-
- IF vLanded IS NULL OR vZoneFk IS NULL THEN
-
- CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk);
-
- IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN
- CALL util.throw('There is no zone for these parameters');
- END IF;
-
- UPDATE ticket t
- SET t.landed = (SELECT landed FROM tmp.zoneGetLanded LIMIT 1)
- WHERE t.id = vTicketFk AND t.landed IS NULL;
-
- IF vZoneFk IS NULL THEN
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- UPDATE ticket t
- SET t.zoneFk = vZoneFk
- WHERE t.id = vTicketFk AND t.zoneFk IS NULL;
- END IF;
- DROP TEMPORARY TABLE tmp.zoneGetLanded;
-
- END IF;
-
- -- rellena la tabla buyUltimate con la ultima compra
- CALL buyUltimate (vWarehouseFk, vShipped);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouseFk warehouseFk, NULL available,
- s.itemFk, bu.buyFk, vZoneFk zoneFk
- FROM sale s
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
- WHERE s.ticketFk = vTicketFk
- GROUP BY s.itemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT id saleFk, vWarehouseFk warehouseFk
- FROM sale s
- WHERE s.ticketFk = vTicketFk;
-
- -- si el ticket esta facturado, respeta los precios
- CALL ticketComponentUpdateSale(IF(vIsTicketEditable, 1, 6));
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE
- tmp.buyUltimate,
- tmp.sale;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/02-ticket_recalcComponentsForcePrice__.sql b/db/changes/10180-holyWeek/02-ticket_recalcComponentsForcePrice__.sql
deleted file mode 100644
index 995bfbfcd..000000000
--- a/db/changes/10180-holyWeek/02-ticket_recalcComponentsForcePrice__.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_recalcComponentsForcePrice`;
diff --git a/db/changes/10180-holyWeek/02-ticket_withoutComponents.sql b/db/changes/10180-holyWeek/02-ticket_withoutComponents.sql
deleted file mode 100644
index de789b956..000000000
--- a/db/changes/10180-holyWeek/02-ticket_withoutComponents.sql
+++ /dev/null
@@ -1,72 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_withoutComponents`;
-DROP procedure IF EXISTS `ticket_checkNoComponents`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME)
-BEGIN
-
-/**
- * Comprueba que los tickets entre un rango de fechas tienen componentes
- *
- * @param vDatedFrom Id del ticket
- * @param vIsTicketEditable si no se quiere forzar llamar con NULL
- */
- DECLARE v_done BOOL DEFAULT FALSE;
- DECLARE vSaleFk INTEGER;
- DECLARE vCur CURSOR FOR
- SELECT s.id
- FROM ticket t
- JOIN client clt ON clt.id = t.clientFk
- JOIN sale s ON s.ticketFk = t.id
- JOIN item i ON i.id = s.itemFk
- JOIN itemType tp ON tp.id = i.typeFk
- JOIN itemCategory ic ON ic.id = tp.categoryFk
- LEFT JOIN tmp.coste c ON c.id = s.id
- WHERE t.shipped >= vDatedFrom AND t.shipped <= vDatedTo
- AND c.id IS NULL
- AND clt.isActive != 0
- AND ic.merchandise != 0
- GROUP BY s.id;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND
- SET v_done = TRUE;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.coste;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.coste;
- CREATE TEMPORARY TABLE tmp.coste
- (primary key (id)) ENGINE = MEMORY
- SELECT s.id
- FROM ticket t
- JOIN client clt ON clt.id = t.clientFk
- JOIN sale s ON s.ticketFk = t.id
- JOIN item i ON i.id = s.itemFk
- JOIN itemType tp ON tp.id = i.typeFk
- JOIN itemCategory ic ON ic.id = tp.categoryFk
- JOIN saleComponent sc ON sc.saleFk = s.id
- JOIN component c ON c.id = sc.componentFk
- JOIN componentType ct ON ct.id = c.typeFk AND ct.id = 1
- WHERE t.shipped >= vDatedFrom
- AND ic.merchandise != 0;
-
- OPEN vCur;
-
- l: LOOP
- SET v_done = FALSE;
- FETCH vCur INTO vSaleFk;
-
- IF v_done THEN
- LEAVE l;
- END IF;
-
- CALL sale_calculateComponent(vSaleFk, 1);
- END LOOP;
-
- CLOSE vCur;
- DROP TEMPORARY TABLE tmp.coste;
- END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/03-ekt_load.sql b/db/changes/10180-holyWeek/03-ekt_load.sql
deleted file mode 100644
index 6766cdfaf..000000000
--- a/db/changes/10180-holyWeek/03-ekt_load.sql
+++ /dev/null
@@ -1,162 +0,0 @@
-
-USE `edi`;
-DROP procedure IF EXISTS `ekt_load`;
-
-DELIMITER $$
-USE `edi`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ekt_load`(IN `vSelf` INT)
-BEGIN
- DECLARE vRef INT;
- DECLARE vBuy INT;
- DECLARE vItem INT;
- DECLARE vQty INT;
- DECLARE vPackage INT;
- DECLARE vIsLot BOOLEAN;
- DECLARE vForceToPacking INT DEFAULT 2;
-
- -- Carga los datos necesarios del EKT
-
- SELECT ref, qty, package INTO vRef, vQty, vPackage
- FROM ekt e
- LEFT JOIN item i ON e.ref = i.id
- WHERE e.id = vSelf;
-
- -- Inserta el cubo si no existe
-
- IF vPackage = 800
- THEN
- SET vPackage = 800 + vQty;
-
- INSERT IGNORE INTO vn2008.Cubos SET
- Id_Cubo = vPackage,
- x = 7200 / vQty,
- y = 1;
- ELSE
- INSERT IGNORE INTO vn2008.Cubos (Id_Cubo, X, Y, Z)
- SELECT bucket_id, ROUND(x_size/10), ROUND(y_size/10), ROUND(z_size/10)
- FROM bucket WHERE bucket_id = vPackage;
-
- IF ROW_COUNT() > 0
- THEN
- INSERT INTO vn2008.mail SET
- `subject` = 'Cubo añadido',
- `text` = CONCAT('Se ha añadido el cubo: ', vPackage),
- `to` = 'ekt@verdnatura.es';
- END IF;
- END IF;
-
- -- Intenta obtener el artículo en base a los atributos holandeses
-
- INSERT IGNORE INTO item_track SET
- item_id = vRef;
-
- SELECT c.Id_Compra, c.Id_Article INTO vBuy, vItem
- FROM vn2008.buy_edi e
- JOIN item_track t ON t.item_id = e.ref
- LEFT JOIN vn2008.buy_edi l ON l.ref = e.ref
- LEFT JOIN vn2008.Compres c ON c.buy_edi_id = l.id
- JOIN vn2008.config cfg
- WHERE e.id = vSelf
- AND l.id != vSelf
- AND c.Id_Article != cfg.generic_item
- AND IF(t.s1, l.s1 = e.s1, TRUE)
- AND IF(t.s2, l.s2 = e.s2, TRUE)
- AND IF(t.s3, l.s3 = e.s3, TRUE)
- AND IF(t.s4, l.s4 = e.s4, TRUE)
- AND IF(t.s5, l.s5 = e.s5, TRUE)
- AND IF(t.s6, l.s6 = e.s6, TRUE)
- AND IF(t.kop, l.kop = e.kop, TRUE)
- AND IF(t.pac, l.pac = e.pac, TRUE)
- AND IF(t.cat, l.cat = e.cat, TRUE)
- AND IF(t.ori, l.ori = e.ori, TRUE)
- AND IF(t.pro, l.pro = e.pro, TRUE)
- AND IF(t.sub, l.sub = e.sub, TRUE)
- AND IF(t.package, l.package = e.package, TRUE)
- AND c.Id_Article < 170000
- ORDER BY l.now DESC, c.Id_Compra ASC LIMIT 1;
-
- -- Determina si el articulo se vende por lotes
-
- IF vItem
- THEN
- SELECT COUNT(*) > 0 INTO vIsLot
- FROM vn2008.Articles a
- LEFT JOIN vn2008.Tipos t ON t.tipo_id = a.tipo_id
- WHERE a.Id_Article = vItem
- AND t.`transaction`;
-
- -- Si el articulo se vende por lotes se inserta un nuevo artículo
-
- IF vIsLot
- THEN
- INSERT INTO vn2008.Articles (
- Article
- ,Medida
- ,Categoria
- ,Id_Origen
- ,iva_group_id
- ,Foto
- ,Color
- ,Codintrastat
- ,tipo_id
- ,Tallos
- )
- SELECT
- i.`name`
- ,IFNULL(e.s1, e.pac)
- ,e.cat
- ,IFNULL(o.id, 17)
- ,IFNULL(a.iva_group_id, 1)
- ,a.Foto
- ,a.Color
- ,a.Codintrastat
- ,IFNULL(a.tipo_id, 10)
- ,IF(a.tipo_id = 15, 0, 1)
- FROM vn2008.buy_edi e
- LEFT JOIN item i ON i.id = e.ref
- LEFT JOIN vn2008.Origen o ON o.Abreviatura = e.ori
- LEFT JOIN vn2008.Articles a ON a.Id_Article = vItem
- WHERE e.id = vSelf;
-
- SET vItem = LAST_INSERT_ID();
- END IF;
- END IF;
-
- -- Inserta la compra asociada al EKT
-
- INSERT INTO vn2008.Compres
- (
- Id_Entrada
- ,buy_edi_id
- ,Costefijo
- ,Id_Article
- ,`grouping`
- ,caja
- ,Packing
- ,Cantidad
- ,Productor
- ,Etiquetas
- ,Id_Cubo
- ,`weight`
- )
- SELECT
- cfg.edi_entry
- ,vSelf
- ,(@t := IF(a.Tallos, a.Tallos, 1)) * e.pri
- ,IFNULL(vItem, cfg.generic_item)
- ,IFNULL(c.`grouping`, e.pac)
- ,vForceToPacking
- ,@pac := e.pac / @t
- ,@pac * e.qty
- ,s.company_name
- ,e.qty
- ,IFNULL(c.Id_Cubo, e.package)
- ,a.density * (vn.item_getVolume(a.Id_Article, IFNULL(c.Id_Cubo, e.package)) / 1000000)
- FROM vn2008.buy_edi e
- LEFT JOIN vn2008.Compres c ON c.Id_Compra = vBuy
- LEFT JOIN vn2008.Articles a ON a.Id_Article = c.Id_Article
- LEFT JOIN supplier s ON e.pro = s.supplier_id
- JOIN vn2008.config cfg
- WHERE e.id = vSelf
- LIMIT 1;
-END
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/03-itemDiary.sql b/db/changes/10180-holyWeek/03-itemDiary.sql
deleted file mode 100644
index d30597e14..000000000
--- a/db/changes/10180-holyWeek/03-itemDiary.sql
+++ /dev/null
@@ -1,130 +0,0 @@
-DROP procedure IF EXISTS `vn`.`item_getBalance`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `item_getBalance`(IN vItemId INT, IN vWarehouse INT)
-BEGIN
- DECLARE vDateInventory DATETIME;
- DECLARE vCurdate DATE DEFAULT CURDATE();
- DECLARE vDayEnd DATETIME DEFAULT util.dayEnd(vCurdate);
-
- SELECT inventoried INTO vDateInventory FROM config;
- SET @a = 0;
- SET @currentLineFk = 0;
- SET @shipped = '';
-
- SELECT DATE(@shipped:= shipped) shipped,
- alertLevel,
- stateName,
- origin,
- reference,
- clientFk,
- name,
- `in`,
- `out`,
- @a := @a + IFNULL(`in`,0) - IFNULL(`out`,0) as balance,
- @currentLineFk := IF (@shipped < CURDATE()
- OR (@shipped = CURDATE() AND (isPicked OR alertLevel >= 2)),
- lineFk,@currentLineFk) lastPreparedLineFk,
- isTicket,
- lineFk,isPicked
- FROM
- ( SELECT tr.landed as shipped,
- b.quantity as `in`,
- NULL as `out`,
- al.alertLevel as alertLevel,
- st.name AS stateName,
- s.name as name,
- e.ref as reference,
- e.id as origin,
- s.id as clientFk,
- IF(al.alertLevel = 3, TRUE, FALSE) isPicked,
- FALSE AS isTicket,
- b.id lineFk,
- NULL `order`
- FROM buy b
- JOIN entry e ON e.id = b.entryFk
- JOIN travel tr ON tr.id = e.travelFk
- JOIN supplier s ON s.id = e.supplierFk
- JOIN alertLevel al ON al.alertLevel =
- CASE
- WHEN tr.shipped < CURDATE() THEN 3
- WHEN tr.shipped = CURDATE() AND tr.isReceived = TRUE THEN 3
- ELSE 0
- END
- JOIN state st ON st.code = al.code
- WHERE tr.landed >= vDateInventory
- AND vWarehouse = tr.warehouseInFk
- AND b.itemFk = vItemId
- AND e.isInventory = FALSE
- AND e.isRaid = FALSE
- UNION ALL
-
- SELECT tr.shipped,
- NULL as `in`,
- b.quantity as `out`,
- al.alertLevel as alertLevel,
- st.name AS stateName,
- s.name as name,
- e.ref as reference,
- e.id as origin,
- s.id as clientFk,
- IF(al.alertLevel = 3, TRUE, FALSE) isPicked,
- FALSE AS isTicket,
- b.id,
- NULL `order`
- FROM buy b
- JOIN entry e ON e.id = b.entryFk
- JOIN travel tr ON tr.id = e.travelFk
- JOIN warehouse w ON w.id = tr.warehouseOutFk
- JOIN supplier s ON s.id = e.supplierFk
- JOIN alertLevel al ON al.alertLevel =
- CASE
- WHEN tr.shipped < CURDATE() THEN 3
- WHEN tr.shipped = CURDATE() AND tr.isReceived = TRUE THEN 3
- ELSE 0
- END
- JOIN state st ON st.code = al.code
- WHERE tr.shipped >= vDateInventory
- AND vWarehouse =tr.warehouseOutFk
- AND s.id <> 4
- AND b.itemFk = vItemId
- AND e.isInventory = FALSE
- AND w.isFeedStock = FALSE
- AND e.isRaid = FALSE
- UNION ALL
-
- SELECT DATE(t.shipped),
- NULL as `in`,
- s.quantity as `out`,
- al.alertLevel as alertLevel,
- st.name AS stateName,
- t.nickname as name,
- t.refFk as reference,
- t.id as origin,
- t.clientFk,
- stk.id as isPicked,
- TRUE as isTicket,
- s.id,
- st.`order`
- FROM sale s
- JOIN ticket t ON t.id = s.ticketFk
- LEFT JOIN ticketState ts ON ts.ticket = t.id
- LEFT JOIN state st ON st.code = ts.code
- JOIN client c ON c.id = t.clientFk
- JOIN alertLevel al ON al.alertLevel =
- CASE
- WHEN t.shipped < curdate() THEN 3
- WHEN t.shipped > util.dayEnd(curdate()) THEN 0
- ELSE IFNULL(ts.alertLevel, 0)
- END
- LEFT JOIN state stPrep ON stPrep.`code` = 'PREPARED'
- LEFT JOIN saleTracking stk ON stk.saleFk = s.id AND stk.stateFk = stPrep.id
- WHERE t.shipped >= vDateInventory
- AND s.itemFk = vItemId
- AND vWarehouse =t.warehouseFk
- ORDER BY shipped, alertLevel DESC, isTicket, `order` DESC, isPicked DESC, `in` DESC, `out` DESC
- ) AS itemDiary;
-
-END$$
-delimiter ;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice2__.sql b/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice2__.sql
deleted file mode 100644
index a880135ba..000000000
--- a/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice2__.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateSaleForcePrice2`;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice__.sql b/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice__.sql
deleted file mode 100644
index d7eb5d32b..000000000
--- a/db/changes/10180-holyWeek/03-ticketCalculateSaleForcePrice__.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateSaleForcePrice`;
\ No newline at end of file
diff --git a/db/changes/10180-holyWeek/03-ticketCalculateSale__.sql b/db/changes/10180-holyWeek/03-ticketCalculateSale__.sql
deleted file mode 100644
index acefc29d5..000000000
--- a/db/changes/10180-holyWeek/03-ticketCalculateSale__.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateSale`;
-DROP procedure IF EXISTS `ticketCalculateSale__`;
-
-DELIMITER $$
-USE `vn`$$
-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;
- 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, vZoneFk zoneFk
- FROM tmp.buyUltimate
- WHERE itemFk = vItem;
-
- CALL vn.catalog_componentCalculate;
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT vSale saleFk,vWarehouseFk warehouseFk;
-
- CALL ticketComponentUpdateSale(IF(vTicketFree,1,6));
-
- INSERT INTO vn.ticketLog (originFk, userFk, `action`, description)
- VALUES (vTicket, account.userGetId(), 'update', CONCAT('Bionizo linea id ', vSale));
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE tmp.buyUltimate;
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10180-holyWeek/03-ticket_componentUpdate__.sql b/db/changes/10180-holyWeek/03-ticket_componentUpdate__.sql
deleted file mode 100644
index f75f157e8..000000000
--- a/db/changes/10180-holyWeek/03-ticket_componentUpdate__.sql
+++ /dev/null
@@ -1,83 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `vn`.`ticket_componentUpdate`;
-DROP procedure IF EXISTS `vn`.`ticket_componentUpdate__`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_componentUpdate__`(
- 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
- DECLARE vPrice DECIMAL(10,2);
- DECLARE vBonus DECIMAL(10,2);
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- ROLLBACK;
- RESIGNAL;
- END;
-
- START TRANSACTION;
-
- IF (SELECT addressFk FROM ticket WHERE id = vTicketFk) <> vAddressFk THEN
-
- UPDATE ticket t
- JOIN address a ON a.id = vAddressFk
- SET t.nickname = a.nickname
- WHERE t.id = vTicketFk;
-
- END IF;
-
- CALL vn.zone_getShippedWarehouse(vlanded, vAddressFk, vAgencyModeFk);
-
- SELECT zoneFk, price, bonus INTO vZoneFk, vPrice, vBonus
- FROM tmp.zoneGetShipped
- WHERE shipped = vShipped AND warehouseFk = vWarehouseFk LIMIT 1;
-
- UPDATE ticket t
- SET
- t.clientFk = vClientFk,
- t.agencyModeFk = vAgencyModeFk,
- t.addressFk = vAddressFk,
- t.zoneFk = vZoneFk,
- t.zonePrice = vPrice,
- t.zoneBonus = vBonus,
- t.warehouseFk = vWarehouseFk,
- t.companyFk = vCompanyFk,
- t.landed = vLanded,
- t.shipped = vShipped,
- t.isDeleted = vIsDeleted
- WHERE
- t.id = vTicketFk;
-
- IF vHasToBeUnrouted THEN
- UPDATE ticket t SET t.routeFk = NULL
- WHERE t.id = vTicketFk;
- END IF;
-
- IF vOption <> 8 THEN
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk))
- ENGINE = MEMORY
- SELECT id AS saleFk, vWarehouseFk warehouseFk
- FROM sale s WHERE s.ticketFk = vTicketFk;
-
- CALL ticketComponentUpdateSale (vOption);
-
- DROP TEMPORARY TABLE tmp.sale;
- END IF;
- COMMIT;
-END$$
-
-DELIMITER ;
-;
diff --git a/db/changes/10180-holyWeek/03-zone_UpcomingDeliveries.sql b/db/changes/10180-holyWeek/03-zone_UpcomingDeliveries.sql
deleted file mode 100644
index c8f85527e..000000000
--- a/db/changes/10180-holyWeek/03-zone_UpcomingDeliveries.sql
+++ /dev/null
@@ -1,80 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `zone_upcomingDeliveries`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_upcomingDeliveries`()
-BEGIN
- DECLARE vForwardDays INT;
-
- SELECT forwardDays INTO vForwardDays FROM zoneConfig;
- CALL util.time_createTable(CURDATE(), DATE_ADD(CURDATE(), INTERVAL vForwardDays DAY));
-
- DROP TEMPORARY TABLE IF EXISTS tLandings;
- CREATE TEMPORARY TABLE tLandings
- (INDEX (eventFk))
- ENGINE = MEMORY
- SELECT e.id eventFk,
- @travelingDays := IFNULL(e.travelingDays, z.travelingDays) travelingDays,
- TIMESTAMPADD(DAY, @travelingDays, ti.dated) landed,
- ti.dated shipped
- FROM zone z
- JOIN zoneEvent e ON e.zoneFk = z.id
- JOIN tmp.time ti ON ti.dated BETWEEN curdate() AND TIMESTAMPADD(DAY, vForwardDays, curdate());
-
- DROP TEMPORARY TABLE IF EXISTS tmp.zoneOption;
- CREATE TEMPORARY TABLE tmp.zoneOption
- ENGINE = MEMORY
- SELECT *
- FROM (
- SELECT z.id zoneFk,
- TIME(IFNULL(e.`hour`, z.`hour`)) `hour`,
- l.travelingDays,
- IFNULL(e.price, z.price) price,
- IFNULL(e.bonus, z.bonus) bonus,
- l.landed,
- l.shipped
- FROM zone z
- JOIN zoneEvent e ON e.zoneFk = z.id
- JOIN tLandings l ON l.eventFk = e.id
- WHERE (
- e.`type` = 'day'
- AND e.`dated` = l.landed
- ) OR (
- e.`type` != 'day'
- AND e.weekDays & (1 << WEEKDAY(l.landed))
- AND (e.`started` IS NULL OR l.landed >= e.`started`)
- AND (e.`ended` IS NULL OR l.landed <= e.`ended`)
- )
- ORDER BY
- zoneFk,
- CASE
- WHEN e.`type` = 'day'
- THEN 1
- WHEN e.`type` = 'range'
- THEN 2
- ELSE 3
- END
- ) t
- GROUP BY zoneFk, landed;
-
- DELETE t FROM tmp.zoneOption t
- JOIN zoneExclusion e
- ON e.zoneFk = t.zoneFk AND e.`dated` = t.landed;
-
- SELECT MAX(zo.`hour`) `hour`, zg.`name`, zo.shipped
- FROM tmp.zoneOption zo
- JOIN `zone` z ON z.id = zo.zoneFk
- JOIN agencyMode am ON am.id = z.agencyModeFk
- JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
- JOIN zoneIncluded zi ON zi.zoneFk = z.id
- JOIN zoneGeo zg ON zg.id = zi.geoFk AND zg.type = 'province'
- WHERE dm.code = 'DELIVERY'
- GROUP BY shipped, zg.`name`
- ORDER BY shipped, zg.`name`;
-
- DROP TEMPORARY TABLE tmp.time, tLandings;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10190-PostErte/00-itemLastEntry.sql b/db/changes/10190-PostErte/00-itemLastEntry.sql
deleted file mode 100644
index b293c234e..000000000
--- a/db/changes/10190-PostErte/00-itemLastEntry.sql
+++ /dev/null
@@ -1,42 +0,0 @@
-
-DROP procedure IF EXISTS `vn`.`itemLastEntries`;
-
-DELIMITER $$
-CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`itemLastEntries`(IN `vItem` INT, IN `vDays` DATE)
-BEGIN
- SELECT
- w.id AS warehouseFk,
- w.name AS warehouse,
- tr.landed,
- b.entryFk,
- b.isIgnored,
- b.price2,
- b.price3,
- b.stickers,
- b.packing,
- b.`grouping`,
- b.groupingMode,
- b.weight,
- i.stems,
- b.quantity,
- b.buyingValue,
- b.packageFk ,
- s.id AS supplierFk,
- s.name AS supplier
- FROM itemType it
- RIGHT JOIN (entry e
- LEFT JOIN supplier s ON s.id = e.supplierFk
- RIGHT JOIN buy b ON b.entryFk = e.id
- LEFT JOIN item i ON i.id = b.itemFk
- LEFT JOIN ink ON ink.id = i.inkFk
- LEFT JOIN travel tr ON tr.id = e.travelFk
- LEFT JOIN warehouse w ON w.id = tr.warehouseInFk
- LEFT JOIN origin o ON o.id = i.originFk
- ) ON it.id = i.typeFk
- LEFT JOIN edi.ekt ek ON b.ektFk = ek.id
- WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND DATE_ADD(CURDATE(), INTERVAl + 10 DAY)
- ORDER BY tr.landed DESC , b.id DESC;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10190-PostErte/00-route.sql b/db/changes/10190-PostErte/00-route.sql
deleted file mode 100644
index 5ffab3a46..000000000
--- a/db/changes/10190-PostErte/00-route.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-ALTER TABLE `vn`.`route`
-DROP FOREIGN KEY `fk_route_1`;
-ALTER TABLE `vn`.`route`
-ADD CONSTRAINT `fk_route_1`
- FOREIGN KEY (`zoneFk`)
- REFERENCES `vn`.`zone` (`id`)
- ON DELETE SET NULL
- ON UPDATE CASCADE;
diff --git a/db/changes/10190-PostErte/00-saleCalculateComponent.sql b/db/changes/10190-PostErte/00-saleCalculateComponent.sql
deleted file mode 100644
index 8ab498f57..000000000
--- a/db/changes/10190-PostErte/00-saleCalculateComponent.sql
+++ /dev/null
@@ -1,99 +0,0 @@
-
-DROP procedure IF EXISTS `vn`.`sale_calculateComponent`;
-
-DELIMITER $$
-CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`sale_calculateComponent`(vSale INT, vOption INT)
-proc: BEGIN
-/**
- * Actualiza los componentes
- *
- * @param vSale Delivery date
- * @param vOption indica en que componente pone el descuadre, NULL en casos habituales
- */
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vAgencyModeFk INT;
- DECLARE vAddressFk INT;
- DECLARE vTicketFk BIGINT;
- DECLARE vItemFk BIGINT;
- DECLARE vLanded DATE;
- DECLARE vIsEditable BOOLEAN;
- DECLARE vZoneFk INTEGER;
-
- SELECT t.refFk IS NULL AND (IFNULL(ts.alertLevel, 0) = 0 OR s.price = 0),
- s.ticketFk,
- s.itemFk ,
- t.zoneFk,
- t.warehouseFk,
- t.shipped,
- t.addressFk,
- t.agencyModeFk,
- t.landed
- INTO vIsEditable,
- vTicketFk,
- vItemFk,
- vZoneFk,
- vWarehouseFk,
- vShipped,
- vAddressFk,
- vAgencyModeFk,
- vLanded
- FROM ticket t
- JOIN sale s ON s.ticketFk = t.id
- LEFT JOIN ticketState ts ON ts.ticketFk = t.id
- WHERE s.id = vSale;
-
- IF vLanded IS NULL OR vZoneFk IS NULL THEN
-
- CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk, TRUE);
-
- IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN
- CALL util.throw('There is no zone for these parameters');
- END IF;
-
- UPDATE ticket t
- SET t.landed = (SELECT landed FROM tmp.zoneGetLanded LIMIT 1)
- WHERE t.id = vTicketFk AND t.landed IS NULL;
-
- IF vZoneFk IS NULL THEN
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- UPDATE ticket t
- SET t.zoneFk = vZoneFk
- WHERE t.id = vTicketFk AND t.zoneFk IS NULL;
- END IF;
- DROP TEMPORARY TABLE tmp.zoneGetLanded;
-
- END IF;
-
- -- rellena la tabla buyUltimate con la ultima compra
- CALL buyUltimate (vWarehouseFk, vShipped);
-
- DELETE FROM tmp.buyUltimate WHERE itemFk != vItemFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouseFk warehouseFk, NULL available, vItemFk itemFk, buyFk, vZoneFk zoneFk
- FROM tmp.buyUltimate
- WHERE itemFk = vItemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- 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(vIsEditable, 1, 6);
- END IF;
-
- CALL ticketComponentUpdateSale(vOption);
- CALL catalog_componentPurge();
-
- DROP TEMPORARY TABLE tmp.buyUltimate;
- DROP TEMPORARY TABLE tmp.sale;
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10190-PostErte/01-ticketCalculateClon.sql b/db/changes/10190-PostErte/01-ticketCalculateClon.sql
deleted file mode 100644
index 6e2906f6a..000000000
--- a/db/changes/10190-PostErte/01-ticketCalculateClon.sql
+++ /dev/null
@@ -1,93 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticketCalculateClon`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT)
-BEGIN
-/*
- * Recalcula los componentes un ticket clonado,
- * las lineas a precio cero fuerza para que tengan precio, el resto lo respeta
- * @param vTicketNew nuevo ticket clonado
- * @param vTicketOld icket original, a partir del qual se clonara el nuevo
-*/
- DECLARE vShipped DATE;
- DECLARE vClient INT;
- DECLARE vWarehouse SMALLINT;
- DECLARE vAgencyMode INT;
- DECLARE vAddress INT;
- DECLARE vLanded DATE;
- DECLARE vAgency INT;
- DECLARE vZoneFk INT;
-
- REPLACE INTO orderTicket(orderFk,ticketFk)
- SELECT orderFk, vTicketNew
- FROM orderTicket
- WHERE ticketFk = vTicketOld;
-
- SELECT t.clientFk, t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk, t.zoneFk
- INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency, vZoneFk
- FROM agencyMode a
- JOIN ticket t ON t.agencyModeFk = a.id
- WHERE t.id = vTicketNew;
-
- IF vLanded IS NULL THEN
- CALL zone_getLanded(vShipped, vAddress, vAgency, vWarehouse, TRUE);
- UPDATE ticket t
- JOIN tmp.zoneGetLanded zgl ON t.warehouseFk = zgl.warehouseFk
- SET t.landed = zgl.landed,
- t.zone = zgl.zoneFk
- WHERE t.id = vTicketNew;
-
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- DROP TEMPORARY TABLE IF EXISTS tmp.zoneGetLanded;
- END IF;
-
- -- rellena la tabla tmp.buyUltimate con la ultima compra
- CALL buyUltimate(vWarehouse, vShipped);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouse warehouseFk, NULL available, s.itemFk, bu.buyFk, vZoneFk zoneFk
- FROM sale s
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
- WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddress, vAgencyMode, vWarehouse);
-
- -- Bionizamos lineas con Preu = 0
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT s.id saleFk, vWarehouse warehouseFk
- FROM sale s
- JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew AND s.price = 0;
-
- CALL ticketComponentUpdateSale(1);
-
- -- Bionizamos lineas con Preu > 0
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT s.id saleFk, vWarehouse warehouseFk
- FROM sale s
- JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew
- AND s.price > 0;
-
- CALL ticketComponentUpdateSale(6);
-
- -- Log
- CALL `logAdd`(vTicketNew, 'update', ' ticket' , 'Bioniza Ticket');
-
- -- Limpieza
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE IF EXISTS
- tmp.buyUltimate,
- tmp.sale,
- tmp.zoneGetLanded;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql b/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql
deleted file mode 100644
index 137386ac9..000000000
--- a/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql
+++ /dev/null
@@ -1,132 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_cloneWeekly`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_cloneWeekly`(IN vWeek INT)
-BEGIN
- DECLARE vIsDone BOOL;
- DECLARE vLanding DATE;
- DECLARE vShipment DATE;
- DECLARE vWarehouse INT;
- DECLARE vTicket INT;
- DECLARE vWeekDay INT;
- DECLARE vClient INT;
- DECLARE vEmpresa INT;
- DECLARE vAddressFk INT;
- DECLARE vAgencyModeFk INT;
- DECLARE vNewTicket INT;
- DECLARE vYear INT;
-
- DECLARE rsTicket CURSOR FOR
- SELECT tw.ticketFk, weekDay, t.clientFk, t.warehouseFk, t.companyFk, t.addressFk, tw.agencyModeFk
- FROM ticketWeekly tw
- JOIN ticket t ON tt.ticketFk = t.id;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE;
-
- SET vYear = YEAR(CURDATE()) + IF(vWeek < WEEK(CURDATE()),1, 0);
-
- OPEN rsTicket;
-
- myLoop: LOOP
- BEGIN
- DECLARE vError TEXT;
- DECLARE vSalesPersonEmail VARCHAR(150);
- DECLARE vMailSent BOOL;
- DECLARE vSubject VARCHAR(150);
- DECLARE vMessage TEXT;
- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
- BEGIN
- GET DIAGNOSTICS CONDITION 1
- vError = MESSAGE_TEXT;
- END;
-
- SET vIsDone = FALSE;
- FETCH rsTicket INTO vTicket, vWeekDay, vClient, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk;
-
- IF vIsDone THEN
-
- LEAVE myLoop;
- END IF;
- SELECT date INTO vShipment
- FROM `time`
- WHERE `year` = vYear AND `week` = vWeek
- AND WEEKDAY(date) = vWeekDay;
-
- -- busca si el ticket ya ha sido clonado
- IF (SELECT COUNT(*) FROM vn.ticket tOrig
- JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk
- JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id
- JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk
- JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk
- WHERE tOrig.id = vTicket AND DATE(tClon.shipped) = vShipment) > 0
- THEN
- ITERATE myLoop;
- END IF;
- CALL vn.zone_getLanded(vShipment, vAddressFk, vAgencyModeFk, vWarehouse, TRUE);
-
- SELECT landed INTO vLanding from tmp.zoneGetLanded LIMIT 1;
-
- CALL vn.ticketCreateWithoutZone(vClient, vShipment, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk, NULL, vLanding, account.userGetId(), vNewTicket);
-
- IF (vLanding IS NULL) THEN
-
- SELECT e.email INTO vSalesPersonEmail
- FROM vn.client c
- JOIN vn.worker sp ON sp.id = c.salesPersonFk
- JOIN account.emailUser e ON e.userFk = sp.userFk
- WHERE c.id = vClient;
-
- SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', vTicket,
- ' para el dia: ', vShipment);
- SET vMessage = CONCAT('No se ha podido clonar el ticket ', vTicket,
- ' para el dia: ', vShipment,
- ' porque no hay una zona de envío disponible. Se ha creado el ticket: ', vNewTicket,
- ' pero ha que revisar las fechas y la agencia');
-
- SELECT COUNT(*) INTO vMailSent
- FROM vn.mail
- WHERE sender = vSalesPersonEmail
- AND subject = vSubject;
-
- IF NOT vMailSent THEN
- INSERT INTO vn.mail (sender,`subject`,body)
- VALUES (vSalesPersonEmail, vSubject, vMessage);
- END IF;
- CALL vn.ticketStateUpdate (vNewTicket, 'FIXING');
- END IF;
-
- INSERT INTO vn.sale (ticketFk, itemFk, concept, quantity, price, discount, priceFixed, isPriceFixed)
- SELECT vNewTicket, saleOrig.itemFk , saleOrig.concept , saleOrig.quantity, saleOrig.price , saleOrig.discount, saleOrig.priceFixed, saleOrig.isPriceFixed
- FROM vn.ticket tOrig
- JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk
- LEFT JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id
- LEFT JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk
- LEFT JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk AND DATE(tClon.shipped) = vShipment
- WHERE tOrig.id = vTicket AND saleClon.id IS NULL;
-
- INSERT IGNORE INTO vn.saleCloned(saleOriginalFk, saleClonedFk)
- SELECT saleOriginal.id, saleClon.id
- FROM vn.sale saleOriginal
- JOIN vn.sale saleClon ON saleOriginal.itemFk = saleClon.itemFk AND saleOriginal.quantity = saleClon.quantity
- WHERE saleOriginal.ticketFk = vTicket AND saleClon.ticketFk = vNewTicket;
-
- INSERT INTO ticketRequest (description, ordered, shipped, salesPersonCode, buyerCode, quantity, price,
- itemFk ,clientFk, response, total, buyed, saleFk)
- SELECT tr.description, tr.ordered, tr.shipped, tr.salesPersonCode, tr.buyerCode, tr.quantity, tr.price,
- tr.itemFk, tr.clientFk, tr.response, tr.total, tr.buyed, tr.saleFk
- FROM sale s JOIN ticketRequest tr ON tr.saleFk = s.id
- JOIN sale s2 ON s.concept = s2.concept AND s.quantity = s2.quantity AND m.Id_Article = m2.Id_Article
- WHERE s.ticketFk = vTicket AND s2.ticketFk = vNewTicket;
-
- CALL vn.ticketCalculateClon(vNewTicket, vTicket);
- END;
- END LOOP;
-
- CLOSE rsTicket;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10190-PostErte/01-ticket_recalcComponents.sql b/db/changes/10190-PostErte/01-ticket_recalcComponents.sql
deleted file mode 100644
index 8a8f71ea4..000000000
--- a/db/changes/10190-PostErte/01-ticket_recalcComponents.sql
+++ /dev/null
@@ -1,93 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `ticket_recalcComponents`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_recalcComponents`(IN vTicketFk BIGINT, vIsTicketEditable BOOLEAN)
-proc: BEGIN
-
-/**
- * Este procedimiento recalcula los componentes de un ticket,
- * eliminando los componentes existentes e insertandolos de nuevo
- *
- * @param vTicketFk Id del ticket
- * @param vIsTicketEditable si no se quiere forzar llamar con NULL
- */
- DECLARE vShipped DATE;
- DECLARE vWarehouseFk SMALLINT;
- DECLARE vAgencyModeFk INT;
- DECLARE vAddressFk INT;
- DECLARE vLanded DATE;
- DECLARE vZoneFk INTEGER;
-
- IF vIsTicketEditable IS NULL THEN
- SELECT IFNULL(ts.alertLevel,0) = 0 AND IFNULL(t.refFk,'') = ''
- INTO vIsTicketEditable
- FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket
- WHERE id = vTicketFk;
- END IF;
-
- SELECT t.warehouseFk,
- t.shipped,
- t.addressFk,
- t.agencyModeFk,
- t.landed,
- t.zoneFk
- INTO vWarehouseFk, vShipped, vAddressFk, vAgencyModeFk, vLanded, vZoneFk
- FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket
- WHERE t.id = vTicketFk;
-
- IF vLanded IS NULL OR vZoneFk IS NULL THEN
-
- CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk, TRUE);
-
- IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN
- CALL util.throw('There is no zone for these parameters');
- END IF;
-
- UPDATE ticket t
- SET t.landed = (SELECT landed FROM tmp.zoneGetLanded LIMIT 1)
- WHERE t.id = vTicketFk AND t.landed IS NULL;
-
- IF vZoneFk IS NULL THEN
- SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1;
- UPDATE ticket t
- SET t.zoneFk = vZoneFk
- WHERE t.id = vTicketFk AND t.zoneFk IS NULL;
- END IF;
- DROP TEMPORARY TABLE tmp.zoneGetLanded;
-
- END IF;
-
- -- rellena la tabla buyUltimate con la ultima compra
- CALL buyUltimate (vWarehouseFk, vShipped);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
- CREATE TEMPORARY TABLE tmp.ticketLot
- SELECT vWarehouseFk warehouseFk, NULL available,
- s.itemFk, bu.buyFk, vZoneFk zoneFk
- FROM sale s
- LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
- WHERE s.ticketFk = vTicketFk
- GROUP BY s.itemFk;
-
- CALL catalog_componentPrepare();
- CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.sale;
- CREATE TEMPORARY TABLE tmp.sale
- (PRIMARY KEY (saleFk)) ENGINE = MEMORY
- SELECT id saleFk, vWarehouseFk warehouseFk
- FROM sale s
- WHERE s.ticketFk = vTicketFk;
-
- -- si el ticket esta facturado, respeta los precios
- CALL ticketComponentUpdateSale(IF(vIsTicketEditable, 1, 6));
-
- CALL catalog_componentPurge();
- DROP TEMPORARY TABLE
- tmp.buyUltimate,
- tmp.sale;
-END$$
-
-DELIMITER ;
\ No newline at end of file
diff --git a/db/changes/10190-PostErte/01-zone_getLanded.sql b/db/changes/10190-PostErte/01-zone_getLanded.sql
deleted file mode 100644
index 4ddac0112..000000000
--- a/db/changes/10190-PostErte/01-zone_getLanded.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-USE `vn`;
-DROP procedure IF EXISTS `zone_getLanded`;
-
-DELIMITER $$
-USE `vn`$$
-CREATE DEFINER=`root`@`%` PROCEDURE `zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN)
-BEGIN
-/**
-* Devuelve una tabla temporal con el dia de recepcion para vShipped.
-*
-* @param vShipped Fecha de preparacion de mercancia
-* @param vAddressFk Id de consignatario, %NULL para recogida
-* @param vAgencyModeFk Id agencia
-* @param vWarehouseFk vWarehouseFk
-* @table tmp.zoneGetLanded Datos de recepción
-*/
-
- CALL zone_getFromGeo(address_getGeo(vAddressFk));
- CALL zone_getOptionsForShipment(vShipped, vShowExpiredZones);
-
- DROP TEMPORARY TABLE IF EXISTS tmp.zoneGetLanded;
- CREATE TEMPORARY TABLE tmp.zoneGetLanded
- ENGINE = MEMORY
- SELECT vWarehouseFk warehouseFk,
- TIMESTAMPADD(DAY,zo.travelingDays, vShipped) landed,
- zo.zoneFk
- FROM tmp.zoneOption zo
- JOIN zone z ON z.id = zo.zoneFk
- JOIN zoneWarehouse zw ON zw.zoneFk = z.id
- WHERE agencyModeFk = vAgencyModeFk
- AND zw.warehouseFk = vWarehouseFk;
-
- DROP TEMPORARY TABLE
- tmp.zone,
- tmp.zoneOption;
-
-END$$
-
-DELIMITER ;
-
diff --git a/db/changes/10200-normality/01-calendar_employee.sql b/db/changes/10200-normality/01-calendar_employee.sql
deleted file mode 100644
index c5db9da2c..000000000
--- a/db/changes/10200-normality/01-calendar_employee.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-ALTER TABLE `postgresql`.`calendar_employee`
-ADD COLUMN `id` INT NULL AUTO_INCREMENT FIRST,
-ADD UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
-ADD INDEX `id_index` (`id` ASC) VISIBLE;
-;
diff --git a/db/changes/10200-normality/02-workerCalendar.sql b/db/changes/10200-normality/02-workerCalendar.sql
deleted file mode 100644
index 479470ac0..000000000
--- a/db/changes/10200-normality/02-workerCalendar.sql
+++ /dev/null
@@ -1,12 +0,0 @@
-USE `vn`;
-CREATE
- OR REPLACE ALGORITHM = UNDEFINED
- DEFINER = `root`@`%`
- SQL SECURITY DEFINER
-VIEW `workerCalendar2` AS
- SELECT
- `ce`.`id` AS `id`,
- `ce`.`business_id` AS `businessFk`,
- `ce`.`calendar_state_id` AS `absenceTypeFk`,
- `ce`.`date` AS `dated`
- FROM `postgresql`.`calendar_employee` `ce`;
diff --git a/db/changes/10210-summer/00-ACL.sql b/db/changes/10210-summer/00-ACL.sql
new file mode 100644
index 000000000..755b148d7
--- /dev/null
+++ b/db/changes/10210-summer/00-ACL.sql
@@ -0,0 +1,2 @@
+INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
+ VALUES ('Buy', '*', '*', 'ALLOW', 'ROLE', 'buyer');
diff --git a/db/changes/10210-summer/00-accountingType.sql b/db/changes/10210-summer/00-accountingType.sql
new file mode 100644
index 000000000..7cb21ec31
--- /dev/null
+++ b/db/changes/10210-summer/00-accountingType.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `vn`.`accountingType`
+ADD COLUMN `receiptDescription` VARCHAR(50) NULL COMMENT 'Descripción por defecto al crear nuevo recibo' AFTER `description`;
diff --git a/db/changes/10210-summer/00-ticket_close.sql b/db/changes/10210-summer/00-ticket_close.sql
new file mode 100644
index 000000000..96f9c5528
--- /dev/null
+++ b/db/changes/10210-summer/00-ticket_close.sql
@@ -0,0 +1,119 @@
+USE `vn`;
+DROP procedure IF EXISTS `ticket_close`;
+
+DELIMITER $$
+USE `vn`$$
+CREATE DEFINER=`root`@`%` PROCEDURE `ticket_close`(vTicketFk INT)
+BEGIN
+/**
+ * Realiza el cierre de todos los
+ * tickets de la tabla ticketClosure.
+ *
+ * @param vTicketFk Id del ticket
+ */
+ DECLARE vDone BOOL;
+ DECLARE vClientFk INT;
+ DECLARE vCurTicketFk INT;
+ DECLARE vIsTaxDataChecked BOOL;
+ DECLARE vCompanyFk INT;
+ DECLARE vShipped DATE;
+ DECLARE vNewInvoiceId INT;
+ DECLARE vHasDailyInvoice BOOL;
+ DECLARE vWithPackage BOOL;
+ DECLARE vHasToInvoice BOOL;
+
+ DECLARE cur CURSOR FOR
+ SELECT ticketFk FROM tmp.ticketClosure;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN
+ RESIGNAL;
+ END;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure;
+ CREATE TEMPORARY TABLE tmp.ticketClosure
+ SELECT vTicketFk AS ticketFk;
+
+ INSERT INTO tmp.ticketClosure
+ SELECT id FROM stowaway s
+ WHERE s.shipFk = vTicketFk;
+ OPEN cur;
+
+ proc: LOOP
+ SET vDone = FALSE;
+
+ FETCH cur INTO vCurTicketFk;
+
+ IF vDone THEN
+ LEAVE proc;
+ END IF;
+
+ -- ticketClosure start
+ SELECT
+ c.id,
+ c.isTaxDataChecked,
+ t.companyFk,
+ t.shipped,
+ co.hasDailyInvoice,
+ w.isManaged,
+ c.hasToInvoice
+ INTO vClientFk,
+ vIsTaxDataChecked,
+ vCompanyFk,
+ vShipped,
+ vHasDailyInvoice,
+ vWithPackage,
+ vHasToInvoice
+ FROM ticket t
+ JOIN `client` c ON c.id = t.clientFk
+ JOIN province p ON p.id = c.provinceFk
+ JOIN country co ON co.id = p.countryFk
+ JOIN warehouse w ON w.id = t.warehouseFk
+ WHERE t.id = vCurTicketFk;
+
+ INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity)
+ (SELECT vCurTicketFk, p.id, COUNT(*)
+ FROM expedition e
+ JOIN packaging p ON p.itemFk = e.itemFk
+ WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable
+ AND vWithPackage
+ GROUP BY p.itemFk);
+
+ -- No retornables o no catalogados
+ INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed)
+ (SELECT e.itemFk, vCurTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.itemFk, vClientFk), 1
+ FROM expedition e
+ JOIN item i ON i.id = e.itemFk
+ LEFT JOIN packaging p ON p.itemFk = i.id
+ WHERE e.ticketFk = vCurTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0
+ AND getSpecialPrice(e.itemFk, vClientFk) > 0
+ GROUP BY e.itemFk);
+
+ CALL vn.zonePromo_Make();
+
+ IF(vHasDailyInvoice) AND vHasToInvoice THEN
+
+ -- Facturacion rapida
+ CALL ticketTrackingAdd(vCurTicketFk, 'DELIVERED', NULL);
+ -- Facturar si está contabilizado
+ IF vIsTaxDataChecked THEN
+ CALL invoiceOut_newFromClient(
+ vClientFk,
+ (SELECT invoiceSerial(vClientFk, vCompanyFk, 'M')),
+ vShipped,
+ vCompanyFk,
+ NULL,
+ vNewInvoiceId);
+ END IF;
+ ELSE
+ CALL ticketTrackingAdd(vCurTicketFk, (SELECT vn.getAlert3State(vCurTicketFk)), NULL);
+ END IF;
+ END LOOP;
+
+ CLOSE cur;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure;
+END$$
+
+DELIMITER ;
+
diff --git a/db/changes/12200-Normalidad/00-zoneEstimatedDelivery.sql b/db/changes/12200-Normalidad/00-zoneEstimatedDelivery.sql
deleted file mode 100644
index 8cf30796e..000000000
--- a/db/changes/12200-Normalidad/00-zoneEstimatedDelivery.sql
+++ /dev/null
@@ -1,47 +0,0 @@
-USE `vn`;
-CREATE
- OR REPLACE ALGORITHM = UNDEFINED
- DEFINER = `root`@`%`
- SQL SECURITY DEFINER
-VIEW `vn`.`zoneEstimatedDelivery` AS
- SELECT
- `t`.`zoneFk` AS `zoneFk`,
- CAST((CURDATE() + INTERVAL ((HOUR(`zc`.`hour`) * 60) + MINUTE(`zc`.`hour`)) MINUTE)
- AS TIME) AS `hourTheoretical`,
- CAST(SUM(`sv`.`volume`) AS DECIMAL (5 , 1 )) AS `totalVolume`,
- CAST(SUM(IF((`s`.`alertLevel` < 2),
- `sv`.`volume`,
- 0))
- AS DECIMAL (5 , 1 )) AS `remainingVolume`,
- GREATEST(IFNULL(`lhp`.`m3`, 0),
- IFNULL(`dl`.`minSpeed`, 0)) AS `speed`,
- CAST((`zc`.`hour` + INTERVAL ((-(SUM(IF((`s`.`alertLevel` < 2),
- `sv`.`volume`,
- 0))) * 60) / GREATEST(IFNULL(`lhp`.`m3`, 0),
- IFNULL(`dl`.`minSpeed`, 0))) MINUTE)
- AS TIME) AS `hourEffective`,
- FLOOR(((-(SUM(IF((`s`.`alertLevel` < 2),
- `sv`.`volume`,
- 0))) * 60) / GREATEST(IFNULL(`lhp`.`m3`, 0),
- IFNULL(`dl`.`minSpeed`, 0)))) AS `minutesLess`,
- CAST((`zc`.`hour` + INTERVAL ((-(SUM(IF((`s`.`alertLevel` < 2),
- `sv`.`volume`,
- 0))) * 60) / GREATEST(IFNULL(`lhp`.`m3`, 0),
- IFNULL(`dl`.`minSpeed`, 0))) MINUTE)
- AS TIME) AS `etc`
- FROM
- ((((((((`ticket` `t`
- JOIN `ticketStateToday` `tst` ON ((`tst`.`ticket` = `t`.`id`)))
- JOIN `state` `s` ON ((`s`.`id` = `tst`.`state`)))
- JOIN `saleVolume` `sv` ON ((`sv`.`ticketFk` = `t`.`id`)))
- LEFT JOIN `lastHourProduction` `lhp` ON ((`lhp`.`warehouseFk` = `t`.`warehouseFk`)))
- JOIN `warehouse` `w` ON ((`w`.`id` = `t`.`warehouseFk`)))
- JOIN `warehouseAlias` `wa` ON ((`wa`.`id` = `w`.`aliasFk`)))
- LEFT JOIN `zoneClosure` `zc` ON (((`zc`.`zoneFk` = `t`.`zoneFk`)
- AND (`zc`.`dated` = CURDATE()))))
- LEFT JOIN `cache`.`departure_limit` `dl` ON (((`dl`.`warehouse_id` = `t`.`warehouseFk`)
- AND (`dl`.`fecha` = CURDATE()))))
- WHERE
- ((`wa`.`name` = 'Silla')
- AND (CAST(`t`.`shipped` AS DATE) = CURDATE()))
- GROUP BY `t`.`zoneFk`;
\ No newline at end of file
diff --git a/db/changes/12200-Normalidad/01-zoneETD.sql b/db/changes/12200-Normalidad/01-zoneETD.sql
deleted file mode 100644
index e4cf48548..000000000
--- a/db/changes/12200-Normalidad/01-zoneETD.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-CREATE
- OR REPLACE ALGORITHM = UNDEFINED
- DEFINER = `root`@`%`
- SQL SECURITY DEFINER
-VIEW `vn`.`zone_ETD` AS
- SELECT
- `zed`.`zoneFk` AS `zoneFk`,
- `zed`.`hourTheoretical` AS `HoraTeórica`,
- `zed`.`totalVolume` AS `volumenTotal`,
- `zed`.`remainingVolume` AS `volumenPendiente`,
- `zed`.`speed` AS `velocidad`,
- `zed`.`hourEffective` AS `HoraPráctica`,
- `zed`.`minutesLess` AS `minutesLess`,
- `zed`.`etc` AS `etc`
- FROM
- `vn`.`zoneEstimatedDelivery` `zed`
\ No newline at end of file
diff --git a/db/dump/dumpedFixtures.sql b/db/dump/dumpedFixtures.sql
index bd117cd30..9c05923cf 100644
--- a/db/dump/dumpedFixtures.sql
+++ b/db/dump/dumpedFixtures.sql
@@ -23,7 +23,7 @@ USE `util`;
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
-INSERT INTO `config` VALUES (1,'10190',0,'production',NULL);
+INSERT INTO `config` VALUES (1,'10210',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 2020-07-16 9:52:59
+-- Dump completed on 2020-09-09 11:46:28
USE `account`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -94,7 +94,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:01
+-- Dump completed on 2020-09-09 11:46:30
USE `salix`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -119,7 +119,7 @@ USE `salix`;
LOCK TABLES `ACL` WRITE;
/*!40000 ALTER TABLE `ACL` DISABLE KEYS */;
-INSERT INTO `ACL` VALUES (1,'Account','*','*','ALLOW','ROLE','employee'),(3,'Address','*','*','ALLOW','ROLE','employee'),(5,'AgencyService','*','READ','ALLOW','ROLE','employee'),(7,'Client','*','*','ALLOW','ROLE','employee'),(9,'ClientObservation','*','*','ALLOW','ROLE','employee'),(11,'ContactChannel','*','READ','ALLOW','ROLE','trainee'),(13,'Employee','*','READ','ALLOW','ROLE','employee'),(14,'PayMethod','*','READ','ALLOW','ROLE','trainee'),(16,'FakeProduction','*','READ','ALLOW','ROLE','employee'),(17,'Warehouse','* ','READ','ALLOW','ROLE','trainee'),(18,'State','*','READ','ALLOW','ROLE','employee'),(20,'TicketState','*','*','ALLOW','ROLE','employee'),(24,'Delivery','*','READ','ALLOW','ROLE','employee'),(25,'Zone','*','READ','ALLOW','ROLE','employee'),(26,'ClientCredit','*','*','ALLOW','ROLE','employee'),(27,'ClientCreditLimit','*','READ','ALLOW','ROLE','trainee'),(30,'GreugeType','*','READ','ALLOW','ROLE','trainee'),(31,'Mandate','*','READ','ALLOW','ROLE','trainee'),(32,'MandateType','*','READ','ALLOW','ROLE','trainee'),(33,'Company','*','READ','ALLOW','ROLE','trainee'),(34,'Greuge','*','READ','ALLOW','ROLE','trainee'),(35,'AddressObservation','*','*','ALLOW','ROLE','employee'),(36,'ObservationType','*','*','ALLOW','ROLE','employee'),(37,'Greuge','*','WRITE','ALLOW','ROLE','employee'),(38,'AgencyMode','*','READ','ALLOW','ROLE','employee'),(39,'ItemTag','*','WRITE','ALLOW','ROLE','buyer'),(40,'ItemBotanical','*','WRITE','ALLOW','ROLE','buyer'),(41,'ItemBotanical','*','READ','ALLOW','ROLE','employee'),(42,'ItemPlacement','*','WRITE','ALLOW','ROLE','buyer'),(43,'ItemPlacement','*','WRITE','ALLOW','ROLE','replenisher'),(44,'ItemPlacement','*','READ','ALLOW','ROLE','employee'),(45,'ItemBarcode','*','READ','ALLOW','ROLE','employee'),(46,'ItemBarcode','*','WRITE','ALLOW','ROLE','buyer'),(47,'ItemBarcode','*','WRITE','ALLOW','ROLE','replenisher'),(48,'ItemNiche','*','READ','ALLOW','ROLE','employee'),(49,'ItemNiche','*','WRITE','ALLOW','ROLE','buyer'),(50,'ItemNiche','*','WRITE','ALLOW','ROLE','replenisher'),(51,'ItemTag','*','READ','ALLOW','ROLE','employee'),(53,'Item','*','READ','ALLOW','ROLE','employee'),(54,'Item','*','WRITE','ALLOW','ROLE','buyer'),(55,'Recovery','*','READ','ALLOW','ROLE','trainee'),(56,'Recovery','*','WRITE','ALLOW','ROLE','administrative'),(58,'CreditClassification','*','*','ALLOW','ROLE','insurance'),(60,'CreditInsurance','*','*','ALLOW','ROLE','insurance'),(61,'InvoiceOut','*','READ','ALLOW','ROLE','employee'),(62,'Ticket','*','*','ALLOW','ROLE','employee'),(63,'TicketObservation','*','*','ALLOW','ROLE','employee'),(64,'Route','*','READ','ALLOW','ROLE','employee'),(65,'Sale','*','READ','ALLOW','ROLE','employee'),(66,'TicketTracking','*','READ','ALLOW','ROLE','employee'),(68,'TicketPackaging','*','*','ALLOW','ROLE','employee'),(69,'Packaging','*','READ','ALLOW','ROLE','employee'),(70,'Packaging','*','WRITE','ALLOW','ROLE','logistic'),(71,'SaleChecked','*','READ','ALLOW','ROLE','employee'),(72,'SaleComponent','*','READ','ALLOW','ROLE','employee'),(73,'Expedition','*','READ','ALLOW','ROLE','employee'),(74,'Expedition','*','WRITE','ALLOW','ROLE','deliveryBoss'),(75,'Expedition','*','WRITE','ALLOW','ROLE','production'),(76,'AnnualAverageInvoiced','*','READ','ALLOW','ROLE','employee'),(77,'WorkerMana','*','READ','ALLOW','ROLE','employee'),(78,'TicketTracking','*','WRITE','ALLOW','ROLE','production'),(79,'TicketTracking','changeState','*','ALLOW','ROLE','employee'),(80,'Sale','deleteSales','*','ALLOW','ROLE','employee'),(81,'Sale','moveToTicket','*','ALLOW','ROLE','employee'),(82,'Sale','updateQuantity','*','ALLOW','ROLE','employee'),(83,'Sale','updatePrice','*','ALLOW','ROLE','employee'),(84,'Sale','updateDiscount','*','ALLOW','ROLE','employee'),(85,'SaleTracking','*','READ','ALLOW','ROLE','employee'),(86,'Order','*','*','ALLOW','ROLE','employee'),(87,'OrderRow','*','*','ALLOW','ROLE','employee'),(88,'ClientContact','*','*','ALLOW','ROLE','employee'),(89,'Sale','moveToNewTicket','*','ALLOW','ROLE','employee'),(90,'Sale','reserve','*','ALLOW','ROLE','employee'),(91,'TicketWeekly','*','READ','ALLOW','ROLE','employee'),(94,'Agency','landsThatDay','*','ALLOW','ROLE','employee'),(96,'ClaimEnd','*','READ','ALLOW','ROLE','employee'),(97,'ClaimEnd','*','WRITE','ALLOW','ROLE','salesAssistant'),(98,'ClaimBeginning','*','*','ALLOW','ROLE','employee'),(99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee'),(100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','salesAssistant'),(101,'Claim','*','*','ALLOW','ROLE','employee'),(102,'Claim','createFromSales','*','ALLOW','ROLE','employee'),(103,'ClaimEnd','importTicketSales','WRITE','ALLOW','ROLE','salesAssistant'),(104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss'),(105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss'),(106,'ItemBotanical','*','WRITE','ALLOW','ROLE','marketingBoss'),(107,'ItemNiche','*','WRITE','ALLOW','ROLE','marketingBoss'),(108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'),(109,'UserConfig','*','*','ALLOW','ROLE','employee'),(110,'Bank','*','READ','ALLOW','ROLE','trainee'),(111,'ClientLog','*','READ','ALLOW','ROLE','trainee'),(112,'Defaulter','*','READ','ALLOW','ROLE','employee'),(113,'ClientRisk','*','READ','ALLOW','ROLE','trainee'),(114,'Receipt','*','READ','ALLOW','ROLE','trainee'),(115,'Receipt','*','WRITE','ALLOW','ROLE','administrative'),(116,'BankEntity','*','*','ALLOW','ROLE','employee'),(117,'ClientSample','*','*','ALLOW','ROLE','employee'),(118,'WorkerTeam','*','*','ALLOW','ROLE','salesPerson'),(119,'Travel','*','READ','ALLOW','ROLE','employee'),(120,'Travel','*','WRITE','ALLOW','ROLE','buyer'),(121,'Item','regularize','*','ALLOW','ROLE','employee'),(122,'TicketRequest','*','*','ALLOW','ROLE','employee'),(123,'Worker','*','*','ALLOW','ROLE','employee'),(124,'Client','confirmTransaction','WRITE','ALLOW','ROLE','administrative'),(125,'Agency','getAgenciesWithWarehouse','*','ALLOW','ROLE','employee'),(126,'Client','activeWorkersWithRole','*','ALLOW','ROLE','employee'),(127,'TicketLog','*','READ','ALLOW','ROLE','employee'),(129,'TicketService','*','*','ALLOW','ROLE','employee'),(130,'Expedition','*','WRITE','ALLOW','ROLE','packager'),(131,'CreditInsurance','*','READ','ALLOW','ROLE','trainee'),(132,'CreditClassification','*','READ','ALLOW','ROLE','trainee'),(133,'ItemTag','*','WRITE','ALLOW','ROLE','marketingBoss'),(135,'ZoneGeo','*','READ','ALLOW','ROLE','employee'),(136,'ZoneCalendar','*','READ','ALLOW','ROLE','employee'),(137,'ZoneIncluded','*','READ','ALLOW','ROLE','employee'),(138,'LabourHoliday','*','READ','ALLOW','ROLE','employee'),(139,'LabourHolidayLegend','*','READ','ALLOW','ROLE','employee'),(140,'LabourHolidayType','*','READ','ALLOW','ROLE','employee'),(141,'Zone','*','*','ALLOW','ROLE','deliveryBoss'),(142,'ZoneCalendar','*','WRITE','ALLOW','ROLE','deliveryBoss'),(143,'ZoneIncluded','*','*','ALLOW','ROLE','deliveryBoss'),(144,'Stowaway','*','*','ALLOW','ROLE','employee'),(145,'Ticket','getPossibleStowaways','READ','ALLOW','ROLE','employee'),(147,'UserConfigView','*','*','ALLOW','ROLE','employee'),(148,'UserConfigView','*','*','ALLOW','ROLE','employee'),(149,'Sip','*','READ','ALLOW','ROLE','employee'),(150,'Sip','*','WRITE','ALLOW','ROLE','hr'),(151,'Department','*','READ','ALLOW','ROLE','employee'),(152,'Department','*','WRITE','ALLOW','ROLE','hr'),(153,'Route','*','READ','ALLOW','ROLE','employee'),(154,'Route','*','WRITE','ALLOW','ROLE','delivery'),(155,'WorkerCalendar','*','READ','ALLOW','ROLE','hr'),(156,'WorkerLabour','*','READ','ALLOW','ROLE','hr'),(157,'WorkerCalendar','absences','READ','ALLOW','ROLE','employee'),(158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory'),(160,'TicketServiceType','*','READ','ALLOW','ROLE','employee'),(161,'TicketConfig','*','READ','ALLOW','ROLE','employee'),(162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing'),(163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing'),(164,'InvoiceOut','regenerate','WRITE','ALLOW','ROLE','invoicing'),(165,'TicketDms','*','READ','ALLOW','ROLE','employee'),(167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee'),(168,'Worker','mySubordinates','READ','ALLOW','ROLE','employee'),(169,'WorkerTimeControl','filter','READ','ALLOW','ROLE','employee'),(170,'WorkerTimeControl','addTime','WRITE','ALLOW','ROLE','employee'),(171,'TicketServiceType','*','WRITE','ALLOW','ROLE','administrative'),(172,'Sms','*','READ','ALLOW','ROLE','employee'),(173,'Sms','send','WRITE','ALLOW','ROLE','employee'),(174,'Agency','getLanded','READ','ALLOW','ROLE','employee'),(175,'Agency','getShipped','READ','ALLOW','ROLE','employee'),(176,'Device','*','*','ALLOW','ROLE','employee'),(177,'Device','*','*','ALLOW','ROLE','employee'),(178,'WorkerTimeControl','*','*','ALLOW','ROLE','employee'),(179,'ItemLog','*','READ','ALLOW','ROLE','employee'),(180,'RouteLog','*','READ','ALLOW','ROLE','employee'),(181,'Dms','removeFile','WRITE','ALLOW','ROLE','employee'),(182,'Dms','uploadFile','WRITE','ALLOW','ROLE','employee'),(183,'Dms','downloadFile','READ','ALLOW','ROLE','employee'),(184,'Client','uploadFile','WRITE','ALLOW','ROLE','employee'),(185,'ClientDms','removeFile','WRITE','ALLOW','ROLE','employee'),(186,'ClientDms','*','READ','ALLOW','ROLE','trainee'),(187,'Ticket','uploadFile','WRITE','ALLOW','ROLE','employee'),(188,'TicketDms','removeFile','WRITE','ALLOW','ROLE','employee'),(189,'TicketDms','*','READ','ALLOW','ROLE','employee'),(190,'Route','updateVolume','WRITE','ALLOW','ROLE','deliveryBoss'),(191,'Agency','getLanded','READ','ALLOW','ROLE','employee'),(192,'Agency','getShipped','READ','ALLOW','ROLE','employee'),(194,'Postcode','*','WRITE','ALLOW','ROLE','employee'),(195,'Ticket','addSale','WRITE','ALLOW','ROLE','employee'),(196,'Dms','updateFile','WRITE','ALLOW','ROLE','employee'),(197,'Dms','*','READ','ALLOW','ROLE','trainee'),(198,'ClaimDms','removeFile','WRITE','ALLOW','ROLE','employee'),(199,'ClaimDms','*','READ','ALLOW','ROLE','employee'),(200,'Claim','uploadFile','WRITE','ALLOW','ROLE','employee'),(201,'Sale','updateConcept','WRITE','ALLOW','ROLE','employee'),(202,'Claim','updateClaimAction','WRITE','ALLOW','ROLE','salesAssistant'),(203,'UserPhone','*','*','ALLOW','ROLE','employee'),(204,'WorkerDms','removeFile','WRITE','ALLOW','ROLE','hr'),(205,'WorkerDms','*','READ','ALLOW','ROLE','hr'),(206,'Chat','*','*','ALLOW','ROLE','employee'),(207,'Chat','sendMessage','*','ALLOW','ROLE','employee'),(208,'Sale','recalculatePrice','WRITE','ALLOW','ROLE','employee'),(209,'Ticket','recalculateComponents','WRITE','ALLOW','ROLE','employee'),(211,'TravelLog','*','READ','ALLOW','ROLE','buyer'),(212,'Thermograph','*','*','ALLOW','ROLE','buyer'),(213,'TravelThermograph','*','WRITE','ALLOW','ROLE','buyer'),(214,'Entry','*','*','ALLOW','ROLE','buyer'),(215,'TicketWeekly','*','WRITE','ALLOW','ROLE','buyer'),(216,'TravelThermograph','*','READ','ALLOW','ROLE','employee'),(218,'Intrastat','*','*','ALLOW','ROLE','buyer'),(219,'Account','acl','READ','ALLOW','ROLE','account'),(220,'Account','getCurrentUserData','READ','ALLOW','ROLE','account'),(221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','account'),(222,'Client','*','READ','ALLOW','ROLE','trainee'),(226,'ClientObservation','*','READ','ALLOW','ROLE','trainee'),(227,'Address','*','READ','ALLOW','ROLE','trainee'),(228,'AddressObservation','*','READ','ALLOW','ROLE','trainee'),(230,'ClientCredit','*','READ','ALLOW','ROLE','trainee'),(231,'ClientContact','*','READ','ALLOW','ROLE','trainee'),(232,'ClientSample','*','READ','ALLOW','ROLE','trainee'),(233,'EntryLog','*','READ','ALLOW','ROLE','buyer'),(234,'WorkerLog','*','READ','ALLOW','ROLE','hr'),(235,'CustomsAgent','*','*','ALLOW','ROLE','employee');
+INSERT INTO `ACL` VALUES (1,'Account','*','*','ALLOW','ROLE','employee'),(3,'Address','*','*','ALLOW','ROLE','employee'),(5,'AgencyService','*','READ','ALLOW','ROLE','employee'),(7,'Client','*','*','ALLOW','ROLE','employee'),(9,'ClientObservation','*','*','ALLOW','ROLE','employee'),(11,'ContactChannel','*','READ','ALLOW','ROLE','trainee'),(13,'Employee','*','READ','ALLOW','ROLE','employee'),(14,'PayMethod','*','READ','ALLOW','ROLE','trainee'),(16,'FakeProduction','*','READ','ALLOW','ROLE','employee'),(17,'Warehouse','* ','READ','ALLOW','ROLE','trainee'),(18,'State','*','READ','ALLOW','ROLE','employee'),(20,'TicketState','*','*','ALLOW','ROLE','employee'),(24,'Delivery','*','READ','ALLOW','ROLE','employee'),(25,'Zone','*','READ','ALLOW','ROLE','employee'),(26,'ClientCredit','*','*','ALLOW','ROLE','employee'),(27,'ClientCreditLimit','*','READ','ALLOW','ROLE','trainee'),(30,'GreugeType','*','READ','ALLOW','ROLE','trainee'),(31,'Mandate','*','READ','ALLOW','ROLE','trainee'),(32,'MandateType','*','READ','ALLOW','ROLE','trainee'),(33,'Company','*','READ','ALLOW','ROLE','trainee'),(34,'Greuge','*','READ','ALLOW','ROLE','trainee'),(35,'AddressObservation','*','*','ALLOW','ROLE','employee'),(36,'ObservationType','*','*','ALLOW','ROLE','employee'),(37,'Greuge','*','WRITE','ALLOW','ROLE','employee'),(38,'AgencyMode','*','READ','ALLOW','ROLE','employee'),(39,'ItemTag','*','WRITE','ALLOW','ROLE','buyer'),(40,'ItemBotanical','*','WRITE','ALLOW','ROLE','buyer'),(41,'ItemBotanical','*','READ','ALLOW','ROLE','employee'),(42,'ItemPlacement','*','WRITE','ALLOW','ROLE','buyer'),(43,'ItemPlacement','*','WRITE','ALLOW','ROLE','replenisher'),(44,'ItemPlacement','*','READ','ALLOW','ROLE','employee'),(45,'ItemBarcode','*','READ','ALLOW','ROLE','employee'),(46,'ItemBarcode','*','WRITE','ALLOW','ROLE','buyer'),(47,'ItemBarcode','*','WRITE','ALLOW','ROLE','replenisher'),(48,'ItemNiche','*','READ','ALLOW','ROLE','employee'),(49,'ItemNiche','*','WRITE','ALLOW','ROLE','buyer'),(50,'ItemNiche','*','WRITE','ALLOW','ROLE','replenisher'),(51,'ItemTag','*','READ','ALLOW','ROLE','employee'),(53,'Item','*','READ','ALLOW','ROLE','employee'),(54,'Item','*','WRITE','ALLOW','ROLE','buyer'),(55,'Recovery','*','READ','ALLOW','ROLE','trainee'),(56,'Recovery','*','WRITE','ALLOW','ROLE','administrative'),(58,'CreditClassification','*','*','ALLOW','ROLE','insurance'),(60,'CreditInsurance','*','*','ALLOW','ROLE','insurance'),(61,'InvoiceOut','*','READ','ALLOW','ROLE','employee'),(62,'Ticket','*','*','ALLOW','ROLE','employee'),(63,'TicketObservation','*','*','ALLOW','ROLE','employee'),(64,'Route','*','READ','ALLOW','ROLE','employee'),(65,'Sale','*','READ','ALLOW','ROLE','employee'),(66,'TicketTracking','*','READ','ALLOW','ROLE','employee'),(68,'TicketPackaging','*','*','ALLOW','ROLE','employee'),(69,'Packaging','*','READ','ALLOW','ROLE','employee'),(70,'Packaging','*','WRITE','ALLOW','ROLE','logistic'),(71,'SaleChecked','*','READ','ALLOW','ROLE','employee'),(72,'SaleComponent','*','READ','ALLOW','ROLE','employee'),(73,'Expedition','*','READ','ALLOW','ROLE','employee'),(74,'Expedition','*','WRITE','ALLOW','ROLE','deliveryBoss'),(75,'Expedition','*','WRITE','ALLOW','ROLE','production'),(76,'AnnualAverageInvoiced','*','READ','ALLOW','ROLE','employee'),(77,'WorkerMana','*','READ','ALLOW','ROLE','employee'),(78,'TicketTracking','*','WRITE','ALLOW','ROLE','production'),(79,'TicketTracking','changeState','*','ALLOW','ROLE','employee'),(80,'Sale','deleteSales','*','ALLOW','ROLE','employee'),(81,'Sale','moveToTicket','*','ALLOW','ROLE','employee'),(82,'Sale','updateQuantity','*','ALLOW','ROLE','employee'),(83,'Sale','updatePrice','*','ALLOW','ROLE','employee'),(84,'Sale','updateDiscount','*','ALLOW','ROLE','employee'),(85,'SaleTracking','*','READ','ALLOW','ROLE','employee'),(86,'Order','*','*','ALLOW','ROLE','employee'),(87,'OrderRow','*','*','ALLOW','ROLE','employee'),(88,'ClientContact','*','*','ALLOW','ROLE','employee'),(89,'Sale','moveToNewTicket','*','ALLOW','ROLE','employee'),(90,'Sale','reserve','*','ALLOW','ROLE','employee'),(91,'TicketWeekly','*','READ','ALLOW','ROLE','employee'),(94,'Agency','landsThatDay','*','ALLOW','ROLE','employee'),(96,'ClaimEnd','*','READ','ALLOW','ROLE','employee'),(97,'ClaimEnd','*','WRITE','ALLOW','ROLE','salesAssistant'),(98,'ClaimBeginning','*','*','ALLOW','ROLE','employee'),(99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee'),(100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','salesAssistant'),(101,'Claim','*','*','ALLOW','ROLE','employee'),(102,'Claim','createFromSales','*','ALLOW','ROLE','employee'),(103,'ClaimEnd','importTicketSales','WRITE','ALLOW','ROLE','salesAssistant'),(104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss'),(105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss'),(106,'ItemBotanical','*','WRITE','ALLOW','ROLE','marketingBoss'),(107,'ItemNiche','*','WRITE','ALLOW','ROLE','marketingBoss'),(108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'),(109,'UserConfig','*','*','ALLOW','ROLE','employee'),(110,'Bank','*','READ','ALLOW','ROLE','trainee'),(111,'ClientLog','*','READ','ALLOW','ROLE','trainee'),(112,'Defaulter','*','READ','ALLOW','ROLE','employee'),(113,'ClientRisk','*','READ','ALLOW','ROLE','trainee'),(114,'Receipt','*','READ','ALLOW','ROLE','trainee'),(115,'Receipt','*','WRITE','ALLOW','ROLE','administrative'),(116,'BankEntity','*','*','ALLOW','ROLE','employee'),(117,'ClientSample','*','*','ALLOW','ROLE','employee'),(118,'WorkerTeam','*','*','ALLOW','ROLE','salesPerson'),(119,'Travel','*','READ','ALLOW','ROLE','employee'),(120,'Travel','*','WRITE','ALLOW','ROLE','buyer'),(121,'Item','regularize','*','ALLOW','ROLE','employee'),(122,'TicketRequest','*','*','ALLOW','ROLE','employee'),(123,'Worker','*','*','ALLOW','ROLE','employee'),(124,'Client','confirmTransaction','WRITE','ALLOW','ROLE','administrative'),(125,'Agency','getAgenciesWithWarehouse','*','ALLOW','ROLE','employee'),(126,'Client','activeWorkersWithRole','*','ALLOW','ROLE','employee'),(127,'TicketLog','*','READ','ALLOW','ROLE','employee'),(129,'TicketService','*','*','ALLOW','ROLE','employee'),(130,'Expedition','*','WRITE','ALLOW','ROLE','packager'),(131,'CreditInsurance','*','READ','ALLOW','ROLE','trainee'),(132,'CreditClassification','*','READ','ALLOW','ROLE','trainee'),(133,'ItemTag','*','WRITE','ALLOW','ROLE','marketingBoss'),(135,'ZoneGeo','*','READ','ALLOW','ROLE','employee'),(136,'ZoneCalendar','*','READ','ALLOW','ROLE','employee'),(137,'ZoneIncluded','*','READ','ALLOW','ROLE','employee'),(138,'LabourHoliday','*','READ','ALLOW','ROLE','employee'),(139,'LabourHolidayLegend','*','READ','ALLOW','ROLE','employee'),(140,'LabourHolidayType','*','READ','ALLOW','ROLE','employee'),(141,'Zone','*','*','ALLOW','ROLE','deliveryBoss'),(142,'ZoneCalendar','*','WRITE','ALLOW','ROLE','deliveryBoss'),(143,'ZoneIncluded','*','*','ALLOW','ROLE','deliveryBoss'),(144,'Stowaway','*','*','ALLOW','ROLE','employee'),(145,'Ticket','getPossibleStowaways','READ','ALLOW','ROLE','employee'),(147,'UserConfigView','*','*','ALLOW','ROLE','employee'),(148,'UserConfigView','*','*','ALLOW','ROLE','employee'),(149,'Sip','*','READ','ALLOW','ROLE','employee'),(150,'Sip','*','WRITE','ALLOW','ROLE','hr'),(151,'Department','*','READ','ALLOW','ROLE','employee'),(152,'Department','*','WRITE','ALLOW','ROLE','hr'),(153,'Route','*','READ','ALLOW','ROLE','employee'),(154,'Route','*','WRITE','ALLOW','ROLE','delivery'),(155,'Calendar','*','READ','ALLOW','ROLE','hr'),(156,'WorkerLabour','*','READ','ALLOW','ROLE','hr'),(157,'Calendar','absences','READ','ALLOW','ROLE','employee'),(158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory'),(160,'TicketServiceType','*','READ','ALLOW','ROLE','employee'),(161,'TicketConfig','*','READ','ALLOW','ROLE','employee'),(162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing'),(163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing'),(164,'InvoiceOut','regenerate','WRITE','ALLOW','ROLE','invoicing'),(165,'TicketDms','*','READ','ALLOW','ROLE','employee'),(167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee'),(168,'Worker','mySubordinates','READ','ALLOW','ROLE','employee'),(169,'WorkerTimeControl','filter','READ','ALLOW','ROLE','employee'),(170,'WorkerTimeControl','addTime','WRITE','ALLOW','ROLE','employee'),(171,'TicketServiceType','*','WRITE','ALLOW','ROLE','administrative'),(172,'Sms','*','READ','ALLOW','ROLE','employee'),(173,'Sms','send','WRITE','ALLOW','ROLE','employee'),(174,'Agency','getLanded','READ','ALLOW','ROLE','employee'),(175,'Agency','getShipped','READ','ALLOW','ROLE','employee'),(176,'Device','*','*','ALLOW','ROLE','employee'),(177,'Device','*','*','ALLOW','ROLE','employee'),(178,'WorkerTimeControl','*','*','ALLOW','ROLE','employee'),(179,'ItemLog','*','READ','ALLOW','ROLE','employee'),(180,'RouteLog','*','READ','ALLOW','ROLE','employee'),(181,'Dms','removeFile','WRITE','ALLOW','ROLE','employee'),(182,'Dms','uploadFile','WRITE','ALLOW','ROLE','employee'),(183,'Dms','downloadFile','READ','ALLOW','ROLE','employee'),(184,'Client','uploadFile','WRITE','ALLOW','ROLE','employee'),(185,'ClientDms','removeFile','WRITE','ALLOW','ROLE','employee'),(186,'ClientDms','*','READ','ALLOW','ROLE','trainee'),(187,'Ticket','uploadFile','WRITE','ALLOW','ROLE','employee'),(188,'TicketDms','removeFile','WRITE','ALLOW','ROLE','employee'),(189,'TicketDms','*','READ','ALLOW','ROLE','employee'),(190,'Route','updateVolume','WRITE','ALLOW','ROLE','deliveryBoss'),(191,'Agency','getLanded','READ','ALLOW','ROLE','employee'),(192,'Agency','getShipped','READ','ALLOW','ROLE','employee'),(194,'Postcode','*','WRITE','ALLOW','ROLE','employee'),(195,'Ticket','addSale','WRITE','ALLOW','ROLE','employee'),(196,'Dms','updateFile','WRITE','ALLOW','ROLE','employee'),(197,'Dms','*','READ','ALLOW','ROLE','trainee'),(198,'ClaimDms','removeFile','WRITE','ALLOW','ROLE','employee'),(199,'ClaimDms','*','READ','ALLOW','ROLE','employee'),(200,'Claim','uploadFile','WRITE','ALLOW','ROLE','employee'),(201,'Sale','updateConcept','WRITE','ALLOW','ROLE','employee'),(202,'Claim','updateClaimAction','WRITE','ALLOW','ROLE','salesAssistant'),(203,'UserPhone','*','*','ALLOW','ROLE','employee'),(204,'WorkerDms','removeFile','WRITE','ALLOW','ROLE','hr'),(205,'WorkerDms','*','READ','ALLOW','ROLE','hr'),(206,'Chat','*','*','ALLOW','ROLE','employee'),(207,'Chat','sendMessage','*','ALLOW','ROLE','employee'),(208,'Sale','recalculatePrice','WRITE','ALLOW','ROLE','employee'),(209,'Ticket','recalculateComponents','WRITE','ALLOW','ROLE','employee'),(211,'TravelLog','*','READ','ALLOW','ROLE','buyer'),(212,'Thermograph','*','*','ALLOW','ROLE','buyer'),(213,'TravelThermograph','*','WRITE','ALLOW','ROLE','buyer'),(214,'Entry','*','*','ALLOW','ROLE','buyer'),(215,'TicketWeekly','*','WRITE','ALLOW','ROLE','buyer'),(216,'TravelThermograph','*','READ','ALLOW','ROLE','employee'),(218,'Intrastat','*','*','ALLOW','ROLE','buyer'),(219,'Account','acl','READ','ALLOW','ROLE','account'),(220,'Account','getCurrentUserData','READ','ALLOW','ROLE','account'),(221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','account'),(222,'Client','*','READ','ALLOW','ROLE','trainee'),(226,'ClientObservation','*','READ','ALLOW','ROLE','trainee'),(227,'Address','*','READ','ALLOW','ROLE','trainee'),(228,'AddressObservation','*','READ','ALLOW','ROLE','trainee'),(230,'ClientCredit','*','READ','ALLOW','ROLE','trainee'),(231,'ClientContact','*','READ','ALLOW','ROLE','trainee'),(232,'ClientSample','*','READ','ALLOW','ROLE','trainee'),(233,'EntryLog','*','READ','ALLOW','ROLE','buyer'),(234,'WorkerLog','*','READ','ALLOW','ROLE','hr'),(235,'CustomsAgent','*','*','ALLOW','ROLE','employee'),(236,'Buy','*','*','ALLOW','ROLE','buyer');
/*!40000 ALTER TABLE `ACL` ENABLE KEYS */;
UNLOCK TABLES;
@@ -142,7 +142,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:02
+-- Dump completed on 2020-09-09 11:46:30
USE `vn`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -227,7 +227,7 @@ UNLOCK TABLES;
LOCK TABLES `tag` WRITE;
/*!40000 ALTER TABLE `tag` DISABLE KEYS */;
-INSERT INTO `tag` VALUES (1,'color','Color',0,0,'ink',NULL,NULL),(2,NULL,'Forma',1,0,NULL,NULL,NULL),(3,NULL,'Material',1,0,NULL,NULL,NULL),(4,NULL,'Longitud',1,1,NULL,'mm',NULL),(5,NULL,'Diámetro',1,1,NULL,'mm',NULL),(6,NULL,'Perímetro',1,1,NULL,'mm',NULL),(7,NULL,'Ancho de la base',1,1,NULL,'mm',NULL),(8,NULL,'Altura',1,1,NULL,'mm',NULL),(9,NULL,'Volumen',1,1,NULL,'ml',NULL),(10,NULL,'Densidad',1,1,NULL,NULL,NULL),(11,NULL,'Calidad',1,0,NULL,NULL,NULL),(12,NULL,'Textura',1,0,NULL,NULL,NULL),(13,NULL,'Material del mango',1,0,NULL,NULL,NULL),(14,NULL,'Compra mínima',1,0,NULL,NULL,NULL),(15,NULL,'Nº pétalos',1,1,NULL,NULL,NULL),(16,NULL,'Ancho',1,1,NULL,'mm',NULL),(18,NULL,'Profundidad',1,1,NULL,'mm',NULL),(19,NULL,'Largo',1,1,NULL,'mm',NULL),(20,NULL,'Ancho superior',1,1,NULL,'mm',NULL),(21,NULL,'Ancho inferior',1,1,NULL,'mm',NULL),(22,NULL,'Gramaje',1,1,NULL,'g',NULL),(23,'stems','Tallos',1,1,NULL,NULL,NULL),(24,NULL,'Estado',1,0,NULL,NULL,NULL),(25,NULL,'Color principal',0,0,'ink',NULL,NULL),(26,NULL,'Color secundario',0,0,'ink',NULL,NULL),(27,NULL,'Longitud(cm)',1,1,NULL,'cm',NULL),(28,NULL,'Diámetro base',1,1,'','mm',NULL),(29,NULL,'Colección',1,0,NULL,NULL,NULL),(30,NULL,'Uds / caja',1,1,NULL,NULL,NULL),(31,NULL,'Contenido',1,0,NULL,NULL,NULL),(32,NULL,'Peso',1,1,NULL,'g',NULL),(33,NULL,'Grosor',1,1,NULL,'mm',NULL),(34,NULL,'Marca',1,0,NULL,NULL,NULL),(35,'origin','Origen',0,0,'origin',NULL,NULL),(36,NULL,'Proveedor',1,0,NULL,NULL,NULL),(37,'producer','Productor',0,0,'producer',NULL,NULL),(38,NULL,'Duración',1,1,NULL,'s',NULL),(39,NULL,'Flor',1,0,NULL,NULL,NULL),(40,NULL,'Soporte',1,0,NULL,NULL,NULL),(41,NULL,'Tamaño flor',1,0,NULL,NULL,NULL),(42,NULL,'Apertura',1,0,NULL,NULL,NULL),(43,NULL,'Tallo',1,0,NULL,NULL,NULL),(44,NULL,'Nº hojas',1,1,NULL,NULL,NULL),(45,NULL,'Dimensiones',1,0,NULL,NULL,NULL),(46,NULL,'Diámetro boca',1,1,NULL,'mm',NULL),(47,NULL,'Nº flores',1,1,NULL,NULL,NULL),(48,NULL,'Uds / paquete',1,1,NULL,NULL,NULL),(49,NULL,'Maceta',1,1,NULL,'cm',NULL),(50,NULL,'Textura flor',1,0,NULL,NULL,NULL),(51,NULL,'Textura hoja',1,0,NULL,NULL,NULL),(52,NULL,'Tipo de IVA',1,0,NULL,NULL,NULL),(53,NULL,'Tronco',1,0,NULL,NULL,NULL),(54,NULL,'Hoja',1,0,NULL,NULL,NULL),(55,NULL,'Formato',1,0,NULL,NULL,NULL),(56,NULL,'Genero',1,0,NULL,NULL,NULL),(57,NULL,'Especie',1,0,NULL,NULL,NULL),(58,NULL,'Variedad',1,0,NULL,NULL,NULL),(59,NULL,'Medida grande',1,0,NULL,NULL,NULL),(60,NULL,'Medida mediano',1,0,NULL,NULL,NULL),(61,NULL,'Medida pequeño',1,0,NULL,NULL,NULL),(63,NULL,'Recipiente interior',1,0,NULL,NULL,NULL),(64,NULL,'Material secundario',1,0,NULL,NULL,NULL),(65,NULL,'Colores',1,0,NULL,NULL,NULL),(66,NULL,'Referencia',1,0,NULL,NULL,NULL),(67,'category','Categoria',1,0,NULL,NULL,NULL),(68,NULL,'Amb',1,0,NULL,NULL,NULL),(69,NULL,'Anchura',1,1,NULL,'cm',NULL),(70,NULL,'Hueco interior',1,0,NULL,NULL,NULL),(71,NULL,'Tamaño',1,0,NULL,NULL,NULL),(72,NULL,'Color botón',1,0,NULL,NULL,NULL),(73,NULL,'Tamaño minimo del botón',1,0,NULL,NULL,NULL),(74,NULL,'Obtentor',1,0,NULL,NULL,NULL),(75,NULL,'Longitud del brote',1,0,NULL,NULL,NULL),(76,NULL,'Tallos / u.v.',1,0,NULL,NULL,NULL),(77,NULL,'Madera de',1,0,NULL,NULL,NULL),(78,NULL,'Unidad de venta',1,0,NULL,NULL,NULL),(79,NULL,'Temporal',1,0,NULL,NULL,NULL),(80,NULL,'Gramaje/tallo',1,1,NULL,'g',NULL),(81,NULL,'Peso/paquete',1,1,NULL,'g',NULL),(82,NULL,'Flexibilidad del tallo',1,0,NULL,NULL,NULL),(83,NULL,'Nº planchas',1,1,NULL,NULL,NULL),(84,NULL,'Nº páginas',1,1,NULL,NULL,NULL),(85,NULL,'Editorial',1,0,NULL,NULL,NULL),(86,NULL,'Idioma',1,0,NULL,NULL,NULL),(87,NULL,'Fecha publicación',1,0,NULL,NULL,NULL),(88,NULL,'Cubierta',1,0,NULL,NULL,NULL),(89,NULL,'Encuadernación',1,0,NULL,NULL,NULL),(90,NULL,'Autor',1,0,NULL,NULL,NULL),(91,NULL,'Envoltorio',1,0,NULL,NULL,NULL),(92,NULL,'Nombre temporal',1,0,NULL,NULL,NULL),(93,NULL,'Modelo',1,0,NULL,NULL,NULL),(94,NULL,'Producto',1,0,NULL,NULL,NULL),(95,NULL,'Título',1,0,NULL,NULL,NULL),(96,NULL,'Tomo',1,0,NULL,NULL,NULL),(97,NULL,'Articulo',1,0,NULL,NULL,NULL),(98,NULL,'Metodo de cultivo',1,0,NULL,NULL,NULL),(99,NULL,'Edad',1,0,NULL,NULL,NULL),(100,NULL,'Agotado',1,0,NULL,NULL,NULL),(101,NULL,'Altura con asa',1,1,NULL,'cm',NULL),(102,NULL,'Nº tallos',1,1,NULL,NULL,NULL),(103,NULL,'Cultivo',1,0,NULL,NULL,NULL),(104,NULL,'Sabor',1,0,NULL,NULL,NULL),(105,NULL,'Talla',1,0,NULL,NULL,NULL),(106,NULL,'Calibre',1,1,NULL,NULL,NULL),(107,NULL,'Dulzura',1,1,NULL,'bx',NULL),(108,NULL,'Piezas',1,0,NULL,NULL,NULL),(109,NULL,'Altura con patas',1,0,NULL,NULL,NULL),(110,NULL,'Envase',1,0,NULL,NULL,NULL),(111,NULL,'Nº piezas',1,0,NULL,NULL,NULL),(112,NULL,'Uso',1,0,NULL,'cm',NULL),(113,NULL,'Color luz',1,0,NULL,NULL,NULL),(114,NULL,'Capacidad',1,0,NULL,NULL,NULL),(115,NULL,'fout kenmerk',1,0,NULL,NULL,NULL),(116,NULL,'Potinhoud',1,0,NULL,NULL,NULL),(117,NULL,'Marketingconcept',1,0,NULL,NULL,NULL),(118,NULL,'Leeftijd',1,0,NULL,NULL,NULL),(119,NULL,'Uitgangsmateriaal',1,0,NULL,NULL,NULL),(120,NULL,'Kleurbehandeld',1,0,NULL,NULL,NULL),(121,NULL,'Verzorging: Standplaats',1,0,NULL,NULL,NULL),(122,NULL,'Verzorging: Water',1,0,NULL,NULL,NULL),(123,NULL,'Verzorging: Voeding',1,0,NULL,NULL,NULL),(124,NULL,'Verzorging: Temperatuur',1,0,NULL,NULL,NULL),(125,NULL,'Verzorging: Specifieke in',1,0,NULL,NULL,NULL),(126,NULL,'Verzorging: Consumptie',1,0,NULL,NULL,NULL),(127,NULL,'Nabehandeling',1,0,NULL,NULL,NULL),(128,NULL,'Artikel beeld',1,0,NULL,NULL,NULL),(129,NULL,'Hoofdkleur 1',1,0,NULL,NULL,NULL),(130,NULL,'Hoofdkleur 2',1,0,NULL,NULL,NULL),(131,NULL,'RHS hoofdkleur 1',1,0,NULL,NULL,NULL),(132,NULL,'RHS hoofdkleur 2',1,0,NULL,NULL,NULL),(133,NULL,'Hoofdkleur 1 blad',1,0,NULL,NULL,NULL),(134,NULL,'Hoofdkleur 2 blad',1,0,NULL,NULL,NULL),(135,NULL,'RHS hoofdkleur 1 blad',1,0,NULL,NULL,NULL),(136,NULL,'RHS hoofdkleur 2 blad',1,0,NULL,NULL,NULL),(137,NULL,'Botanisch beeld',1,0,NULL,NULL,NULL),(138,NULL,'Hoofdkleur bes/vrucht',1,0,NULL,NULL,NULL),(139,NULL,'RHS hoofdkleur bes/vrucht',1,0,NULL,NULL,NULL),(140,NULL,'UPOV hoofdkleur 1 bloem',1,0,NULL,NULL,NULL),(141,NULL,'UPOV hoofdkleur 2 bloem',1,0,NULL,NULL,NULL),(142,NULL,'UPOV hoofdkleur 1 blad',1,0,NULL,NULL,NULL),(143,NULL,'UPOV hoofdkleur 2 blad',1,0,NULL,NULL,NULL),(144,NULL,'UPOV hoofdkleur bes/vruch',1,0,NULL,NULL,NULL),(145,NULL,'Negatieve keurcode 1',1,0,NULL,NULL,NULL),(146,NULL,'Negatieve keurcode 2',1,0,NULL,NULL,NULL),(147,NULL,'Bedrijfskenmerk fytosanit',1,0,NULL,NULL,NULL),(148,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,NULL),(149,NULL,'Certificaten MPS-TraceCer',1,0,NULL,NULL,NULL),(150,NULL,'Overige leveranciersinfor',1,0,NULL,NULL,NULL),(151,NULL,'Certificaten MPS-GAP',1,0,NULL,NULL,NULL),(152,NULL,'Betrouwbaarheidsindex kla',1,0,NULL,NULL,NULL),(153,NULL,'Betrouwbaarheidsindex waa',1,0,NULL,NULL,NULL),(154,NULL,'Productkwaliteitslabel',1,0,NULL,NULL,NULL),(155,NULL,'Label Fair Flowers Fair P',1,0,NULL,NULL,NULL),(156,NULL,'Certificaten Socialy Qual',1,0,NULL,NULL,NULL),(157,NULL,'Certificaten GlobalGAP',1,0,NULL,NULL,NULL),(158,NULL,'Certificaten MPS Quality',1,0,NULL,NULL,NULL),(159,NULL,'Certificaten biologisch',1,0,NULL,NULL,NULL),(160,NULL,'Certificaten eetbare prod',1,0,NULL,NULL,NULL),(161,NULL,'Certificaten Florimark',1,0,NULL,NULL,NULL),(162,NULL,'Certificaten Milieukeur',1,0,NULL,NULL,NULL),(163,NULL,'Certificaten Kenya Flower',1,0,NULL,NULL,NULL),(164,NULL,'Certificaten Fairtrade',1,0,NULL,NULL,NULL),(165,NULL,'Keurmerk MPS-ProductProof',1,0,NULL,NULL,NULL),(166,NULL,'Certificaten ISO',1,0,NULL,NULL,NULL),(167,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,NULL),(168,NULL,'Certificaten Florverde',1,0,NULL,NULL,NULL),(169,NULL,'Certificaten Ethical Trad',1,0,NULL,NULL,NULL),(170,NULL,'Certificaten Ethiopian EH',1,0,NULL,NULL,NULL),(171,NULL,'Certificaten gewasbescher',1,0,NULL,NULL,NULL),(172,NULL,'Certificaten SAN',1,0,NULL,NULL,NULL),(173,NULL,'Certificaten GRASP',1,0,NULL,NULL,NULL),(174,NULL,'Label Fair Flora',1,0,NULL,NULL,NULL),(175,NULL,'Fust',1,0,NULL,NULL,NULL),(176,NULL,'Stapelwagen',1,0,NULL,NULL,NULL),(177,NULL,'Aantal legborden veilings',1,0,NULL,NULL,NULL),(178,NULL,'Aantal legborden Deense s',1,0,NULL,NULL,NULL),(179,NULL,'Aantal onderstellen Deens',1,0,NULL,NULL,NULL),(180,NULL,'Fustsoort',1,0,NULL,NULL,NULL),(181,NULL,'Fustmateriaal',1,0,NULL,NULL,NULL),(182,NULL,'Aantal legborden Eurostap',1,0,NULL,NULL,NULL),(183,NULL,'Aantal onderstellen Euros',1,0,NULL,NULL,NULL),(184,NULL,'Tallos por paquete',1,0,NULL,NULL,NULL),(185,NULL,'Aantal bossen per bundel',1,0,NULL,NULL,NULL),(186,NULL,'Aantal stuks per fust',1,0,NULL,NULL,NULL),(187,NULL,'Aantal bossen per fust',1,0,NULL,NULL,NULL),(188,NULL,'Aantal bundels per fust',1,0,NULL,NULL,NULL),(189,NULL,'Aantal bossen per hoes',1,0,NULL,NULL,NULL),(190,NULL,'Aantal bundels per hoes',1,0,NULL,NULL,NULL),(191,NULL,'Fustlabel',1,0,NULL,NULL,NULL),(192,NULL,'Karlabel',1,0,NULL,NULL,NULL),(193,NULL,'Service productlabel',1,0,NULL,NULL,NULL),(194,NULL,'Service fustlabel',1,0,NULL,NULL,NULL),(195,NULL,'Service karlabel',1,0,NULL,NULL,NULL),(196,NULL,'Aantal fusten per laag',1,0,NULL,NULL,NULL),(197,NULL,'Presentatie per schapm2',1,0,NULL,NULL,NULL),(198,NULL,'Positieve keurcode fytosa',1,0,NULL,NULL,NULL),(199,NULL,'Positieve keurcode kwalit',1,0,NULL,NULL,NULL),(200,NULL,'Positieve keurcode veilin',1,0,NULL,NULL,NULL),(201,NULL,'Potmaat',1,0,NULL,NULL,NULL),(202,NULL,'Minimum planthoogte',1,0,NULL,NULL,NULL),(203,NULL,'Min aantal stekken/plante',1,0,NULL,NULL,NULL),(204,NULL,'Minimum plantdiameter',1,0,NULL,NULL,NULL),(205,NULL,'Apertura',1,0,NULL,NULL,NULL),(206,NULL,'Combinatiehoogte',1,0,NULL,NULL,NULL),(207,NULL,'Min aantal koppen hoogste',1,0,NULL,NULL,NULL),(208,NULL,'Dikte',1,0,NULL,NULL,NULL),(209,NULL,'Min aantal bloemen/bloeiw',1,0,NULL,NULL,NULL),(210,NULL,'Min aantal bloemtrossen p',1,0,NULL,NULL,NULL),(211,NULL,'Minimum aantal takken per',1,0,NULL,NULL,NULL),(212,NULL,'Minimum aantal bollen per',1,0,NULL,NULL,NULL),(213,NULL,'Minimum aantal bladeren p',1,0,NULL,NULL,NULL),(214,NULL,'Minimum stamhoogte',1,0,NULL,NULL,NULL),(215,NULL,'Transporthoogte',1,0,NULL,NULL,NULL),(216,NULL,'Lengte scheuten',1,0,NULL,NULL,NULL),(217,NULL,'Min aant vertakkingen pr ',1,0,NULL,NULL,NULL),(218,NULL,'Minimum bloemknophoogte',1,0,NULL,NULL,NULL),(219,NULL,'Altura min.',1,0,NULL,NULL,NULL),(220,NULL,'Gewicht (gemiddeld)',1,0,NULL,NULL,NULL),(221,NULL,'Aantal bloemknoppen snijb',1,0,NULL,NULL,NULL),(222,NULL,'Minimum bloemdiameter',1,0,NULL,NULL,NULL),(223,NULL,'Minimum bloemschedelengte',1,0,NULL,NULL,NULL),(224,NULL,'Aantal bloemkoppen per tr',1,0,NULL,NULL,NULL),(225,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,NULL),(226,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,NULL),(227,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,NULL),(228,NULL,'Minimum bloeiwijzelengte',1,0,NULL,NULL,NULL),(229,NULL,'Verpakkingswijze snijbloe',1,0,NULL,NULL,NULL),(230,NULL,'Minimum aant bloemen per ',1,0,NULL,NULL,NULL),(231,NULL,'Minimum ranklengte',1,0,NULL,NULL,NULL),(232,NULL,'Jaartal sortering hout',1,0,NULL,NULL,NULL),(233,NULL,'Minimum bladdiameter',1,0,NULL,NULL,NULL),(234,NULL,'Minimum bundelgewicht',1,0,NULL,NULL,NULL),(235,NULL,'Maximum planthoogte',1,0,NULL,NULL,NULL),(236,NULL,'Maximum plantdiameter',1,0,NULL,NULL,NULL),(237,NULL,'Max aantal bloemen/bloeiw',1,0,NULL,NULL,NULL),(238,NULL,'Maximum aantal takken per',1,0,NULL,NULL,NULL),(239,NULL,'Maximum aantal bollen per',1,0,NULL,NULL,NULL),(240,NULL,'Maximum stamhoogte',1,0,NULL,NULL,NULL),(241,NULL,'Altura max.',1,0,NULL,NULL,NULL),(242,NULL,'Maximum aantal knoppen sn',1,0,NULL,NULL,NULL),(243,NULL,'Maximum bloemdiameter',1,0,NULL,NULL,NULL),(244,NULL,'Maximum bloeiwijzelengte',1,0,NULL,NULL,NULL),(245,NULL,'Aantal vruchten / trossen',1,0,NULL,NULL,NULL),(246,NULL,'Verpakkingswijze',1,0,NULL,NULL,NULL),(247,NULL,'Minimum vruchtdiameter',1,0,NULL,NULL,NULL),(248,NULL,'Bolomvang',1,0,NULL,NULL,NULL),(249,NULL,'Bloem/bes/vruchtkleur 1',1,0,NULL,NULL,NULL),(250,NULL,'Potvorm',1,0,NULL,NULL,NULL),(251,NULL,'Potkleur',1,0,NULL,NULL,NULL),(252,NULL,'Potmateriaal',1,0,NULL,NULL,NULL),(253,NULL,'Plantvorm',1,0,NULL,NULL,NULL),(254,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,NULL),(255,NULL,'Teeltwijze',1,0,NULL,NULL,NULL),(256,NULL,'Teeltmedium',1,0,NULL,NULL,NULL),(257,NULL,'Hoesmateriaal',1,0,NULL,NULL,NULL),(258,NULL,'Hoesvorm',1,0,NULL,NULL,NULL),(259,NULL,'Hoesbedrukking algemeen',1,0,NULL,NULL,NULL),(260,NULL,'Extra toevoegingen',1,0,NULL,NULL,NULL),(261,NULL,'Land van herkomst (bedrij',1,0,NULL,NULL,NULL),(262,NULL,'Verpakte orchidee',1,0,NULL,NULL,NULL),(263,NULL,'Hoesbedrukking extra',1,0,NULL,NULL,NULL),(264,NULL,'Voorbehandeling',1,0,NULL,NULL,NULL),(265,NULL,'Overige niet in pot',1,0,NULL,NULL,NULL),(266,NULL,'Vorm snijbloemen',1,0,NULL,NULL,NULL),(267,NULL,'Buigzaamheid bloemsteel',1,0,NULL,NULL,NULL),(268,NULL,'Hoeskleur',1,0,NULL,NULL,NULL),(269,NULL,'Extra deco materiaal',1,0,NULL,NULL,NULL),(270,NULL,'Productkleur',1,0,NULL,NULL,NULL),(271,NULL,'Productmateriaal',1,0,NULL,NULL,NULL),(272,NULL,'Materiaalhoogte',1,0,NULL,NULL,NULL),(273,NULL,'Materiaaldiameter',1,0,NULL,NULL,NULL),(274,NULL,'Barcode',1,0,NULL,NULL,NULL),(275,NULL,'Productlabel',1,0,NULL,NULL,NULL),(276,NULL,'Eetbaar/ niet eetbaar',1,0,NULL,NULL,NULL),(277,NULL,'Plantmaat zonder pot',1,0,NULL,NULL,NULL),(278,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,NULL),(279,NULL,'Maximum percentage oud ho',1,0,NULL,NULL,NULL),(280,NULL,'Maximum lengte verschil',1,0,NULL,NULL,NULL),(281,NULL,'Bladkleur',1,0,NULL,NULL,NULL),(282,NULL,'Plantgewicht',1,0,NULL,NULL,NULL),(283,NULL,'Gemiddelde bloemdiameter',1,0,NULL,NULL,NULL),(284,NULL,'Bloem/bes/vruchtkleur 2',1,0,NULL,NULL,NULL),(285,NULL,'Winterhardheid (USDA zone',1,0,NULL,NULL,NULL),(286,NULL,'Kleurbehandeld',1,0,NULL,NULL,NULL),(287,NULL,'Bloem-/bladkleurverdeling',1,0,NULL,NULL,NULL),(288,NULL,'Minimum bloemknopdiameter',1,0,NULL,NULL,NULL),(289,NULL,'Volume inhoud',1,0,NULL,NULL,NULL),(290,NULL,'Vruchtbenaming',1,0,NULL,NULL,NULL),(291,NULL,'Vaaslevenindex',1,0,NULL,NULL,NULL),(292,NULL,'Overige informatie plante',1,0,NULL,NULL,NULL),(293,NULL,'Overige informatie snijbl',1,0,NULL,NULL,NULL),(294,NULL,'Toepassingsmogelijkheid',1,0,NULL,NULL,NULL),(295,NULL,'Productbeeld aanvoerder',1,0,NULL,NULL,NULL),(296,NULL,'MPS certificering',1,0,NULL,NULL,NULL),(297,NULL,'Kwaliteitsgroep',1,0,NULL,NULL,NULL),(298,NULL,'Artikelomschrijving',1,0,NULL,NULL,NULL),(299,NULL,'BTW-tarief',1,0,NULL,NULL,NULL),(300,NULL,'Prijseenheid',1,0,NULL,NULL,NULL),(301,NULL,'Transactievorm',1,0,NULL,NULL,NULL),(302,NULL,'Handelsverpakking voorwaa',1,0,NULL,NULL,NULL),(303,NULL,'Consumentenverpakking voo',1,0,NULL,NULL,NULL),(304,NULL,'Leveringsvoorwaarden',1,0,NULL,NULL,NULL),(305,NULL,'PT heffing voorwaarden',1,0,NULL,NULL,NULL),(306,NULL,'Serviceheffing voorwaarde',1,0,NULL,NULL,NULL),(307,NULL,'Algemene voorwaarden',1,0,NULL,NULL,NULL),(308,NULL,'Marktvorm',1,0,NULL,NULL,NULL),(309,NULL,'Themadagen',1,0,NULL,NULL,NULL),(310,NULL,'Handelscategorie',1,0,NULL,NULL,NULL),(311,NULL,'Producentengroepen',1,0,NULL,NULL,NULL),(312,NULL,'Favorieten Id',1,0,NULL,NULL,NULL),(313,NULL,'Verkoopeenheid',1,0,NULL,NULL,NULL),(314,NULL,'Veilgroep voorkeur',1,0,NULL,NULL,NULL),(315,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(316,NULL,'Keurmeesternummer FloraHo',1,0,NULL,NULL,NULL),(317,NULL,'Rijnummer Rijnsburg',1,0,NULL,NULL,NULL),(318,NULL,'Verwerkingslocatie FloraH',1,0,NULL,NULL,NULL),(319,NULL,'FloraHolland Financial',1,0,NULL,NULL,NULL),(320,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(321,NULL,'Benefiet veiling',1,0,NULL,NULL,NULL),(322,NULL,'Kloksoort',1,0,NULL,NULL,NULL),(323,NULL,'Minimumprijs aanvoerder',1,0,NULL,NULL,NULL),(324,NULL,'Rest aantallen',1,0,NULL,NULL,NULL),(325,NULL,'Veilsoort',1,0,NULL,NULL,NULL),(326,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(327,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(328,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(329,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(330,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(331,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(332,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,NULL),(333,NULL,'Gereserveerd',1,0,NULL,NULL,NULL),(334,NULL,'Veilgroep Aalsmeer',1,0,NULL,NULL,NULL),(335,NULL,'Promotie kenmerk FloraHol',1,0,NULL,NULL,NULL),(336,NULL,'Verrekening snijbloemenvo',1,0,NULL,NULL,NULL),(337,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(338,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(339,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(340,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(341,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(342,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(343,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(344,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(345,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(346,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(347,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(348,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(349,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(350,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(351,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(352,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,NULL),(353,NULL,'Gereserveerd',1,0,NULL,NULL,NULL),(354,NULL,'Tussenopslag klok Plantio',1,0,NULL,NULL,NULL),(355,NULL,'Soort ladingsdrager Plant',1,0,NULL,NULL,NULL),(356,NULL,'Logistiek middel Plantion',1,0,NULL,NULL,NULL),(357,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(358,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(359,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(360,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(361,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(362,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(363,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(364,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(365,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(366,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(367,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(368,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(369,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(370,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(371,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(372,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(373,NULL,'Gereserveerd',1,0,NULL,NULL,NULL),(374,NULL,'Veilgroep Plantion Ede',1,0,NULL,NULL,NULL),(375,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(376,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(377,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(378,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(379,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(380,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(381,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(382,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(383,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(384,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(385,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(386,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(387,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(388,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,NULL),(389,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,NULL),(390,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,NULL),(391,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,NULL),(392,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,NULL),(393,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(394,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(395,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(396,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(397,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(398,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(399,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(400,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(401,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(402,NULL,'Gereserveerd VRM',1,0,NULL,NULL,NULL),(403,NULL,'Veiling',1,0,NULL,NULL,NULL),(404,NULL,'kopersaantallen',1,0,NULL,NULL,NULL),(552,NULL,'fout kenmerk',1,0,NULL,NULL,'081'),(553,NULL,'Potinhoud',1,0,NULL,NULL,'A01'),(554,NULL,'Marketingconcept',1,0,NULL,NULL,'A02'),(555,NULL,'Leeftijd',1,0,NULL,NULL,'A03'),(556,NULL,'Uitgangsmateriaal',1,0,NULL,NULL,'A04'),(557,NULL,'Kleurbehandeld',1,0,NULL,NULL,'A05'),(558,NULL,'Verzorging: Standplaats',1,0,NULL,NULL,'A06'),(559,NULL,'Verzorging: Water',1,0,NULL,NULL,'A07'),(560,NULL,'Verzorging: Voeding',1,0,NULL,NULL,'A08'),(561,NULL,'Verzorging: Temperatuur',1,0,NULL,NULL,'A09'),(562,NULL,'Verzorging: Specifieke in',1,0,NULL,NULL,'A10'),(563,NULL,'Verzorging: Consumptie',1,0,NULL,NULL,'A11'),(564,NULL,'Nabehandeling',1,0,NULL,NULL,'A13'),(565,NULL,'Artikel beeld',1,0,NULL,NULL,'A23'),(566,NULL,'Hoofdkleur 1',1,0,NULL,NULL,'B01'),(567,NULL,'Hoofdkleur 2',1,0,NULL,NULL,'B02'),(568,NULL,'RHS hoofdkleur 1',1,0,NULL,NULL,'B03'),(569,NULL,'RHS hoofdkleur 2',1,0,NULL,NULL,'B04'),(570,NULL,'Hoofdkleur 1 blad',1,0,NULL,NULL,'B05'),(571,NULL,'Hoofdkleur 2 blad',1,0,NULL,NULL,'B06'),(572,NULL,'RHS hoofdkleur 1 blad',1,0,NULL,NULL,'B07'),(573,NULL,'RHS hoofdkleur 2 blad',1,0,NULL,NULL,'B08'),(574,NULL,'Botanisch beeld',1,0,NULL,NULL,'B09'),(575,NULL,'Hoofdkleur bes/vrucht',1,0,NULL,NULL,'B10'),(576,NULL,'RHS hoofdkleur bes/vrucht',1,0,NULL,NULL,'B11'),(577,NULL,'UPOV hoofdkleur 1 bloem',1,0,NULL,NULL,'B12'),(578,NULL,'UPOV hoofdkleur 2 bloem',1,0,NULL,NULL,'B13'),(579,NULL,'UPOV hoofdkleur 1 blad',1,0,NULL,NULL,'B14'),(580,NULL,'UPOV hoofdkleur 2 blad',1,0,NULL,NULL,'B15'),(581,NULL,'UPOV hoofdkleur bes/vruch',1,0,NULL,NULL,'B16'),(582,NULL,'Negatieve keurcode 1',1,0,NULL,NULL,'K01'),(583,NULL,'Negatieve keurcode 2',1,0,NULL,NULL,'K02'),(584,NULL,'Bedrijfskenmerk fytosanit',1,0,NULL,NULL,'K03'),(585,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,'K04'),(586,NULL,'Certificaten MPS-TraceCer',1,0,NULL,NULL,'K05'),(587,NULL,'Overige leveranciersinfor',1,0,NULL,NULL,'K07'),(588,NULL,'Certificaten MPS-GAP',1,0,NULL,NULL,'K08'),(589,NULL,'Betrouwbaarheidsindex kla',1,0,NULL,NULL,'K11'),(590,NULL,'Betrouwbaarheidsindex waa',1,0,NULL,NULL,'K12'),(591,NULL,'Productkwaliteitslabel',1,0,NULL,NULL,'K13'),(592,NULL,'Label Fair Flowers Fair P',1,0,NULL,NULL,'K14'),(593,NULL,'Certificaten Socialy Qual',1,0,NULL,NULL,'K15'),(594,NULL,'Certificaten GlobalGAP',1,0,NULL,NULL,'K16'),(595,NULL,'Certificaten MPS Quality',1,0,NULL,NULL,'K17'),(596,NULL,'Certificaten biologisch',1,0,NULL,NULL,'K18'),(597,NULL,'Certificaten eetbare prod',1,0,NULL,NULL,'K19'),(598,NULL,'Certificaten Florimark',1,0,NULL,NULL,'K20'),(599,NULL,'Certificaten Milieukeur',1,0,NULL,NULL,'K21'),(600,NULL,'Certificaten Kenya Flower',1,0,NULL,NULL,'K22'),(601,NULL,'Certificaten Fairtrade',1,0,NULL,NULL,'K23'),(602,NULL,'Keurmerk MPS-ProductProof',1,0,NULL,NULL,'K24'),(603,NULL,'Certificaten ISO',1,0,NULL,NULL,'K25'),(604,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,'K26'),(605,NULL,'Certificaten Florverde',1,0,NULL,NULL,'K27'),(606,NULL,'Certificaten Ethical Trad',1,0,NULL,NULL,'K28'),(607,NULL,'Certificaten Ethiopian EH',1,0,NULL,NULL,'K29'),(608,NULL,'Certificaten gewasbescher',1,0,NULL,NULL,'K30'),(609,NULL,'Certificaten SAN',1,0,NULL,NULL,'K31'),(610,NULL,'Certificaten GRASP',1,0,NULL,NULL,'K32'),(611,NULL,'Label Fair Flora',1,0,NULL,NULL,'K33'),(612,NULL,'GLobalG.A.P. Chain of Cus',1,0,NULL,NULL,'K34'),(613,NULL,'Fust',1,0,NULL,NULL,'L01'),(614,NULL,'Stapelwagen',1,0,NULL,NULL,'L02'),(615,NULL,'Aantal legborden veilings',1,0,NULL,NULL,'L03'),(616,NULL,'Aantal legborden Deense s',1,0,NULL,NULL,'L04'),(617,NULL,'Aantal onderstellen Deens',1,0,NULL,NULL,'L05'),(618,NULL,'Fustsoort',1,0,NULL,NULL,'L06'),(619,NULL,'Fustmateriaal',1,0,NULL,NULL,'L07'),(620,NULL,'Aantal legborden Eurostap',1,0,NULL,NULL,'L08'),(621,NULL,'Aantal onderstellen Euros',1,0,NULL,NULL,'L09'),(622,NULL,'Aantal stelen per bos',1,0,NULL,NULL,'L11'),(623,NULL,'Aantal bossen per bundel',1,0,NULL,NULL,'L12'),(624,NULL,'Aantal stuks per fust',1,0,NULL,NULL,'L13'),(625,NULL,'Aantal bossen per fust',1,0,NULL,NULL,'L14'),(626,NULL,'Aantal bundels per fust',1,0,NULL,NULL,'L15'),(627,NULL,'Aantal bossen per hoes',1,0,NULL,NULL,'L16'),(628,NULL,'Aantal bundels per hoes',1,0,NULL,NULL,'L17'),(629,NULL,'Fustlabel',1,0,NULL,NULL,'L18'),(630,NULL,'Karlabel',1,0,NULL,NULL,'L19'),(631,NULL,'Service productlabel',1,0,NULL,NULL,'L20'),(632,NULL,'Service fustlabel',1,0,NULL,NULL,'L21'),(633,NULL,'Service karlabel',1,0,NULL,NULL,'L22'),(634,NULL,'Aantal fusten per laag',1,0,NULL,NULL,'L23'),(635,NULL,'Presentatie per schapm2',1,0,NULL,NULL,'L24'),(636,NULL,'Positieve keurcode fytosa',1,0,NULL,NULL,'P01'),(637,NULL,'Positieve keurcode kwalit',1,0,NULL,NULL,'P02'),(638,NULL,'Positieve keurcode veilin',1,0,NULL,NULL,'P03'),(639,NULL,'Potmaat',1,0,NULL,NULL,'S01'),(640,NULL,'Minimum planthoogte',1,0,NULL,NULL,'S02'),(641,NULL,'Min aantal stekken/plante',1,0,NULL,NULL,'S03'),(642,NULL,'Minimum plantdiameter',1,0,NULL,NULL,'S04'),(643,NULL,'Rijpheidsstadium',1,0,NULL,NULL,'S05'),(644,NULL,'Combinatiehoogte',1,0,NULL,NULL,'S06'),(645,NULL,'Min aantal koppen hoogste',1,0,NULL,NULL,'S07'),(646,NULL,'Dikte',1,0,NULL,NULL,'S08'),(647,NULL,'Min aantal bloemen/bloeiw',1,0,NULL,NULL,'S09'),(648,NULL,'Min aantal bloemtrossen p',1,0,NULL,NULL,'S10'),(649,NULL,'Minimum aantal takken per',1,0,NULL,NULL,'S11'),(650,NULL,'Minimum aantal bollen per',1,0,NULL,NULL,'S12'),(651,NULL,'Minimum aantal bladeren p',1,0,NULL,NULL,'S13'),(652,NULL,'Minimum stamhoogte',1,0,NULL,NULL,'S14'),(653,NULL,'Transporthoogte',1,0,NULL,NULL,'S15'),(654,NULL,'Lengte scheuten',1,0,NULL,NULL,'S16'),(655,NULL,'Min aant vertakkingen pr ',1,0,NULL,NULL,'S17'),(656,NULL,'Minimum bloemknophoogte',1,0,NULL,NULL,'S19'),(657,NULL,'Minimum steellengte',1,0,NULL,NULL,'S20'),(658,NULL,'Gewicht (gemiddeld)',1,0,NULL,NULL,'S21'),(659,NULL,'Aantal bloemknoppen snijb',1,0,NULL,NULL,'S22'),(660,NULL,'Minimum bloemdiameter',1,0,NULL,NULL,'S23'),(661,NULL,'Minimum bloemschedelengte',1,0,NULL,NULL,'S24'),(662,NULL,'Aantal bloemkoppen per tr',1,0,NULL,NULL,'S25'),(663,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S26'),(664,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S27'),(665,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S28'),(666,NULL,'Minimum bloeiwijzelengte',1,0,NULL,NULL,'S29'),(667,NULL,'Verpakkingswijze snijbloe',1,0,NULL,NULL,'S30'),(668,NULL,'Minimum aant bloemen per ',1,0,NULL,NULL,'S31'),(669,NULL,'Minimum ranklengte',1,0,NULL,NULL,'S32'),(670,NULL,'Jaartal sortering hout',1,0,NULL,NULL,'S33'),(671,NULL,'Minimum bladdiameter',1,0,NULL,NULL,'S34'),(672,NULL,'Minimum bundelgewicht',1,0,NULL,NULL,'S35'),(673,NULL,'Maximum planthoogte',1,0,NULL,NULL,'S36'),(674,NULL,'Maximum plantdiameter',1,0,NULL,NULL,'S37'),(675,NULL,'Max aantal bloemen/bloeiw',1,0,NULL,NULL,'S38'),(676,NULL,'Maximum aantal takken per',1,0,NULL,NULL,'S39'),(677,NULL,'Maximum aantal bollen per',1,0,NULL,NULL,'S40'),(678,NULL,'Maximum stamhoogte',1,0,NULL,NULL,'S41'),(679,NULL,'Maximum steellengte',1,0,NULL,NULL,'S42'),(680,NULL,'Maximum aantal knoppen sn',1,0,NULL,NULL,'S43'),(681,NULL,'Maximum bloemdiameter',1,0,NULL,NULL,'S44'),(682,NULL,'Maximum bloeiwijzelengte',1,0,NULL,NULL,'S45'),(683,NULL,'Aantal vruchten / trossen',1,0,NULL,NULL,'S46'),(684,NULL,'Verpakkingswijze',1,0,NULL,NULL,'S47'),(685,NULL,'Minimum vruchtdiameter',1,0,NULL,NULL,'S48'),(686,NULL,'Bolomvang',1,0,NULL,NULL,'S49'),(687,NULL,'Bloem/bes/vruchtkleur 1',1,0,NULL,NULL,'S50'),(688,NULL,'Potvorm',1,0,NULL,NULL,'S51'),(689,NULL,'Potkleur',1,0,NULL,NULL,'S52'),(690,NULL,'Potmateriaal',1,0,NULL,NULL,'S53'),(691,NULL,'Plantvorm',1,0,NULL,NULL,'S54'),(692,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,'S55'),(693,NULL,'Teeltwijze',1,0,NULL,NULL,'S56'),(694,NULL,'Teeltmedium',1,0,NULL,NULL,'S57'),(695,NULL,'Hoesmateriaal',1,0,NULL,NULL,'S58'),(696,NULL,'Hoesvorm',1,0,NULL,NULL,'S59'),(697,NULL,'Hoesbedrukking algemeen',1,0,NULL,NULL,'S60'),(698,NULL,'Extra toevoegingen',1,0,NULL,NULL,'S61'),(699,NULL,'Land van herkomst (bedrij',1,0,NULL,NULL,'S62'),(700,NULL,'Verpakte orchidee',1,0,NULL,NULL,'S63'),(701,NULL,'Hoesbedrukking extra',1,0,NULL,NULL,'S64'),(702,NULL,'Voorbehandeling',1,0,NULL,NULL,'S65'),(703,NULL,'Overige niet in pot',1,0,NULL,NULL,'S66'),(704,NULL,'Vorm snijbloemen',1,0,NULL,NULL,'S67'),(705,NULL,'Buigzaamheid bloemsteel',1,0,NULL,NULL,'S68'),(706,NULL,'Hoeskleur',1,0,NULL,NULL,'S69'),(707,NULL,'Extra deco materiaal',1,0,NULL,NULL,'S70'),(708,NULL,'Productkleur',1,0,NULL,NULL,'S71'),(709,NULL,'Productmateriaal',1,0,NULL,NULL,'S72'),(710,NULL,'Materiaalhoogte',1,0,NULL,NULL,'S73'),(711,NULL,'Materiaaldiameter',1,0,NULL,NULL,'S74'),(712,NULL,'Barcode',1,0,NULL,NULL,'S75'),(713,NULL,'Productlabel',1,0,NULL,NULL,'S76'),(714,NULL,'Eetbaar/ niet eetbaar',1,0,NULL,NULL,'S77'),(715,NULL,'Plantmaat zonder pot',1,0,NULL,NULL,'S78'),(716,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,'S79'),(717,NULL,'Maximum percentage oud ho',1,0,NULL,NULL,'S80'),(718,NULL,'Maximum lengte verschil',1,0,NULL,NULL,'S81'),(719,NULL,'Bladkleur',1,0,NULL,NULL,'S82'),(720,NULL,'Plantgewicht',1,0,NULL,NULL,'S83'),(721,NULL,'Gemiddelde bloemdiameter',1,0,NULL,NULL,'S84'),(722,NULL,'Bloem/bes/vruchtkleur 2',1,0,NULL,NULL,'S85'),(723,NULL,'Winterhardheid (USDA zone',1,0,NULL,NULL,'S86'),(724,NULL,'Kleurbehandeld',1,0,NULL,NULL,'S87'),(725,NULL,'Bloem-/bladkleurverdeling',1,0,NULL,NULL,'S88'),(726,NULL,'Minimum bloemknopdiameter',1,0,NULL,NULL,'S89'),(727,NULL,'Volume inhoud',1,0,NULL,NULL,'S90'),(728,NULL,'Vruchtbenaming',1,0,NULL,NULL,'S91'),(729,NULL,'Vaaslevenindex',1,0,NULL,NULL,'S92'),(730,NULL,'Overige informatie plante',1,0,NULL,NULL,'S93'),(731,NULL,'Overige informatie snijbl',1,0,NULL,NULL,'S94'),(732,NULL,'Toepassingsmogelijkheid',1,0,NULL,NULL,'S95'),(733,NULL,'Productbeeld aanvoerder',1,0,NULL,NULL,'S96'),(734,NULL,'MPS certificering',1,0,NULL,NULL,'S97'),(735,NULL,'Kwaliteitsgroep',1,0,NULL,NULL,'S98'),(736,NULL,'Artikelomschrijving',1,0,NULL,NULL,'S99'),(737,NULL,'BTW-tarief',1,0,NULL,NULL,'T01'),(738,NULL,'Prijseenheid',1,0,NULL,NULL,'T02'),(739,NULL,'Transactievorm',1,0,NULL,NULL,'T03'),(740,NULL,'Handelsverpakking voorwaa',1,0,NULL,NULL,'T10'),(741,NULL,'Consumentenverpakking voo',1,0,NULL,NULL,'T11'),(742,NULL,'Leveringsvoorwaarden',1,0,NULL,NULL,'T12'),(743,NULL,'PT heffing voorwaarden',1,0,NULL,NULL,'T13'),(744,NULL,'Serviceheffing voorwaarde',1,0,NULL,NULL,'T14'),(745,NULL,'Algemene voorwaarden',1,0,NULL,NULL,'T15'),(746,NULL,'Marktvorm',1,0,NULL,NULL,'T16'),(747,NULL,'Themadagen',1,0,NULL,NULL,'T17'),(748,NULL,'Handelscategorie',1,0,NULL,NULL,'T18'),(749,NULL,'Producentengroepen',1,0,NULL,NULL,'T19'),(750,NULL,'Favorieten Id',1,0,NULL,NULL,'T20'),(751,NULL,'Verkoopeenheid',1,0,NULL,NULL,'T21'),(752,NULL,'Veilgroep voorkeur',1,0,NULL,NULL,'V01'),(753,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V02'),(754,NULL,'Keurmeesternummer FloraHo',1,0,NULL,NULL,'V03'),(755,NULL,'Rijnummer Rijnsburg',1,0,NULL,NULL,'V04'),(756,NULL,'Verwerkingslocatie FloraH',1,0,NULL,NULL,'V05'),(757,NULL,'FloraHolland Financial',1,0,NULL,NULL,'V06'),(758,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V07'),(759,NULL,'Benefiet veiling',1,0,NULL,NULL,'V08'),(760,NULL,'Kloksoort',1,0,NULL,NULL,'V09'),(761,NULL,'Minimumprijs aanvoerder',1,0,NULL,NULL,'V10'),(762,NULL,'Rest aantallen',1,0,NULL,NULL,'V11'),(763,NULL,'Veilsoort',1,0,NULL,NULL,'V12'),(764,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V13'),(765,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V14'),(766,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V15'),(767,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V16'),(768,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V17'),(769,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V18'),(770,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V19'),(771,NULL,'Gereserveerd',1,0,NULL,NULL,'V20'),(772,NULL,'Veilgroep Aalsmeer',1,0,NULL,NULL,'V21'),(773,NULL,'Promotie kenmerk FloraHol',1,0,NULL,NULL,'V22'),(774,NULL,'Verrekening snijbloemenvo',1,0,NULL,NULL,'V23'),(775,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V24'),(776,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V25'),(777,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V26'),(778,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V27'),(779,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V28'),(780,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V29'),(781,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V30'),(782,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V31'),(783,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V32'),(784,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V33'),(785,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V34'),(786,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V35'),(787,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V36'),(788,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V37'),(789,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V38'),(790,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V39'),(791,NULL,'Gereserveerd',1,0,NULL,NULL,'V40'),(792,NULL,'Tussenopslag klok Plantio',1,0,NULL,NULL,'V41'),(793,NULL,'Soort ladingsdrager Plant',1,0,NULL,NULL,'V42'),(794,NULL,'Logistiek middel Plantion',1,0,NULL,NULL,'V43'),(795,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V44'),(796,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V45'),(797,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V46'),(798,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V47'),(799,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V48'),(800,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V49'),(801,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V50'),(802,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V51'),(803,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V52'),(804,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V53'),(805,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V54'),(806,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V55'),(807,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V56'),(808,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V57'),(809,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V58'),(810,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V59'),(811,NULL,'Gereserveerd',1,0,NULL,NULL,'V60'),(812,NULL,'Veilgroep Plantion Ede',1,0,NULL,NULL,'V61'),(813,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V62'),(814,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V63'),(815,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V64'),(816,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V65'),(817,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V66'),(818,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V67'),(819,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V68'),(820,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V69'),(821,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V70'),(822,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V71'),(823,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V72'),(824,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V73'),(825,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V74'),(826,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V75'),(827,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V76'),(828,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V77'),(829,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V78'),(830,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V79'),(831,NULL,'Toegevoegde waardes VRM',1,0,NULL,NULL,'V80'),(832,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V81'),(833,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V82'),(834,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V83'),(835,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V84'),(836,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V85'),(837,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V86'),(838,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V87'),(839,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V88'),(840,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V89'),(841,NULL,'Veiling',1,0,NULL,NULL,'V99'),(842,NULL,'kopersaantallen',1,0,NULL,NULL,'Z01');
+INSERT INTO `tag` VALUES (1,'color','Color',0,0,'ink',NULL,NULL,'inkFk'),(2,NULL,'Forma',1,0,NULL,NULL,NULL,NULL),(3,NULL,'Material',1,0,NULL,NULL,NULL,NULL),(4,NULL,'Longitud',1,1,NULL,'mm',NULL,'size'),(5,NULL,'Diámetro',1,1,NULL,'mm',NULL,'diameter'),(6,NULL,'Perímetro',1,1,NULL,'mm',NULL,NULL),(7,NULL,'Ancho de la base',1,1,NULL,'mm',NULL,NULL),(8,NULL,'Altura',1,1,NULL,'mm',NULL,'size'),(9,NULL,'Volumen',1,1,NULL,'ml',NULL,NULL),(10,NULL,'Densidad',1,1,NULL,NULL,NULL,NULL),(11,NULL,'Calidad',1,0,NULL,NULL,NULL,NULL),(12,NULL,'Textura',1,0,NULL,NULL,NULL,NULL),(13,NULL,'Material del mango',1,0,NULL,NULL,NULL,NULL),(14,NULL,'Compra mínima',1,0,NULL,NULL,NULL,NULL),(15,NULL,'Nº pétalos',1,1,NULL,NULL,NULL,NULL),(16,NULL,'Ancho',1,1,NULL,'mm',NULL,NULL),(18,NULL,'Profundidad',1,1,NULL,'mm',NULL,NULL),(19,NULL,'Largo',1,1,NULL,'mm',NULL,'size'),(20,NULL,'Ancho superior',1,1,NULL,'mm',NULL,NULL),(21,NULL,'Ancho inferior',1,1,NULL,'mm',NULL,NULL),(22,NULL,'Gramaje',1,1,NULL,'g',NULL,NULL),(23,'stems','Tallos',1,1,NULL,NULL,NULL,'stems'),(24,NULL,'Estado',1,0,NULL,NULL,NULL,NULL),(25,NULL,'Color principal',0,0,'ink',NULL,NULL,NULL),(26,NULL,'Color secundario',0,0,'ink',NULL,NULL,NULL),(27,NULL,'Longitud(cm)',1,1,NULL,'cm',NULL,NULL),(28,NULL,'Diámetro base',1,1,'','mm',NULL,'diameter'),(29,NULL,'Colección',1,0,NULL,NULL,NULL,NULL),(30,NULL,'Uds / caja',1,1,NULL,NULL,NULL,NULL),(31,NULL,'Contenido',1,0,NULL,NULL,NULL,NULL),(32,NULL,'Peso',1,1,NULL,'g',NULL,NULL),(33,NULL,'Grosor',1,1,NULL,'mm',NULL,NULL),(34,NULL,'Marca',1,0,NULL,NULL,NULL,NULL),(35,'origin','Origen',0,0,'origin',NULL,NULL,'originFk'),(36,NULL,'Proveedor',1,0,NULL,NULL,NULL,NULL),(37,'producer','Productor',0,0,'producer',NULL,NULL,'producerFk'),(38,NULL,'Duración',1,1,NULL,'s',NULL,NULL),(39,NULL,'Flor',1,0,NULL,NULL,NULL,NULL),(40,NULL,'Soporte',1,0,NULL,NULL,NULL,NULL),(41,NULL,'Tamaño flor',1,0,NULL,NULL,NULL,NULL),(42,NULL,'Apertura',1,0,NULL,NULL,NULL,NULL),(43,NULL,'Tallo',1,0,NULL,NULL,NULL,NULL),(44,NULL,'Nº hojas',1,1,NULL,NULL,NULL,NULL),(45,NULL,'Dimensiones',1,0,NULL,NULL,NULL,NULL),(46,NULL,'Diámetro boca',1,1,NULL,'mm',NULL,NULL),(47,NULL,'Nº flores',1,1,NULL,NULL,NULL,NULL),(48,NULL,'Uds / paquete',1,1,NULL,NULL,NULL,NULL),(49,NULL,'Maceta',1,1,NULL,'cm',NULL,'diameter'),(50,NULL,'Textura flor',1,0,NULL,NULL,NULL,NULL),(51,NULL,'Textura hoja',1,0,NULL,NULL,NULL,NULL),(52,NULL,'Tipo de IVA',1,0,NULL,NULL,NULL,NULL),(53,NULL,'Tronco',1,0,NULL,NULL,NULL,NULL),(54,NULL,'Hoja',1,0,NULL,NULL,NULL,NULL),(55,NULL,'Formato',1,0,NULL,NULL,NULL,NULL),(56,NULL,'Genero',1,0,NULL,NULL,NULL,NULL),(57,NULL,'Especie',1,0,NULL,NULL,NULL,NULL),(58,NULL,'Variedad',1,0,NULL,NULL,NULL,NULL),(59,NULL,'Medida grande',1,0,NULL,NULL,NULL,NULL),(60,NULL,'Medida mediano',1,0,NULL,NULL,NULL,NULL),(61,NULL,'Medida pequeño',1,0,NULL,NULL,NULL,NULL),(63,NULL,'Recipiente interior',1,0,NULL,NULL,NULL,NULL),(64,NULL,'Material secundario',1,0,NULL,NULL,NULL,NULL),(65,NULL,'Colores',1,0,NULL,NULL,NULL,NULL),(66,NULL,'Referencia',1,0,NULL,NULL,NULL,NULL),(67,'category','Categoria',1,0,NULL,NULL,NULL,NULL),(68,NULL,'Amb',1,0,NULL,NULL,NULL,NULL),(69,NULL,'Anchura',1,1,NULL,'cm',NULL,NULL),(70,NULL,'Hueco interior',1,0,NULL,NULL,NULL,NULL),(71,NULL,'Tamaño',1,0,NULL,NULL,NULL,NULL),(72,NULL,'Color botón',1,0,NULL,NULL,NULL,NULL),(73,NULL,'Tamaño minimo del botón',1,0,NULL,NULL,NULL,NULL),(74,NULL,'Obtentor',1,0,NULL,NULL,NULL,NULL),(75,NULL,'Longitud del brote',1,0,NULL,NULL,NULL,NULL),(76,NULL,'Tallos / u.v.',1,0,NULL,NULL,NULL,NULL),(77,NULL,'Madera de',1,0,NULL,NULL,NULL,NULL),(78,NULL,'Unidad de venta',1,0,NULL,NULL,NULL,NULL),(79,NULL,'Temporal',1,0,NULL,NULL,NULL,NULL),(80,NULL,'Gramaje/tallo',1,1,NULL,'g',NULL,NULL),(81,NULL,'Peso/paquete',1,1,NULL,'g',NULL,NULL),(82,NULL,'Flexibilidad del tallo',1,0,NULL,NULL,NULL,NULL),(83,NULL,'Nº planchas',1,1,NULL,NULL,NULL,NULL),(84,NULL,'Nº páginas',1,1,NULL,NULL,NULL,NULL),(85,NULL,'Editorial',1,0,NULL,NULL,NULL,NULL),(86,NULL,'Idioma',1,0,NULL,NULL,NULL,NULL),(87,NULL,'Fecha publicación',1,0,NULL,NULL,NULL,NULL),(88,NULL,'Cubierta',1,0,NULL,NULL,NULL,NULL),(89,NULL,'Encuadernación',1,0,NULL,NULL,NULL,NULL),(90,NULL,'Autor',1,0,NULL,NULL,NULL,NULL),(91,NULL,'Envoltorio',1,0,NULL,NULL,NULL,NULL),(92,NULL,'Nombre temporal',1,0,NULL,NULL,NULL,NULL),(93,NULL,'Modelo',1,0,NULL,NULL,NULL,NULL),(94,NULL,'Producto',1,0,NULL,NULL,NULL,NULL),(95,NULL,'Título',1,0,NULL,NULL,NULL,NULL),(96,NULL,'Tomo',1,0,NULL,NULL,NULL,NULL),(97,NULL,'Articulo',1,0,NULL,NULL,NULL,NULL),(98,NULL,'Metodo de cultivo',1,0,NULL,NULL,NULL,NULL),(99,NULL,'Edad',1,0,NULL,NULL,NULL,NULL),(100,NULL,'Agotado',1,0,NULL,NULL,NULL,NULL),(101,NULL,'Altura con asa',1,1,NULL,'cm',NULL,NULL),(102,NULL,'Nº tallos',1,1,NULL,NULL,NULL,NULL),(103,NULL,'Cultivo',1,0,NULL,NULL,NULL,NULL),(104,NULL,'Sabor',1,0,NULL,NULL,NULL,NULL),(105,NULL,'Talla',1,0,NULL,NULL,NULL,NULL),(106,NULL,'Calibre',1,1,NULL,NULL,NULL,NULL),(107,NULL,'Dulzura',1,1,NULL,'bx',NULL,NULL),(108,NULL,'Piezas',1,0,NULL,NULL,NULL,NULL),(109,NULL,'Altura con patas',1,0,NULL,NULL,NULL,NULL),(110,NULL,'Envase',1,0,NULL,NULL,NULL,NULL),(111,NULL,'Nº piezas',1,0,NULL,NULL,NULL,NULL),(112,NULL,'Uso',1,0,NULL,'cm',NULL,NULL),(113,NULL,'Color luz',1,0,NULL,NULL,NULL,NULL),(114,NULL,'Capacidad',1,0,NULL,NULL,NULL,NULL),(184,NULL,'Tallos por paquete',1,0,NULL,NULL,NULL,NULL),(205,NULL,'Apertura',1,0,NULL,NULL,'S05',NULL),(219,NULL,'Altura',1,0,NULL,NULL,'S20','size'),(552,NULL,'fout kenmerk',1,0,NULL,NULL,'081',NULL),(553,NULL,'Potinhoud',1,0,NULL,NULL,'A01',NULL),(554,NULL,'Marketingconcept',1,0,NULL,NULL,'A02',NULL),(555,NULL,'Leeftijd',1,0,NULL,NULL,'A03',NULL),(556,NULL,'Uitgangsmateriaal',1,0,NULL,NULL,'A04',NULL),(557,NULL,'Kleurbehandeld',1,0,NULL,NULL,'A05','inkFk'),(558,NULL,'Verzorging: Standplaats',1,0,NULL,NULL,'A06',NULL),(559,NULL,'Verzorging: Water',1,0,NULL,NULL,'A07',NULL),(560,NULL,'Verzorging: Voeding',1,0,NULL,NULL,'A08',NULL),(561,NULL,'Verzorging: Temperatuur',1,0,NULL,NULL,'A09',NULL),(562,NULL,'Verzorging: Specifieke in',1,0,NULL,NULL,'A10',NULL),(563,NULL,'Verzorging: Consumptie',1,0,NULL,NULL,'A11',NULL),(564,NULL,'Nabehandeling',1,0,NULL,NULL,'A13',NULL),(565,NULL,'Artikel beeld',1,0,NULL,NULL,'A23',NULL),(566,NULL,'Hoofdkleur 1',1,0,NULL,NULL,'B01',NULL),(567,NULL,'Hoofdkleur 2',1,0,NULL,NULL,'B02',NULL),(568,NULL,'RHS hoofdkleur 1',1,0,NULL,NULL,'B03',NULL),(569,NULL,'RHS hoofdkleur 2',1,0,NULL,NULL,'B04',NULL),(570,NULL,'Hoofdkleur 1 blad',1,0,NULL,NULL,'B05',NULL),(571,NULL,'Hoofdkleur 2 blad',1,0,NULL,NULL,'B06',NULL),(572,NULL,'RHS hoofdkleur 1 blad',1,0,NULL,NULL,'B07',NULL),(573,NULL,'RHS hoofdkleur 2 blad',1,0,NULL,NULL,'B08',NULL),(574,NULL,'Botanisch beeld',1,0,NULL,NULL,'B09',NULL),(575,NULL,'Hoofdkleur bes/vrucht',1,0,NULL,NULL,'B10',NULL),(576,NULL,'RHS hoofdkleur bes/vrucht',1,0,NULL,NULL,'B11',NULL),(577,NULL,'UPOV hoofdkleur 1 bloem',1,0,NULL,NULL,'B12',NULL),(578,NULL,'UPOV hoofdkleur 2 bloem',1,0,NULL,NULL,'B13',NULL),(579,NULL,'UPOV hoofdkleur 1 blad',1,0,NULL,NULL,'B14',NULL),(580,NULL,'UPOV hoofdkleur 2 blad',1,0,NULL,NULL,'B15',NULL),(581,NULL,'UPOV hoofdkleur bes/vruch',1,0,NULL,NULL,'B16',NULL),(582,NULL,'Negatieve keurcode 1',1,0,NULL,NULL,'K01',NULL),(583,NULL,'Negatieve keurcode 2',1,0,NULL,NULL,'K02',NULL),(584,NULL,'Bedrijfskenmerk fytosanit',1,0,NULL,NULL,'K03',NULL),(585,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,'K04',NULL),(586,NULL,'Certificaten MPS-TraceCer',1,0,NULL,NULL,'K05',NULL),(587,NULL,'Overige leveranciersinfor',1,0,NULL,NULL,'K07',NULL),(588,NULL,'Certificaten MPS-GAP',1,0,NULL,NULL,'K08',NULL),(589,NULL,'Betrouwbaarheidsindex kla',1,0,NULL,NULL,'K11',NULL),(590,NULL,'Betrouwbaarheidsindex waa',1,0,NULL,NULL,'K12',NULL),(591,NULL,'Productkwaliteitslabel',1,0,NULL,NULL,'K13',NULL),(592,NULL,'Label Fair Flowers Fair P',1,0,NULL,NULL,'K14',NULL),(593,NULL,'Certificaten Socialy Qual',1,0,NULL,NULL,'K15',NULL),(594,NULL,'Certificaten GlobalGAP',1,0,NULL,NULL,'K16',NULL),(595,NULL,'Certificaten MPS Quality',1,0,NULL,NULL,'K17',NULL),(596,NULL,'Certificaten biologisch',1,0,NULL,NULL,'K18',NULL),(597,NULL,'Certificaten eetbare prod',1,0,NULL,NULL,'K19',NULL),(598,NULL,'Certificaten Florimark',1,0,NULL,NULL,'K20',NULL),(599,NULL,'Certificaten Milieukeur',1,0,NULL,NULL,'K21',NULL),(600,NULL,'Certificaten Kenya Flower',1,0,NULL,NULL,'K22',NULL),(601,NULL,'Certificaten Fairtrade',1,0,NULL,NULL,'K23',NULL),(602,NULL,'Keurmerk MPS-ProductProof',1,0,NULL,NULL,'K24',NULL),(603,NULL,'Certificaten ISO',1,0,NULL,NULL,'K25',NULL),(604,NULL,'Certificaten aardwarmte',1,0,NULL,NULL,'K26',NULL),(605,NULL,'Certificaten Florverde',1,0,NULL,NULL,'K27',NULL),(606,NULL,'Certificaten Ethical Trad',1,0,NULL,NULL,'K28',NULL),(607,NULL,'Certificaten Ethiopian EH',1,0,NULL,NULL,'K29',NULL),(608,NULL,'Certificaten gewasbescher',1,0,NULL,NULL,'K30',NULL),(609,NULL,'Certificaten SAN',1,0,NULL,NULL,'K31',NULL),(610,NULL,'Certificaten GRASP',1,0,NULL,NULL,'K32',NULL),(611,NULL,'Label Fair Flora',1,0,NULL,NULL,'K33',NULL),(612,NULL,'GLobalG.A.P. Chain of Cus',1,0,NULL,NULL,'K34',NULL),(613,NULL,'Fust',1,0,NULL,NULL,'L01',NULL),(614,NULL,'Stapelwagen',1,0,NULL,NULL,'L02',NULL),(615,NULL,'Aantal legborden veilings',1,0,NULL,NULL,'L03',NULL),(616,NULL,'Aantal legborden Deense s',1,0,NULL,NULL,'L04',NULL),(617,NULL,'Aantal onderstellen Deens',1,0,NULL,NULL,'L05',NULL),(618,NULL,'Fustsoort',1,0,NULL,NULL,'L06',NULL),(619,NULL,'Fustmateriaal',1,0,NULL,NULL,'L07',NULL),(620,NULL,'Aantal legborden Eurostap',1,0,NULL,NULL,'L08',NULL),(621,NULL,'Aantal onderstellen Euros',1,0,NULL,NULL,'L09',NULL),(622,NULL,'Tallos/bolsa',1,0,NULL,NULL,'L11',''),(623,NULL,'Aantal bossen per bundel',1,0,NULL,NULL,'L12',NULL),(624,NULL,'Aantal stuks per fust',1,0,NULL,NULL,'L13',NULL),(625,NULL,'Aantal bossen per fust',1,0,NULL,NULL,'L14',NULL),(626,NULL,'Aantal bundels per fust',1,0,NULL,NULL,'L15',NULL),(627,NULL,'Aantal bossen per hoes',1,0,NULL,NULL,'L16',NULL),(628,NULL,'Aantal bundels per hoes',1,0,NULL,NULL,'L17',NULL),(629,NULL,'Fustlabel',1,0,NULL,NULL,'L18',NULL),(630,NULL,'Karlabel',1,0,NULL,NULL,'L19',NULL),(631,NULL,'Service productlabel',1,0,NULL,NULL,'L20',NULL),(632,NULL,'Service fustlabel',1,0,NULL,NULL,'L21',NULL),(633,NULL,'Service karlabel',1,0,NULL,NULL,'L22',NULL),(634,NULL,'Aantal fusten per laag',1,0,NULL,NULL,'L23',NULL),(635,NULL,'Presentatie per schapm2',1,0,NULL,NULL,'L24',NULL),(636,NULL,'Positieve keurcode fytosa',1,0,NULL,NULL,'P01',NULL),(637,NULL,'Positieve keurcode kwalit',1,0,NULL,NULL,'P02',NULL),(638,NULL,'Positieve keurcode veilin',1,0,NULL,NULL,'P03',NULL),(639,NULL,'Maceta',1,1,NULL,'cm','S01','diameter'),(640,NULL,'Altura',1,0,NULL,NULL,'S02','size'),(641,NULL,'nº plantas',1,0,NULL,NULL,'S03',NULL),(642,NULL,'Diámetro',1,0,NULL,NULL,'S04',NULL),(644,NULL,'Combinatiehoogte',1,0,NULL,NULL,'S06',NULL),(645,NULL,'Plantas/Maceta',1,0,NULL,NULL,'S07',NULL),(646,NULL,'Dikte',1,0,NULL,NULL,'S08',NULL),(647,NULL,'nº flores',1,0,NULL,NULL,'S09',NULL),(648,NULL,'Min aantal bloemtrossen p',1,0,NULL,NULL,'S10',NULL),(649,NULL,'nº ramales',1,0,NULL,NULL,'S11',NULL),(650,NULL,'Minimum aantal bollen per',1,0,NULL,NULL,'S12',NULL),(651,NULL,'Minimum aantal bladeren p',1,0,NULL,NULL,'S13',NULL),(652,NULL,'Minimum stamhoogte',1,0,NULL,NULL,'S14',NULL),(653,NULL,'Altura caja',1,0,NULL,NULL,'S15',NULL),(654,NULL,'Lengte scheuten',1,0,NULL,NULL,'S16',NULL),(655,NULL,'Min aant vertakkingen pr ',1,0,NULL,NULL,'S17',NULL),(656,NULL,'Altura del capullo',1,0,NULL,NULL,'S19',NULL),(658,NULL,'Peso tallo',1,0,NULL,NULL,'S21',NULL),(659,NULL,'nº flores',1,0,NULL,NULL,'S22',NULL),(660,NULL,'Diámetro de la flor',1,0,NULL,NULL,'S23',NULL),(661,NULL,'Minimum bloemschedelengte',1,0,NULL,NULL,'S24',NULL),(662,NULL,'Aantal bloemkoppen per tr',1,0,NULL,NULL,'S25',NULL),(663,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S26',NULL),(664,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S27',NULL),(665,NULL,'Aant.kleuren/cultiv/vorme',1,0,NULL,NULL,'S28',NULL),(666,NULL,'Longitud inflorescencia',1,0,NULL,NULL,'S29',NULL),(667,NULL,'Verpakkingswijze snijbloe',1,0,NULL,NULL,'S30',NULL),(668,NULL,'Minimum aant bloemen per ',1,0,NULL,NULL,'S31',NULL),(669,NULL,'Longitud',1,0,NULL,NULL,'S32',NULL),(670,NULL,'Jaartal sortering hout',1,0,NULL,NULL,'S33',NULL),(671,NULL,'Diámetro de la hoja',1,0,NULL,NULL,'S34',NULL),(672,NULL,'Peso paquete',1,0,NULL,NULL,'S35',NULL),(673,NULL,'Maximum planthoogte',1,0,NULL,NULL,'S36',NULL),(674,NULL,'Maximum plantdiameter',1,0,NULL,NULL,'S37',NULL),(675,NULL,'Max aantal bloemen/bloeiw',1,0,NULL,NULL,'S38',NULL),(676,NULL,'Maximum aantal takken per',1,0,NULL,NULL,'S39',NULL),(677,NULL,'Maximum aantal bollen per',1,0,NULL,NULL,'S40',NULL),(678,NULL,'Maximum stamhoogte',1,0,NULL,NULL,'S41',NULL),(679,NULL,'Longitud mínima',1,0,NULL,NULL,'S42','size'),(680,NULL,'Maximum aantal knoppen sn',1,0,NULL,NULL,'S43',NULL),(681,NULL,'Maximum bloemdiameter',1,0,NULL,NULL,'S44',NULL),(682,NULL,'Maximum bloeiwijzelengte',1,0,NULL,NULL,'S45',NULL),(683,NULL,'Aantal vruchten / trossen',1,0,NULL,NULL,'S46',NULL),(684,NULL,'Verpakkingswijze',1,0,NULL,NULL,'S47',NULL),(685,NULL,'Minimum vruchtdiameter',1,0,NULL,NULL,'S48',NULL),(686,NULL,'Bolomvang',1,0,NULL,NULL,'S49',NULL),(687,NULL,'Bloem/bes/vruchtkleur 1',1,0,NULL,NULL,'S50',NULL),(688,NULL,'Potvorm',1,0,NULL,NULL,'S51',NULL),(689,NULL,'Potkleur',1,0,NULL,NULL,'S52',NULL),(690,NULL,'Material maceta',1,0,NULL,NULL,'S53',NULL),(691,NULL,'Plantvorm',1,0,NULL,NULL,'S54',NULL),(692,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,'S55',NULL),(693,NULL,'Teeltwijze',1,0,NULL,NULL,'S56',NULL),(694,NULL,'Teeltmedium',1,0,NULL,NULL,'S57',NULL),(695,NULL,'Hoesmateriaal',1,0,NULL,NULL,'S58',NULL),(696,NULL,'Hoesvorm',1,0,NULL,NULL,'S59',NULL),(697,NULL,'Hoesbedrukking algemeen',1,0,NULL,NULL,'S60',NULL),(698,NULL,'Extra toevoegingen',1,0,NULL,NULL,'S61',NULL),(699,NULL,'Land van herkomst (bedrij',1,0,NULL,NULL,'S62',NULL),(700,NULL,'Verpakte orchidee',1,0,NULL,NULL,'S63',NULL),(701,NULL,'Hoesbedrukking extra',1,0,NULL,NULL,'S64',NULL),(702,NULL,'Voorbehandeling',1,0,NULL,NULL,'S65',NULL),(703,NULL,'Overige niet in pot',1,0,NULL,NULL,'S66',NULL),(704,NULL,'Vorm snijbloemen',1,0,NULL,NULL,'S67',NULL),(705,NULL,'Buigzaamheid bloemsteel',1,0,NULL,NULL,'S68',NULL),(706,NULL,'Hoeskleur',1,0,NULL,NULL,'S69',NULL),(707,NULL,'Extra deco materiaal',1,0,NULL,NULL,'S70',NULL),(708,NULL,'Productkleur',1,0,NULL,NULL,'S71','inkFk'),(709,NULL,'Productmateriaal',1,0,NULL,NULL,'S72',NULL),(710,NULL,'Materiaalhoogte',1,0,NULL,NULL,'S73',NULL),(711,NULL,'Materiaaldiameter',1,0,NULL,NULL,'S74',NULL),(712,NULL,'Barcode',1,0,NULL,NULL,'S75',NULL),(713,NULL,'Productlabel',1,0,NULL,NULL,'S76',NULL),(714,NULL,'Eetbaar/ niet eetbaar',1,0,NULL,NULL,'S77',NULL),(715,NULL,'Plantmaat zonder pot',1,0,NULL,NULL,'S78',NULL),(716,NULL,'Aantal kleuren/cultiv per',1,0,NULL,NULL,'S79',NULL),(717,NULL,'Maximum percentage oud ho',1,0,NULL,NULL,'S80',NULL),(718,NULL,'Maximum lengte verschil',1,0,NULL,NULL,'S81',NULL),(719,NULL,'Bladkleur',1,0,NULL,NULL,'S82',NULL),(720,NULL,'Plantgewicht',1,0,NULL,NULL,'S83',NULL),(721,NULL,'Diámetro',1,0,NULL,NULL,'S84',NULL),(722,NULL,'Bloem/bes/vruchtkleur 2',1,0,NULL,NULL,'S85',NULL),(723,NULL,'Winterhardheid (USDA zone',1,0,NULL,NULL,'S86',NULL),(724,NULL,'Kleurbehandeld',1,0,NULL,NULL,'S87','inkFk'),(725,NULL,'Bloem-/bladkleurverdeling',1,0,NULL,NULL,'S88',NULL),(726,NULL,'Diámetro del capullo',1,0,NULL,NULL,'S89',NULL),(727,NULL,'Volume inhoud',1,0,NULL,NULL,'S90',NULL),(728,NULL,'Vruchtbenaming',1,0,NULL,NULL,'S91',NULL),(729,NULL,'Vaaslevenindex',1,0,NULL,NULL,'S92',NULL),(730,NULL,'Overige informatie plante',1,0,NULL,NULL,'S93',NULL),(731,NULL,'Overige informatie snijbl',1,0,NULL,NULL,'S94',NULL),(732,NULL,'Toepassingsmogelijkheid',1,0,NULL,NULL,'S95',NULL),(733,NULL,'Productbeeld aanvoerder',1,0,NULL,NULL,'S96',NULL),(734,NULL,'MPS certificering',1,0,NULL,NULL,'S97',NULL),(735,NULL,'Kwaliteitsgroep',1,0,NULL,NULL,'S98',NULL),(736,NULL,'Artikelomschrijving',1,0,NULL,NULL,'S99',NULL),(737,NULL,'BTW-tarief',1,0,NULL,NULL,'T01',NULL),(738,NULL,'Prijseenheid',1,0,NULL,NULL,'T02',NULL),(739,NULL,'Transactievorm',1,0,NULL,NULL,'T03',NULL),(740,NULL,'Handelsverpakking voorwaa',1,0,NULL,NULL,'T10',NULL),(741,NULL,'Consumentenverpakking voo',1,0,NULL,NULL,'T11',NULL),(742,NULL,'Leveringsvoorwaarden',1,0,NULL,NULL,'T12',NULL),(743,NULL,'PT heffing voorwaarden',1,0,NULL,NULL,'T13',NULL),(744,NULL,'Serviceheffing voorwaarde',1,0,NULL,NULL,'T14',NULL),(745,NULL,'Algemene voorwaarden',1,0,NULL,NULL,'T15',NULL),(746,NULL,'Marktvorm',1,0,NULL,NULL,'T16',NULL),(747,NULL,'Themadagen',1,0,NULL,NULL,'T17',NULL),(748,NULL,'Handelscategorie',1,0,NULL,NULL,'T18',NULL),(749,NULL,'Producentengroepen',1,0,NULL,NULL,'T19',NULL),(750,NULL,'Favorieten Id',1,0,NULL,NULL,'T20',NULL),(751,NULL,'Verkoopeenheid',1,0,NULL,NULL,'T21',NULL),(752,NULL,'Veilgroep voorkeur',1,0,NULL,NULL,'V01',NULL),(753,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V02',NULL),(754,NULL,'Keurmeesternummer FloraHo',1,0,NULL,NULL,'V03',NULL),(755,NULL,'Rijnummer Rijnsburg',1,0,NULL,NULL,'V04',NULL),(756,NULL,'Verwerkingslocatie FloraH',1,0,NULL,NULL,'V05',NULL),(757,NULL,'FloraHolland Financial',1,0,NULL,NULL,'V06',NULL),(758,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V07',NULL),(759,NULL,'Benefiet veiling',1,0,NULL,NULL,'V08',NULL),(760,NULL,'Kloksoort',1,0,NULL,NULL,'V09',NULL),(761,NULL,'Minimumprijs aanvoerder',1,0,NULL,NULL,'V10',NULL),(762,NULL,'Rest aantallen',1,0,NULL,NULL,'V11',NULL),(763,NULL,'Veilsoort',1,0,NULL,NULL,'V12',NULL),(764,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V13',NULL),(765,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V14',NULL),(766,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V15',NULL),(767,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V16',NULL),(768,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V17',NULL),(769,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V18',NULL),(770,NULL,'Gereserveerd FloraHolland',1,0,NULL,NULL,'V19',NULL),(771,NULL,'Gereserveerd',1,0,NULL,NULL,'V20',NULL),(772,NULL,'Veilgroep Aalsmeer',1,0,NULL,NULL,'V21',NULL),(773,NULL,'Promotie kenmerk FloraHol',1,0,NULL,NULL,'V22',NULL),(774,NULL,'Verrekening snijbloemenvo',1,0,NULL,NULL,'V23',NULL),(775,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V24',NULL),(776,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V25',NULL),(777,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V26',NULL),(778,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V27',NULL),(779,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V28',NULL),(780,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V29',NULL),(781,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V30',NULL),(782,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V31',NULL),(783,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V32',NULL),(784,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V33',NULL),(785,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V34',NULL),(786,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V35',NULL),(787,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V36',NULL),(788,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V37',NULL),(789,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V38',NULL),(790,NULL,'Gereserveerd Aalsmeer',1,0,NULL,NULL,'V39',NULL),(791,NULL,'Gereserveerd',1,0,NULL,NULL,'V40',NULL),(792,NULL,'Tussenopslag klok Plantio',1,0,NULL,NULL,'V41',NULL),(793,NULL,'Soort ladingsdrager Plant',1,0,NULL,NULL,'V42',NULL),(794,NULL,'Logistiek middel Plantion',1,0,NULL,NULL,'V43',NULL),(795,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V44',NULL),(796,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V45',NULL),(797,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V46',NULL),(798,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V47',NULL),(799,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V48',NULL),(800,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V49',NULL),(801,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V50',NULL),(802,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V51',NULL),(803,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V52',NULL),(804,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V53',NULL),(805,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V54',NULL),(806,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V55',NULL),(807,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V56',NULL),(808,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V57',NULL),(809,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V58',NULL),(810,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V59',NULL),(811,NULL,'Gereserveerd',1,0,NULL,NULL,'V60',NULL),(812,NULL,'Veilgroep Plantion Ede',1,0,NULL,NULL,'V61',NULL),(813,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V62',NULL),(814,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V63',NULL),(815,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V64',NULL),(816,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V65',NULL),(817,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V66',NULL),(818,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V67',NULL),(819,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V68',NULL),(820,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V69',NULL),(821,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V70',NULL),(822,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V71',NULL),(823,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V72',NULL),(824,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V73',NULL),(825,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V74',NULL),(826,NULL,'Gereserveerd Plantion Ede',1,0,NULL,NULL,'V75',NULL),(827,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V76',NULL),(828,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V77',NULL),(829,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V78',NULL),(830,NULL,'Gereserveerd Holambra',1,0,NULL,NULL,'V79',NULL),(831,NULL,'Toegevoegde waardes VRM',1,0,NULL,NULL,'V80',NULL),(832,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V81',NULL),(833,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V82',NULL),(834,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V83',NULL),(835,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V84',NULL),(836,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V85',NULL),(837,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V86',NULL),(838,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V87',NULL),(839,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V88',NULL),(840,NULL,'Gereserveerd VRM',1,0,NULL,NULL,'V89',NULL),(841,NULL,'Veiling',1,0,NULL,NULL,'V99',NULL),(842,NULL,'kopersaantallen',1,0,NULL,NULL,'Z01',NULL),(843,NULL,'Caducidad',1,0,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `tag` ENABLE KEYS */;
UNLOCK TABLES;
@@ -340,7 +340,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:07
+-- Dump completed on 2020-09-09 11:46:35
USE `cache`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -378,7 +378,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:08
+-- Dump completed on 2020-09-09 11:46:35
USE `hedera`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -436,7 +436,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:09
+-- Dump completed on 2020-09-09 11:46:36
USE `postgresql`;
-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
@@ -511,7 +511,7 @@ UNLOCK TABLES;
LOCK TABLES `workcenter` WRITE;
/*!40000 ALTER TABLE `workcenter` DISABLE KEYS */;
-INSERT INTO `workcenter` VALUES (1,'Silla',20,1040,1,'Av espioca 100',552703),(2,'Mercaflor',19,NULL,NULL,NULL,NULL),(3,'Marjales',26,20008,NULL,NULL,NULL),(4,'VNH',NULL,NULL,3,NULL,NULL),(5,'Madrid',28,2852,5,'Av constitución 3',554145),(6,'Vilassar',88,88031,2,'Cami del Crist, 33',556412),(7,'Tenerife',NULL,NULL,10,NULL,NULL);
+INSERT INTO `workcenter` VALUES (1,'Silla',20,1056,1,'Av espioca 100',552703),(2,'Mercaflor',19,NULL,NULL,NULL,NULL),(3,'Marjales',26,20008,NULL,NULL,NULL),(4,'VNH',NULL,NULL,3,NULL,NULL),(5,'Madrid',28,2852,5,'Av constitución 3',554145),(6,'Vilassar',88,88031,2,'Cami del Crist, 33',556412),(7,'Tenerife',NULL,NULL,10,NULL,NULL);
/*!40000 ALTER TABLE `workcenter` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -524,4 +524,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 9:53:11
+-- Dump completed on 2020-09-09 11:46:38
diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index e4d266ed8..c2354e0c9 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -114,13 +114,13 @@ INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `park
('GVC', '1', '0', '1', '0', '106'),
('HEJ', '2', '0', '1', '0', '106');
-INSERT INTO `vn`.`accountingType`(`id`, `description`)
+INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`)
VALUES
- (1, 'Digital money'),
- (2, 'Cash'),
- (3, 'Card'),
- (4, 'Stolen Money'),
- (5, 'Miscellaneous');
+ (1, 'Digital money', ''),
+ (2, 'Cash', 'Cash'),
+ (3, 'Card', 'Pay on receipt'),
+ (4, 'Stolen Money', ''),
+ (5, 'Miscellaneous', '');
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
VALUES
@@ -131,8 +131,8 @@ INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
VALUES
- (1, 'Pay on receipt', '0000000000', 4, 0, 1, 1),
- (2, 'Cash', '1111111111', 1, 0, 1, 1);
+ (1, 'Pay on receipt', '0000000000', 3, 0, 1, 1),
+ (2, 'Cash', '1111111111', 2, 0, 1, 1);
INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
VALUES
@@ -538,6 +538,32 @@ INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agen
(6, NULL, 57, CURDATE(), 5, 7, 'sixth route', 1.7, 60, CURDATE(), CURDATE(), 3),
(7, NULL, 57, CURDATE(), 6, 8, 'seventh route', 0, 70, CURDATE(), CURDATE(), 5);
+INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`,`zonePrice`, `zoneBonus`, `created`)
+ VALUES
+ (1 , 3, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 'Bat cave', 121, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (2 , 1, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (3 , 1, 7, 1, 6, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T2222222', 0, 3, 5, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
+ (4 , 3, 2, 1, 2, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T3333333', 0, 9, 5, 1, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
+ (5 , 3, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T4444444', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
+ (6 , 1, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 'Mountain Drive Gotham', 1, 'A1111111', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (7 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, CURDATE()),
+ (8 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'Bat cave', 121, NULL, 0, 3, 5, 1, CURDATE()),
+ (9 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 'Stark tower', 124, NULL, 0, 3, 5, 1, CURDATE()),
+ (10, 1, 1, 5, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, CURDATE()),
+ (11, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 'NY roofs', 122, NULL, 0, 3, 5, 1, CURDATE()),
+ (12, 1, 1, 1, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 'Phone Box', 123, NULL, 0, 1, 5, 1, CURDATE()),
+ (13, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 'Phone Box', 123, NULL, 0, 3, 5, 1, CURDATE()),
+ (14, 1, 2, 1, NULL, CURDATE(), CURDATE(), 104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, CURDATE()),
+ (15, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 'Plastic Cell', 125, NULL, 0, 3, 5, 1, CURDATE()),
+ (16, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
+ (17, 1, 7, 2, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
+ (18, 1, 4, 4, 4, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 'Cerebro', 128, NULL, 0, 12, 5, 1, CURDATE()),
+ (19, 1, 5, 5, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, CURDATE()),
+ (20, 1, 5, 5, 3, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (21, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (22, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (23, NULL, 8, 1, 7, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'address 21', 121, NULL, 0, 5, 5, 1, CURDATE()),
+ (24 ,NULL, 8, 1, 7, CURDATE(), CURDATE(), 101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, CURDATE());
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `created`)
VALUES
(1 , 3, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 'Bat cave', 121, 'T1111111', 0, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
@@ -558,7 +584,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF
(16, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, CURDATE()),
(17, 1, 7, 2, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, CURDATE()),
(18, 1, 4, 4, 4, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 'Cerebro', 128, NULL, 0, 12, CURDATE()),
- (19, 1, 5, 5, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 1, 13, CURDATE()),
+ (19, 1, 5, 5, NULL, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 1, 13, CURDATE()),
(20, 1, 5, 5, 3, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 0, 13, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(21, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Holland', 102, NULL, 0, 13, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(22, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Japan', 103, NULL, 0, 13, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
@@ -599,11 +625,11 @@ INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `workerFk`, `created`)
(12, 3, 19, NOW()),
(13, 3, 19, NOW()),
(14, 3, 19, NOW()),
- (15, 3, 19, NOW()),
+ (15, 2, 19, NOW()),
(16, 3, 19, NOW()),
- (17, 3, 19, NOW()),
- (18, 3, 19, NOW()),
- (19, 3, 19, NOW()),
+ (17, 2, 19, NOW()),
+ (18, 2, 19, NOW()),
+ (19, 2, 19, NOW()),
(20, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
(21, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
(22, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
@@ -686,11 +712,13 @@ INSERT INTO `vn`.`itemType`(`id`, `code`, `name`, `categoryFk`, `life`,`workerFk
(5, 'CON', 'Container', 3, NULL, 35, 1),
(6, 'ALS', 'Alstroemeria', 1, 31, 35, 0);
-INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`)
+INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
VALUES
- ('YEL', 'Yellow', 1, 1),
- ('BLU', 'Blue', 1, 2),
- ('RED', 'Red', 1, 3);
+ ('YEL', 'Yellow', 1, 1, 'F4D03F'),
+ ('BLU', 'Blue', 1, 2, '5DADE2'),
+ ('RED', 'Red', 1, 3, 'EC7063'),
+ ('SLV', 'Silver', 1, 4, 'CACFD2'),
+ ('BRW', 'Brown', 1, 5, 'DC7633');
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
VALUES
@@ -731,25 +759,25 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
(05080000, 'Coral y materiales similares', 2, 2),
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
-INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`)
+INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`)
VALUES
- (1, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL),
- (2, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL),
- (3, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL),
- (4, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL),
- (5, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (6, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (7, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (8, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL),
- (9, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL),
- (10, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL),
- (11, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL),
- (12, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (13, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (14, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
- (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL);
+ (1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 67, 1, NULL, 0),
+ (2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66, 1, NULL, 0),
+ (3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 65, 1, NULL, 0),
+ (4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, 69, 2, NULL, 0),
+ (5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 74, 2, NULL, 0),
+ (6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 62, 2, NULL, 0),
+ (7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 64, 2, NULL, 0),
+ (8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 75, 1, NULL, 0),
+ (9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 76, 1, NULL, 0),
+ (10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 77, 1, NULL, 0),
+ (11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 78, 2, NULL, 0),
+ (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL, 0),
+ (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL, 0),
+ (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL, 0),
+ (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0),
+ (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0),
+ (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL, 0);
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
VALUES
@@ -764,6 +792,10 @@ INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `create
(9, 3, 6, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18),
(10, 7, 7, 71, CURDATE(), 1, 1, 1, 18);
+INSERT INTO `vn`.`expeditionBoxVol`(`boxFk`, `m3`, `ratio`)
+ VALUES
+ (71,0.141,1);
+
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
VALUES
(1, 0.00, 10, 10, 0, 1, CURDATE(), 6, 1.50),
@@ -775,6 +807,8 @@ INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPack
('cc', 1640038.00, 56.00, 220.00, 128.00, 1, CURDATE(), 15, 90.00),
('pallet 100', 2745600.00, 100.00, 220.00, 120.00, 1, CURDATE(), 16, 0.00);
+
+
INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, `created`, `pvp`)
VALUES
(1, 1, 2, 2, CURDATE(), NULL),
@@ -1197,8 +1231,8 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO
(4, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 50.00, 500, 'fourth travel', 0),
(5, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 2, 1, 50.00, 500, 'fifth travel', 1),
(6, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 2, 1, 50.00, 500, 'sixth travel', 1),
- (7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'seventh travel', 1),
- (8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'eight travel', 1);
+ (7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'seventh travel', 2),
+ (8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'eight travel', 1);
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isInventory`, `isRaid`, `notes`, `evaNotes`)
VALUES
@@ -1231,48 +1265,48 @@ INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `saleTotal`, `saleWa
('HankPym', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Miscellaneous Accessories', '186', '0', '0.0'),
('HankPym', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Adhesives', '277', '0', '0.0');
-INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packageFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`,`minPrice`,`producer`,`printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
+INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packageFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`,`producer`,`printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
VALUES
- (1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 1, CURDATE()),
- (4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, 0.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, 0.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, 0.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, 0.00, NULL, 0, 1, 0, 4, CURDATE()),
- (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0.00, NULL, 0, 1, 0, 4, CURDATE());
+ (1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
+ (2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, CURDATE()),
+ (4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 2.5, CURDATE()),
+ (5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, NULL, 0, 1, 0, 2.5, CURDATE()),
+ (6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 2.5, CURDATE()),
+ (7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, NULL, 0, 1, 0, 2.5, CURDATE()),
+ (8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 2.5, CURDATE()),
+ (9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
+ (10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, CURDATE()),
+ (11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
+ (12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
+ (13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, CURDATE()),
+ (14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 4, CURDATE()),
+ (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE());
-INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`, `date_make`, `first_row_stamp`, `confirm_date`)
+INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
VALUES
- (1, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 3, 1, 121, 442, NULL, 'TPV', 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (2, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 104, 3, 1, 124, 442, NULL, 'WEB', 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (3, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'ANDROID', 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (4, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'SALIX', 1, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
- (5, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 104, 1, 3, 124, 442, NULL, 'SALIX', 1, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
- (6, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 1, 3, 1, 442, NULL, 'SALIX', 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (7, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 1, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (8, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 121, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (9, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 2, 7, 124, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (10, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 3, 1, 2, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (11, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 2, 7, 122, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (12, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 3, 1, 3, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (13, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 1, 2, 123, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (14, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 1, 2, 4, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (15, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 1, 3, 125, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (16, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 2, 7, 126, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (17, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 107, 1, 4, 127, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (18, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 1, 4, 128, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (19, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 1, 5, 129, 442, NULL, 'SALIX', 0, CURDATE(), CURDATE(), CURDATE()),
- (20, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 101, 442, NULL, 'SALIX', 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (21, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 102, 442, NULL, 'SALIX', 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (22, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 103, 442, NULL, 'SALIX', 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH));
+ (1, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 3, 1, 121, 442, NULL, 'TPV', 1,'155.89', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (2, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 104, 3, 1, 124, 442, NULL, 'WEB', 1,'100.10', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (3, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'ANDROID', 1,'107.25', DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
+ (4, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
+ (5, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 104, 1, 3, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
+ (6, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 1, 3, 1, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (7, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 1, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
+ (8, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 121, 442, NULL, 'SALIX', 0,'123.53', CURDATE(), CURDATE(), CURDATE()),
+ (9, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 2, 7, 124, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
+ (10, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 3, 1, 2, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
+ (11, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 2, 7, 122, 442, NULL, 'SALIX', 0,'60.90', CURDATE(), CURDATE(), CURDATE()),
+ (12, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 3, 1, 3, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (13, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 1, 2, 123, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (14, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 1, 2, 4, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (15, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 1, 3, 125, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (16, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 2, 7, 126, 442, NULL, 'SALIX', 0,'155.89', CURDATE(), CURDATE(), CURDATE()),
+ (17, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 107, 1, 4, 127, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (18, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 1, 4, 128, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
+ (19, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 1, 5, 129, 442, NULL, 'SALIX', 0,'16.50', CURDATE(), CURDATE(), CURDATE()),
+ (20, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 101, 442, NULL, 'SALIX', 0,'21.45', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (21, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 102, 442, NULL, 'SALIX', 0,'0.00', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (22, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 103, 442, NULL, 'SALIX', 0,'148.50', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH));
INSERT INTO `hedera`.`orderRow`(`id`, `orderFk`, `itemFk`, `warehouseFk`, `shipment`, `amount`, `price`, `rate`, `created`, `saleFk`)
VALUES
diff --git a/db/dump/structure.sql b/db/dump/structure.sql
index c0052acf9..3514cb4d4 100644
--- a/db/dump/structure.sql
+++ b/db/dump/structure.sql
@@ -1910,6 +1910,7 @@ CREATE TABLE `clientNewBorn` (
`clientFk` int(11) NOT NULL,
`firstShipped` date NOT NULL COMMENT 'Primer pedido o de la relacion comercial, o después de un año de inactividad',
`lastShipped` date NOT NULL COMMENT 'último pedido del cliente',
+ `isModified` tinyint(4) DEFAULT '0',
PRIMARY KEY (`clientFk`),
CONSTRAINT `clientNewBorn_fk1` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Listado de clientes que se consideran nuevos a efectos de cobrar la comision adicional del comercial';
@@ -1925,10 +1926,10 @@ CREATE TABLE `clientNewBorn` (
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `bs`.`clientNewBorn_BEFORE_UPDATE` BEFORE UPDATE ON `clientNewBorn` FOR EACH ROW
BEGIN
--- Si ha pasado un año o mas
-IF TIMESTAMPDIFF(YEAR,NEW.lastShipped, OLD.firstShipped) THEN
-SET NEW.firstShipped = NEW.lastShipped;
-END IF;
+ -- Si ha pasado un año o mas
+ IF TIMESTAMPDIFF(YEAR,NEW.lastShipped, OLD.lastShipped) THEN
+ SET NEW.firstShipped = NEW.lastShipped;
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -2662,7 +2663,7 @@ DELIMITER ;;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `nightTask_launchAll` ON SCHEDULE EVERY 1 DAY STARTS '2017-08-27 02:00:00' ON COMPLETION NOT PRESERVE ENABLE DO CALL bs.nightTask_launchAll */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `nightTask_launchAll` ON SCHEDULE EVERY 1 DAY STARTS '2020-08-05 03:00:00' ON COMPLETION PRESERVE ENABLE DO CALL bs.nightTask_launchAll */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -3161,7 +3162,7 @@ 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 `clientNewBorn_Update__` */;
+/*!50003 DROP PROCEDURE IF EXISTS `clientNewBorn_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
@@ -3171,24 +3172,82 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `clientNewBorn_Update__`()
-BEGIN
+CREATE DEFINER=`root`@`%` PROCEDURE `clientNewBorn_recalc`()
+BLOCK1: BEGIN
- DECLARE fromDated DATE DEFAULT '2019-04-01';
-
- -- Eliminamos clientes que ya no son nuevos
- DELETE FROM bs.clientNewBorn
- WHERE shipped < TIMESTAMPADD(YEAR,-1,CURDATE());
+ DECLARE vClientFk INT;
+ DECLARE vShipped DATE;
+ DECLARE vPreviousShipped DATE;
+ DECLARE vDone boolean;
+ DECLARE cur cursor for
+
+ SELECT clientFk, firstShipped
+ FROM bs.clientNewBorn;
- -- Clientes nuevos
- REPLACE bs.clientNewBorn(clientFk,shipped)
- SELECT t.clientFk, MIN(t.shipped) as shipped
- FROM vn.ticket t
- WHERE shipped > '2001-01-01'
- GROUP BY t.clientFk
- HAVING shipped >= GREATEST(TIMESTAMPADD(YEAR,-1,CURDATE()), fromDated);
-
-END ;;
+ DECLARE continue HANDLER FOR NOT FOUND SET vDone = TRUE;
+ SET vDone := FALSE;
+
+ DELETE FROM bs.clientNewBorn WHERE isModified = FALSE;
+
+ INSERT INTO clientNewBorn(clientFk, firstShipped, lastShipped)
+ SELECT c.id, MAX(t.shipped), MAX(t.shipped)
+ FROM vn.client c
+ JOIN vn.ticket t on t.clientFk = c.id
+ LEFT JOIN clientNewBorn cb on cb.clientFk = c.id
+ WHERE t.shipped BETWEEN TIMESTAMPADD(YEAR, -1, CURDATE()) AND CURDATE() AND cb.isModified is null
+ GROUP BY c.id;
+ OPEN cur;
+
+ LOOP1: LOOP
+ SET vDone := FALSE;
+ FETCH cur INTO vClientFk, vShipped;
+
+ IF vDone THEN
+ CLOSE cur;
+ LEAVE LOOP1;
+ END IF;
+
+ BLOCK2: BEGIN
+ DECLARE vCurrentShipped DATE;
+ DECLARE vDone2 boolean;
+ DECLARE cur2 CURSOR FOR
+ SELECT shipped
+ FROM vn.ticket
+ WHERE clientFk = vClientFk AND shipped <= CURDATE()
+ ORDER BY shipped DESC;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone2 = TRUE;
+ SET vDone2 := FALSE;
+ OPEN cur2;
+
+ SET vPreviousShipped := vShipped;
+ LOOP2: LOOP
+ SET vDone2 := FALSE;
+ FETCH cur2 INTO vCurrentShipped;
+
+ IF DATEDIFF(vPreviousShipped,vCurrentShipped) > 365 THEN
+ UPDATE bs.clientNewBorn
+ SET firstShipped = vPreviousShipped
+ WHERE clientFk= vClientFk;
+
+ CLOSE cur2;
+ LEAVE LOOP2;
+ END IF;
+
+ SET vPreviousShipped := vCurrentShipped;
+
+ IF vDone2 THEN
+ UPDATE bs.clientNewBorn
+ SET firstShipped = vCurrentShipped
+ WHERE clientFk= vClientFk;
+ CLOSE cur2;
+ LEAVE LOOP2;
+ END IF;
+
+ END LOOP LOOP2;
+ END BLOCK2;
+ END LOOP LOOP1;
+END BLOCK1 ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
@@ -3205,6 +3264,131 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `comercialesCompleto`(IN vWorker INT, vDate DATE)
+BEGIN
+ DECLARE vAYearAgoStarted DATE DEFAULT DATE_FORMAT(TIMESTAMPADD(YEAR, - 1, vDate), '%Y-%m-01');
+ DECLARE vAYearAgoEnded DATE DEFAULT TIMESTAMPADD(YEAR, - 1, LAST_DAY(vDate));
+
+ CALL vn.worker_GetHierarchy(vWorker);
+
+ INSERT IGNORE INTO tmp.workerHierarchyList (workerFk)
+ SELECT wd2.workerFk
+ FROM vn.workerDepartment wd2
+ WHERE wd2.workerFk = vWorker;
+
+ -- Falta que en algunos casos solo tenga en cuenta los tipos afectados.
+ SELECT
+ c.Id_Cliente id_cliente,
+ c.calidad,
+ c.Cliente cliente,
+ cr.recobro * 100 tarifa,
+ c.Telefono telefono,
+ c.movil,
+ c.POBLACION poblacion,
+ p.`name` provincia,
+ vn2008.red(f.futur) futur,
+ c.Credito credito,
+ pm.`name` forma_pago,
+ vn2008.red(c365 / 12) consumo_medio365,
+ vn2008.red(c365) consumo365,
+ vn2008.red(CmLy.peso) peso_mes_año_pasado,
+ vn2008.red(CmLy.peso * 1.19) objetivo,
+ tr.CodigoTrabajador,
+ vn2008.red(mes_actual.consumo) consumoMes,
+ vn2008.red(IFNULL(mes_actual.consumo, 0) - IFNULL(CmLy.peso * 1.19, 0)) como_lo_llevo,
+ DATE(LastTicket) ultimo_ticket,
+ dead.muerto,
+ g.Greuge,
+ cr.recobro
+ FROM
+ vn2008.Clientes c
+ LEFT JOIN
+ (SELECT g.Id_Cliente, CAST( SUM(Importe) as DECIMAL(12,2)) AS Greuge
+ FROM vn2008.Greuges g
+ JOIN vn.`client` c ON c.id = g.Id_Cliente
+ LEFT JOIN vn.worker w ON c.salesPersonFk = w.id
+ WHERE (c.salesPersonFk = vWorker OR w.bossFk = vWorker)
+ GROUP BY Id_Cliente
+ ) g ON g.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ vn2008.province p ON p.province_id = c.province_id
+ JOIN
+ vn2008.pay_met pm ON pm.id = c.pay_met_id
+ LEFT JOIN
+ vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ LEFT JOIN
+ bi.claims_ratio cr on cr.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ (SELECT v.Id_Cliente, SUM(importe) c365 -- optimizat de 6s /5.3s/ 4.7s a 0.3/0.4/0.3
+ FROM bs.ventas v
+ JOIN vn2008.Clientes c ON c.Id_Cliente = v.Id_Cliente
+ WHERE v.fecha BETWEEN TIMESTAMPADD(YEAR, - 1, vDate) AND vDate
+ GROUP BY v.Id_Cliente) c365 ON c365.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ (SELECT
+ Id_Cliente, SUM(importe) consumo
+ FROM
+ bs.ventas v
+ INNER JOIN vn2008.Clientes c USING (Id_Cliente)
+ LEFT JOIN vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ WHERE
+ (c.Id_Trabajador = vWorker OR tr.boss = vWorker)
+ AND (v.fecha BETWEEN TIMESTAMPADD(DAY, - DAY(vDate) + 1, vDate) AND TIMESTAMPADD(DAY, - 1, vDate))
+ GROUP BY Id_Cliente) mes_actual ON mes_actual.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ (SELECT t.Id_Cliente, SUM(m.preu * m.Cantidad * (1 - m.Descuento / 100)) futur
+ FROM vn2008.Tickets t
+ JOIN vn2008.Clientes c ON c.Id_Cliente = t.Id_Cliente
+ JOIN vn2008.Movimientos m ON m.Id_Ticket = t.Id_Ticket
+ LEFT JOIN vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ WHERE
+ (c.Id_Trabajador = vWorker OR tr.boss = vWorker)
+ AND t.Fecha BETWEEN vDate AND util.dayEnd(LAST_DAY(vDate))
+ GROUP BY Id_Cliente) f ON c.Id_Cliente = f.Id_Cliente
+ LEFT JOIN
+ (SELECT MAX(t.Fecha) LastTicket, c.Id_Cliente
+ FROM vn2008.Tickets t
+ JOIN vn2008.Clientes c ON c.Id_cliente = t.Id_Cliente
+ LEFT JOIN vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ WHERE
+ (c.Id_Trabajador = vWorker OR tr.boss = vWorker)
+ GROUP BY t.Id_Cliente) LastTicket ON LastTicket.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ (
+ SELECT SUM(importe) peso, c.Id_Cliente
+ FROM bs.ventas v
+ JOIN vn2008.Clientes c ON c.Id_Cliente = v.Id_Cliente
+ LEFT JOIN vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ WHERE fecha BETWEEN vAYearAgoStarted and vAYearAgoEnded
+ AND (c.Id_Trabajador = vWorker OR tr.boss = vWorker)
+ GROUP BY c.Id_Cliente) CmLy ON CmLy.Id_Cliente = c.Id_Cliente
+ LEFT JOIN
+ (SELECT c.Id_Cliente,
+ IF(MAX(Fecha) < DATE_FORMAT(TIMESTAMPADD(MONTH, - 1, vDate), '%Y- %m-01'), TRUE, FALSE) muerto
+ FROM vn2008.Facturas f
+ JOIN vn2008.Clientes c ON c.Id_cliente = f.Id_Cliente
+ LEFT JOIN vn2008.Trabajadores tr ON c.Id_Trabajador = tr.Id_Trabajador
+ WHERE (c.Id_Trabajador = vWorker OR tr.boss = vWorker)
+ GROUP BY Id_Cliente) dead ON dead.Id_Cliente = c.Id_Cliente
+ JOIN tmp.workerHierarchyList s ON s.workerFk = c.Id_Trabajador;
+
+ DROP TEMPORARY TABLE tmp.workerHierarchyList;
+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 `comercialesCompleto__` */;
+/*!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 `comercialesCompleto__`(IN vWorker INT, vDate DATE)
BEGIN
CALL vn.worker_GetHierarchy(vWorker);
@@ -3348,17 +3532,17 @@ 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 `comercialesCompleto__` */;
+/*!50003 DROP PROCEDURE IF EXISTS `comercialesCompleto___` */;
/*!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 `comercialesCompleto__`(IN vWorker INT, vDate DATE)
+CREATE DEFINER=`root`@`%` PROCEDURE `comercialesCompleto___`(IN vWorker INT, vDate DATE)
BEGIN
CALL vn.worker_GetHierarchy(vWorker);
@@ -4141,16 +4325,16 @@ BEGIN
* La tabla mana_spellers es una caché
*
*/
-
- UPDATE mana_spellers me
- JOIN
- (SELECT Id_Trabajador, FLOOR(SUM(importe)/12) as pesoCarteraMensual
- FROM bs.vendedores
- WHERE año * 100 + mes >= (YEAR(CURDATE()) -1) * 100 + MONTH(CURDATE())
- GROUP BY Id_Trabajador
- ) lastYearSales USING(Id_Trabajador)
- SET me.prices_modifier_rate = GREATEST(me.minRate,LEAST(me.maxRate,ROUND(- me.used/lastYearSales.pesoCarteraMensual,3))) ;
-
+
+ UPDATE mana_spellers me
+ JOIN
+ (SELECT Id_Trabajador, FLOOR(SUM(importe)/12) as pesoCarteraMensual
+ FROM bs.vendedores
+ WHERE año * 100 + mes >= (YEAR(CURDATE()) -1) * 100 + MONTH(CURDATE())
+ GROUP BY Id_Trabajador
+ ) lastYearSales USING(Id_Trabajador)
+ SET me.prices_modifier_rate = GREATEST(me.minRate,LEAST(me.maxRate,ROUND(- me.used/lastYearSales.pesoCarteraMensual,3))) ;
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6078,14 +6262,14 @@ DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
-/*!50003 SET character_set_client = utf8mb4 */ ;;
-/*!50003 SET character_set_results = utf8mb4 */ ;;
-/*!50003 SET collation_connection = utf8mb4_unicode_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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `cacheCalc_clean` ON SCHEDULE EVERY 30 MINUTE STARTS '2017-01-23 13:15:58' ON COMPLETION NOT PRESERVE ENABLE DO CALL cacheCalc_clean */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `cacheCalc_clean` ON SCHEDULE EVERY 30 MINUTE STARTS '2017-01-23 13:15:58' ON COMPLETION NOT PRESERVE ENABLE DO CALL cacheCalc_clean */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -6096,14 +6280,14 @@ DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
-/*!50003 SET character_set_client = utf8mb4 */ ;;
-/*!50003 SET character_set_results = utf8mb4 */ ;;
-/*!50003 SET collation_connection = utf8mb4_unicode_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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `cache_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2019-04-29 13:06:16' ON COMPLETION NOT PRESERVE ENABLE DO CALL cache_clean */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `cache_clean` ON SCHEDULE EVERY 5 MINUTE STARTS '2019-04-29 13:06:16' ON COMPLETION NOT PRESERVE ENABLE DO CALL cache_clean */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -6312,9 +6496,9 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cacheCalc_clean`()
-BEGIN
- DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW());
- DELETE FROM cache_calc WHERE expires < vCleanTime;
+BEGIN
+ DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW());
+ DELETE FROM cache_calc WHERE expires < vCleanTime;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6332,27 +6516,27 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_end`(IN `v_calc` INT)
-BEGIN
- DECLARE v_cache_name VARCHAR(255);
- DECLARE v_params VARCHAR(255);
-
- -- Libera el bloqueo y actualiza la fecha de ultimo refresco.
-
- UPDATE cache_calc cc JOIN cache c ON c.id = cc.cache_id
- SET
- cc.last_refresh = NOW(),
- cc.expires = ADDTIME(NOW(), c.lifetime),
- cc.connection_id = NULL
- WHERE cc.id = v_calc;
-
- SELECT c.name, ca.params INTO v_cache_name, v_params
- FROM cache c
- JOIN cache_calc ca ON c.id = ca.cache_id
- WHERE ca.id = v_calc;
-
- IF v_cache_name IS NOT NULL THEN
- DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
- END IF;
+BEGIN
+ DECLARE v_cache_name VARCHAR(255);
+ DECLARE v_params VARCHAR(255);
+
+ -- Libera el bloqueo y actualiza la fecha de ultimo refresco.
+
+ UPDATE cache_calc cc JOIN cache c ON c.id = cc.cache_id
+ SET
+ cc.last_refresh = NOW(),
+ cc.expires = ADDTIME(NOW(), c.lifetime),
+ cc.connection_id = NULL
+ WHERE cc.id = v_calc;
+
+ SELECT c.name, ca.params INTO v_cache_name, v_params
+ FROM cache c
+ JOIN cache_calc ca ON c.id = ca.cache_id
+ WHERE ca.id = v_calc;
+
+ IF v_cache_name IS NOT NULL THEN
+ DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
+ END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6370,88 +6554,88 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100))
-proc: BEGIN
- DECLARE v_valid BOOL;
- DECLARE v_lock_id VARCHAR(100);
- DECLARE v_cache_id INT;
- DECLARE v_expires DATETIME;
- DECLARE v_clean_time DATETIME;
-
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- IF v_lock_id IS NOT NULL THEN
- DO RELEASE_LOCK(v_lock_id);
- END IF;
-
- RESIGNAL;
- END;
-
- SET v_params = IFNULL(v_params, '');
-
- -- Si el servidor se ha reiniciado invalida todos los calculos.
-
- SELECT COUNT(*) > 0 INTO v_valid FROM cache_valid;
-
- IF !v_valid
- THEN
- DELETE FROM cache_calc;
- INSERT INTO cache_valid (valid) VALUES (TRUE);
- END IF;
-
- -- Obtiene un bloqueo exclusivo para que no haya problemas de concurrencia.
-
- SET v_lock_id = CONCAT_WS('/', v_cache_name, v_params);
-
- IF !GET_LOCK(v_lock_id, 30)
- THEN
- SET v_calc = NULL;
- SET v_refresh = FALSE;
- LEAVE proc;
- END IF;
-
- -- Comprueba si el calculo solicitado existe y esta actualizado.
-
- SELECT c.id, ca.id, ca.expires
- INTO v_cache_id, v_calc, v_expires
- FROM cache c
- LEFT JOIN cache_calc ca
- ON ca.cache_id = c.id AND ca.params = v_params COLLATE 'utf8_general_ci'
- WHERE c.name = v_cache_name COLLATE 'utf8_general_ci';
-
- -- Si existe una calculo valido libera el bloqueo y devuelve su identificador.
-
- IF !v_refresh AND NOW() < v_expires
- THEN
- DO RELEASE_LOCK(v_lock_id);
- SET v_refresh = FALSE;
- LEAVE proc;
- END IF;
-
- -- Si el calculo no existe le crea una entrada en la tabla de calculos.
-
- IF v_calc IS NULL
- THEN
- INSERT INTO cache_calc SET
- cache_id = v_cache_id,
- cacheName = v_cache_name,
- params = v_params,
- last_refresh = NULL,
- expires = NULL,
- connection_id = CONNECTION_ID();
-
- SET v_calc = LAST_INSERT_ID();
- ELSE
- UPDATE cache_calc
- SET
- last_refresh = NULL,
- expires = NULL,
- connection_id = CONNECTION_ID()
- WHERE id = v_calc;
- END IF;
-
- -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador.
-
- SET v_refresh = TRUE;
+proc: BEGIN
+ DECLARE v_valid BOOL;
+ DECLARE v_lock_id VARCHAR(100);
+ DECLARE v_cache_id INT;
+ DECLARE v_expires DATETIME;
+ DECLARE v_clean_time DATETIME;
+
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION
+ BEGIN
+ IF v_lock_id IS NOT NULL THEN
+ DO RELEASE_LOCK(v_lock_id);
+ END IF;
+
+ RESIGNAL;
+ END;
+
+ SET v_params = IFNULL(v_params, '');
+
+ -- Si el servidor se ha reiniciado invalida todos los calculos.
+
+ SELECT COUNT(*) > 0 INTO v_valid FROM cache_valid;
+
+ IF !v_valid
+ THEN
+ DELETE FROM cache_calc;
+ INSERT INTO cache_valid (valid) VALUES (TRUE);
+ END IF;
+
+ -- Obtiene un bloqueo exclusivo para que no haya problemas de concurrencia.
+
+ SET v_lock_id = CONCAT_WS('/', v_cache_name, v_params);
+
+ IF !GET_LOCK(v_lock_id, 30)
+ THEN
+ SET v_calc = NULL;
+ SET v_refresh = FALSE;
+ LEAVE proc;
+ END IF;
+
+ -- Comprueba si el calculo solicitado existe y esta actualizado.
+
+ SELECT c.id, ca.id, ca.expires
+ INTO v_cache_id, v_calc, v_expires
+ FROM cache c
+ LEFT JOIN cache_calc ca
+ ON ca.cache_id = c.id AND ca.params = v_params COLLATE 'utf8_general_ci'
+ WHERE c.name = v_cache_name COLLATE 'utf8_general_ci';
+
+ -- Si existe una calculo valido libera el bloqueo y devuelve su identificador.
+
+ IF !v_refresh AND NOW() < v_expires
+ THEN
+ DO RELEASE_LOCK(v_lock_id);
+ SET v_refresh = FALSE;
+ LEAVE proc;
+ END IF;
+
+ -- Si el calculo no existe le crea una entrada en la tabla de calculos.
+
+ IF v_calc IS NULL
+ THEN
+ INSERT INTO cache_calc SET
+ cache_id = v_cache_id,
+ cacheName = v_cache_name,
+ params = v_params,
+ last_refresh = NULL,
+ expires = NULL,
+ connection_id = CONNECTION_ID();
+
+ SET v_calc = LAST_INSERT_ID();
+ ELSE
+ UPDATE cache_calc
+ SET
+ last_refresh = NULL,
+ expires = NULL,
+ connection_id = CONNECTION_ID()
+ WHERE id = v_calc;
+ END IF;
+
+ -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador.
+
+ SET v_refresh = TRUE;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6469,24 +6653,24 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_unlock`(IN `v_calc` INT)
-proc: BEGIN
- DECLARE v_cache_name VARCHAR(50);
- DECLARE v_params VARCHAR(100);
-
- IF v_calc IS NULL THEN
- LEAVE proc;
- END IF;
-
- SELECT c.name, ca.params INTO v_cache_name, v_params
- FROM cache c
- JOIN cache_calc ca ON c.id = ca.cache_id
- WHERE ca.id = v_calc;
-
- DELETE FROM cache_calc WHERE id = v_calc;
-
- IF v_cache_name IS NOT NULL THEN
- DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
- END IF;
+proc: BEGIN
+ DECLARE v_cache_name VARCHAR(50);
+ DECLARE v_params VARCHAR(100);
+
+ IF v_calc IS NULL THEN
+ LEAVE proc;
+ END IF;
+
+ SELECT c.name, ca.params INTO v_cache_name, v_params
+ FROM cache c
+ JOIN cache_calc ca ON c.id = ca.cache_id
+ WHERE ca.id = v_calc;
+
+ DELETE FROM cache_calc WHERE id = v_calc;
+
+ IF v_cache_name IS NOT NULL THEN
+ DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
+ END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6505,9 +6689,9 @@ DELIMITER ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_clean`()
NO SQL
-BEGIN
- CALL available_clean;
- CALL visible_clean;
+BEGIN
+ CALL available_clean;
+ CALL visible_clean;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -6525,13 +6709,13 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clean`()
-BEGIN
-
- DECLARE vDateShort DATETIME;
-
- SET vDateShort = TIMESTAMPADD(MONTH, -1, CURDATE());
-
- DELETE FROM cache.departure_limit WHERE Fecha < vDateShort;
+BEGIN
+
+ DECLARE vDateShort DATETIME;
+
+ SET vDateShort = TIMESTAMPADD(MONTH, -1, CURDATE());
+
+ DELETE FROM cache.departure_limit WHERE Fecha < vDateShort;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -7208,9 +7392,9 @@ CREATE TABLE `bucket` (
`bucket_id` int(11) unsigned NOT NULL,
`bucket_type_id` mediumint(8) unsigned NOT NULL,
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
- `x_size` mediumint(8) unsigned NOT NULL,
- `y_size` mediumint(8) unsigned NOT NULL,
- `z_size` mediumint(8) unsigned NOT NULL,
+ `x_size` mediumint(8) unsigned NOT NULL COMMENT 'mm',
+ `y_size` mediumint(8) unsigned NOT NULL COMMENT 'mm',
+ `z_size` mediumint(8) unsigned NOT NULL COMMENT 'mm',
`entry_date` date DEFAULT NULL,
`expiry_date` date DEFAULT NULL,
`change_date_time` datetime DEFAULT NULL,
@@ -7392,7 +7576,8 @@ CREATE TABLE `feature` (
`entry_date` date NOT NULL,
`expiry_date` date NOT NULL,
`change_date_time` datetime NOT NULL,
- PRIMARY KEY (`item_id`,`feature_type_id`)
+ PRIMARY KEY (`item_id`,`feature_type_id`),
+ KEY `feature_ix1` (`feature_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='/tmp/floricode/florecompc2/FF130916.txt';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -7570,7 +7755,7 @@ CREATE TABLE `item_groupToOffer` (
`itemTypeFk` smallint(5) unsigned NOT NULL,
`intrastatFk` int(8) unsigned zerofill NOT NULL,
`originFk` tinyint(2) unsigned NOT NULL DEFAULT '17',
- `expenseFk` varchar(10) COLLATE utf8_unicode_ci DEFAULT '6001000001',
+ `expenseFk` varchar(10) COLLATE utf8_unicode_ci DEFAULT '7001000000',
PRIMARY KEY (`group_code`),
KEY `item_groupToOffer_fk2_idx` (`itemTypeFk`),
KEY `item_groupToOffer_fk3_idx` (`intrastatFk`),
@@ -7658,7 +7843,11 @@ CREATE TABLE `marketPlace` (
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`supplierFk` int(11) NOT NULL DEFAULT '1433',
`isOffered` tinyint(2) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
+ `MaxLatestDeliveryHour` int(11) DEFAULT NULL COMMENT 'Maxima hora para tener en cuenta la oferta',
+ `isLatestOrderDateTimeRelevant` tinyint(2) DEFAULT '0' COMMENT 'Se tiene en cuenta para calcular el próximo travel posible',
+ PRIMARY KEY (`id`),
+ KEY `marketPlaceisOfferedIdx` (`isOffered`),
+ KEY `marketPlaceMaxLatestIdx` (`MaxLatestDeliveryHour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -7746,6 +7935,50 @@ 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 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 ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `edi`.`putOrder_AFTER_UPDATE` AFTER UPDATE ON `putOrder` FOR EACH ROW
+BEGIN
+ DECLARE vSaleFk INT;
+ DECLARE vOrderStatusDenied INT DEFAULT 3;
+ IF NEW.OrderStatus = vOrderStatusDenied AND NOT (NEW.OrderStatus <=> OLD.OrderStatus) THEN
+ SELECT s.id INTO vSaleFk
+ FROM vn.sale s
+ JOIN vn.ticket t ON s.ticketFk = t.id
+ JOIN vn.item i ON i.id = s.itemFk
+ JOIN deliveryInformation di ON di.ID = NEW.deliveryInformationID
+ WHERE t.clientFk = NEW.EndUserPartyGLN AND t.shipped >= CURDATE()
+ AND i.supplyResponseFk = NEW.supplyResponseID;
+
+ UPDATE vn.sale s
+ SET s.quantity = 0
+ WHERE s.id = vSaleFk;
+
+ INSERT INTO vn.mail (sender, `subject`, body)
+ SELECT CONCAT(account.userGetNameFromId(c.salesPersonFk), '@verdnatura.es'),
+ 'Error con disponible Floramondo',
+ CONCAT('El articulo ', s.concept, ' del ticket ', t.id ,
+ ' ha sido cancelado por Floramondo. ',
+ ' Se ha actualizado la cantidad a 0. ',
+ 'https://salix.verdnatura.es/#!/ticket/', t.id ,'/summary')
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.`client` c ON c.id = t.clientFk
+ WHERE s.id = vSaleFk;
+ END IF;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `specie`
@@ -7784,6 +8017,52 @@ 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 table structure for view `supplyOffer__`
+--
+
+DROP TABLE IF EXISTS `supplyOffer__`;
+/*!50001 DROP VIEW IF EXISTS `supplyOffer__`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!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 `group_id`,
+ 1 AS `marketPlace`,
+ 1 AS `DeliveryPrice`,
+ 1 AS `ChargeAmount`,
+ 1 AS `MinimumQuantity`,
+ 1 AS `MaximumQuantity`,
+ 1 AS `OrderUnit`,
+ 1 AS `IncrementalOrderUnit`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `supplyResponse`
--
@@ -7844,7 +8123,10 @@ 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',
- KEY `supplyResponse_Ix1` (`Item_ArticleCode`)
+ KEY `supplyResponse_Ix1` (`Item_ArticleCode`),
+ KEY `supplyResponseMarcketIdx` (`MarketPlaceID`),
+ KEY `supplyResponseNumberOfUnitsIdx` (`NumberOfUnits`),
+ KEY `supplyResponseEmbalageCodeIdx` (`EmbalageCode`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -7895,12 +8177,12 @@ DELIMITER ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
/*!50003 SET character_set_client = utf8mb4 */ ;;
/*!50003 SET character_set_results = utf8mb4 */ ;;
-/*!50003 SET collation_connection = utf8mb4_general_ci */ ;;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `floramondo` ON SCHEDULE EVERY 5 MINUTE STARTS '2020-06-25 13:39:59' ON COMPLETION NOT PRESERVE ENABLE DO CALL edi.floramondo_offerRefresh() */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `floramondo` ON SCHEDULE EVERY 5 MINUTE STARTS '2020-07-29 01:58:29' ON COMPLETION NOT PRESERVE ENABLE DO CALL edi.floramondo_offerRefresh() */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -8027,10 +8309,10 @@ BEGIN
DELETE FROM ekt WHERE fec < vFourYearsAgo;
- DELETE sr.*
+ DELETE IGNORE sr.*
FROM supplyResponse sr
- JOIN edi.deliveryInformation di ON sr.ID = di.supplyResponseID
- WHERE di.LatestOrderDateTime < vOneWeekAgo;
+ LEFT JOIN edi.deliveryInformation di ON sr.ID = di.supplyResponseID
+ WHERE di.LatestOrderDateTime < vOneWeekAgo OR di.ID IS NULL;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8433,154 +8715,154 @@ CREATE DEFINER=`root`@`%` PROCEDURE `exchange_new`(
IN `vAuction` SMALLINT,
IN `vPackage` INT,
IN `vPutOrderFk` INT)
-BEGIN
+BEGIN
/**
* Adds a new exchange, generates it's barcode and
* inserts/updates the transaction. When the referenced
* transaction exists as provisional, updates it with
- * the new values.
- */
- DECLARE vEkt INT;
- DECLARE vRewriteKop INT DEFAULT NULL;
- DECLARE vBarcode CHAR(15) DEFAULT NULL;
- DECLARE vIsDuplicated BOOL;
+ * the new values.
+ */
+ DECLARE vEkt INT;
+ DECLARE vRewriteKop INT DEFAULT NULL;
+ DECLARE vBarcode CHAR(15) DEFAULT NULL;
+ DECLARE vIsDuplicated BOOL;
DECLARE vUpdateExistent BOOL DEFAULT FALSE;
- DECLARE duplicateKey CONDITION FOR 1062;
-
- DECLARE CONTINUE HANDLER FOR duplicateKey
- SET vIsDuplicated = TRUE;
-
- -- Generates the barcode
-
- IF vAgj != 0 AND vAgj IS NOT NULL
- THEN
- SET vBarcode = CONCAT(
- LPAD(vAuction, 2, 0),
- LPAD(IFNULL(vClock, 99), 2, 0),
- LPAD(DAYOFYEAR(vDate), 3, 0),
- IF(vClock IS NULL OR vClock = 99,
- LPAD(vAgj, 7, 0),
- CONCAT(LPAD(vAgj, 5, 0), '01')
- ),
- '0'
- );
- END IF;
-
- -- Rewrites the kop parameter
-
- IF vKop IS NULL THEN
- SELECT defaultKop INTO vKop FROM exchangeConfig;
- END IF;
-
- SELECT e.kop INTO vRewriteKop
- FROM mailSender e
- JOIN mail m ON m.senderFk = e.id
- WHERE m.id = vMailFk;
-
- SET vKop = IFNULL(vRewriteKop, vKop);
-
- -- Inserts the new transaction
+ DECLARE duplicateKey CONDITION FOR 1062;
- SET vIsDuplicated = FALSE;
- INSERT INTO ekt SET
- barcode = IFNULL(vBarcode, barcode)
- ,deliveryNumber = vDeliveryNumber
- ,entryYear = YEAR(vDate)
- ,fec = vDate
- ,hor = vHour
- ,ref = vRef
- ,item = vItem
- ,agj = vAgj
- ,cat = vCat
- ,pac = vPac
- ,sub = vSub
- ,kop = vKop
- ,ptd = vPtd
- ,pro = vPro
- ,ori = vOrigin
- ,ptj = vPtj
- ,qty = vQuantiy
- ,pri = vPrice
- ,klo = vClock
- ,s1 = vS1
- ,s2 = vS2
- ,s3 = vS3
- ,s4 = vS4
- ,s5 = vS5
- ,s6 = vS6
- ,k1 = vK1
- ,k2 = vK2
- ,k3 = vP1
- ,k4 = vP2
- ,auction = vAuction
- ,package = vPackage
- ,putOrderFk = vPutOrderFk;
-
- -- If it exists duplicado updates it
-
- IF NOT vIsDuplicated
- THEN
- SET vEkt = LAST_INSERT_ID();
- CALL ekt_load (vEkt);
-
- ELSEIF vDeliveryNumber != 0
- AND vDeliveryNumber IS NOT NULL
- THEN
- SELECT id INTO vEkt
- FROM ekt
- WHERE deliveryNumber = vDeliveryNumber;
-
- SELECT COUNT(*) = 0 INTO vUpdateExistent
- FROM ekt t
- JOIN `exchange` b ON b.ektFk = t.id
- JOIN exchangeConfig c
- WHERE t.deliveryNumber = vDeliveryNumber
- AND t.entryYear = YEAR(vDate)
- AND b.typeFk != c.presaleFk;
- END IF;
-
- IF vUpdateExistent
- THEN
- UPDATE ekt SET
- barcode = IFNULL(vBarcode, barcode)
- ,fec = vDate
- ,hor = vHour
- ,ref = vRef
- ,item = vItem
- ,agj = vAgj
- ,cat = vCat
- ,pac = vPac
- ,sub = vSub
- ,kop = vKop
- ,ptd = vPtd
- ,pro = vPro
- ,ori = vOrigin
- ,ptj = vPtj
- ,qty = vQuantiy
- ,pri = vPrice
- ,klo = vClock
- ,s1 = vS1
- ,s2 = vS2
- ,s3 = vS3
- ,s4 = vS4
- ,s5 = vS5
- ,s6 = vS6
- ,k1 = vK1
- ,k2 = vK2
- ,k3 = vP1
- ,k4 = vP2
- ,auction = vAuction
- ,package = vPackage
- ,putOrderFk = vPutOrderFk
- WHERE id = vEkt;
- END IF;
-
- -- Registers the exchange
-
- INSERT INTO `exchange` SET
- mailFk = vMailFk
- ,typeFk = vType
- ,ektFk = vEkt;
+ DECLARE CONTINUE HANDLER FOR duplicateKey
+ SET vIsDuplicated = TRUE;
+
+ -- Generates the barcode
+
+ IF vAgj != 0 AND vAgj IS NOT NULL
+ THEN
+ SET vBarcode = CONCAT(
+ LPAD(vAuction, 2, 0),
+ LPAD(IFNULL(vClock, 99), 2, 0),
+ LPAD(DAYOFYEAR(vDate), 3, 0),
+ IF(vClock IS NULL OR vClock = 99,
+ LPAD(vAgj, 7, 0),
+ CONCAT(LPAD(vAgj, 5, 0), '01')
+ ),
+ '0'
+ );
+ END IF;
+
+ -- Rewrites the kop parameter
+
+ IF vKop IS NULL THEN
+ SELECT defaultKop INTO vKop FROM exchangeConfig;
+ END IF;
+
+ SELECT e.kop INTO vRewriteKop
+ FROM mailSender e
+ JOIN mail m ON m.senderFk = e.id
+ WHERE m.id = vMailFk;
+
+ SET vKop = IFNULL(vRewriteKop, vKop);
+
+ -- Inserts the new transaction
+
+ SET vIsDuplicated = FALSE;
+ INSERT INTO ekt SET
+ barcode = IFNULL(vBarcode, barcode)
+ ,deliveryNumber = vDeliveryNumber
+ ,entryYear = YEAR(vDate)
+ ,fec = vDate
+ ,hor = vHour
+ ,ref = vRef
+ ,item = vItem
+ ,agj = vAgj
+ ,cat = vCat
+ ,pac = vPac
+ ,sub = vSub
+ ,kop = vKop
+ ,ptd = vPtd
+ ,pro = vPro
+ ,ori = vOrigin
+ ,ptj = vPtj
+ ,qty = vQuantiy
+ ,pri = vPrice
+ ,klo = vClock
+ ,s1 = vS1
+ ,s2 = vS2
+ ,s3 = vS3
+ ,s4 = vS4
+ ,s5 = vS5
+ ,s6 = vS6
+ ,k1 = vK1
+ ,k2 = vK2
+ ,k3 = vP1
+ ,k4 = vP2
+ ,auction = vAuction
+ ,package = vPackage
+ ,putOrderFk = vPutOrderFk;
+
+ -- If it exists duplicado updates it
+
+ IF NOT vIsDuplicated
+ THEN
+ SET vEkt = LAST_INSERT_ID();
+ CALL ekt_load (vEkt);
+
+ ELSEIF vDeliveryNumber != 0
+ AND vDeliveryNumber IS NOT NULL
+ THEN
+ SELECT id INTO vEkt
+ FROM ekt
+ WHERE deliveryNumber = vDeliveryNumber;
+
+ SELECT COUNT(*) = 0 INTO vUpdateExistent
+ FROM ekt t
+ JOIN `exchange` b ON b.ektFk = t.id
+ JOIN exchangeConfig c
+ WHERE t.deliveryNumber = vDeliveryNumber
+ AND t.entryYear = YEAR(vDate)
+ AND b.typeFk != c.presaleFk;
+ END IF;
+
+ IF vUpdateExistent
+ THEN
+ UPDATE ekt SET
+ barcode = IFNULL(vBarcode, barcode)
+ ,fec = vDate
+ ,hor = vHour
+ ,ref = vRef
+ ,item = vItem
+ ,agj = vAgj
+ ,cat = vCat
+ ,pac = vPac
+ ,sub = vSub
+ ,kop = vKop
+ ,ptd = vPtd
+ ,pro = vPro
+ ,ori = vOrigin
+ ,ptj = vPtj
+ ,qty = vQuantiy
+ ,pri = vPrice
+ ,klo = vClock
+ ,s1 = vS1
+ ,s2 = vS2
+ ,s3 = vS3
+ ,s4 = vS4
+ ,s5 = vS5
+ ,s6 = vS6
+ ,k1 = vK1
+ ,k2 = vK2
+ ,k3 = vP1
+ ,k4 = vP2
+ ,auction = vAuction
+ ,package = vPackage
+ ,putOrderFk = vPutOrderFk
+ WHERE id = vEkt;
+ END IF;
+
+ -- Registers the exchange
+
+ INSERT INTO `exchange` SET
+ mailFk = vMailFk
+ ,typeFk = vType
+ ,ektFk = vEkt;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8599,21 +8881,33 @@ DELIMITER ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `floramondo_offerRefresh`()
BEGIN
- DECLARE vLanded DATE;
+ DECLARE vLanded DATETIME;
+ DECLARE done INT DEFAULT FALSE;
+ DECLARE vFreeId INT;
+ DECLARE vSupplyResponseFk INT;
+ DECLARE vLastInserted DATETIME;
+ DECLARE cur1 CURSOR FOR
+ SELECT newId
+ FROM vn.item_Free_Id;
+
+ DECLARE cur2 CURSOR FOR
+ SELECT srId
+ FROM itemToInsert;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
DROP TEMPORARY TABLE IF EXISTS tmp;
- CREATE TEMPORARY TABLE tmp ENGINE = MEMORY
+ CREATE TEMPORARY TABLE tmp (INDEX (`Item_ArticleCode`)) ENGINE = MEMORY
SELECT * FROM (
SELECT *
FROM edi.supplyOffer
- JOIN edi.marketPlace mp ON mp.id = MarketPlaceID
- WHERE mp.isOffered = TRUE
ORDER BY NumberOfUnits DESC) t
JOIN edi.item_groupToOffer igo ON igo.group_code = t.group_id
- GROUP BY Item_ArticleCode, s1, s2, s3, s4, s5, s6;
+ GROUP BY Item_ArticleCode, s1, s2, s3, s4, s5, s6, company_name, Price, Quality, NumberOfItemsPerCask, EmbalageCode;
DROP TEMPORARY TABLE IF EXISTS edi.offer;
- CREATE TEMPORARY TABLE edi.offer ENGINE = MEMORY
+ CREATE TEMPORARY TABLE edi.offer (INDEX (`srID`), INDEX (`EmbalageCode`)) ENGINE = MEMORY
SELECT so.*, ev1.type_description s1Value, ev2.type_description s2Value, ev3.type_description s3Value,
ev4.type_description s4Value, ev5.type_description s5Value, ev6.type_description s6Value,
eif1.feature ef1, eif2.feature ef2, eif3.feature ef3, eif4.feature ef4, eif5.feature ef5, eif6.feature ef6
@@ -8625,7 +8919,7 @@ BEGIN
LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode
AND eif3.presentation_order = 3 AND eif3.expiry_date IS NULL
LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode
- AND eif4.presentation_order = 4 AND eif4.expiry_date IS NULL
+ AND eif4.presentation_order = 4 AND eif4.expiry_date IS NULL
LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode
AND eif5.presentation_order = 5 AND eif5.expiry_date IS NULL
LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode
@@ -8640,38 +8934,93 @@ BEGIN
DROP TEMPORARY TABLE tmp;
-- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos
- UPDATE edi.offer o
+ UPDATE IGNORE edi.offer o
+ LEFT JOIN vn.item iExist ON iExist.supplyResponseFk = o.srID
JOIN vn.item i ON i.name = o.product_name
- AND value5 <=> s1Value AND value6 <=> s2Value
- AND value7 <=> s3Value AND value8 <=> s4Value
- AND value9 <=> s5Value AND value10 <=> s6Value
- SET i.supplyResponseFk = o.srID;
-
+ AND i.subname <=> o.company_name
+ AND i.value5 <=> o.s1Value
+ AND i.value6 <=> o.s2Value
+ AND i.value7 <=> o.s3Value
+ AND i.value8 <=> o.s4Value
+ AND i.value9 <=> o.s5Value
+ AND i.value10 <=> o.s6Value
+ SET i.supplyResponseFk = o.srID
+ WHERE iExist.id IS NULL;
+
DROP TEMPORARY TABLE IF EXISTS itemToInsert;
CREATE TEMPORARY TABLE itemToInsert ENGINE = MEMORY
- SELECT o.*
+ SELECT o.*, 999999 as itemFk
FROM edi.offer o
LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId
WHERE i.id IS NULL;
+
+ -- Reciclado de nº de item
+
+ OPEN cur1;
+ OPEN cur2;
+
+read_loop: LOOP
+
+ FETCH cur2 INTO vSupplyResponseFk;
+
+ IF done THEN
+
+ LEAVE read_loop;
+
+ END IF;
+
+ FETCH cur1 INTO vFreeId;
+
+ IF done THEN
+
+ CLOSE cur1;
+ OPEN cur1;
+ FETCH cur1 INTO vFreeId;
+ END IF;
+
+ IF done THEN
+
+ UPDATE itemToInsert
+ SET itemFk = NULL
+ WHERE itemFk = 999999;
+
+ LEAVE read_loop;
+
+ END IF;
+
+ UPDATE itemToInsert
+ SET itemFk = vFreeId
+ WHERE srId = vSupplyResponseFk;
+
+END LOOP;
+
+ CLOSE cur1;
+ CLOSE cur2;
+
+
-- Insertamos todos los items en Articles de la oferta
- INSERT INTO vn.item(`name`,
+ INSERT INTO vn.item( id,
+ `name`,
longName,
+ subName,
expenceFk,
typeFk,
intrastatFk,
originFk,
supplyResponseFk)
- SELECT product_name,
+ SELECT itemFk,
product_name,
+ product_name,
+ company_name,
expenseFk,
itemTypeFk,
intrastatFk,
originFk,
- srId
+ `srId`
FROM itemToInsert;
-
- INSERT INTO vn.itemImageQueue(itemFk, url)
+
+ INSERT IGNORE INTO vn.itemImageQueue(itemFk, url)
SELECT i.id, PictureReference
FROM itemToInsert ii
JOIN vn.item i ON i.supplyResponseFk = ii.srId;
@@ -8684,20 +9033,331 @@ BEGIN
-- desabilita el trigger para recalcular los tags al final
SET @isTriggerDisabled = TRUE;
-
+
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
- SELECT i.id, t.id , product_name, 1
+ SELECT i.id, t.id , CONCAT(ii.product_name,IF(ii.Quality != 'A1', CONCAT(' ',ii.Quality),'')), 1
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Producto'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.company_name, 4
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Productor'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s1Value, 5
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef1
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s1Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s2Value, 6
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef2
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s2Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s3Value, 7
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef3
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s3Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 8
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef4
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s4Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 9
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef5
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s5Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 10
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef6
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s6Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id, ink.name, 11
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ JOIN vn.tag t ON t.`name` = 'Color'
+ JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode
+ JOIN edi.`type` tp ON tp.type_id = f.feature_type_id AND tp.`description` = 'Hoofdkleur 1'
+ JOIN vn.ink ON ink.dutchCode = f.feature_value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 12
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Calidad'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ DROP TABLE IF EXISTS tmp.item;
+ CREATE TABLE tmp.item
+ (PRIMARY KEY (id))
+ SELECT i.id FROM vn.item i
+ JOIN itemToInsert ii ON i.supplyResponseFk = ii.`srId`;
+
+ CALL vn.item_refreshTags();
+
+ SET @isTriggerDisabled = FALSE;
+
+ SELECT MIN(LatestOrderDateTime) INTO vLanded
+ FROM edi.offer o
+ JOIN marketPlace mp ON mp.id = o.MarketPlaceID
+ WHERE mp.isLatestOrderDateTimeRelevant;
+
+ SET @myEntry := vn.floramondo_getEntry(vLanded);
+ IF @myEntry THEN
+
+ -- Inserta la oferta obsoleta
+ DELETE b FROM vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ LEFT JOIN edi.offer o ON i.supplyResponseFk = o.`srId`
+ WHERE b.entryFk = @myEntry AND o.`srId` IS NULL;
+ -- actualiza la oferta existente
+ UPDATE vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ JOIN edi.offer o ON i.supplyResponseFk = o.`srId`
+ SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask,
+ b.buyingValue = o.price
+ WHERE b.entryFk = @myEntry
+ AND (b.quantity <> o.NumberOfUnits * o.NumberOfItemsPerCask OR b.buyingValue <> o.price);
+
+ SET vLastInserted := NOW();
+ -- Inserta la oferta
+ INSERT INTO vn.buy(entryFk,
+ itemFk,
+ quantity,
+ buyingValue,
+ stickers,
+ packing,
+ `grouping`,
+ groupingMode,
+ packageFk,
+ deliveryFk)
+
+ SELECT @myEntry,
+ i.id,
+ o.NumberOfUnits * o.NumberOfItemsPerCask as quantity,
+ o.Price,
+ o.NumberOfUnits as etiquetas,
+ o.NumberOfItemsPerCask as packing,
+ o.MinimumQuantity * o.NumberOfItemsPerCask as `grouping`,
+ 1, -- Obliga al Packing
+ o.embalageCode,
+ o.diId
+ FROM edi.offer o
+ JOIN vn.item i ON i.supplyResponseFk = o.srId
+ LEFT JOIN vn.buy b ON i.id = b.itemFk AND b.entryFk = @myEntry
+ JOIN vn.packaging p ON p.id like o.embalageCode -- llevar esta linea i mirar de crear els packages a temps real
+ WHERE b.id IS NULL;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.buyRecalc;
+ CREATE TEMPORARY TABLE tmp.buyRecalc
+ SELECT id from vn.buy where entryFk = @myEntry AND created >= vLastInserted;
+
+ CALL vn.buy_recalcPrices();
+ END IF;
+ DROP TEMPORARY TABLE
+ edi.offer,
+ itemToInsert;
+
+ DROP TABLE tmp.item;
+
+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 `floramondo_offerRefresh_beta` */;
+/*!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 `floramondo_offerRefresh_beta`()
+BEGIN
+ DECLARE vLanded DATE;
+ DECLARE done INT DEFAULT FALSE;
+ DECLARE vFreeId INT;
+ DECLARE vSupplyResponseFk INT;
+
+ DECLARE cur1 CURSOR FOR
+ SELECT newId
+ FROM vn.item_Free_Id;
+
+ DECLARE cur2 CURSOR FOR
+ SELECT srId
+ FROM itemToInsert;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp;
+ CREATE TEMPORARY TABLE tmp ENGINE = MEMORY
+ SELECT * FROM (
+ SELECT *
+ FROM edi.supplyOffer
+ JOIN edi.marketPlace mp ON mp.id = MarketPlaceID
+ WHERE mp.isOffered = TRUE
+ ORDER BY NumberOfUnits DESC) t
+ JOIN edi.item_groupToOffer igo ON igo.group_code = t.group_id
+ GROUP BY Item_ArticleCode, s1, s2, s3, s4, s5, s6, company_name, Price, Quality, NumberOfItemsPerCask, EmbalageCode;
+
+ DROP TEMPORARY TABLE IF EXISTS edi.offer;
+ CREATE TEMPORARY TABLE edi.offer ENGINE = MEMORY
+ SELECT so.*, ev1.type_description s1Value, ev2.type_description s2Value, ev3.type_description s3Value,
+ ev4.type_description s4Value, ev5.type_description s5Value, ev6.type_description s6Value,
+ eif1.feature ef1, eif2.feature ef2, eif3.feature ef3, eif4.feature ef4, eif5.feature ef5, eif6.feature ef6
+ FROM tmp so
+ LEFT JOIN edi.item_feature eif1 ON eif1.item_id = so.Item_ArticleCode
+ AND eif1.presentation_order = 1 AND eif1.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif2 ON eif2.item_id = so.Item_ArticleCode
+ AND eif2.presentation_order = 2 AND eif2.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode
+ AND eif3.presentation_order = 3 AND eif3.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode
+ AND eif4.presentation_order = 4 AND eif4.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode
+ AND eif5.presentation_order = 5 AND eif5.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode
+ AND eif6.presentation_order = 6 AND eif6.expiry_date IS NULL
+ LEFT JOIN edi.`value` ev1 ON ev1.type_id = eif1.feature AND so.s1 = ev1.type_value
+ LEFT JOIN edi.`value` ev2 ON ev2.type_id = eif2.feature AND so.s2 = ev2.type_value
+ LEFT JOIN edi.`value` ev3 ON ev3.type_id = eif3.feature AND so.s3 = ev3.type_value
+ LEFT JOIN edi.`value` ev4 ON ev4.type_id = eif4.feature AND so.s4 = ev4.type_value
+ LEFT JOIN edi.`value` ev5 ON ev5.type_id = eif5.feature AND so.s5 = ev5.type_value
+ LEFT JOIN edi.`value` ev6 ON ev6.type_id = eif6.feature AND so.s6 = ev6.type_value;
+
+ DROP TEMPORARY TABLE tmp;
+
+ -- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos
+ UPDATE IGNORE edi.offer o
+ LEFT JOIN vn.item iExist ON iExist.supplyResponseFk = o.srID
+ JOIN vn.item i ON i.name = o.product_name
+ AND i.subname <=> o.company_name
+ AND i.value5 <=> o.s1Value
+ AND i.value6 <=> o.s2Value
+ AND i.value7 <=> o.s3Value
+ AND i.value8 <=> o.s4Value
+ AND i.value9 <=> o.s5Value
+ AND i.value10 <=> o.s6Value
+ SET i.supplyResponseFk = o.srID
+ WHERE iExist.id IS NULL;
+
+ DROP TEMPORARY TABLE IF EXISTS itemToInsert;
+ CREATE TEMPORARY TABLE itemToInsert ENGINE = MEMORY
+ SELECT o.*, 999999 as itemFk
+ FROM edi.offer o
+ LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId
+ WHERE i.id IS NULL;
+
+ -- Reciclado de nº de item
+
+ OPEN cur1;
+ OPEN cur2;
+
+read_loop: LOOP
+
+ FETCH cur2 INTO vSupplyResponseFk;
+
+ IF done THEN
+
+ LEAVE read_loop;
+
+ END IF;
+
+ FETCH cur1 INTO vFreeId;
+
+ IF done THEN
+
+ CLOSE cur1;
+ OPEN cur1;
+ FETCH cur1 INTO vFreeId;
+
+ END IF;
+
+ IF done THEN
+
+ UPDATE itemToInsert
+ SET itemFk = NULL
+ WHERE itemFk = 999999;
+
+ LEAVE read_loop;
+
+ END IF;
+
+ UPDATE itemToInsert
+ SET itemFk = vFreeId
+ WHERE srId = vSupplyResponseFk;
+
+END LOOP;
+
+ CLOSE cur1;
+ CLOSE cur2;
+
+
+ -- Insertamos todos los items en Articles de la oferta
+ INSERT INTO vn.item(`name`,
+ longName,
+ subName,
+ expenceFk,
+ typeFk,
+ intrastatFk,
+ originFk,
+ supplyResponseFk)
+ SELECT product_name,
+ product_name,
+ company_name,
+ expenseFk,
+ itemTypeFk,
+ intrastatFk,
+ originFk,
+ srId
+ FROM itemToInsert;
+
+ INSERT IGNORE INTO vn.itemImageQueue(itemFk, url)
+ SELECT i.id, PictureReference
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId;
+
+ -- Inserta si se añadiesen tags nuevos
+ INSERT IGNORE INTO vn.tag (name, ediTypeFk)
+ SELECT description, type_id FROM edi.type;
+
+ -- Inserta los tags sólo en los articulos nuevos
+
+ -- desabilita el trigger para recalcular los tags al final
+ SET @isTriggerDisabled = TRUE;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , CONCAT(ii.product_name,IF(ii.Quality != 'A1', CONCAT(' ',ii.Quality),'')), 1
FROM itemToInsert ii
JOIN vn.tag t ON t.`name` = 'Producto'
JOIN vn.item i ON i.supplyResponseFk = ii.srId;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
- SELECT i.id, t.id , company_name, 4
+ SELECT i.id, t.id , ii.company_name, 4
FROM itemToInsert ii
JOIN vn.tag t ON t.`name` = 'Productor'
- JOIN vn.item i ON i.supplyResponseFk = ii.srId
- WHERE s1Value;
-
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId;
+
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s1Value, 5
FROM itemToInsert ii
@@ -8720,7 +9380,7 @@ BEGIN
WHERE s3Value;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
- SELECT i.id, t.id , s4Value, 8
+ SELECT i.id, t.id , ii.Quality, 8
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef4
JOIN vn.item i ON i.supplyResponseFk = ii.srId
@@ -8732,10 +9392,32 @@ BEGIN
JOIN vn.tag t ON t.ediTypeFk = ii.ef5
JOIN vn.item i ON i.supplyResponseFk = ii.srId
WHERE s5Value;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.item;
- CREATE TEMPORARY TABLE tmp.item
- (PRIMARY KEY (id)) ENGINE = MEMORY
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 10
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef6
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId
+ WHERE s6Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id, ink.name, 11
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId
+ JOIN vn.tag t ON t.`name` = 'Color'
+ JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode
+ JOIN edi.`type` tp ON tp.type_id = f.feature_type_id AND tp.`description` = 'Hoofdkleur 1'
+ JOIN vn.ink ON ink.dutchCode = f.feature_value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 12
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Calidad'
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId;
+
+ DROP TABLE IF EXISTS tmp.item;
+ CREATE TABLE tmp.item
+ (PRIMARY KEY (id))
SELECT i.id FROM vn.item i
JOIN itemToInsert ii ON i.supplyResponseFk = ii.srId;
@@ -8758,9 +9440,10 @@ BEGIN
UPDATE vn.buy b
JOIN vn.item i ON i.id = b.itemFk
JOIN edi.offer o ON i.supplyResponseFk = o.srId
- SET quantity = o.NumberOfUnits * o.NumberOfItemsPerCask
+ SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask,
+ b.buyingValue = o.price
WHERE b.entryFk = @myEntry;
-
+
-- Inserta la oferta
INSERT INTO vn.buy(entryFk,
itemFk,
@@ -8786,15 +9469,635 @@ BEGIN
FROM edi.offer o
JOIN vn.item i ON i.supplyResponseFk = o.srId
LEFT JOIN vn.buy b ON i.id = b.itemFk
+ JOIN vn.packaging p ON p.id = o.embalageCode -- llevar esta linea i mirar de crear els packages a temps real
WHERE b.id IS NULL AND NOT b.entryFk <=> @myEntry;
CALL vn2008.buy_tarifas_entry(@myEntry);
END IF;
DROP TEMPORARY TABLE
- tmp.item,
edi.offer,
itemToInsert;
+
+ DROP TABLE tmp.item;
+
+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 `floramondo_offerRefresh_gamma` */;
+/*!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 `floramondo_offerRefresh_gamma`()
+BEGIN
+ DECLARE vLanded DATETIME;
+ DECLARE done INT DEFAULT FALSE;
+ DECLARE vFreeId INT;
+ DECLARE vSupplyResponseFk INT;
+
+ DECLARE cur1 CURSOR FOR
+ SELECT newId
+ FROM vn.item_Free_Id;
+
+ DECLARE cur2 CURSOR FOR
+ SELECT srId
+ FROM itemToInsert;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp;
+ CREATE TEMPORARY TABLE tmp (INDEX (`srID`), INDEX (`EmbalageCode`)) ENGINE = MEMORY
+ SELECT * FROM (
+ SELECT *
+ FROM edi.supplyOffer
+ JOIN edi.marketPlace mp ON mp.id = MarketPlaceID
+ WHERE mp.isOffered = TRUE
+ ORDER BY NumberOfUnits DESC) t
+ JOIN edi.item_groupToOffer igo ON igo.group_code = t.group_id
+ GROUP BY Item_ArticleCode, s1, s2, s3, s4, s5, s6, company_name, Price, Quality, NumberOfItemsPerCask, EmbalageCode;
+
+ DROP TEMPORARY TABLE IF EXISTS edi.offer;
+ CREATE TEMPORARY TABLE edi.offer (INDEX (`srID`), INDEX (`EmbalageCode`)) ENGINE = MEMORY
+ SELECT so.*, ev1.type_description s1Value, ev2.type_description s2Value, ev3.type_description s3Value,
+ ev4.type_description s4Value, ev5.type_description s5Value, ev6.type_description s6Value,
+ eif1.feature ef1, eif2.feature ef2, eif3.feature ef3, eif4.feature ef4, eif5.feature ef5, eif6.feature ef6
+ FROM tmp so
+ LEFT JOIN edi.item_feature eif1 ON eif1.item_id = so.Item_ArticleCode
+ AND eif1.presentation_order = 1 AND eif1.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif2 ON eif2.item_id = so.Item_ArticleCode
+ AND eif2.presentation_order = 2 AND eif2.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode
+ AND eif3.presentation_order = 3 AND eif3.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode
+ AND eif4.presentation_order = 4 AND eif4.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode
+ AND eif5.presentation_order = 5 AND eif5.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode
+ AND eif6.presentation_order = 6 AND eif6.expiry_date IS NULL
+ LEFT JOIN edi.`value` ev1 ON ev1.type_id = eif1.feature AND so.s1 = ev1.type_value
+ LEFT JOIN edi.`value` ev2 ON ev2.type_id = eif2.feature AND so.s2 = ev2.type_value
+ LEFT JOIN edi.`value` ev3 ON ev3.type_id = eif3.feature AND so.s3 = ev3.type_value
+ LEFT JOIN edi.`value` ev4 ON ev4.type_id = eif4.feature AND so.s4 = ev4.type_value
+ LEFT JOIN edi.`value` ev5 ON ev5.type_id = eif5.feature AND so.s5 = ev5.type_value
+ LEFT JOIN edi.`value` ev6 ON ev6.type_id = eif6.feature AND so.s6 = ev6.type_value;
+
+ DROP TEMPORARY TABLE tmp;
+
+ -- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos
+ UPDATE IGNORE edi.offer o
+ LEFT JOIN vn.item iExist ON iExist.supplyResponseFk = o.srID
+ JOIN vn.item i ON i.name = o.product_name
+ AND i.subname <=> o.company_name
+ AND i.value5 <=> o.s1Value
+ AND i.value6 <=> o.s2Value
+ AND i.value7 <=> o.s3Value
+ AND i.value8 <=> o.s4Value
+ AND i.value9 <=> o.s5Value
+ AND i.value10 <=> o.s6Value
+ SET i.supplyResponseFk = o.srID
+ WHERE iExist.id IS NULL;
+
+ DROP TEMPORARY TABLE IF EXISTS itemToInsert;
+ CREATE TEMPORARY TABLE itemToInsert ENGINE = MEMORY
+ SELECT o.*, 999999 as itemFk
+ FROM edi.offer o
+ LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId
+ WHERE i.id IS NULL;
+
+ -- Reciclado de nº de item
+
+ OPEN cur1;
+ OPEN cur2;
+
+read_loop: LOOP
+
+ FETCH cur2 INTO vSupplyResponseFk;
+
+ IF done THEN
+
+ LEAVE read_loop;
+
+ END IF;
+
+ FETCH cur1 INTO vFreeId;
+
+ IF done THEN
+
+ CLOSE cur1;
+ OPEN cur1;
+ FETCH cur1 INTO vFreeId;
+
+ END IF;
+
+ IF done THEN
+
+ UPDATE itemToInsert
+ SET itemFk = NULL
+ WHERE itemFk = 999999;
+
+ LEAVE read_loop;
+
+ END IF;
+
+ UPDATE itemToInsert
+ SET itemFk = vFreeId
+ WHERE srId = vSupplyResponseFk;
+
+END LOOP;
+
+ CLOSE cur1;
+ CLOSE cur2;
+
+
+ -- Insertamos todos los items en Articles de la oferta
+ INSERT INTO vn.item( id,
+ `name`,
+ longName,
+ subName,
+ expenceFk,
+ typeFk,
+ intrastatFk,
+ originFk,
+ supplyResponseFk,
+ compression)
+ SELECT iti.itemFk,
+ iti.product_name,
+ iti.product_name,
+ iti.company_name,
+ iti.expenseFk,
+ iti.itemTypeFk,
+ iti.intrastatFk,
+ iti.originFk,
+ iti.srId,
+ IF(it.categoryFk = 1, 0.7, 1) -- Flor cortada. Eliminar en 2021
+ FROM itemToInsert iti
+ JOIN vn.itemType it ON it.id = iti.itemTypeFk;
+
+ INSERT IGNORE INTO vn.itemImageQueue(itemFk, url)
+ SELECT i.id, PictureReference
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId;
+
+ -- Inserta si se añadiesen tags nuevos
+ INSERT IGNORE INTO vn.tag (name, ediTypeFk)
+ SELECT description, type_id FROM edi.type;
+
+ -- Inserta los tags sólo en los articulos nuevos
+
+ -- desabilita el trigger para recalcular los tags al final
+ SET @isTriggerDisabled = TRUE;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , CONCAT(ii.product_name,IF(ii.Quality != 'A1', CONCAT(' ',ii.Quality),'')), 1
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Producto'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.company_name, 4
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Productor'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s1Value, 5
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef1
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s1Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s2Value, 6
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef2
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s2Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s3Value, 7
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef3
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s3Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 8
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef4
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s4Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 9
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef5
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s5Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 10
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef6
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s6Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id, ink.name, 11
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ JOIN vn.tag t ON t.`name` = 'Color'
+ JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode
+ JOIN edi.`type` tp ON tp.type_id = f.feature_type_id AND tp.`description` = 'Hoofdkleur 1'
+ JOIN vn.ink ON ink.dutchCode = f.feature_value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 12
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Calidad'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ DROP TABLE IF EXISTS tmp.item;
+ CREATE TABLE tmp.item
+ (PRIMARY KEY (id))
+ SELECT i.id FROM vn.item i
+ JOIN itemToInsert ii ON i.supplyResponseFk = ii.`srId`;
+
+ CALL vn.item_refreshTags();
+
+ SET @isTriggerDisabled = FALSE;
+
+ SELECT MIN(LatestOrderDateTime) INTO vLanded
+ FROM edi.offer o
+ JOIN marketPlace mp ON mp.id = o.MarketPlaceID
+ WHERE mp.isLatestOrderDateTimeRelevant;
+
+ SET @myEntry := vn.floramondo_getEntry(vLanded);
+ IF @myEntry THEN
+ -- Inserta la oferta obsoleta
+ DELETE b FROM vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ LEFT JOIN edi.offer o ON i.supplyResponseFk = o.srId
+ WHERE b.entryFk = @myEntry AND o.id IS NULL;
+ -- actualiza la oferta existente
+ UPDATE vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ JOIN edi.offer o ON i.supplyResponseFk = o.srId
+ SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask,
+ b.buyingValue = o.price
+ WHERE b.entryFk = @myEntry
+ AND (b.quantity <> o.NumberOfUnits * o.NumberOfItemsPerCask OR b.buyingValue <> o.price);
+
+ -- Inserta la oferta
+ INSERT INTO vn.buy(entryFk,
+ itemFk,
+ quantity,
+ buyingValue,
+ stickers,
+ packing,
+ `grouping`,
+ groupingMode,
+ packageFk,
+ deliveryFk)
+
+ SELECT @myEntry,
+ i.id,
+ o.NumberOfUnits * o.NumberOfItemsPerCask as quantity,
+ o.Price,
+ o.NumberOfUnits as etiquetas,
+ o.NumberOfItemsPerCask as packing,
+ o.MinimumQuantity * o.NumberOfItemsPerCask as `grouping`,
+ 1, -- Obliga al Packing
+ o.embalageCode,
+ o.diId
+ FROM edi.offer o
+ JOIN vn.item i ON i.supplyResponseFk = o.srId
+ LEFT JOIN vn.buy b ON i.id = b.itemFk
+ JOIN vn.packaging p ON p.id = o.embalageCode -- llevar esta linea i mirar de crear els packages a temps real
+ WHERE b.id IS NULL AND NOT b.entryFk <=> @myEntry;
+
+ CALL vn2008.buy_tarifas_entry(@myEntry);
+ END IF;
+ DROP TEMPORARY TABLE
+ edi.offer,
+ itemToInsert;
+
+ DROP TABLE tmp.item;
+
+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 `floramondo_offerRefresh__` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`%` PROCEDURE `floramondo_offerRefresh__`()
+BEGIN
+ DECLARE vLanded DATETIME;
+ DECLARE done INT DEFAULT FALSE;
+ DECLARE vFreeId INT;
+ DECLARE vSupplyResponseFk INT;
+
+ DECLARE cur1 CURSOR FOR
+ SELECT newId
+ FROM vn.item_Free_Id;
+
+ DECLARE cur2 CURSOR FOR
+ SELECT srId
+ FROM itemToInsert;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp;
+ CREATE TEMPORARY TABLE tmp (INDEX (`Item_ArticleCode`)) ENGINE = MEMORY
+ SELECT * FROM (
+ SELECT *
+ FROM edi.supplyOffer
+ ORDER BY NumberOfUnits DESC) t
+ JOIN edi.item_groupToOffer igo ON igo.group_code = t.group_id
+ GROUP BY Item_ArticleCode, s1, s2, s3, s4, s5, s6, company_name, Price, Quality, NumberOfItemsPerCask, EmbalageCode;
+
+ DROP TEMPORARY TABLE IF EXISTS edi.offer;
+ CREATE TEMPORARY TABLE edi.offer (INDEX (`srID`), INDEX (`EmbalageCode`)) ENGINE = MEMORY
+ SELECT so.*, ev1.type_description s1Value, ev2.type_description s2Value, ev3.type_description s3Value,
+ ev4.type_description s4Value, ev5.type_description s5Value, ev6.type_description s6Value,
+ eif1.feature ef1, eif2.feature ef2, eif3.feature ef3, eif4.feature ef4, eif5.feature ef5, eif6.feature ef6
+ FROM tmp so
+ LEFT JOIN edi.item_feature eif1 ON eif1.item_id = so.Item_ArticleCode
+ AND eif1.presentation_order = 1 AND eif1.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif2 ON eif2.item_id = so.Item_ArticleCode
+ AND eif2.presentation_order = 2 AND eif2.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode
+ AND eif3.presentation_order = 3 AND eif3.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode
+ AND eif4.presentation_order = 4 AND eif4.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode
+ AND eif5.presentation_order = 5 AND eif5.expiry_date IS NULL
+ LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode
+ AND eif6.presentation_order = 6 AND eif6.expiry_date IS NULL
+ LEFT JOIN edi.`value` ev1 ON ev1.type_id = eif1.feature AND so.s1 = ev1.type_value
+ LEFT JOIN edi.`value` ev2 ON ev2.type_id = eif2.feature AND so.s2 = ev2.type_value
+ LEFT JOIN edi.`value` ev3 ON ev3.type_id = eif3.feature AND so.s3 = ev3.type_value
+ LEFT JOIN edi.`value` ev4 ON ev4.type_id = eif4.feature AND so.s4 = ev4.type_value
+ LEFT JOIN edi.`value` ev5 ON ev5.type_id = eif5.feature AND so.s5 = ev5.type_value
+ LEFT JOIN edi.`value` ev6 ON ev6.type_id = eif6.feature AND so.s6 = ev6.type_value;
+
+ DROP TEMPORARY TABLE tmp;
+
+ -- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos
+ UPDATE IGNORE edi.offer o
+ LEFT JOIN vn.item iExist ON iExist.supplyResponseFk = o.srID
+ JOIN vn.item i ON i.name = o.product_name
+ AND i.subname <=> o.company_name
+ AND i.value5 <=> o.s1Value
+ AND i.value6 <=> o.s2Value
+ AND i.value7 <=> o.s3Value
+ AND i.value8 <=> o.s4Value
+ AND i.value9 <=> o.s5Value
+ AND i.value10 <=> o.s6Value
+ SET i.supplyResponseFk = o.srID
+ WHERE iExist.id IS NULL;
+
+ DROP TEMPORARY TABLE IF EXISTS itemToInsert;
+ CREATE TEMPORARY TABLE itemToInsert ENGINE = MEMORY
+ SELECT o.*, 999999 as itemFk
+ FROM edi.offer o
+ LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId
+ WHERE i.id IS NULL;
+
+ -- Reciclado de nº de item
+
+ OPEN cur1;
+ OPEN cur2;
+
+read_loop: LOOP
+
+ FETCH cur2 INTO vSupplyResponseFk;
+
+ IF done THEN
+
+ LEAVE read_loop;
+
+ END IF;
+
+ FETCH cur1 INTO vFreeId;
+
+ IF done THEN
+
+ CLOSE cur1;
+ OPEN cur1;
+ FETCH cur1 INTO vFreeId;
+
+ END IF;
+
+ IF done THEN
+
+ UPDATE itemToInsert
+ SET itemFk = NULL
+ WHERE itemFk = 999999;
+
+ LEAVE read_loop;
+
+ END IF;
+
+ UPDATE itemToInsert
+ SET itemFk = vFreeId
+ WHERE srId = vSupplyResponseFk;
+
+END LOOP;
+
+ CLOSE cur1;
+ CLOSE cur2;
+
+
+ -- Insertamos todos los items en Articles de la oferta
+ INSERT INTO vn.item( id,
+ `name`,
+ longName,
+ subName,
+ expenceFk,
+ typeFk,
+ intrastatFk,
+ originFk,
+ supplyResponseFk)
+ SELECT itemFk,
+ product_name,
+ product_name,
+ company_name,
+ expenseFk,
+ itemTypeFk,
+ intrastatFk,
+ originFk,
+ `srId`
+ FROM itemToInsert;
+
+ INSERT IGNORE INTO vn.itemImageQueue(itemFk, url)
+ SELECT i.id, PictureReference
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.srId;
+
+ -- Inserta si se añadiesen tags nuevos
+ INSERT IGNORE INTO vn.tag (name, ediTypeFk)
+ SELECT description, type_id FROM edi.type;
+
+ -- Inserta los tags sólo en los articulos nuevos
+
+ -- desabilita el trigger para recalcular los tags al final
+ SET @isTriggerDisabled = TRUE;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , CONCAT(ii.product_name,IF(ii.Quality != 'A1', CONCAT(' ',ii.Quality),'')), 1
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Producto'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.company_name, 4
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Productor'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s1Value, 5
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef1
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s1Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s2Value, 6
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef2
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s2Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s3Value, 7
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef3
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s3Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 8
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef4
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s4Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 9
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef5
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s5Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , s5Value, 10
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.ediTypeFk = ii.ef6
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ WHERE s6Value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id, ink.name, 11
+ FROM itemToInsert ii
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
+ JOIN vn.tag t ON t.`name` = 'Color'
+ JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode
+ JOIN edi.`type` tp ON tp.type_id = f.feature_type_id AND tp.`description` = 'Hoofdkleur 1'
+ JOIN vn.ink ON ink.dutchCode = f.feature_value;
+
+ INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
+ SELECT i.id, t.id , ii.Quality, 12
+ FROM itemToInsert ii
+ JOIN vn.tag t ON t.`name` = 'Calidad'
+ JOIN vn.item i ON i.supplyResponseFk = ii.`srId`;
+
+ DROP TABLE IF EXISTS tmp.item;
+ CREATE TABLE tmp.item
+ (PRIMARY KEY (id))
+ SELECT i.id FROM vn.item i
+ JOIN itemToInsert ii ON i.supplyResponseFk = ii.`srId`;
+
+ CALL vn.item_refreshTags();
+
+ SET @isTriggerDisabled = FALSE;
+
+ SELECT MIN(LatestOrderDateTime) INTO vLanded
+ FROM edi.offer o
+ JOIN marketPlace mp ON mp.id = o.MarketPlaceID
+ WHERE mp.isLatestOrderDateTimeRelevant;
+
+ SET @myEntry := vn.floramondo_getEntry(vLanded);
+ IF @myEntry THEN
+
+ -- Inserta la oferta obsoleta
+ DELETE b FROM vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ LEFT JOIN edi.offer o ON i.supplyResponseFk = o.`srId`
+ WHERE b.entryFk = @myEntry AND o.`srId` IS NULL;
+ -- actualiza la oferta existente
+ UPDATE vn.buy b
+ JOIN vn.item i ON i.id = b.itemFk
+ JOIN edi.offer o ON i.supplyResponseFk = o.`srId`
+ SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask,
+ b.buyingValue = o.price
+ WHERE b.entryFk = @myEntry
+ AND (b.quantity <> o.NumberOfUnits * o.NumberOfItemsPerCask OR b.buyingValue <> o.price);
+
+ -- Inserta la oferta
+ INSERT INTO vn.buy(entryFk,
+ itemFk,
+ quantity,
+ buyingValue,
+ stickers,
+ packing,
+ `grouping`,
+ groupingMode,
+ packageFk,
+ deliveryFk)
+
+ SELECT @myEntry,
+ i.id,
+ o.NumberOfUnits * o.NumberOfItemsPerCask as quantity,
+ o.Price,
+ o.NumberOfUnits as etiquetas,
+ o.NumberOfItemsPerCask as packing,
+ o.MinimumQuantity * o.NumberOfItemsPerCask as `grouping`,
+ 1, -- Obliga al Packing
+ o.embalageCode,
+ o.diId
+ FROM edi.offer o
+ JOIN vn.item i ON i.supplyResponseFk = o.srId
+ LEFT JOIN vn.buy b ON i.id = b.itemFk
+ JOIN vn.packaging p ON p.id = o.embalageCode -- llevar esta linea i mirar de crear els packages a temps real
+ WHERE b.id IS NULL AND NOT b.entryFk <=> @myEntry;
+
+ CALL vn2008.buy_tarifas_entry(@myEntry);
+ END IF;
+ DROP TEMPORARY TABLE
+ edi.offer,
+ itemToInsert;
+
+ DROP TABLE tmp.item;
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8931,7 +10234,8 @@ CREATE TABLE `config` (
`productionDomain` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The address for production website',
`pdfsDir` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Directory where PDFs are allocated',
`dmsDir` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Directory where documents are allocated',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `jwtkey_IX` (`jwtKey`) COMMENT 'Prueba de Ernesto 3.8.2020. MySQL se queja de no tener indices. Si, se que solo tiene un registro pero molesta para depurar otros.'
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -10870,30 +12174,30 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN)
-BEGIN
-/**
- * Lists visible items and it's box sizes of the specified
- * type at specified date.
- *
- * @param vWh The warehouse id
- * @param vDate The visible date
- * @param vType The type id
- * @param vPrefix The article prefix to filter or %NULL for all
- * @param vUseIds Whether to order the result by item id
- * @select List of visible items with it's box sizes
- */
- CALL item_getVisible(vWh, vDate, vType, vPrefix);
-
- IF vUseIds
- THEN
- SELECT * FROM tmp.itemVisible
- ORDER BY Id_Article;
- ELSE
- SELECT * FROM tmp.itemVisible
- ORDER BY Article, packing;
- END IF;
-
- DROP TEMPORARY TABLE tmp.itemVisible;
+BEGIN
+/**
+ * Lists visible items and it's box sizes of the specified
+ * type at specified date.
+ *
+ * @param vWh The warehouse id
+ * @param vDate The visible date
+ * @param vType The type id
+ * @param vPrefix The article prefix to filter or %NULL for all
+ * @param vUseIds Whether to order the result by item id
+ * @select List of visible items with it's box sizes
+ */
+ CALL item_getVisible(vWh, vDate, vType, vPrefix);
+
+ IF vUseIds
+ THEN
+ SELECT * FROM tmp.itemVisible
+ ORDER BY Id_Article;
+ ELSE
+ SELECT * FROM tmp.itemVisible
+ ORDER BY Article, packing;
+ END IF;
+
+ DROP TEMPORARY TABLE tmp.itemVisible;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -12372,7 +13676,7 @@ BEGIN
FROM edi.deliveryInformation di
JOIN vn.item i ON i.supplyResponseFk = di.supplyResponseID
JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk
- WHERE i.id = vItem
+ WHERE i.id = vItem AND di.LatestDeliveryDateTime > NOW()
LIMIT 1;
END LOOP;
@@ -12616,7 +13920,7 @@ BEGIN
concept = vConcept,
quantity = vAmount,
price = vPrice,
- priceFixed = 0,
+ priceFixed = FALSE,
isPriceFixed = TRUE;
SET vSale = LAST_INSERT_ID();
@@ -12631,7 +13935,18 @@ BEGIN
END IF;
UPDATE order_row SET Id_Movimiento = vSale
WHERE id = vRowId;
-
+
+ INSERT INTO edi.putOrder (deliveryInformationID,
+ supplyResponseId,
+ quantity,
+ EndUserPartyId,
+ EndUserPartyGLN)
+ SELECT di.ID, i.supplyResponseFk, vAmount / NumberOfItemsPerCask, FALSE, vClientId
+ FROM edi.deliveryInformation di
+ JOIN vn.item i ON i.supplyResponseFk = di.supplyResponseID
+ JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk
+ WHERE i.id = vItem
+ LIMIT 1;
END LOOP;
CLOSE cRows;
@@ -12674,9 +13989,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 ;;
@@ -12697,6 +14012,8 @@ proc: BEGIN
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
BEGIN
DO RELEASE_LOCK('hedera.order_doRecalc');
+ # Agregado por Ernesto 9.Agosto.2020, quiero comprobar cuantos rollbacks suceden.
+ CALL util.debugAdd('Event Hedera order_doRecalc() (ernesto)', 'Rollback! '); # max 255 chars en variable y 255 en value, ya hay campo de fecha
ROLLBACK;
RESIGNAL;
END;
@@ -13294,6 +14611,7 @@ DELIMITER ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_undo` */;
+ALTER DATABASE `hedera` CHARACTER SET utf8 COLLATE utf8_general_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
@@ -13301,10 +14619,10 @@ DELIMITER ;
/*!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' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `tpvTransaction_undo`(vSelf INT)
-BEGIN
+p: BEGIN
DECLARE vCustomer INT;
DECLARE vAmount DOUBLE;
DECLARE vReceipt INT;
@@ -13373,13 +14691,13 @@ BEGIN
AND DATE(FECHA) = vDate
AND EURODEBE = vAmount
LIMIT 1;
-
+
-- Actualiza la transaccion
UPDATE tpvTransaction
SET response = NULL, status = 'started'
WHERE id = vSelf;
-
+
COMMIT;
END ;;
DELIMITER ;
@@ -13387,6 +14705,7 @@ DELIMITER ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+ALTER DATABASE `hedera` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 DROP PROCEDURE IF EXISTS `visitUser_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14538,6 +15857,7 @@ SET character_set_client = utf8;
1 AS `careinvite`,
1 AS `insecure`,
1 AS `transport`,
+ 1 AS `nat`,
1 AS `ipaddr`,
1 AS `regseconds`,
1 AS `port`,
@@ -14575,6 +15895,7 @@ CREATE TABLE `sipConfig` (
`dtlscertfile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`dtlsprivatekey` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`dtlssetup` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `nat` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Default values for SIP accounts';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -15166,6 +16487,7 @@ CREATE TABLE `incometype_employee` (
`id_incometype` int(11) NOT NULL,
`descripcion` varchar(255) DEFAULT NULL,
`nomina` smallint(6) DEFAULT '0',
+ `isExtraSalarial` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_incometype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -15534,7 +16856,10 @@ CREATE TABLE `ACL` (
`permission` set('DENY','ALLOW') COLLATE utf8_unicode_ci DEFAULT 'ALLOW',
`principalType` set('ROLE','USER') COLLATE utf8_unicode_ci DEFAULT 'ROLE',
`principalId` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `model_ix` (`model`(255)) COMMENT 'ernesto 3.8.2020. Mysql pide indices',
+ KEY `property_ix` (`property`(255)),
+ KEY `accessType_ix` (`accessType`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -15826,9 +17151,10 @@ DROP TABLE IF EXISTS `inboundPick`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inboundPick` (
- `inboundFk` int(10) unsigned DEFAULT NULL,
- `outboundFk` int(10) unsigned DEFAULT NULL,
+ `inboundFk` int(10) unsigned NOT NULL,
+ `outboundFk` int(10) unsigned NOT NULL,
`quantity` int(11) NOT NULL,
+ PRIMARY KEY (`inboundFk`,`outboundFk`,`quantity`),
UNIQUE KEY `buyFk` (`inboundFk`,`outboundFk`),
KEY `saleFk` (`outboundFk`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -15974,7 +17300,7 @@ DELIMITER ;;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2019-06-17 05:00:00' ON COMPLETION PRESERVE ENABLE DO CALL log_clean */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `log_clean` ON SCHEDULE EVERY 1 DAY STARTS '2019-06-17 02:45:00' ON COMPLETION PRESERVE ENABLE DO CALL log_clean */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -16282,8 +17608,8 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `log_add_beta`(IN `vTableName` VARCHAR(255), IN `vNewId` VARCHAR(255), IN `vOldId` VARCHAR(255))
-proc: BEGIN
- -- XXX: Disabled while testing
+proc: BEGIN
+ -- XXX: Disabled while testing
DECLARE vLanded DATE;
DECLARE vWarehouseFk INT;
DECLARE vBuyerFk INT;
@@ -16291,20 +17617,20 @@ proc: BEGIN
DECLARE vItemFk INT;
DECLARE vItemName VARCHAR(50);
- -- LEAVE proc;
+ -- LEAVE proc;
- IF vOldId IS NOT NULL AND !(vOldId <=> vNewId) THEN
- INSERT IGNORE INTO `log` SET
- tableName = vTableName,
- tableId = vOldId,
- operation = 'delete';
- END IF;
-
- IF vNewId IS NOT NULL THEN
- INSERT IGNORE INTO `log` SET
- tableName = vTableName,
- tableId = vNewId,
- operation = 'insert';
+ IF vOldId IS NOT NULL AND !(vOldId <=> vNewId) THEN
+ INSERT IGNORE INTO `log` SET
+ tableName = vTableName,
+ tableId = vOldId,
+ operation = 'delete';
+ END IF;
+
+ IF vNewId IS NOT NULL THEN
+ INSERT IGNORE INTO `log` SET
+ tableName = vTableName,
+ tableId = vNewId,
+ operation = 'insert';
END IF;
IF vTableName = 'buy' THEN
@@ -16334,7 +17660,7 @@ proc: BEGIN
END IF;
END IF;
-
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -16602,29 +17928,29 @@ CREATE DEFINER=`root`@`%` PROCEDURE `log_refreshSale`(
BEGIN
DROP TEMPORARY TABLE IF EXISTS tValues;
CREATE TEMPORARY TABLE tValues
- ENGINE = MEMORY
- SELECT
- m.id saleFk,
- m.ticketFk,
- m.itemFk,
- t.warehouseFk,
- t.shipped,
+ ENGINE = MEMORY
+ SELECT
+ m.id saleFk,
+ m.ticketFk,
+ m.itemFk,
+ t.warehouseFk,
+ t.shipped,
ABS(m.quantity) quantity,
m.created,
TIMESTAMPADD(DAY, tp.life, t.shipped) expired,
m.quantity < 0 isIn,
- m.isPicked OR s.alertLevel > 1 isPicked
- FROM vn.sale m
- JOIN vn.ticket t ON t.id = m.ticketFk
+ m.isPicked OR s.alertLevel > 1 isPicked
+ FROM vn.sale m
+ JOIN vn.ticket t ON t.id = m.ticketFk
JOIN vn.ticketState s ON s.ticketFk = t.id
JOIN vn.item i ON i.id = m.itemFk
- JOIN vn.itemType tp ON tp.id = i.typeFk
+ JOIN vn.itemType tp ON tp.id = i.typeFk
WHERE (
- vTableId IS NULL
- OR (vTableName = 'ticket' AND t.id = vTableId)
- OR (vTableName = 'sale' AND m.id = vTableId)
- )
- AND t.shipped >= vn.getInventoryDate()
+ vTableId IS NULL
+ OR (vTableName = 'ticket' AND t.id = vTableId)
+ OR (vTableName = 'sale' AND m.id = vTableId)
+ )
+ AND t.shipped >= vn.getInventoryDate()
AND m.quantity != 0;
REPLACE INTO inbound (
@@ -16657,7 +17983,7 @@ BEGIN
FROM tValues
WHERE !isIn;
- DROP TEMPORARY TABLE tValues;
+ DROP TEMPORARY TABLE tValues;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -17071,7 +18397,7 @@ CREATE TABLE `debug` (
`variable` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Log de depuración';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Log de depuración';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -18153,8 +19479,8 @@ CREATE TABLE `XDiario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ASIEN` double DEFAULT NULL,
`FECHA` datetime DEFAULT NULL,
- `SUBCTA` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
- `CONTRA` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `SUBCTA` varchar(12) CHARACTER SET utf8 DEFAULT NULL,
+ `CONTRA` varchar(12) CHARACTER SET utf8 DEFAULT NULL,
`CONCEPTO` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
`EURODEBE` decimal(10,2) DEFAULT NULL,
`EUROHABER` decimal(10,2) DEFAULT NULL,
@@ -18311,6 +19637,7 @@ DROP TABLE IF EXISTS `accountingType`;
CREATE TABLE `accountingType` (
`id` smallint(6) NOT NULL DEFAULT '0',
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
+ `receiptDescription` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Descripción por defecto al crear nuevo recibo',
PRIMARY KEY (`id`)
) 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 */;
@@ -18474,6 +19801,9 @@ BEGIN
WHERE id = NEW.clientFk;
END IF;
END IF;
+ IF NEW.isDefaultAddress AND NEW.isActive = FALSE THEN
+ CALL util.throw ('Cannot desactivate the default address');
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -19357,7 +20687,7 @@ DROP TABLE IF EXISTS `claim`;
CREATE TABLE `claim` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ticketCreated` date NOT NULL,
- `claimDepartmentFk` tinyint(3) unsigned DEFAULT NULL,
+ `claimDepartmentFk__` tinyint(3) unsigned DEFAULT NULL,
`claimStateFk` int(10) unsigned NOT NULL DEFAULT '1',
`observation` text COLLATE utf8_unicode_ci,
`clientFk` int(11) NOT NULL,
@@ -19368,14 +20698,14 @@ CREATE TABLE `claim` (
`ticketFk` int(11) DEFAULT NULL,
`hasToPickUp` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
- KEY `cl_dep_id` (`claimDepartmentFk`),
+ KEY `cl_dep_id` (`claimDepartmentFk__`),
KEY `cl_est_id` (`claimStateFk`),
KEY `Id_Cliente` (`clientFk`),
KEY `Id_Trabajador` (`workerFk`),
KEY `cl_main_ticketFk_idx` (`ticketFk`),
CONSTRAINT `cl_main_ticketFk` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON UPDATE CASCADE,
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_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=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -19391,8 +20721,8 @@ CREATE TABLE `claimBeginning` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`claimFk` int(10) unsigned NOT NULL,
`saleFk` int(11) DEFAULT NULL,
- `claimComplaintFk` int(10) unsigned NOT NULL DEFAULT '1',
- `claimRequestFk` int(1) unsigned NOT NULL DEFAULT '1',
+ `claimComplaintFk__` int(10) unsigned NOT NULL DEFAULT '1',
+ `claimRequestFk__` int(1) unsigned NOT NULL DEFAULT '1',
`quantity` double DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `Id_Movimiento` (`saleFk`),
@@ -19683,7 +21013,7 @@ CREATE TABLE `client` (
`dueDay` smallint(6) NOT NULL DEFAULT '5',
`receipt` int(11) DEFAULT '1' COMMENT 'obsoleta',
`isOfficial` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'obsoleta (comprobar)',
- `isTaxDataChecked` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deprecated',
+ `isTaxDataChecked` tinyint(1) NOT NULL DEFAULT '0',
`mobile` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
`accountingAccount` varchar(10) CHARACTER SET utf8 NOT NULL,
`isEqualizated` tinyint(1) NOT NULL DEFAULT '0',
@@ -19734,6 +21064,9 @@ CREATE TABLE `client` (
`hasLcr` tinyint(1) NOT NULL DEFAULT '0',
`bankEntityFk` int(10) DEFAULT NULL,
`typeFk` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT 'normal',
+ `taxTypeSageFk` smallint(6) DEFAULT NULL COMMENT 'Tipo de Iva por defecto asociado al cliente en SAGE',
+ `transactionTypeSageFk` tinyint(4) DEFAULT NULL COMMENT 'Tipo de transacción por defecto asociado al cliente en SAGE',
+ `transferorFk` int(11) DEFAULT NULL COMMENT 'Cliente que le ha transmitido la titularidad de la empresa',
PRIMARY KEY (`id`),
UNIQUE KEY `IF` (`fi`),
KEY `Id_Trabajador` (`salesPersonFk`),
@@ -19749,12 +21082,16 @@ CREATE TABLE `client` (
KEY `codpos` (`codposOLD`,`postcode`),
KEY `fk_Clientes_entity_idx` (`bankEntityFk`),
KEY `typeFk` (`typeFk`),
+ KEY `client_taxTypeSageFk_idx` (`taxTypeSageFk`),
+ KEY `client_transactionTypeSageFk_idx` (`transactionTypeSageFk`),
CONSTRAINT `canal_nuevo_cliente` FOREIGN KEY (`contactChannelFk`) REFERENCES `contactChannel` (`id`) ON UPDATE CASCADE,
CONSTRAINT `client_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
CONSTRAINT `client_ibfk_2` FOREIGN KEY (`payMethodFk`) REFERENCES `payMethod` (`id`) ON UPDATE CASCADE,
CONSTRAINT `client_ibfk_3` FOREIGN KEY (`salesPersonFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `client_ibfk_4` FOREIGN KEY (`defaultAddressFk`) REFERENCES `address` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `client_ibfk_5` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `client_taxTypeSageFk` FOREIGN KEY (`taxTypeSageFk`) REFERENCES `sage`.`TiposIva` (`CodigoIva`) ON UPDATE CASCADE,
+ CONSTRAINT `client_transactionTypeSageFk` FOREIGN KEY (`transactionTypeSageFk`) REFERENCES `sage`.`TiposTransacciones` (`CodigoTransaccion`) 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=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
@@ -20981,9 +22318,9 @@ CREATE TABLE `creditClassification` (
/*!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 ;;
@@ -20994,7 +22331,7 @@ BEGIN
END IF;
IF NEW.dateEnd IS NOT NULL AND OLD.dateEnd IS NULL THEN
UPDATE `client` c
- SET creditInsurance = 0 WHERE c.id = NEW.client;
+ SET creditInsurance = NULL WHERE c.id = NEW.client;
END IF;
END */;;
DELIMITER ;
@@ -21151,24 +22488,26 @@ DROP TABLE IF EXISTS `delivery_zip`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `delivery_zip` (
- `postal_code` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `country_code` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `place_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `admin_name1` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `postal_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
+ `country_code` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `place_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
+ `admin_name1` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`code_name1` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
`admin_name2` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `code_name2` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `admin_name3` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `code_name3` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `latitude` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `longitude` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
- `accuracy` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `code_name2` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `admin_name3` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
+ `code_name3` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
+ `latitude` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
+ `longitude` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
+ `accuracy` varchar(1) COLLATE utf8_unicode_ci NOT NULL,
+ `delivery_zipPK` int(11) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`delivery_zipPK`),
KEY `country_code_idx` (`country_code`),
KEY `place_name_idx` (`place_name`),
KEY `postal_code_idx` (`postal_code`),
KEY `admin_name3_idx` (`admin_name3`),
KEY `admin_name2_idx` (`admin_name2`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21386,6 +22725,20 @@ CREATE TABLE `deviceProductionUser` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `disabilityGrade`
+--
+
+DROP TABLE IF EXISTS `disabilityGrade`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `disabilityGrade` (
+ `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Grados de discapacidad Modelo 145 IRPF',
+ `description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `dms`
--
@@ -21640,6 +22993,44 @@ CREATE TABLE `duaTax` (
CONSTRAINT `duaTax_fk3` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT 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 */ ;
+/*!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 ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`duaTax_BEFORE_INSERT` BEFORE INSERT ON `duaTax` FOR EACH ROW
+BEGIN
+ SET NEW.rate = duaTax_getRate(NEW.duaFk, NEW.taxClassFk);
+ SET NEW.tax = NEW.base * NEW.rate / 100;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`duaTax_BEFORE_UPDATE` BEFORE UPDATE ON `duaTax` FOR EACH ROW
+BEGIN
+ SET NEW.rate = duaTax_getRate(NEW.duaFk, NEW.taxClassFk);
+ SET NEW.tax = NEW.base * NEW.rate / 100;
+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 */ ;
--
-- Temporary table structure for view `ediGenus`
@@ -22398,14 +23789,37 @@ CREATE TABLE `expeditionScan` (
`expeditionFk` int(11) NOT NULL,
`scanned` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`palletFk` int(11) NOT NULL,
+ `workerFk` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `expeditionFk_UNIQUE` (`expeditionFk`),
KEY `expeditionScan_fk1_idx` (`expeditionFk`),
KEY `expeditionScan_fk2_idx` (`palletFk`),
+ KEY `expeditionScan_fk3_idx` (`workerFk`),
CONSTRAINT `expeditionScan_fk1` FOREIGN KEY (`expeditionFk`) REFERENCES `expedition` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `expeditionScan_fk2` FOREIGN KEY (`palletFk`) REFERENCES `expeditionPallet` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+ CONSTRAINT `expeditionScan_fk2` FOREIGN KEY (`palletFk`) REFERENCES `expeditionPallet` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `expeditionScan_fk3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT 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 */ ;
+/*!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 ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`expeditionScan_BEFORE_INSERT` BEFORE INSERT ON `expeditionScan` FOR EACH ROW
+BEGIN
+
+ SET NEW.workerFk = vn.getUser();
+
+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 */ ;
--
-- Temporary table structure for view `expeditionScan_Monitor`
@@ -22617,6 +24031,7 @@ DROP TABLE IF EXISTS `floramondoConfig`;
CREATE TABLE `floramondoConfig` (
`id` int(11) NOT NULL,
`entryFk` int(11) DEFAULT NULL COMMENT 'ultima entrada de floramondo',
+ `nextLanded` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -22811,7 +24226,11 @@ CREATE TABLE `ink` (
`showOrder` int(11) NOT NULL,
`ball` blob,
`isCargex` tinyint(4) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
+ `dutchCode` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `hex` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `dutchCode_UNIQUE` (`dutchCode`),
+ CONSTRAINT `ink_fk1` FOREIGN KEY (`dutchCode`) REFERENCES `edi`.`feature` (`feature_value`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -22968,6 +24387,20 @@ CREATE TABLE `invoiceCorrectionType` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Temporary table structure for view `invoiceInAwb__`
+--
+
+DROP TABLE IF EXISTS `invoiceInAwb__`;
+/*!50001 DROP VIEW IF EXISTS `invoiceInAwb__`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `invoiceInAwb__` AS SELECT
+ 1 AS `invoiceInFk`,
+ 1 AS `awbFk`,
+ 1 AS `dua`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Temporary table structure for view `invoiceInEntry__`
--
@@ -23311,9 +24744,9 @@ CREATE TABLE `item` (
`hasKgPrice` tinyint(1) NOT NULL DEFAULT '0',
`sectorFk` int(11) DEFAULT '2',
`isFloramondo` tinyint(1) NOT NULL DEFAULT '0',
+ `isFragile` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'articulos solo para recogidas por su fragilidad',
PRIMARY KEY (`id`),
UNIQUE KEY `item_supplyResponseFk_idx` (`supplyResponseFk`),
- KEY `Article` (`name`),
KEY `Color` (`inkFk`),
KEY `id_origen` (`originFk`),
KEY `Codintrastat` (`intrastatFk`),
@@ -23323,22 +24756,23 @@ CREATE TABLE `item` (
KEY `ArticlesIsActive_idx` (`isActive`),
KEY `item_ibfk_6_idx` (`sectorFk`),
KEY `item_expenceFk` (`expenceFk`),
+ KEY `Article` (`name`,`subName`,`value5`,`value6`,`value7`,`value8`,`value9`,`value10`),
CONSTRAINT `item_expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `expence` (`id`) ON UPDATE CASCADE,
CONSTRAINT `item_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `origin` (`id`) ON UPDATE CASCADE,
CONSTRAINT `item_ibfk_2` FOREIGN KEY (`intrastatFk`) REFERENCES `intrastat` (`id`) ON UPDATE CASCADE,
CONSTRAINT `item_ibfk_4` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE,
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 `itemsupplyResponseFk` FOREIGN KEY (`supplyResponseFk`) REFERENCES `edi`.`supplyResponse` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT `itemsupplyResponseFk` FOREIGN KEY (`supplyResponseFk`) REFERENCES `edi`.`supplyResponse` (`ID`) ON UPDATE CASCADE,
CONSTRAINT `producer_id` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT 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 */ ;
/*!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 ;;
@@ -23361,6 +24795,8 @@ BEGIN
SET NEW.compression = vCompression;
END IF;
+
+
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -23746,6 +25182,9 @@ DROP TABLE IF EXISTS `itemImageQueue`;
CREATE TABLE `itemImageQueue` (
`itemFk` int(11) NOT NULL,
`url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `error` text COLLATE utf8_unicode_ci,
+ `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`itemFk`),
CONSTRAINT `itemImageQueueItemIdx` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Cola para añadir las imagenes al campo vn.item.image a partir de una url';
@@ -24644,6 +26083,18 @@ CREATE TABLE `itemVerdecora` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Relaciona nuestros articulos con los de Verdecora';
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Temporary table structure for view `item_Free_Id`
+--
+
+DROP TABLE IF EXISTS `item_Free_Id`;
+/*!50001 DROP VIEW IF EXISTS `item_Free_Id`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `item_Free_Id` AS SELECT
+ 1 AS `newId`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `kk`
--
@@ -24652,7 +26103,8 @@ DROP TABLE IF EXISTS `kk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `kk` (
- `pasillo` varchar(3) COLLATE utf8_unicode_ci NOT NULL
+ `pasillo` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`pasillo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -24667,11 +26119,12 @@ SET character_set_client = utf8;
/*!50001 CREATE VIEW `labelInfo` AS SELECT
1 AS `itemId`,
1 AS `itemName`,
+ 1 AS `stickers`,
+ 1 AS `life`,
1 AS `colorCode`,
1 AS `stems`,
1 AS `category`,
1 AS `productor`,
- 1 AS `value`,
1 AS `packing`,
1 AS `warehouse_id`,
1 AS `size`,
@@ -24751,9 +26204,10 @@ DROP TABLE IF EXISTS `lungSize`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lungSize` (
- `hora` time DEFAULT NULL,
- `size` decimal(5,0) DEFAULT NULL,
- `dia` date NOT NULL
+ `hora` time NOT NULL,
+ `size` decimal(5,0) NOT NULL,
+ `dia` date NOT NULL,
+ PRIMARY KEY (`hora`,`size`,`dia`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -24765,7 +26219,7 @@ DROP TABLE IF EXISTS `mail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mail` (
- `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sender` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`replyTo` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`subject` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -25214,6 +26668,7 @@ CREATE TABLE `packaging` (
`returnCost` decimal(10,2) NOT NULL DEFAULT '0.00',
`cmrName` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`freightItemFk` int(11) DEFAULT NULL,
+ `hasCompressionVariations` tinyint(1) DEFAULT '0' COMMENT 'Floramondo puede servirlos no llenos del todo',
PRIMARY KEY (`id`),
KEY `packaging_fk1` (`itemFk`),
KEY `packaging_fk2_idx` (`freightItemFk`),
@@ -26006,7 +27461,8 @@ CREATE TABLE `professionalCategory` (
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`salary` decimal(10,2) DEFAULT NULL,
`salaryorSeniority` decimal(10,2) DEFAULT NULL,
- `year` int(2) DEFAULT NULL
+ `year` int(2) DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -26209,7 +27665,7 @@ DROP TABLE IF EXISTS `receipt`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `receipt` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
- `invoiceFk` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `invoiceFk` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'nombre incorrecto, renombrar a description',
`amountPaid` decimal(10,2) NOT NULL DEFAULT '0.00',
`amountUnpaid` decimal(10,2) NOT NULL DEFAULT '0.00',
`payed` datetime DEFAULT NULL,
@@ -27078,6 +28534,19 @@ SET character_set_client = utf8;
1 AS `shipped`*/;
SET character_set_client = @saved_cs_client;
+--
+-- Temporary table structure for view `salesPersonSince`
+--
+
+DROP TABLE IF EXISTS `salesPersonSince`;
+/*!50001 DROP VIEW IF EXISTS `salesPersonSince`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `salesPersonSince` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `started`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Temporary table structure for view `salesPreparedLastHour`
--
@@ -27593,7 +29062,8 @@ CREATE TABLE `state` (
`isOK` tinyint(4) NOT NULL DEFAULT '0',
`graphCategory` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
- UNIQUE KEY `code_UNIQUE` (`code`)
+ UNIQUE KEY `code_UNIQUE` (`code`),
+ KEY `state_id3` (`semaphore`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -27666,6 +29136,9 @@ CREATE TABLE `supplier` (
`postcodeFk` int(11) unsigned DEFAULT NULL,
`postCode` char(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`isActive` tinyint(4) DEFAULT '1',
+ `taxTypeSageFk` smallint(6) DEFAULT NULL COMMENT 'Tipo de IVA SAGE',
+ `withholdingSageFk` smallint(6) DEFAULT NULL COMMENT 'Tipos de retención SAGE',
+ `transactionTypeSageFk` tinyint(4) DEFAULT NULL COMMENT 'Ti po de transacción SAGE',
PRIMARY KEY (`id`),
UNIQUE KEY `cuenta` (`account`),
UNIQUE KEY `NIF` (`nif`),
@@ -27674,10 +29147,16 @@ CREATE TABLE `supplier` (
KEY `province_id` (`provinceFk`),
KEY `pay_dem_id` (`payDemFk`),
KEY `codpos` (`postCode`),
+ KEY `supplier_taxTypeFk_idx` (`taxTypeSageFk`),
+ KEY `supplier_withholdingFk_idx` (`withholdingSageFk`),
+ KEY `supplier_transactionFk_idx` (`transactionTypeSageFk`),
CONSTRAINT `Id_Pais` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
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
+ CONSTRAINT `province_id` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `supplier_taxTypeFk` FOREIGN KEY (`taxTypeSageFk`) REFERENCES `sage`.`TiposIva` (`CodigoIva`) ON UPDATE CASCADE,
+ CONSTRAINT `supplier_transactionFk` FOREIGN KEY (`transactionTypeSageFk`) REFERENCES `sage`.`TiposTransacciones` (`CodigoTransaccion`) ON UPDATE CASCADE,
+ CONSTRAINT `supplier_withholdingFk` FOREIGN KEY (`withholdingSageFk`) REFERENCES `sage`.`TiposRetencion` (`CodigoRetencion`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -27808,6 +29287,7 @@ CREATE TABLE `tag` (
`sourceTable` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`unit` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`ediTypeFk` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `overwrite` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'nombre del campo de item a sobreescribir con el valor del tag, hay que añadir el código correspondiente en item_refreshTags',
PRIMARY KEY (`id`),
UNIQUE KEY `tagNameIdx` (`name`,`ediTypeFk`),
UNIQUE KEY `tagEdiTypeFkIdx` (`ediTypeFk`),
@@ -27915,7 +29395,7 @@ DROP TABLE IF EXISTS `taxCode`;
CREATE TABLE `taxCode` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
- `code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
+ `code` varchar(10) CHARACTER SET utf8 NOT NULL,
`taxTypeFk` tinyint(2) NOT NULL,
`rate` decimal(4,1) NOT NULL DEFAULT '0.0',
`equalizationTax` decimal(4,1) NOT NULL DEFAULT '0.0',
@@ -28051,6 +29531,7 @@ DELIMITER ;;
BEGIN
DECLARE vClientType VARCHAR(255);
DECLARE vStateCode VARCHAR(255);
+ DECLARE vTransferorFirstShipped DATE;
-- Borrar cuando se cambie el insert ticket en la APP móvil
@@ -28068,9 +29549,16 @@ BEGIN
FROM state
WHERE `code` = vStateCode COLLATE utf8_general_ci;
- INSERT INTO bs.clientNewBorn(clientFk, firstShipped, lastShipped)
- VALUES(NEW.clientFk, NEW.shipped, NEW.shipped)
- ON DUPLICATE KEY UPDATE lastShipped = NEW.shipped;
+ IF YEAR(NEW.shipped) > 2000 THEN
+ SELECT cnb.firstShipped INTO vTransferorFirstShipped
+ FROM bs.clientNewBorn cnb
+ JOIN `client` c ON c.transferorFk = cnb.clientFk
+ WHERE c.id = NEW.clientFk;
+
+ INSERT INTO bs.clientNewBorn(clientFk, firstShipped, lastShipped)
+ VALUES(NEW.clientFk, IFNULL(vTransferorFirstShipped, CURDATE()), CURDATE())
+ ON DUPLICATE KEY UPDATE lastShipped = CURDATE();
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -28080,9 +29568,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 = 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 ;;
@@ -28105,6 +29593,7 @@ BEGIN
SET NEW.shipped = DATE_FORMAT(NEW.shipped, '2000-%m-%d %T');
SET NEW.landed = DATE_FORMAT(NEW.landed, '2000-%m-%d %T');
SET NEW.routeFk = NULL;
+ SET NEW.zoneFk = NULL;
END IF;
IF NEW.routeFk AND NEW.isDeleted THEN
@@ -28135,6 +29624,22 @@ BEGIN
CALL stock.log_add('ticket', NEW.id, OLD.id);
END IF;
+ IF !(NEW.addressFk <=> OLD.addressFk) THEN
+ DELETE t
+ FROM ticketObservation t
+ JOIN observationType ot ON ot.id = t.observationTypeFk
+ WHERE t.ticketFk = NEW.id AND
+ ot.description = 'Repartidor';
+ IF ROW_COUNT() > 0 THEN
+ INSERT INTO ticketLog (originFk, userFk, action, description)
+ VALUES (NEW.id, account.userGetId(), 'delete', CONCAT ('Notas de repartidor por cambio de consignatario'));
+ END IF;
+ INSERT INTO ticketObservation(ticketFk, observationTypeFk, description)
+ SELECT NEW.id, ao.observationTypeFk, ao.description
+ FROM addressObservation ao
+ JOIN address a ON a.id = ao.addressFk
+ WHERE a.id = NEW.addressFk;
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -28482,6 +29987,7 @@ CREATE TABLE `ticketParking` (
`ticketFk` int(11) NOT NULL,
`parkingFk` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `workerFk` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ticketParking_idx1` (`ticketFk`,`parkingFk`),
UNIQUE KEY `ticketFk_UNIQUE` (`ticketFk`),
@@ -28490,6 +29996,26 @@ CREATE TABLE `ticketParking` (
CONSTRAINT `ticketParking_fk2` FOREIGN KEY (`parkingFk`) REFERENCES `parking` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT 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 */;
+/*!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 ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`ticketParking_BEFORE_INSERT` BEFORE INSERT ON `ticketParking` FOR EACH ROW
+BEGIN
+
+ SET NEW.workerFk = vn.getUser();
+
+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 */ ;
--
-- Temporary table structure for view `ticketPreviousPreparingList`
@@ -29563,6 +31089,7 @@ CREATE TABLE `worker` (
`bossFk` int(11) NOT NULL DEFAULT '103',
`fiDueDate` datetime DEFAULT NULL,
`hasMachineryAutorized` tinyint(2) DEFAULT '0',
+ `seniority` date DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `CodigoTrabajador_UNIQUE` (`code`),
UNIQUE KEY `user` (`user__`),
@@ -29726,6 +31253,33 @@ CREATE TABLE `workerHourPrice` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Recoge los acuerdos de los distintos convenios';
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `workerIrpf`
+--
+
+DROP TABLE IF EXISTS `workerIrpf`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `workerIrpf` (
+ `workerFk` int(11) NOT NULL,
+ `spouseNif` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `geographicMobilityDate` date DEFAULT NULL,
+ `disabilityGradeFk` int(11) DEFAULT NULL,
+ `isDependend` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Acredita la necesidad de ayuda de terceras personas o movilidad reducida',
+ `familySituation` enum('1','2','3') COLLATE utf8_unicode_ci DEFAULT '1',
+ `spousePension` decimal(10,2) DEFAULT NULL COMMENT 'Apartado 4 - Pensión compensatoria en favor del conyuge ',
+ `childPension` decimal(10,2) DEFAULT NULL COMMENT 'Apartado 4 - Anualidades por alimentos en favor de los hijos',
+ `hasHousingPaymentBefore` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Apartado 5 - Pagos por adquisición o rehabilitación de la vivienda habitual utilizando financiación ajena, con derecho a deducción del IRPF',
+ `hasHousingPaymentAfter` tinyint(1) NOT NULL DEFAULT '0',
+ `hasExtendedWorking` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Aprtado 1 - prolongar la actividad laboral',
+ `updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`workerFk`),
+ KEY `workerIrpf_disabilityGradeFk` (`disabilityGradeFk`),
+ CONSTRAINT `workerIrpf_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `workerIrpf_wokerFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Modelo 145 IRPF apartado 1 - 4 y 5 ';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `workerJourney`
--
@@ -29869,6 +31423,31 @@ SET character_set_client = utf8;
1 AS `mediaValue`*/;
SET character_set_client = @saved_cs_client;
+--
+-- Table structure for table `workerRelatives`
+--
+
+DROP TABLE IF EXISTS `workerRelatives`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `workerRelatives` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `workerFk` int(11) NOT NULL,
+ `isDescendant` tinyint(1) DEFAULT '1' COMMENT 'Descendientes - Ascendientes',
+ `disabilityGradeFk` int(11) DEFAULT NULL,
+ `birthed` int(4) NOT NULL,
+ `adoptionYear` int(4) DEFAULT NULL COMMENT 'Solo en el caso de descendientes',
+ `isDependend` tinyint(1) DEFAULT '0',
+ `isJointCustody` tinyint(1) DEFAULT '0' COMMENT 'Solo en el caso de descendientes',
+ `updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `workerRelatives_disabilityGradeFk` (`disabilityGradeFk`),
+ KEY `workerRelatives_workerFk` (`workerFk`),
+ CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Modelo 145 IRPF apartado 2 y 3';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Temporary table structure for view `workerSpeedExpedition`
--
@@ -30395,6 +31974,25 @@ CREATE TABLE `zoneConfig` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Temporary table structure for view `zoneEstimatedDelivery`
+--
+
+DROP TABLE IF EXISTS `zoneEstimatedDelivery`;
+/*!50001 DROP VIEW IF EXISTS `zoneEstimatedDelivery`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `zoneEstimatedDelivery` AS SELECT
+ 1 AS `zoneFk`,
+ 1 AS `hourTheoretical`,
+ 1 AS `totalVolume`,
+ 1 AS `remainingVolume`,
+ 1 AS `speed`,
+ 1 AS `hourEffective`,
+ 1 AS `minutesLess`,
+ 1 AS `etc`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `zoneEvent`
--
@@ -30601,9 +32199,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 = 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_unicode_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
@@ -30663,97 +32261,97 @@ DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
-/*!50003 SET character_set_client = utf8mb4 */ ;;
-/*!50003 SET character_set_results = utf8mb4 */ ;;
-/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;;
+/*!50003 SET 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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2019-11-08 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Notifica en caso de que el servidor de impresión este parado' DO BEGIN
-
- DECLARE vCurrentCount INT;
- DECLARE vCheckSum INT;
- DECLARE vIsAlreadyNotified BOOLEAN;
- DECLARE vTableQueue TEXT;
- DECLARE vLineQueue TEXT;
- DECLARE vDone BOOL DEFAULT FALSE;
- DECLARE vCur CURSOR FOR
- SELECT CONCAT('
- ', IFNULL(pq.id, ''), '
- ', IFNULL(p.path, ''),'
- ', IFNULL(i.Informe, ''),'
- ', IFNULL(e.Estado, ''),'
- ', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),'
- ', IFNULL(pq.`error`, ''),'
- ')
- FROM vn.printingQueue pq
- LEFT JOIN vn.worker w ON w.id = pq.worker
- LEFT JOIN vn.printer p ON p.id = pq.printer
- LEFT JOIN vn2008.Informes i ON i.Id_Informe = pq.report
- JOIN vn2008.Estados e ON e.Id_Estado = pq.state
- LIMIT 30;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND
- SET vDone = TRUE;
-
- SELECT COUNT(*), IFNULL(SUM(id),0) INTO vCurrentCount, vCheckSum
- FROM vn.printingQueue WHERE state = 1;
-
- SELECT isAlreadyNotified INTO vIsAlreadyNotified
- FROM printingQueueCheck;
-
- IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND
- (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND
- vIsAlreadyNotified = FALSE AND vCurrentCount > 0
- THEN
-
- SELECT '
-
- Id Cola
- Ruta Impresora
- Informe
- Estado
- Trabajador
- Error
- ' INTO vTableQueue;
-
- OPEN vCur;
-
- l: LOOP
-
- SET vDone = FALSE;
-
- FETCH vCur INTO vLineQueue;
-
- IF vDone THEN
- LEAVE l;
- END IF;
-
- SELECT CONCAT(vTableQueue, vLineQueue) INTO vTableQueue;
-
- END LOOP;
-
- CLOSE vCur;
-
- INSERT INTO vn2008.mail (`to`, subject, text)
- VALUES ('cau@verdnatura.es, sysadmin@verdnatura.es',
- 'servidor de impresion parado',
- CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '
'));
-
- UPDATE printingQueueCheck SET isAlreadyNotified = TRUE;
- END IF;
-
- IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND
- vIsAlreadyNotified = TRUE
- THEN
- UPDATE printingQueueCheck SET isAlreadyNotified = FALSE;
- END IF;
-
- UPDATE printingQueueCheck
- SET lastCount = vCurrentCount,
- lastCheckSum = vCheckSum;
-
+/*!50106 CREATE*/ /*!50117 DEFINER=`z-sysadmin`@`%`*/ /*!50106 EVENT `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2019-11-08 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Notifica en caso de que el servidor de impresión este parado' DO BEGIN
+
+ DECLARE vCurrentCount INT;
+ DECLARE vCheckSum INT;
+ DECLARE vIsAlreadyNotified BOOLEAN;
+ DECLARE vTableQueue TEXT;
+ DECLARE vLineQueue TEXT;
+ DECLARE vDone BOOL DEFAULT FALSE;
+ DECLARE vCur CURSOR FOR
+ SELECT CONCAT('
+ ', IFNULL(pq.id, ''), '
+ ', IFNULL(p.path, ''),'
+ ', IFNULL(i.Informe, ''),'
+ ', IFNULL(e.Estado, ''),'
+ ', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),'
+ ', IFNULL(pq.`error`, ''),'
+ ')
+ FROM vn.printingQueue pq
+ LEFT JOIN vn.worker w ON w.id = pq.worker
+ LEFT JOIN vn.printer p ON p.id = pq.printer
+ LEFT JOIN vn2008.Informes i ON i.Id_Informe = pq.report
+ JOIN vn2008.Estados e ON e.Id_Estado = pq.state
+ LIMIT 30;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND
+ SET vDone = TRUE;
+
+ SELECT COUNT(*), IFNULL(SUM(id),0) INTO vCurrentCount, vCheckSum
+ FROM vn.printingQueue WHERE state = 1;
+
+ SELECT isAlreadyNotified INTO vIsAlreadyNotified
+ FROM printingQueueCheck;
+
+ IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND
+ (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND
+ vIsAlreadyNotified = FALSE AND vCurrentCount > 0
+ THEN
+
+ SELECT '
+
+ Id Cola
+ Ruta Impresora
+ Informe
+ Estado
+ Trabajador
+ Error
+ ' INTO vTableQueue;
+
+ OPEN vCur;
+
+ l: LOOP
+
+ SET vDone = FALSE;
+
+ FETCH vCur INTO vLineQueue;
+
+ IF vDone THEN
+ LEAVE l;
+ END IF;
+
+ SELECT CONCAT(vTableQueue, vLineQueue) INTO vTableQueue;
+
+ END LOOP;
+
+ CLOSE vCur;
+
+ INSERT INTO vn2008.mail (`to`, subject, text)
+ VALUES ('cau@verdnatura.es, sysadmin@verdnatura.es',
+ 'servidor de impresion parado',
+ CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '
'));
+
+ UPDATE printingQueueCheck SET isAlreadyNotified = TRUE;
+ END IF;
+
+ IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND
+ vIsAlreadyNotified = TRUE
+ THEN
+ UPDATE printingQueueCheck SET isAlreadyNotified = FALSE;
+ END IF;
+
+ UPDATE printingQueueCheck
+ SET lastCount = vCurrentCount,
+ lastCheckSum = vCheckSum;
+
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
@@ -31380,11 +32978,94 @@ BEGIN
CALL vn.ticketGetTotal;
SELECT IFNULL(SUM(t.amount), 0) INTO vDebt
- FROM (
- SELECT SUM(total) amount
+ FROM (
+ SELECT SUM(IFNULL(total,0)) amount
FROM tmp.ticketTotal
+ UNION ALL
+ SELECT SUM(amountPaid) amount
+ FROM receipt
+ WHERE clientFk = vClient
+ AND payed > vDateEnd
UNION ALL
- SELECT SUM(amountPaid)
+ SELECT SUM(amount)
+ FROM clientRisk
+ WHERE clientFk = vClient
+ UNION ALL
+ SELECT CAST(-SUM(amount) / 100 AS DECIMAL(10,2))
+ FROM hedera.tpvTransaction
+ WHERE clientFk = vClient
+ AND receiptFk IS NULL
+ AND `status` = 'ok'
+ ) t;
+
+ DROP TEMPORARY TABLE IF EXISTS
+ tmp.ticket,
+ tmp.ticketTotal;
+
+ RETURN vDebt;
+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 FUNCTION IF EXISTS `clientGetDebt__` */;
+/*!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`@`%` FUNCTION `clientGetDebt__`(vClient INT, vDate DATE) RETURNS decimal(10,2)
+ READS SQL DATA
+BEGIN
+/**
+ * Devuelve el saldo de un cliente.
+ *
+ * @param vClient Identificador del cliente
+ * @param vDate Fecha hasta la que tener en cuenta
+ * @return Saldo del cliente
+ */
+ DECLARE vDateEnd DATETIME;
+ DECLARE vDateIni DATETIME;
+ DECLARE vDebt DECIMAL(10,2);
+ DECLARE vHasDebt BOOLEAN;
+
+ SELECT COUNT(*) INTO vHasDebt
+ FROM `client` c
+ WHERE c.id = vClient AND c.typeFk = 'normal';
+
+ IF NOT vHasDebt THEN
+ RETURN 0;
+ END IF;
+
+ SET vDate = IFNULL(vDate, CURDATE());
+
+ SET vDateIni = TIMESTAMPADD(MONTH, -2, CURDATE());
+ SET vDateEnd = TIMESTAMP(vDate, '23:59:59');
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
+ CREATE TEMPORARY TABLE tmp.ticket
+ (INDEX (ticketFk))
+ ENGINE = MEMORY
+ SELECT id ticketFk
+ FROM ticket
+ WHERE clientFk = vClient
+ AND refFk IS NULL
+ AND shipped BETWEEN vDateIni AND vDateEnd;
+
+ CALL vn.ticketGetTotal;
+
+ SELECT IFNULL(SUM(t.amount), 0) INTO vDebt
+ FROM (
+
+ SELECT SUM(IFNULL(total,0)) amount
+ FROM tmp.ticketTotal
+ UNION ALL
+ SELECT SUM(amountPaid) amount
FROM receipt
WHERE clientFk = vClient
AND payed > vDateEnd
@@ -31840,6 +33521,42 @@ BEGIN
RETURN curRate;
+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 FUNCTION IF EXISTS `duaTax_getRate` */;
+/*!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=`z-sysadmin`@`%` FUNCTION `duaTax_getRate`(vDua INT, vTaxClass INT) RETURNS decimal(5,2)
+ DETERMINISTIC
+BEGIN
+ DECLARE vCountryFk INTEGER;
+
+ SELECT s.countryFk INTO vCountryFk
+ FROM dua d
+ JOIN supplier s ON s.id = d.companyFk
+ WHERE d.id = vDua;
+
+ RETURN (SELECT rate
+ FROM
+ (SELECT taxClassFk, rate
+ FROM invoiceInTaxBookingAccount
+ WHERE effectived <= CURDATE()
+ AND countryFk = vCountryFk
+ AND taxClassFk = vTaxClass
+ ORDER BY effectived DESC
+ ) ba1
+ GROUP BY taxClassFk);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -32074,7 +33791,7 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` FUNCTION `floramondo_getEntry`(vLanded DATE) RETURNS int(11)
+CREATE DEFINER=`root`@`%` FUNCTION `floramondo_getEntry`(vLanded DATETIME) RETURNS int(11)
READS SQL DATA
BEGIN
@@ -32104,10 +33821,14 @@ BEGIN
END IF;
END IF;
+
SELECT entryFk INTO previousEntryFk FROM floramondoConfig;
IF NOT (previousEntryFk <=> vEntryFk) THEN
DELETE FROM buy WHERE entryFk = previousEntryFk;
- REPLACE INTO floramondoConfig SET entryFk = vEntryFk;
+ DELETE FROM entry WHERE id = previousEntryFk;
+ UPDATE floramondoConfig SET entryFk = vEntryFk;
+ UPDATE floramondoConfig SET nextLanded = vLanded
+ WHERE vLanded IS NOT NULL;
END IF;
RETURN vEntryFk;
@@ -32133,6 +33854,61 @@ BEGIN
DECLARE vTravelFk INT;
DECLARE vWarehouseOutName VARCHAR(50) DEFAULT 'Holanda';
+ DECLARE vWarehouseInName VARCHAR(50) DEFAULT 'VNH';
+ DECLARE vAgencyModeName VARCHAR(50) DEFAULT 'HOLANDA DIRECTO';
+
+ IF vLanded THEN
+ SELECT IFNULL(MAX(tr.id),0) INTO vTravelFk
+ FROM vn.travel tr
+ JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk
+ JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk
+ JOIN vn.agencyMode am ON am.id = tr.agencyFk
+ WHERE wIn.name = vWarehouseInName
+ AND wOut.name = vWarehouseOutName
+ AND am.name = vAgencyModeName
+ AND landed = vLanded;
+
+ IF NOT vTravelFk THEN
+
+ INSERT INTO vn.travel(landed, shipped, warehouseInFk, warehouseOutFk, agencyFk)
+ SELECT vLanded, curdate(), wIn.id, wOut.id, am.id
+ FROM vn.warehouse wIn
+ JOIN vn.warehouse wOut ON wOut.name = vWarehouseOutName
+ JOIN vn.agencyMode am ON am.name = vAgencyModeName
+ WHERE wIn.name = vWarehouseInName;
+
+ SELECT MAX(tr.id) INTO vTravelFk
+ FROM vn.travel tr
+ JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk
+ JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk
+ WHERE wIn.name = vWarehouseInName
+ AND wOut.name = vWarehouseOutName
+ AND landed = vLanded;
+ END IF;
+ END IF;
+ RETURN vTravelFk;
+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 FUNCTION IF EXISTS `floramondo_getTravel__` */;
+/*!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`@`%` FUNCTION `floramondo_getTravel__`(vLanded DATE) RETURNS int(11)
+ READS SQL DATA
+BEGIN
+
+ DECLARE vTravelFk INT;
+ DECLARE vWarehouseOutName VARCHAR(50) DEFAULT 'Holanda';
DECLARE vWarehouseInName VARCHAR(50) DEFAULT 'VNH';
IF vLanded THEN
@@ -35087,9 +36863,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 = 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 ;;
@@ -35138,9 +36914,15 @@ BEGIN
UPDATE vn.itemCost ic
JOIN vn.item i ON i.id = ic.itemFk
SET ic.cm3delivery = i.compression * ic.cm3
- WHERE ic.itemFk = vItemFk
- AND ic.warehouseFk = vWarehouse;
+ WHERE ic.itemFk = vItemFk AND
+ ic.warehouseFk = vWarehouse;
+ UPDATE vn.itemCost ic
+ JOIN cache.last_buy lb ON lb.item_id = ic.itemFk AND lb.warehouse_id = ic.warehouseFk
+ JOIN vn.buy b ON b.id = lb.buy_id
+ SET ic.grams = b.weight * 1000 / b.packing
+ WHERE ic.itemFk = vItemFk AND
+ ic.warehouseFk = vWarehouse;
END IF;
SELECT isFeedStock INTO vIsFeedStock
@@ -35324,6 +37106,60 @@ 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 `buy_recalcPrices` */;
+/*!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 `buy_recalcPrices`()
+BEGIN
+/**
+ * Recalcula los precios para las compras insertadas en tmp.buyRecalc
+ *
+ * @param tmp.buyRecalc (id)
+ */
+ DECLARE vLanded DATE;
+ DECLARE vWarehouseFk INT;
+
+ SELECT t.landed, t.warehouseInFk INTO vLanded, vWarehouseFk
+ FROM tmp.buyRecalc br
+ JOIN buy b ON b.id = br.id
+ JOIN entry e ON e.id = b.entryFk
+ JOIN travel t ON t.id = e.travelFk
+ LIMIT 1;
+
+ CALL vn.rate_getPrices(vLanded, vWarehouseFk);
+
+ -- quitado los cubos a floramondo revisar en buy_tarifas_entry
+ UPDATE buy b
+ JOIN tmp.buyRecalc br ON br.id = b.id
+ LEFT JOIN packaging p ON p.id = b.packageFk
+ JOIN item i ON i.id = b.itemFk
+ JOIN entry e ON e.id = b.entryFk
+ JOIN itemType it ON it.id = i.typeFk
+ JOIN travel tr ON tr.id = e.travelFk
+ JOIN agencyMode am ON am.id = tr.agencyFk
+ JOIN tmp.rate r
+ SET b.freightValue = @PF:=
+ ROUND(IFNULL(((am.m3 * @cm3:= item_getVolume(b.itemFk, b.packageFk)) / 1000000) / b.packing,0),3),
+ b.comissionValue = @CF:= ROUND(IFNULL(e.commission * b.buyingValue / 100, 0), 3),
+ b.packageValue = @EF:= IF(p.isPackageReturnable != 0, 0, ROUND(IFNULL(p.`value` / b.packing ,0),3)),
+ b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0
+ b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2),
+ b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2);
+
+ DROP TEMPORARY TABLE tmp.rate;
+END ;;
+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 `buy_updateGrouping` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -35346,7 +37182,7 @@ FROM vn2008.t_item_last_buy b
INNER JOIN vn2008.Compres c ON c.Id_Compra = b.buy_id
where b.warehouse_id = vWarehouseFk AND b.item_id =vItemFk;
-UPDATE vn.buy SET grouping = vGrouping WHERE id = lastId;
+UPDATE vn.buy SET `grouping` = vGrouping WHERE id = lastId;
END ;;
DELIMITER ;
@@ -35983,9 +37819,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 = 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 ;;
@@ -36115,7 +37951,12 @@ proc: BEGIN
JOIN component c
JOIN tmp.ticketComponentCalculate tcc ON tcc.itemFk = tcb.itemFk AND tcc.warehouseFk = tcb.warehouseFk
LEFT JOIN specialPrice sp ON sp.clientFk = vClientFk AND sp.itemFk = tcc.itemFk
- WHERE c.id = vDiscountLastItemComponent AND c.tax <> 0 AND tcc.minPrice < tcc.rate3 AND sp.value IS NULL;
+ JOIN vn.item i ON i.id = tcb.itemFk
+ WHERE c.id = vDiscountLastItemComponent
+ AND c.tax <> 0
+ AND tcc.minPrice < tcc.rate3
+ AND sp.value IS NULL
+ AND i.supplyResponseFk IS NULL; -- FLORAMONDO
INSERT INTO tmp.ticketComponent
SELECT tcc.warehouseFk, tcc.itemFk, vSellByPacketComponent, tcc.rate2 - tcc.rate3
@@ -36587,9 +38428,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 ;;
@@ -36640,6 +38481,7 @@ BEGIN
JOIN travel t ON t.id = e.travelFk
WHERE t.landed <= vDateShort;
DELETE FROM stowaway WHERE created < v3Month;
+ DELETE FROM vn.buy WHERE created < vDateShort AND entryFk = 9200;
-- Equipos duplicados
DELETE w.*
@@ -36863,9 +38705,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 = 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 ;;
@@ -36930,7 +38772,7 @@ BEGIN
SELECT clientFk, SUM(amount) risk
FROM client c
JOIN tClientRisk cr ON cr.clientFk = c.id
- WHERE c.isActive
+ -- WHERE c.isActive JGF 11/08/2020 a Rodrigo no le aparecia el riesgo de su cliente 17567
GROUP BY c.id;
END ;;
DELIMITER ;
@@ -37229,6 +39071,95 @@ 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 `clientNewBorn_recalc__` */;
+/*!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 `clientNewBorn_recalc__`()
+BLOCK1: BEGIN
+
+ DECLARE vClientFk INT;
+ DECLARE vShipped DATE;
+ DECLARE vPreviousShipped DATE;
+ DECLARE vDone boolean;
+ DECLARE cur cursor for
+ SELECT clientFk, firstShipped
+ FROM bs.clientNewBorn;
+ DECLARE continue HANDLER FOR NOT FOUND SET vDone = TRUE;
+ SET vDone := FALSE;
+ TRUNCATE bs.clientNewBorn;
+ INSERT INTO bs.clientNewBorn
+ SELECT c.id, MAX(t.shipped), MAX(t.shipped)
+ FROM vn.client c
+ JOIN vn.ticket t on t.clientFk = c.id
+ WHERE t.shipped BETWEEN TIMESTAMPADD(YEAR, -1, CURDATE()) AND CURDATE()
+ GROUP BY c.id;
+ OPEN cur;
+
+ LOOP1: LOOP
+ SET vDone := FALSE;
+ FETCH cur INTO vClientFk, vShipped;
+
+ IF vDone THEN
+ CLOSE cur;
+ LEAVE LOOP1;
+ END IF;
+
+ BLOCK2: BEGIN
+ DECLARE vCurrentShipped DATE;
+ DECLARE vDone2 boolean;
+ DECLARE cur2 CURSOR FOR
+ SELECT shipped
+ FROM vn.ticket
+ WHERE clientFk = vClientFk AND shipped <= CURDATE()
+ ORDER BY shipped DESC;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone2 = TRUE;
+ SET vDone2 := FALSE;
+ OPEN cur2;
+
+ SET vPreviousShipped := vShipped;
+ LOOP2: LOOP
+ SET vDone2 := FALSE;
+ FETCH cur2 INTO vCurrentShipped;
+
+
+ IF DATEDIFF(vPreviousShipped,vCurrentShipped) > 365 THEN
+
+ UPDATE bs.clientNewBorn
+ SET firstShipped = vPreviousShipped
+ WHERE clientFk= vClientFk;
+
+ CLOSE cur2;
+ LEAVE LOOP2;
+ END IF;
+ SET vPreviousShipped := vCurrentShipped;
+
+ IF vDone2 THEN
+
+ UPDATE bs.clientNewBorn
+ SET firstShipped = vCurrentShipped
+ WHERE clientFk= vClientFk;
+ CLOSE cur2;
+ LEAVE LOOP2;
+ END IF;
+
+ END LOOP LOOP2;
+
+ END BLOCK2;
+ END LOOP LOOP1;
+END BLOCK1 ;;
+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 `clientPackagingOverstock` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -37517,54 +39448,54 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clientRemoveWorker__`()
-BEGIN
- DECLARE done BOOL DEFAULT FALSE;
- DECLARE vClientFk INT;
-
- DECLARE rs CURSOR FOR
- SELECT c.clientFk
- FROM tmp.clientGetDebt c
- LEFT JOIN tmp.risk r ON r.clientFk = c.clientFk
- WHERE IFNULL(r.risk,0) = 0;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
- CREATE TEMPORARY TABLE tmp.clientGetDebt
- SELECT cd.id as clientFk
- FROM bs.clientDied cd
- LEFT JOIN vn.clientProtected cp ON cp.clientFk = cd.id
- JOIN vn.client c ON c.id = cd.id
- JOIN vn.province p ON p.id = c.provinceFk
- JOIN vn.country co ON co.id = p.countryFk
- WHERE cd.Aviso = 'TERCER AVISO'
- AND cp.clientFk IS NULL
- AND co.country NOT IN ('Portugal','Francia','España exento')
- AND c.salesPersonFk IS NOT NULL;
-
- CALL vn.clientGetDebt(curdate());
-
- DROP TEMPORARY TABLE IF EXISTS tmp.contador;
- CREATE TEMPORARY TABLE tmp.contador (id INT)
- ENGINE = MEMORY;
-
- OPEN rs;
- FETCH rs INTO vClientFk;
-
- WHILE NOT done DO
- INSERT INTO tmp.contador SET id = vClientFk;
- CALL vn.clientGreugeSpray(vClientFk, TRUE, '',TRUE);
+BEGIN
+ DECLARE done BOOL DEFAULT FALSE;
+ DECLARE vClientFk INT;
+
+ DECLARE rs CURSOR FOR
+ SELECT c.clientFk
+ FROM tmp.clientGetDebt c
+ LEFT JOIN tmp.risk r ON r.clientFk = c.clientFk
+ WHERE IFNULL(r.risk,0) = 0;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
+ CREATE TEMPORARY TABLE tmp.clientGetDebt
+ SELECT cd.id as clientFk
+ FROM bs.clientDied cd
+ LEFT JOIN vn.clientProtected cp ON cp.clientFk = cd.id
+ JOIN vn.client c ON c.id = cd.id
+ JOIN vn.province p ON p.id = c.provinceFk
+ JOIN vn.country co ON co.id = p.countryFk
+ WHERE cd.Aviso = 'TERCER AVISO'
+ AND cp.clientFk IS NULL
+ AND co.country NOT IN ('Portugal','Francia','España exento')
+ AND c.salesPersonFk IS NOT NULL;
+
+ CALL vn.clientGetDebt(curdate());
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.contador;
+ CREATE TEMPORARY TABLE tmp.contador (id INT)
+ ENGINE = MEMORY;
+
+ OPEN rs;
+ FETCH rs INTO vClientFk;
+
+ WHILE NOT done DO
+ INSERT INTO tmp.contador SET id = vClientFk;
+ CALL vn.clientGreugeSpray(vClientFk, TRUE, '',TRUE);
UPDATE vn.client SET salesPersonFk = NULL WHERE id = vClientFk;
INSERT INTO vn.clientLog (originFk, userFk, `action`, description)
VALUES (vClientFk, account.userGetId(), 'update', CONCAT('Se ha desasignado el cliente por que no ha comprado en 3 meses'));
-
+
REPLACE bs.clientNewBorn(clientFk, shipped)
- VALUES(vClientFk, CURDATE());
- FETCH rs INTO vClientFk;
- END WHILE;
-
- CLOSE rs;
+ VALUES(vClientFk, CURDATE());
+ FETCH rs INTO vClientFk;
+ END WHILE;
+
+ CLOSE rs;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -37913,6 +39844,185 @@ BEGIN
tmp.salePlacementList_2,
tmp.salePlacementList_3;
+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 `collectionPlacement_get_gamma` */;
+/*!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 `collectionPlacement_get_gamma`(vParamFk INT(11))
+BEGIN
+
+ DECLARE vCalcFk INT;
+ DECLARE vWarehouseFk INT;
+ DECLARE vWarehouseAliasFk INT;
+ DECLARE vCurrentYear INT DEFAULT YEAR(NOW());
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.sale;
+ CREATE TEMPORARY TABLE tmp.sale
+ ENGINE = MEMORY
+ SELECT 0000000 as ticketFk,
+ 0000000 as saleFk,
+ 0000000 as itemFk,
+ FALSE as isStowaway,
+ 0 as quantity;
+
+ INSERT INTO tmp.sale(ticketFk, saleFk, itemFk, isStowaway)
+ SELECT s.ticketFk, s.id, s.itemFk, FALSE
+ FROM vn.ticketCollection tc
+ JOIN vn.sale s ON s.ticketFk = tc.ticketFk
+ WHERE tc.collectionFk = vParamFk
+ UNION ALL
+ SELECT sw.shipFk, s.id, s.itemFk, TRUE
+ FROM vn.sale s
+ JOIN vn.stowaway sw ON sw.id = s.ticketFk
+ JOIN vn.ticketCollection tc ON tc.ticketFk = sw.shipFk
+ WHERE tc.collectionFk = vParamFk;
+
+ INSERT INTO tmp.sale(ticketFk, saleFk, itemFk, isStowaway)
+ SELECT s.ticketFk, s.id, s.itemFk, FALSE
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ WHERE s.ticketFk = vParamFk
+ AND t.shipped > '2020-01-01'
+ UNION ALL
+ SELECT sw.shipFk, s.id, s.itemFk, TRUE
+ FROM vn.sale s
+ JOIN vn.stowaway sw ON sw.id = s.ticketFk
+ WHERE sw.shipFk = vParamFk;
+
+ DELETE FROM tmp.sale
+ WHERE saleFk = 0;
+
+ SELECT t.warehouseFk, w.aliasFk
+ INTO vWarehouseFk, vWarehouseAliasFk
+ FROM vn.ticket t
+ JOIN tmp.sale ts ON ts.ticketFk = t.id
+ JOIN vn.warehouse w ON w.id = t.warehouseFk
+ LIMIT 1;
+
+ CALL cache.visible_refresh(vCalcFk,FALSE,vWarehouseFk);
+
+ UPDATE tmp.sale ts
+ JOIN ( SELECT itemFk, sum(visible) as visible
+ FROM vn.itemShelvingStock iss
+ JOIN vn.warehouse w ON w.id = iss.warehouseFk
+ WHERE w.aliasFk = vWarehouseAliasFk
+ GROUP BY iss.itemFk ) iss ON iss.itemFk = ts.itemFk
+ SET ts.quantity = iss.visible;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.sale2;
+ CREATE TEMPORARY TABLE tmp.sale2
+ (PRIMARY KEY (saleFk))
+ ENGINE = MEMORY
+ SELECT DISTINCT saleFk FROM tmp.sale;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.`grouping`;
+ CREATE TEMPORARY TABLE tmp.`grouping`
+ ENGINE MEMORY
+ SELECT b.itemFk,
+ CASE b.groupingMode
+ WHEN 0 THEN 1
+ WHEN 2 THEN b.packing
+ ELSE b.`grouping`
+ END AS `grouping`
+ FROM buy b
+ JOIN cache.last_buy lb ON lb.buy_id = b.id
+ WHERE lb.warehouse_id = vWarehouseFk
+ ;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.grouping2;
+ CREATE TEMPORARY TABLE tmp.grouping2
+ ENGINE MEMORY
+ SELECT * FROM tmp.`grouping`;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.salePlacementList;
+ CREATE TEMPORARY TABLE tmp.salePlacementList
+ ENGINE MEMORY
+
+ SELECT ts.saleFk,
+ ts.itemFk,
+ CONCAT(
+ IF( iss.id,
+ CONCAT('< ', IFNULL(wk.`code`, '---'),' > '),
+ ''),
+ p.`code`) COLLATE utf8_general_ci as placement ,
+ sh.code COLLATE utf8_general_ci as shelving,
+ ish.created,
+ ish.visible,
+ IF(ts.isStowaway, - 100000, IF(ish.visible > 0 OR iss.id, 1, 100000)) * p.pickingOrder as `order`,
+ IFNULL(IF(sc.isPreviousPreparedByPacking, ish.packing, g.`grouping`),1) as `grouping`,
+ IF(iss.id, TO_SECONDS(TIMESTAMPADD(YEAR,-vCurrentYear,iss.created)), TO_SECONDS(TIMESTAMPADD(YEAR,-vCurrentYear,ish.created)) + TO_SECONDS(TIMESTAMPADD(YEAR,-vCurrentYear,NOW()))) as priority,
+ 0 as saleOrder,
+ sc.isPreviousPrepared,
+ iss.id as itemShelvingSaleFk,
+ ts.ticketFk
+ ,iss.id
+ , st.saleFk as salePreviousPrepared
+ , iss.userFk
+ FROM tmp.sale ts
+ LEFT JOIN (SELECT DISTINCT st.saleFk
+ FROM vn.saleTracking st
+ JOIN tmp.sale2 s2 ON s2.saleFk = st.saleFk
+ JOIN vn.state s ON s.id = st.stateFk
+ WHERE st.isChecked
+ AND s.semaphore = 1) st ON st.saleFk = ts.saleFk
+ JOIN vn.itemShelving ish ON ish.itemFk = ts.itemFk
+ JOIN vn.shelving sh ON sh.code = ish.shelvingFk
+ JOIN vn.parking p ON p.id = sh.parkingFk
+ JOIN vn.sector sc ON sc.id = p.sectorFk
+ JOIN vn.warehouse w ON w.id = sc.warehouseFk
+ LEFT JOIN tmp.`grouping` g ON g.itemFk = ts.itemFk
+ LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = ts.saleFk AND iss.itemShelvingFk = ish.id
+ LEFT JOIN vn.worker wk ON wk.id = iss.userFk
+ WHERE w.aliasFk = vWarehouseAliasFk
+ HAVING (iss.id AND st.saleFk) OR salePreviousPrepared IS NULL
+ ;
+ -- select * from tmp.salePlacementList;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.salePlacementList_2;
+ CREATE TEMPORARY TABLE tmp.salePlacementList_2
+ ENGINE MEMORY
+ SELECT saleFk, priority as olderPriority
+ FROM (SELECT saleFk, priority
+ FROM tmp.salePlacementList
+ ORDER BY IF(isPreviousPrepared,2,1), IF(visible > 0 OR itemShelvingSaleFk,1,2), priority
+ ) sub
+ GROUP BY saleFk;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.salePlacementList_3;
+ CREATE TEMPORARY TABLE tmp.salePlacementList_3
+ ENGINE MEMORY
+ SELECT s1.saleFk, `order`as saleOrder
+ FROM tmp.salePlacementList s1
+ JOIN tmp.salePlacementList_2 s2 ON s2.saleFk = s1.saleFk AND s2.olderPriority = s1.priority;
+
+ UPDATE tmp.salePlacementList s1
+ JOIN tmp.salePlacementList_3 s3 ON s3.saleFk = s1.saleFk
+ SET s1.saleOrder = s3.saleOrder;
+
+ SELECT *
+ FROM tmp.salePlacementList
+ ORDER BY saleOrder, IF(isPreviousPrepared,2,1), IF(visible > 0 OR itemShelvingSaleFk,1,2),priority;
+
+ DROP TEMPORARY TABLE
+ tmp.sale,
+ tmp.sale2,
+ tmp.`grouping`,
+ tmp.grouping2,
+ tmp.salePlacementList_2,
+ tmp.salePlacementList_3;
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -37930,6 +40040,108 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `collectionSale_get`(vCollectionFk INT)
+BEGIN
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
+ CREATE TEMPORARY TABLE tmp.ticket
+ SELECT t.id, clientFk, id as showTicketFk
+ FROM vn.ticket t
+ WHERE id = vCollectionFk
+ AND shipped > '2020-01-01'
+ UNION ALL
+ SELECT tc.ticketFk id, clientFk, tc.ticketFk as showTicketFk
+ FROM vn.ticketCollection tc
+ JOIN vn.ticket t ON t.id = tc.ticketFk
+ WHERE tc.collectionFk = vCollectionFk;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticket2;
+ CREATE TEMPORARY TABLE tmp.ticket2
+ SELECT sw.id, t.clientFk, sw.shipFk showTicketFk
+ FROM vn.stowaway sw
+ JOIN tmp.ticket t ON t.id = sw.shipFk;
+
+ INSERT INTO tmp.ticket
+ SELECT * FROM tmp.ticket2;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticket3;
+ CREATE TEMPORARY TABLE tmp.ticket3
+ SELECT * FROM tmp.ticket;
+
+ SELECT showTicketFk ticketFk,
+ s.id as saleFk,
+ s.itemFk,
+ s.quantity,
+ i.longName,
+ i.size,
+ s.reserved,
+ MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) as isPreviousPrepared,
+ MAX(IF(st.semaphore <=> 2, TRUE, FALSE)) as isPrepared,
+ MAX(IF(st.semaphore <=> 3, TRUE, FALSE)) as isControlled,
+ ic.color,
+ ip.productor,
+ s.discount,
+ s.price,
+ i.stems,
+ i.category,
+ o.code AS origin,
+ t.clientFk,
+ s.originalQuantity,
+ TRIM(CONCAT(LPAD(i.longName,30,' '), ' ',RPAD(IFNULL(i.size,''),5,' '))) as line1,
+ TRIM(CONCAT(LPAD(IFNULL(ip.productor,''),30,' '), ' ',LPAD(IFNULL(o.code,''),4,' '))) as line2,
+ TRIM(CONCAT(ic.color, IF(MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) AND t.id != t.showTicketFk, CONCAT(' [ TICKET ',t.id,' ] '),''), IFNULL(LPAD(st.parkingCode,40,' '),''))) as line3,
+ s.isAdded,
+ str.originalQuantity as startQuantity, -- eliminar cuando tengamos la nueva apk
+ c.workerFk,
+ IFNULL(SUM(iss.quantity),0) as pickedQuantity
+ FROM vn.sale s
+ JOIN tmp.ticket t ON t.id = s.ticketFk
+ JOIN vn.item i ON i.id = s.itemFk
+ LEFT JOIN vn.saleTracking str ON str.saleFk = s.id AND str.isChecked = 1
+ LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
+ LEFT JOIN vn.state st ON st.id = str.stateFk
+ LEFT JOIN vn.itemColor ic ON ic.itemFk = s.itemFk
+ LEFT JOIN vn.itemProductor ip ON ip.itemFk = s.itemFk
+ LEFT JOIN vn.origin o ON o.id = i.originFk
+ LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
+ LEFT JOIN vn.collection c ON c.id = tc.collectionFk
+ LEFT JOIN (SELECT st.saleFk, p.`code` as parkingCode
+ FROM vn.saleTracking st
+ JOIN vn.state s ON s.id = st.stateFk
+ JOIN vn.sale sa ON sa.id = st.saleFk
+ JOIN tmp.ticket3 t ON t.id = sa.ticketFk
+ JOIN vn.ticketParking tp ON tp.ticketFk = sa.ticketFk
+ JOIN vn.parking p ON p.id = tp.parkingFk
+ WHERE st.isChecked
+ AND s.semaphore = 1
+ GROUP BY st.saleFk) st ON st.saleFk = s.id
+ GROUP BY s.id
+ HAVING quantity > 0 OR workerFk != vn.getUser()
+ ;
+
+
+
+ DROP TEMPORARY TABLE tmp.ticket;
+ DROP TEMPORARY TABLE tmp.ticket2;
+ DROP TEMPORARY TABLE tmp.ticket3;
+
+
+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 `collectionSale_get_gamma` */;
+/*!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 `collectionSale_get_gamma`(vCollectionFk INT)
BEGIN
DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
@@ -37990,6 +40202,7 @@ BEGIN
LEFT JOIN vn.origin o ON o.id = i.originFk
LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
LEFT JOIN vn.collection c ON c.id = tc.collectionFk
+ /*
LEFT JOIN (SELECT st.saleFk, p.`code` as parkingCode
FROM vn.saleTracking st
JOIN vn.state s ON s.id = st.stateFk
@@ -37999,196 +40212,7 @@ BEGIN
WHERE st.isChecked
AND s.semaphore = 1
GROUP BY st.saleFk) st ON st.saleFk = s.id
- GROUP BY s.id
- HAVING quantity > 0 OR workerFk != vn.getUser()
- ;
-
-
-
- DROP TEMPORARY TABLE tmp.ticket;
- DROP TEMPORARY TABLE tmp.ticket2;
-
-
-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 `collectionSale_get_beta` */;
-/*!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 `collectionSale_get_beta`(vCollectionFk INT)
-BEGIN
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
- CREATE TEMPORARY TABLE tmp.ticket
- SELECT t.id, clientFk, id as showTicketFk
- FROM vn.ticket t
- WHERE id = vCollectionFk
- AND shipped > '2020-01-01'
- UNION ALL
- SELECT tc.ticketFk id, clientFk, tc.ticketFk as showTicketFk
- FROM vn.ticketCollection tc
- JOIN vn.ticket t ON t.id = tc.ticketFk
- WHERE tc.collectionFk = vCollectionFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticket2;
- CREATE TEMPORARY TABLE tmp.ticket2
- SELECT sw.id, t.clientFk, sw.shipFk showTicketFk
- FROM vn.stowaway sw
- JOIN tmp.ticket t ON t.id = sw.shipFk;
-
- INSERT INTO tmp.ticket
- SELECT * FROM tmp.ticket2;
-
- SELECT showTicketFk ticketFk,
- s.id as saleFk,
- s.itemFk,
- s.quantity,
- i.longName,
- i.size,
- s.reserved,
- MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) as isPreviousPrepared,
- MAX(IF(st.semaphore <=> 2, TRUE, FALSE)) as isPrepared,
- MAX(IF(st.semaphore <=> 3, TRUE, FALSE)) as isControlled,
- ic.color,
- ip.productor,
- s.discount,
- s.price,
- i.stems,
- i.category,
- o.code AS origin,
- t.clientFk,
- s.originalQuantity,
- TRIM(CONCAT(LPAD(i.longName,30,' '), ' ',RPAD(IFNULL(i.size,''),5,' '))) as line1,
- TRIM(CONCAT(LPAD(IFNULL(ip.productor,''),30,' '), ' ',LPAD(IFNULL(o.code,''),4,' '))) as line2,
- TRIM(CONCAT(ic.color, IF(MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) AND t.id != t.showTicketFk, CONCAT(' [ TICKET ',t.id,' ] '),''), IFNULL(LPAD(st.parkingCode,40,' '),''))) as line3,
- s.isAdded,
- str.originalQuantity as startQuantity,
- c.workerFk,
- IFNULL(SUM(iss.quantity),0) as pickedQuantity
- FROM vn.sale s
- JOIN tmp.ticket t ON t.id = s.ticketFk
- JOIN vn.item i ON i.id = s.itemFk
- LEFT JOIN vn.saleTracking str ON str.saleFk = s.id AND str.isChecked = 1
- LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
- LEFT JOIN vn.state st ON st.id = str.stateFk
- LEFT JOIN vn.itemColor ic ON ic.itemFk = s.itemFk
- LEFT JOIN vn.itemProductor ip ON ip.itemFk = s.itemFk
- LEFT JOIN vn.origin o ON o.id = i.originFk
- LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
- LEFT JOIN vn.collection c ON c.id = tc.collectionFk
- LEFT JOIN (SELECT st.saleFk, p.`code` as parkingCode
- FROM vn.saleTracking st
- JOIN vn.state s ON s.id = st.stateFk
- JOIN vn.sale sa ON sa.id = st.saleFk
- JOIN vn.ticketParking tp ON tp.ticketFk = sa.ticketFk
- JOIN vn.parking p ON p.id = tp.parkingFk
- WHERE st.isChecked
- AND s.semaphore = 1
- GROUP BY st.saleFk) st ON st.saleFk = s.id
- GROUP BY s.id
- HAVING quantity > 0 OR workerFk != vn.getUser()
- ;
-
-
-
- DROP TEMPORARY TABLE tmp.ticket;
- DROP TEMPORARY TABLE tmp.ticket2;
-
-
-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 `collectionSale_get__` */;
-/*!50003 SET @saved_cs_client = @@character_set_client */ ;
-/*!50003 SET @saved_cs_results = @@character_set_results */ ;
-/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = 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 `collectionSale_get__`(vCollectionFk INT)
-BEGIN
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
- CREATE TEMPORARY TABLE tmp.ticket
- SELECT t.id, clientFk, id as showTicketFk
- FROM vn.ticket t
- WHERE id = vCollectionFk
- AND shipped > '2020-01-01'
- UNION ALL
- SELECT tc.ticketFk id, clientFk, tc.ticketFk as showTicketFk
- FROM vn.ticketCollection tc
- JOIN vn.ticket t ON t.id = tc.ticketFk
- WHERE tc.collectionFk = vCollectionFk;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticket2;
- CREATE TEMPORARY TABLE tmp.ticket2
- SELECT sw.id, t.clientFk, sw.shipFk showTicketFk
- FROM vn.stowaway sw
- JOIN tmp.ticket t ON t.id = sw.shipFk;
-
- INSERT INTO tmp.ticket
- SELECT * FROM tmp.ticket2;
-
- SELECT showTicketFk ticketFk,
- s.id as saleFk,
- s.itemFk,
- s.quantity,
- i.longName,
- i.size,
- s.reserved,
- MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) as isPreviousPrepared,
- MAX(IF(st.semaphore <=> 2, TRUE, FALSE)) as isPrepared,
- MAX(IF(st.semaphore <=> 3, TRUE, FALSE)) as isControlled,
- ic.color,
- ip.productor,
- s.discount,
- s.price,
- i.stems,
- i.category,
- o.code AS origin,
- t.clientFk,
- s.originalQuantity,
- TRIM(CONCAT(LPAD(i.longName,30,' '), ' ',RPAD(IFNULL(i.size,''),5,' '))) as line1,
- TRIM(CONCAT(LPAD(IFNULL(ip.productor,''),30,' '), ' ',LPAD(IFNULL(o.code,''),4,' '))) as line2,
- TRIM(CONCAT(ic.color, IF(MAX(IF(st.semaphore <=> 1, TRUE, FALSE)) AND t.id != t.showTicketFk, CONCAT(' [ TICKET ',t.id,' ] '),''), IFNULL(LPAD(st.parkingCode,40,' '),''))) as line3,
- s.isAdded,
- str.originalQuantity as startQuantity,
- c.workerFk
- FROM vn.sale s
- JOIN tmp.ticket t ON t.id = s.ticketFk
- JOIN vn.item i ON i.id = s.itemFk
- LEFT JOIN vn.saleTracking str ON str.saleFk = s.id AND str.isChecked = 1
- LEFT JOIN vn.state st ON st.id = str.stateFk
- LEFT JOIN vn.itemColor ic ON ic.itemFk = s.itemFk
- LEFT JOIN vn.itemProductor ip ON ip.itemFk = s.itemFk
- LEFT JOIN vn.origin o ON o.id = i.originFk
- LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
- LEFT JOIN vn.collection c ON c.id = tc.collectionFk
- LEFT JOIN (SELECT st.saleFk, p.`code` as parkingCode
- FROM vn.saleTracking st
- JOIN vn.state s ON s.id = st.stateFk
- JOIN vn.sale sa ON sa.id = st.saleFk
- JOIN vn.ticketParking tp ON tp.ticketFk = sa.ticketFk
- JOIN vn.parking p ON p.id = tp.parkingFk
- WHERE st.isChecked
- AND s.semaphore = 1
- GROUP BY st.saleFk) st ON st.saleFk = s.id
+ */
GROUP BY s.id
HAVING quantity > 0 OR workerFk != vn.getUser()
;
@@ -38255,9 +40279,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 = 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 ;;
@@ -38266,12 +40290,12 @@ BEGIN
DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
CREATE TEMPORARY TABLE tmp.ticket
- SELECT t.id, t.clientFk, t.warehouseFk, t.zoneFk
+ SELECT t.id, t.clientFk, t.warehouseFk, t.zoneFk,t.observations
FROM vn.ticket t
WHERE id = vCollectionFk
AND t.shipped > '2020-01-01'
UNION ALL
- SELECT t.id, t.clientFk, t.warehouseFk, t.zoneFk
+ SELECT t.id, t.clientFk, t.warehouseFk, t.zoneFk,t.observations
FROM vn.ticketCollection tc
JOIN vn.ticket t ON t.id = tc.ticketFk
WHERE tc.collectionFk = vCollectionFk;
@@ -38280,13 +40304,15 @@ BEGIN
IFNULL(tc.wagon * 100 + tc.level,0) `level`,
am.name as agencyName,
t.warehouseFk ,
- w.id as salesPersonFk
+ w.id as salesPersonFk,
+ IFNULL(tob.description,'')as observaciones
FROM tmp.ticket t
LEFT JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
LEFT JOIN vn.zone z ON z.id = t.zoneFk
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
LEFT JOIN vn.client c ON c.id = t.clientFk
- LEFT JOIN vn.worker w ON w.id = c.salesPersonFk;
+ LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
+ LEFT JOIN vn.ticketObservation tob ON tob.ticketFk = t.id AND tob.observationTypeFk = 1;
END ;;
DELIMITER ;
@@ -38745,6 +40771,31 @@ BEGIN
JOIN vn.state s ON c.stateFk = s.id
WHERE c.workerFk = vWorkerFk AND s.code = 'ON_PREPARATION';
+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 `collection_increaseQuantity` */;
+/*!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 `collection_increaseQuantity`(
+ vSaleFk INT,
+ vQuantity INT)
+BEGIN
+ DECLARE vOriginalQuantity INT;
+
+ SELECT quantity INTO vOriginalQuantity FROM vn.sale WHERE id = vSaleFk;
+ UPDATE `vn`.`sale` SET `quantity` = vQuantity,`originalQuantity` = vOriginalQuantity WHERE (`id` = vSaleFk);
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -38761,12 +40812,13 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `collection_missingTrash`(vSaleFk BIGINT, vQuantity INT, vIsTrash BOOLEAN, vWarehouseFk INT)
+CREATE DEFINER=`root`@`%` PROCEDURE `collection_missingTrash`(vSaleFk BIGINT, vQuantity INT, vIsTrash BOOLEAN, vWarehouseFk INT, vNewQuantity INT)
BEGIN
DECLARE vTicketFk INT;
DECLARE vClientFk INT DEFAULT 400;
DECLARE vClientName VARCHAR(50);
DECLARE vConsignatario INT;
+ DECLARE vOriginalQuantity INT;
IF vIsTrash THEN
SELECT 200 INTO vClientFk;
@@ -38791,6 +40843,9 @@ BEGIN
INSERT INTO vn.sale (itemFk, ticketFk, concept, quantity, originalQuantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, created, isAdded)
SELECT itemFk, vTicketFk, concept, vQuantity, originalQuantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, created, isAdded
FROM vn.sale s WHERE s.id = vSaleFk;
+
+ SELECT quantity INTO vOriginalQuantity FROM vn.sale WHERE id = vSaleFk;
+ UPDATE vn.sale SET originalQuantity = vOriginalQuantity ,quantity = vNewQuantity WHERE id = vSaleFk;
END ;;
DELIMITER ;
@@ -39125,6 +41180,29 @@ proc:BEGIN
END IF;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `collection_reject` */;
+/*!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 `collection_reject`(vSale INT, vQuantity INT)
+proc: BEGIN
+
+UPDATE vn.sale SET quantity = vQuantity
+WHERE id = vSale;
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -39236,26 +41314,33 @@ BEGIN
DECLARE vCollectionFk INT;
DECLARE vStateFk INT;
+DECLARE vLastState VARCHAR(50);
-SELECT collectionFk INTO vCollectionFk FROM vn.ticketCollection WHERE ticketFk = vTicketFk;
+SELECT name INTO vLastState FROM vn.ticketLastState WHERE ticketFk = vTicketFk;
-SELECT id INTO vStateFk
- FROM vn.state
- WHERE `code` = vState COLLATE utf8_unicode_ci;
+IF vLastState <> 'Encajado' THEN
--- Actualiza el estado del ticket
- INSERT INTO vncontrol.inter(state_id, Id_Ticket, Id_Trabajador)
- SELECT vStateFk, ticketFk, account.myUserGetId()
- FROM vn.ticketCollection tc
- WHERE tc.ticketFk = vTicketFk
- UNION ALL
- SELECT vStateFk, sw.id, account.myUserGetId()
- FROM vn.stowaway sw
- JOIN vn.ticketCollection tc ON tc.ticketFk = sw.shipFk
- WHERE tc.ticketFk = vTicketFk;
-
--- Actualiza la colección
- CALL vn.collection_update(vTicketFk);
+ SELECT collectionFk INTO vCollectionFk FROM vn.ticketCollection WHERE ticketFk = vTicketFk;
+
+ SELECT id INTO vStateFk
+ FROM vn.state
+ WHERE `code` = vState COLLATE utf8_unicode_ci;
+
+ -- Actualiza el estado del ticket
+ INSERT INTO vncontrol.inter(state_id, Id_Ticket, Id_Trabajador)
+ SELECT vStateFk, ticketFk, account.myUserGetId()
+ FROM vn.ticketCollection tc
+ WHERE tc.ticketFk = vTicketFk
+ UNION ALL
+ SELECT vStateFk, sw.id, account.myUserGetId()
+ FROM vn.stowaway sw
+ JOIN vn.ticketCollection tc ON tc.ticketFk = sw.shipFk
+ WHERE tc.ticketFk = vTicketFk;
+
+ -- Actualiza la colección
+ CALL vn.collection_update(vTicketFk);
+
+END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -40237,9 +42322,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 = 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 ;;
@@ -40271,6 +42356,153 @@ BEGIN
CLAVE,
FACTURA)
+ SELECT
+ vBookNumber,
+ d.bookEntried,
+ '4700000999',
+ CONCAT('DUA ',d.`code`),
+ sum(dt.base * dt.rate / 100) EUROHABER,
+ 'R',
+ d.companyFk,
+ vDuaFk,
+ vDuaFk
+ FROM duaTax dt
+ JOIN dua d ON d.id = dt.duaFk
+ WHERE dt.duaFk = vDuaFk;
+
+ -- Apuntes por tipo de IVA y proveedor
+
+ INSERT INTO XDiario(
+ ASIEN,
+ FECHA,
+ SUBCTA,
+ CONTRA,
+ EURODEBE,
+ BASEEURO,
+ CONCEPTO,
+ FACTURA,
+ IVA,
+ AUXILIAR,
+ SERIE,
+ FECHA_EX,
+ FECHA_OP,
+ FACTURAEX,
+ NFACTICK,
+ L340,
+ LDIFADUAN,
+ TIPOCLAVE,
+ TIPOEXENCI,
+ TIPONOSUJE,
+ TIPOFACT,
+ TIPORECTIF,
+ TERIDNIF,
+ TERNIF,
+ TERNOM,
+ empresa_id,
+ FECREGCON
+ )
+
+ SELECT
+ vBookNumber ASIEN,
+ vBookDated FECHA,
+ tr.account SUBCTA,
+ '4330002067' CONTRA,
+ sum(dt.tax) EURODEBE,
+ sum(dt.base) BASEEURO,
+ CONCAT('DUA nº',d.code) CONCEPTO,
+ d.id FACTURA,
+ dt.rate IVA,
+ '*' AUXILIAR,
+ 'D' SERIE,
+ d.issued FECHA_EX,
+ d.operated FECHA_OP,
+ d.code FACTURAEX,
+ 1 NFACTICK,
+ 1 L340,
+ TRUE LDIFADUAN,
+ 1 TIPOCLAVE,
+ 1 TIPOEXENCI,
+ 1 TIPONOSUJE,
+ 5 TIPOFACT,
+ 1 TIPORECTIF,
+ IF(s.countryFk IN (30, 1), 1, 4) TERIDNIF,
+ s.nif TERNIF,
+ s.name TERNOM,
+ d.companyFk,
+ d.booked FECREGCON
+ FROM duaTax dt
+ JOIN dua d ON dt.duaFk = d.id
+ JOIN (SELECT account, rate
+ FROM
+ (SELECT rate, account
+ FROM invoiceInTaxBookingAccount ta
+ WHERE ta.effectived <= vBookDated
+ AND taxAreaFk = 'WORLD'
+ ORDER BY ta.effectived DESC
+ ) tba
+ GROUP BY rate
+ ) tr ON tr.rate = dt.rate
+ JOIN supplier s ON s.id = d.companyFk
+ WHERE d.id = vDuaFk
+ GROUP BY dt.rate;
+
+ SELECT SUM(EURODEBE) -SUM(EUROHABER), MAX(id) INTO vDiff, vApunte
+ FROM XDiario
+ WHERE ASIEN = vBookNumber;
+
+ UPDATE XDiario
+ SET BASEEURO = 100 * (EURODEBE - vDiff) / IVA,
+ EURODEBE = EURODEBE - vDiff
+ WHERE id = vApunte;
+
+ UPDATE dua
+ SET ASIEN = vBookNumber
+ WHERE id = vDuaFk;
+
+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 `duaTaxBooking__` */;
+/*!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 `duaTaxBooking__`(vDuaFk INT)
+BEGIN
+ DECLARE vBookNumber INT;
+ DECLARE vBookDated DATE;
+ DECLARE vDiff DECIMAL(10,2);
+ DECLARE vApunte BIGINT;
+
+ SELECT ASIEN, IFNULL(bookEntried, CURDATE()) INTO vBookNumber, vBookDated
+ FROM dua
+ WHERE id = vDuaFk;
+
+ IF vBookNumber IS NULL OR NOT vBookNumber THEN
+ CALL ledger_next(vBookNumber);
+ END IF;
+
+ -- Apunte de la aduana
+
+ INSERT INTO XDiario(
+ ASIEN,
+ FECHA,
+ SUBCTA,
+ CONCEPTO,
+ EUROHABER,
+ SERIE,
+ empresa_id,
+ CLAVE,
+ FACTURA)
+
SELECT
vBookNumber,
d.bookEntried,
@@ -40390,7 +42622,7 @@ 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 `duaTaxBooking__` */;
+/*!50003 DROP PROCEDURE IF EXISTS `duaTaxUpdate__` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
@@ -40400,166 +42632,7 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `duaTaxBooking__`(vDuaFk INT)
-BEGIN
- -- BERNAT: WORKING IN THIS FILE
- DECLARE vBookNumber INT;
- DECLARE vBookDated DATE;
- DECLARE vDiff DECIMAL(10,2);
- DECLARE vApunte BIGINT;
-
- SELECT IFNULL(d.ASIEN,MAX(x.ASIEN) + 1 )
- INTO vBookNumber
- FROM vn2008.XDiario x
- LEFT JOIN dua d ON d.id = vDuaFk ;
-
- SELECT IFNULL(bookEntried, CURDATE()) INTO vBookDated
- FROM dua
- WHERE id = vDuaFk;
-
- -- Apunte de la aduana
-
- INSERT INTO vn2008.XDiario(
- ASIEN,
- FECHA,
- SUBCTA,
- CONCEPTO,
- EUROHABER,
- SERIE,
- empresa_id,
- CLAVE,
- FACTURA)
-
- SELECT
- vBookNumber,
- d.bookEntried,
- '4700000999',
- CONCAT('DUA ',d.code),
- sum(di.amount * tr.rate / 100) EUROHABER,
- 'R',
- d.companyFk,
- vDuaFk,
- vDuaFk
- FROM duaIntrastat di
- JOIN intrastat ist ON ist.id = di.intrastatFk
- JOIN (SELECT rate, taxClassFk
- FROM
- (SELECT rate, taxClassFk
- FROM invoiceInTaxBookingAccount ta
- WHERE ta.effectived <= vBookDated
- ORDER BY ta.effectived DESC
- ) tba
- GROUP BY taxClassFk
- ) tr ON tr.taxClassFk = ist.taxClassFk
- JOIN dua d ON d.id = di.duaFk
- WHERE di.duaFk = vDuaFk;
-
- -- Apuntes por tipo de IVA y proveedor
-
- INSERT INTO vn2008.XDiario(
- ASIEN,
- FECHA,
- SUBCTA,
- CONTRA,
- EURODEBE,
- BASEEURO,
- CONCEPTO,
- FACTURA,
- IVA,
- AUXILIAR,
- SERIE,
- FECHA_EX,
- FECHA_OP,
- FACTURAEX,
- NFACTICK,
- L340,
- LDIFADUAN,
- TIPOCLAVE,
- TIPOEXENCI,
- TIPONOSUJE,
- TIPOFACT,
- TIPORECTIF,
- TERIDNIF,
- TERNIF,
- TERNOM,
- empresa_id,
- FECREGCON
- )
-
- SELECT
- vBookNumber ASIEN,
- vBookDated FECHA,
- tr.account SUBCTA,
- '4330002067' CONTRA,
- sum(dt.tax) EURODEBE,
- sum(dt.base) BASEEURO,
- CONCAT('DUA nº',d.code) CONCEPTO,
- d.id FACTURA,
- dt.rate IVA,
- '*' AUXILIAR,
- 'D' SERIE,
- d.issued FECHA_EX,
- d.operated FECHA_OP,
- d.code FACTURAEX,
- 1 NFACTICK,
- 1 L340,
- TRUE LDIFADUAN,
- 1 TIPOCLAVE,
- 1 TIPOEXENCI,
- 1 TIPONOSUJE,
- 5 TIPOFACT,
- 1 TIPORECTIF,
- IF(s.countryFk IN (30, 1), 1, 4) TERIDNIF,
- s.nif TERNIF,
- s.name TERNOM,
- d.companyFk,
- d.booked FECREGCON
- FROM duaTax dt
- JOIN dua d ON dt.duaFk = d.id
- JOIN (SELECT account, rate
- FROM
- (SELECT rate, account
- FROM invoiceInTaxBookingAccount ta
- WHERE ta.effectived <= vBookDated
- AND taxAreaFk = 'WORLD'
- ORDER BY ta.effectived DESC
- ) tba
- GROUP BY rate
- ) tr ON tr.rate = dt.rate
- JOIN supplier s ON s.id = d.companyFk
- WHERE d.id = vDuaFk
- GROUP BY dt.rate;
-
- SELECT SUM(EURODEBE) -SUM(EUROHABER), MAX(id) INTO vDiff, vApunte
- FROM vn2008.XDiario
- WHERE ASIEN = vBookNumber;
-
- UPDATE vn2008.XDiario
- SET BASEEURO = 100 * (EURODEBE - vDiff) / IVA,
- EURODEBE = EURODEBE - vDiff
- WHERE id = vApunte;
-
- UPDATE vn.dua
- SET ASIEN = vBookNumber
- WHERE id = vDuaFk;
-
-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 `duaTaxUpdate` */;
-/*!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 `duaTaxUpdate`(vDuaFk INT)
+CREATE DEFINER=`root`@`%` PROCEDURE `duaTaxUpdate__`(vDuaFk INT)
BEGIN
DECLARE vSPAIN INT DEFAULT 1;
@@ -40630,6 +42703,68 @@ BEGIN
dt.tax = dt.base * ba2.rate / 100;
+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 `duaTax_doRecalc` */;
+/*!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 `duaTax_doRecalc`(vDuaFk INT)
+BEGIN
+/**
+ * Borra los valores de duaTax y los vuelve a crear en base a la tabla duaEntry
+ *
+ * @param vDuaFk Id del dua a recalcular
+**/
+ DELETE FROM duaTax
+ WHERE duaFk = vDuaFk;
+
+ INSERT INTO duaTax(duaFk, supplierFk, taxClassFk, base)
+ SELECT vDuaFk, supplierFk, taxClassFk, sum(sub.Base) as Base
+ FROM intrastat ist
+ JOIN
+ (SELECT
+ e.supplierFk,
+ i.intrastatFk,
+ CAST(sum(b.quantity * b.buyingValue * de.customsValue / de.value) * di.amount/ tei.Base AS DECIMAL(10,2)) as Base
+ FROM buy b
+ JOIN item i ON i.id = b.itemFk
+ JOIN entry e ON e.id = b.entryFk
+ JOIN duaEntry de ON de.entryFk = e.id
+ JOIN
+ (
+ SELECT i.intrastatFk,
+ CAST(sum(b.quantity * b.buyingValue * de.customsValue / de.value) AS DECIMAL(10,2)) as Base
+ FROM buy b
+ JOIN item i ON i.id = b.itemFk
+ JOIN entry e ON e.id = b.entryFk
+ JOIN duaEntry de ON de.entryFk = e.id
+ WHERE de.duaFk = vDuaFk
+ GROUP BY i.intrastatFk
+
+ ) tei ON tei.intrastatFk = i.intrastatFk
+ JOIN
+ (
+ SELECT intrastatFk, sum(amount) as amount
+ FROM duaIntrastat
+ WHERE duaFk = vDuaFk
+ GROUP BY intrastatFK
+ ) di ON di.intrastatFk = i.intrastatFk
+ WHERE de.duaFk = vDuaFk
+ GROUP BY e.supplierFk, i.intrastatFk
+ HAVING Base
+ ) sub ON ist.id = sub.intrastatFk
+ GROUP BY ist.taxClassFk, sub.supplierFk;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -40680,216 +42815,216 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `entryConverter`(IN `vEntry` INT)
-BEGIN
-
- DECLARE vWarehouseIn INT;
- DECLARE vWarehouseOut INT;
- DECLARE vTravel INT;
-
- DECLARE done BOOL DEFAULT FALSE;
-
- DECLARE vId_Entrada INT;
- DECLARE vId_Article INT;
- DECLARE vEtiquetas INT;
- DECLARE vId_Cubo VARCHAR(10);
- DECLARE vPacking INT;
- DECLARE vGrouping INT;
- DECLARE vCantidad INT;
- DECLARE vCostefijo DECIMAL(10,3);
- DECLARE vPortefijo DECIMAL(10,3);
- DECLARE vEmbalajefijo DECIMAL(10);
- DECLARE vComisionfija DECIMAL(10,3);
- DECLARE vCaja INT;
- DECLARE vNicho VARCHAR(5);
- DECLARE vTarifa1 DECIMAL(10,2);
- DECLARE vTarifa2 DECIMAL(10,2);
- DECLARE vTarifa3 DECIMAL(10,2);
- DECLARE vPVP DECIMAL(10,2);
- DECLARE vCompra INT;
-
- DECLARE rs CURSOR FOR
- SELECT
- b.Id_Entrada,
- b.Id_Article,
- b.Etiquetas,
- b.Id_Cubo,
- b.Packing,
- b.`grouping`,
- b.Cantidad,
- b.Costefijo,
- b.Portefijo,
- b.Embalajefijo,
- b.Comisionfija,
- b.caja,
- b.Nicho,
- b.Tarifa1,
- b.Tarifa2,
- b.Tarifa3,
- b.PVP
- FROM vn2008.Compres b
- JOIN vn.itemConversor ic ON ic.espItemFk = b.Id_Article
- WHERE Id_Entrada = vEntry;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
-
- SELECT warehouseInFk, warehouseOutFk, tr.id
- INTO vWarehouseIn, vWarehouseOut, vTravel
- FROM travel tr
- JOIN entry e ON e.travelFk = tr.id
- WHERE e.id = vEntry;
-
- UPDATE travel
- SET warehouseInFk = vWarehouseOut,
- warehouseOutFk = vWarehouseIn
- WHERE id = vTravel;
-
- UPDATE vn2008.Compres c
- LEFT JOIN vn.itemConversor ic ON ic.espItemFk = c.Id_Article
- SET Etiquetas = 0, Cantidad = 0
- WHERE c.Id_Entrada = vEntry
- AND ic.espItemFk IS NULL;
-
- OPEN rs;
-
- DELETE FROM vn2008.Compres WHERE Id_Entrada = vEntry;
-
- FETCH rs INTO
- vId_Entrada,
- vId_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP;
-
- WHILE NOT done DO
-
- -- Primero la linea original con las cantidades invertidas
- INSERT INTO vn2008.Compres
- (
- Id_Entrada,
- Id_Article,
- Etiquetas,
- Id_Cubo,
- Packing,
- `grouping`,
- Cantidad,
- Costefijo,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP
- )
- VALUES
- (
- vId_Entrada,
- vId_Article,
- - vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- - vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP);
-
- -- Ahora la linea nueva, con el item genérico
- INSERT INTO vn2008.Compres
- (
- Id_Entrada,
- Id_Article,
- Etiquetas,
- Id_Cubo,
- Packing,
- `grouping`,
- Cantidad,
- Costefijo,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP
- )
- SELECT
- vId_Entrada,
- genItemFk as Id_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP
- FROM itemConversor
- WHERE espItemFk = vId_Article;
-
- SELECT LAST_INSERT_ID()
- INTO vCompra;
-
- REPLACE vn2008.Compres_mark(Id_Compra,`comment`)
- SELECT vCompra, vId_Article;
-
-
- FETCH rs INTO
- vId_Entrada,
- vId_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP;
-
- END WHILE;
-
-
- CLOSE rs;
-
-
-
+BEGIN
+
+ DECLARE vWarehouseIn INT;
+ DECLARE vWarehouseOut INT;
+ DECLARE vTravel INT;
+
+ DECLARE done BOOL DEFAULT FALSE;
+
+ DECLARE vId_Entrada INT;
+ DECLARE vId_Article INT;
+ DECLARE vEtiquetas INT;
+ DECLARE vId_Cubo VARCHAR(10);
+ DECLARE vPacking INT;
+ DECLARE vGrouping INT;
+ DECLARE vCantidad INT;
+ DECLARE vCostefijo DECIMAL(10,3);
+ DECLARE vPortefijo DECIMAL(10,3);
+ DECLARE vEmbalajefijo DECIMAL(10);
+ DECLARE vComisionfija DECIMAL(10,3);
+ DECLARE vCaja INT;
+ DECLARE vNicho VARCHAR(5);
+ DECLARE vTarifa1 DECIMAL(10,2);
+ DECLARE vTarifa2 DECIMAL(10,2);
+ DECLARE vTarifa3 DECIMAL(10,2);
+ DECLARE vPVP DECIMAL(10,2);
+ DECLARE vCompra INT;
+
+ DECLARE rs CURSOR FOR
+ SELECT
+ b.Id_Entrada,
+ b.Id_Article,
+ b.Etiquetas,
+ b.Id_Cubo,
+ b.Packing,
+ b.`grouping`,
+ b.Cantidad,
+ b.Costefijo,
+ b.Portefijo,
+ b.Embalajefijo,
+ b.Comisionfija,
+ b.caja,
+ b.Nicho,
+ b.Tarifa1,
+ b.Tarifa2,
+ b.Tarifa3,
+ b.PVP
+ FROM vn2008.Compres b
+ JOIN vn.itemConversor ic ON ic.espItemFk = b.Id_Article
+ WHERE Id_Entrada = vEntry;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ SELECT warehouseInFk, warehouseOutFk, tr.id
+ INTO vWarehouseIn, vWarehouseOut, vTravel
+ FROM travel tr
+ JOIN entry e ON e.travelFk = tr.id
+ WHERE e.id = vEntry;
+
+ UPDATE travel
+ SET warehouseInFk = vWarehouseOut,
+ warehouseOutFk = vWarehouseIn
+ WHERE id = vTravel;
+
+ UPDATE vn2008.Compres c
+ LEFT JOIN vn.itemConversor ic ON ic.espItemFk = c.Id_Article
+ SET Etiquetas = 0, Cantidad = 0
+ WHERE c.Id_Entrada = vEntry
+ AND ic.espItemFk IS NULL;
+
+ OPEN rs;
+
+ DELETE FROM vn2008.Compres WHERE Id_Entrada = vEntry;
+
+ FETCH rs INTO
+ vId_Entrada,
+ vId_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP;
+
+ WHILE NOT done DO
+
+ -- Primero la linea original con las cantidades invertidas
+ INSERT INTO vn2008.Compres
+ (
+ Id_Entrada,
+ Id_Article,
+ Etiquetas,
+ Id_Cubo,
+ Packing,
+ `grouping`,
+ Cantidad,
+ Costefijo,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP
+ )
+ VALUES
+ (
+ vId_Entrada,
+ vId_Article,
+ - vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ - vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP);
+
+ -- Ahora la linea nueva, con el item genérico
+ INSERT INTO vn2008.Compres
+ (
+ Id_Entrada,
+ Id_Article,
+ Etiquetas,
+ Id_Cubo,
+ Packing,
+ `grouping`,
+ Cantidad,
+ Costefijo,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP
+ )
+ SELECT
+ vId_Entrada,
+ genItemFk as Id_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP
+ FROM itemConversor
+ WHERE espItemFk = vId_Article;
+
+ SELECT LAST_INSERT_ID()
+ INTO vCompra;
+
+ REPLACE vn2008.Compres_mark(Id_Compra,`comment`)
+ SELECT vCompra, vId_Article;
+
+
+ FETCH rs INTO
+ vId_Entrada,
+ vId_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP;
+
+ END WHILE;
+
+
+ CLOSE rs;
+
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -40951,62 +43086,62 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `entryPrepare`(IN `idE` BIGINT)
-BEGIN
- SELECT
- b.quantity / b.packing AS Paquetes,
- b.packing AS `Grouping`,
- barcode,
- 'ASEGURADO' AS asegurado,
- ic.name,
- ic.order,
- s.name AS Consignatario,
- e.supplierFk AS Id_Cliente,
- e.isOrdered,
- e.isConfirmed,
- 10 AS Calidad,
- LPAD(IFNULL(cpd.id, ip.code),
- 5,
- '0') AS path,
- b.entryFk AS Id_Ticket,
- t.landed AS Fecha,
- b.itemFk,
- b.quantity,
- i.name AS Concepte,
- i.size,
- i.inkFk,
- i.category,
- o.code AS Origen,
- 0 AS Bultos,
- wIn.`name` AS Tipo,
- 0 AS OK,
- 0 AS Reservado,
- i.stems,
- b.id AS Id_Movimiento,
- ip.code,
- 'PEDIDO ASEGURADO' AS MSG,
- 0 AS Seguro,
- i.image,
- pr.name AS producer
- FROM vn.buy b
- JOIN vn.entry e ON b.entryFk = e.id
- JOIN vn.travel t ON t.id = e.travelFk
- JOIN vn.warehouse wIn ON wIn.id = t.warehouseInFk
- JOIN vn.warehouse wOut ON wOut.id = t.warehouseOutFk
- JOIN vn.item i ON i.id = b.itemFk
- JOIN vn.itemType it ON it.id =i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.packaging pkg ON pkg.id = b.packageFk
- LEFT JOIN vn.itemPlacement ip ON i.id = ip.itemFk AND ip.warehouseFk = wIn.id AND ip.warehouseFk = t.warehouseOutFk
- LEFT JOIN (SELECT itemFk, code AS barcode FROM vn.itemBarcode GROUP BY itemFk) ib ON ib.itemFk = b.itemFk
- LEFT JOIN vn.origin o ON o.id = i.originFk
- LEFT JOIN vn.supplier s ON s.id = e.supplierFk
- LEFT JOIN vn.producer pr on pr.id = i.producerFk
- LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway
- WHERE
- NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid
- AND e.id = 158772
- AND i.typeFk IS NOT NULL
- AND ic.merchandise IS NOT FALSE;
+BEGIN
+ SELECT
+ b.quantity / b.packing AS Paquetes,
+ b.packing AS `Grouping`,
+ barcode,
+ 'ASEGURADO' AS asegurado,
+ ic.name,
+ ic.order,
+ s.name AS Consignatario,
+ e.supplierFk AS Id_Cliente,
+ e.isOrdered,
+ e.isConfirmed,
+ 10 AS Calidad,
+ LPAD(IFNULL(cpd.id, ip.code),
+ 5,
+ '0') AS path,
+ b.entryFk AS Id_Ticket,
+ t.landed AS Fecha,
+ b.itemFk,
+ b.quantity,
+ i.name AS Concepte,
+ i.size,
+ i.inkFk,
+ i.category,
+ o.code AS Origen,
+ 0 AS Bultos,
+ wIn.`name` AS Tipo,
+ 0 AS OK,
+ 0 AS Reservado,
+ i.stems,
+ b.id AS Id_Movimiento,
+ ip.code,
+ 'PEDIDO ASEGURADO' AS MSG,
+ 0 AS Seguro,
+ i.image,
+ pr.name AS producer
+ FROM vn.buy b
+ JOIN vn.entry e ON b.entryFk = e.id
+ JOIN vn.travel t ON t.id = e.travelFk
+ JOIN vn.warehouse wIn ON wIn.id = t.warehouseInFk
+ JOIN vn.warehouse wOut ON wOut.id = t.warehouseOutFk
+ JOIN vn.item i ON i.id = b.itemFk
+ JOIN vn.itemType it ON it.id =i.typeFk
+ JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.packaging pkg ON pkg.id = b.packageFk
+ LEFT JOIN vn.itemPlacement ip ON i.id = ip.itemFk AND ip.warehouseFk = wIn.id AND ip.warehouseFk = t.warehouseOutFk
+ LEFT JOIN (SELECT itemFk, code AS barcode FROM vn.itemBarcode GROUP BY itemFk) ib ON ib.itemFk = b.itemFk
+ LEFT JOIN vn.origin o ON o.id = i.originFk
+ LEFT JOIN vn.supplier s ON s.id = e.supplierFk
+ LEFT JOIN vn.producer pr on pr.id = i.producerFk
+ LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway
+ WHERE
+ NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid
+ AND e.id = 158772
+ AND i.typeFk IS NOT NULL
+ AND ic.merchandise IS NOT FALSE;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -41790,7 +43925,7 @@ BEGIN
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.`code` = ish.shelvingFk
JOIN vn.parking pk ON pk.id = sh.parkingFk
- WHERE ish.itemFk = vItemFk;
+ WHERE ish.itemFk = vItemFk ORDER BY created ASC;
END ;;
DELIMITER ;
@@ -42849,7 +44984,7 @@ BEGIN
n.bookEntried FECHA,
tc.code SUBCTA,
s.supplierAccount CONTRA,
- ROUND(tc.rate/100 * SUM(it.taxableBase) + 0.0001, 2) EURODEBE,
+ SUM(ROUND(tc.rate/100 * it.taxableBase + 0.0001, 2)) EURODEBE,
SUM(it.taxableBase) BASEEURO,
GROUP_CONCAT(DISTINCT e.`name` SEPARATOR ', ') CONCEPTO,
vSerialNumber FACTURA,
@@ -42925,7 +45060,7 @@ BEGIN
n.bookEntried FECHA,
tcLink.code SUBCTA,
s.supplierAccount CONTRA,
- ROUND(tcLink.rate/100*SUM(it.taxableBase) + 0.0001,2) EUROHABER,
+ SUM(ROUND(tcLink.rate/100*it.taxableBase + 0.0001,2)) EUROHABER,
ROUND(SUM(it.taxableBase),2) BASEEURO,
GROUP_CONCAT(DISTINCT e.`name` SEPARATOR ', ') CONCEPTO,
vSerialNumber FACTURA,
@@ -42998,7 +45133,7 @@ BEGIN
INTO vSerial
FROM newInvoiceIn;
- SELECT SUM(iit.taxableBase * IF(vSerial = 'R', 1 +(tc.rate/100),1)),
+ SELECT SUM(iit.taxableBase * IF(vSerial = 'R' AND tc.`type` <> 'I', 1 +(tc.rate/100),1)),
SUM(iit.foreignValue * IF(vSerial = 'R', 1 +(tc.rate/100),1)),
iit.taxableBase/iit.foreignValue
INTO vTotalAmount, vTotalAmountDivisa, vRate
@@ -43142,7 +45277,7 @@ BEGIN
LEFT JOIN (SELECT eWithheld.id
FROM invoiceInTax hold
JOIN expence eWithheld ON eWithheld.id = hold.expenceFk AND eWithheld.isWithheld
- WHERE hold.invoiceInFk = 58262 LIMIT 1
+ WHERE hold.invoiceInFk = vInvoiceInId LIMIT 1
) eWithheld ON TRUE
WHERE tc.type != '-'
AND tc.isActive
@@ -43218,7 +45353,7 @@ BEGIN
JOIN expence e ON e.id = it.expenceFk
AND e.taxTypeFk = tc.taxTypeFk
WHERE tc.isActive
- AND (tc.type = 'S' OR MID(s.supplierAccount,4,1) = '1')
+ AND (tc.type in('S','I') OR MID(s.supplierAccount,4,1) = '1')
GROUP BY tcLink.rate, e.id;
-- Actualización del registro original
@@ -45116,17 +47251,17 @@ 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 `itemLastEntries` */;
+/*!50003 DROP PROCEDURE IF EXISTS `itemLastEntries__` */;
/*!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 ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries`(IN `vItem` INT, IN `vDays` DATE)
+CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries__`(IN `vItem` INT, IN `vDays` DATE)
BEGIN
SELECT
w.id AS warehouseFk,
@@ -45563,9 +47698,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 = 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 ;;
@@ -45876,137 +48011,20 @@ 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 `itemRefreshTags`(IN vItem INT)
BEGIN
-/**
- * Actualiza la tabla item, los campos "cache" de tags
- *
- * @param vItem El id del articulo. Si es NULL, equivale a todos.
- **/
- DECLARE vInkId VARCHAR(3) DEFAULT NULL;
- DECLARE vSize INT DEFAULT NULL;
- DECLARE vOriginId INT DEFAULT NULL;
- DECLARE vProducerId INT DEFAULT NULL;
- DECLARE vStems INT DEFAULT NULL;
-
- UPDATE item i
- LEFT JOIN itemTag it1 ON it1.priority = 1 AND it1.itemFk = i.id
- LEFT JOIN itemTag it2 ON it2.priority = 2 AND it2.itemFk = i.id
- LEFT JOIN itemTag it3 ON it3.priority = 3 AND it3.itemFk = i.id
- SET i.longName = CONCAT_WS(' ', it1.`value`, it2.`value`, it3.`value`)
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it1 ON it1.priority = 1 AND it1.itemFk = i.id
- LEFT JOIN tagAbbreviation ta1 ON ta1.`value` = it1.`value`
- LEFT JOIN itemTag it2 ON it2.priority = 2 AND it2.itemFk = i.id
- LEFT JOIN tagAbbreviation ta2 ON ta2.`value` = it2.`value`
- LEFT JOIN itemTag it3 ON it3.priority = 3 AND it3.itemFk = i.id
- LEFT JOIN tagAbbreviation ta3 ON ta3.`value` = it3.`value`
- SET i.`name` = CONCAT_WS(' ',
- IFNULL(ta1.abbreviation,it1.`value`),
- IFNULL(ta2.abbreviation,it2.`value`),
- IFNULL(ta3.abbreviation,it3.`value`))
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 4
- SET i.subName = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 5
- LEFT JOIN tag t ON t.id = it.tagFk
- SET tag5 = t.name, value5 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 6
- LEFT JOIN tag t ON t.id = it.tagFk
- SET tag6 = t.name, value6 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 7
- LEFT JOIN tag t ON t.id = it.tagFk
- SET i.tag7 = t.name, i.value7 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 8
- LEFT JOIN tag t ON t.id = it.tagFk
- SET tag8 = t.name, value8 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 9
- LEFT JOIN tag t ON t.id = it.tagFk
- SET tag9 = t.name, value9 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 10
- LEFT JOIN tag t ON t.id = it.tagFk
- SET tag10 = t.name, value10 = it.`value`
- WHERE (vItem IS NULL OR vItem = i.id);
-
- IF vItem IS NOT NULL THEN
- -- Al insertar el tag color se modifica también el antiguo campo color
- SELECT i.id INTO vInkId FROM ink i
- JOIN itemTag it ON it.tagFk = 1 AND i.`name` = it.`value`
- WHERE vItem = it.itemFk
- LIMIT 1;
-
- IF vInkId > '' THEN
- UPDATE item SET inkFk = vInkId WHERE id = vItem;
- END IF;
-
- -- Al insertar el tag origen se modifica también en la tabla item
- SELECT o.id INTO vOriginId FROM origin o
- JOIN itemTag it ON it.tagFk = 35 AND o.`name` = it.`value`
- WHERE vItem = it.itemFk
- LIMIT 1;
-
- IF vOriginId > '' THEN
- UPDATE item SET originFk = vOriginId WHERE id = vItem;
- END IF;
-
- -- Al insertar el tag medida se modifica también en la tabla item
- SELECT it.`value` INTO vSize
- FROM itemTag it
- WHERE vItem = it.itemFk AND it.tagFk IN (4, 8)
- LIMIT 1;
-
- IF vSize > '' THEN
- UPDATE item SET size = vSize WHERE id = vItem;
- END IF;
-
- -- Al insertar el tag productor se modifica también en la tabla item
- SELECT p.id INTO vProducerId FROM producer p
- JOIN itemTag it ON it.tagFk = 37 AND p.`name` = it.`value`
- WHERE vItem = it.itemFk
- LIMIT 1;
-
- IF vProducerId > '' THEN
- UPDATE item SET producerFk = vProducerId WHERE id = vItem;
- END IF;
-
- -- Al insertar el tag tallos se modifica también en la tabla item
- SELECT CAST(it.`value` as signed) INTO vStems
- FROM itemTag it
- WHERE vItem = it.itemFk AND it.tagFk = 23
- LIMIT 1;
-
- IF vStems > 0 THEN
- UPDATE item SET stems = vStems WHERE id = vItem;
- END IF;
- END IF;
+ /* DEPRECATED USAR item_refreshTags JGF 16/17/2020*/
+ DROP TEMPORARY TABLE IF EXISTS tmp.item;
+ CREATE TEMPORARY TABLE tmp.item
+ SELECT vItem id;
+ CALL item_refreshTags();
+ DROP TEMPORARY TABLE tmp.item;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -46460,7 +48478,6 @@ BEGIN
DECLARE vWarehouseFk INT DEFAULT 0;
DECLARE vSonSectorFk INT;
-
SELECT w.id, s.warehouseFk INTO vBuyerFk, vWarehouseFk
FROM vn.worker w
JOIN vn.sector s ON s.code = w.code
@@ -46501,7 +48518,7 @@ BEGIN
a.available,
SUM(IF(s.sonFk = vSectorFk, iss.visible, 0)) upstairs,
SUM(IF(iss.sectorFk = vSectorFk, iss.visible, 0)) downstairs,
- IFNULL(v.visible,0) as visible,
+ IF(it.isPackaging, NULL, IFNULL(v.visible,0)) as visible,
vSectorFk as sectorFk
FROM vn.itemShelvingStock iss
@@ -46511,6 +48528,7 @@ BEGIN
LEFT JOIN cache.available a ON a.item_id = iss.itemFk AND a.calc_id = vCalcAvailableFk
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk AND v.calc_id = vCalcVisibleFk
WHERE vSectorFk IN (iss.sectorFk, s.sonFk)
+
GROUP BY iss.itemFk
UNION ALL
@@ -46522,7 +48540,7 @@ BEGIN
IFNULL(a.available,0) as available,
0 upstairs,
0 downstairs,
- v.visible,
+ IF(it.isPackaging, NULL, v.visible) visible,
vSectorFk as sectorFk
FROM cache.visible v
JOIN vn.item i on i.id = v.item_id
@@ -46941,7 +48959,7 @@ BEGIN
DECLARE vCurrentTime VARCHAR(5);
DECLARE vParkedStuff INT;
- CALL cache.visible_refresh(vCalc, FALSE, vWarehouseFk);
+ CALL cache.visible_refresh(vCalc, TRUE, vWarehouseFk);
SELECT IFNULL(visible,0) INTO vVisible
FROM cache.visible
@@ -47642,6 +49660,138 @@ CREATE DEFINER=`root`@`%` PROCEDURE `item_refreshTags`()
BEGIN
/**
* Actualiza la tabla item, los campos "cache" de tags
+ * Para actualizar mas de un registro, la tabla NO tiene que ser en memoria
+ * Error Code: 1137. No puedo reabrir tabla: 'tmpI
+ *
+ * @param temporary table vItem(id) del articulo
+ **/
+ DROP TEMPORARY TABLE IF EXISTS tmp.itemToRefresh;
+ CREATE TEMPORARY TABLE tmp.itemToRefresh
+ SELECT id from tmp.item;
+
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it1 ON it1.priority = 1 AND it1.itemFk = i.id
+ LEFT JOIN itemTag it2 ON it2.priority = 2 AND it2.itemFk = i.id
+ LEFT JOIN itemTag it3 ON it3.priority = 3 AND it3.itemFk = i.id
+ SET i.longName = CONCAT_WS(' ', it1.`value`, it2.`value`, it3.`value`);
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it1 ON it1.priority = 1 AND it1.itemFk = i.id
+ LEFT JOIN tagAbbreviation ta1 ON ta1.`value` = it1.`value`
+ LEFT JOIN itemTag it2 ON it2.priority = 2 AND it2.itemFk = i.id
+ LEFT JOIN tagAbbreviation ta2 ON ta2.`value` = it2.`value`
+ LEFT JOIN itemTag it3 ON it3.priority = 3 AND it3.itemFk = i.id
+ LEFT JOIN tagAbbreviation ta3 ON ta3.`value` = it3.`value`
+ SET i.`name` = CONCAT_WS(' ',
+ IFNULL(ta1.abbreviation,it1.`value`),
+ IFNULL(ta2.abbreviation,it2.`value`),
+ IFNULL(ta3.abbreviation,it3.`value`));
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 4
+ SET i.subName = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 5
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET tag5 = t.name, value5 = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 6
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET tag6 = t.name, value6 = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 7
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET i.tag7 = t.name, i.value7 = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 8
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET tag8 = t.name, value8 = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 9
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET tag9 = t.name, value9 = it.`value`;
+
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 10
+ LEFT JOIN tag t ON t.id = it.tagFk
+ SET tag10 = t.name, value10 = it.`value`;
+
+ -- Al insertar el tag color se modifica también el antiguo campo color
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ JOIN tag t ON t.overwrite = 'inkFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
+ JOIN ink ON ink.`name` = it.`value`
+ SET i.inkFk = ink.id;
+
+ -- Al insertar el tag origen se modifica también en la tabla item
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ JOIN tag t ON t.overwrite = 'originFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
+ JOIN origin o ON o.`name` = it.`value`
+ SET i.originFk = o.id;
+
+ -- Al insertar el tag medida se modifica también en la tabla item
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ JOIN tag t ON t.overwrite = 'size'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
+ SET i.size = it.`value`;
+
+ -- Al insertar el tag productor se modifica también en la tabla item
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ JOIN tag t ON t.overwrite = 'producerFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
+ JOIN producer p ON p.`name` = it.`value`
+ SET i.producerFk = p.id;
+
+ -- Al insertar el tag tallos se modifica también en la tabla item
+ UPDATE item i
+ JOIN tmp.itemToRefresh tmpI ON tmpI.id = i.id
+ JOIN tag t ON t.overwrite = 'stems'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
+ SET i.stems = it.`value`;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.itemToRefresh;
+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 `item_refreshTags__` */;
+/*!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 `item_refreshTags__`()
+BEGIN
+/**
+ * Actualiza la tabla item, los campos "cache" de tags
+ * Para actualizar mas de un registro, la tabla NO tiene que ser en memoria
+ * Error Code: 1137. No puedo reabrir tabla: 'tmpI
*
* @param temporary table vItem(id) del articulo
**/
@@ -47710,34 +49860,39 @@ BEGIN
-- Al insertar el tag color se modifica también el antiguo campo color
UPDATE item i
JOIN tmp.item tmpI ON tmpI.id = i.id
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = 1
+ JOIN tag t ON t.overwrite = 'inkFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
JOIN ink ON ink.`name` = it.`value`
SET i.inkFk = ink.id;
-- Al insertar el tag origen se modifica también en la tabla item
UPDATE item i
JOIN tmp.item tmpI ON tmpI.id = i.id
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = 35
+ JOIN tag t ON t.overwrite = 'originFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
JOIN origin o ON o.`name` = it.`value`
SET i.originFk = o.id;
-- Al insertar el tag medida se modifica también en la tabla item
UPDATE item i
JOIN tmp.item tmpI ON tmpI.id = i.id
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk IN (4, 8, 219)
+ JOIN tag t ON t.overwrite = 'size'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
SET i.size = it.`value`;
-- Al insertar el tag productor se modifica también en la tabla item
UPDATE item i
JOIN tmp.item tmpI ON tmpI.id = i.id
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = 37
+ JOIN tag t ON t.overwrite = 'producerFk'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
JOIN producer p ON p.`name` = it.`value`
SET i.producerFk = p.id;
-- Al insertar el tag tallos se modifica también en la tabla item
UPDATE item i
JOIN tmp.item tmpI ON tmpI.id = i.id
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = 23
+ JOIN tag t ON t.overwrite = 'stems'
+ JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
SET i.stems = it.`value`;
END ;;
@@ -48816,17 +50971,17 @@ 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 `nestAdd` */;
+/*!50003 DROP PROCEDURE IF EXISTS `nestAdd__` */;
/*!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 = 'IGNORE_SPACE,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `nestAdd`(IN `vScheme` VARCHAR(45), IN `vTable` VARCHAR(45), IN `vParentFk` INT, IN `vChild` VARCHAR(100))
+CREATE DEFINER=`root`@`%` PROCEDURE `nestAdd__`(IN `vScheme` VARCHAR(45), IN `vTable` VARCHAR(45), IN `vParentFk` INT, IN `vChild` VARCHAR(100))
BEGIN
DECLARE vSql TEXT;
DECLARE vTableClone VARCHAR(45);
@@ -48906,17 +51061,17 @@ 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 `nestLeave` */;
+/*!50003 DROP PROCEDURE IF EXISTS `nestLeave__` */;
/*!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 = 'IGNORE_SPACE,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `nestLeave`(vScheme VARCHAR(45), vTable VARCHAR(45), vParentFk INT)
+CREATE DEFINER=`root`@`%` PROCEDURE `nestLeave__`(vScheme VARCHAR(45), vTable VARCHAR(45), vParentFk INT)
BEGIN
DROP TEMPORARY TABLE IF EXISTS tmp.tree;
@@ -48944,17 +51099,17 @@ 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 `nestTree` */;
+/*!50003 DROP PROCEDURE IF EXISTS `nestTree__` */;
/*!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 `nestTree`(
+CREATE DEFINER=`root`@`%` PROCEDURE `nestTree__`(
vSourceSchema VARCHAR(45),
vSourceTable VARCHAR(45),
vDestinationSchema VARCHAR(45),
@@ -49750,6 +51905,68 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `productionSectorList`(vSectorFk INT)
+BEGIN
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
+ CREATE TEMPORARY TABLE tmp.clientGetDebt
+ SELECT DISTINCT t.clientFk
+ FROM vn.ticket t
+ JOIN vn.itemShelvingAvailable isa ON isa.ticketFk = t.id;
+
+ CALL vn.clientGetDebt(CURDATE());
+
+ SELECT 0,999999,0 INTO @sameTicket, @ticket, @litrosTicket;
+
+ SELECT @litrosTicket := IF(sub.ticketFk = @ticket, @litrosTicket + Litros, Litros) as LitrosTicket,
+ @sameTicket := IF(sub.ticketFk = @ticket, @sameTicket, IF(@sameTicket, 0 , 1)) as sameTicket,
+ sub.*,
+ @ticket := ticketFk
+ FROM
+ (
+ SELECT * FROM
+ (
+ SELECT isa.*,
+ cast(max(isa.quantity mod isa.packing) as DECIMAL(10,0)) as picos,
+ sum(isa.available) as totalAvailable,
+ IF (HOUR(isa.shipped),HOUR(isa.shipped), HOUR(isa.`hour`)) Hora,
+ IF (MINUTE(isa.shipped),MINUTE(isa.shipped), MINUTE(isa.`hour`)) Minuto,
+ i.subName,
+ CAST(isa.physicalVolume * 1000 AS DECIMAL(10,0)) as Litros
+ FROM vn.itemShelvingAvailable isa
+ JOIN vn.item i ON i.id = isa.itemFk
+ JOIN vn.sector s ON s.id = isa.sectorFk AND s.warehouseFk = isa.warehouseFk
+ JOIN vn.ticket t ON t.id = isa.ticketFk
+ JOIN vn.client c ON c.id = t.clientFk
+ JOIN tmp.risk r ON r.clientFk = c.id
+ WHERE IF(s.isPreviousPreparedByPacking, (MOD(TRUNCATE(isa.quantity,0), isa.packing)= 0 ), TRUE)
+ -- AND isa.isPreviousPreparable = TRUE
+ AND isa.sectorFk = vSectorFk
+ AND isa.quantity > 0
+ AND r.risk < c.credit + 10
+ GROUP BY saleFk
+ HAVING isa.quantity <= totalAvailable
+ ) sub2
+ ORDER BY Hora, Minuto, ticketFk
+ ) sub
+ ;
+
+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 `productionSectorList__` */;
+/*!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 `productionSectorList__`(vSectorFk INT)
BEGIN
SELECT 0,999999,0 INTO @sameTicket, @ticket, @litrosTicket;
@@ -49839,6 +52056,47 @@ 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 `rate_getPrices` */;
+/*!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 `rate_getPrices`(vLanded DATE, vWarehouseFk INT)
+BEGIN
+
+ -- Prepara una tabla con las tarifas aplicables en funcion de la fecha y el almacén
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.rate;
+ CREATE TEMPORARY TABLE tmp.rate
+ ENGINE = MEMORY
+ SELECT * FROM
+ (
+ SELECT * FROM
+ (
+ SELECT DISTINCT rate0, rate1, rate2, rate3
+ FROM vn.rate
+ WHERE dated <= vLanded
+ AND warehouseFk = vWarehouseFk
+ ORDER BY dated DESC
+
+ ) sub
+ UNION ALL
+ SELECT rate0, rate1, rate2, rate3
+ FROM rateConfig
+ ) sub2
+ LIMIT 1;
+
+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 `recipe_Cook` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50664,77 +52922,77 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `saleItemShelvingMake`(IN `vTicketFk` INT, IN `vSectorFk` INT)
-BEGIN
-
- SET @rest:= CAST(0 AS DECIMAL(10,0));
- SET @saleFk := CAST(0 AS DECIMAL(10,0));
- SET @reserved := CAST(0 AS DECIMAL(10,0));
-
- UPDATE vn.itemShelving ish
- JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
- JOIN sale s ON s.id = sis.saleFk
- SET ish.visible = sis.quantity + ish.visible,
- ish.available = sis.quantity + ish.visible
- WHERE s.ticketFk = vTicketFk;
-
- DELETE sis.*
- FROM saleItemShelving sis
- JOIN sale s ON s.id = sis.saleFk
- WHERE s.ticketFk = vTicketFk;
-
- INSERT INTO saleItemShelving( saleFk,
- itemShelvingFk,
- quantity,
- ubication)
- SELECT saleFk,
- itemShelvingFk,
- CAST(Reserved as DECIMAL(10,0)) as Reserved,
- ubication
- FROM
- (SELECT saleFk,
- itemShelvingFk,
- ubication,
- @rest := IF(@saleFk = saleFk, @rest, quantity) as Falta,
- @reserved := IF(available < @rest, available, IF(@rest < packing,0,@rest)) as Reserved,
- @rest := @rest - @reserved,
- @saleFk := saleFk
- FROM
- ( SELECT s.id as saleFk,
- ish.created,
- ish.id as itemShelvingFk,
- ish.available,
- s.quantity,
- ish.packing,
- CONCAT(p.`column`, '-',p.`row`,': ', sh.code ) as ubication
- FROM vn.sale s
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.sector sc ON sc.warehouseFk = t.warehouseFk
- JOIN vn.parking p ON p.sectorFk = sc.id
- JOIN vn.shelving sh ON sh.parkingFk = p.id
- JOIN vn.itemShelving ish ON ish.shelvingFk = sh.code AND ish.itemFk = s.itemFk
- WHERE t.id = vTicketFk
- AND sc.id = vSectorFk
- AND s.quantity MOD ish.packing = 0
- AND s.quantity >= ish.packing
- ORDER BY s.id,
- sh.priority DESC,
- ish.packing DESC,
- ish.created
- ) sub
- ) sub2
- WHERE Reserved > 0;
-
- UPDATE vn.itemShelving ish
- JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
- JOIN vn.sale s ON s.id = sis.saleFk
- SET ish.available = ish.visible - sis.quantity,
- ish.visible = ish.visible - sis.quantity
- WHERE s.ticketFk = vTicketFk
- AND s.isPicked = FALSE;
-
- CALL vn.saleItemShelvingIsPicked(vTicketFk, TRUE);
-
-
+BEGIN
+
+ SET @rest:= CAST(0 AS DECIMAL(10,0));
+ SET @saleFk := CAST(0 AS DECIMAL(10,0));
+ SET @reserved := CAST(0 AS DECIMAL(10,0));
+
+ UPDATE vn.itemShelving ish
+ JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
+ JOIN sale s ON s.id = sis.saleFk
+ SET ish.visible = sis.quantity + ish.visible,
+ ish.available = sis.quantity + ish.visible
+ WHERE s.ticketFk = vTicketFk;
+
+ DELETE sis.*
+ FROM saleItemShelving sis
+ JOIN sale s ON s.id = sis.saleFk
+ WHERE s.ticketFk = vTicketFk;
+
+ INSERT INTO saleItemShelving( saleFk,
+ itemShelvingFk,
+ quantity,
+ ubication)
+ SELECT saleFk,
+ itemShelvingFk,
+ CAST(Reserved as DECIMAL(10,0)) as Reserved,
+ ubication
+ FROM
+ (SELECT saleFk,
+ itemShelvingFk,
+ ubication,
+ @rest := IF(@saleFk = saleFk, @rest, quantity) as Falta,
+ @reserved := IF(available < @rest, available, IF(@rest < packing,0,@rest)) as Reserved,
+ @rest := @rest - @reserved,
+ @saleFk := saleFk
+ FROM
+ ( SELECT s.id as saleFk,
+ ish.created,
+ ish.id as itemShelvingFk,
+ ish.available,
+ s.quantity,
+ ish.packing,
+ CONCAT(p.`column`, '-',p.`row`,': ', sh.code ) as ubication
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.sector sc ON sc.warehouseFk = t.warehouseFk
+ JOIN vn.parking p ON p.sectorFk = sc.id
+ JOIN vn.shelving sh ON sh.parkingFk = p.id
+ JOIN vn.itemShelving ish ON ish.shelvingFk = sh.code AND ish.itemFk = s.itemFk
+ WHERE t.id = vTicketFk
+ AND sc.id = vSectorFk
+ AND s.quantity MOD ish.packing = 0
+ AND s.quantity >= ish.packing
+ ORDER BY s.id,
+ sh.priority DESC,
+ ish.packing DESC,
+ ish.created
+ ) sub
+ ) sub2
+ WHERE Reserved > 0;
+
+ UPDATE vn.itemShelving ish
+ JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
+ JOIN vn.sale s ON s.id = sis.saleFk
+ SET ish.available = ish.visible - sis.quantity,
+ ish.visible = ish.visible - sis.quantity
+ WHERE s.ticketFk = vTicketFk
+ AND s.isPicked = FALSE;
+
+ CALL vn.saleItemShelvingIsPicked(vTicketFk, TRUE);
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -51455,50 +53713,6 @@ BEGIN
REPLACE INTO vn.routeLoadWorker(routeFk, workerFk)
VALUES(routeFk,workerFk);
-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 `scanTreeCreate` */;
-/*!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 `scanTreeCreate`()
-BEGIN
- CALL nestTree(
- 'vn2008',
- 'scan',
- 'vn2008',
- 'scanTree'
- );
-
- UPDATE vn2008.scanTree st
- JOIN (
- SELECT sl.scan_id,
- MAX(sl.odbc_date) lastScanned,
- COUNT(DISTINCT t.routeFk) routeCount,
- MIN(t.routeFk) mod 1000 as minRoute,
- MAX(t.routeFk) mod 1000 as maxRoute,
- COUNT(sl.scan_line_id) as scanned
- FROM vn2008.scan_line sl
- JOIN expedition e ON e.id = sl.`code`
- JOIN ticket t ON t.id = e.ticketFk
- WHERE t.routeFk
- GROUP BY sl.scan_id
- ) rs ON rs.scan_id = st.id
- SET st.lastScanned = rs.lastScanned,
- st.routeCount = rs.routeCount,
- st.minRoute = rs.minRoute,
- st.maxRoute = IF(rs.minRoute != rs.maxRoute, rs.maxRoute,NULL),
- st.scanned = rs.scanned;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -51509,40 +53723,40 @@ 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 `scanTreeCreate__`()
-BEGIN
- CALL nestTree(
- 'vn2008',
- 'scan',
- 'vn2008',
- 'scanTree'
- );
-
- UPDATE vn2008.scanTree st
- JOIN (
- SELECT sl.scan_id,
- MAX(sl.odbc_date) lastScanned,
- COUNT(DISTINCT t.routeFk) routeCount,
- MIN(t.routeFk) mod 1000 as minRoute,
- MAX(t.routeFk) mod 1000 as maxRoute,
- COUNT(sl.scan_line_id) as scanned
- FROM vn2008.scan_line sl
- JOIN expedition e ON e.id = sl.`code`
- JOIN ticket t ON t.id = e.ticketFk
- WHERE t.routeFk
- GROUP BY sl.scan_id
- ) rs ON rs.scan_id = st.id
- SET st.lastScanned = rs.lastScanned,
- st.routeCount = rs.routeCount,
- st.minRoute = rs.minRoute,
- st.maxRoute = IF(rs.minRoute != rs.maxRoute, rs.maxRoute,NULL),
- st.scanned = rs.scanned;
+BEGIN
+ CALL nestTree(
+ 'vn2008',
+ 'scan',
+ 'vn2008',
+ 'scanTree'
+ );
+
+ UPDATE vn2008.scanTree st
+ JOIN (
+ SELECT sl.scan_id,
+ MAX(sl.odbc_date) lastScanned,
+ COUNT(DISTINCT t.routeFk) routeCount,
+ MIN(t.routeFk) mod 1000 as minRoute,
+ MAX(t.routeFk) mod 1000 as maxRoute,
+ COUNT(sl.scan_line_id) as scanned
+ FROM vn2008.scan_line sl
+ JOIN expedition e ON e.id = sl.`code`
+ JOIN ticket t ON t.id = e.ticketFk
+ WHERE t.routeFk
+ GROUP BY sl.scan_id
+ ) rs ON rs.scan_id = st.id
+ SET st.lastScanned = rs.lastScanned,
+ st.routeCount = rs.routeCount,
+ st.minRoute = rs.minRoute,
+ st.maxRoute = IF(rs.minRoute != rs.maxRoute, rs.maxRoute,NULL),
+ st.scanned = rs.scanned;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -51899,7 +54113,7 @@ proc: BEGIN
UPDATE vn.shelving
- SET parkingFk = vParkingFk, parked = NOW()
+ SET parkingFk = vParkingFk, parked = NOW(), isPrinted = 1
WHERE `code` = vShelvingFk COLLATE utf8_unicode_ci;
SELECT (COUNT(*) > 0) AS IsUpdated
@@ -51947,6 +54161,27 @@ SELECT s.itemFk,
HAVING sinServir > aparcado;
+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 `shelvingPriority_update` */;
+/*!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 `shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10))
+BEGIN
+
+ UPDATE vn.shelving SET priority = priority WHERE code=vShelvingFk COLLATE utf8_unicode_ci;
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -51976,9 +54211,9 @@ BEGIN
UPDATE vn.shelving sh
LEFT JOIN vn.itemShelving its ON its.shelvingFk = sh.`code`
- SET isPrinted = 0
- WHERE isPrinted = 1
- AND its.id IS NULL
+ SET isPrinted = 0,
+ parkingFk = NULL
+ WHERE its.id IS NULL
AND ( sh.parked IS NULL
OR
sh.parked < TIMESTAMPADD(MONTH,-1,CURDATE())
@@ -51990,6 +54225,28 @@ DELIMITER ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `sleep_X_min` */;
+/*!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 `sleep_X_min`()
+BEGIN
+ # Ernesto. 4.8.2020
+ # Para su uso en las tareas ejecutadas a las 2AM (visibles con: SELECT * FROM bs.nightTask order by started asc;)
+ # Simplemente esperar unos minutos para que en las graficas de rendimiento de Percona PMM y escritura a disco de vCenter se puedan ver los efectos de cada tarea.
+ do SLEEP(300);
+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 `solunionRiskRequest` */;
ALTER DATABASE `vn` CHARACTER SET utf8 COLLATE utf8_general_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
@@ -53145,6 +55402,109 @@ 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 `ticketClon` */;
+/*!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 `ticketClon`(vTicketFk INT, vNewShipped DATE)
+BEGIN
+
+ DECLARE done INT DEFAULT FALSE;
+ DECLARE vNewTicketFk INT;
+ DECLARE vOldSaleFk INT;
+ DECLARE vNewSaleFk INT;
+
+ DECLARE cur1 CURSOR FOR
+ SELECT id
+ FROM vn.sale
+ WHERE ticketFk = vTicketFk;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ SET vNewShipped = IFNULL(vNewShipped, CURDATE());
+
+ CALL vn.ticket_Clone(vTicketFk, vNewTicketFk);
+
+ UPDATE vn.ticket
+ SET landed = TIMESTAMPADD(DAY, DATEDIFF(vNewShipped, shipped), landed),
+ shipped = vNewShipped
+ WHERE id = vNewTicketFk;
+
+ OPEN cur1;
+
+ read_loop: LOOP
+
+ FETCH cur1 INTO vOldSaleFk;
+
+ IF done THEN
+ LEAVE read_loop;
+ END IF;
+
+ INSERT INTO vn.sale(ticketFk, itemFk, quantity, concept, price, discount, priceFixed, isPriceFixed)
+ SELECT vNewTicketFk, itemFk, quantity, concept, price, discount, priceFixed, isPriceFixed
+ FROM vn.sale
+ WHERE id = vOldSaleFk;
+
+ SELECT max(id) INTO vNewSaleFk
+ FROM vn.sale
+ WHERE ticketFk = vNewTicketFk;
+
+ INSERT INTO vn.saleComponent(saleFk, componentFk, value, isGreuge)
+ SELECT vNewSaleFk, componentFk, value, isGreuge
+ FROM vn.saleComponent
+ WHERE saleFk = vOldSaleFk;
+
+ END LOOP;
+
+ CLOSE cur1;
+
+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 `ticketClon_OneYear` */;
+/*!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 `ticketClon_OneYear`(vTicketFk INT)
+BEGIN
+
+ DECLARE vShipped DATE;
+ DECLARE vMaxDated DATE;
+
+ SELECT shipped, TIMESTAMPADD(YEAR,1,shipped)
+ INTO vShipped, vMaxDated
+ FROM vn.ticket
+ WHERE id = vTicketFk;
+
+ WHILE vShipped <= vMaxDated DO
+
+ SET vShipped = TIMESTAMPADD(WEEK, 1, vShipped);
+
+ CALL vn.ticketClon(vTicketFk, vShipped);
+
+ END WHILE;
+
+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 `ticketClosure` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54513,9 +56873,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 ;;
@@ -54850,9 +57210,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 ;;
@@ -56025,20 +58385,20 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` PROCEDURE `ticket_close`()
+CREATE DEFINER=`root`@`%` PROCEDURE `ticket_close`(vTicketFk INT)
BEGIN
/**
* Realiza el cierre de todos los
* tickets de la tabla ticketClosure.
+ *
+ * @param vTicketFk Id del ticket
*/
DECLARE vDone BOOL;
DECLARE vClientFk INT;
- DECLARE vTicketFk INT;
+ DECLARE vCurTicketFk INT;
DECLARE vIsTaxDataChecked BOOL;
DECLARE vCompanyFk INT;
DECLARE vShipped DATE;
- DECLARE vPriority INT DEFAULT 1;
- DECLARE vReportDeliveryNote INT DEFAULT 1;
DECLARE vNewInvoiceId INT;
DECLARE vHasDailyInvoice BOOL;
DECLARE vWithPackage BOOL;
@@ -56052,18 +58412,19 @@ BEGIN
RESIGNAL;
END;
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure2;
- CREATE TEMPORARY TABLE tmp.ticketClosure2
- SELECT ticketFk FROM tmp.ticketClosure;
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure;
+ CREATE TEMPORARY TABLE tmp.ticketClosure
+ SELECT vTicketFk AS ticketFk;
+
INSERT INTO tmp.ticketClosure
SELECT id FROM stowaway s
- JOIN tmp.ticketClosure2 tc ON s.shipFk = tc.ticketFk;
+ WHERE s.shipFk = vTicketFk;
OPEN cur;
proc: LOOP
SET vDone = FALSE;
- FETCH cur INTO vTicketFk;
+ FETCH cur INTO vCurTicketFk;
IF vDone THEN
LEAVE proc;
@@ -56090,23 +58451,23 @@ BEGIN
JOIN province p ON p.id = c.provinceFk
JOIN country co ON co.id = p.countryFk
JOIN warehouse w ON w.id = t.warehouseFk
- WHERE t.id = vTicketFk;
+ WHERE t.id = vCurTicketFk;
INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity)
- (SELECT vTicketFk, p.id, COUNT(*)
+ (SELECT vCurTicketFk, p.id, COUNT(*)
FROM expedition e
JOIN packaging p ON p.itemFk = e.itemFk
- WHERE e.ticketFk = vTicketFk AND p.isPackageReturnable
+ WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable
AND vWithPackage
GROUP BY p.itemFk);
-- No retornables o no catalogados
INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed)
- (SELECT e.itemFk, vTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.itemFk, vClientFk), 1
+ (SELECT e.itemFk, vCurTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.itemFk, vClientFk), 1
FROM expedition e
JOIN item i ON i.id = e.itemFk
LEFT JOIN packaging p ON p.itemFk = i.id
- WHERE e.ticketFk = vTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0
+ WHERE e.ticketFk = vCurTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0
AND getSpecialPrice(e.itemFk, vClientFk) > 0
GROUP BY e.itemFk);
@@ -56115,7 +58476,7 @@ BEGIN
IF(vHasDailyInvoice) AND vHasToInvoice THEN
-- Facturacion rapida
- CALL ticketTrackingAdd(vTicketFk, 'DELIVERED', NULL);
+ CALL ticketTrackingAdd(vCurTicketFk, 'DELIVERED', NULL);
-- Facturar si está contabilizado
IF vIsTaxDataChecked THEN
CALL invoiceOut_newFromClient(
@@ -56127,16 +58488,13 @@ BEGIN
vNewInvoiceId);
END IF;
ELSE
- -- Albaran_print
- CALL ticketTrackingAdd(vTicketFk, (SELECT vn.getAlert3State(vTicketFk)), NULL);
+ CALL ticketTrackingAdd(vCurTicketFk, (SELECT vn.getAlert3State(vCurTicketFk)), NULL);
END IF;
-
- -- ticketClosure end
END LOOP;
CLOSE cur;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure2;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketClosure;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -57233,6 +59591,69 @@ proc: BEGIN
DROP TEMPORARY TABLE tmp.ticketComponentPrice;
DROP TEMPORARY TABLE tmp.ticketComponent;
DROP TEMPORARY TABLE tmp.sale;
+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 `ticket_WeightDeclaration` */;
+/*!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 `ticket_WeightDeclaration`(vClientFk INT, vDated DATE)
+BEGIN
+
+ DECLARE vTheorycalWeight DECIMAL(10,2);
+ DECLARE vRealWeight DECIMAL(10,2);
+ DECLARE vRatio DOUBLE;
+
+ SELECT IFNULL(sum(tob.description),0) INTO vRealWeight
+ FROM vn.ticketObservation tob
+ JOIN vn.observationType ot ON ot.id = tob.observationTypeFk
+ JOIN vn.ticket t ON t.id = tob.ticketFk
+ WHERE ot.description = 'Peso Aduana'
+ AND t.clientFk = vClientFk
+ AND t.shipped BETWEEN vDated AND util.dayend(vDated);
+
+ SELECT sum(IF(sv.physicalWeight = 0, sv.weight, sv.physicalWeight)) INTO vTheorycalWeight
+ FROM vn.ticket t
+ JOIN vn.sale s ON s.ticketFk = t.id
+ JOIN vn.saleVolume sv ON sv.saleFk = s.id
+ JOIN vn.item i ON i.id = s.itemFk
+ JOIN vn.itemCost ic ON ic.itemFk = i.id AND ic.warehouseFk = t.warehouseFk
+ WHERE t.clientFk = vClientFk
+ AND t.shipped BETWEEN vDated AND util.dayend(vDated);
+
+ SET vRatio = vRealWeight / vTheorycalWeight;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketWeight;
+
+ CREATE TEMPORARY TABLE tmp.ticketWeight
+ ENGINE = MEMORY
+ SELECT i.intrastatFk,
+ ib.ediBotanic,
+ FLOOR(sum(s.quantity)) as quantity,
+ CAST(vRatio * SUM(IF(sv.physicalWeight = 0, sv.weight, sv.physicalWeight) ) AS DECIMAL(10,2)) physicalWeight,
+ o.code as countryCode,
+ vDated as Dated
+ FROM vn.ticket t
+ JOIN vn.sale s ON s.ticketFk = t.id
+ JOIN vn.saleVolume sv ON sv.saleFk = s.id
+ JOIN vn.item i ON i.id = s.itemFk
+ LEFT JOIN vn.itemBotanicalWithGenus ib ON ib.itemFk = i.id
+ LEFT JOIN vn.origin o ON o.id = i.originFk
+ WHERE t.clientFk = vClientFk
+ AND t.shipped BETWEEN vDated AND util.dayend(vDated)
+ GROUP BY ib.ediBotanic, o.code;
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -57243,9 +59664,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 ;;
@@ -57260,12 +59681,12 @@ BEGIN
* @return tmp.timeBusinessCalculate
*/
- DROP TEMPORARY TABLE IF EXISTS tmp.timeBusinessCalculate;
+ DROP TABLE IF EXISTS tmp.timeBusinessCalculate;
DROP TEMPORARY TABLE IF EXISTS tmp.businessFullTime;
CALL rangeDateInfo(vDatedFrom, vDatedTo);
- CREATE TEMPORARY TABLE tmp.timeBusinessCalculate
+ CREATE TABLE tmp.timeBusinessCalculate
SELECT dated,
businessFk,
userFk,
@@ -57541,7 +59962,8 @@ BEGIN
FROM (SELECT wtc.*
FROM workerTimeControl wtc
JOIN tmp.`user` w ON w.userFk = wtc.userFk
- WHERE wtc.timed BETWEEN vDatedFrom AND vDatedTo
+ WHERE wtc.timed BETWEEN vDatedFrom AND vDatedTo AND
+ isSendMail = FALSE
ORDER BY userFk, timed ASC
) wtc
WHERE wtc.timed BETWEEN vDatedFrom AND vDatedTo
@@ -62998,6 +65420,24 @@ 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 = 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 `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`,cast(`sr`.`Price` as decimal(10,3)) 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`,`i`.`group_id` AS `group_id`,`mp`.`name` AS `marketPlace`,`di`.`DeliveryPrice` AS `DeliveryPrice`,`di`.`ChargeAmount` AS `ChargeAmount`,`di`.`MinimumQuantity` AS `MinimumQuantity`,`di`.`MaximumQuantity Integer` AS `MaximumQuantity`,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) / (`b`.`x_size` * `b`.`y_size`))) * `sr`.`NumberOfItemsPerCask`) when 5 then ((floor(((128 * 56) / (`b`.`x_size` * `b`.`y_size`))) * `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) / (`b`.`x_size` * `b`.`y_size`))) * `sr`.`NumberOfItemsPerCask`) when 5 then ((floor(((128 * 56) / (`b`.`x_size` * `b`.`y_size`))) * `sr`.`NumberOfItemsPerCask`) * `sr`.`NumberOfLayersPerTrolley`) end)) as decimal(10,0)) AS `IncrementalOrderUnit` from (((((`deliveryInformation` `di` join `supplyResponse` `sr` on((`sr`.`ID` = `di`.`supplyResponseID`))) join `supplier` `s` on((`s`.`glnAddressCode` = `sr`.`SupplierGLN`))) join `bucket` `b` on((`b`.`bucket_id` = `sr`.`EmbalageCode`))) join `item` `i` on((`i`.`id` = `sr`.`Item_ArticleCode`))) join `marketPlace` `mp` on(((`mp`.`id` = `sr`.`MarketPlaceID`) and (`mp`.`isOffered` = 1)))) 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`
--
@@ -63449,7 +65889,7 @@ USE `pbx`;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
-/*!50001 VIEW `sipConf` AS select `s`.`user_id` AS `id`,`s`.`extension` AS `name`,NULL AS `callbackextension`,`s`.`md5Secret` AS `md5secret`,`u`.`nickname` AS `callerid`,`c`.`host` AS `host`,`c`.`deny` AS `deny`,`c`.`permit` AS `permit`,`c`.`type` AS `type`,`c`.`context` AS `context`,`c`.`incomingLimit` AS `incominglimit`,`c`.`pickupGroup` AS `pickupgroup`,`c`.`careInvite` AS `careinvite`,`c`.`insecure` AS `insecure`,`c`.`transport` AS `transport`,`r`.`ipAddr` AS `ipaddr`,`r`.`regSeconds` AS `regseconds`,`r`.`port` AS `port`,`r`.`defaultUser` AS `defaultuser`,`r`.`userAgent` AS `useragent`,`r`.`lastMs` AS `lastms`,`r`.`fullContact` AS `fullcontact`,`r`.`regServer` AS `regserver` from (((`pbx`.`sip` `s` join `account`.`user` `u` on((`u`.`id` = `s`.`user_id`))) left join `pbx`.`sipReg` `r` on((`s`.`user_id` = `r`.`userId`))) join `pbx`.`sipConfig` `c`) */;
+/*!50001 VIEW `sipConf` AS select `s`.`user_id` AS `id`,`s`.`extension` AS `name`,NULL AS `callbackextension`,`s`.`md5Secret` AS `md5secret`,`u`.`nickname` AS `callerid`,`c`.`host` AS `host`,`c`.`deny` AS `deny`,`c`.`permit` AS `permit`,`c`.`type` AS `type`,`c`.`context` AS `context`,`c`.`incomingLimit` AS `incominglimit`,`c`.`pickupGroup` AS `pickupgroup`,`c`.`careInvite` AS `careinvite`,`c`.`insecure` AS `insecure`,`c`.`transport` AS `transport`,`c`.`nat` AS `nat`,`r`.`ipAddr` AS `ipaddr`,`r`.`regSeconds` AS `regseconds`,`r`.`port` AS `port`,`r`.`defaultUser` AS `defaultuser`,`r`.`userAgent` AS `useragent`,`r`.`lastMs` AS `lastms`,`r`.`fullContact` AS `fullcontact`,`r`.`regServer` AS `regserver` from (((`pbx`.`sip` `s` join `account`.`user` `u` on((`u`.`id` = `s`.`user_id`))) left join `pbx`.`sipReg` `r` on((`s`.`user_id` = `r`.`userId`))) join `pbx`.`sipConfig` `c`) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -64240,6 +66680,24 @@ USE `vn`;
/*!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 = 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 `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 `invoiceInEntry__`
--
@@ -64582,6 +67040,24 @@ USE `vn`;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
+--
+-- Final view structure for view `item_Free_Id`
+--
+
+/*!50001 DROP VIEW IF EXISTS `item_Free_Id`*/;
+/*!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 `item_Free_Id` AS select (`i1`.`id` + 1) AS `newId` from (`item` `i1` left join `item` `i2` on(((`i1`.`id` + 1) = `i2`.`id`))) where (isnull(`i2`.`id`) and (`i1`.`id` > 400000)) */;
+/*!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 `labelInfo`
--
@@ -64595,7 +67071,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
-/*!50001 VIEW `labelInfo` AS select `i`.`id` AS `itemId`,`i`.`name` AS `itemName`,`i`.`inkFk` AS `colorCode`,`i`.`stems` AS `stems`,`i`.`category` AS `category`,`i`.`subName` AS `productor`,`it`.`value` AS `value`,`b`.`packing` AS `packing`,`clb`.`warehouse_id` AS `warehouse_id`,`i`.`size` AS `size`,`b`.`isPickedOff` AS `isPickedOff`,`e`.`evaNotes` AS `notes`,`w`.`name` AS `wh_in`,`e`.`id` AS `entryId`,`b`.`id` AS `buyId` from (((((((`vn`.`item` `i` join `vn`.`itemTag` `it` on((`it`.`itemFk` = `i`.`id`))) join `vn`.`tag` `t` on((`t`.`id` = `it`.`tagFk`))) join `cache`.`last_buy` `clb` on((`clb`.`item_id` = `i`.`id`))) join `vn`.`buy` `b` on((`b`.`id` = `clb`.`buy_id`))) join `vn`.`entry` `e` on((`e`.`id` = `b`.`entryFk`))) left join `vn`.`travel` `tr` on((`tr`.`id` = `e`.`travelFk`))) join `vn`.`warehouse` `w` on((`w`.`id` = `tr`.`warehouseInFk`))) */;
+/*!50001 VIEW `labelInfo` AS select `i`.`id` AS `itemId`,`i`.`name` AS `itemName`,`b`.`stickers` AS `stickers`,`b`.`printedStickers` AS `life`,`i`.`inkFk` AS `colorCode`,`i`.`stems` AS `stems`,`i`.`category` AS `category`,`i`.`subName` AS `productor`,`b`.`packing` AS `packing`,`clb`.`warehouse_id` AS `warehouse_id`,`i`.`size` AS `size`,`b`.`isPickedOff` AS `isPickedOff`,`e`.`evaNotes` AS `notes`,`w`.`name` AS `wh_in`,`e`.`id` AS `entryId`,`b`.`id` AS `buyId` from (((((`vn`.`buy` `b` join `vn`.`item` `i` on((`i`.`id` = `b`.`itemFk`))) join `cache`.`last_buy` `clb` on((`clb`.`item_id` = `i`.`id`))) join `vn`.`entry` `e` on((`e`.`id` = `b`.`entryFk`))) left join `vn`.`travel` `tr` on((`tr`.`id` = `e`.`travelFk`))) join `vn`.`warehouse` `w` on((`w`.`id` = `tr`.`warehouseInFk`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -64793,7 +67269,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
-/*!50001 VIEW `saleVolume` AS select `s`.`ticketFk` AS `ticketFk`,`s`.`id` AS `saleFk`,round(((`ic`.`cm3delivery` * `s`.`quantity`) / 1000),0) AS `litros`,`t`.`routeFk` AS `routeFk`,`t`.`shipped` AS `shipped`,((`s`.`quantity` * `ic`.`cm3delivery`) / 1000000) AS `volume`,((`s`.`quantity` * `ic`.`grams`) / 1000) AS `physicalWeight`,(((`s`.`quantity` * `ic`.`cm3delivery`) * greatest(`i`.`density`,167)) / 1000000) AS `weight`,((`s`.`quantity` * `ic`.`cm3delivery`) / 1000000) AS `physicalVolume`,(((`s`.`quantity` * `ic`.`cm3delivery`) * `t`.`zonePrice`) / `cb`.`volume`) AS `freight`,`t`.`zoneFk` AS `zoneFk`,`t`.`clientFk` AS `clientFk`,`s`.`isPicked` AS `isPicked` from ((((`sale` `s` join `item` `i` on((`i`.`id` = `s`.`itemFk`))) join `ticket` `t` on((`t`.`id` = `s`.`ticketFk`))) join `packaging` `cb` on((`cb`.`id` = '94'))) join `itemCost` `ic` on(((`ic`.`itemFk` = `s`.`itemFk`) and (`ic`.`warehouseFk` = `t`.`warehouseFk`)))) */;
+/*!50001 VIEW `saleVolume` AS select `s`.`ticketFk` AS `ticketFk`,`s`.`id` AS `saleFk`,round(((`ic`.`cm3delivery` * `s`.`quantity`) / 1000),0) AS `litros`,`t`.`routeFk` AS `routeFk`,`t`.`shipped` AS `shipped`,((`s`.`quantity` * `ic`.`cm3delivery`) / 1000000) AS `volume`,((`s`.`quantity` * `ic`.`grams`) / 1000) AS `physicalWeight`,(((`s`.`quantity` * `ic`.`cm3delivery`) * greatest(`i`.`density`,167)) / 1000000) AS `weight`,((`s`.`quantity` * `ic`.`cm3delivery`) / 1000000) AS `physicalVolume`,(((`s`.`quantity` * `ic`.`cm3delivery`) * ifnull(`t`.`zonePrice`,`z`.`price`)) / `cb`.`volume`) AS `freight`,`t`.`zoneFk` AS `zoneFk`,`t`.`clientFk` AS `clientFk`,`s`.`isPicked` AS `isPicked` from (((((`sale` `s` join `item` `i` on((`i`.`id` = `s`.`itemFk`))) join `ticket` `t` on((`t`.`id` = `s`.`ticketFk`))) join `zone` `z` on((`z`.`id` = `t`.`zoneFk`))) join `packaging` `cb` on((`cb`.`id` = '94'))) join `itemCost` `ic` on(((`ic`.`itemFk` = `s`.`itemFk`) and (`ic`.`warehouseFk` = `t`.`warehouseFk`)))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -64816,6 +67292,24 @@ USE `vn`;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
+--
+-- Final view structure for view `salesPersonSince`
+--
+
+/*!50001 DROP VIEW IF EXISTS `salesPersonSince`*/;
+/*!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 `salesPersonSince` AS select `p`.`id_trabajador` AS `workerFk`,min(`b`.`date_start`) AS `started` from ((((`postgresql`.`person` `p` join `postgresql`.`profile` `pr` on((`pr`.`person_id` = `p`.`person_id`))) left join `postgresql`.`business` `b` on((`pr`.`profile_id` = `b`.`client_id`))) left join `postgresql`.`business_labour` `bl` on((`b`.`business_id` = `bl`.`business_id`))) join `postgresql`.`professional_category` `pc` on((`pc`.`professional_category_id` = `bl`.`professional_category_id`))) where (`pc`.`category_name` = 'Aux ventas') group by `p`.`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 `salesPreparedLastHour`
--
@@ -65266,6 +67760,24 @@ USE `vn`;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
+--
+-- Final view structure for view `zoneEstimatedDelivery`
+--
+
+/*!50001 DROP VIEW IF EXISTS `zoneEstimatedDelivery`*/;
+/*!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 `zoneEstimatedDelivery` AS select `t`.`zoneFk` AS `zoneFk`,cast((curdate() + interval ((hour(`zc`.`hour`) * 60) + minute(`zc`.`hour`)) minute) as time) AS `hourTheoretical`,cast(sum(`sv`.`volume`) as decimal(5,1)) AS `totalVolume`,cast(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0)) as decimal(5,1)) AS `remainingVolume`,greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)) AS `speed`,cast((`zc`.`hour` + interval ((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0))) minute) as time) AS `hourEffective`,floor(((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)))) AS `minutesLess`,cast((`zc`.`hour` + interval ((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0))) minute) as time) AS `etc` from ((((((((`vn`.`ticket` `t` join `vn`.`ticketStateToday` `tst` on((`tst`.`ticket` = `t`.`id`))) join `vn`.`state` `s` on((`s`.`id` = `tst`.`state`))) join `vn`.`saleVolume` `sv` on((`sv`.`ticketFk` = `t`.`id`))) left join `vn`.`lastHourProduction` `lhp` on((`lhp`.`warehouseFk` = `t`.`warehouseFk`))) join `vn`.`warehouse` `w` on((`w`.`id` = `t`.`warehouseFk`))) join `vn`.`warehouseAlias` `wa` on((`wa`.`id` = `w`.`aliasFk`))) left join `vn`.`zoneClosure` `zc` on(((`zc`.`zoneFk` = `t`.`zoneFk`) and (`zc`.`dated` = curdate())))) left join `cache`.`departure_limit` `dl` on(((`dl`.`warehouse_id` = `t`.`warehouseFk`) and (`dl`.`fecha` = curdate())))) where ((`wa`.`name` = 'Silla') and (cast(`t`.`shipped` as date) = curdate())) group by `t`.`zoneFk` */;
+/*!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 `zone_ETD`
--
@@ -65279,7 +67791,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
-/*!50001 VIEW `zone_ETD` AS select `t`.`zoneFk` AS `zoneFk`,cast((curdate() + interval ((hour(`zc`.`hour`) * 60) + minute(`zc`.`hour`)) minute) as time) AS `HoraTeórica`,cast(sum(`sv`.`volume`) as decimal(5,1)) AS `volumenTotal`,cast(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0)) as decimal(5,1)) AS `volumenPendiente`,greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)) AS `velocidad`,cast((`zc`.`hour` + interval ((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0))) minute) as time) AS `HoraPráctica`,floor(((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)))) AS `minutesLess`,cast((`zc`.`hour` + interval ((-(sum(if((`s`.`alertLevel` < 2),`sv`.`volume`,0))) * 60) / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0))) minute) as time) AS `etc` from ((((((((`vn`.`ticket` `t` join `vn`.`ticketStateToday` `tst` on((`tst`.`ticket` = `t`.`id`))) join `vn`.`state` `s` on((`s`.`id` = `tst`.`state`))) join `vn`.`saleVolume` `sv` on((`sv`.`ticketFk` = `t`.`id`))) left join `vn`.`lastHourProduction` `lhp` on((`lhp`.`warehouseFk` = `t`.`warehouseFk`))) join `vn`.`warehouse` `w` on((`w`.`id` = `t`.`warehouseFk`))) join `vn`.`warehouseAlias` `wa` on((`wa`.`id` = `w`.`aliasFk`))) left join `vn`.`zoneClosure` `zc` on(((`zc`.`zoneFk` = `t`.`zoneFk`) and (`zc`.`dated` = curdate())))) left join `cache`.`departure_limit` `dl` on(((`dl`.`warehouse_id` = `t`.`warehouseFk`) and (`dl`.`fecha` = curdate())))) where ((`wa`.`name` = 'Silla') and (cast(`t`.`shipped` as date) = curdate())) group by `t`.`zoneFk` */;
+/*!50001 VIEW `zone_ETD` AS select `zed`.`zoneFk` AS `zoneFk`,`zed`.`hourTheoretical` AS `HoraTeórica`,`zed`.`totalVolume` AS `volumenTotal`,`zed`.`remainingVolume` AS `volumenPendiente`,`zed`.`speed` AS `velocidad`,`zed`.`hourEffective` AS `HoraPráctica`,`zed`.`minutesLess` AS `minutesLess`,`zed`.`etc` AS `etc` from `vn`.`zoneEstimatedDelivery` `zed` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -65299,4 +67811,4 @@ USE `vncontrol`;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2020-07-16 10:43:28
+-- Dump completed on 2020-09-09 11:59:03
diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index e1b6b1c65..7cf81ca6b 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -189,8 +189,9 @@ export default {
newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]',
newPaymentAmount: '.vn-dialog.shown vn-input-number[ng-model="$ctrl.receipt.amountPaid"]',
saveButton: '.vn-dialog.shown [response="accept"]',
- firstBalanceLine: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'
-
+ firstLineBalance: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)',
+ firstLineReference: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable',
+ firstLineReferenceInput: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable > div > field > vn-textfield'
},
webPayment: {
confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]',
@@ -198,7 +199,7 @@ export default {
},
dms: {
deleteFileButton: 'vn-client-dms-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
- firstDocWorker: 'vn-client-dms-index vn-td:nth-child(7) > span',
+ firstDocWorker: 'vn-client-dms-index vn-td:nth-child(8) > span',
firstDocWorkerDescriptor: '.vn-popover.shown vn-worker-descriptor'
},
clientContacts: {
@@ -219,23 +220,23 @@ export default {
topbarSearch: 'vn-topbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
closeItemSummaryPreview: '.vn-popup.shown',
- fieldsToShowButton: 'vn-item-index vn-table > div > div > vn-icon-button[icon="menu"]',
- fieldsToShowForm: '.vn-dialog.shown form',
+ fieldsToShowButton: 'vn-item-index vn-table > div > div > vn-icon-button[icon="more_vert"]',
+ fieldsToShowForm: '.vn-popover.shown .content',
firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > img',
firstItemImageTd: 'vn-item-index vn-table a:nth-child(1) vn-td:nth-child(1)',
firstItemId: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(2)',
- idCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(2) > vn-check',
- stemsCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(3) > vn-check',
- sizeCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(4) > vn-check',
- nicheCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(5) > vn-check',
- typeCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(6) > vn-check',
- categoryCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(7) > vn-check',
- intrastadCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(8) > vn-check',
- originCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(9) > vn-check',
- buyerCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(10) > vn-check',
- destinyCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(11) > vn-check',
- taxClassCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(12) > vn-check',
- saveFieldsButton: '.vn-dialog.shown vn-horizontal:nth-child(16) > vn-button > button'
+ idCheckbox: '.vn-popover.shown vn-horizontal:nth-child(1) > vn-check',
+ stemsCheckbox: '.vn-popover.shown vn-horizontal:nth-child(2) > vn-check',
+ sizeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check',
+ nicheCheckbox: '.vn-popover.shown vn-horizontal:nth-child(4) > vn-check',
+ typeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(5) > vn-check',
+ categoryCheckbox: '.vn-popover.shown vn-horizontal:nth-child(6) > vn-check',
+ intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(7) > vn-check',
+ originCheckbox: '.vn-popover.shown vn-horizontal:nth-child(8) > vn-check',
+ buyerCheckbox: '.vn-popover.shown vn-horizontal:nth-child(9) > vn-check',
+ destinyCheckbox: '.vn-popover.shown vn-horizontal:nth-child(10) > vn-check',
+ taxClassCheckbox: '.vn-popover.shown vn-horizontal:nth-child(11) > vn-check',
+ saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button'
},
itemCreateView: {
temporalName: 'vn-item-create vn-textfield[ng-model="$ctrl.item.provisionalName"]',
@@ -371,7 +372,9 @@ export default {
ticketsIndex: {
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
advancedSearchInvoiceOut: 'vn-ticket-search-panel vn-textfield[ng-model="filter.refFk"]',
- newTicketButton: 'vn-ticket-index a',
+ advancedSearchDaysOnward: 'vn-ticket-search-panel vn-input-number[ng-model="filter.scopeDays"]',
+ advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
+ newTicketButton: 'vn-ticket-index a[ui-sref="ticket.create"]',
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
secondTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(2) > vn-td:nth-child(1) > vn-check',
thirdTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(3) > vn-td:nth-child(1) > vn-check',
@@ -383,7 +386,6 @@ export default {
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
searchResultDate: 'vn-ticket-summary [label=Landed] span',
topbarSearch: 'vn-searchbar',
- advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
moreMenu: 'vn-ticket-index vn-icon-button[icon=more_vert]',
sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6)',
@@ -519,11 +521,11 @@ export default {
zone: 'vn-autocomplete[ng-model="$ctrl.zoneId"]',
nextStepButton: 'vn-step-control .buttons > section:last-child vn-button',
finalizeButton: 'vn-step-control .buttons > section:last-child button[type=submit]',
- stepTwoTotalPriceDif: 'vn-ticket-basic-data-step-two vn-tfoot > vn-tr > :nth-child(6)',
+ stepTwoTotalPriceDif: 'vn-ticket-basic-data-step-two > vn-side-menu div:nth-child(4)',
chargesReason: 'vn-ticket-basic-data-step-two div:nth-child(3) > vn-radio',
},
ticketComponents: {
- base: 'vn-ticket-components [name="base-sum"]'
+ base: 'vn-ticket-components > vn-side-menu div:nth-child(1) > div:nth-child(2)'
},
ticketRequests: {
addRequestButton: 'vn-ticket-request-index > a > vn-float-button > button',
@@ -544,6 +546,7 @@ export default {
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value',
+ changes: 'vn-ticket-log vn-data-viewer vn-tbody > vn-tr > vn-td:nth-child(7)',
id: 'vn-ticket-log > vn-log vn-td.before > vn-one:nth-child(1) > div > span.value'
},
ticketService: {
@@ -688,7 +691,7 @@ export default {
confirmButton: '.vn-confirm.shown button[response="accept"]',
},
routeIndex: {
- addNewRouteButton: 'vn-route-index > a[ui-sref="route.create"]'
+ addNewRouteButton: 'vn-route-index a[ui-sref="route.create"]'
},
createRouteView: {
worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]',
@@ -803,6 +806,22 @@ export default {
navigateBackToIndex: 'vn-worker-descriptor [name="goToModuleIndex"]',
acceptDeleteDialog: '.vn-confirm.shown button[response="accept"]'
},
+ workerCalendar: {
+ year: 'vn-worker-calendar vn-autocomplete[ng-model="$ctrl.year"]',
+ totalHolidaysUsed: 'vn-worker-calendar div.totalBox > div',
+ januaryThirtyFirst: 'vn-worker-calendar vn-calendar:nth-child(2) section:nth-child(33) > div',
+ marchTwentyThird: 'vn-worker-calendar vn-calendar:nth-child(4) section:nth-child(29) > div',
+ mayFourth: 'vn-worker-calendar vn-calendar:nth-child(6) section:nth-child(8) > div',
+ mayEighth: 'vn-worker-calendar vn-calendar:nth-child(6) section:nth-child(12) > div',
+ mayTwelfth: 'vn-worker-calendar vn-calendar:nth-child(6) section:nth-child(16) > div',
+ mayThirteenth: 'vn-worker-calendar vn-calendar:nth-child(6) section:nth-child(17) > div',
+ mayFourteenth: 'vn-worker-calendar vn-calendar:nth-child(6) section:nth-child(18) > div',
+ holidays: 'vn-worker-calendar > vn-side-menu div:nth-child(3) > vn-chip:nth-child(1)',
+ absence: 'vn-worker-calendar > vn-side-menu div:nth-child(3) > vn-chip:nth-child(2)',
+ halfHoliday: 'vn-worker-calendar > vn-side-menu div:nth-child(3) > vn-chip:nth-child(3)',
+ furlough: 'vn-worker-calendar > vn-side-menu div:nth-child(3) > vn-chip:nth-child(4)',
+ halfFurlough: 'vn-worker-calendar > vn-side-menu div:nth-child(3) > vn-chip:nth-child(5)',
+ },
invoiceOutIndex: {
topbarSearch: 'vn-searchbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
@@ -852,6 +871,13 @@ export default {
createdThermograph: 'vn-travel-thermograph-index vn-tbody > vn-tr',
upload: 'vn-travel-thermograph-create button[type=submit]'
},
+ zoneIndex: {
+ searchResult: 'vn-zone-index a.vn-tr',
+ },
+ zoneDescriptor: {
+ menu: 'vn-zone-descriptor vn-icon-button[vn-popover="menu"]',
+ deleteZone: 'slot-menu vn-item[ng-click="$ctrl.onDelete()"]'
+ },
zoneBasicData: {
name: 'vn-zone-basic-data vn-textfield[ng-model="$ctrl.zone.name"]',
agency: 'vn-zone-basic-data vn-autocomplete[ng-model="$ctrl.zone.agencyModeFk"]',
@@ -868,10 +894,28 @@ export default {
header: 'vn-entry-summary > vn-card > h5',
reference: 'vn-entry-summary vn-label-value[label="Reference"]',
confirmed: 'vn-entry-summary vn-check[label="Confirmed"]',
+ anyBuyLine: 'vn-entry-summary tr.dark-row'
},
entryDescriptor: {
agency: 'vn-entry-descriptor div.body vn-label-value:nth-child(1) span',
travelsQuicklink: 'vn-entry-descriptor vn-quick-link[icon="local_airport"] > a',
entriesQuicklink: 'vn-entry-descriptor vn-quick-link[icon="icon-entry"] > a'
+ },
+ entryLatestBuys: {
+ firstBuy: 'vn-entry-latest-buys vn-tbody > a:nth-child(1)',
+ allBuysCheckBox: 'vn-entry-latest-buys vn-thead vn-check',
+ secondBuyCheckBox: 'vn-entry-latest-buys a:nth-child(2) vn-check[ng-model="buy.checked"]',
+ editBuysButton: 'vn-entry-latest-buys vn-button[icon="edit"]',
+ fieldAutocomplete: 'vn-autocomplete[ng-model="$ctrl.editedColumn.field"]',
+ newValueInput: 'vn-textfield[ng-model="$ctrl.editedColumn.newValue"]',
+ latestBuysSectionButton: 'a[ui-sref="entry.latestBuys"]',
+ acceptEditBuysDialog: 'button[response="accept"]'
+ },
+ entryIndex: {
+ createEntryButton: 'vn-entry-index vn-button[icon="add"]',
+ newEntrySupplier: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.supplierFk"]',
+ newEntryTravel: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.travelFk"]',
+ newEntryCompany: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.companyFk"]',
+ saveNewEntry: 'vn-entry-create button[type="submit"]'
}
};
diff --git a/e2e/paths/02-client/05_add_address.spec.js b/e2e/paths/02-client/05_add_address.spec.js
index f16408b34..c946bc774 100644
--- a/e2e/paths/02-client/05_add_address.spec.js
+++ b/e2e/paths/02-client/05_add_address.spec.js
@@ -17,6 +17,7 @@ describe('Client Add address path', () => {
});
it(`should click on the add new address button to access to the new address form`, async() => {
+ await page.waitFor(500);
await page.waitToClick(selectors.clientAddresses.createAddress);
await page.waitForState('client.card.address.create');
});
diff --git a/e2e/paths/02-client/14_balance.spec.js b/e2e/paths/02-client/14_balance.spec.js
index 108f76710..6c16d455d 100644
--- a/e2e/paths/02-client/14_balance.spec.js
+++ b/e2e/paths/02-client/14_balance.spec.js
@@ -53,15 +53,28 @@ describe('Client balance path', () => {
expect(message.type).toBe('success');
});
- it('should check balance is now 0 and the company is now VNL becouse the user local settings were removed', async() => {
+ it('should edit the 1st line reference', async() => {
+ await page.waitToClick(selectors.clientBalance.firstLineReference);
+ await page.write(selectors.clientBalance.firstLineReferenceInput, 'Miscellaneous payment');
+ await page.keyboard.press('Enter');
+ const message = await page.waitForSnackbar();
+
+ expect(message.type).toBe('success');
+ });
+
+ it('should check balance is now 0, the reference was saved and the company is now VNL becouse the user local settings were removed', async() => {
await page.waitForSpinnerLoad();
let company = await page
.waitToGetProperty(selectors.clientBalance.company, 'value');
+ let reference = await page
+ .waitToGetProperty(selectors.clientBalance.firstLineReference, 'innerText');
+
let firstBalanceLine = await page
- .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
+ .waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
expect(company).toEqual('VNL');
+ expect(reference).toEqual('Miscellaneous payment');
expect(firstBalanceLine).toContain('0.00');
});
@@ -76,7 +89,7 @@ describe('Client balance path', () => {
it('should check balance is now -100', async() => {
let result = await page
- .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
+ .waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
expect(result).toContain('-€100.00');
});
@@ -92,7 +105,7 @@ describe('Client balance path', () => {
it('should check balance is now 50', async() => {
let result = await page
- .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
+ .waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
expect(result).toEqual('€50.00');
});
diff --git a/e2e/paths/03-worker/05_calendar.spec.js b/e2e/paths/03-worker/05_calendar.spec.js
new file mode 100644
index 000000000..801ff4151
--- /dev/null
+++ b/e2e/paths/03-worker/05_calendar.spec.js
@@ -0,0 +1,137 @@
+import selectors from '../../helpers/selectors.js';
+import getBrowser from '../../helpers/puppeteer';
+
+describe('Worker calendar path', () => {
+ let reasonableTimeBetweenClicks = 400;
+ let browser;
+ let page;
+ beforeAll(async() => {
+ browser = await getBrowser();
+ page = browser.page;
+ await page.loginAndModule('hr', 'worker');
+ await page.accessToSearchResult('Hank Pym');
+ await page.accessToSection('worker.card.calendar');
+ });
+
+ afterAll(async() => {
+ await browser.close();
+ });
+
+ describe('as hr', () => {
+ it('should check 5 total holidays have been used so far before testing anything', async() => {
+ const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
+
+ expect(result).toContain(' 5 ');
+ });
+
+ it('should set two days as holidays on the calendar', async() => {
+ await page.waitToClick(selectors.workerCalendar.holidays);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.absence);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.marchTwentyThird);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.halfHoliday);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayFourth);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.furlough);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayTwelfth);
+ await page.waitToClick(selectors.workerCalendar.mayThirteenth);
+ await page.waitToClick(selectors.workerCalendar.mayFourteenth);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.halfFurlough);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayEighth);
+ });
+
+ it('should check the total holidays increased by 1.5', async() => {
+ const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
+
+ expect(result).toContain(' 6.5 ');
+ });
+ });
+
+ describe(`as salesBoss`, () => {
+ it(`should log in and get to Hank's calendar`, async() => {
+ await page.loginAndModule('salesBoss', 'worker');
+ await page.accessToSearchResult('Hank Pym');
+ await page.accessToSection('worker.card.calendar');
+ });
+
+ it('should undo what was done here', async() => {
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.holidays);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.absence);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.marchTwentyThird);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.halfHoliday);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayFourth);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.furlough);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayTwelfth);
+ await page.waitToClick(selectors.workerCalendar.mayThirteenth);
+ await page.waitToClick(selectors.workerCalendar.mayFourteenth);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.halfFurlough);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.mayEighth);
+ });
+
+ it('should check the total holidays used are back to what it was', async() => {
+ const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
+
+ expect(result).toContain(' 5 ');
+ });
+ });
+
+ describe(`as Hank`, () => {
+ it(`should log in and get to his calendar`, async() => {
+ await page.loginAndModule('HankPym', 'worker');
+ await page.accessToSearchResult('Hank Pym');
+ await page.accessToSection('worker.card.calendar');
+ });
+
+ it('should make a futile attempt to add holidays', async() => {
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.holidays);
+ await page.waitFor(reasonableTimeBetweenClicks);
+ await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
+ });
+
+ it('should check the total holidays used are now the initial ones', async() => {
+ const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
+
+ expect(result).toContain(' 5 ');
+ });
+
+ it('should use the year selector to go to the previous year', async() => {
+ const date = new Date();
+ const lastYear = (date.getFullYear() - 1).toString();
+
+ await page.autocompleteSearch(selectors.workerCalendar.year, lastYear);
+
+ await page.waitFor(reasonableTimeBetweenClicks);
+ const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
+
+ expect(result).toContain(' 0 ');
+ });
+ });
+});
diff --git a/e2e/paths/04-item/10_index.spec.js b/e2e/paths/04-item/10_index.spec.js
index b4c4b636e..a6c0d4919 100644
--- a/e2e/paths/04-item/10_index.spec.js
+++ b/e2e/paths/04-item/10_index.spec.js
@@ -55,7 +55,7 @@ describe('Item index path', () => {
});
it('should mark all unchecked boxes to leave the index as it was', async() => {
- await page.waitFor(3000); // otherwise the snackbar doesnt appear some times.
+ await page.waitFor(500); // otherwise the snackbar doesnt appear some times.
await page.waitToClick(selectors.itemsIndex.fieldsToShowButton);
await page.waitToClick(selectors.itemsIndex.idCheckbox);
await page.waitToClick(selectors.itemsIndex.stemsCheckbox);
diff --git a/e2e/paths/04-item/13_request.spec.js b/e2e/paths/04-item/13_request.spec.js
index ab48e0c37..66cd7a0f5 100644
--- a/e2e/paths/04-item/13_request.spec.js
+++ b/e2e/paths/04-item/13_request.spec.js
@@ -31,7 +31,7 @@ describe('Item request path', () => {
it('should the status of the request should now be accepted', async() => {
let status = await page.waitToGetProperty(selectors.itemRequest.firstRequestStatus, 'innerText');
- expect(status).toContain('Aceptada');
+ expect(status).toContain('Accepted');
});
it('should now click on the second declain request icon then type the reason', async() => {
@@ -40,6 +40,6 @@ describe('Item request path', () => {
await page.respondToDialog('accept');
let status = await page.waitToGetProperty(selectors.itemRequest.firstRequestStatus, 'innerText');
- expect(status).toContain('Denegada');
+ expect(status).toContain('Denied');
});
});
diff --git a/e2e/paths/05-ticket/08_components.spec.js b/e2e/paths/05-ticket/08_components.spec.js
index ae631d5dd..ab2aa85b2 100644
--- a/e2e/paths/05-ticket/08_components.spec.js
+++ b/e2e/paths/05-ticket/08_components.spec.js
@@ -24,7 +24,6 @@ describe('Ticket List components path', () => {
await page.waitPropertyLength(selectors.ticketComponents.base, 'innerText', minLength);
const base = await page.waitToGetProperty(selectors.ticketComponents.base, 'innerText');
-
expect(base).toContain('Base');
expect(base.length).toBeGreaterThan(minLength);
});
diff --git a/e2e/paths/05-ticket/10_request.spec.js b/e2e/paths/05-ticket/10_request.spec.js
index afab9b9e9..c01964d2b 100644
--- a/e2e/paths/05-ticket/10_request.spec.js
+++ b/e2e/paths/05-ticket/10_request.spec.js
@@ -18,7 +18,7 @@ describe('Ticket purchase request path', () => {
});
it('should add a new request', async() => {
- await page.waitFor('.vn-popup', {hidden: true}),
+ await page.waitFor(500);
await page.waitToClick(selectors.ticketRequests.addRequestButton);
await page.write(selectors.ticketRequests.descriptionInput, 'New stuff');
await page.write(selectors.ticketRequests.quantity, '9');
diff --git a/e2e/paths/05-ticket/18_index_payout.spec.js b/e2e/paths/05-ticket/18_index_payout.spec.js
index b1dc06e51..37e5261dc 100644
--- a/e2e/paths/05-ticket/18_index_payout.spec.js
+++ b/e2e/paths/05-ticket/18_index_payout.spec.js
@@ -19,7 +19,7 @@ describe('Ticket index payout path', () => {
await page.waitForState('ticket.index');
});
- it('should check three tickets 2 of a clinet and 1 of another', async() => {
+ it('should check the second ticket from a client and 1 of another', async() => {
await page.keyboard.press('Enter');
await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox);
await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox);
diff --git a/e2e/paths/08-route/03_create.spec.js b/e2e/paths/08-route/03_create.spec.js
index 80c0071b6..7c6c3f75d 100644
--- a/e2e/paths/08-route/03_create.spec.js
+++ b/e2e/paths/08-route/03_create.spec.js
@@ -17,6 +17,7 @@ describe('Route create path', () => {
describe('as employee', () => {
it('should click on the add new route button and open the creation form', async() => {
+ await page.waitFor(500);
await page.waitToClick(selectors.routeIndex.addNewRouteButton);
await page.waitForState('route.create');
});
diff --git a/e2e/paths/09-invoice-out/02_descriptor.spec.js b/e2e/paths/09-invoice-out/02_descriptor.spec.js
index ade121a8b..cb60fd4a7 100644
--- a/e2e/paths/09-invoice-out/02_descriptor.spec.js
+++ b/e2e/paths/09-invoice-out/02_descriptor.spec.js
@@ -18,6 +18,7 @@ describe('InvoiceOut descriptor path', () => {
describe('as Administrative', () => {
it('should search for tickets with an specific invoiceOut', async() => {
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
+ await page.clearInput(selectors.ticketsIndex.advancedSearchDaysOnward);
await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222');
await page.waitToClick(selectors.ticketsIndex.advancedSearchButton);
await page.waitForState('ticket.card.summary');
@@ -63,7 +64,7 @@ describe('InvoiceOut descriptor path', () => {
await page.waitForState('ticket.index');
});
- it('should search for tickets with an specific invoiceOut to find no results', async() => {
+ it('should search now for tickets with an specific invoiceOut to find no results', async() => {
await page.doSearch('T2222222');
const nResults = await page.countElement(selectors.ticketsIndex.searchResult);
diff --git a/e2e/paths/11-zone/02_descriptor.spec.js b/e2e/paths/11-zone/02_descriptor.spec.js
new file mode 100644
index 000000000..1de84d601
--- /dev/null
+++ b/e2e/paths/11-zone/02_descriptor.spec.js
@@ -0,0 +1,42 @@
+import selectors from '../../helpers/selectors.js';
+import getBrowser from '../../helpers/puppeteer';
+
+describe('Zone descriptor path', () => {
+ let browser;
+ let page;
+
+ beforeAll(async() => {
+ browser = await getBrowser();
+ page = browser.page;
+ await page.loginAndModule('deliveryBoss', 'zone');
+ await page.accessToSearchResult('13');
+ });
+
+ afterAll(async() => {
+ await browser.close();
+ });
+
+ it('should eliminate the zone using the descriptor option', async() => {
+ await page.waitToClick(selectors.zoneDescriptor.menu);
+ await page.waitToClick(selectors.zoneDescriptor.deleteZone);
+ await page.respondToDialog('accept');
+ await page.waitForState('zone.index');
+ });
+
+ it('should search for the deleted zone to find no results', async() => {
+ await page.doSearch('13');
+ const count = await page.countElement(selectors.zoneIndex.searchResult);
+
+ expect(count).toEqual(0);
+ });
+
+ it('should check the ticket whom lost the zone and see evidence on the logs', async() => {
+ await page.waitToClick(selectors.globalItems.homeButton);
+ await page.selectModule('ticket');
+ await page.accessToSearchResult('20');
+ await page.accessToSection('ticket.card.log');
+ const lastChanges = await page.waitToGetProperty(selectors.ticketLog.changes, 'innerText');
+
+ expect(lastChanges).toContain('Arreglar');
+ });
+});
diff --git a/e2e/paths/12-entry/01_summary.spec.js b/e2e/paths/12-entry/01_summary.spec.js
index e57654f94..a6ac8dab1 100644
--- a/e2e/paths/12-entry/01_summary.spec.js
+++ b/e2e/paths/12-entry/01_summary.spec.js
@@ -9,7 +9,7 @@ describe('Entry summary path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('buyer', 'entry');
- await page.waitToClick('vn-entry-index vn-tbody > a:nth-child(2)');
+ await page.accessToSearchResult('4');
});
afterAll(async() => {
@@ -30,7 +30,7 @@ describe('Entry summary path', () => {
it('should display some entry details like the reference', async() => {
const result = await page.waitToGetProperty(selectors.entrySummary.reference, 'innerText');
- expect(result).toContain('Movement 2');
+ expect(result).toContain('Movement 4');
});
it('should display other entry details like the confirmed', async() => {
@@ -38,4 +38,10 @@ describe('Entry summary path', () => {
expect(result).toContain('unchecked');
});
+
+ it('should display all buys for the entry', async() => {
+ const result = await page.countElement(selectors.entrySummary.anyBuyLine);
+
+ expect(result).toEqual(4);
+ });
});
diff --git a/e2e/paths/12-entry/03_latestBuys.spec.js b/e2e/paths/12-entry/03_latestBuys.spec.js
new file mode 100644
index 000000000..e3cfadbcc
--- /dev/null
+++ b/e2e/paths/12-entry/03_latestBuys.spec.js
@@ -0,0 +1,46 @@
+import selectors from '../../helpers/selectors.js';
+import getBrowser from '../../helpers/puppeteer';
+
+describe('Entry lastest buys path', () => {
+ let browser;
+ let page;
+
+ beforeAll(async() => {
+ browser = await getBrowser();
+ page = browser.page;
+ await page.loginAndModule('buyer', 'entry');
+ });
+
+ afterAll(async() => {
+ await browser.close();
+ });
+
+ it('should access the latest buys seccion and search not seeing the edit buys button yet', async() => {
+ await page.waitToClick(selectors.entryLatestBuys.latestBuysSectionButton);
+ await page.waitFor(250);
+ await page.keyboard.press('Enter');
+ await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: false});
+ });
+
+ it('should select all lines but one and then check the edit buys button appears', async() => {
+ await page.waitToClick(selectors.entryLatestBuys.allBuysCheckBox);
+ await page.waitToClick(selectors.entryLatestBuys.secondBuyCheckBox);
+ await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: true});
+ });
+
+ it('should open the edit dialog', async() => {
+ await page.waitToClick(selectors.entryLatestBuys.editBuysButton);
+ await page.waitForSelector(selectors.entryLatestBuys.fieldAutocomplete, {visible: true});
+ });
+
+ it('should search for the "Description" field and type a new description for the items in each selected buy', async() => {
+ await page.autocompleteSearch(selectors.entryLatestBuys.fieldAutocomplete, 'Description');
+ await page.write(selectors.entryLatestBuys.newValueInput, 'Crafted item');
+ await page.waitToClick(selectors.entryLatestBuys.acceptEditBuysDialog);
+ });
+
+ it('should navigate to the entry.buy section by clicking one of the buys', async() => {
+ await page.waitToClick(selectors.entryLatestBuys.firstBuy);
+ await page.waitForState('entry.card.buy');
+ });
+});
diff --git a/e2e/paths/12-entry/04_create.spec.js b/e2e/paths/12-entry/04_create.spec.js
new file mode 100644
index 000000000..90dac618a
--- /dev/null
+++ b/e2e/paths/12-entry/04_create.spec.js
@@ -0,0 +1,33 @@
+import selectors from '../../helpers/selectors.js';
+import getBrowser from '../../helpers/puppeteer';
+
+describe('Entry create path', () => {
+ let browser;
+ let page;
+
+ beforeAll(async() => {
+ browser = await getBrowser();
+ page = browser.page;
+ await page.loginAndModule('buyer', 'entry');
+ });
+
+ afterAll(async() => {
+ await browser.close();
+ });
+
+ it('should click the create entry button to open the form', async() => {
+ await page.waitToClick(selectors.entryIndex.createEntryButton);
+ await page.waitForState('entry.create');
+ });
+
+ it('should fill the form to create a valid entry', async() => {
+ await page.autocompleteSearch(selectors.entryIndex.newEntrySupplier, '2');
+ await page.autocompleteSearch(selectors.entryIndex.newEntryTravel, 'Warehouse Three');
+ await page.autocompleteSearch(selectors.entryIndex.newEntryCompany, 'ORN');
+ await page.waitToClick(selectors.entryIndex.saveNewEntry);
+ });
+
+ it('should be redirected to entry basic data', async() => {
+ await page.waitForState('entry.card.basicData');
+ });
+});
diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js
index 02d2a4798..17bf52941 100644
--- a/front/core/components/calendar/index.js
+++ b/front/core/components/calendar/index.js
@@ -135,7 +135,10 @@ export default class Calendar extends FormInput {
$days: [day],
$type: 'day'
});
- // this.repaint();
+
+ // Repaint only if 'selection' event is not listening
+ if (!this.$events || this.$events && !this.$events['selection'])
+ this.repaint();
}
/*
diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js
index 90c14b7e3..db74848a6 100755
--- a/front/core/components/contextmenu/index.js
+++ b/front/core/components/contextmenu/index.js
@@ -67,13 +67,13 @@ export default class Contextmenu {
get cell() {
if (!this.target) return null;
- return this.target.closest('vn-td, .vn-td');
+ return this.target.closest('vn-td, .vn-td, vn-td-editable');
}
get cellIndex() {
if (!this.row) return null;
- const cells = this.row.querySelectorAll('vn-td, .vn-td');
+ const cells = this.row.querySelectorAll('vn-td, .vn-td, vn-td-editable');
return Array.from(cells).findIndex(
cellItem => cellItem == this.cell
);
diff --git a/front/core/components/multi-check/multi-check.html b/front/core/components/multi-check/multi-check.html
index 86c35d6d0..fb950aaff 100644
--- a/front/core/components/multi-check/multi-check.html
+++ b/front/core/components/multi-check/multi-check.html
@@ -1,5 +1,5 @@
\ No newline at end of file
diff --git a/front/core/components/multi-check/multi-check.js b/front/core/components/multi-check/multi-check.js
index 3de9b4c71..d8fda6404 100644
--- a/front/core/components/multi-check/multi-check.js
+++ b/front/core/components/multi-check/multi-check.js
@@ -15,6 +15,19 @@ export default class MultiCheck extends FormInput {
this._checked = false;
this.checkField = 'checked';
this.isIntermediate = false;
+ this.mayusEnabled = false;
+ this.window.addEventListener('keydown', event => {
+ if (event.key === 'Shift')
+ this.mayusEnabled = true;
+ });
+ this.window.addEventListener('keyup', event => {
+ if (event.key === 'Shift')
+ this.mayusEnabled = false;
+ });
+ this.window.addEventListener('selectstart', event => {
+ if (this.mayusEnabled)
+ event.preventDefault();
+ });
}
/**
@@ -28,7 +41,7 @@ export default class MultiCheck extends FormInput {
/**
* Sets the array model instance
- * Changes intermediate property for
+ * Changes indeterminate property for
* the check component
*
* @param {ArrayModel} value - Array model instance
@@ -37,8 +50,17 @@ export default class MultiCheck extends FormInput {
this._model = value;
if (value) {
- value.on('rowChange', () => {
- this.isIntermediate = !this.areAllUnchecked() && !this.areAllChecked();
+ value.on('rowChange', row => {
+ this.isIndeterminate = !this.areAllUnchecked() && !this.areAllChecked();
+
+ if (this.mayusEnabled) {
+ this.currentSelection = row.obj.$orgIndex;
+
+ if (this.lastSelection != undefined && this.currentSelection != undefined)
+ this.setSelection(row.value, this.lastSelection, this.currentSelection);
+ }
+
+ this.lastSelection = row.obj.$orgIndex;
if (this.areAllChecked())
this._checked = true;
@@ -52,6 +74,20 @@ export default class MultiCheck extends FormInput {
}
}
+ setSelection(value, from, to) {
+ let start = from;
+ let end = to;
+
+ if (from > to) {
+ start = to;
+ end = from;
+ }
+
+ const data = this.model.data;
+ for (let i = start; i <= end; i++)
+ data[i].checked = value;
+ }
+
/**
* Gets current check state
*/
diff --git a/front/core/components/multi-check/multi-check.spec.js b/front/core/components/multi-check/multi-check.spec.js
index e49c68d2b..c8069da3c 100644
--- a/front/core/components/multi-check/multi-check.spec.js
+++ b/front/core/components/multi-check/multi-check.spec.js
@@ -62,7 +62,7 @@ describe('Component vnMultiCheck', () => {
});
describe('areAllChecked()', () => {
- it(`should set return true if all elements are checked`, () => {
+ it(`should return true if all elements are checked`, () => {
const data = controller.model.data;
data[0].checked = true;
data[1].checked = true;
@@ -71,7 +71,7 @@ describe('Component vnMultiCheck', () => {
expect(controller.areAllChecked()).toBeTruthy();
});
- it(`should set return false if not all elements are checked`, () => {
+ it(`should return false if not all elements are checked`, () => {
const data = controller.model.data;
data[0].checked = true;
data[1].checked = false;
@@ -82,7 +82,7 @@ describe('Component vnMultiCheck', () => {
});
describe('areAllUnchecked()', () => {
- it(`should set return true if all elements are unchecked`, () => {
+ it(`should return true if all elements are unchecked`, () => {
const data = controller.model.data;
data[0].checked = false;
data[1].checked = false;
@@ -91,7 +91,7 @@ describe('Component vnMultiCheck', () => {
expect(controller.areAllUnchecked()).toBeTruthy();
});
- it(`should set return false if not all elements are unchecked`, () => {
+ it(`should return false if not all elements are unchecked`, () => {
const data = controller.model.data;
data[0].checked = false;
data[1].checked = true;
@@ -100,4 +100,36 @@ describe('Component vnMultiCheck', () => {
expect(controller.areAllUnchecked()).toBeFalsy();
});
});
+
+ describe('setSelection()', () => {
+ it(`should check all elements between the index range`, () => {
+ controller.setSelection(true, 0, 2);
+
+ const data = controller.model.data;
+ const firstRow = data[0];
+ const secondRow = data[1];
+ const thirdRow = data[2];
+
+ expect(firstRow.checked).toBeTruthy();
+ expect(secondRow.checked).toBeTruthy();
+ expect(thirdRow.checked).toBeTruthy();
+ });
+
+ it(`should uncheck all elements between the index range`, () => {
+ const data = controller.model.data;
+ const firstRow = data[0];
+ const secondRow = data[1];
+ const thirdRow = data[2];
+
+ firstRow.checked = true;
+ secondRow.checked = true;
+ thirdRow.checked = true;
+
+ controller.setSelection(false, 0, 1);
+
+ expect(firstRow.checked).toBeFalsy();
+ expect(secondRow.checked).toBeFalsy();
+ expect(thirdRow.checked).toBeTruthy();
+ });
+ });
});
diff --git a/front/core/components/radio/style.scss b/front/core/components/radio/style.scss
index 2ee037e65..dfb3ac955 100644
--- a/front/core/components/radio/style.scss
+++ b/front/core/components/radio/style.scss
@@ -1,6 +1,7 @@
@import "variables";
.vn-radio {
+
& > .btn {
border-radius: 50%;
@@ -25,4 +26,8 @@
&.disabled.checked > .btn > .mark {
background-color: $color-font-secondary;
}
+ > div {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
}
diff --git a/front/core/components/searchbar/searchbar.js b/front/core/components/searchbar/searchbar.js
index 9720916ee..0b7bd8cd2 100644
--- a/front/core/components/searchbar/searchbar.js
+++ b/front/core/components/searchbar/searchbar.js
@@ -189,7 +189,7 @@ export default class Searchbar extends Component {
}
doSearch(filter, source) {
- if (filter === this.filter) return;
+ if (filter === this.filter && source != 'state') return;
let promise = this.onSearch({$params: filter});
promise = promise || this.$q.resolve();
promise.then(data => this.onFilter(filter, source, data));
diff --git a/front/core/components/table/index.js b/front/core/components/table/index.js
index a61b97485..eadb10cb5 100644
--- a/front/core/components/table/index.js
+++ b/front/core/components/table/index.js
@@ -7,7 +7,6 @@ export default class Table {
this.table = $element[0];
this.field = null;
this.order = null;
- this.autoLoad = true;
}
setOrder(field, order) {
@@ -25,9 +24,7 @@ export default class Table {
}
$onChanges() {
- // FIXME: The autoload property should be removed from vnTable
- // because it's already implemented at vnModel
- if (this.autoLoad && this.model && !this.model.data)
+ if (this.model && !this.model.data)
this.applyOrder();
}
diff --git a/front/core/components/toggle/index.html b/front/core/components/toggle/index.html
index 3ec11242e..b41f837a2 100644
--- a/front/core/components/toggle/index.html
+++ b/front/core/components/toggle/index.html
@@ -2,6 +2,6 @@
-
+
{{::$ctrl.label}}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/front/core/directives/index.js b/front/core/directives/index.js
index 4377afe8c..af05c9b38 100644
--- a/front/core/directives/index.js
+++ b/front/core/directives/index.js
@@ -11,7 +11,7 @@ import './visible-by';
import './bind';
import './repeat-last';
import './title';
-import './uvc';
+import './smart-table';
import './droppable';
import './http-click';
import './http-submit';
diff --git a/front/core/directives/uvc.html b/front/core/directives/smart-table.html
similarity index 77%
rename from front/core/directives/uvc.html
rename to front/core/directives/smart-table.html
index 9de13b675..6808b5618 100644
--- a/front/core/directives/uvc.html
+++ b/front/core/directives/smart-table.html
@@ -1,12 +1,13 @@
-
+
+ class="vn-pt-sm"
+ icon="more_vert"
+ ng-click="$ctrl.showSmartTable($event)">
-
@@ -24,6 +25,6 @@
-
+
diff --git a/front/core/directives/uvc.js b/front/core/directives/smart-table.js
similarity index 70%
rename from front/core/directives/uvc.js
rename to front/core/directives/smart-table.js
index e464a93ab..08d1b6463 100644
--- a/front/core/directives/uvc.js
+++ b/front/core/directives/smart-table.js
@@ -1,23 +1,28 @@
import ngModule from '../module';
-import template from './uvc.html';
-import './uvc.scss';
+import template from './smart-table.html';
+import './smart-table.scss';
+/**
+ * Directive to hide/show selected columns of a table, don't use with rowspan.
+ * Property smart-table-ignore ignores one or more vn-th with prop field.
+ */
directive.$inject = ['$http', '$compile', 'vnApp', '$translate'];
export function directive($http, $compile, vnApp, $translate) {
function getHeaderList($element, $scope) {
- let allHeaders = $element[0].querySelectorAll(`vn-th[field], vn-th[th-id]`);
- let headerList = Array.from(allHeaders);
+ let filtrableHeaders = $element[0].querySelectorAll('vn-th[field]:not([smart-table-ignore])');
+ let headerList = Array.from(filtrableHeaders);
let ids = [];
let titles = {};
headerList.forEach(header => {
- let id = header.getAttribute('th-id') || header.getAttribute('field');
+ let id = header.getAttribute('field');
ids.push(id);
titles[id] = header.innerText || id.charAt(0).toUpperCase() + id.slice(1);
});
$scope.fields = ids;
$scope.titles = titles;
+ $scope.allHeaders = Array.from($element[0].querySelectorAll('vn-th'));
return headerList;
}
@@ -38,34 +43,33 @@ export function directive($http, $compile, vnApp, $translate) {
Object.keys(userConfig.configuration).forEach(key => {
let index;
if (userConfig.configuration[key] === false) {
- index = headerList.findIndex(el => {
- return (el.getAttribute('th-id') == key || el.getAttribute('field') == key);
+ index = $scope.allHeaders.findIndex(el => {
+ return el.getAttribute('field') == key;
});
- let baseSelector = `vn-table[vn-uvc=${userConfig.tableCode}] > div`;
+ let baseSelector = `vn-table[vn-smart-table=${userConfig.tableCode}] > div`;
selectors.push(`${baseSelector} vn-thead > vn-tr > vn-th:nth-child(${index + 1})`);
selectors.push(`${baseSelector} vn-tbody > vn-tr > vn-td:nth-child(${index + 1})`);
selectors.push(`${baseSelector} vn-tbody > .vn-tr > vn-td:nth-child(${index + 1})`);
}
});
-
- if (document.querySelector('style[id="uvc"]')) {
- let child = document.querySelector('style[id="uvc"]');
+ if (document.querySelector('style[id="smart-table"]')) {
+ let child = document.querySelector('style[id="smart-table"]');
child.parentNode.removeChild(child);
}
if (selectors.length) {
let rule = selectors.join(', ') + '{display: none;}';
$scope.css = document.createElement('style');
- $scope.css.setAttribute('id', 'uvc');
+ $scope.css.setAttribute('id', 'smart-table');
document.head.appendChild($scope.css);
$scope.css.appendChild(document.createTextNode(rule));
}
$scope.$on('$destroy', () => {
- if ($scope.css && document.querySelector('style[id="uvc"]')) {
- let child = document.querySelector('style[id="uvc"]');
+ if ($scope.css && document.querySelector('style[id="smart-table"]')) {
+ let child = document.querySelector('style[id="smart-table"]');
child.parentNode.removeChild(child);
}
});
@@ -80,13 +84,13 @@ export function directive($http, $compile, vnApp, $translate) {
restrict: 'A',
link: async function($scope, $element, $attrs) {
let cTemplate = $compile(template)($scope)[0];
- $scope.$ctrl.showUvc = event => {
+ $scope.$ctrl.showSmartTable = event => {
event.preventDefault();
event.stopImmediatePropagation();
- $scope.uvc.show();
+ $scope.smartTable.show(event.target);
};
- let tableCode = $attrs.vnUvc.trim();
+ let tableCode = $attrs.vnSmartTable.trim();
let headerList = getHeaderList($element, $scope);
let defaultConfigView = {tableCode: tableCode, configuration: {}};
@@ -98,16 +102,16 @@ export function directive($http, $compile, vnApp, $translate) {
addHideClass($scope, headerList, config);
- let table = document.querySelector(`vn-table[vn-uvc=${tableCode}]`);
+ let table = document.querySelector(`vn-table[vn-smart-table=${tableCode}]`);
table.insertBefore(cTemplate, table.firstChild);
$scope.$ctrl.saveConfiguration = async tableConfiguration => {
let newConfig = await saveConfiguration(tableConfiguration);
vnApp.showSuccess($translate.instant('Data saved!'));
addHideClass($scope, headerList, newConfig.data);
- $scope.uvc.hide();
+ $scope.smartTable.hide();
};
}
};
}
-ngModule.directive('vnUvc', directive);
+ngModule.directive('vnSmartTable', directive);
diff --git a/front/core/directives/uvc.scss b/front/core/directives/smart-table.scss
similarity index 76%
rename from front/core/directives/uvc.scss
rename to front/core/directives/smart-table.scss
index 0cdf0ba1a..a156c060b 100644
--- a/front/core/directives/uvc.scss
+++ b/front/core/directives/smart-table.scss
@@ -1,4 +1,4 @@
-vn-table vn-dialog[vn-id="uvc"]{
+vn-table vn-popover[vn-id="smart-table"]{
& > div {
min-width: 288px;
align-items: center;
diff --git a/front/core/styles/icons/salixfont.css b/front/core/styles/icons/salixfont.css
index 8805815e8..52a2308b4 100644
--- a/front/core/styles/icons/salixfont.css
+++ b/front/core/styles/icons/salixfont.css
@@ -22,7 +22,9 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
-
+.icon-latestBuys:before {
+ content: "\e95f";
+}
.icon-zone:before {
content: "\e95d";
}
diff --git a/front/core/styles/icons/salixfont.svg b/front/core/styles/icons/salixfont.svg
index 9ca57000d..7e8695d63 100644
--- a/front/core/styles/icons/salixfont.svg
+++ b/front/core/styles/icons/salixfont.svg
@@ -102,6 +102,7 @@
+
diff --git a/front/core/styles/icons/salixfont.ttf b/front/core/styles/icons/salixfont.ttf
index ab5de35ff..608dd7c80 100644
Binary files a/front/core/styles/icons/salixfont.ttf and b/front/core/styles/icons/salixfont.ttf differ
diff --git a/front/core/styles/icons/salixfont.woff b/front/core/styles/icons/salixfont.woff
index d9ade1e31..ecea37f50 100644
Binary files a/front/core/styles/icons/salixfont.woff and b/front/core/styles/icons/salixfont.woff differ
diff --git a/gulpfile.js b/gulpfile.js
index 096c44584..40590d7c2 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -403,8 +403,8 @@ module.exports = {
back,
backOnly,
backWatch,
- backTestOnce,
backTest,
+ backTestOnce,
e2e,
i,
install,
diff --git a/jest.config.js b/jest.config.js
index facd1c8a7..874d9ac0b 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -70,7 +70,8 @@ module.exports = {
`front`,
`modules`,
`front/node_modules`,
- `node_modules`
+ `node_modules`,
+ `print`
],
// An array of file extensions your modules use
@@ -153,6 +154,7 @@ module.exports = {
// The glob patterns Jest uses to detect test files
testMatch: [
'**/front/**/*.spec.js',
+ '**/print/**/*.spec.js',
// 'loopback/**/*.spec.js',
// 'modules/*/back/**/*.spec.js'
// "**/__tests__/**/*.[jt]s?(x)",
diff --git a/loopback/locale/es.json b/loopback/locale/es.json
index 9951df4a5..d28cceb41 100644
--- a/loopback/locale/es.json
+++ b/loopback/locale/es.json
@@ -134,5 +134,5 @@
"This ticket is deleted": "Este ticket está eliminado",
"A travel with this data already exists": "Ya existe un travel con estos datos",
"This thermograph id already exists": "La id del termógrafo ya existe",
- "ORDER_ALREADY_CONFIRMED": "ORDER_ALREADY_CONFIRMED"
+ "Choose a date range or days forward": "Selecciona un rango de fechas o días en adelante"
}
\ No newline at end of file
diff --git a/modules/claim/back/methods/claim/filter.js b/modules/claim/back/methods/claim/filter.js
index 1caa120be..7ba89089a 100644
--- a/modules/claim/back/methods/claim/filter.js
+++ b/modules/claim/back/methods/claim/filter.js
@@ -106,7 +106,7 @@ module.exports = Self => {
let stmt;
stmt = new ParameterizedSQL(
- `SELECT cl.id, c.name, cl.clientFk, cl.workerFk, u.nickName, cs.description, cl.created
+ `SELECT cl.id, c.name, cl.clientFk, cl.workerFk, u.name AS userName, cs.description, cl.created
FROM claim cl
LEFT JOIN client c ON c.id = cl.clientFk
LEFT JOIN worker w ON w.id = cl.workerFk
diff --git a/modules/claim/back/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js
index 61b8085d3..b7156feef 100644
--- a/modules/claim/back/methods/claim/updateClaim.js
+++ b/modules/claim/back/methods/claim/updateClaim.js
@@ -36,7 +36,7 @@ module.exports = Self => {
relation: 'client',
scope: {
include: {
- relation: 'salesPerson'
+ relation: 'salesPersonUser'
}
}
}
@@ -53,7 +53,7 @@ module.exports = Self => {
const updatedClaim = await claim.updateAttributes(data);
// Get sales person from claim client
- const salesPerson = claim.client().salesPerson();
+ const salesPerson = claim.client().salesPersonUser();
if (salesPerson && changedHasToPickUp && updatedClaim.hasToPickUp) {
const origin = ctx.req.headers.origin;
const message = $t('Claim will be picked', {
diff --git a/modules/claim/front/card/index.js b/modules/claim/front/card/index.js
index ccd78a271..747eea9e7 100644
--- a/modules/claim/front/card/index.js
+++ b/modules/claim/front/card/index.js
@@ -12,7 +12,7 @@ class Controller extends ModuleCard {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
@@ -34,17 +34,7 @@ class Controller extends ModuleCard {
scope: {
fields: ['salesPersonFk', 'name', 'email'],
include: {
- relation: 'salesPerson',
- scope: {
- fields: ['userFk'],
- include: {
- relation: 'user',
- scope: {
- fields: ['nickname']
- }
- }
- }
-
+ relation: 'salesPersonUser'
}
}
}
diff --git a/modules/claim/front/descriptor/index.html b/modules/claim/front/descriptor/index.html
index dcd103247..d6fb75ac5 100644
--- a/modules/claim/front/descriptor/index.html
+++ b/modules/claim/front/descriptor/index.html
@@ -32,20 +32,32 @@
value="{{$ctrl.claim.created | date: 'dd/MM/yyyy HH:mm'}}">
+ label="Salesperson">
+
+ {{$ctrl.claim.client.salesPersonUser.name}}
+
+ label="Attended by">
+
+ {{$ctrl.claim.worker.user.name}}
+
+ label="Ticket">
+
+ {{$ctrl.claim.ticketFk}}
+
@@ -79,3 +91,9 @@
question="Delete claim"
message="Are you sure you want to delete this claim?">
+
+
+
+
\ No newline at end of file
diff --git a/modules/claim/front/index/index.html b/modules/claim/front/index/index.html
index 42ae87971..d4f031eff 100644
--- a/modules/claim/front/index/index.html
+++ b/modules/claim/front/index/index.html
@@ -34,7 +34,7 @@
- {{::claim.nickName}}
+ {{::claim.userName}}
diff --git a/modules/client/back/methods/client/consumption.js b/modules/client/back/methods/client/consumption.js
index cb5b39c29..8430c4661 100644
--- a/modules/client/back/methods/client/consumption.js
+++ b/modules/client/back/methods/client/consumption.js
@@ -17,20 +17,20 @@ module.exports = Self => {
type: 'String',
description: `If it's and integer searchs by id, otherwise it searchs by name`
}, {
- arg: 'itemFk',
- type: 'Integer',
+ arg: 'itemId',
+ type: 'Number',
description: 'Item id'
}, {
- arg: 'categoryFk',
- type: 'Integer',
+ arg: 'categoryId',
+ type: 'Number',
description: 'Category id'
}, {
- arg: 'typeFk',
- type: 'Integer',
+ arg: 'typeId',
+ type: 'Number',
description: 'Item type id',
}, {
- arg: 'buyerFk',
- type: 'Integer',
+ arg: 'buyerId',
+ type: 'Number',
description: 'Buyer id'
}, {
arg: 'from',
@@ -75,6 +75,10 @@ module.exports = Self => {
return {'it.id': value};
case 'buyerId':
return {'it.workerFk': value};
+ case 'from':
+ return {'t.shipped': {gte: value}};
+ case 'to':
+ return {'t.shipped': {lte: value}};
}
});
filter = mergeFilters(filter, {where});
diff --git a/modules/client/back/methods/client/specs/consumption.spec.js b/modules/client/back/methods/client/specs/consumption.spec.js
index e7a42a8da..30a0572b3 100644
--- a/modules/client/back/methods/client/specs/consumption.spec.js
+++ b/modules/client/back/methods/client/specs/consumption.spec.js
@@ -37,4 +37,24 @@ describe('client consumption() filter', () => {
expect(secondRow.quantity).toEqual(15);
expect(thirdRow.quantity).toEqual(20);
});
+
+ it('should return a list of tickets from the item id 4', async() => {
+ const ctx = {req: {accessToken: {userId: 9}},
+ args: {
+ itemId: 4
+ }
+ };
+ const filter = {
+ where: {
+ clientFk: 101
+ },
+ order: 'itemTypeFk, itemName, itemSize'
+ };
+ const result = await app.models.Client.consumption(ctx, filter);
+
+ const expectedItemId = 4;
+ const firstRow = result[0];
+
+ expect(firstRow.itemFk).toEqual(expectedItemId);
+ });
});
diff --git a/modules/client/back/methods/client/summary.js b/modules/client/back/methods/client/summary.js
index 155d95d9e..8a132665f 100644
--- a/modules/client/back/methods/client/summary.js
+++ b/modules/client/back/methods/client/summary.js
@@ -48,7 +48,7 @@ module.exports = Self => {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/client/back/methods/receipt/filter.js b/modules/client/back/methods/receipt/filter.js
index 532d72811..b32249d4b 100644
--- a/modules/client/back/methods/receipt/filter.js
+++ b/modules/client/back/methods/receipt/filter.js
@@ -42,11 +42,11 @@ module.exports = Self => {
r.workerFk,
c.code company,
r.created,
- r.invoiceFk ref,
+ r.invoiceFk description,
NULL debit,
r.amountPaid credit,
r.bankFk,
- u.nickname userNickname,
+ u.name userName,
r.clientFk,
FALSE hasPdf,
FALSE isInvoice
diff --git a/modules/client/front/address/index/index.html b/modules/client/front/address/index/index.html
index bd5d10fd2..51b310128 100644
--- a/modules/client/front/address/index/index.html
+++ b/modules/client/front/address/index/index.html
@@ -46,7 +46,11 @@
style="overflow: hidden; min-width: 14em;">
{{::address.nickname}} - #{{::address.id}}
{{::address.street}}
- {{::address.city}}, {{::address.province.name}}
+
+ {{::address.postalCode}} -
+ {{::address.city}},
+ {{::address.province.name}}
+
{{::address.phone}}
,
{{::address.mobile}}
diff --git a/modules/client/front/address/index/index.js b/modules/client/front/address/index/index.js
index ea6a9f6b9..3a2b5dfa8 100644
--- a/modules/client/front/address/index/index.js
+++ b/modules/client/front/address/index/index.js
@@ -16,7 +16,8 @@ class Controller extends Section {
'provinceFk',
'phone',
'mobile',
- 'isEqualizated'
+ 'isEqualizated',
+ 'postalCode'
],
order: [
'isDefaultAddress DESC',
diff --git a/modules/client/front/balance/create/index.html b/modules/client/front/balance/create/index.html
index 506e86f4b..6cfdc0666 100644
--- a/modules/client/front/balance/create/index.html
+++ b/modules/client/front/balance/create/index.html
@@ -17,11 +17,17 @@
+ fields="['accountingTypeFk']"
+ include="{relation: 'accountingType'}"
+ order="id"
+ ng-model="$ctrl.receipt.bankFk"
+ search-function="{or: [{id: $search}, {bank: {like: '%'+ $search +'%'}}]}"
+ selection="$ctrl.bankSelection">
+ {{id}}: {{bank}}
+
+
+
+
diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js
index 880774f55..8b01cab4a 100644
--- a/modules/client/front/balance/create/index.js
+++ b/modules/client/front/balance/create/index.js
@@ -50,6 +50,19 @@ class Controller extends Dialog {
return this.receipt.description;
}
+ get bankSelection() {
+ return this._bankSelection;
+ }
+
+ set bankSelection(value) {
+ this._bankSelection = value;
+
+ if (value) {
+ const accountingType = value.accountingType;
+ this.receipt.description = accountingType && accountingType.receiptDescription;
+ }
+ }
+
getAmountPaid() {
const filter = {
where: {
diff --git a/modules/client/front/balance/create/index.spec.js b/modules/client/front/balance/create/index.spec.js
new file mode 100644
index 000000000..11fdb1040
--- /dev/null
+++ b/modules/client/front/balance/create/index.spec.js
@@ -0,0 +1,76 @@
+import './index';
+
+describe('Client', () => {
+ describe('Component vnClientBalancCreate', () => {
+ let controller;
+ let $httpBackend;
+ let $httpParamSerializer;
+
+ beforeEach(ngModule('client'));
+
+ beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
+ $httpBackend = _$httpBackend_;
+ $httpParamSerializer = _$httpParamSerializer_;
+ let $scope = $rootScope.$new();
+ const $element = angular.element(' ');
+ const $transclude = {
+ $$boundTransclude: {
+ $$slots: []
+ }
+ };
+ controller = $componentController('vnClientBalanceCreate', {$element, $scope, $transclude});
+ controller.receipt = {
+ clientFk: 101,
+ companyFk: 442
+ };
+ }));
+
+ describe('bankSelection() setter', () => {
+ it('should set the receipt description property', () => {
+ controller.bankSelection = {
+ id: 1,
+ bank: 'Cash',
+ accountingType: {
+ id: 2,
+ receiptDescription: 'Cash'
+ }
+ };
+
+ expect(controller.receipt.description).toEqual('Cash');
+ });
+ });
+
+ describe('getAmountPaid()', () => {
+ it('should make an http GET query and then set the receipt amountPaid property', () => {
+ controller.$params = {id: 101};
+ const receipt = controller.receipt;
+ const filter = {
+ where: {
+ clientFk: 101,
+ companyFk: 442
+ }
+ };
+ const serializedParams = $httpParamSerializer({filter});
+ $httpBackend.expect('GET', `ClientRisks?${serializedParams}`,).respond([{amount: 20}]);
+ controller.getAmountPaid();
+ $httpBackend.flush();
+
+ expect(receipt.amountPaid).toEqual(20);
+ });
+ });
+
+ describe('responseHandler()', () => {
+ it('should make an http POST query and then call to the parent responseHandler() method', () => {
+ jest.spyOn(controller.vnApp, 'showSuccess');
+
+ controller.$params = {id: 101};
+
+ $httpBackend.expect('POST', `Receipts`,).respond({id: 1});
+ controller.responseHandler('accept');
+ $httpBackend.flush();
+
+ expect(controller.vnApp.showSuccess).toHaveBeenCalled();
+ });
+ });
+ });
+});
diff --git a/modules/client/front/balance/index/index.html b/modules/client/front/balance/index/index.html
index 1ad7efad9..cf0c07cfc 100644
--- a/modules/client/front/balance/index/index.html
+++ b/modules/client/front/balance/index/index.html
@@ -68,25 +68,33 @@
- {{::balance.userNickname}}
+ {{::balance.userName}}
-
-
-
- {{'BILL' | translate: {ref: balance.ref} }}
-
-
- {{::balance.ref}}
-
-
-
+
+
+
+
+ {{'BILL' | translate: {ref: balance.description} }}
+
+
+ {{balance.description}}
+
+
+
+
+
+
+
+
{{::balance.bankFk}}
{{::balance.debit | currency: 'EUR':2}}
{{::balance.credit | currency: 'EUR':2}}
diff --git a/modules/client/front/balance/index/index.js b/modules/client/front/balance/index/index.js
index 8f5261176..7e09e018c 100644
--- a/modules/client/front/balance/index/index.js
+++ b/modules/client/front/balance/index/index.js
@@ -39,6 +39,10 @@ class Controller extends Section {
this.getBalances();
}
+ get isAdministrative() {
+ return this.aclService.hasAny(['administrative']);
+ }
+
getData() {
return this.$.model.applyFilter(null, {
clientId: this.$params.id,
@@ -58,7 +62,7 @@ class Controller extends Section {
return balance.companyFk === selectedCompany;
});
- return currentBalance.amount;
+ return currentBalance && currentBalance.amount;
}
getBalances() {
@@ -79,6 +83,13 @@ class Controller extends Section {
this.$.invoiceOutDescriptor.show(event.target, balance.id);
}
+
+ changeDescription(balance) {
+ const params = {description: balance.description};
+ const endpoint = `Receipts/${balance.id}`;
+ this.$http.patch(endpoint, params)
+ .then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
+ }
}
Controller.$inject = ['$element', '$scope'];
diff --git a/modules/client/front/balance/index/index.spec.js b/modules/client/front/balance/index/index.spec.js
index 496407847..bdbea3846 100644
--- a/modules/client/front/balance/index/index.spec.js
+++ b/modules/client/front/balance/index/index.spec.js
@@ -3,10 +3,12 @@ import './index';
describe('Client', () => {
describe('Component vnClientBalanceIndex', () => {
let controller;
+ let $httpBackend;
beforeEach(ngModule('client'));
- beforeEach(inject(($componentController, $rootScope) => {
+ beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
+ $httpBackend = _$httpBackend_;
let $scope = $rootScope.$new();
const $element = angular.element(' ');
controller = $componentController('vnClientBalanceIndex', {$element, $scope});
@@ -133,5 +135,21 @@ describe('Client', () => {
expect(controller.getBalances).toHaveBeenCalledWith();
});
});
+
+ describe('changeDescription()', () => {
+ it('should make an http PATCH query', () => {
+ const expectedParams = {description: 'Web'};
+
+ $httpBackend.expect('PATCH', `Receipts/1`, expectedParams).respond(200);
+ controller.changeDescription({
+ id: 1,
+ description: 'Web',
+ accountingType: {
+ description: 'Cash'
+ }
+ });
+ $httpBackend.flush();
+ });
+ });
});
});
diff --git a/modules/client/front/credit/index/index.html b/modules/client/front/credit/index/index.html
index 6cb7f9e84..8e072a886 100644
--- a/modules/client/front/credit/index/index.html
+++ b/modules/client/front/credit/index/index.html
@@ -23,7 +23,13 @@
{{::credit.created | date:'dd/MM/yyyy HH:mm'}}
- {{::credit.worker.user.nickname}}
+
+
+ {{::credit.worker.user.name}}
+
+
{{::credit.amount | currency:'EUR':2}}
@@ -39,3 +45,6 @@
vn-bind="+"
fixed-bottom-right>
+
+
\ No newline at end of file
diff --git a/modules/client/front/credit/index/index.js b/modules/client/front/credit/index/index.js
index 151aa35d6..28160dfeb 100644
--- a/modules/client/front/credit/index/index.js
+++ b/modules/client/front/credit/index/index.js
@@ -13,7 +13,7 @@ class Controller extends Section {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/client/front/descriptor/index.html b/modules/client/front/descriptor/index.html
index aac5eb343..176f5cd93 100644
--- a/modules/client/front/descriptor/index.html
+++ b/modules/client/front/descriptor/index.html
@@ -35,8 +35,12 @@
info="Invoices minus payments plus orders not yet invoiced">
+ label="Sales person">
+
+ {{$ctrl.client.salesPerson.user.name}}
+
@@ -89,4 +93,7 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/client/front/dms/index/index.html b/modules/client/front/dms/index/index.html
index 3402074cc..f38e91134 100644
--- a/modules/client/front/dms/index/index.html
+++ b/modules/client/front/dms/index/index.html
@@ -53,6 +53,12 @@
{{::document.dms.description}}
+
+
+
+
@@ -62,7 +68,7 @@
- {{::document.dms.worker.user.nickname | dashIfEmpty}}
+ {{::document.dms.worker.user.name | dashIfEmpty}}
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
diff --git a/modules/client/front/dms/index/index.js b/modules/client/front/dms/index/index.js
index c65de39e4..a18f195bb 100644
--- a/modules/client/front/dms/index/index.js
+++ b/modules/client/front/dms/index/index.js
@@ -32,7 +32,7 @@ class Controller extends Section {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
},
}
diff --git a/modules/client/front/sample/index/index.html b/modules/client/front/sample/index/index.html
index bd7fc6e4a..7bb503fa2 100644
--- a/modules/client/front/sample/index/index.html
+++ b/modules/client/front/sample/index/index.html
@@ -32,7 +32,7 @@
- {{::sample.worker.user.nickname}}
+ {{::sample.worker.user.name}}
{{::sample.company.code}}
diff --git a/modules/client/front/sample/index/index.js b/modules/client/front/sample/index/index.js
index e93c2d2dc..132704de0 100644
--- a/modules/client/front/sample/index/index.js
+++ b/modules/client/front/sample/index/index.js
@@ -18,7 +18,7 @@ class Controller extends Section {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html
index 9e53d4988..ce69bf158 100644
--- a/modules/client/front/summary/index.html
+++ b/modules/client/front/summary/index.html
@@ -21,8 +21,12 @@
-
+
+
+ {{$ctrl.summary.salesPerson.user.name}}
+
@@ -197,4 +201,7 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/entry/back/methods/entry/editLatestBuys.js b/modules/entry/back/methods/entry/editLatestBuys.js
new file mode 100644
index 000000000..bd5358e31
--- /dev/null
+++ b/modules/entry/back/methods/entry/editLatestBuys.js
@@ -0,0 +1,87 @@
+module.exports = Self => {
+ Self.remoteMethod('editLatestBuys', {
+ description: 'Updates a column for one or more buys',
+ accessType: 'WRITE',
+ accepts: [{
+ arg: 'field',
+ type: 'String',
+ required: true,
+ description: `the column to edit`
+ },
+ {
+ arg: 'newValue',
+ type: 'Any',
+ required: true,
+ description: `The new value to save`
+ },
+ {
+ arg: 'lines',
+ type: ['Object'],
+ required: true,
+ description: `the buys which will be modified`
+ }],
+ returns: {
+ type: 'Object',
+ root: true
+ },
+ http: {
+ path: `/editLatestBuys`,
+ verb: 'POST'
+ }
+ });
+
+ Self.editLatestBuys = async(field, newValue, lines) => {
+ let modelName;
+ let identifier;
+
+ switch (field) {
+ case 'size':
+ case 'density':
+ case 'minPrice':
+ case 'description':
+ modelName = 'Item';
+ identifier = 'itemFk';
+ break;
+ case 'quantity':
+ case 'buyingValue':
+ case 'freightValue':
+ case 'packing':
+ case 'grouping':
+ case 'groupingMode':
+ case 'comissionValue':
+ case 'packageValue':
+ case 'price2':
+ case 'price3':
+ case 'weight':
+ modelName = 'Buy';
+ identifier = 'id';
+ }
+
+ const models = Self.app.models;
+ const model = models[modelName];
+
+ let tx = await model.beginTransaction({});
+
+ try {
+ let promises = [];
+ let options = {transaction: tx};
+
+ let targets = lines.map(line => {
+ return line[identifier];
+ });
+
+ let value = {};
+ value[field] = newValue;
+
+ // intentarlo con updateAll
+ for (let target of targets)
+ promises.push(model.upsertWithWhere({id: target}, value, options));
+
+ await Promise.all(promises);
+ await tx.commit();
+ } catch (error) {
+ await tx.rollback();
+ throw error;
+ }
+ };
+};
diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js
new file mode 100644
index 000000000..1b05ec483
--- /dev/null
+++ b/modules/entry/back/methods/entry/getBuys.js
@@ -0,0 +1,74 @@
+module.exports = Self => {
+ Self.remoteMethod('getBuys', {
+ description: 'Returns buys for one entry',
+ accessType: 'READ',
+ accepts: {
+ arg: 'id',
+ type: 'number',
+ required: true,
+ description: 'The entry id',
+ http: {source: 'path'}
+ },
+ returns: {
+ type: ['Object'],
+ root: true
+ },
+ http: {
+ path: `/:id/getBuys`,
+ verb: 'GET'
+ }
+ });
+
+ Self.getBuys = async id => {
+ let filter = {
+ where: {entryFk: id},
+ fields: [
+ 'id',
+ 'itemFk',
+ 'stickers',
+ 'packing',
+ 'grouping',
+ 'quantity',
+ 'packageFk',
+ 'weight',
+ 'buyingValue',
+ 'price2',
+ 'price3'
+ ],
+ include: {
+ relation: 'item',
+ scope: {
+ fields: [
+ 'id',
+ 'typeFk',
+ 'name',
+ 'size',
+ 'minPrice',
+ 'tag5',
+ 'value5',
+ 'tag6',
+ 'value6',
+ 'tag7',
+ 'value7',
+ 'tag8',
+ 'value8',
+ 'tag9',
+ 'value9',
+ 'tag10',
+ 'value10',
+ 'groupingMode'
+ ],
+ include: {
+ relation: 'itemType',
+ scope: {
+ fields: ['code', 'description']
+ }
+ }
+ }
+ }
+ };
+
+ let buys = await Self.app.models.Buy.find(filter);
+ return buys;
+ };
+};
diff --git a/modules/entry/back/methods/entry/latestBuysFilter.js b/modules/entry/back/methods/entry/latestBuysFilter.js
new file mode 100644
index 000000000..3240652cd
--- /dev/null
+++ b/modules/entry/back/methods/entry/latestBuysFilter.js
@@ -0,0 +1,172 @@
+
+const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
+const buildFilter = require('vn-loopback/util/filter').buildFilter;
+const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
+
+module.exports = Self => {
+ Self.remoteMethodCtx('latestBuysFilter', {
+ description: 'Find all instances of the model matched by filter from the data source.',
+ accessType: 'READ',
+ accepts: [
+ {
+ arg: 'filter',
+ type: 'Object',
+ description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
+ },
+ {
+ arg: 'search',
+ type: 'String',
+ description: `If it's and integer searchs by id, otherwise it searchs by name`,
+ }, {
+ arg: 'id',
+ type: 'Integer',
+ description: 'Item id',
+ }, {
+ arg: 'tags',
+ type: ['Object'],
+ description: 'List of tags to filter with',
+ http: {source: 'query'}
+ }, {
+ arg: 'description',
+ type: 'String',
+ description: 'The item description',
+ }, {
+ arg: 'salesPersonFk',
+ type: 'Integer',
+ description: 'The buyer of the item',
+ }, {
+ arg: 'active',
+ type: 'Boolean',
+ description: 'Whether the the item is or not active',
+ }, {
+ arg: 'visible',
+ type: 'Boolean',
+ description: 'Whether the the item is or not visible',
+ }, {
+ arg: 'typeFk',
+ type: 'Integer',
+ description: 'Type id',
+ }, {
+ arg: 'categoryFk',
+ type: 'Integer',
+ description: 'Category id',
+ }
+ ],
+ returns: {
+ type: ['Object'],
+ root: true
+ },
+ http: {
+ path: `/latestBuysFilter`,
+ verb: 'GET'
+ }
+ });
+
+ Self.latestBuysFilter = async(ctx, filter) => {
+ let conn = Self.dataSource.connector;
+ let where = buildFilter(ctx.args, (param, value) => {
+ switch (param) {
+ case 'search':
+ return /^\d+$/.test(value)
+ ? {'i.id': value}
+ : {'i.name': {like: `%${value}%`}};
+ case 'id':
+ return {'i.id': value};
+ case 'description':
+ return {'i.description': {like: `%${value}%`}};
+ case 'categoryFk':
+ return {'ic.id': value};
+ case 'salesPersonFk':
+ return {'it.workerFk': value};
+ case 'typeFk':
+ return {'i.typeFk': value};
+ case 'active':
+ return {'i.isActive': value};
+ case 'visible':
+ if (value)
+ return {'v.visible': {gt: 0}};
+ else if (!value)
+ return {'v.visible': {lte: 0}};
+ }
+ });
+ filter = mergeFilters(ctx.args.filter, {where});
+
+ let stmts = [];
+ let stmt;
+
+ stmts.push('CALL cache.last_buy_refresh(FALSE)');
+ stmts.push('CALL cache.visible_refresh(@calc_id, FALSE, 1)');
+
+ stmt = new ParameterizedSQL(`
+ SELECT
+ i.image,
+ i.id AS itemFk,
+ i.size,
+ i.density,
+ i.typeFk,
+ i.family,
+ i.isActive,
+ i.minPrice,
+ i.description,
+ t.name AS type,
+ intr.description AS intrastat,
+ ori.code AS origin,
+ b.entryFk,
+ b.id,
+ b.quantity,
+ b.buyingValue,
+ b.freightValue,
+ b.isIgnored,
+ b.packing,
+ b.grouping,
+ b.groupingMode,
+ b.comissionValue,
+ b.packageValue,
+ b.price2,
+ b.price3,
+ b.ektFk,
+ b.weight,
+ b.packageFk
+ FROM cache.last_buy lb
+ LEFT JOIN cache.visible v ON v.item_id = lb.item_id
+ AND v.calc_id = @calc_id
+ JOIN item i ON i.id = lb.item_id
+ JOIN itemType it ON it.id = i.typeFk AND lb.warehouse_id = it.warehouseFk
+ JOIN buy b ON b.id = lb.buy_id
+ LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
+ LEFT JOIN itemType t ON t.id = i.typeFk
+ LEFT JOIN intrastat intr ON intr.id = i.intrastatFk
+ LEFT JOIN origin ori ON ori.id = i.originFk`
+ );
+
+ if (ctx.args.tags) {
+ let i = 1;
+ for (const tag of ctx.args.tags) {
+ const tAlias = `it${i++}`;
+
+ if (tag.tagFk) {
+ stmt.merge({
+ sql: `JOIN vn.itemTag ${tAlias} ON ${tAlias}.itemFk = i.id
+ AND ${tAlias}.tagFk = ?
+ AND ${tAlias}.value LIKE ?`,
+ params: [tag.tagFk, `%${tag.value}%`],
+ });
+ } else {
+ stmt.merge({
+ sql: `JOIN vn.itemTag ${tAlias} ON ${tAlias}.itemFk = i.id
+ AND ${tAlias}.value LIKE ?`,
+ params: [`%${tag.value}%`],
+ });
+ }
+ }
+ }
+
+ stmt.merge(conn.makeSuffix(filter));
+ let buysIndex = stmts.push(stmt) - 1;
+
+ let sql = ParameterizedSQL.join(stmts, ';');
+ let result = await conn.executeStmt(sql);
+ return buysIndex === 0 ? result : result[buysIndex];
+ };
+};
+
diff --git a/modules/entry/back/methods/entry/specs/editLatestBuys.spec.js b/modules/entry/back/methods/entry/specs/editLatestBuys.spec.js
new file mode 100644
index 000000000..5d1bd5a0d
--- /dev/null
+++ b/modules/entry/back/methods/entry/specs/editLatestBuys.spec.js
@@ -0,0 +1,31 @@
+const app = require('vn-loopback/server/server');
+const model = app.models.Buy;
+
+describe('Buy editLatestsBuys()', () => {
+ it('should change the value of a given column for the selected buys', async() => {
+ let ctx = {
+ args: {
+ search: 'Ranged weapon longbow 2m'
+ }
+ };
+
+ let [original] = await model.latestBuysFilter(ctx);
+
+ const field = 'size';
+ let newValue = 99;
+ const lines = [{itemFk: original.itemFk, id: original.id}];
+
+ await model.editLatestBuys(field, newValue, lines);
+
+ let [result] = await model.latestBuysFilter(ctx);
+
+ expect(result.size).toEqual(99);
+
+ newValue = original.size;
+ await model.editLatestBuys(field, newValue, lines);
+
+ let [restoredFixture] = await model.latestBuysFilter(ctx);
+
+ expect(restoredFixture.size).toEqual(original.size);
+ });
+});
diff --git a/modules/entry/back/methods/entry/specs/getBuys.spec.js b/modules/entry/back/methods/entry/specs/getBuys.spec.js
new file mode 100644
index 000000000..b660ab2ad
--- /dev/null
+++ b/modules/entry/back/methods/entry/specs/getBuys.spec.js
@@ -0,0 +1,14 @@
+const app = require('vn-loopback/server/server');
+
+describe('entry getBuys()', () => {
+ const entryId = 4;
+ it('should get the buys and items of an entry', async() => {
+ const result = await app.models.Entry.getBuys(entryId);
+
+ const length = result.length;
+ const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
+
+ expect(result.length).toEqual(4);
+ expect(anyResult.item).toBeDefined();
+ });
+});
diff --git a/modules/entry/back/methods/entry/specs/latestBuysFilter.spec.js b/modules/entry/back/methods/entry/specs/latestBuysFilter.spec.js
new file mode 100644
index 000000000..ba18fcf57
--- /dev/null
+++ b/modules/entry/back/methods/entry/specs/latestBuysFilter.spec.js
@@ -0,0 +1,139 @@
+const app = require('vn-loopback/server/server');
+
+describe('Buy latests buys filter()', () => {
+ it('should return the entry matching "search"', async() => {
+ let ctx = {
+ args: {
+ search: 'Ranged weapon longbow 2m'
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+ let firstBuy = results[0];
+
+ expect(results.length).toEqual(1);
+ expect(firstBuy.size).toEqual(70);
+ });
+
+ it('should return the entry matching "id"', async() => {
+ let ctx = {
+ args: {
+ id: 1
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toEqual(1);
+ });
+
+ it('should return results matching "tags"', async() => {
+ let ctx = {
+ args: {
+ tags: [
+ {tagFk: 27, value: '2m'}
+ ]
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(2);
+ });
+
+ it('should return results matching "categoryFk"', async() => {
+ let ctx = {
+ args: {
+ categoryFk: 1
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(4);
+ });
+
+ it('should return results matching "typeFk"', async() => {
+ let ctx = {
+ args: {
+ typeFk: 2
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(4);
+ });
+
+ it('should return results matching "active"', async() => {
+ let ctx = {
+ args: {
+ active: true
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(6);
+ });
+
+ it('should return results matching "not active"', async() => {
+ let ctx = {
+ args: {
+ active: false
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(0);
+ });
+
+ it('should return results matching "visible"', async() => {
+ let ctx = {
+ args: {
+ visible: true
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(5);
+ });
+
+ it('should return results matching "not visible"', async() => {
+ let ctx = {
+ args: {
+ visible: false
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(0);
+ });
+
+ it('should return results matching "salesPersonFk"', async() => {
+ let ctx = {
+ args: {
+ salesPersonFk: 35
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(6);
+ });
+
+ it('should return results matching "description"', async() => {
+ let ctx = {
+ args: {
+ description: 'Increases block'
+ }
+ };
+
+ let results = await app.models.Buy.latestBuysFilter(ctx);
+
+ expect(results.length).toBe(1);
+ });
+});
diff --git a/modules/entry/back/model-config.json b/modules/entry/back/model-config.json
index c8c8babad..0e37b947f 100644
--- a/modules/entry/back/model-config.json
+++ b/modules/entry/back/model-config.json
@@ -2,6 +2,9 @@
"Entry": {
"dataSource": "vn"
},
+ "Buy": {
+ "dataSource": "vn"
+ },
"EntryLog": {
"dataSource": "vn"
}
diff --git a/modules/entry/back/models/buy.js b/modules/entry/back/models/buy.js
new file mode 100644
index 000000000..e110164e8
--- /dev/null
+++ b/modules/entry/back/models/buy.js
@@ -0,0 +1,4 @@
+module.exports = Self => {
+ require('../methods/entry/editLatestBuys')(Self);
+ require('../methods/entry/latestBuysFilter')(Self);
+};
diff --git a/modules/entry/back/models/buy.json b/modules/entry/back/models/buy.json
new file mode 100644
index 000000000..56f1eef4f
--- /dev/null
+++ b/modules/entry/back/models/buy.json
@@ -0,0 +1,73 @@
+{
+ "name": "Buy",
+ "base": "Loggable",
+ "log": {
+ "model": "EntryLog",
+ "relation": "entry"
+ },
+ "options": {
+ "mysql": {
+ "table": "buy"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "quantity": {
+ "type": "number"
+ },
+ "buyingValue": {
+ "type": "number"
+ },
+ "freightValue": {
+ "type": "number"
+ },
+ "packing": {
+ "type": "number"
+ },
+ "grouping": {
+ "type": "number"
+ },
+ "stickers": {
+ "type": "number"
+ },
+ "packageFk": {
+ "type": "number"
+ },
+ "groupingMode": {
+ "type": "number"
+ },
+ "comissionValue": {
+ "type": "number"
+ },
+ "packageValue": {
+ "type": "number"
+ },
+ "price2": {
+ "type": "number"
+ },
+ "price3": {
+ "type": "number"
+ },
+ "weight": {
+ "type": "number"
+ }
+ },
+ "relations": {
+ "entry": {
+ "type": "belongsTo",
+ "model": "Entry",
+ "foreignKey": "entryFk",
+ "required": true
+ },
+ "item": {
+ "type": "belongsTo",
+ "model": "Item",
+ "foreignKey": "itemFk",
+ "required": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js
index b1f71b4bd..94dbe787d 100644
--- a/modules/entry/back/models/entry.js
+++ b/modules/entry/back/models/entry.js
@@ -1,5 +1,5 @@
-
module.exports = Self => {
require('../methods/entry/filter')(Self);
require('../methods/entry/getEntry')(Self);
+ require('../methods/entry/getBuys')(Self);
};
diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json
index d3f149680..a67641b0c 100644
--- a/modules/entry/back/models/entry.json
+++ b/modules/entry/back/models/entry.json
@@ -1,6 +1,6 @@
{
"name": "Entry",
- "base": "VnModel",
+ "base": "Loggable",
"log": {
"model":"EntryLog"
},
@@ -62,6 +62,18 @@
},
"loadPriority": {
"type": "number"
+ },
+ "supplierFk": {
+ "type": "number",
+ "required": true
+ },
+ "travelFk": {
+ "type": "number",
+ "required": true
+ },
+ "companyFk": {
+ "type": "number",
+ "required": true
}
},
"relations": {
diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html
new file mode 100644
index 000000000..e69de29bb
diff --git a/modules/entry/front/basic-data/index.js b/modules/entry/front/basic-data/index.js
new file mode 100644
index 000000000..141a365fa
--- /dev/null
+++ b/modules/entry/front/basic-data/index.js
@@ -0,0 +1,10 @@
+import ngModule from '../module';
+import Section from 'salix/components/section';
+
+ngModule.vnComponent('vnEntryBasicData', {
+ template: require('./index.html'),
+ controller: Section,
+ bindings: {
+ entry: '<'
+ }
+});
diff --git a/modules/entry/front/card/index.js b/modules/entry/front/card/index.js
index f9ab6187c..eafed171b 100644
--- a/modules/entry/front/card/index.js
+++ b/modules/entry/front/card/index.js
@@ -10,7 +10,8 @@ class Controller extends ModuleCard {
scope: {
fields: ['id', 'code']
}
- }, {
+ },
+ {
relation: 'travel',
scope: {
fields: ['id', 'landed', 'agencyFk', 'warehouseOutFk'],
@@ -35,12 +36,14 @@ class Controller extends ModuleCard {
}
]
}
- }, {
+ },
+ {
relation: 'supplier',
scope: {
fields: ['id', 'nickname']
}
- }, {
+ },
+ {
relation: 'currency'
}
]
diff --git a/modules/entry/front/create/index.html b/modules/entry/front/create/index.html
new file mode 100644
index 000000000..7b5dfc928
--- /dev/null
+++ b/modules/entry/front/create/index.html
@@ -0,0 +1,61 @@
+
+
+
+
diff --git a/modules/entry/front/create/index.js b/modules/entry/front/create/index.js
new file mode 100644
index 000000000..5c61730f9
--- /dev/null
+++ b/modules/entry/front/create/index.js
@@ -0,0 +1,43 @@
+import ngModule from '../module';
+import Section from 'salix/components/section';
+import './style.scss';
+
+export default class Controller extends Section {
+ constructor($element, $) {
+ super($element, $);
+
+ this.entry = {
+ companyFk: this.vnConfig.companyFk
+ };
+
+ if (this.$params && this.$params.supplierFk)
+ this.entry.supplierFk = parseInt(this.$params.supplierFk);
+ if (this.$params && this.$params.travelFk)
+ this.entry.travelFk = parseInt(this.$params.travelFk);
+ if (this.$params && this.$params.companyFk)
+ this.entry.companyFk = parseInt(this.$params.companyFk);
+ }
+
+ onSubmit() {
+ this.$.watcher.submit().then(
+ res => this.$state.go('entry.card.basicData', {id: res.data.id})
+ );
+ }
+
+ searchFunction($search) {
+ return {or: [
+ {'agencyModeName': {like: `%${$search}%`}},
+ {'warehouseInName': {like: `%${$search}%`}},
+ {'warehouseOutName': {like: `%${$search}%`}},
+ {'shipped': new Date($search)},
+ {'landed': new Date($search)}
+ ]};
+ }
+}
+
+Controller.$inject = ['$element', '$scope'];
+
+ngModule.vnComponent('vnEntryCreate', {
+ template: require('./index.html'),
+ controller: Controller
+});
diff --git a/modules/entry/front/create/locale/es.yml b/modules/entry/front/create/locale/es.yml
new file mode 100644
index 000000000..aa269ed15
--- /dev/null
+++ b/modules/entry/front/create/locale/es.yml
@@ -0,0 +1,2 @@
+New entry: Nueva entrada
+Required fields (*): Campos requeridos (*)
\ No newline at end of file
diff --git a/modules/entry/front/create/style.scss b/modules/entry/front/create/style.scss
new file mode 100644
index 000000000..2dc52b1ff
--- /dev/null
+++ b/modules/entry/front/create/style.scss
@@ -0,0 +1,10 @@
+vn-entry-create {
+ vn-card {
+ position: relative
+ }
+ vn-icon[icon="info"] {
+ position: absolute;
+ top: 16px;
+ right: 16px
+ }
+}
\ No newline at end of file
diff --git a/modules/entry/front/descriptor-popover/index.html b/modules/entry/front/descriptor-popover/index.html
new file mode 100644
index 000000000..465a9bf51
--- /dev/null
+++ b/modules/entry/front/descriptor-popover/index.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/entry/front/descriptor-popover/index.js b/modules/entry/front/descriptor-popover/index.js
new file mode 100644
index 000000000..d79aed03e
--- /dev/null
+++ b/modules/entry/front/descriptor-popover/index.js
@@ -0,0 +1,9 @@
+import ngModule from '../module';
+import DescriptorPopover from 'salix/components/descriptor-popover';
+
+class Controller extends DescriptorPopover {}
+
+ngModule.vnComponent('vnEntryDescriptorPopover', {
+ slotTemplate: require('./index.html'),
+ controller: Controller
+});
diff --git a/modules/entry/front/descriptor/index.js b/modules/entry/front/descriptor/index.js
index dd417a842..fed3787d4 100644
--- a/modules/entry/front/descriptor/index.js
+++ b/modules/entry/front/descriptor/index.js
@@ -11,15 +11,23 @@ class Controller extends Descriptor {
}
get travelFilter() {
- return this.entry && JSON.stringify({
- agencyFk: this.entry.travel.agencyFk
- });
+ let travelFilter;
+ const entryTravel = this.entry && this.entry.travel;
+
+ if (entryTravel && entryTravel.agencyFk) {
+ travelFilter = this.entry && JSON.stringify({
+ agencyFk: entryTravel.agencyFk
+ });
+ }
+ return travelFilter;
}
get entryFilter() {
- if (!this.entry) return null;
+ let entryTravel = this.entry && this.entry.travel;
- const date = new Date(this.entry.travel.landed);
+ if (!entryTravel || !entryTravel.landed) return null;
+
+ const date = new Date(entryTravel.landed);
date.setHours(0, 0, 0, 0);
const from = new Date(date.getTime());
@@ -35,6 +43,48 @@ class Controller extends Descriptor {
});
}
+ loadData() {
+ const filter = {
+ include: [
+ {
+ relation: 'travel',
+ scope: {
+ fields: ['id', 'landed', 'agencyFk', 'warehouseOutFk'],
+ include: [
+ {
+ relation: 'agency',
+ scope: {
+ fields: ['name']
+ }
+ },
+ {
+ relation: 'warehouseOut',
+ scope: {
+ fields: ['name']
+ }
+ },
+ {
+ relation: 'warehouseIn',
+ scope: {
+ fields: ['name']
+ }
+ }
+ ]
+ }
+ },
+ {
+ relation: 'supplier',
+ scope: {
+ fields: ['id', 'nickname']
+ }
+ }
+ ]
+ };
+
+ return this.getData(`Entries/${this.id}`, {filter})
+ .then(res => this.entity = res.data);
+ }
+
showEntryReport() {
this.vnReport.show('entry-order', {
entryId: this.entry.id
diff --git a/modules/entry/front/descriptor/index.spec.js b/modules/entry/front/descriptor/index.spec.js
index 513425c76..84defea3b 100644
--- a/modules/entry/front/descriptor/index.spec.js
+++ b/modules/entry/front/descriptor/index.spec.js
@@ -1,12 +1,14 @@
import './index.js';
describe('Entry Component vnEntryDescriptor', () => {
+ let $httpBackend;
let controller;
const entry = {id: 2};
beforeEach(ngModule('entry'));
- beforeEach(inject($componentController => {
+ beforeEach(inject(($componentController, _$httpBackend_) => {
+ $httpBackend = _$httpBackend_;
controller = $componentController('vnEntryDescriptor', {$element: null}, {entry});
}));
@@ -24,4 +26,18 @@ describe('Entry Component vnEntryDescriptor', () => {
expect(controller.vnReport.show).toHaveBeenCalledWith('entry-order', params);
});
});
+
+ describe('loadData()', () => {
+ it('should perform ask for the entry', () => {
+ let query = `Entries/${entry.id}`;
+ jest.spyOn(controller, 'getData');
+
+ $httpBackend.expectGET(query).respond();
+ controller.loadData();
+ $httpBackend.flush();
+
+ expect(controller.getData).toHaveBeenCalledTimes(1);
+ expect(controller.getData).toHaveBeenCalledWith(query, jasmine.any(Object));
+ });
+ });
});
diff --git a/modules/entry/front/index.js b/modules/entry/front/index.js
index f0c845b14..484d8f718 100644
--- a/modules/entry/front/index.js
+++ b/modules/entry/front/index.js
@@ -2,8 +2,12 @@ export * from './module';
import './main';
import './index/';
+import './create';
+import './latest-buys';
import './search-panel';
+import './latest-buys-search-panel';
import './descriptor';
+import './descriptor-popover';
import './card';
import './summary';
import './log';
diff --git a/modules/entry/front/index/index.html b/modules/entry/front/index/index.html
index e3d174cbf..8a28888b0 100644
--- a/modules/entry/front/index/index.html
+++ b/modules/entry/front/index/index.html
@@ -69,4 +69,16 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/entry/front/index/locale/es.yml b/modules/entry/front/index/locale/es.yml
index 8ef9b2c7a..2770ccfe9 100644
--- a/modules/entry/front/index/locale/es.yml
+++ b/modules/entry/front/index/locale/es.yml
@@ -12,4 +12,6 @@ Reference: Referencia
Created: Creado
Booked: Facturado
Is inventory: Inventario
-Notes: Notas
\ No newline at end of file
+Notes: Notas
+Status: Estado
+Selection: Selección
\ No newline at end of file
diff --git a/modules/entry/front/latest-buys-search-panel/index.html b/modules/entry/front/latest-buys-search-panel/index.html
new file mode 100644
index 000000000..67fa7f0c2
--- /dev/null
+++ b/modules/entry/front/latest-buys-search-panel/index.html
@@ -0,0 +1,167 @@
+
+
diff --git a/modules/entry/front/latest-buys-search-panel/index.js b/modules/entry/front/latest-buys-search-panel/index.js
new file mode 100644
index 000000000..adc95f43d
--- /dev/null
+++ b/modules/entry/front/latest-buys-search-panel/index.js
@@ -0,0 +1,79 @@
+import ngModule from '../module';
+import SearchPanel from 'core/components/searchbar/search-panel';
+
+class Controller extends SearchPanel {
+ constructor($element, $) {
+ super($element, $);
+ let model = 'Item';
+ let moreFields = ['description', 'name'];
+
+ let properties;
+ let validations = window.validations;
+
+ if (validations && validations[model])
+ properties = validations[model].properties;
+ else
+ properties = {};
+
+ this.moreFields = [];
+ for (let field of moreFields) {
+ let prop = properties[field];
+ this.moreFields.push({
+ name: field,
+ label: prop ? prop.description : field,
+ type: prop ? prop.type : null
+ });
+ }
+ }
+
+ get filter() {
+ let filter = this.$.filter;
+
+ for (let fieldFilter of this.fieldFilters)
+ filter[fieldFilter.name] = fieldFilter.value;
+
+ return filter;
+ }
+
+ set filter(value) {
+ if (!value)
+ value = {};
+ if (!value.tags)
+ value.tags = [{}];
+
+ this.fieldFilters = [];
+ for (let field of this.moreFields) {
+ if (value[field.name] != undefined) {
+ this.fieldFilters.push({
+ name: field.name,
+ value: value[field.name],
+ info: field
+ });
+ }
+ }
+
+ this.$.filter = value;
+ }
+
+ getSourceTable(selection) {
+ if (!selection || selection.isFree === true)
+ return null;
+
+ if (selection.sourceTable) {
+ return ''
+ + selection.sourceTable.charAt(0).toUpperCase()
+ + selection.sourceTable.substring(1) + 's';
+ } else if (selection.sourceTable == null)
+ return `ItemTags/filterItemTags/${selection.id}`;
+ }
+
+ removeField(index, field) {
+ this.fieldFilters.splice(index, 1);
+ this.$.filter[field] = undefined;
+ }
+}
+
+ngModule.component('vnLatestBuysSearchPanel', {
+ template: require('./index.html'),
+ controller: Controller
+});
diff --git a/modules/entry/front/latest-buys-search-panel/index.spec.js b/modules/entry/front/latest-buys-search-panel/index.spec.js
new file mode 100644
index 000000000..6d403b9fb
--- /dev/null
+++ b/modules/entry/front/latest-buys-search-panel/index.spec.js
@@ -0,0 +1,45 @@
+import './index.js';
+
+describe('Entry', () => {
+ describe('Component vnLatestBuysSearchPanel', () => {
+ let $element;
+ let controller;
+
+ beforeEach(ngModule('entry'));
+
+ beforeEach(angular.mock.inject($componentController => {
+ $element = angular.element(` `);
+ controller = $componentController('vnLatestBuysSearchPanel', {$element});
+ }));
+
+ describe('getSourceTable()', () => {
+ it(`should return null if there's no selection`, () => {
+ let selection = null;
+ let result = controller.getSourceTable(selection);
+
+ expect(result).toBeNull();
+ });
+
+ it(`should return null if there's a selection but its isFree property is truthy`, () => {
+ let selection = {isFree: true};
+ let result = controller.getSourceTable(selection);
+
+ expect(result).toBeNull();
+ });
+
+ it(`should return the formated sourceTable concatenated to a path`, () => {
+ let selection = {sourceTable: 'hello guy'};
+ let result = controller.getSourceTable(selection);
+
+ expect(result).toEqual('Hello guys');
+ });
+
+ it(`should return a path if there's no sourceTable and the selection has an id`, () => {
+ let selection = {id: 99};
+ let result = controller.getSourceTable(selection);
+
+ expect(result).toEqual(`ItemTags/filterItemTags/${selection.id}`);
+ });
+ });
+ });
+});
diff --git a/modules/entry/front/latest-buys/index.html b/modules/entry/front/latest-buys/index.html
new file mode 100644
index 000000000..b7912a6da
--- /dev/null
+++ b/modules/entry/front/latest-buys/index.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Picture
+ Id
+ Packing
+ Grouping
+ Quantity
+ Description
+ Size
+ Type
+ Intrastat
+ Origin
+ Density
+ Active
+ Family
+ Entry
+ Buying value
+ Freight value
+ Commission value
+ Package value
+ Is ignored
+ Grouping price
+ Packing price
+ Min price
+ Ekt
+ Weight
+ PackageName
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{::buy.itemFk | zeroFill:6}}
+
+
+
+
+ {{::buy.packing | dashIfEmpty}}
+
+
+
+
+ {{::buy.grouping | dashIfEmpty}}
+
+
+ {{::buy.quantity}}
+
+ {{::buy.description | dashIfEmpty}}
+
+ {{::buy.size}}
+
+ {{::buy.type}}
+
+
+ {{::buy.intrastat}}
+
+ {{::buy.origin}}
+ {{::buy.density}}
+
+
+
+
+ {{::buy.family}}
+
+
+ {{::buy.entryFk}}
+
+
+ {{::buy.buyingValue | currency: 'EUR':2}}
+ {{::buy.freightValue | currency: 'EUR':2}}
+ {{::buy.comissionValue | currency: 'EUR':2}}
+ {{::buy.packageValue | currency: 'EUR':2}}
+ {{::buy.isIgnored}}
+ {{::buy.price2 | currency: 'EUR':2}}
+ {{::buy.price3 | currency: 'EUR':2}}
+ {{::buy.minPrice | currency: 'EUR':2}}
+ {{::buy.ektFk | dashIfEmpty}}
+ {{::buy.weight}}
+ {{::buy.packageFk}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create
+
+
+
+
+
+
diff --git a/modules/entry/front/latest-buys/index.js b/modules/entry/front/latest-buys/index.js
new file mode 100644
index 000000000..8d2c5fe13
--- /dev/null
+++ b/modules/entry/front/latest-buys/index.js
@@ -0,0 +1,78 @@
+import ngModule from '../module';
+import Section from 'salix/components/section';
+
+export default class Controller extends Section {
+ constructor($element, $) {
+ super($element, $);
+ this.showFields = {
+ id: false,
+ actions: false
+ };
+ this.editedColumn;
+ }
+
+ get columns() {
+ if (this._columns) return this._columns;
+
+ this._columns = [
+ {field: 'quantity', displayName: this.$t('Quantity')},
+ {field: 'buyingValue', displayName: this.$t('Buying value')},
+ {field: 'freightValue', displayName: this.$t('Freight value')},
+ {field: 'packing', displayName: this.$t('Packing')},
+ {field: 'grouping', displayName: this.$t('Grouping')},
+ {field: 'comissionValue', displayName: this.$t('Commission value')},
+ {field: 'packageValue', displayName: this.$t('Package value')},
+ {field: 'price2', displayName: this.$t('Grouping price')},
+ {field: 'price3', displayName: this.$t('Packing price')},
+ {field: 'weight', displayName: this.$t('Weight')},
+ {field: 'description', displayName: this.$t('Description')},
+ {field: 'minPrice', displayName: this.$t('Min price')},
+ {field: 'size', displayName: this.$t('Size')},
+ {field: 'density', displayName: this.$t('Density')}
+ ];
+
+ return this._columns;
+ }
+
+ get checked() {
+ const buys = this.$.model.data || [];
+ const checkedBuys = [];
+ for (let buy of buys) {
+ if (buy.checked)
+ checkedBuys.push(buy);
+ }
+
+ return checkedBuys;
+ }
+
+ uncheck() {
+ const lines = this.checked;
+ for (let line of lines) {
+ if (line.checked)
+ line.checked = false;
+ }
+ }
+
+ get totalChecked() {
+ return this.checked.length;
+ }
+
+ onEditAccept() {
+ let data = {
+ field: this.editedColumn.field,
+ newValue: this.editedColumn.newValue,
+ lines: this.checked
+ };
+
+ return this.$http.post('Buys/editLatestBuys', data)
+ .then(() => {
+ this.uncheck();
+ this.$.model.refresh();
+ });
+ }
+}
+
+ngModule.component('vnEntryLatestBuys', {
+ template: require('./index.html'),
+ controller: Controller
+});
diff --git a/modules/entry/front/latest-buys/index.spec.js b/modules/entry/front/latest-buys/index.spec.js
new file mode 100644
index 000000000..658a2dc86
--- /dev/null
+++ b/modules/entry/front/latest-buys/index.spec.js
@@ -0,0 +1,82 @@
+import './index.js';
+
+describe('Entry', () => {
+ describe('Component vnEntryLatestBuys', () => {
+ let controller;
+ let $httpBackend;
+
+ beforeEach(ngModule('entry'));
+
+ beforeEach(angular.mock.inject(($componentController, $compile, $rootScope, _$httpBackend_) => {
+ $httpBackend = _$httpBackend_;
+ let $element = $compile(' {}},
+ edit: {hide: () => {}}
+ };
+ }));
+
+ describe('get columns', () => {
+ it(`should return a set of columns`, () => {
+ let result = controller.columns;
+
+ let length = result.length;
+ let anyColumn = Object.keys(result[Math.floor(Math.random() * Math.floor(length))]);
+
+ expect(anyColumn).toContain('field', 'displayName');
+ });
+ });
+
+ describe('get checked', () => {
+ it(`should return a set of checked lines`, () => {
+ controller.$.model.data = [
+ {checked: true, id: 1},
+ {checked: true, id: 2},
+ {checked: true, id: 3},
+ {checked: false, id: 4},
+ ];
+
+ let result = controller.checked;
+
+ expect(result.length).toEqual(3);
+ });
+ });
+
+ describe('uncheck()', () => {
+ it(`should clear the selection of lines on the controller`, () => {
+ controller.$.model.data = [
+ {checked: true, id: 1},
+ {checked: true, id: 2},
+ {checked: true, id: 3},
+ {checked: false, id: 4},
+ ];
+
+ let result = controller.checked;
+
+ expect(result.length).toEqual(3);
+
+ controller.uncheck();
+
+ result = controller.checked;
+
+ expect(result.length).toEqual(0);
+ });
+ });
+
+ describe('onEditAccept()', () => {
+ it(`should perform a query to update columns`, () => {
+ controller.editedColumn = {field: 'my field', newValue: 'the new value'};
+ let query = 'Buys/editLatestBuys';
+
+ $httpBackend.expectPOST(query).respond();
+ controller.onEditAccept();
+ $httpBackend.flush();
+
+ const result = controller.checked;
+
+ expect(result.length).toEqual(0);
+ });
+ });
+ });
+});
diff --git a/modules/entry/front/latest-buys/locale/en.yml b/modules/entry/front/latest-buys/locale/en.yml
new file mode 100644
index 000000000..48dda861b
--- /dev/null
+++ b/modules/entry/front/latest-buys/locale/en.yml
@@ -0,0 +1,2 @@
+Minimun amount: Minimun purchase quantity
+PackageName: Package
\ No newline at end of file
diff --git a/modules/entry/front/latest-buys/locale/es.yml b/modules/entry/front/latest-buys/locale/es.yml
new file mode 100644
index 000000000..18bc1a689
--- /dev/null
+++ b/modules/entry/front/latest-buys/locale/es.yml
@@ -0,0 +1,14 @@
+Edit buy(s): Editar compra(s)
+Buying value: Precio
+Freight value: Porte
+Commission value: Comisión
+Package value: Embalaje
+Is ignored: Ignorado
+Grouping price: Precio grouping
+Packing price: Precio packing
+Min price: Precio min
+Ekt: Ekt
+Weight: Peso
+Minimun amount: Cantidad mínima de compra
+Field to edit: Campo a editar
+PackageName: Cubo
diff --git a/modules/entry/front/locale/es.yml b/modules/entry/front/locale/es.yml
index 0858bb7f9..b28cbe735 100644
--- a/modules/entry/front/locale/es.yml
+++ b/modules/entry/front/locale/es.yml
@@ -1,5 +1,6 @@
#Ordenar alfabeticamente
entry: entrada
+Latest buys: Últimas compras
# Sections
diff --git a/modules/entry/front/routes.json b/modules/entry/front/routes.json
index 084ff7bb2..a430a95fa 100644
--- a/modules/entry/front/routes.json
+++ b/modules/entry/front/routes.json
@@ -2,13 +2,15 @@
"module": "entry",
"name": "Entries",
"icon": "icon-entry",
- "dependencies": ["travel"],
+ "dependencies": ["travel", "item"],
"validations": true,
"menus": {
"main": [
- {"state": "entry.index", "icon": "icon-entry"}
+ {"state": "entry.index", "icon": "icon-entry"},
+ {"state": "entry.latestBuys", "icon": "icon-latestBuys"}
],
"card": [
+ {"state": "entry.card.basicData", "icon": "settings"},
{"state": "entry.card.buy", "icon": "icon-lines"},
{"state": "entry.card.log", "icon": "history"}
]
@@ -24,7 +26,20 @@
"url": "/index?q",
"state": "entry.index",
"component": "vn-entry-index",
- "description": "Entries"
+ "description": "Entries",
+ "acl": ["buyer"]
+ }, {
+ "url": "/latest-buys?q",
+ "state": "entry.latestBuys",
+ "component": "vn-entry-latest-buys",
+ "description": "Latest buys",
+ "acl": ["buyer"]
+ }, {
+ "url": "/create?supplierFk&travelFk&companyFk",
+ "state": "entry.create",
+ "component": "vn-entry-create",
+ "description": "New entry",
+ "acl": ["buyer"]
}, {
"url": "/:id",
"state": "entry.card",
@@ -38,6 +53,14 @@
"params": {
"entry": "$ctrl.entry"
}
+ }, {
+ "url": "/basic-data",
+ "state": "entry.card.basicData",
+ "component": "vn-entry-basic-data",
+ "description": "Basic data",
+ "params": {
+ "entry": "$ctrl.entry"
+ }
}, {
"url" : "/log",
"state": "entry.card.log",
diff --git a/modules/entry/front/summary/index.html b/modules/entry/front/summary/index.html
index af9eae30c..9151558f2 100644
--- a/modules/entry/front/summary/index.html
+++ b/modules/entry/front/summary/index.html
@@ -19,8 +19,12 @@
-
+
+
+ {{$ctrl.entryData.travel.agency.name}}
+
@@ -65,4 +69,89 @@
+
+
+ Buys
+
+
+
+ Quantity
+ Stickers
+ Package
+ Weight
+ Packing
+ Grouping
+ Buying value
+ Import
+ Grouping price
+ Packing price
+
+
+
+
+ {{::line.quantity}}
+ {{::line.stickers | dashIfEmpty}}
+ {{::line.packageFk | dashIfEmpty}}
+ {{::line.weight}}
+
+
+ {{::line.packing | dashIfEmpty}}
+
+
+
+
+ {{::line.grouping | dashIfEmpty}}
+
+
+ {{::line.buyingValue | currency: 'EUR':2}}
+ {{::line.quantity * line.buyingValue | currency: 'EUR':2}}
+ {{::line.price2 | currency: 'EUR':2}}
+ {{::line.price3 | currency: 'EUR':2}}
+
+
+
+
+ {{::line.item.itemType.code}}
+
+
+
+
+ {{::line.item.id | zeroFill:6}}
+
+
+
+
+ {{::line.item.size}}
+
+
+
+
+ {{::line.item.minPrice | currency: 'EUR':2}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/entry/front/summary/index.js b/modules/entry/front/summary/index.js
index f0b4c62b3..2a3dfe37b 100644
--- a/modules/entry/front/summary/index.js
+++ b/modules/entry/front/summary/index.js
@@ -10,15 +10,23 @@ class Controller extends Section {
set entry(value) {
this._entry = value;
- if (value && value.id)
+ if (value && value.id) {
this.getEntryData();
+ this.getBuys();
+ }
}
getEntryData() {
- return this.$http.get(`/api/Entries/${this.entry.id}/getEntry`).then(response => {
+ return this.$http.get(`Entries/${this.entry.id}/getEntry`).then(response => {
this.entryData = response.data;
});
}
+
+ getBuys() {
+ return this.$http.get(`Entries/${this.entry.id}/getBuys`).then(response => {
+ this.buys = response.data;
+ });
+ }
}
ngModule.vnComponent('vnEntrySummary', {
diff --git a/modules/entry/front/summary/index.spec.js b/modules/entry/front/summary/index.spec.js
index a2d25d0d6..396e92b01 100644
--- a/modules/entry/front/summary/index.spec.js
+++ b/modules/entry/front/summary/index.spec.js
@@ -38,7 +38,7 @@ describe('component vnEntrySummary', () => {
it('should perform a get and then store data on the controller', () => {
controller._entry = {id: 999};
- const query = `/api/Entries/${controller._entry.id}/getEntry`;
+ const query = `Entries/${controller._entry.id}/getEntry`;
$httpBackend.expectGET(query).respond('I am the entryData');
controller.getEntryData();
$httpBackend.flush();
@@ -46,4 +46,20 @@ describe('component vnEntrySummary', () => {
expect(controller.entryData).toEqual('I am the entryData');
});
});
+
+ describe('getBuys()', () => {
+ it('should perform a get asking for the buys of an entry', () => {
+ controller._entry = {id: 999};
+
+ const thatQuery = `Entries/${controller._entry.id}/getEntry`;
+ const query = `Entries/${controller._entry.id}/getBuys`;
+
+ $httpBackend.whenGET(thatQuery).respond('My Entries');
+ $httpBackend.expectGET(query).respond('Some buys');
+ controller.getBuys();
+ $httpBackend.flush();
+
+ expect(controller.buys).toEqual('Some buys');
+ });
+ });
});
diff --git a/modules/entry/front/summary/locale/es.yml b/modules/entry/front/summary/locale/es.yml
index 1673d6a17..6f442b2c8 100644
--- a/modules/entry/front/summary/locale/es.yml
+++ b/modules/entry/front/summary/locale/es.yml
@@ -1,3 +1,8 @@
Inventory: Inventario
Virtual: Redada
-Entry: Entrada
\ No newline at end of file
+Entry: Entrada
+Stickers: Etiquetas
+Item size: Tamaño
+Item type: Tipo
+Minimum price: Precio mínimo
+Buys: Compras
diff --git a/modules/entry/front/summary/style.scss b/modules/entry/front/summary/style.scss
index 1374d2ec7..27d361056 100644
--- a/modules/entry/front/summary/style.scss
+++ b/modules/entry/front/summary/style.scss
@@ -3,4 +3,18 @@
vn-entry-summary .summary {
max-width: $width-lg;
-}
\ No newline at end of file
+
+ .dark-row {
+ background-color: lighten($color-marginal, 10%);
+ }
+
+ tbody {
+ border: 2px solid $color-marginal;
+ }
+
+ tr {
+ margin-bottom: 10px;
+ }
+}
+
+$color-font-link-medium: lighten($color-font-link, 20%)
\ No newline at end of file
diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html
index 093d9edf7..fe22e4dd8 100644
--- a/modules/invoiceOut/front/descriptor/index.html
+++ b/modules/invoiceOut/front/descriptor/index.html
@@ -37,8 +37,12 @@
value="{{$ctrl.invoiceOut.amount | currency: 'EUR': 2}}">
+ label="Client">
+
+ {{$ctrl.invoiceOut.client.name}}
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js
index 372648dd6..d953d1938 100644
--- a/modules/item/back/methods/item-image-queue/downloadImages.js
+++ b/modules/item/back/methods/item-image-queue/downloadImages.js
@@ -20,37 +20,68 @@ module.exports = Self => {
const models = Self.app.models;
try {
- const imageQueue = await Self.find({limit: 25});
- const rootPath = models.Image.getPath();
- const tempPath = path.join(rootPath, 'temp');
+ const tempPath = path.join('/tmp/salix-image');
// Create temporary path
await fs.mkdir(tempPath, {recursive: true});
- for (let image of imageQueue) {
+ const timer = setInterval(async() => {
+ const image = await Self.findOne({
+ where: {error: null, url: {neq: null}}
+ });
+
+ // Exit loop
+ if (!image) return clearInterval(timer);
+
const fileName = `${image.itemFk}.png`;
const filePath = path.join(tempPath, fileName);
- const file = fs.createWriteStream(filePath);
- https.get(image.url, async response => {
- response.pipe(file);
+ const writeStream = fs.createWriteStream(filePath);
+ writeStream.on('open', () => {
+ https.get(image.url, async response => {
+ if (response.statusCode != 200) {
+ const error = new Error(`Could not download the image. Status code ${response.statusCode}`);
+
+ return await errorHandler(image.itemFk, error, filePath);
+ }
+
+ response.pipe(writeStream);
+ }).on('error', async error => {
+ await errorHandler(image.itemFk, error, filePath);
+ });
});
- file.on('finish', async function() {
- await models.Image.registerImage('catalog', fileName, filePath);
- await image.destroy();
+ writeStream.on('error', async error => {
+ await errorHandler(image.itemFk, error, filePath);
});
- file.on('error', err => {
- fs.unlink(filePath);
-
- throw err;
+ writeStream.on('finish', async function() {
+ try {
+ await models.Image.registerImage('catalog', fileName, filePath);
+ await image.destroy();
+ } catch (error) {
+ await errorHandler(image.itemFk, error, filePath);
+ }
});
+ }, 1000);
+ } catch (error) {
+ throw new Error('Try-catch error: ', error);
+ }
+
+ async function errorHandler(rowId, error, filePath) {
+ try {
+ const row = await Self.findById(rowId);
+
+ if (!row)
+ throw new Error(`Could not update due error ${error}`);
+
+ await row.updateAttribute('error', error);
+
+ if (filePath && fs.existsSync(filePath))
+ await fs.unlink(filePath);
+ } catch (err) {
+ throw new Error(`ErrorHandler error: ${err}`);
}
-
- return imageQueue;
- } catch (e) {
- throw e;
}
};
};
diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js
index ad7edfa8c..1fefab77e 100644
--- a/modules/item/back/methods/item/filter.js
+++ b/modules/item/back/methods/item/filter.js
@@ -12,42 +12,38 @@ module.exports = Self => {
arg: 'filter',
type: 'Object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
- http: {source: 'query'}
}, {
arg: 'tags',
type: ['Object'],
description: 'List of tags to filter with',
- http: {source: 'query'}
}, {
arg: 'search',
type: 'String',
description: `If it's and integer searchs by id, otherwise it searchs by name`,
- http: {source: 'query'}
}, {
arg: 'id',
type: 'Integer',
description: 'Item id',
- http: {source: 'query'}
}, {
arg: 'categoryFk',
type: 'Integer',
description: 'Category id',
- http: {source: 'query'}
}, {
arg: 'typeFk',
type: 'Integer',
description: 'Type id',
- http: {source: 'query'}
}, {
arg: 'isActive',
type: 'Boolean',
- description: 'Whether the the item is o not active',
- http: {source: 'query'}
+ description: 'Whether the the item is or not active',
}, {
arg: 'salesPersonFk',
type: 'Integer',
description: 'The buyer of the item',
- http: {source: 'query'}
+ }, {
+ arg: 'description',
+ type: 'String',
+ description: 'The item description',
}
],
returns: {
@@ -117,7 +113,7 @@ module.exports = Self => {
i.isActive,
t.name type,
t.workerFk buyerFk,
- u.nickname userNickname,
+ u.name userName,
intr.description AS intrastat,
i.stems,
ori.code AS origin,
diff --git a/modules/item/back/methods/item/getCard.js b/modules/item/back/methods/item/getCard.js
index 9780c5601..69b5c1116 100644
--- a/modules/item/back/methods/item/getCard.js
+++ b/modules/item/back/methods/item/getCard.js
@@ -37,7 +37,7 @@ module.exports = Self => {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/item/back/methods/item/getLastEntries.js b/modules/item/back/methods/item/getLastEntries.js
deleted file mode 100644
index a438afcb6..000000000
--- a/modules/item/back/methods/item/getLastEntries.js
+++ /dev/null
@@ -1,28 +0,0 @@
-module.exports = Self => {
- Self.remoteMethod('getLastEntries', {
- description: 'Returns last entries',
- accessType: 'READ',
- accepts: [{
- arg: 'filter',
- type: 'object',
- required: true,
- description: 'itemFk, id'
- }],
- returns: {
- type: 'Array',
- root: true
- },
- http: {
- path: `/getLastEntries`,
- verb: 'GET'
- }
- });
-
- Self.getLastEntries = async filter => {
- let where = filter.where;
- let query = `CALL vn.itemLastEntries(?, ?)`;
- let [lastEntries] = await Self.rawSql(query, [where.itemFk, where.date]);
-
- return lastEntries;
- };
-};
diff --git a/modules/item/back/methods/item/getSummary.js b/modules/item/back/methods/item/getSummary.js
index fd52951d7..698984572 100644
--- a/modules/item/back/methods/item/getSummary.js
+++ b/modules/item/back/methods/item/getSummary.js
@@ -38,7 +38,7 @@ module.exports = Self => {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/item/back/methods/item/lastEntriesFilter.js b/modules/item/back/methods/item/lastEntriesFilter.js
new file mode 100644
index 000000000..63e154b9e
--- /dev/null
+++ b/modules/item/back/methods/item/lastEntriesFilter.js
@@ -0,0 +1,62 @@
+
+const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
+
+module.exports = Self => {
+ Self.remoteMethod('lastEntriesFilter', {
+ description: 'Returns last entries',
+ accessType: 'READ',
+ accepts: [{
+ arg: 'filter',
+ type: 'object',
+ required: true,
+ description: 'itemFk, id'
+ }],
+ returns: {
+ type: 'Array',
+ root: true
+ },
+ http: {
+ path: `/lastEntriesFilter`,
+ verb: 'GET'
+ }
+ });
+
+ Self.lastEntriesFilter = async filter => {
+ const conn = Self.dataSource.connector;
+ const stmt = new ParameterizedSQL(
+ `SELECT
+ w.id AS warehouseFk,
+ w.name AS warehouse,
+ tr.landed,
+ b.id AS buyFk,
+ b.entryFk,
+ b.isIgnored,
+ b.price2,
+ b.price3,
+ b.stickers,
+ b.packing,
+ b.grouping,
+ b.groupingMode,
+ b.weight,
+ i.stems,
+ b.quantity,
+ b.buyingValue,
+ b.packageFk ,
+ s.id AS supplierFk,
+ s.name AS supplier
+ FROM itemType it
+ RIGHT JOIN (entry e
+ LEFT JOIN supplier s ON s.id = e.supplierFk
+ RIGHT JOIN buy b ON b.entryFk = e.id
+ LEFT JOIN item i ON i.id = b.itemFk
+ LEFT JOIN ink ON ink.id = i.inkFk
+ LEFT JOIN travel tr ON tr.id = e.travelFk
+ LEFT JOIN warehouse w ON w.id = tr.warehouseInFk
+ LEFT JOIN origin o ON o.id = i.originFk
+ ) ON it.id = i.typeFk
+ LEFT JOIN edi.ekt ek ON b.ektFk = ek.id`);
+ stmt.merge(conn.makeSuffix(filter));
+
+ return conn.executeStmt(stmt);
+ };
+};
diff --git a/modules/item/back/methods/item/specs/getLastEntries.spec.js b/modules/item/back/methods/item/specs/getLastEntries.spec.js
deleted file mode 100644
index 5c996d8e3..000000000
--- a/modules/item/back/methods/item/specs/getLastEntries.spec.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const app = require('vn-loopback/server/server');
-
-describe('item getLastEntries()', () => {
- it('should return one entry for a given item', async() => {
- let date = new Date();
- let filter = {where: {itemFk: 1, date: date}};
- let result = await app.models.Item.getLastEntries(filter);
-
- expect(result.length).toEqual(1);
- });
-
- it('should return five entries for a given item', async() => {
- let date = new Date();
-
- date.setMonth(date.getMonth() - 2, 1);
-
- let filter = {where: {itemFk: 1, date: date}};
- let result = await app.models.Item.getLastEntries(filter);
-
- expect(result.length).toEqual(5);
- });
-});
diff --git a/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js b/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js
new file mode 100644
index 000000000..f64bfed8a
--- /dev/null
+++ b/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js
@@ -0,0 +1,24 @@
+const app = require('vn-loopback/server/server');
+
+describe('item lastEntriesFilter()', () => {
+ const minDate = new Date(value);
+ minHour.setHours(0, 0, 0, 0);
+ const maxDate = new Date(value);
+ maxHour.setHours(23, 59, 59, 59);
+
+ it('should return one entry for a given item', async() => {
+ const filter = {where: {itemFk: 1, landed: {between: [minDate, maxDate]}}};
+ const result = await app.models.Item.lastEntriesFilter(filter);
+
+ expect(result.length).toEqual(1);
+ });
+
+ it('should return five entries for a given item', async() => {
+ minDate.setMonth(minDate.getMonth() - 2, 1);
+
+ const filter = {where: {itemFk: 1, landed: {between: [minDate, maxDate]}}};
+ const result = await app.models.Item.lastEntriesFilter(filter);
+
+ expect(result.length).toEqual(5);
+ });
+});
diff --git a/modules/item/back/models/item-image-queue.json b/modules/item/back/models/item-image-queue.json
index 61cb7b018..6e248ac96 100644
--- a/modules/item/back/models/item-image-queue.json
+++ b/modules/item/back/models/item-image-queue.json
@@ -16,6 +16,10 @@
"url": {
"type": "String",
"required": true
+ },
+ "error": {
+ "type": "String",
+ "required": true
}
},
"relations": {
diff --git a/modules/item/back/models/item.js b/modules/item/back/models/item.js
index d273404ea..9ddd056e6 100644
--- a/modules/item/back/models/item.js
+++ b/modules/item/back/models/item.js
@@ -5,7 +5,7 @@ module.exports = Self => {
require('../methods/item/clone')(Self);
require('../methods/item/updateTaxes')(Self);
require('../methods/item/getBalance')(Self);
- require('../methods/item/getLastEntries')(Self);
+ require('../methods/item/lastEntriesFilter')(Self);
require('../methods/item/getSummary')(Self);
require('../methods/item/getCard')(Self);
require('../methods/item/regularize')(Self);
diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json
index 5d2e47d2a..c5af8890b 100644
--- a/modules/item/back/models/item.json
+++ b/modules/item/back/models/item.json
@@ -122,6 +122,9 @@
"mysql": {
"columnName": "expenceFk"
}
+ },
+ "minPrice": {
+ "type": "number"
}
},
"relations": {
diff --git a/modules/item/back/models/supplier.json b/modules/item/back/models/supplier.json
index bc13e79b9..41fc9c45c 100644
--- a/modules/item/back/models/supplier.json
+++ b/modules/item/back/models/supplier.json
@@ -33,13 +33,13 @@
"retAccount": {
"type": "Number"
},
- "commision": {
+ "commission": {
"type": "Boolean"
},
"created": {
"type": "Date"
},
- "poscodeFk": {
+ "postcodeFk": {
"type": "Number"
},
"isActive": {
diff --git a/modules/item/front/basic-data/index.html b/modules/item/front/basic-data/index.html
index 7b3504b3c..99146deb0 100644
--- a/modules/item/front/basic-data/index.html
+++ b/modules/item/front/basic-data/index.html
@@ -109,6 +109,14 @@
ng-model="$ctrl.item.density"
rule>
+
+
+ label="Buyer">
+
+ {{$ctrl.item.itemType.worker.user.name}}
+
+
+
\ No newline at end of file
diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html
index 0ee6a8815..01128ed74 100644
--- a/modules/item/front/index/index.html
+++ b/modules/item/front/index/index.html
@@ -8,24 +8,24 @@
+ vn-smart-table="itemIndex">
-
+
Id
- Grouping
- Packing
- Description
- Stems
- Size
- Niche
- Type
- Category
- Intrastat
- Origin
- Buyer
- Density
- Active
+ Grouping
+ Packing
+ Description
+ Stems
+ Size
+ Niche
+ Type
+ Category
+ Intrastat
+ Origin
+ Buyer
+ Density
+ Active
@@ -70,11 +70,11 @@
{{::item.intrastat}}
{{::item.origin}}
-
+
- {{::item.userNickname}}
+ {{::item.userName}}
{{::item.density}}
diff --git a/modules/item/front/last-entries/index.html b/modules/item/front/last-entries/index.html
index 6f2dba989..f306fb4f0 100644
--- a/modules/item/front/last-entries/index.html
+++ b/modules/item/front/last-entries/index.html
@@ -1,11 +1,15 @@
+ auto-load="true"
+ order="landed DESC, buyFk DESC"
+ limit="20">
-
+
@@ -20,8 +24,8 @@
Ig
- Warehouse
- Landed
+ Warehouse
+ Landed
Entry
P.P.U
P.P.P
@@ -29,11 +33,11 @@
Packing
Grouping
Stems
- Quantity
+ Quantity
Cost
Kg.
- Cube
- Provider
+ Cube
+ Provider
@@ -70,6 +74,30 @@
-
-
+
+
+
+
+
+ Filter by selection
+
+
+ Exclude selection
+
+
+ Remove filter
+
+
+ Remove all filters
+
+
+
\ No newline at end of file
diff --git a/modules/item/front/last-entries/index.js b/modules/item/front/last-entries/index.js
index 3f9d7be36..11a2bf20e 100644
--- a/modules/item/front/last-entries/index.js
+++ b/modules/item/front/last-entries/index.js
@@ -6,17 +6,23 @@ class Controller extends Section {
constructor($element, $) {
super($element, $);
- let defaultDate = new Date();
- defaultDate.setDate(defaultDate.getDate() - 75);
- defaultDate.setHours(0, 0, 0, 0);
+ const from = new Date();
+ from.setDate(from.getDate() - 75);
+ from.setHours(0, 0, 0, 0);
+
+ const to = new Date();
+ to.setDate(to.getDate() + 10);
+ to.setHours(23, 59, 59, 59);
this.filter = {
where: {
itemFk: this.$params.id,
- date: defaultDate
+ shipped: {
+ between: [from, to]
+ }
}
};
- this._date = defaultDate;
+ this._date = from;
}
set date(value) {
@@ -31,6 +37,32 @@ class Controller extends Section {
get date() {
return this._date;
}
+
+ exprBuilder(param, value) {
+ switch (param) {
+ case 'id':
+ case 'quantity':
+ case 'packageFk':
+ return {[`b.${param}`]: value};
+ case 'supplierFk':
+ return {[`s.id`]: value};
+ case 'warehouseFk':
+ return {'tr.warehouseInFk': value};
+ case 'landed':
+ return {'tr.landed': {
+ between: this.dateRange(value)}
+ };
+ }
+ }
+
+ dateRange(value) {
+ const minHour = new Date(value);
+ minHour.setHours(0, 0, 0, 0);
+ const maxHour = new Date(value);
+ maxHour.setHours(23, 59, 59, 59);
+
+ return [minHour, maxHour];
+ }
}
Controller.$inject = ['$element', '$scope'];
diff --git a/modules/item/front/request-search-panel/index.html b/modules/item/front/request-search-panel/index.html
index 453f3105b..10d5f9762 100644
--- a/modules/item/front/request-search-panel/index.html
+++ b/modules/item/front/request-search-panel/index.html
@@ -56,12 +56,14 @@
label="For me"
ng-model="filter.mine">
-
-
+
+ {{name}}
+
diff --git a/modules/item/front/request-search-panel/index.js b/modules/item/front/request-search-panel/index.js
index 82639b6e2..823346e30 100644
--- a/modules/item/front/request-search-panel/index.js
+++ b/modules/item/front/request-search-panel/index.js
@@ -1,7 +1,19 @@
import ngModule from '../module';
import SearchPanel from 'core/components/searchbar/search-panel';
+class Controller extends SearchPanel {
+ constructor($element, $) {
+ super($element, $);
+
+ this.states = [
+ {code: 'pending', name: this.$t('Pending')},
+ {code: 'accepted', name: this.$t('Accepted')},
+ {code: 'denied', name: this.$t('Denied')}
+ ];
+ }
+}
+
ngModule.vnComponent('vnRequestSearchPanel', {
template: require('./index.html'),
- controller: SearchPanel
+ controller: Controller
});
diff --git a/modules/item/front/request/index.html b/modules/item/front/request/index.html
index a677d0754..29a103746 100644
--- a/modules/item/front/request/index.html
+++ b/modules/item/front/request/index.html
@@ -24,14 +24,15 @@
Ticket ID
Shipped
- Description
+ Description
Requested
Price
- Atender
- Item
+ Atender
+ Item
Achieved
- Concept
+ Concept
State
+
@@ -83,7 +84,7 @@
{{request.itemDescription}}
- {{$ctrl.getState(request.isOk)}}
+ {{$ctrl.getState(request.isOk)}}
Save
-
\ No newline at end of file
+
+
+
+
+
+ Filter by selection
+
+
+ Exclude selection
+
+
+ Remove filter
+
+
+ Remove all filters
+
+
+
\ No newline at end of file
diff --git a/modules/item/front/request/index.js b/modules/item/front/request/index.js
index 3801c926f..231d5eda7 100644
--- a/modules/item/front/request/index.js
+++ b/modules/item/front/request/index.js
@@ -17,18 +17,19 @@ export default class Controller extends Section {
this.filterParams = {
mine: true,
from: today,
- to: nextWeek
+ to: nextWeek,
+ state: 'pending'
};
}
}
getState(isOk) {
if (isOk === null)
- return 'Nueva';
+ return 'Pending';
else if (isOk)
- return 'Aceptada';
+ return 'Accepted';
else
- return 'Denegada';
+ return 'Denied';
}
confirmRequest(request) {
@@ -92,6 +93,31 @@ export default class Controller extends Section {
this.vnApp.showSuccess(this.$t('Data saved!'));
});
}
+
+ exprBuilder(param, value) {
+ switch (param) {
+ case 'ticketFk':
+ case 'quantity':
+ case 'price':
+ case 'isOk':
+ return {[`tr.${param}`]: value};
+ case 'attenderName':
+ return {[`ua.name`]: value};
+ case 'shipped':
+ return {'t.shipped': {
+ between: this.dateRange(value)}
+ };
+ }
+ }
+
+ dateRange(value) {
+ const minHour = new Date(value);
+ minHour.setHours(0, 0, 0, 0);
+ const maxHour = new Date(value);
+ maxHour.setHours(23, 59, 59, 59);
+
+ return [minHour, maxHour];
+ }
}
ngModule.vnComponent('vnItemRequest', {
diff --git a/modules/item/front/request/index.spec.js b/modules/item/front/request/index.spec.js
index a33a21ec2..0fc061023 100644
--- a/modules/item/front/request/index.spec.js
+++ b/modules/item/front/request/index.spec.js
@@ -24,17 +24,17 @@ describe('Item', () => {
let isOk = null;
let result = controller.getState(isOk);
- expect(result).toEqual('Nueva');
+ expect(result).toEqual('Pending');
isOk = 1;
result = controller.getState(isOk);
- expect(result).toEqual('Aceptada');
+ expect(result).toEqual('Accepted');
isOk = 0;
result = controller.getState(isOk);
- expect(result).toEqual('Denegada');
+ expect(result).toEqual('Denied');
});
});
diff --git a/modules/item/front/request/locale/es.yml b/modules/item/front/request/locale/es.yml
index 33710a327..c61a00130 100644
--- a/modules/item/front/request/locale/es.yml
+++ b/modules/item/front/request/locale/es.yml
@@ -3,4 +3,7 @@ Specify the reasons to deny this request: Especifica las razones para descartar
Buy requests: Peticiones de compra
Search request by id or alias: Buscar peticiones por identificador o alias
Requested: Solicitado
-Achieved: Conseguido
\ No newline at end of file
+Achieved: Conseguido
+Pending: Pendiente
+Accepted: Aceptada
+Denied: Rechazada
\ No newline at end of file
diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html
index 938005828..bf9ab9445 100644
--- a/modules/item/front/summary/index.html
+++ b/modules/item/front/summary/index.html
@@ -36,8 +36,12 @@
-
+
+
+ {{$ctrl.summary.item.itemType.worker.user.name}}
+
@@ -105,4 +109,7 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/order/back/methods/order/catalogFilter.js b/modules/order/back/methods/order/catalogFilter.js
index 114cd2786..41529428c 100644
--- a/modules/order/back/methods/order/catalogFilter.js
+++ b/modules/order/back/methods/order/catalogFilter.js
@@ -108,11 +108,12 @@ module.exports = Self => {
tci.available,
w.lastName AS lastName,
w.firstName,
- tci.priceKg
+ tci.priceKg,
+ ink.hex
FROM tmp.ticketCalculateItem tci
JOIN vn.item i ON i.id = tci.itemFk
JOIN vn.itemType it ON it.id = i.typeFk
- LEFT JOIN vn.ink ON ink.id = i.inkFk
+ JOIN vn.ink ON ink.id = i.inkFk
JOIN vn.worker w on w.id = it.workerFk`);
// Apply order by tag
diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js
index bfa64c4dd..66b4244d0 100644
--- a/modules/order/back/methods/order/filter.js
+++ b/modules/order/back/methods/order/filter.js
@@ -136,14 +136,10 @@ module.exports = Self => {
let stmts = [];
let stmt;
- stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter');
-
stmt = new ParameterizedSQL(
- `CREATE TEMPORARY TABLE tmp.filter
- (INDEX (id))
- ENGINE = MEMORY
- SELECT
+ `SELECT
o.id,
+ o.total,
o.date_send landed,
o.date_make created,
o.customer_id clientFk,
@@ -178,36 +174,13 @@ module.exports = Self => {
}
stmt.merge(conn.makeWhere(filter.where));
- stmt.merge({
- sql: `GROUP BY o.id`
- });
+ stmt.merge(`GROUP BY o.id`);
stmt.merge(conn.makePagination(filter));
stmts.push(stmt);
- stmts.push(`
- CREATE TEMPORARY TABLE tmp.order
- (INDEX (orderFk))
- ENGINE = MEMORY
- SELECT id AS orderFk
- FROM tmp.filter`);
+ const sql = ParameterizedSQL.join(stmts, ';');
+ const result = await conn.executeStmt(sql);
- stmts.push('CALL hedera.order_getTotal()');
-
- stmt = new ParameterizedSQL(
- `SELECT f.*, ot.*
- FROM tmp.filter f
- LEFT JOIN tmp.orderTotal ot ON ot.orderFk = f.id`);
- const orderIndex = stmts.push(stmt) - 1;
-
- stmts.push(`
- DROP TEMPORARY TABLE
- tmp.order,
- tmp.orderTotal,
- tmp.filter`);
-
- let sql = ParameterizedSQL.join(stmts, ';');
- let result = await conn.executeStmt(sql);
-
- return result[orderIndex];
+ return result;
};
};
diff --git a/modules/order/back/models/order.json b/modules/order/back/models/order.json
index ab10ad194..38755c2a5 100644
--- a/modules/order/back/models/order.json
+++ b/modules/order/back/models/order.json
@@ -79,6 +79,9 @@
"mysql": {
"columnName": "confirm_date"
}
+ },
+ "total": {
+ "type": "Number"
}
},
"relations": {
diff --git a/modules/order/front/card/index.js b/modules/order/front/card/index.js
index d154b0b52..33012d0f6 100644
--- a/modules/order/front/card/index.js
+++ b/modules/order/front/card/index.js
@@ -37,7 +37,7 @@ class Controller extends ModuleCard {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/order/front/catalog-view/index.html b/modules/order/front/catalog-view/index.html
index 459a61f59..2d7492d87 100644
--- a/modules/order/front/catalog-view/index.html
+++ b/modules/order/front/catalog-view/index.html
@@ -4,6 +4,9 @@
+
{
jest.spyOn(controller, 'buildTagsFilter');
jest.spyOn(controller, 'buildOrderFilter');
- const expectedResult = [{field: 'showOrder, price', name: 'Color and price'}];
+ const expectedResult = [{field: 'showOrder, price', name: 'Color and price', priority: 999}];
const items = [{id: 1, name: 'My Item', tags: [
{tagFk: 4, name: 'Length'},
{tagFk: 5, name: 'Color'}
diff --git a/modules/order/front/descriptor/index.html b/modules/order/front/descriptor/index.html
index b16470bf2..e9f1684e5 100644
--- a/modules/order/front/descriptor/index.html
+++ b/modules/order/front/descriptor/index.html
@@ -15,8 +15,12 @@
value="{{$ctrl.$t($ctrl.order.isConfirmed ? 'Confirmed' : 'Not confirmed')}}">
+ label="Sales person">
+
+ {{$ctrl.order.client.salesPerson.user.name}}
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/order/front/locale/es.yml b/modules/order/front/locale/es.yml
index fbc384f21..c35898378 100644
--- a/modules/order/front/locale/es.yml
+++ b/modules/order/front/locale/es.yml
@@ -23,4 +23,5 @@ Created from: Creado desde
Search order by id: Buscar el pedido por identificador
order: pedido
Confirm lines: Confirmar las lineas
-Confirm: Confirmar
\ No newline at end of file
+Confirm: Confirmar
+Real hour: Hora real
\ No newline at end of file
diff --git a/modules/order/front/search-panel/locale/es.yml b/modules/order/front/search-panel/locale/es.yml
index 949f9b202..9546c7f74 100644
--- a/modules/order/front/search-panel/locale/es.yml
+++ b/modules/order/front/search-panel/locale/es.yml
@@ -7,4 +7,5 @@ Agency: Agencia
Application: Aplicación
SalesPerson: Comercial
Order confirmed: Pedido confirmado
-Show empty: Mostrar vacías
\ No newline at end of file
+Show empty: Mostrar vacías
+Search orders by id: Buscar pedido por id
\ No newline at end of file
diff --git a/modules/route/back/methods/route/filter.js b/modules/route/back/methods/route/filter.js
index eeeef1dac..c96f856f0 100644
--- a/modules/route/back/methods/route/filter.js
+++ b/modules/route/back/methods/route/filter.js
@@ -119,7 +119,7 @@ module.exports = Self => {
r.m3,
r.description,
am.name agencyName,
- u.nickname AS workerNickname,
+ u.name AS workerUserName,
v.numberPlate AS vehiclePlateNumber
FROM route r
LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
@@ -128,7 +128,6 @@ module.exports = Self => {
LEFT JOIN account.user u ON u.id = w.userFk`
);
-
stmt.merge(conn.makeSuffix(filter));
let itemsIndex = stmts.push(stmt) - 1;
diff --git a/modules/route/back/methods/route/specs/summary.spec.js b/modules/route/back/methods/route/specs/summary.spec.js
index ba976ae94..a9516f7c5 100644
--- a/modules/route/back/methods/route/specs/summary.spec.js
+++ b/modules/route/back/methods/route/specs/summary.spec.js
@@ -25,7 +25,7 @@ describe('route summary()', () => {
const result = await app.models.Route.summary(1);
const worker = result.route.worker().user();
- expect(worker.nickname).toEqual('deliveryNick');
+ expect(worker.name).toEqual('delivery');
});
it(`should return a summary object containing data from the tickets`, async() => {
diff --git a/modules/route/back/methods/route/summary.js b/modules/route/back/methods/route/summary.js
index 0a8710e88..52927d974 100644
--- a/modules/route/back/methods/route/summary.js
+++ b/modules/route/back/methods/route/summary.js
@@ -38,7 +38,7 @@ module.exports = Self => {
{
relation: 'user',
scope: {
- fields: ['id', 'nickname']
+ fields: ['id', 'name']
}
}
]
diff --git a/modules/route/front/index/index.html b/modules/route/front/index/index.html
index 16f6ad827..d095fed09 100644
--- a/modules/route/front/index/index.html
+++ b/modules/route/front/index/index.html
@@ -8,6 +8,11 @@
+
+
+
+
Id
Worker
Agency
@@ -22,12 +27,18 @@
+
+
+
+
{{::route.id | dashIfEmpty}}
- {{::route.workerNickname}}
+ {{::route.workerUserName}}
{{::route.agencyName | dashIfEmpty}}
@@ -55,9 +66,25 @@
-
-
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/route/front/index/index.js b/modules/route/front/index/index.js
index 400684a0d..9afaa862c 100644
--- a/modules/route/front/index/index.js
+++ b/modules/route/front/index/index.js
@@ -2,12 +2,46 @@ import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
+ constructor($element, $, vnReport) {
+ super($element, $);
+ this.vnReport = vnReport;
+ }
+
preview(route) {
this.routeSelected = route;
this.$.summary.show();
}
+
+ get checked() {
+ const rows = this.$.model.data || [];
+ const checkedRows = [];
+ for (let row of rows) {
+ if (row.checked)
+ checkedRows.push(row);
+ }
+
+ return checkedRows;
+ }
+
+ get totalChecked() {
+ return this.checked.length;
+ }
+
+ showRouteReport() {
+ const routes = [];
+ for (let route of this.checked)
+ routes.push(route.id);
+ const routesId = routes.join(',');
+
+ this.vnReport.show('driver-route', {
+ authorization: this.vnToken.token,
+ routeId: routesId
+ });
+ }
}
+Controller.$inject = ['$element', '$scope', 'vnReport'];
+
ngModule.vnComponent('vnRouteIndex', {
template: require('./index.html'),
controller: Controller
diff --git a/modules/route/front/index/index.spec.js b/modules/route/front/index/index.spec.js
new file mode 100644
index 000000000..e90fc7164
--- /dev/null
+++ b/modules/route/front/index/index.spec.js
@@ -0,0 +1,60 @@
+import './index.js';
+import crudModel from 'core/mocks/crud-model';
+
+describe('Component vnRouteIndex', () => {
+ let controller;
+
+ beforeEach(ngModule('route'));
+
+ beforeEach(inject($componentController => {
+ const $element = angular.element(' ');
+ controller = $componentController('vnRouteIndex', {$element});
+ controller.$.model = crudModel;
+ controller.$.model.data = [{id: 1}, {id: 2}, {id: 3}];
+ }));
+
+ describe('checked() getter', () => {
+ it('should return the checked lines', () => {
+ const data = controller.$.model.data;
+ data[0].checked = true;
+ data[2].checked = true;
+
+ const checkedRows = controller.checked;
+
+ const firstCheckedRow = checkedRows[0];
+ const secondCheckedRow = checkedRows[1];
+
+ expect(firstCheckedRow.id).toEqual(1);
+ expect(secondCheckedRow.id).toEqual(3);
+ });
+ });
+
+ describe('totalCheked() getter', () => {
+ it('should return the total checked lines', () => {
+ const data = controller.$.model.data;
+ data[0].checked = true;
+
+ const checkedRows = controller.totalChecked;
+
+ expect(checkedRows).toEqual(1);
+ });
+ });
+
+ describe('showRouteReport()', () => {
+ it('should call to the vnReport show method', () => {
+ controller.vnReport.show = jest.fn();
+
+ const data = controller.$.model.data;
+ data[0].checked = true;
+ data[2].checked = true;
+ const expectedParams = {
+ authorization: null,
+ routeId: '1,3'
+ };
+
+ controller.showRouteReport();
+
+ expect(controller.vnReport.show).toHaveBeenCalledWith('driver-route', expectedParams);
+ });
+ });
+});
diff --git a/modules/route/front/index/locale/es.yml b/modules/route/front/index/locale/es.yml
index 5a21565b5..0c09b21ee 100644
--- a/modules/route/front/index/locale/es.yml
+++ b/modules/route/front/index/locale/es.yml
@@ -1 +1,2 @@
Vehicle: Vehículo
+Download selected routes as PDF: Descargar rutas seleccionadas como PDF
\ No newline at end of file
diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html
index d99f5e012..4c45d3985 100644
--- a/modules/route/front/summary/index.html
+++ b/modules/route/front/summary/index.html
@@ -14,8 +14,12 @@
-
+
+
+ {{$ctrl.summary.route.worker.user.name}}
+
@@ -71,7 +75,7 @@
- {{ticket.id | zeroFill:6}}
+ {{ticket.id}}
@@ -106,3 +110,6 @@
+
+
diff --git a/modules/ticket/back/methods/expedition/filter.js b/modules/ticket/back/methods/expedition/filter.js
index 3ff2fcb59..79c7131ea 100644
--- a/modules/ticket/back/methods/expedition/filter.js
+++ b/modules/ticket/back/methods/expedition/filter.js
@@ -29,20 +29,24 @@ module.exports = Self => {
e.ticketFk,
e.isBox,
e.workerFk,
- i1.name namePackage,
+ i1.name packageItemName,
e.counter,
e.checked,
- i2.name nameBox,
+ i2.name freightItemName,
e.itemFk,
u.nickname userNickname,
e.created,
- e.externalId
+ e.externalId,
+ i3.name packagingName,
+ i3.id packagingItemFk,
+ e.packagingFk
FROM
vn.expedition e
LEFT JOIN vn.item i2 ON i2.id = e.itemFk
INNER JOIN vn.item i1 ON i1.id = e.isBox
- LEFT JOIN vn.worker w ON w.id = e.workerFk
- LEFT JOIN account.user u ON u.id = w.userFk
+ LEFT JOIN vn.packaging p ON p.id = e.packagingFk
+ LEFT JOIN vn.item i3 ON i3.id = p.itemFk
+ LEFT JOIN account.user u ON u.id = e.workerFk
`);
stmt.merge(Self.buildSuffix(filter, 'e'));
diff --git a/modules/ticket/back/methods/ticket-request/filter.js b/modules/ticket/back/methods/ticket-request/filter.js
index ecd88caeb..4b7b088f4 100644
--- a/modules/ticket/back/methods/ticket-request/filter.js
+++ b/modules/ticket/back/methods/ticket-request/filter.js
@@ -44,8 +44,8 @@ module.exports = Self => {
type: 'Date',
description: `Date to`
}, {
- arg: 'isOk',
- type: 'Boolean',
+ arg: 'state',
+ type: 'String',
description: `Search request by request state`
}
],
@@ -77,8 +77,13 @@ module.exports = Self => {
return {'t.id': value};
case 'attenderFk':
return {'tr.attenderFk': value};
- case 'isOk':
- return {'tr.isOk': value};
+ case 'state':
+ switch (value) {
+ case 'pending':
+ return {'tr.isOk': null};
+ default:
+ return {'tr.isOk': value};
+ }
case 'clientFk':
return {'t.clientFk': value};
case 'from':
diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js
index 801563b93..878b4278e 100644
--- a/modules/ticket/back/methods/ticket/filter.js
+++ b/modules/ticket/back/methods/ticket/filter.js
@@ -2,6 +2,7 @@
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
const buildFilter = require('vn-loopback/util/filter').buildFilter;
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
+const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('filter', {
@@ -233,7 +234,7 @@ module.exports = Self => {
});
}
- stmt.merge(conn.makeSuffix(filter));
+ stmt.merge(conn.makeWhere(filter.where));
stmts.push(stmt);
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticketGetProblems');
@@ -241,9 +242,11 @@ module.exports = Self => {
CREATE TEMPORARY TABLE tmp.ticketGetProblems
(INDEX (ticketFk))
ENGINE = MEMORY
- SELECT id ticketFk, clientFk, warehouseFk, shipped
- FROM tmp.filter
- WHERE alertLevel = 0 OR alertLevel IS NULL`);
+ SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped
+ FROM tmp.filter f
+ LEFT JOIN alertLevel al ON al.alertLevel = f.alertLevel
+ WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)
+ AND f.shipped >= CURDATE()`);
stmts.push('CALL ticketGetProblems()');
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticket');
@@ -262,6 +265,9 @@ module.exports = Self => {
LEFT JOIN tmp.ticketProblems tp ON tp.ticketFk = f.id
LEFT JOIN tmp.ticketTotal tt ON tt.ticketFk = f.id`);
+ if (args.problems != undefined && (!args.from && !args.to))
+ throw new UserError('Choose a date range or days forward');
+
let condition;
let hasProblem;
let range;
@@ -293,6 +299,7 @@ module.exports = Self => {
stmt.merge(conn.makeWhere(problems));
stmt.merge(conn.makeOrderBy(filter.order));
+ stmt.merge(conn.makeLimit(filter));
let ticketsIndex = stmts.push(stmt);
stmts.push(
diff --git a/modules/ticket/back/methods/ticket/freightCost.js b/modules/ticket/back/methods/ticket/freightCost.js
new file mode 100644
index 000000000..008121f8f
--- /dev/null
+++ b/modules/ticket/back/methods/ticket/freightCost.js
@@ -0,0 +1,26 @@
+module.exports = Self => {
+ Self.remoteMethod('freightCost', {
+ description: 'Returns the freight cost of a ticket',
+ accessType: 'READ',
+ accepts: {
+ arg: 'id',
+ type: 'number',
+ required: true,
+ description: 'ticket id',
+ http: {source: 'path'}
+ },
+ returns: {
+ type: 'Number',
+ root: true
+ },
+ http: {
+ path: `/:id/freightCost`,
+ verb: 'GET'
+ }
+ });
+
+ Self.freightCost = async ticketFk => {
+ const [freightCost] = await Self.rawSql(`SELECT vn.ticket_getFreightCost(?) total`, [ticketFk]);
+ return freightCost.total;
+ };
+};
diff --git a/modules/ticket/back/methods/ticket/getComponentsSum.js b/modules/ticket/back/methods/ticket/getComponentsSum.js
new file mode 100644
index 000000000..c5333288e
--- /dev/null
+++ b/modules/ticket/back/methods/ticket/getComponentsSum.js
@@ -0,0 +1,53 @@
+module.exports = Self => {
+ Self.remoteMethod('getComponentsSum', {
+ description: 'Returns a list of component and their sum from a ticket',
+ accessType: 'READ',
+ accepts: {
+ arg: 'id',
+ type: 'number',
+ required: true,
+ description: 'ticket id',
+ http: {source: 'path'}
+ },
+ returns: {
+ type: 'Number',
+ root: true
+ },
+ http: {
+ path: `/:id/getComponentsSum`,
+ verb: 'GET'
+ }
+ });
+ Self.getComponentsSum = async id => {
+ const models = Self.app.models;
+ let salesComponents = [];
+ let componentsSum = [];
+ let sales = await models.Sale.find({where: {ticketFk: id}});
+ let components = await models.Component.find();
+ if (sales.length > 0) {
+ for (let sale of sales) {
+ let myComponents = await models.SaleComponent.find({where: {saleFk: sale.id}});
+ salesComponents = salesComponents.concat(myComponents);
+ }
+
+ salesComponents.reduce((acumulator, currentValue) => {
+ if (!acumulator[currentValue.componentFk]) {
+ let defaultValue = 0;
+ let tarjetComponent = components.find(component => component.id === currentValue.componentFk);
+
+ acumulator[currentValue.componentFk] = {
+ componentFk: currentValue.componentFk,
+ value: defaultValue,
+ name: tarjetComponent.name
+ };
+ componentsSum.push(acumulator[currentValue.componentFk]);
+ }
+
+ acumulator[currentValue.componentFk].value += currentValue.value;
+
+ return acumulator;
+ });
+ }
+ return componentsSum;
+ };
+};
diff --git a/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js b/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js
index bd6fd327a..56375940d 100644
--- a/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js
+++ b/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js
@@ -17,7 +17,7 @@ describe('ticket deleteStowaway()', () => {
await app.models.Stowaway.rawSql(
`CALL ticketStateUpdate(?, ?)`, [shipId, 'OK']);
await app.models.Stowaway.rawSql(
- `CALL ticketStateUpdate(?, ?)`, [stowawayId, 'OK']);
+ `CALL ticketStateUpdate(?, ?)`, [stowawayId, 'FREE']);
});
it('should create an stowaway', async() => {
@@ -97,6 +97,6 @@ describe('ticket deleteStowaway()', () => {
}
});
- expect(shipState.name).toEqual('OK');
+ expect(shipState.name).toEqual('Libre');
});
});
diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js
index 4aa1b3a77..c03a41975 100644
--- a/modules/ticket/back/methods/ticket/specs/filter.spec.js
+++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js
@@ -11,7 +11,16 @@ describe('ticket filter()', () => {
});
it('should return the tickets matching the problems on true', async() => {
- const ctx = {req: {accessToken: {userId: 9}}, args: {problems: true}};
+ const yesterday = new Date();
+ yesterday.setHours(0, 0, 0, 0);
+ const today = new Date();
+ today.setHours(23, 59, 59, 59);
+
+ const ctx = {req: {accessToken: {userId: 9}}, args: {
+ problems: true,
+ from: yesterday,
+ to: today
+ }};
const filter = {};
const result = await app.models.Ticket.filter(ctx, filter);
@@ -19,11 +28,21 @@ describe('ticket filter()', () => {
});
it('should return the tickets matching the problems on false', async() => {
- const ctx = {req: {accessToken: {userId: 9}}, args: {problems: false}};
+ const yesterday = new Date();
+ yesterday.setDate(yesterday.getDate() - 1);
+ yesterday.setHours(0, 0, 0, 0);
+ const today = new Date();
+ today.setHours(23, 59, 59, 59);
+
+ const ctx = {req: {accessToken: {userId: 9}}, args: {
+ problems: false,
+ from: yesterday,
+ to: today
+ }};
const filter = {};
const result = await app.models.Ticket.filter(ctx, filter);
- expect(result.length).toEqual(20);
+ expect(result.length).toEqual(10);
});
it('should return the tickets matching the problems on null', async() => {
@@ -52,10 +71,10 @@ describe('ticket filter()', () => {
const secondRow = result[1];
const thirdRow = result[2];
- expect(result.length).toEqual(3);
- expect(firstRow.state).toEqual('Arreglar');
- expect(secondRow.state).toEqual('Arreglar');
- expect(thirdRow.state).toEqual('Arreglar');
+ expect(result.length).toEqual(7);
+ expect(firstRow.state).toEqual('Libre');
+ expect(secondRow.state).toEqual('Libre');
+ expect(thirdRow.state).toEqual('Libre');
});
it('should return the tickets that are not pending', async() => {
diff --git a/modules/ticket/back/methods/ticket/specs/freightCost.spec.js b/modules/ticket/back/methods/ticket/specs/freightCost.spec.js
new file mode 100644
index 000000000..cb8f5a562
--- /dev/null
+++ b/modules/ticket/back/methods/ticket/specs/freightCost.spec.js
@@ -0,0 +1,17 @@
+const app = require('vn-loopback/server/server');
+
+describe('ticket freightCost()', () => {
+ it('should return the freight cost of a given ticket', async() => {
+ let ticketId = 7;
+ let freightCost = await app.models.Ticket.freightCost(ticketId);
+
+ expect(freightCost).toBe(4);
+ });
+
+ it('should return null if the ticket does not exist', async() => {
+ let ticketId = 99;
+ let freightCost = await app.models.Ticket.freightCost(ticketId);
+
+ expect(freightCost).toBeNull();
+ });
+});
diff --git a/modules/ticket/back/methods/ticket/specs/getComponentsSum.spec.js b/modules/ticket/back/methods/ticket/specs/getComponentsSum.spec.js
new file mode 100644
index 000000000..4be8de3f0
--- /dev/null
+++ b/modules/ticket/back/methods/ticket/specs/getComponentsSum.spec.js
@@ -0,0 +1,20 @@
+const app = require('vn-loopback/server/server');
+
+describe('ticket getComponentsSum()', () => {
+ it('should get the list of component for the ticket sales', async() => {
+ const ticketId = 7;
+ const components = await app.models.Ticket.getComponentsSum(ticketId);
+ const length = components.length;
+ const anyComponent = components[Math.floor(Math.random() * Math.floor(length))];
+
+ expect(components.length).toBeGreaterThan(0);
+ expect(anyComponent.componentFk).toBeDefined();
+ });
+
+ it('should return 0 if the given ticket does not have sales', async() => {
+ const ticketWithoutSales = 21;
+ const components = await app.models.Ticket.getComponentsSum(ticketWithoutSales);
+
+ expect(components.length).toEqual(0);
+ });
+});
diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js
index 79a7c24d9..434cf5624 100644
--- a/modules/ticket/back/methods/ticket/summary.js
+++ b/modules/ticket/back/methods/ticket/summary.js
@@ -63,7 +63,7 @@ module.exports = Self => {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/ticket/back/models/expedition.json b/modules/ticket/back/models/expedition.json
index 4a9682e03..c0b8d6508 100644
--- a/modules/ticket/back/models/expedition.json
+++ b/modules/ticket/back/models/expedition.json
@@ -24,12 +24,6 @@
},
"counter": {
"type": "Number"
- },
- "checked": {
- "type": "Number"
- },
- "externalId": {
- "type": "Number"
}
},
"relations": {
@@ -43,7 +37,7 @@
"model": "agency-mode",
"foreignKey": "agencyModeFk"
},
- "item": {
+ "packageItem": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "itemFk"
@@ -58,10 +52,15 @@
"model": "TicketPackaging",
"foreignKey": "ticketFk"
},
- "box": {
+ "freightItem": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "isBox"
+ },
+ "packaging": {
+ "type": "belongsTo",
+ "model": "Package",
+ "foreignKey": "packagingFk"
}
}
}
diff --git a/modules/ticket/back/models/ticket.js b/modules/ticket/back/models/ticket.js
index a2891430a..1150b7367 100644
--- a/modules/ticket/back/models/ticket.js
+++ b/modules/ticket/back/models/ticket.js
@@ -30,6 +30,8 @@ module.exports = Self => {
require('../methods/ticket/deleteStowaway')(Self);
require('../methods/ticket/sendSms')(Self);
require('../methods/ticket/isLocked')(Self);
+ require('../methods/ticket/freightCost')(Self);
+ require('../methods/ticket/getComponentsSum')(Self);
Self.observe('before save', async function(ctx) {
if (ctx.isNewInstance) return;
diff --git a/modules/ticket/front/basic-data/step-one/index.js b/modules/ticket/front/basic-data/step-one/index.js
index 68f5ac54d..45fd397dd 100644
--- a/modules/ticket/front/basic-data/step-one/index.js
+++ b/modules/ticket/front/basic-data/step-one/index.js
@@ -155,7 +155,7 @@ class Controller extends Component {
let query = `Clients/${value}`;
this.$http.get(query).then(res => {
if (res.data)
- this.ticket.addressFk = res.data.defaultAddressFk;
+ this.addressId = res.data.defaultAddressFk;
});
}
diff --git a/modules/ticket/front/basic-data/step-two/index.html b/modules/ticket/front/basic-data/step-two/index.html
index 39e7753fc..fe0667c49 100644
--- a/modules/ticket/front/basic-data/step-two/index.html
+++ b/modules/ticket/front/basic-data/step-two/index.html
@@ -3,27 +3,12 @@
data="ticketUpdateActions"
auto-load="true">
-
-
- Charge difference to
-
-
-
-
-
-
Item
- Description
+ Description
Quantity
Price (PPU)
New (PPU)
@@ -51,10 +36,31 @@
- {{$ctrl.totalPrice | currency: 'EUR': 2}}
- {{$ctrl.totalNewPrice | currency: 'EUR': 2}}
- {{$ctrl.totalPriceDifference | currency: 'EUR': 2}}
+
+
+
+
Total
+
Price {{$ctrl.totalPrice | currency: 'EUR': 2}}
+
New price {{$ctrl.totalNewPrice | currency: 'EUR': 2}}
+
Difference {{$ctrl.totalPriceDifference | currency: 'EUR': 2}}
+
+
+
+
Charge difference to
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/ticket/front/basic-data/step-two/index.js b/modules/ticket/front/basic-data/step-two/index.js
index ff09bf9ff..c578106ed 100644
--- a/modules/ticket/front/basic-data/step-two/index.js
+++ b/modules/ticket/front/basic-data/step-two/index.js
@@ -1,5 +1,6 @@
import ngModule from '../../module';
import Component from 'core/lib/component';
+import './style.scss';
class Controller extends Component {
$onInit() {
diff --git a/modules/ticket/front/basic-data/step-two/locale/es.yml b/modules/ticket/front/basic-data/step-two/locale/es.yml
index 49dd7fd80..a2a07991b 100644
--- a/modules/ticket/front/basic-data/step-two/locale/es.yml
+++ b/modules/ticket/front/basic-data/step-two/locale/es.yml
@@ -2,4 +2,7 @@ Price (PPU): Precio (Ud.)
New (PPU): Nuevo (Ud.)
Difference: Diferencia
Charge difference to: Cargar diferencia a
-The ticket has been unrouted: El ticket ha sido desenrutado
\ No newline at end of file
+The ticket has been unrouted: El ticket ha sido desenrutado
+Price: Precio
+New price: Nuevo precio
+Price difference: Diferencia de precio
\ No newline at end of file
diff --git a/modules/ticket/front/basic-data/step-two/style.scss b/modules/ticket/front/basic-data/step-two/style.scss
new file mode 100644
index 000000000..82672accb
--- /dev/null
+++ b/modules/ticket/front/basic-data/step-two/style.scss
@@ -0,0 +1,9 @@
+@import "variables";
+
+.align-left {
+ text-align: left
+}
+
+.align-center {
+ text-align: center
+}
\ No newline at end of file
diff --git a/modules/ticket/front/card/index.js b/modules/ticket/front/card/index.js
index 5b3c3c405..34ec2be98 100644
--- a/modules/ticket/front/card/index.js
+++ b/modules/ticket/front/card/index.js
@@ -44,7 +44,7 @@ class Controller extends ModuleCard {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/ticket/front/component/index.html b/modules/ticket/front/component/index.html
index 20ee592c1..fb8af3219 100644
--- a/modules/ticket/front/component/index.html
+++ b/modules/ticket/front/component/index.html
@@ -7,9 +7,6 @@
auto-load="true">
-
- Base to commission {{$ctrl.base() | currency: 'EUR':3}}
-
@@ -24,7 +21,7 @@
-
+
+
+
+
Total
+
Base to commission {{$ctrl.base() | currency: 'EUR':2}}
+
Total without VAT {{$ctrl.getTotal() | currency: 'EUR': 3}}
+
+
+
Components
+
+
+ {{component.name}} {{component.value | currency: 'EUR': 3}}
+
+
+
+
+
Theorical cost
+
Price {{$ctrl.theoricalCost | currency: 'EUR': 2}}
+
+
diff --git a/modules/ticket/front/component/index.js b/modules/ticket/front/component/index.js
index a2f9e70ad..7557bfba6 100644
--- a/modules/ticket/front/component/index.js
+++ b/modules/ticket/front/component/index.js
@@ -29,11 +29,22 @@ class Controller extends Section {
}]
};
}
+ get ticket() {
+ return this._ticket;
+ }
+
+ set ticket(value) {
+ this._ticket = value;
+
+ if (!value) return;
+
+ this.getTheoricalCost();
+ this.getComponentsSum();
+ }
base() {
let sales = this.$.model.data;
let sum = 0;
-
if (!sales) return;
for (let sale of sales) {
@@ -42,9 +53,29 @@ class Controller extends Section {
sum += sale.quantity * saleComponent.value;
}
}
-
return sum;
}
+
+ getTotal() {
+ const sales = this.$.model.data;
+ let total = 0;
+ if (!sales) return;
+ for (let sale of sales) {
+ for (let saleComponent of sale.components)
+ total += sale.quantity * saleComponent.value;
+ }
+ return total;
+ }
+
+ getTheoricalCost() {
+ this.$http.get(`Tickets/${this.ticket.id}/freightCost`)
+ .then(res => this.theoricalCost = res.data);
+ }
+
+ getComponentsSum() {
+ this.$http.get(`Tickets/${this.ticket.id}/getComponentsSum`)
+ .then(res => this.componentsList = res.data);
+ }
}
ngModule.vnComponent('vnTicketComponents', {
diff --git a/modules/ticket/front/component/index.spec.js b/modules/ticket/front/component/index.spec.js
index 1cffcdb52..053248c2c 100644
--- a/modules/ticket/front/component/index.spec.js
+++ b/modules/ticket/front/component/index.spec.js
@@ -4,76 +4,72 @@ import crudModel from 'core/mocks/crud-model';
describe('ticket', () => {
describe('Component vnTicketComponents', () => {
let controller;
+ let $httpBackend;
beforeEach(ngModule('ticket'));
- beforeEach(inject(($componentController, $rootScope, $state) => {
+ beforeEach(inject(($componentController, $rootScope, $state, _$httpBackend_) => {
$state.params.id = '1';
let $scope = $rootScope.$new();
+ $httpBackend = _$httpBackend_;
$scope.model = crudModel;
$scope.model.data = [{
+ quantity: 1,
components: [
{
+ value: 5,
component: {
- name: 'valor de compra',
componentType: {
isBase: 1
}
- },
- value: 5
+ }
},
{
+ value: 5,
component: {
- name: 'reparto',
componentType: {
isBase: 0
}
- },
- value: 5
+ }
},
{
+ value: 5,
component: {
- name: 'recobro',
componentType: {
isBase: 0
}
- },
- value: 5
+ }
}
- ],
- quantity: 1
+ ]
},
{
+ quantity: 5,
components: [
{
+ value: 1,
component: {
- name: 'valor de compra',
componentType: {
isBase: 1
}
- },
- value: 1
+ }
},
{
+ value: 1,
component: {
- name: 'reparto',
componentType: {
isBase: 0
}
- },
- value: 1
+ }
},
{
+ value: 1,
component: {
- name: 'recobro',
componentType: {
isBase: 0
}
- },
- value: 1
+ }
},
- ],
- quantity: 5
+ ]
}];
const $element = angular.element(' ');
controller = $componentController('vnTicketComponents', {$element, $scope});
@@ -86,5 +82,55 @@ describe('ticket', () => {
expect(result).toEqual(10);
});
});
+
+ describe('ticket setter', () => {
+ it('should set the ticket data and then call getTheoricalCost() and getComponentsSum()', () => {
+ jest.spyOn(controller, 'getTheoricalCost');
+ jest.spyOn(controller, 'getComponentsSum');
+ controller._ticket = undefined;
+ controller.ticket = {
+ id: 7
+ };
+
+ expect(controller.ticket).toBeDefined();
+ expect(controller.getTheoricalCost).toHaveBeenCalledWith();
+ expect(controller.getComponentsSum).toHaveBeenCalledWith();
+ });
+ });
+
+ describe('getTotal()', () => {
+ it('should return the total sum of a ticket', () => {
+ let result = controller.getTotal();
+
+ expect(result).toEqual(30);
+ });
+ });
+
+ describe('getTheoricalCost()', () => {
+ it('should make a request to get the theorical cost of a ticket', () => {
+ controller._ticket = {
+ id: 7
+ };
+ $httpBackend.expect('GET', `Tickets/${controller._ticket.id}/freightCost`).respond('My freight cost');
+ controller.getTheoricalCost();
+ $httpBackend.flush();
+
+ expect(controller.theoricalCost).toBe('My freight cost');
+ });
+ });
+
+ describe('getComponentsSum()', () => {
+ it('should make a request to get the component list', () => {
+ controller._ticket = {
+ id: 7
+ };
+
+ $httpBackend.expect('GET', `Tickets/${controller._ticket.id}/getComponentsSum`).respond('My component list');
+ controller.getComponentsSum();
+ $httpBackend.flush();
+
+ expect(controller.componentsList).toBe('My component list');
+ });
+ });
});
});
diff --git a/modules/ticket/front/component/locale/es.yml b/modules/ticket/front/component/locale/es.yml
new file mode 100644
index 000000000..57dcf64e0
--- /dev/null
+++ b/modules/ticket/front/component/locale/es.yml
@@ -0,0 +1,2 @@
+Theorical cost: Porte teorico
+Total without VAT: Total sin IVA
\ No newline at end of file
diff --git a/modules/ticket/front/component/style.scss b/modules/ticket/front/component/style.scss
index d1a8ac9c4..aa4318a9e 100644
--- a/modules/ticket/front/component/style.scss
+++ b/modules/ticket/front/component/style.scss
@@ -24,4 +24,19 @@ vn-ticket-components {
}
}
}
+ .totalBox {
+ max-width: none;
+ }
+
+ .align-left {
+ text-align: left
+ }
+
+ .align-center {
+ text-align: center
+ }
+
+ .initial {
+ height: initial
+ }
}
diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html
index 1ad27aac3..f5c4891c3 100644
--- a/modules/ticket/front/descriptor/index.html
+++ b/modules/ticket/front/descriptor/index.html
@@ -90,8 +90,12 @@
value="{{$ctrl.ticket.ticketState.state.name}}">
+ label="Sales person">
+
+ {{$ctrl.ticket.client.salesPerson.user.name}}
+
Save
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/ticket/front/descriptor/index.js b/modules/ticket/front/descriptor/index.js
index 7ce94f53d..b67474427 100644
--- a/modules/ticket/front/descriptor/index.js
+++ b/modules/ticket/front/descriptor/index.js
@@ -8,7 +8,6 @@ class Controller extends Descriptor {
set ticket(value) {
this.entity = value;
- this.isTicketEditable();
}
get entity() {
@@ -18,6 +17,7 @@ class Controller extends Descriptor {
set entity(value) {
super.entity = value;
this.canStowaway();
+ this.isTicketEditable();
if (value && this.$params.sendSMS)
this.showSMSDialog();
@@ -45,7 +45,8 @@ class Controller extends Descriptor {
}
isTicketEditable() {
- this.$http.get(`Tickets/${this.$state.params.id}/isEditable`).then(res => {
+ if (!this.ticket) return;
+ this.$http.get(`Tickets/${this.id}/isEditable`).then(res => {
this.isEditable = res.data;
});
}
@@ -209,7 +210,7 @@ class Controller extends Descriptor {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/ticket/front/descriptor/index.spec.js b/modules/ticket/front/descriptor/index.spec.js
index 4904f2ff1..a725a2d4a 100644
--- a/modules/ticket/front/descriptor/index.spec.js
+++ b/modules/ticket/front/descriptor/index.spec.js
@@ -28,7 +28,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
beforeEach(inject(($componentController, _$httpBackend_, _$state_) => {
$httpBackend = _$httpBackend_;
$httpBackend.whenGET(`Tickets/${ticket.id}/canHaveStowaway`).respond(true);
- $httpBackend.whenGET(`Tickets/1/isEditable`).respond(true);
+ $httpBackend.expect('GET', `Tickets/${ticket.id}/isEditable`).respond(true);
$state = _$state_;
$state.params.id = 1;
@@ -70,7 +70,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
window.open = jasmine.createSpy('open');
const params = {
- clientId: ticket.client.id,
+ recipientId: ticket.client.id,
ticketId: ticket.id
};
controller.showDeliveryNote();
@@ -85,7 +85,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
const params = {
recipient: ticket.client.email,
- clientId: ticket.client.id,
+ recipientId: ticket.client.id,
ticketId: ticket.id
};
controller.sendDeliveryNote();
@@ -135,7 +135,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
});
describe('canStowaway()', () => {
- fit('should make a query and return if the ticket can be stowawayed', () => {
+ it('should make a query and return if the ticket can be stowawayed', () => {
controller.canStowaway();
$httpBackend.flush();
@@ -179,13 +179,10 @@ describe('Ticket Component vnTicketDescriptor', () => {
describe('loadData()', () => {
it(`should perform a get query to store the ticket data into the controller`, () => {
- controller.ticket = null;
-
- $httpBackend.expectRoute('GET', `Tickets/${ticket.id}`).respond(ticket);
- controller.id = ticket.id;
+ $httpBackend.when('GET', `Tickets/${ticket.id}/isEditable`).respond();
+ $httpBackend.expectRoute('GET', `Tickets/${ticket.id}`).respond();
+ controller.loadData();
$httpBackend.flush();
-
- expect(controller.ticket).toEqual(ticket);
});
});
});
diff --git a/modules/ticket/front/dms/index/index.html b/modules/ticket/front/dms/index/index.html
index 80ddbf899..851276a6b 100644
--- a/modules/ticket/front/dms/index/index.html
+++ b/modules/ticket/front/dms/index/index.html
@@ -51,6 +51,12 @@
{{::document.dms.description}}
+
+
+
+
@@ -60,8 +66,9 @@
- {{::document.dms.worker.user.nickname | dashIfEmpty}}
-
+ {{::document.dms.worker.user.name | dashIfEmpty}}
+
+
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
diff --git a/modules/ticket/front/dms/index/index.js b/modules/ticket/front/dms/index/index.js
index 2a67d6890..da6aa6b6f 100644
--- a/modules/ticket/front/dms/index/index.js
+++ b/modules/ticket/front/dms/index/index.js
@@ -33,7 +33,7 @@ class Controller extends Section {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
},
}
diff --git a/modules/ticket/front/expedition/index.html b/modules/ticket/front/expedition/index.html
index 3b17a3b88..fc7b473cc 100644
--- a/modules/ticket/front/expedition/index.html
+++ b/modules/ticket/front/expedition/index.html
@@ -14,12 +14,10 @@
Expedition
- Envialia
Item
Name
Package type
Counter
- Checked
Worker
Created
@@ -33,18 +31,16 @@
{{expedition.id | zeroFill:6}}
- {{expedition.externalId | zeroFill:6}}
- {{expedition.itemFk | zeroFill:6}}
+ ng-class="{link: expedition.packagingItemFk}"
+ ng-click="itemDescriptor.show($event, expedition.packagingItemFk)">
+ {{expedition.packagingFk}}
- {{::expedition.namePackage}}
- {{::expedition.nameBox}}
+ {{::expedition.packageItemName}}
+ {{::expedition.freightItemName}}
{{::expedition.counter}}
- {{::expedition.checked}}
-
+
diff --git a/modules/ticket/front/main/index.html b/modules/ticket/front/main/index.html
index bcb77cca5..7a02ce8ca 100644
--- a/modules/ticket/front/main/index.html
+++ b/modules/ticket/front/main/index.html
@@ -2,14 +2,15 @@
vn-id="model"
url="Tickets/filter"
limit="20"
- order="shipped DESC, zoneHour ASC, zoneMinute ASC, clientFk">
+ order="shipped DESC, zoneHour DESC, zoneMinute DESC, clientFk">
+ fetch-params="$ctrl.fetchParams($params)"
+ suggested-filter="$ctrl.defaultFilter">
diff --git a/modules/ticket/front/main/index.js b/modules/ticket/front/main/index.js
index bd4718176..9bbedbcc9 100644
--- a/modules/ticket/front/main/index.js
+++ b/modules/ticket/front/main/index.js
@@ -2,6 +2,14 @@ import ngModule from '../module';
import ModuleMain from 'salix/components/module-main';
export default class Ticket extends ModuleMain {
+ constructor() {
+ super();
+
+ this.defaultFilter = {
+ scopeDays: 1
+ };
+ }
+
fetchParams($params) {
if (!Object.entries($params).length)
$params.scopeDays = 1;
diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html
index 8caa2f89e..ab3277e31 100644
--- a/modules/ticket/front/sale/index.html
+++ b/modules/ticket/front/sale/index.html
@@ -58,7 +58,7 @@
- Id
+ Id
Quantity
Item
Price
@@ -102,9 +102,8 @@
ng-click="descriptor.show($event, sale.itemFk, sale.id)">
{{sale.itemFk}}
-
-
+
+
+ {{$ctrl.summary.client.salesPerson.user.name}}
+
@@ -239,4 +243,7 @@
-
\ No newline at end of file
+
+
+
diff --git a/modules/ticket/front/tracking/index/index.html b/modules/ticket/front/tracking/index/index.html
index bf22bfb98..42d2197d0 100644
--- a/modules/ticket/front/tracking/index/index.html
+++ b/modules/ticket/front/tracking/index/index.html
@@ -25,7 +25,7 @@
- {{::tracking.worker.user.nickname | dashIfEmpty}}
+ {{::tracking.worker.user.name | dashIfEmpty}}
{{::tracking.created | date:'dd/MM/yyyy HH:mm'}}
diff --git a/modules/ticket/front/tracking/index/index.js b/modules/ticket/front/tracking/index/index.js
index 5528fc1ad..38abcd8ab 100644
--- a/modules/ticket/front/tracking/index/index.js
+++ b/modules/ticket/front/tracking/index/index.js
@@ -13,7 +13,7 @@ class Controller extends Section {
include: {
relation: 'user',
scope: {
- fields: ['nickname']
+ fields: ['name']
}
}
}
diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js
index 4d1be2d0e..024448bfe 100644
--- a/modules/travel/back/methods/travel/filter.js
+++ b/modules/travel/back/methods/travel/filter.js
@@ -112,7 +112,8 @@ module.exports = Self => {
let stmts = [];
let stmt;
stmt = new ParameterizedSQL(
- `SELECT
+ `SELECT * FROM
+ (SELECT
t.id,
t.shipped,
t.landed,
@@ -132,10 +133,9 @@ module.exports = Self => {
FROM vn.travel t
JOIN vn.agencyMode am ON am.id = t.agencyFk
JOIN vn.warehouse win ON win.id = t.warehouseInFk
- JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk`
+ JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk) AS t`
);
-
stmt.merge(conn.makeSuffix(filter));
let itemsIndex = stmts.push(stmt) - 1;
diff --git a/modules/travel/front/descriptor/locale/es.yml b/modules/travel/front/descriptor/locale/es.yml
index 1f51a0132..0ae18fdbf 100644
--- a/modules/travel/front/descriptor/locale/es.yml
+++ b/modules/travel/front/descriptor/locale/es.yml
@@ -1,6 +1,6 @@
Reference: Referencia
-Wh. In: Warehouse entrada
-Wh. Out: Warehouse salida
+Wh. In: Almacén entrada
+Wh. Out: Almacén salida
Shipped: F. envío
Landed: F. entrega
Total entries: Entradas totales
\ No newline at end of file
diff --git a/modules/worker/back/methods/worker-calendar/absences.js b/modules/worker/back/methods/calendar/absences.js
similarity index 96%
rename from modules/worker/back/methods/worker-calendar/absences.js
rename to modules/worker/back/methods/calendar/absences.js
index 7ea80509b..36d71ea81 100644
--- a/modules/worker/back/methods/worker-calendar/absences.js
+++ b/modules/worker/back/methods/calendar/absences.js
@@ -45,34 +45,6 @@ module.exports = Self => {
const calendar = {totalHolidays: 0, holidaysEnjoyed: 0};
const holidays = [];
- // Get absences of year
- let absences = await Self.find({
- include: {
- relation: 'absenceType'
- },
- where: {
- workerFk: workerFk,
- dated: {between: [yearStarted, yearEnded]}
- }
- });
-
- let entitlementRate = 0;
- absences.forEach(absence => {
- const absenceType = absence.absenceType();
- const isHoliday = absenceType.code === 'holiday';
- const isHalfHoliday = absenceType.code === 'halfHoliday';
-
- if (isHoliday)
- calendar.holidaysEnjoyed += 1;
- if (isHalfHoliday)
- calendar.holidaysEnjoyed += 0.5;
-
- entitlementRate += absenceType.holidayEntitlementRate;
-
- absence.dated = new Date(absence.dated);
- absence.dated.setHours(0, 0, 0, 0);
- });
-
// Get active contracts on current year
const year = yearStarted.getFullYear();
const contracts = await models.WorkerLabour.find({
@@ -112,6 +84,39 @@ module.exports = Self => {
}
});
+ // Contracts ids
+ const contractsId = contracts.map(contract => {
+ return contract.businessFk;
+ });
+
+ // Get absences of year
+ let absences = await Self.find({
+ include: {
+ relation: 'absenceType'
+ },
+ where: {
+ businessFk: {inq: contractsId},
+ dated: {between: [yearStarted, yearEnded]}
+ }
+ });
+
+ let entitlementRate = 0;
+ absences.forEach(absence => {
+ const absenceType = absence.absenceType();
+ const isHoliday = absenceType.code === 'holiday';
+ const isHalfHoliday = absenceType.code === 'halfHoliday';
+
+ if (isHoliday)
+ calendar.holidaysEnjoyed += 1;
+ if (isHalfHoliday)
+ calendar.holidaysEnjoyed += 0.5;
+
+ entitlementRate += absenceType.holidayEntitlementRate;
+
+ absence.dated = new Date(absence.dated);
+ absence.dated.setHours(0, 0, 0, 0);
+ });
+
// Get number of worked days
let workedDays = 0;
contracts.forEach(contract => {
diff --git a/modules/worker/back/methods/worker-calendar/specs/absences.spec.js b/modules/worker/back/methods/calendar/specs/absences.spec.js
similarity index 95%
rename from modules/worker/back/methods/worker-calendar/specs/absences.spec.js
rename to modules/worker/back/methods/calendar/specs/absences.spec.js
index eb5865a17..5cd27127b 100644
--- a/modules/worker/back/methods/worker-calendar/specs/absences.spec.js
+++ b/modules/worker/back/methods/calendar/specs/absences.spec.js
@@ -17,7 +17,7 @@ xdescribe('Worker absences()', () => {
ended.setMonth(monthIndex + 1);
ended.setDate(0);
- let result = await app.models.WorkerCalendar.absences(ctx, workerFk, started, ended);
+ let result = await app.models.Calendar.absences(ctx, workerFk, started, ended);
let calendar = result[0];
let absences = result[1];
@@ -54,7 +54,7 @@ xdescribe('Worker absences()', () => {
ended.setMonth(monthIndex + 1);
ended.setDate(0);
- let result = await app.models.WorkerCalendar.absences(ctx, workerFk, started, ended);
+ let result = await app.models.Calendar.absences(ctx, workerFk, started, ended);
let calendar = result[0];
let absences = result[1];
@@ -128,7 +128,7 @@ xdescribe('Worker absences()', () => {
let ctx = {req: {accessToken: {userId: 106}}};
let workerFk = 106;
- let result = await app.models.WorkerCalendar.absences(ctx, workerFk, yearStart, yearEnd);
+ let result = await app.models.Calendar.absences(ctx, workerFk, yearStart, yearEnd);
let calendar = result[0];
let absences = result[1];
diff --git a/modules/worker/back/methods/worker/createAbsence.js b/modules/worker/back/methods/worker/createAbsence.js
index 28a2b9d9d..3163e697d 100644
--- a/modules/worker/back/methods/worker/createAbsence.js
+++ b/modules/worker/back/methods/worker/createAbsence.js
@@ -49,9 +49,9 @@ module.exports = Self => {
}
});
- return models.WorkerCalendar.create({
+ return models.Calendar.create({
businessFk: labour.businessFk,
- absenceTypeFk: absenceTypeId,
+ dayOffTypeFk: absenceTypeId,
dated: dated
});
};
diff --git a/modules/worker/back/methods/worker/deleteAbsence.js b/modules/worker/back/methods/worker/deleteAbsence.js
index ea156d7eb..0fe8f7dc8 100644
--- a/modules/worker/back/methods/worker/deleteAbsence.js
+++ b/modules/worker/back/methods/worker/deleteAbsence.js
@@ -30,7 +30,7 @@ module.exports = Self => {
if (!isSubordinate || (isSubordinate && userId == id && !isTeamBoss))
throw new UserError(`You don't have enough privileges`);
- const absence = await models.WorkerCalendar.findById(absenceId);
+ const absence = await models.Calendar.findById(absenceId);
return absence.destroy();
};
diff --git a/modules/worker/back/methods/worker/specs/createAbsence.spec.js b/modules/worker/back/methods/worker/specs/createAbsence.spec.js
index 33bc2a80e..df48cf80b 100644
--- a/modules/worker/back/methods/worker/specs/createAbsence.spec.js
+++ b/modules/worker/back/methods/worker/specs/createAbsence.spec.js
@@ -5,7 +5,7 @@ describe('Worker createAbsence()', () => {
let createdAbsence;
afterAll(async() => {
- const absence = await app.models.WorkerCalendar.findById(createdAbsence.id);
+ const absence = await app.models.Calendar.findById(createdAbsence.id);
await absence.destroy();
});
@@ -34,6 +34,6 @@ describe('Worker createAbsence()', () => {
const expectedAbsenceTypeId = 1;
expect(createdAbsence.businessFk).toEqual(expectedBusinessId);
- expect(createdAbsence.absenceTypeFk).toEqual(expectedAbsenceTypeId);
+ expect(createdAbsence.dayOffTypeFk).toEqual(expectedAbsenceTypeId);
});
});
diff --git a/modules/worker/back/methods/worker/specs/deleteAbsence.spec.js b/modules/worker/back/methods/worker/specs/deleteAbsence.spec.js
index c506ae86d..140edada8 100644
--- a/modules/worker/back/methods/worker/specs/deleteAbsence.spec.js
+++ b/modules/worker/back/methods/worker/specs/deleteAbsence.spec.js
@@ -7,9 +7,9 @@ describe('Worker deleteAbsence()', () => {
it('should return an error for a user without enough privileges', async() => {
const ctx = {req: {accessToken: {userId: 106}}};
const businessId = 106;
- createdAbsence = await app.models.WorkerCalendar.create({
+ createdAbsence = await app.models.Calendar.create({
businessFk: businessId,
- absenceTypeFk: 1,
+ dayOffTypeFk: 1,
dated: new Date()
});
@@ -31,7 +31,7 @@ describe('Worker deleteAbsence()', () => {
await app.models.Worker.deleteAbsence(ctx, workerId, createdAbsence.id);
- const deletedAbsence = await app.models.WorkerCalendar.findById(createdAbsence.id);
+ const deletedAbsence = await app.models.Calendar.findById(createdAbsence.id);
expect(deletedAbsence).toBeNull();
});
diff --git a/modules/worker/back/methods/worker/specs/updateAbsence.spec.js b/modules/worker/back/methods/worker/specs/updateAbsence.spec.js
index 689d36136..1b34cf2e0 100644
--- a/modules/worker/back/methods/worker/specs/updateAbsence.spec.js
+++ b/modules/worker/back/methods/worker/specs/updateAbsence.spec.js
@@ -5,16 +5,16 @@ describe('Worker updateAbsence()', () => {
let createdAbsence;
afterAll(async() => {
- const absence = await app.models.WorkerCalendar.findById(createdAbsence.id);
+ const absence = await app.models.Calendar.findById(createdAbsence.id);
await absence.destroy();
});
it('should return an error for a user without enough privileges', async() => {
const ctx = {req: {accessToken: {userId: 106}}};
const expectedAbsenceTypeId = 2;
- createdAbsence = await app.models.WorkerCalendar.create({
+ createdAbsence = await app.models.Calendar.create({
businessFk: 106,
- absenceTypeFk: 1,
+ dayOffTypeFk: 1,
dated: new Date()
});
@@ -33,6 +33,6 @@ describe('Worker updateAbsence()', () => {
const expectedAbsenceTypeId = 2;
const updatedAbsence = await app.models.Worker.updateAbsence(ctx, workerId, createdAbsence.id, expectedAbsenceTypeId);
- expect(updatedAbsence.absenceTypeFk).toEqual(expectedAbsenceTypeId);
+ expect(updatedAbsence.dayOffTypeFk).toEqual(expectedAbsenceTypeId);
});
});
diff --git a/modules/worker/back/methods/worker/updateAbsence.js b/modules/worker/back/methods/worker/updateAbsence.js
index 719bca7e4..7ed8992d3 100644
--- a/modules/worker/back/methods/worker/updateAbsence.js
+++ b/modules/worker/back/methods/worker/updateAbsence.js
@@ -35,8 +35,8 @@ module.exports = Self => {
if (!isSubordinate || (isSubordinate && userId == id && !isTeamBoss))
throw new UserError(`You don't have enough privileges`);
- const absence = await models.WorkerCalendar.findById(absenceId);
+ const absence = await models.Calendar.findById(absenceId);
- return absence.updateAttribute('absenceTypeFk', absenceTypeId);
+ return absence.updateAttribute('dayOffTypeFk', absenceTypeId);
};
};
diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json
index e91e8b0fc..7a498fce7 100644
--- a/modules/worker/back/model-config.json
+++ b/modules/worker/back/model-config.json
@@ -2,9 +2,9 @@
"AbsenceType": {
"dataSource": "vn"
},
- "Department": {
+ "Calendar": {
"dataSource": "vn"
- },
+ },
"CalendarHoliday": {
"dataSource": "vn"
},
@@ -14,6 +14,9 @@
"CalendarHolidaysType": {
"dataSource": "vn"
},
+ "Department": {
+ "dataSource": "vn"
+ },
"WorkCenter": {
"dataSource": "vn"
},
@@ -44,9 +47,6 @@
"WorkerDepartment": {
"dataSource": "vn"
},
- "WorkerCalendar": {
- "dataSource": "vn"
- },
"WorkerTimeControl": {
"dataSource": "vn"
},
diff --git a/modules/worker/back/models/calendar.js b/modules/worker/back/models/calendar.js
new file mode 100644
index 000000000..7b2f593e4
--- /dev/null
+++ b/modules/worker/back/models/calendar.js
@@ -0,0 +1,3 @@
+module.exports = Self => {
+ require('../methods/calendar/absences')(Self);
+};
diff --git a/modules/worker/back/models/worker-calendar.json b/modules/worker/back/models/calendar.json
similarity index 79%
rename from modules/worker/back/models/worker-calendar.json
rename to modules/worker/back/models/calendar.json
index ca802caa7..417442571 100644
--- a/modules/worker/back/models/worker-calendar.json
+++ b/modules/worker/back/models/calendar.json
@@ -1,9 +1,9 @@
{
- "name": "WorkerCalendar",
+ "name": "Calendar",
"base": "VnModel",
"options": {
"mysql": {
- "table": "workerCalendar2"
+ "table": "calendar"
}
},
"properties": {
@@ -22,7 +22,7 @@
"absenceType": {
"type": "belongsTo",
"model": "AbsenceType",
- "foreignKey": "absenceTypeFk"
+ "foreignKey": "dayOffTypeFk"
}
}
}
diff --git a/modules/worker/back/models/worker-calendar.js b/modules/worker/back/models/worker-calendar.js
deleted file mode 100644
index ea603af41..000000000
--- a/modules/worker/back/models/worker-calendar.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = Self => {
- require('../methods/worker-calendar/absences')(Self);
-};
diff --git a/modules/worker/front/calendar/index.html b/modules/worker/front/calendar/index.html
index 197fb0797..621d6c23f 100644
--- a/modules/worker/front/calendar/index.html
+++ b/modules/worker/front/calendar/index.html
@@ -29,6 +29,15 @@
{{'of' | translate}} {{$ctrl.calendar.totalHolidays}} {{'days' | translate}}
+
+
+
+
diff --git a/modules/worker/front/calendar/index.js b/modules/worker/front/calendar/index.js
index e47335804..eb2ea35cc 100644
--- a/modules/worker/front/calendar/index.js
+++ b/modules/worker/front/calendar/index.js
@@ -7,6 +7,20 @@ class Controller extends Section {
super($element, $);
this.date = new Date();
this.events = {};
+ this.buildYearFilter();
+ }
+
+ get year() {
+ return this.date.getFullYear();
+ }
+
+ set year(value) {
+ const newYear = new Date();
+ newYear.setFullYear(value);
+
+ this.date = newYear;
+
+ this.refresh().then(() => this.repaint());
}
get date() {
@@ -50,6 +64,17 @@ class Controller extends Section {
}
}
+ buildYearFilter() {
+ const currentYear = new Date().getFullYear();
+ const minRange = currentYear - 5;
+
+ const years = [];
+ for (let i = currentYear; i > minRange; i--)
+ years.push({year: i});
+
+ this.yearFilter = years;
+ }
+
getIsSubordinate() {
this.$http.get(`Workers/${this.worker.id}/isSubordinate`).then(res =>
this.isSubordinate = res.data
@@ -66,7 +91,7 @@ class Controller extends Section {
if (data.holidays) {
data.holidays.forEach(holiday => {
- const holidayDetail = holiday.detail && holiday.detail.description;
+ const holidayDetail = holiday.detail && holiday.detail.name;
const holidayType = holiday.type && holiday.type.name;
const holidayName = holidayDetail || holidayType;
@@ -117,6 +142,9 @@ class Controller extends Section {
if (!this.absenceType)
return this.vnApp.showMessage(this.$t('Choose an absence type from the right menu'));
+ if (this.year != new Date().getFullYear())
+ return this.vnApp.showMessage(this.$t('You can just add absences within the current year'));
+
const day = $days[0];
const stamp = day.getTime();
const event = this.events[stamp];
@@ -200,7 +228,7 @@ class Controller extends Section {
started: this.started,
ended: this.ended
};
- return this.$http.get(`WorkerCalendars/absences`, {params})
+ return this.$http.get(`Calendars/absences`, {params})
.then(res => this.onData(res.data));
}
}
diff --git a/modules/worker/front/calendar/index.spec.js b/modules/worker/front/calendar/index.spec.js
index 635bacca2..cb42fb316 100644
--- a/modules/worker/front/calendar/index.spec.js
+++ b/modules/worker/front/calendar/index.spec.js
@@ -22,6 +22,25 @@ describe('Worker', () => {
controller._worker = {id: 106};
}));
+ describe('year() getter', () => {
+ it(`should return the year number of the calendar date`, () => {
+ expect(controller.year).toEqual(year);
+ });
+ });
+
+ describe('year() setter', () => {
+ it(`should set the year of the calendar date`, () => {
+ jest.spyOn(controller, 'refresh').mockReturnValue(Promise.resolve());
+
+ const previousYear = year - 1;
+ controller.year = previousYear;
+
+ expect(controller.year).toEqual(previousYear);
+ expect(controller.date.getFullYear()).toEqual(previousYear);
+ expect(controller.refresh).toHaveBeenCalledWith();
+ });
+ });
+
describe('started property', () => {
it(`should return first day and month of current year`, () => {
let started = new Date(year, 0, 1);
@@ -59,11 +78,11 @@ describe('Worker', () => {
let yesterday = new Date(today.getTime());
yesterday.setDate(yesterday.getDate() - 1);
- $httpBackend.whenRoute('GET', 'WorkerCalendars/absences')
+ $httpBackend.whenRoute('GET', 'Calendars/absences')
.respond({
holidays: [
- {dated: today, detail: {description: 'New year'}},
- {dated: tomorrow, detail: {description: 'Easter'}}
+ {dated: today, detail: {name: 'New year'}},
+ {dated: tomorrow, detail: {name: 'Easter'}}
],
absences: [
{dated: today, absenceType: {name: 'Holiday', rgb: '#aaa'}},
@@ -90,7 +109,7 @@ describe('Worker', () => {
let today = new Date();
- $httpBackend.whenRoute('GET', 'WorkerCalendars/absences')
+ $httpBackend.whenRoute('GET', 'Calendars/absences')
.respond({
absences: [
{dated: today, absenceType: {name: 'Holiday', rgb: '#000'}}
@@ -141,6 +160,28 @@ describe('Worker', () => {
expect(controller.vnApp.showMessage).toHaveBeenCalledWith('Choose an absence type from the right menu');
});
+ it(`should show an snackbar message if the selected day is not within the current year`, () => {
+ jest.spyOn(controller.vnApp, 'showMessage').mockReturnThis();
+
+ const selectedDay = new Date();
+ const $event = {
+ target: {
+ closest: () => {
+ return {$ctrl: {}};
+ }
+ }
+ };
+ const $days = [selectedDay];
+ const pastYear = new Date();
+ pastYear.setFullYear(pastYear.getFullYear() - 1);
+
+ controller.date = pastYear;
+ controller.absenceType = {id: 1};
+ controller.onSelection($event, $days);
+
+ expect(controller.vnApp.showMessage).toHaveBeenCalledWith('You can just add absences within the current year');
+ });
+
it(`should call to the create() method`, () => {
jest.spyOn(controller, 'create').mockReturnThis();
@@ -316,7 +357,7 @@ describe('Worker', () => {
const expecteResponse = [{id: 1}];
const expectedParams = {workerFk: 106, started: started, ended: ended};
const serializedParams = $httpParamSerializer(expectedParams);
- $httpBackend.expect('GET', `WorkerCalendars/absences?${serializedParams}`).respond(200, expecteResponse);
+ $httpBackend.expect('GET', `Calendars/absences?${serializedParams}`).respond(200, expecteResponse);
controller.refresh();
$httpBackend.flush();
diff --git a/modules/worker/front/calendar/locale/es.yml b/modules/worker/front/calendar/locale/es.yml
index 6681f730f..68a9cf54d 100644
--- a/modules/worker/front/calendar/locale/es.yml
+++ b/modules/worker/front/calendar/locale/es.yml
@@ -1,7 +1,9 @@
Calendar: Calendario
Holidays: Vacaciones
Used: Utilizados
+Year: Año
of: de
days: días
Choose an absence type from the right menu: Elige un tipo de ausencia desde el menú de la derecha
-To start adding absences, click an absence type from the right menu and then on the day you want to add an absence: Para empezar a añadir ausencias, haz clic en un tipo de ausencia desde el menu de la derecha y después en el día que quieres añadir la ausencia
\ No newline at end of file
+To start adding absences, click an absence type from the right menu and then on the day you want to add an absence: Para empezar a añadir ausencias, haz clic en un tipo de ausencia desde el menu de la derecha y después en el día que quieres añadir la ausencia
+You can just add absences within the current year: Solo puedes añadir ausencias dentro del año actual
\ No newline at end of file
diff --git a/modules/worker/front/dms/index/index.html b/modules/worker/front/dms/index/index.html
index 4564dba44..d74d65bfa 100644
--- a/modules/worker/front/dms/index/index.html
+++ b/modules/worker/front/dms/index/index.html
@@ -18,6 +18,7 @@
Reference
Description
Original
+ File
Created
@@ -36,7 +37,13 @@
{{::document.description}}
-
+
+
+
+
+
diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js
index a9b4184b5..6b1db9e6d 100644
--- a/modules/worker/front/time-control/index.js
+++ b/modules/worker/front/time-control/index.js
@@ -95,7 +95,7 @@ class Controller extends Section {
ended: this.ended
};
- return this.$http.get(`WorkerCalendars/absences`, {params})
+ return this.$http.get(`Calendars/absences`, {params})
.then(res => this.onData(res.data));
}
diff --git a/modules/zone/back/methods/zone/deleteZone.js b/modules/zone/back/methods/zone/deleteZone.js
index baa442491..7bf807f7d 100644
--- a/modules/zone/back/methods/zone/deleteZone.js
+++ b/modules/zone/back/methods/zone/deleteZone.js
@@ -29,7 +29,8 @@ module.exports = Self => {
const options = {transaction: tx};
const filter = {
where: {
- zoneFk: id
+ zoneFk: id,
+ shipped: {gte: today}
},
include: {
relation: 'ticketState',
@@ -46,10 +47,10 @@ module.exports = Self => {
where: {userFk: userId}
}, options);
- ticketList.forEach(ticket => {
- promises.push(ticket.updateAttributes({zoneFk: null}, options));
+ await models.Ticket.rawSql('UPDATE ticket SET zoneFk = NULL WHERE zoneFk = ?', [id], options);
- if (ticket.ticketState().alertLevel == 0 && ticket.shipped >= today) {
+ ticketList.forEach(ticket => {
+ if (ticket.ticketState().alertLevel == 0) {
promises.push(models.TicketTracking.create({
ticketFk: ticket.id,
stateFk: fixingState.id,
diff --git a/modules/zone/front/descriptor/locale/es.yml b/modules/zone/front/descriptor/locale/es.yml
index 67bcbb5b7..0581ee93a 100644
--- a/modules/zone/front/descriptor/locale/es.yml
+++ b/modules/zone/front/descriptor/locale/es.yml
@@ -1,4 +1,4 @@
-This zone contains tickets: Esta zona contiene {{ticketsAmount}} tickets. ¿Seguro que quieres eliminar esta zona?
+This zone contains tickets: Esta zona contiene {{ticketsAmount}} tickets por servir. ¿Seguro que quieres eliminar esta zona?
Do you want to clone this zone?: ¿Quieres clonar esta zona?
All it's properties will be copied: Todas sus propiedades serán copiadas
Zone deleted: Zona eliminada
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 92030199a..37af78e3a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,6 +13,17 @@
"@babel/highlight": "^7.0.0"
}
},
+ "@babel/compat-data": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz",
+ "integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.12.0",
+ "invariant": "^2.2.4",
+ "semver": "^5.5.0"
+ }
+ },
"@babel/core": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz",
@@ -170,354 +181,398 @@
},
"dependencies": {
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
}
}
},
"@babel/helper-annotate-as-pure": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz",
- "integrity": "sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz",
+ "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-builder-binary-assignment-operator-visitor": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.4.tgz",
- "integrity": "sha512-Biq/d/WtvfftWZ9Uf39hbPBYDUo986m5Bb4zhkeYDGUllF43D+nUe5M6Vuo6/8JDK/0YX/uBdeoQpyaNhNugZQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz",
+ "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==",
"dev": true,
"requires": {
- "@babel/helper-explode-assignable-expression": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-explode-assignable-expression": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
- "@babel/helper-call-delegate": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.4.tgz",
- "integrity": "sha512-8JH9/B7J7tCYJ2PpWVpw9JhPuEVHztagNVuQAFBVFYluRMlpG7F1CgKEgGeL6KFqcsIa92ZYVj6DSc0XwmN1ZA==",
+ "@babel/helper-compilation-targets": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz",
+ "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/compat-data": "^7.10.4",
+ "browserslist": "^4.12.0",
+ "invariant": "^2.2.4",
+ "levenary": "^1.1.1",
+ "semver": "^5.5.0"
+ }
+ },
+ "@babel/helper-create-class-features-plugin": {
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz",
+ "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-member-expression-to-functions": "^7.10.5",
+ "@babel/helper-optimise-call-expression": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-replace-supers": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.10.4"
},
"dependencies": {
"@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.0.0"
- }
- },
- "@babel/generator": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz",
- "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==",
- "dev": true,
- "requires": {
- "@babel/types": "^7.7.4",
- "jsesc": "^2.5.1",
- "lodash": "^4.17.13",
- "source-map": "^0.5.0"
+ "@babel/highlight": "^7.10.4"
}
},
"@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
- }
- },
- "@babel/traverse": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz",
- "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==",
- "dev": true,
- "requires": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4",
- "debug": "^4.1.0",
- "globals": "^11.1.0",
- "lodash": "^4.17.13"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
- "debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
}
}
},
"@babel/helper-create-regexp-features-plugin": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.4.tgz",
- "integrity": "sha512-Mt+jBKaxL0zfOIWrfQpnfYCN7/rS6GKx6CCCfuoqVVd+17R8zNDlzVYmIi9qyb2wOk002NsmSTDymkIygDUH7A==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz",
+ "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==",
"dev": true,
"requires": {
- "@babel/helper-regex": "^7.4.4",
- "regexpu-core": "^4.6.0"
+ "@babel/helper-annotate-as-pure": "^7.10.4",
+ "@babel/helper-regex": "^7.10.4",
+ "regexpu-core": "^4.7.0"
}
},
"@babel/helper-define-map": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.4.tgz",
- "integrity": "sha512-v5LorqOa0nVQUvAUTUF3KPastvUt/HzByXNamKQ6RdJRTV7j8rLL+WB5C/MzzWAwOomxDhYFb1wLLxHqox86lg==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz",
+ "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.7.4",
- "@babel/types": "^7.7.4",
- "lodash": "^4.17.13"
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/types": "^7.10.5",
+ "lodash": "^4.17.19"
},
"dependencies": {
- "@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-explode-assignable-expression": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.4.tgz",
- "integrity": "sha512-2/SicuFrNSXsZNBxe5UGdLr+HZg+raWBLE9vC98bdYOKX/U6PY0mdGlYUJdtTDPSU0Lw0PNbKKDpwYHJLn2jLg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz",
+ "integrity": "sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==",
"dev": true,
"requires": {
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.0.0"
+ "@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz",
- "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
+ "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4",
+ "@babel/types": "^7.11.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.13",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/traverse": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz",
- "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
+ "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4",
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.11.0",
+ "@babel/types": "^7.11.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.13"
+ "lodash": "^4.17.19"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
@@ -530,6 +585,12 @@
"ms": "^2.1.1"
}
},
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -559,143 +620,194 @@
}
},
"@babel/helper-hoist-variables": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.4.tgz",
- "integrity": "sha512-wQC4xyvc1Jo/FnLirL6CEgPgPCa8M74tOdjWpRhQYapz5JC7u3NYU1zCVoVAGCE3EaIP9T1A3iW0WLJ+reZlpQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz",
+ "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-member-expression-to-functions": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.4.tgz",
- "integrity": "sha512-9KcA1X2E3OjXl/ykfMMInBK+uVdfIVakVe7W7Lg3wfXUNyS3Q1HWLFRwZIjhqiCGbslummPDnmb7vIekS0C1vw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz",
+ "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-module-imports": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz",
- "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz",
+ "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-module-transforms": {
- "version": "7.7.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz",
- "integrity": "sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz",
+ "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==",
"dev": true,
"requires": {
- "@babel/helper-module-imports": "^7.7.4",
- "@babel/helper-simple-access": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4",
- "lodash": "^4.17.13"
+ "@babel/helper-module-imports": "^7.10.4",
+ "@babel/helper-replace-supers": "^7.10.4",
+ "@babel/helper-simple-access": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.11.0",
+ "lodash": "^4.17.19"
},
"dependencies": {
- "@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/helper-optimise-call-expression": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.4.tgz",
- "integrity": "sha512-VB7gWZ2fDkSuqW6b1AKXkJWO5NyNI3bFL/kK79/30moK57blr6NbH8xcl2XcKCwOmJosftWunZqfO84IGq3ZZg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
+ "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
@@ -706,121 +818,137 @@
"dev": true
},
"@babel/helper-regex": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz",
- "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz",
+ "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==",
"dev": true,
"requires": {
- "lodash": "^4.17.13"
+ "lodash": "^4.17.19"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ }
}
},
"@babel/helper-remap-async-to-generator": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.4.tgz",
- "integrity": "sha512-Sk4xmtVdM9sA/jCI80f+KS+Md+ZHIpjuqmYPk1M7F/upHou5e4ReYmExAiu6PVe65BhJPZA2CY9x9k4BqE5klw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz",
+ "integrity": "sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.7.4",
- "@babel/helper-wrap-function": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-annotate-as-pure": "^7.10.4",
+ "@babel/helper-wrap-function": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
- "@babel/generator": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz",
- "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4",
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/generator": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
+ "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.13",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/traverse": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz",
- "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
+ "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4",
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.11.0",
+ "@babel/types": "^7.11.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.13"
- },
- "dependencies": {
- "@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
- "dev": true,
- "requires": {
- "@babel/highlight": "^7.0.0"
- }
- }
+ "lodash": "^4.17.19"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
@@ -833,6 +961,12 @@
"ms": "^2.1.1"
}
},
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -842,109 +976,119 @@
}
},
"@babel/helper-replace-supers": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.4.tgz",
- "integrity": "sha512-pP0tfgg9hsZWo5ZboYGuBn/bbYT/hdLPVSS4NMmiRJdwWhP0IznPwN9AE1JwyGsjSPLC364I0Qh5p+EPkGPNpg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz",
+ "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==",
"dev": true,
"requires": {
- "@babel/helper-member-expression-to-functions": "^7.7.4",
- "@babel/helper-optimise-call-expression": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-member-expression-to-functions": "^7.10.4",
+ "@babel/helper-optimise-call-expression": "^7.10.4",
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
"@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.0.0"
+ "@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz",
- "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
+ "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4",
+ "@babel/types": "^7.11.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.13",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/traverse": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz",
- "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
+ "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4",
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.11.0",
+ "@babel/types": "^7.11.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.13"
+ "lodash": "^4.17.19"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
@@ -957,6 +1101,12 @@
"ms": "^2.1.1"
}
},
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -966,42 +1116,96 @@
}
},
"@babel/helper-simple-access": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz",
- "integrity": "sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz",
+ "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==",
"dev": true,
"requires": {
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ }
+ },
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz",
+ "integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0"
+ },
+ "dependencies": {
+ "@babel/types": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
@@ -1014,112 +1218,126 @@
"@babel/types": "^7.4.4"
}
},
+ "@babel/helper-validator-identifier": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
+ "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
+ "dev": true
+ },
"@babel/helper-wrap-function": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz",
- "integrity": "sha512-VsfzZt6wmsocOaVU0OokwrIytHND55yvyT4BPB9AIIgwr8+x7617hetdJTsuGwygN5RC6mxA9EJztTjuwm2ofg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz",
+ "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
},
"dependencies": {
- "@babel/generator": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz",
- "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4",
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/generator": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
+ "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.13",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/traverse": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz",
- "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
+ "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4",
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.11.0",
+ "@babel/types": "^7.11.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.13"
- },
- "dependencies": {
- "@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
- "dev": true,
- "requires": {
- "@babel/highlight": "^7.0.0"
- }
- }
+ "lodash": "^4.17.19"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
@@ -1132,6 +1350,12 @@
"ms": "^2.1.1"
}
},
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -1283,84 +1507,284 @@
"dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz",
- "integrity": "sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz",
+ "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-remap-async-to-generator": "^7.7.4",
- "@babel/plugin-syntax-async-generators": "^7.7.4"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-remap-async-to-generator": "^7.10.4",
+ "@babel/plugin-syntax-async-generators": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-class-properties": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz",
+ "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-proposal-dynamic-import": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz",
- "integrity": "sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz",
+ "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-syntax-dynamic-import": "^7.7.4"
- }
- },
- "@babel/plugin-proposal-json-strings": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz",
- "integrity": "sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw==",
- "dev": true,
- "requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-syntax-json-strings": "^7.7.4"
- }
- },
- "@babel/plugin-proposal-object-rest-spread": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.7.7.tgz",
- "integrity": "sha512-3qp9I8lelgzNedI3hrhkvhaEYree6+WHnyA/q4Dza9z7iEIs1eyhWyJnetk3jJ69RT0AT4G0UhEGwyGFJ7GUuQ==",
- "dev": true,
- "requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-syntax-object-rest-spread": "^7.7.4"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0"
},
"dependencies": {
- "@babel/plugin-syntax-object-rest-spread": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz",
- "integrity": "sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg==",
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
+ "@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.8.0"
}
}
}
},
- "@babel/plugin-proposal-optional-catch-binding": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.7.4.tgz",
- "integrity": "sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w==",
+ "@babel/plugin-proposal-export-namespace-from": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz",
+ "integrity": "sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-syntax-optional-catch-binding": "^7.7.4"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-json-strings": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz",
+ "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-json-strings": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-logical-assignment-operators": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz",
+ "integrity": "sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
+ "@babel/plugin-syntax-logical-assignment-operators": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ }
+ }
+ },
+ "@babel/plugin-proposal-nullish-coalescing-operator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz",
+ "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
+ "@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ }
+ }
+ },
+ "@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz",
+ "integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+ "@babel/plugin-transform-parameters": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-optional-catch-binding": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz",
+ "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-optional-chaining": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz",
+ "integrity": "sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-proposal-private-methods": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz",
+ "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.7.tgz",
- "integrity": "sha512-80PbkKyORBUVm1fbTLrHpYdJxMThzM1UqFGh0ALEhO9TYbG86Ah9zQYAB/84axz2vcxefDLdZwWwZNlYARlu9w==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz",
+ "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-syntax-async-generators": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz",
- "integrity": "sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g==",
+ "version": "7.8.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-syntax-bigint": {
@@ -1406,6 +1830,23 @@
"@babel/helper-plugin-utils": "^7.0.0"
}
},
+ "@babel/plugin-syntax-export-namespace-from": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
+ "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.3"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
"@babel/plugin-syntax-import-meta": {
"version": "7.10.1",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.1.tgz",
@@ -1424,12 +1865,20 @@
}
},
"@babel/plugin-syntax-json-strings": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.7.4.tgz",
- "integrity": "sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg==",
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-syntax-logical-assignment-operators": {
@@ -1483,13 +1932,38 @@
}
}
},
- "@babel/plugin-syntax-optional-catch-binding": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.7.4.tgz",
- "integrity": "sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ==",
+ "@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-syntax-optional-catch-binding": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-syntax-optional-chaining": {
@@ -1510,449 +1984,758 @@
}
},
"@babel/plugin-syntax-top-level-await": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.4.tgz",
- "integrity": "sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz",
+ "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-arrow-functions": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.7.4.tgz",
- "integrity": "sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz",
+ "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-async-to-generator": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.4.tgz",
- "integrity": "sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz",
+ "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==",
"dev": true,
"requires": {
- "@babel/helper-module-imports": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-remap-async-to-generator": "^7.7.4"
+ "@babel/helper-module-imports": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-remap-async-to-generator": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-block-scoped-functions": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.7.4.tgz",
- "integrity": "sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz",
+ "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.7.4.tgz",
- "integrity": "sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg==",
+ "version": "7.11.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz",
+ "integrity": "sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "lodash": "^4.17.13"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-classes": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.4.tgz",
- "integrity": "sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz",
+ "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.7.4",
- "@babel/helper-define-map": "^7.7.4",
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-optimise-call-expression": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-replace-supers": "^7.7.4",
- "@babel/helper-split-export-declaration": "^7.7.4",
+ "@babel/helper-annotate-as-pure": "^7.10.4",
+ "@babel/helper-define-map": "^7.10.4",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-optimise-call-expression": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-replace-supers": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.10.4",
"globals": "^11.1.0"
},
"dependencies": {
- "@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
"@babel/helper-split-export-declaration": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz",
- "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/plugin-transform-computed-properties": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.7.4.tgz",
- "integrity": "sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz",
+ "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.7.4.tgz",
- "integrity": "sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz",
+ "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-dotall-regex": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.7.tgz",
- "integrity": "sha512-b4in+YlTeE/QmTgrllnb3bHA0HntYvjz8O3Mcbx75UBPJA2xhb5A8nle498VhxSXJHQefjtQxpnLPehDJ4TRlg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz",
+ "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-duplicate-keys": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.7.4.tgz",
- "integrity": "sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz",
+ "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-exponentiation-operator": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.7.4.tgz",
- "integrity": "sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz",
+ "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==",
"dev": true,
"requires": {
- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-for-of": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.7.4.tgz",
- "integrity": "sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz",
+ "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.4.tgz",
- "integrity": "sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz",
+ "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
},
"dependencies": {
- "@babel/helper-function-name": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz",
- "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==",
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/template": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz",
- "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==",
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
"dev": true
},
"@babel/template": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
- "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/plugin-transform-literals": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.7.4.tgz",
- "integrity": "sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz",
+ "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-member-expression-literals": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.7.4.tgz",
- "integrity": "sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz",
+ "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-modules-amd": {
- "version": "7.7.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz",
- "integrity": "sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz",
+ "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.7.5",
- "@babel/helper-plugin-utils": "^7.0.0",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "@babel/helper-module-transforms": "^7.10.5",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-modules-commonjs": {
- "version": "7.7.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.5.tgz",
- "integrity": "sha512-9Cq4zTFExwFhQI6MT1aFxgqhIsMWQWDVwOgLzl7PTWJHsNaqFvklAU+Oz6AQLAS0dJKTwZSOCo20INwktxpi3Q==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz",
+ "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.7.5",
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-simple-access": "^7.7.4",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-simple-access": "^7.10.4",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.4.tgz",
- "integrity": "sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz",
+ "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "@babel/helper-hoist-variables": "^7.10.4",
+ "@babel/helper-module-transforms": "^7.10.5",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-modules-umd": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.4.tgz",
- "integrity": "sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz",
+ "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.4.tgz",
- "integrity": "sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz",
+ "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.7.4"
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4"
}
},
"@babel/plugin-transform-new-target": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.7.4.tgz",
- "integrity": "sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz",
+ "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-object-super": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.7.4.tgz",
- "integrity": "sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz",
+ "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-replace-supers": "^7.7.4"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-replace-supers": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.7.7.tgz",
- "integrity": "sha512-OhGSrf9ZBrr1fw84oFXj5hgi8Nmg+E2w5L7NhnG0lPvpDtqd7dbyilM2/vR8CKbJ907RyxPh2kj6sBCSSfI9Ew==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz",
+ "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==",
"dev": true,
"requires": {
- "@babel/helper-call-delegate": "^7.7.4",
- "@babel/helper-get-function-arity": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
},
"dependencies": {
"@babel/helper-get-function-arity": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz",
- "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
"dev": true,
"requires": {
- "@babel/types": "^7.7.4"
+ "@babel/types": "^7.10.4"
}
},
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
"@babel/plugin-transform-property-literals": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.7.4.tgz",
- "integrity": "sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz",
+ "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-regenerator": {
- "version": "7.7.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.5.tgz",
- "integrity": "sha512-/8I8tPvX2FkuEyWbjRCt4qTAgZK0DVy8QRguhA524UH48RfGJy94On2ri+dCuwOpcerPRl9O4ebQkRcVzIaGBw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz",
+ "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==",
"dev": true,
"requires": {
- "regenerator-transform": "^0.14.0"
+ "regenerator-transform": "^0.14.2"
}
},
"@babel/plugin-transform-reserved-words": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.7.4.tgz",
- "integrity": "sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz",
+ "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-shorthand-properties": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.7.4.tgz",
- "integrity": "sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz",
+ "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-spread": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.7.4.tgz",
- "integrity": "sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz",
+ "integrity": "sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-sticky-regex": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.7.4.tgz",
- "integrity": "sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz",
+ "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-regex": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-template-literals": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.7.4.tgz",
- "integrity": "sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz",
+ "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-annotate-as-pure": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-typeof-symbol": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.7.4.tgz",
- "integrity": "sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz",
+ "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-transform-unicode-escapes": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz",
+ "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/plugin-transform-unicode-regex": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.4.tgz",
- "integrity": "sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz",
+ "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-create-regexp-features-plugin": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "dependencies": {
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ }
}
},
"@babel/polyfill": {
@@ -1974,86 +2757,155 @@
}
},
"@babel/preset-env": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.7.tgz",
- "integrity": "sha512-pCu0hrSSDVI7kCVUOdcMNQEbOPJ52E+LrQ14sN8uL2ALfSqePZQlKrOy+tM4uhEdYlCHi4imr8Zz2cZe9oSdIg==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.0.tgz",
+ "integrity": "sha512-2u1/k7rG/gTh02dylX2kL3S0IJNF+J6bfDSp4DI2Ma8QN6Y9x9pmAax59fsCk6QUQG0yqH47yJWA+u1I1LccAg==",
"dev": true,
"requires": {
- "@babel/helper-module-imports": "^7.7.4",
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-proposal-async-generator-functions": "^7.7.4",
- "@babel/plugin-proposal-dynamic-import": "^7.7.4",
- "@babel/plugin-proposal-json-strings": "^7.7.4",
- "@babel/plugin-proposal-object-rest-spread": "^7.7.7",
- "@babel/plugin-proposal-optional-catch-binding": "^7.7.4",
- "@babel/plugin-proposal-unicode-property-regex": "^7.7.7",
- "@babel/plugin-syntax-async-generators": "^7.7.4",
- "@babel/plugin-syntax-dynamic-import": "^7.7.4",
- "@babel/plugin-syntax-json-strings": "^7.7.4",
- "@babel/plugin-syntax-object-rest-spread": "^7.7.4",
- "@babel/plugin-syntax-optional-catch-binding": "^7.7.4",
- "@babel/plugin-syntax-top-level-await": "^7.7.4",
- "@babel/plugin-transform-arrow-functions": "^7.7.4",
- "@babel/plugin-transform-async-to-generator": "^7.7.4",
- "@babel/plugin-transform-block-scoped-functions": "^7.7.4",
- "@babel/plugin-transform-block-scoping": "^7.7.4",
- "@babel/plugin-transform-classes": "^7.7.4",
- "@babel/plugin-transform-computed-properties": "^7.7.4",
- "@babel/plugin-transform-destructuring": "^7.7.4",
- "@babel/plugin-transform-dotall-regex": "^7.7.7",
- "@babel/plugin-transform-duplicate-keys": "^7.7.4",
- "@babel/plugin-transform-exponentiation-operator": "^7.7.4",
- "@babel/plugin-transform-for-of": "^7.7.4",
- "@babel/plugin-transform-function-name": "^7.7.4",
- "@babel/plugin-transform-literals": "^7.7.4",
- "@babel/plugin-transform-member-expression-literals": "^7.7.4",
- "@babel/plugin-transform-modules-amd": "^7.7.5",
- "@babel/plugin-transform-modules-commonjs": "^7.7.5",
- "@babel/plugin-transform-modules-systemjs": "^7.7.4",
- "@babel/plugin-transform-modules-umd": "^7.7.4",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.4",
- "@babel/plugin-transform-new-target": "^7.7.4",
- "@babel/plugin-transform-object-super": "^7.7.4",
- "@babel/plugin-transform-parameters": "^7.7.7",
- "@babel/plugin-transform-property-literals": "^7.7.4",
- "@babel/plugin-transform-regenerator": "^7.7.5",
- "@babel/plugin-transform-reserved-words": "^7.7.4",
- "@babel/plugin-transform-shorthand-properties": "^7.7.4",
- "@babel/plugin-transform-spread": "^7.7.4",
- "@babel/plugin-transform-sticky-regex": "^7.7.4",
- "@babel/plugin-transform-template-literals": "^7.7.4",
- "@babel/plugin-transform-typeof-symbol": "^7.7.4",
- "@babel/plugin-transform-unicode-regex": "^7.7.4",
- "@babel/types": "^7.7.4",
- "browserslist": "^4.6.0",
- "core-js-compat": "^3.6.0",
+ "@babel/compat-data": "^7.11.0",
+ "@babel/helper-compilation-targets": "^7.10.4",
+ "@babel/helper-module-imports": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/plugin-proposal-async-generator-functions": "^7.10.4",
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
+ "@babel/plugin-proposal-dynamic-import": "^7.10.4",
+ "@babel/plugin-proposal-export-namespace-from": "^7.10.4",
+ "@babel/plugin-proposal-json-strings": "^7.10.4",
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0",
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
+ "@babel/plugin-proposal-numeric-separator": "^7.10.4",
+ "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
+ "@babel/plugin-proposal-optional-catch-binding": "^7.10.4",
+ "@babel/plugin-proposal-optional-chaining": "^7.11.0",
+ "@babel/plugin-proposal-private-methods": "^7.10.4",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.10.4",
+ "@babel/plugin-syntax-async-generators": "^7.8.0",
+ "@babel/plugin-syntax-class-properties": "^7.10.4",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
+ "@babel/plugin-syntax-json-strings": "^7.8.0",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0",
+ "@babel/plugin-syntax-top-level-await": "^7.10.4",
+ "@babel/plugin-transform-arrow-functions": "^7.10.4",
+ "@babel/plugin-transform-async-to-generator": "^7.10.4",
+ "@babel/plugin-transform-block-scoped-functions": "^7.10.4",
+ "@babel/plugin-transform-block-scoping": "^7.10.4",
+ "@babel/plugin-transform-classes": "^7.10.4",
+ "@babel/plugin-transform-computed-properties": "^7.10.4",
+ "@babel/plugin-transform-destructuring": "^7.10.4",
+ "@babel/plugin-transform-dotall-regex": "^7.10.4",
+ "@babel/plugin-transform-duplicate-keys": "^7.10.4",
+ "@babel/plugin-transform-exponentiation-operator": "^7.10.4",
+ "@babel/plugin-transform-for-of": "^7.10.4",
+ "@babel/plugin-transform-function-name": "^7.10.4",
+ "@babel/plugin-transform-literals": "^7.10.4",
+ "@babel/plugin-transform-member-expression-literals": "^7.10.4",
+ "@babel/plugin-transform-modules-amd": "^7.10.4",
+ "@babel/plugin-transform-modules-commonjs": "^7.10.4",
+ "@babel/plugin-transform-modules-systemjs": "^7.10.4",
+ "@babel/plugin-transform-modules-umd": "^7.10.4",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4",
+ "@babel/plugin-transform-new-target": "^7.10.4",
+ "@babel/plugin-transform-object-super": "^7.10.4",
+ "@babel/plugin-transform-parameters": "^7.10.4",
+ "@babel/plugin-transform-property-literals": "^7.10.4",
+ "@babel/plugin-transform-regenerator": "^7.10.4",
+ "@babel/plugin-transform-reserved-words": "^7.10.4",
+ "@babel/plugin-transform-shorthand-properties": "^7.10.4",
+ "@babel/plugin-transform-spread": "^7.11.0",
+ "@babel/plugin-transform-sticky-regex": "^7.10.4",
+ "@babel/plugin-transform-template-literals": "^7.10.4",
+ "@babel/plugin-transform-typeof-symbol": "^7.10.4",
+ "@babel/plugin-transform-unicode-escapes": "^7.10.4",
+ "@babel/plugin-transform-unicode-regex": "^7.10.4",
+ "@babel/preset-modules": "^0.1.3",
+ "@babel/types": "^7.11.0",
+ "browserslist": "^4.12.0",
+ "core-js-compat": "^3.6.2",
"invariant": "^2.2.2",
- "js-levenshtein": "^1.1.3",
+ "levenary": "^1.1.1",
"semver": "^5.5.0"
},
"dependencies": {
- "@babel/plugin-syntax-object-rest-spread": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz",
- "integrity": "sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg==",
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "dev": true
+ },
+ "@babel/plugin-syntax-class-properties": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz",
+ "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.0.0"
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ },
+ "@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-logical-assignment-operators": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ },
+ "@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
}
},
"@babel/types": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz",
- "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+ "dev": true
}
}
},
+ "@babel/preset-modules": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz",
+ "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
+ }
+ },
"@babel/register": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@babel/register/-/register-7.7.7.tgz",
@@ -2085,6 +2937,23 @@
}
}
},
+ "@babel/runtime": {
+ "version": "7.11.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
+ "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
+ "dev": true,
+ "requires": {
+ "regenerator-runtime": "^0.13.4"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.7",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
+ "dev": true
+ }
+ }
+ },
"@babel/template": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz",
@@ -2132,9 +3001,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
"ms": {
@@ -2157,9 +3026,9 @@
},
"dependencies": {
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
}
}
@@ -4955,7 +5824,7 @@
},
"util": {
"version": "0.10.3",
- "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true,
"requires": {
@@ -5382,9 +6251,9 @@
}
},
"babel-plugin-dynamic-import-node": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz",
- "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
+ "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
"dev": true,
"requires": {
"object.assign": "^4.1.0"
@@ -5917,7 +6786,7 @@
"base": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
- "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+ "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=",
"dev": true,
"requires": {
"cache-base": "^1.0.1",
@@ -6233,7 +7102,7 @@
},
"browserify-rsa": {
"version": "4.0.1",
- "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"dev": true,
"requires": {
@@ -6266,14 +7135,15 @@
}
},
"browserslist": {
- "version": "4.8.3",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.3.tgz",
- "integrity": "sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==",
+ "version": "4.14.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz",
+ "integrity": "sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30001017",
- "electron-to-chromium": "^1.3.322",
- "node-releases": "^1.1.44"
+ "caniuse-lite": "^1.0.30001111",
+ "electron-to-chromium": "^1.3.523",
+ "escalade": "^3.0.2",
+ "node-releases": "^1.1.60"
}
},
"bser": {
@@ -6292,7 +7162,7 @@
},
"buffer": {
"version": "4.9.1",
- "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"requires": {
"base64-js": "^1.0.2",
@@ -6423,7 +7293,7 @@
"cache-base": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
- "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+ "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=",
"dev": true,
"requires": {
"collection-visit": "^1.0.0",
@@ -6493,7 +7363,7 @@
},
"camelcase-keys": {
"version": "2.1.0",
- "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
"dev": true,
"requires": {
@@ -6515,9 +7385,9 @@
"integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="
},
"caniuse-lite": {
- "version": "1.0.30001019",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz",
- "integrity": "sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g==",
+ "version": "1.0.30001114",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001114.tgz",
+ "integrity": "sha512-ml/zTsfNBM+T1+mjglWRPgVsu2L76GAaADKX5f4t0pbhttEp0WMawJsHDYlFkVZkoA+89uvBRrVrEE4oqenzXQ==",
"dev": true
},
"canonical-json": {
@@ -6637,7 +7507,7 @@
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
- "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+ "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=",
"dev": true,
"requires": {
"arr-union": "^3.1.0",
@@ -7123,12 +7993,12 @@
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A=="
},
"core-js-compat": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.2.tgz",
- "integrity": "sha512-+G28dzfYGtAM+XGvB1C5AS1ZPKfQ47HLhcdeIQdZgQnJVdp7/D0m+W/TErwhgsX6CujRUk/LebB6dCrKrtJrvQ==",
+ "version": "3.6.5",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
+ "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
"dev": true,
"requires": {
- "browserslist": "^4.8.3",
+ "browserslist": "^4.8.5",
"semver": "7.0.0"
},
"dependencies": {
@@ -7760,9 +8630,9 @@
"integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug=="
},
"dot-prop": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
- "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
+ "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
"requires": {
"is-obj": "^1.0.0"
}
@@ -7794,7 +8664,7 @@
},
"readable-stream": {
"version": "1.1.14",
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true,
"requires": {
@@ -7867,15 +8737,15 @@
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
},
"electron-to-chromium": {
- "version": "1.3.328",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.328.tgz",
- "integrity": "sha512-x4XefnFxDxFwaQ01d/pppJP9meWhOIJ/gtI6/4jqkpsadq79uL7NYSaX64naLmJqvzUBjSrO3IM2+1b/W9KdPg==",
+ "version": "1.3.533",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.533.tgz",
+ "integrity": "sha512-YqAL+NXOzjBnpY+dcOKDlZybJDCOzgsq4koW3fvyty/ldTmsb4QazZpOWmVvZ2m0t5jbBf7L0lIGU3BUipwG+A==",
"dev": true
},
"elliptic": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",
- "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==",
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
+ "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
"dev": true,
"requires": {
"bn.js": "^4.4.0",
@@ -8081,6 +8951,12 @@
"es6-symbol": "^3.1.1"
}
},
+ "escalade": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz",
+ "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==",
+ "dev": true
+ },
"escape-goat": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
@@ -8889,7 +9765,7 @@
},
"file-loader": {
"version": "1.1.11",
- "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
+ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
"integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
"dev": true,
"requires": {
@@ -10075,7 +10951,7 @@
"global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
- "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
+ "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=",
"dev": true,
"requires": {
"global-prefix": "^1.0.1",
@@ -10112,7 +10988,7 @@
},
"globby": {
"version": "5.0.0",
- "resolved": "http://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
"integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
"dev": true,
"requires": {
@@ -12228,7 +13104,7 @@
},
"is-obj": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
},
"is-path-cwd": {
@@ -12258,7 +13134,7 @@
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
"dev": true,
"requires": {
"isobject": "^3.0.1"
@@ -17251,12 +18127,6 @@
"integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==",
"dev": true
},
- "js-levenshtein": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz",
- "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==",
- "dev": true
- },
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -17592,6 +18462,15 @@
"integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
"dev": true
},
+ "levenary": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz",
+ "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==",
+ "dev": true,
+ "requires": {
+ "leven": "^3.1.0"
+ }
+ },
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
@@ -17635,7 +18514,7 @@
},
"load-json-file": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"requires": {
@@ -17702,9 +18581,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
},
"lodash._basecopy": {
"version": "3.0.1",
@@ -18516,7 +19395,7 @@
},
"media-typer": {
"version": "0.3.0",
- "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mem": {
@@ -18541,7 +19420,7 @@
},
"meow": {
"version": "3.7.0",
- "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
"dev": true,
"requires": {
@@ -18990,7 +19869,7 @@
},
"multipipe": {
"version": "0.1.2",
- "resolved": "http://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
+ "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
"integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
"dev": true,
"requires": {
@@ -19369,21 +20248,10 @@
}
},
"node-releases": {
- "version": "1.1.44",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.44.tgz",
- "integrity": "sha512-NwbdvJyR7nrcGrXvKAvzc5raj/NkoJudkarh2yIpJ4t0NH4aqjUDz/486P+ynIW5eokKOfzGNRdYoLfBlomruw==",
- "dev": true,
- "requires": {
- "semver": "^6.3.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "dev": true
- }
- }
+ "version": "1.1.60",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz",
+ "integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==",
+ "dev": true
},
"node-sass": {
"version": "4.14.1",
@@ -19893,7 +20761,7 @@
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true
},
@@ -19909,7 +20777,7 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
@@ -20999,9 +21867,9 @@
"dev": true
},
"regenerate-unicode-properties": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz",
- "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==",
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
+ "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
"dev": true,
"requires": {
"regenerate": "^1.4.0"
@@ -21013,12 +21881,12 @@
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"regenerator-transform": {
- "version": "0.14.1",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz",
- "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==",
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz",
+ "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==",
"dev": true,
"requires": {
- "private": "^0.1.6"
+ "@babel/runtime": "^7.8.4"
}
},
"regex-not": {
@@ -21038,17 +21906,17 @@
"dev": true
},
"regexpu-core": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz",
- "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==",
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz",
+ "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==",
"dev": true,
"requires": {
"regenerate": "^1.4.0",
- "regenerate-unicode-properties": "^8.1.0",
- "regjsgen": "^0.5.0",
- "regjsparser": "^0.6.0",
+ "regenerate-unicode-properties": "^8.2.0",
+ "regjsgen": "^0.5.1",
+ "regjsparser": "^0.6.4",
"unicode-match-property-ecmascript": "^1.0.4",
- "unicode-match-property-value-ecmascript": "^1.1.0"
+ "unicode-match-property-value-ecmascript": "^1.2.0"
}
},
"registry-auth-token": {
@@ -21071,15 +21939,15 @@
}
},
"regjsgen": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz",
- "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==",
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
+ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
"dev": true
},
"regjsparser": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.2.tgz",
- "integrity": "sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==",
+ "version": "0.6.4",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
+ "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
"dev": true,
"requires": {
"jsesc": "~0.5.0"
@@ -21087,7 +21955,7 @@
"dependencies": {
"jsesc": {
"version": "0.5.0",
- "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
}
@@ -21474,7 +22342,7 @@
},
"safe-regex": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"dev": true,
"requires": {
@@ -21675,7 +22543,7 @@
"dependencies": {
"source-map": {
"version": "0.4.4",
- "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"dev": true,
"requires": {
@@ -22123,7 +22991,7 @@
"snapdragon-node": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
- "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+ "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=",
"dev": true,
"requires": {
"define-property": "^1.0.0",
@@ -22174,7 +23042,7 @@
"snapdragon-util": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
- "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+ "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=",
"dev": true,
"requires": {
"kind-of": "^3.2.0"
@@ -22458,7 +23326,7 @@
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
- "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+ "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=",
"dev": true,
"requires": {
"extend-shallow": "^3.0.0"
@@ -23530,7 +24398,7 @@
},
"through": {
"version": "2.3.8",
- "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"through2": {
@@ -23731,7 +24599,7 @@
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
- "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+ "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
"dev": true,
"requires": {
"nopt": "~1.0.10"
@@ -23813,7 +24681,7 @@
},
"tty-browserify": {
"version": "0.0.0",
- "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
@@ -23978,15 +24846,15 @@
}
},
"unicode-match-property-value-ecmascript": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz",
- "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
+ "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
"dev": true
},
"unicode-property-aliases-ecmascript": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz",
- "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
+ "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
"dev": true
},
"union-value": {
@@ -25495,7 +26363,7 @@
},
"xmlbuilder": {
"version": "9.0.7",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
},
"xmlchars": {
diff --git a/package.json b/package.json
index b7cca0364..f9d291467 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"@babel/core": "^7.7.7",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/polyfill": "^7.7.0",
- "@babel/preset-env": "^7.7.7",
+ "@babel/preset-env": "^7.11.0",
"@babel/register": "^7.7.7",
"angular-mocks": "^1.7.9",
"babel-jest": "^26.0.1",
diff --git a/print/core/components/report-footer/assets/css/style.css b/print/core/components/report-footer/assets/css/style.css
index e06e8c0ad..9727e6f8f 100644
--- a/print/core/components/report-footer/assets/css/style.css
+++ b/print/core/components/report-footer/assets/css/style.css
@@ -24,8 +24,9 @@ p.privacy {
text-align: center
}
-.page .pageCount {
- text-align: right
+.pageCount {
+ text-align: right;
+ float: right
}
.footer .page > div {
diff --git a/print/core/config.js b/print/core/config.js
index 864e1658a..5194762b4 100644
--- a/print/core/config.js
+++ b/print/core/config.js
@@ -4,8 +4,8 @@ let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
let configPath = `/etc/salix`;
let config = require('../config/print.json');
let configFiles = [
- `${appPath}/config/print.local.json`,
- `${appPath}/config/print.${env}.json`,
+ `../config/print.local.json`,
+ `../config/print.${env}.json`,
`${configPath}/print.json`,
`${configPath}/print.local.json`,
`${configPath}/print.${env}.json`
diff --git a/print/core/filters/currency.js b/print/core/filters/currency.js
index ec6808906..098c2fe20 100644
--- a/print/core/filters/currency.js
+++ b/print/core/filters/currency.js
@@ -2,9 +2,13 @@ const Vue = require('vue');
const config = require('../config');
const defaultLocale = config.i18n.locale;
-Vue.filter('currency', function(value, currency = 'EUR', locale = defaultLocale) {
+const currency = function(value, currency = 'EUR', locale = defaultLocale) {
if (!locale) locale = defaultLocale;
return new Intl.NumberFormat(locale, {
style: 'currency', currency
}).format(parseFloat(value));
-});
+};
+
+Vue.filter('currency', currency);
+
+module.exports = currency;
diff --git a/print/core/filters/date.js b/print/core/filters/date.js
index 5d1bc0de5..70267c76e 100644
--- a/print/core/filters/date.js
+++ b/print/core/filters/date.js
@@ -1,7 +1,11 @@
const Vue = require('vue');
const strftime = require('strftime');
-Vue.filter('date', function(value, specifiers = '%d-%m-%Y') {
+const date = function(value, specifiers = '%d-%m-%Y') {
if (!(value instanceof Date)) value = new Date(value);
return strftime(specifiers, value);
-});
+};
+
+Vue.filter('date', date);
+
+module.exports = date;
diff --git a/print/core/filters/number.js b/print/core/filters/number.js
index c785706fe..a0c5e61f7 100644
--- a/print/core/filters/number.js
+++ b/print/core/filters/number.js
@@ -2,9 +2,13 @@ const Vue = require('vue');
const config = require('../config');
const defaultLocale = config.i18n.locale;
-Vue.filter('number', function(value, locale = defaultLocale) {
+const number = function(value, locale = defaultLocale) {
if (!locale) locale = defaultLocale;
return new Intl.NumberFormat(locale, {
style: 'decimal'
}).format(parseFloat(value));
-});
+};
+
+Vue.filter('number', number);
+
+module.exports = number;
diff --git a/print/core/filters/percentage.js b/print/core/filters/percentage.js
index 078d2fd89..c535fe944 100644
--- a/print/core/filters/percentage.js
+++ b/print/core/filters/percentage.js
@@ -2,11 +2,15 @@ const Vue = require('vue');
const config = require('../config');
const defaultLocale = config.i18n.locale;
-Vue.filter('percentage', function(value, minFraction = 2, maxFraction = 2, locale = defaultLocale) {
+const percentage = function(value, minFraction = 2, maxFraction = 2, locale = defaultLocale) {
if (!locale) locale = defaultLocale;
return new Intl.NumberFormat(locale, {
style: 'percent',
minimumFractionDigits: minFraction,
maximumFractionDigits: maxFraction
}).format(parseFloat(value));
-});
+};
+
+Vue.filter('percentage', percentage);
+
+module.exports = percentage;
diff --git a/print/core/filters/specs/currency.spec.js b/print/core/filters/specs/currency.spec.js
new file mode 100644
index 000000000..5a345ddbe
--- /dev/null
+++ b/print/core/filters/specs/currency.spec.js
@@ -0,0 +1,16 @@
+// Extended locale intl polyfill
+const IntlPolyfill = require('intl');
+Intl.NumberFormat = IntlPolyfill.NumberFormat;
+Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat;
+
+import currency from '../currency.js';
+
+describe('currency filter', () => {
+ it('should filter the currency in spanish as default', () => {
+ expect(currency(999, 'EUR')).toEqual('999,00 €');
+ });
+
+ it('should filter the currency in english', () => {
+ expect(currency(999, 'EUR', 'en')).toEqual('€999.00');
+ });
+});
diff --git a/print/core/filters/specs/date.spec.js b/print/core/filters/specs/date.spec.js
new file mode 100644
index 000000000..aa38af515
--- /dev/null
+++ b/print/core/filters/specs/date.spec.js
@@ -0,0 +1,27 @@
+import date from '../date.js';
+
+describe('date filter', () => {
+ const superDuperDate = new Date('February 18, 1984 @ 11:30:00 am');
+
+ it('should filter the date as %d-%m-%Y by default', () => {
+ expect(date(superDuperDate)).toEqual('18-02-1984');
+ });
+
+ it('should filter the date as %m-%d-%Y', () => {
+ const dateFormat = '%m-%d-%Y';
+
+ expect(date(superDuperDate, dateFormat)).toEqual('02-18-1984');
+ });
+
+ it('should filter the date as %y-%d-%m', () => {
+ const dateFormat = '%y-%d-%m';
+
+ expect(date(superDuperDate, dateFormat)).toEqual('84-18-02');
+ });
+
+ it('should filter the date as %Y-%d-%m', () => {
+ const dateFormat = '%Y-%d-%m';
+
+ expect(date(superDuperDate, dateFormat)).toEqual('1984-18-02');
+ });
+});
diff --git a/print/core/filters/specs/number.spec.js b/print/core/filters/specs/number.spec.js
new file mode 100644
index 000000000..752200694
--- /dev/null
+++ b/print/core/filters/specs/number.spec.js
@@ -0,0 +1,9 @@
+import number from '../number.js';
+
+describe('number filter', () => {
+ const superDuperNumber = 18021984;
+
+ it('should filter the number with commas by default', () => {
+ expect(number(superDuperNumber)).toEqual('18,021,984');
+ });
+});
diff --git a/print/core/filters/specs/percentage.spec.js b/print/core/filters/specs/percentage.spec.js
new file mode 100644
index 000000000..0a9111cbc
--- /dev/null
+++ b/print/core/filters/specs/percentage.spec.js
@@ -0,0 +1,11 @@
+import percentage from '../percentage.js';
+
+describe('percentage filter', () => {
+ it('should filter the percentage also round it correctly', () => {
+ expect(percentage(99.9999999999999999 / 100)).toEqual('100.00%');
+ });
+
+ it('should filter the percentage and round it correctly', () => {
+ expect(percentage(1.25444444444444444 / 100)).toEqual('1.25%');
+ });
+});
diff --git a/print/core/filters/specs/uppercase.spec.js b/print/core/filters/specs/uppercase.spec.js
new file mode 100644
index 000000000..77c493359
--- /dev/null
+++ b/print/core/filters/specs/uppercase.spec.js
@@ -0,0 +1,10 @@
+import uppercase from '../uppercase.js';
+
+describe('uppercase filter', () => {
+ it('should filter the string to uppercase', () => {
+ let lowerCase = 'text';
+ let upperCase = 'TEXT';
+
+ expect(uppercase(lowerCase)).toEqual(upperCase);
+ });
+});
diff --git a/print/core/filters/uppercase.js b/print/core/filters/uppercase.js
index a4a826070..806b996f2 100644
--- a/print/core/filters/uppercase.js
+++ b/print/core/filters/uppercase.js
@@ -1,5 +1,9 @@
const Vue = require('vue');
-Vue.filter('uppercase', function(value) {
+const uppercase = function(value) {
return value.toUpperCase();
-});
+};
+
+Vue.filter('uppercase', uppercase);
+
+module.exports = uppercase;
diff --git a/print/core/report.js b/print/core/report.js
index 75eb66962..c5847fda1 100644
--- a/print/core/report.js
+++ b/print/core/report.js
@@ -28,8 +28,12 @@ class Report extends Component {
if (fs.existsSync(fullPath))
options = require(optionsPath);
- const browser = await puppeteer.launch({headless: true});
+ const browser = await puppeteer.launch({
+ headless: true,
+ args: ['--no-sandbox', '--disable-setuid-sandbox']
+ });
const page = await browser.newPage();
+ await page.emulateMedia('screen');
await page.setContent(template);
const element = await page.$('#pageFooter');
diff --git a/print/methods/closure.js b/print/methods/closure.js
index 3bcca9d4e..a1450f446 100644
--- a/print/methods/closure.js
+++ b/print/methods/closure.js
@@ -4,42 +4,179 @@ const smtp = require('../core/smtp');
const config = require('../core/config');
module.exports = app => {
- app.get('/api/closure/by-ticket', async function(req, res) {
+ app.get('/api/closure/all', async function(req, res, next) {
+ try {
+ res.status(200).json({
+ message: 'Task executed successfully'
+ });
+
+ await db.rawSql(`DROP TEMPORARY TABLE IF EXISTS tmp.ticket_close`);
+ await db.rawSql(`
+ CREATE TEMPORARY TABLE tmp.ticket_close ENGINE = MEMORY (
+ SELECT
+ t.id AS ticketFk
+ FROM expedition e
+ JOIN ticket t ON t.id = e.ticketFk
+ JOIN warehouse wh ON wh.id = t.warehouseFk AND wh.hasComission
+ JOIN ticketState ts ON ts.ticketFk = t.id
+ JOIN alertLevel al ON al.alertLevel = ts.alertLevel
+ WHERE al.code = 'PACKED'
+ AND DATE(t.shipped) BETWEEN DATE_ADD(CURDATE(), INTERVAL -2 DAY) AND CURDATE()
+ AND t.refFk IS NULL
+ GROUP BY e.ticketFk)`);
+
+ await closeAll(req.args);
+
+ await db.rawSql(`
+ UPDATE ticket t
+ JOIN ticketState ts ON t.id = ts.ticketFk
+ JOIN alertLevel al ON al.alertLevel = ts.alertLevel
+ JOIN agencyMode am ON am.id = t.agencyModeFk
+ JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
+ JOIN zone z ON z.id = t.zoneFk
+ SET t.routeFk = NULL
+ WHERE shipped BETWEEN CURDATE() AND util.dayEnd(CURDATE())
+ AND al.code NOT IN('DELIVERED','PACKED')
+ AND t.routeFk
+ AND z.name LIKE '%MADRID%'`);
+ } catch (error) {
+ next(error);
+ }
});
- app.get('/api/closure/all', async function(req, res) {
- res.status(200).json({
- message: 'Task executed successfully'
- });
+ app.get('/api/closure/by-ticket', async function(req, res, next) {
+ try {
+ const reqArgs = req.args;
+ if (!reqArgs.ticketId)
+ throw new Error('The argument ticketId is required');
+ res.status(200).json({
+ message: 'Task executed successfully'
+ });
+
+ await db.rawSql(`DROP TEMPORARY TABLE IF EXISTS tmp.ticket_close`);
+ await db.rawSql(`
+ CREATE TEMPORARY TABLE tmp.ticket_close ENGINE = MEMORY (
+ SELECT
+ t.id AS ticketFk
+ FROM expedition e
+ JOIN ticket t ON t.id = e.ticketFk
+ JOIN ticketState ts ON ts.ticketFk = t.id
+ JOIN alertLevel al ON al.alertLevel = ts.alertLevel
+ WHERE al.code = 'PACKED'
+ AND t.id = :ticketId
+ AND t.refFk IS NULL
+ GROUP BY e.ticketFk)`, {
+ ticketId: reqArgs.ticketId
+ });
+
+ await closeAll(reqArgs);
+ } catch (error) {
+ next(error);
+ }
+ });
+
+ app.get('/api/closure/by-agency', async function(req, res) {
+ try {
+ const reqArgs = req.args;
+ if (!reqArgs.agencyModeId)
+ throw new Error('The argument agencyModeId is required');
+
+ if (!reqArgs.warehouseId)
+ throw new Error('The argument warehouseId is required');
+
+ if (!reqArgs.to)
+ throw new Error('The argument to is required');
+
+ res.status(200).json({
+ message: 'Task executed successfully'
+ });
+
+ await db.rawSql(`DROP TEMPORARY TABLE IF EXISTS tmp.ticket_close`);
+ await db.rawSql(`
+ CREATE TEMPORARY TABLE tmp.ticket_close ENGINE = MEMORY (
+ SELECT
+ t.id AS ticketFk
+ FROM expedition e
+ JOIN ticket t ON t.id = e.ticketFk
+ JOIN ticketState ts ON ts.ticketFk = t.id
+ JOIN alertLevel al ON al.alertLevel = ts.alertLevel
+ WHERE al.code = 'PACKED'
+ AND t.agencyModeFk = :agencyModeId
+ AND t.warehouseFk = :warehouseId
+ AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY) AND :to
+ AND t.refFk IS NULL
+ GROUP BY e.ticketFk)`, {
+ agencyModeId: reqArgs.agencyModeId,
+ warehouseId: reqArgs.warehouseId,
+ to: reqArgs.to
+ });
+
+ await closeAll(reqArgs);
+ } catch (error) {
+ next(error);
+ }
+ });
+
+ app.get('/api/closure/by-route', async function(req, res) {
+ try {
+ const reqArgs = req.args;
+ if (!reqArgs.routeId)
+ throw new Error('The argument routeId is required');
+
+ res.status(200).json({
+ message: 'Task executed successfully'
+ });
+
+ await db.rawSql(`DROP TEMPORARY TABLE IF EXISTS tmp.ticket_close`);
+ await db.rawSql(`
+ CREATE TEMPORARY TABLE tmp.ticket_close ENGINE = MEMORY (
+ SELECT
+ t.id AS ticketFk
+ FROM expedition e
+ JOIN ticket t ON t.id = e.ticketFk
+ JOIN ticketState ts ON ts.ticketFk = t.id
+ JOIN alertLevel al ON al.alertLevel = ts.alertLevel
+ WHERE al.code = 'PACKED'
+ AND t.routeFk = :routeId
+ AND t.refFk IS NULL
+ GROUP BY e.ticketFk)`, {
+ routeId: reqArgs.routeId
+ });
+
+ await closeAll(reqArgs);
+ } catch (error) {
+ next(error);
+ }
+ });
+
+ async function closeAll(reqArgs) {
const failedtickets = [];
const tickets = await db.rawSql(`
SELECT
t.id,
t.clientFk,
c.email recipient,
- c.isToBeMailed,
c.salesPersonFk,
+ c.isToBeMailed,
+ c.hasToInvoice,
+ co.hasDailyInvoice,
eu.email salesPersonEmail
- FROM expedition e
- JOIN ticket t ON t.id = e.ticketFk
+ FROM tmp.ticket_close tt
+ JOIN ticket t ON t.id = tt.ticketFk
JOIN client c ON c.id = t.clientFk
- JOIN warehouse wh ON wh.id = t.warehouseFk AND wh.hasComission
- JOIN ticketState ts ON ts.ticketFk = t.id
- JOIN alertLevel al ON al.alertLevel = ts.alertLevel
- LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk
- WHERE al.code = 'PACKED'
- AND DATE(t.shipped) BETWEEN DATE_ADD(CURDATE(), INTERVAL -2 DAY) AND CURDATE()
- AND t.refFk IS NULL
- GROUP BY e.ticketFk`);
+ JOIN province p ON p.id = c.provinceFk
+ JOIN country co ON co.id = p.countryFk
+ LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk`);
for (const ticket of tickets) {
try {
- await db.rawSql(`CALL vn.ticket_closeByTicket(:ticketId)`, {
+ await db.rawSql(`CALL vn.ticket_close(:ticketId)`, {
ticketId: ticket.id
});
- if (!ticket.salesPersonFk || !ticket.isToBeMailed) continue;
+ const hasToInvoice = ticket.hasToInvoice && ticket.hasDailyInvoice;
+ if (!ticket.salesPersonFk || !ticket.isToBeMailed || hasToInvoice) continue;
if (!ticket.recipient) {
const body = `No se ha podido enviar el albarán ${ticket.id}
@@ -54,7 +191,6 @@ module.exports = app => {
continue;
}
- const reqArgs = req.args;
const args = Object.assign({
ticketId: ticket.id,
recipientId: ticket.clientFk,
@@ -88,5 +224,7 @@ module.exports = app => {
html: body
});
}
- });
+
+ await db.rawSql(`DROP TEMPORARY TABLE tmp.ticket_close`);
+ }
};
diff --git a/print/package-lock.json b/print/package-lock.json
index 0704fec0f..c06003044 100644
--- a/print/package-lock.json
+++ b/print/package-lock.json
@@ -4,6 +4,16 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@types/mime-types": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz",
+ "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM="
+ },
+ "agent-base": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
+ "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g=="
+ },
"ajv": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz",
@@ -54,6 +64,11 @@
"resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz",
"integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ=="
},
+ "async-limiter": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
+ },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -69,6 +84,11 @@
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ },
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -82,11 +102,19 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
- "optional": true
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
},
"camelcase": {
"version": "5.3.1",
@@ -182,11 +210,15 @@
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ },
"concat-stream": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
- "optional": true,
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@@ -198,7 +230,6 @@
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -213,7 +244,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "optional": true,
"requires": {
"safe-buffer": "~5.1.0"
}
@@ -274,7 +304,6 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "optional": true,
"requires": {
"ms": "2.0.0"
}
@@ -379,7 +408,6 @@
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
- "optional": true,
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
@@ -406,7 +434,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
- "optional": true,
"requires": {
"pend": "~1.2.0"
}
@@ -444,6 +471,11 @@
"universalify": "^0.1.0"
}
},
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+ },
"generate-function": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
@@ -465,6 +497,19 @@
"assert-plus": "^1.0.0"
}
},
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
"graceful-fs": {
"version": "4.1.15",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
@@ -548,6 +593,30 @@
"sshpk": "^1.7.0"
}
},
+ "https-proxy-agent": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz",
+ "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==",
+ "requires": {
+ "agent-base": "5",
+ "debug": "4"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ }
+ }
+ },
"iconv-lite": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.0.tgz",
@@ -561,6 +630,15 @@
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz",
"integrity": "sha512-Hiyv+mXHfFEP7LzUL/llg9RwFxxY+o9N3JVLIeG5E7iFIFAalxvRU9UZthBdYDEVnzHMgjnKJPPpay5BWf1g9g=="
},
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
@@ -595,8 +673,7 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "optional": true
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
@@ -804,6 +881,11 @@
"resolved": "https://registry.npmjs.org/mensch/-/mensch-0.3.3.tgz",
"integrity": "sha1-4gD/TdgjcX+OBWOzLj9UgfyiYrI="
},
+ "mime": {
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
+ "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA=="
+ },
"mime-db": {
"version": "1.37.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
@@ -822,17 +904,23 @@
"resolved": "https://registry.npmjs.org/mimer/-/mimer-1.0.0.tgz",
"integrity": "sha512-4ZJvCzfcwsBgPbkKXUzGoVZMWjv8IDIygkGzVc7uUYhgnK0t2LmGxxjdgH1i+pn0/KQfB5F/VKUJlfyTSOFQjg=="
},
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "optional": true
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -840,8 +928,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "optional": true
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"mysql2": {
"version": "1.7.0",
@@ -905,6 +992,14 @@
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "requires": {
+ "wrappy": "1"
+ }
+ },
"p-limit": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
@@ -931,6 +1026,11 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
},
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ },
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
@@ -944,8 +1044,7 @@
"pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
- "optional": true
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
},
"performance-now": {
"version": "2.1.0",
@@ -1014,8 +1113,7 @@
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
- "optional": true
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"progress": {
"version": "1.1.8",
@@ -1023,6 +1121,11 @@
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
"optional": true
},
+ "proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+ },
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@@ -1038,6 +1141,56 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
+ "puppeteer": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz",
+ "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==",
+ "requires": {
+ "@types/mime-types": "^2.1.0",
+ "debug": "^4.1.0",
+ "extract-zip": "^1.6.6",
+ "https-proxy-agent": "^4.0.0",
+ "mime": "^2.0.3",
+ "mime-types": "^2.1.25",
+ "progress": "^2.0.1",
+ "proxy-from-env": "^1.0.0",
+ "rimraf": "^2.6.1",
+ "ws": "^6.1.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "mime-db": {
+ "version": "1.44.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
+ "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
+ },
+ "mime-types": {
+ "version": "2.1.27",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
+ "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
+ "requires": {
+ "mime-db": "1.44.0"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
+ }
+ }
+ },
"qrcode": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.2.tgz",
@@ -1125,6 +1278,14 @@
"path-parse": "^1.0.6"
}
},
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -1303,8 +1464,7 @@
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
- "optional": true
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"universalify": {
"version": "0.1.2",
@@ -1455,6 +1615,19 @@
}
}
},
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "ws": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
+ "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
+ "requires": {
+ "async-limiter": "~1.0.0"
+ }
+ },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
@@ -1500,7 +1673,6 @@
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
- "optional": true,
"requires": {
"fd-slicer": "~1.0.1"
}
diff --git a/print/package.json b/print/package.json
index 971e74c74..281edb494 100755
--- a/print/package.json
+++ b/print/package.json
@@ -20,6 +20,7 @@
"juice": "^5.2.0",
"mysql2": "^1.7.0",
"nodemailer": "^4.7.0",
+ "puppeteer": "^2.0.0",
"qrcode": "^1.4.2",
"strftime": "^0.10.0",
"vue": "^2.6.10",
diff --git a/print/templates/email/delivery-note-link/locale/en.yml b/print/templates/email/delivery-note-link/locale/en.yml
index 5f1526828..aaa545525 100644
--- a/print/templates/email/delivery-note-link/locale/en.yml
+++ b/print/templates/email/delivery-note-link/locale/en.yml
@@ -1,5 +1,5 @@
subject: Your delivery note
-title: "Here is your delivery note!"
+title: Your delivery note
dear: Dear client
description: The delivery note from the order {0} is now available.
You can download it by clicking this link .
diff --git a/print/templates/email/delivery-note-link/locale/es.yml b/print/templates/email/delivery-note-link/locale/es.yml
index 47c7f11da..0bafd459a 100644
--- a/print/templates/email/delivery-note-link/locale/es.yml
+++ b/print/templates/email/delivery-note-link/locale/es.yml
@@ -1,5 +1,5 @@
-subject: Aquí tienes tu albarán
-title: "Aquí tienes tu albarán"
+subject: Tu albarán
+title: Tu albarán
dear: Estimado cliente
description: Ya está disponible el albarán correspondiente al pedido {0} .
Puedes verlo haciendo clic en este enlace .
diff --git a/print/templates/email/delivery-note-link/locale/fr.yml b/print/templates/email/delivery-note-link/locale/fr.yml
index 3ecf357e1..bcb16c09f 100644
--- a/print/templates/email/delivery-note-link/locale/fr.yml
+++ b/print/templates/email/delivery-note-link/locale/fr.yml
@@ -1,5 +1,5 @@
-subject: Voici votre bon de livraison
-title: "Voici votre bon de livraison"
+subject: Votre bon de livraison
+title: Votre bon de livraison
dear: Cher client,
description: Le bon de livraison correspondant à la commande {0} est maintenant disponible.
Vous pouvez le voir en cliquant sur ce lien .
diff --git a/print/templates/email/delivery-note-link/locale/pt.yml b/print/templates/email/delivery-note-link/locale/pt.yml
index c008ea2c7..cff3ea52b 100644
--- a/print/templates/email/delivery-note-link/locale/pt.yml
+++ b/print/templates/email/delivery-note-link/locale/pt.yml
@@ -1,5 +1,5 @@
-subject: Vossa Nota de Entrega
-title: "Esta é vossa nota de entrega!"
+subject: Vossa nota de entrega
+title: Vossa nota de entrega
dear: Estimado cliente
description: Já está disponível sua nota de entrega correspondente a encomenda numero {0} .
Para ver-lo faça um clique neste link .
diff --git a/print/templates/email/delivery-note/locale/en.yml b/print/templates/email/delivery-note/locale/en.yml
index fcabe11ec..50d39e8cf 100644
--- a/print/templates/email/delivery-note/locale/en.yml
+++ b/print/templates/email/delivery-note/locale/en.yml
@@ -1,5 +1,5 @@
subject: Your delivery note
-title: "Here is your delivery note!"
+title: Your delivery note
dear: Dear client
description: The delivery note from the order {0} is now available.
You can download it by clicking on the attachment of this email.
diff --git a/print/templates/email/delivery-note/locale/es.yml b/print/templates/email/delivery-note/locale/es.yml
index 3294b2316..ffa99e12f 100644
--- a/print/templates/email/delivery-note/locale/es.yml
+++ b/print/templates/email/delivery-note/locale/es.yml
@@ -1,5 +1,5 @@
-subject: Aquí tienes tu albarán
-title: "¡Este es tu albarán!"
+subject: Tu albarán
+title: Tu albarán
dear: Estimado cliente
description: Ya está disponible el albarán correspondiente al pedido {0}.
Puedes descargarlo haciendo clic en el adjunto de este correo.
diff --git a/print/templates/email/delivery-note/locale/fr.yml b/print/templates/email/delivery-note/locale/fr.yml
index fdaf6e320..f8fb5e7cd 100644
--- a/print/templates/email/delivery-note/locale/fr.yml
+++ b/print/templates/email/delivery-note/locale/fr.yml
@@ -1,5 +1,5 @@
-subject: Voici votre bon de livraison
-title: "Voici votre bon de livraison!"
+subject: Votre bon de livraison
+title: Votre bon de livraison
dear: Cher client,
description: Le bon de livraison correspondant à la commande {0} est maintenant disponible.
Vous pouvez le télécharger en cliquant sur la pièce jointe dans cet email.
diff --git a/print/templates/email/delivery-note/locale/pt.yml b/print/templates/email/delivery-note/locale/pt.yml
index cbca170a3..818a4de4c 100644
--- a/print/templates/email/delivery-note/locale/pt.yml
+++ b/print/templates/email/delivery-note/locale/pt.yml
@@ -1,5 +1,5 @@
-subject: Vossa Nota de Entrega
-title: "Esta é vossa nota de entrega!"
+subject: Vossa nota de entrega
+title: Vossa nota de entrega
dear: Estimado cliente
description: Já está disponível sua nota de entrega correspondente a encomenda {0}.
Podes descarregar-la fazendo um clique no arquivo anexado ao e-mail.
diff --git a/print/templates/reports/driver-route/assets/css/style.css b/print/templates/reports/driver-route/assets/css/style.css
index 2e7ec4dab..6b76748eb 100644
--- a/print/templates/reports/driver-route/assets/css/style.css
+++ b/print/templates/reports/driver-route/assets/css/style.css
@@ -47,3 +47,8 @@ section.text-area {
padding-right: 1em;
background-color: #e5e5e5;
}
+
+.route-block {
+ margin-bottom: 100px;
+ page-break-after: always;
+}
\ No newline at end of file
diff --git a/print/templates/reports/driver-route/driver-route.html b/print/templates/reports/driver-route/driver-route.html
index 549aac060..a3bb0f478 100644
--- a/print/templates/reports/driver-route/driver-route.html
+++ b/print/templates/reports/driver-route/driver-route.html
@@ -8,9 +8,9 @@
-
+
-
{{route.id}}
+
{{$t('route')}} {{route.id}}
-
+
+
@@ -151,7 +152,7 @@
diff --git a/print/templates/reports/driver-route/driver-route.js b/print/templates/reports/driver-route/driver-route.js
index 8785527bc..cab5342e5 100755
--- a/print/templates/reports/driver-route/driver-route.js
+++ b/print/templates/reports/driver-route/driver-route.js
@@ -6,15 +6,26 @@ const reportFooter = new Component('report-footer');
module.exports = {
name: 'driver-route',
async serverPrefetch() {
- this.route = await this.fetchRoute(this.routeId);
- this.tickets = await this.fetchTickets(this.routeId);
+ const routesId = this.routeId.split(',');
+ const routes = await this.fetchRoutes(routesId);
+ const tickets = await this.fetchTickets(routesId);
- if (!this.route)
+ for (let route of routes) {
+ const routeTickets = tickets.filter(ticket => {
+ return ticket.routeFk == route.id;
+ });
+
+ route.tickets = routeTickets;
+ }
+
+ this.routes = routes;
+
+ if (!this.routes)
throw new Error('Something went wrong');
},
methods: {
- fetchRoute(id) {
- return db.findOne(
+ fetchRoutes(routesId) {
+ return db.rawSql(
`SELECT
r.id,
r.m3,
@@ -30,9 +41,9 @@ module.exports = {
LEFT JOIN worker w ON w.id = r.workerFk
LEFT JOIN account.user u ON u.id = w.userFk
LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
- WHERE r.id = :routeId`, {routeId: id});
+ WHERE r.id IN(:routesId)`, {routesId});
},
- fetchTickets(routeId) {
+ fetchTickets(routesId) {
return db.rawSql(
`SELECT
t.nickname addressName,
@@ -41,6 +52,7 @@ module.exports = {
t.id,
t.clientFk,
t.companyFk,
+ t.routeFk,
if(a.phone, a.phone, c.phone) AS phone,
if(a.mobile, a.mobile, c.mobile) AS mobile,
wh.name warehouseName,
@@ -65,8 +77,8 @@ module.exports = {
LEFT JOIN warehouse wh ON wh.id = t.warehouseFk
LEFT JOIN agencyMode am ON am.id = t.agencyModeFk
LEFT JOIN stowaway s ON s.id = t.id
- WHERE r.id = ?
- ORDER BY t.priority, t.id`, [routeId]);
+ WHERE r.id IN(:routesId)
+ ORDER BY t.priority, t.id`, {routesId});
}
},
components: {