refs #5579 fix mockTime
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2023-05-16 15:00:31 +02:00
parent 3e33030b1d
commit 7f881409fc
6 changed files with 80 additions and 119 deletions

View File

@ -1,4 +1,4 @@
FROM mariadb:10.7.6
FROM mariadb:10.7.3
ENV MYSQL_ROOT_PASSWORD root
ENV TZ Europe/Madrid
@ -32,11 +32,13 @@ COPY \
config.ini \
dump/mysqlPlugins.sql \
dump/structure.sql \
dump/mockDate.sql \
dump/dumpedFixtures.sql \
./
RUN gosu mysql docker-init.sh \
&& docker-dump.sh mysqlPlugins \
&& docker-dump.sh structure \
&& docker-dump.sh mockDate \
&& docker-dump.sh dumpedFixtures \
&& gosu mysql docker-temp-stop.sh

View File

@ -32,7 +32,7 @@ UNLOCK TABLES;
LOCK TABLES `version` WRITE;
/*!40000 ALTER TABLE `version` DISABLE KEYS */;
INSERT INTO `version` VALUES ('salix','10230','53f69ae8e526a4a5d827c237a5b076d38507b392','2020-11-09 11:06:43',NULL),('vn-database','10598','d4cfc8bd917d8485aac371af742122dfc44f4501','2023-05-12 09:45:58','10600');
INSERT INTO `version` VALUES ('salix','10230','53f69ae8e526a4a5d827c237a5b076d38507b392','2020-11-09 11:06:43',NULL),('vn-database','10598','11ac980456205f7851dc94367d04243d33ca3c0b','2023-05-16 08:20:30','10600');
/*!40000 ALTER TABLE `version` ENABLE KEYS */;
UNLOCK TABLES;
@ -54,7 +54,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `account`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -140,7 +140,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `salix`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -206,7 +206,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `vn`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -512,7 +512,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `cache`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -548,7 +548,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `hedera`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -714,7 +714,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `postgresql`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -760,7 +760,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00
USE `sage`;
-- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
--
@ -816,4 +816,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:47
-- Dump completed on 2023-05-16 8:24:00

View File

@ -349,20 +349,20 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
(4, 'GCN Channel'),
(5, 'The Newspaper');
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
VALUES
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'),
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others');
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'),
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others');
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1
@ -707,7 +707,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF
(15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
(16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
(17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
(18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, util.VN_CURDATE()),
(18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR)),
(19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE()),
(20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
(21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
@ -1940,6 +1940,16 @@ INSERT INTO `pbx`.`sip`(`user_id`, `extension`)
(5, 1102),
(9, 1201);
INSERT INTO `vn`.`professionalCategory` (`id`, `name`, `level`, `dayBreak`)
VALUES
(1, 'employee', NULL, NULL),
(2, 'florist', NULL, NULL);
INSERT INTO `vn`.`calendarType` (`id`, `description`, `hoursWeek`, `isPartial`)
VALUES
(1, 'General schedule', 40, 0);
DROP TEMPORARY TABLE IF EXISTS tmp.worker;
CREATE TEMPORARY TABLE tmp.worker
(PRIMARY KEY (id))
@ -1968,7 +1978,7 @@ UPDATE `vn`.`business`
WHERE `id`= 1106;
UPDATE `vn`.`business` b
SET b.`workerBusinessProfessionalCategoryFk` = 31
SET b.`workerBusinessProfessionalCategoryFk` = 2
WHERE b.`workerFk` = 1110;
UPDATE `vn`.`business` b

12
db/dump/mockDate.sql Normal file
View File

@ -0,0 +1,12 @@
CREATE SCHEMA IF NOT EXISTS `util`;
USE `util`;
DELIMITER ;;
DROP FUNCTION IF EXISTS `util`.`mockTime`;
CREATE OR REPLACE FUNCTION `util`.`mockTime`()
RETURNS DATETIME
DETERMINISTIC
BEGIN
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END ;;
DELIMITER ;

View File

@ -727,31 +727,6 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `account`.`roleInherit_afterInsert`
AFTER INSERT ON `roleInherit`
FOR EACH ROW
BEGIN
CALL `roleLog_add`('RoleInherit', NEW.id, NEW.id, 'insert', NULL, NULL,
JSON_OBJECT(
'role', NEW.role,
'inheritsFrom', NEW.inheritsFrom
)
);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `account`.`roleInherit_beforeUpdate`
BEFORE UPDATE ON `roleInherit`
FOR EACH ROW
@ -772,35 +747,6 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `account`.`roleInherit_afterUpdate`
AFTER UPDATE ON `roleInherit`
FOR EACH ROW
BEGIN
CALL `roleLog_add`('RoleInherit', NEW.id, NEW.id, 'update', NULL,
JSON_OBJECT(
'role', OLD.role,
'inheritsFrom', OLD.inheritsFrom
),
JSON_OBJECT(
'role', NEW.role,
'inheritsFrom', NEW.inheritsFrom
)
);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `account`.`roleInherit_afterDelete`
AFTER DELETE ON `roleInherit`
FOR EACH ROW
@ -6739,7 +6685,7 @@ DELIMITER ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cacheCalc_clean`()
BEGIN
DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, util.VN_NOW());
DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW());
DELETE FROM cache_calc WHERE expires < vCleanTime;
END ;;
DELIMITER ;
@ -6766,8 +6712,8 @@ BEGIN
UPDATE cache_calc cc JOIN cache c ON c.id = cc.cache_id
SET
cc.last_refresh = util.VN_NOW(),
cc.expires = ADDTIME(util.VN_NOW(), c.lifetime),
cc.last_refresh = NOW(),
cc.expires = ADDTIME(NOW(), c.lifetime),
cc.connection_id = NULL
WHERE cc.id = v_calc;
@ -6847,7 +6793,7 @@ proc: BEGIN
-- Si existe una calculo valido libera el bloqueo y devuelve su identificador.
IF !v_refresh AND util.VN_NOW() < v_expires AND vLastRefresh >= util.VN_CURDATE()
IF !v_refresh AND NOW() < v_expires AND vLastRefresh >= CURDATE()
THEN
DO RELEASE_LOCK(v_lock_id);
SET v_refresh = FALSE;
@ -7500,7 +7446,7 @@ CREATE TABLE `ekt` (
`vendorOrderNumber` bigint(20) unsigned DEFAULT NULL COMMENT 'RFF+VN',
`fec` date DEFAULT NULL COMMENT 'DTM+97',
`hor` time DEFAULT NULL COMMENT 'UNB',
`util.VN_NOW` timestamp NULL DEFAULT current_timestamp() COMMENT 'Creation time',
`now` timestamp NULL DEFAULT current_timestamp() COMMENT 'Creation time',
`ptj` bigint(20) unsigned DEFAULT NULL COMMENT 'NAD+BY',
`ref` int(11) NOT NULL COMMENT 'LIN',
`item` varchar(50) DEFAULT NULL COMMENT 'IMD+S99',
@ -7583,7 +7529,7 @@ SET character_set_client = utf8;
`vendorOrderNumber` tinyint NOT NULL,
`fec` tinyint NOT NULL,
`hor` tinyint NOT NULL,
`util.VN_NOW` tinyint NOT NULL,
`now` tinyint NOT NULL,
`ptj` tinyint NOT NULL,
`ref` tinyint NOT NULL,
`item` tinyint NOT NULL,
@ -8962,7 +8908,7 @@ proc:BEGIN
AND IF(t.package, l.package = e.package, TRUE)
AND IF(t.item, l.item = e.item, TRUE)
AND i.isFloramondo = vIsFloramondoDirect
ORDER BY l.util.VN_NOW DESC, b.id ASC
ORDER BY l.now DESC, b.id ASC
LIMIT 1;
END IF;
@ -16345,7 +16291,7 @@ CREATE TABLE `movConta` (
`FechaMaxVencimiento` datetime NOT NULL,
`TipoCriterioCaja` tinyint(4) NOT NULL,
`MovFacturaOrigenIME` varchar(50) NOT NULL,
`IdFacturaExternoFinal` text NOT NULL,
`IdFacturaExternoFinal` varchar(50) NOT NULL,
`IdFacturaExternoInicial` varchar(50) NOT NULL,
`IdFacturaExternoOriginal` varchar(50) NOT NULL,
`NumFacturasExternoAgrupacion` int(11) NOT NULL,
@ -18249,7 +18195,7 @@ BEGIN
* Borra de la tabla salix.AccessToken todos aquellos tokens que hayan caducado
*/
DELETE FROM salix.AccessToken
WHERE outdated < util.VN_NOW();
WHERE outdated < NOW();
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -20293,10 +20239,10 @@ BEGIN
IF vMockEnabled THEN
RETURN mockTimeBase(FALSE);
ELSE
RETURN util.VN_NOW();
RETURN NOW();
END IF;
*/
RETURN util.VN_NOW();
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -20322,19 +20268,7 @@ BEGIN
* @param vIsUtc If date must be returned as UTC format
* @return The formatted mock time
*/
DECLARE vMockUtcTime DATETIME;
DECLARE vMockTz VARCHAR(255);
SELECT mockUtcTime, mockTz
INTO vMockUtcTime, vMockTz
FROM config
LIMIT 1;
IF vIsUtc OR vMockTz IS NULL THEN
RETURN vMockUtcTime;
ELSE
RETURN CONVERT_TZ(vMockUtcTime, '+00:00', vMockTz);
END IF;
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -20371,7 +20305,7 @@ BEGIN
RETURN UTC_TIMESTAMP();
END IF;
*/
RETURN UTC_TIMESTAMP();
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -20634,7 +20568,7 @@ CREATE DEFINER=`root`@`localhost` FUNCTION `VN_CURTIME`() RETURNS time
DETERMINISTIC
BEGIN
/**
* @return The mock util.VN_CURTIME
* @return The mock curtime
*/
RETURN TIME(mockTime());
END ;;
@ -25105,7 +25039,7 @@ CREATE TABLE `clientInforma` (
KEY `informaClientFk` (`clientFk`),
CONSTRAINT `informa_ClienteFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `informa_workers_fk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='información proporcionada por Informa, se actualiza desde el hook de client (salix)';
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='información proporcionada por Informa, se actualiza desde el hook de client (salix)';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -28044,6 +27978,7 @@ CREATE TABLE `entryLog` (
PRIMARY KEY (`id`),
KEY `logEntry_ibfk_1` (`originFk`),
KEY `entryLog_ibfk_2` (`userFk`),
KEY `entryLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
CONSTRAINT `entryLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@ -31385,6 +31320,7 @@ CREATE TABLE `itemLog` (
KEY `itemLogItemFk_idx` (`originFk`),
KEY `itemLogUserFk_idx` (`userFk`),
KEY `itemLog_changedModel_idx` (`changedModel`,`changedModelId`) USING BTREE,
KEY `itemLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
CONSTRAINT `itemLogItemFk` FOREIGN KEY (`originFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@ -35017,7 +34953,7 @@ CREATE TABLE `property` (
`tome` int(11) DEFAULT NULL,
`url` varchar(250) DEFAULT NULL,
`protocol` varchar(100) DEFAULT NULL COMMENT 'numero de protocolo notarial de la escritura de compra venta',
`purchased` date NOT NULL DEFAULT util.VN_CURDATE() COMMENT 'date of purchase of the property',
`purchased` date NOT NULL DEFAULT curdate() COMMENT 'date of purchase of the property',
`booked` date DEFAULT NULL COMMENT 'date of completion of property registration',
PRIMARY KEY (`id`),
KEY `property_FK` (`propertyGroupFk`),
@ -39356,6 +39292,7 @@ CREATE TABLE `ticketLog` (
KEY `logTicketoriginFk` (`originFk`),
KEY `logTicketuserFk` (`userFk`),
KEY `ticketLog_creationDate_IDX` (`creationDate`) USING BTREE,
KEY `ticketLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
CONSTRAINT `ticketLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketLog_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@ -43623,7 +43560,7 @@ DELIMITER ;;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in wrong greuges' DO CALL vn.greuge_notifyEvents(util.util.VN_CURDATE(), util.util.VN_CURDATE()) */ ;;
/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `greuge_notify` ON SCHEDULE EVERY 1 DAY STARTS '2023-01-01 00:07:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Notifies subscribed users of events in wrong greuges' DO CALL vn.greuge_notifyEvents(util.CURDATE(), util.CURDATE()) */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@ -47865,7 +47802,7 @@ BEGIN
*/
DECLARE vIsTicketInTime BOOL;
SELECT TIMEDIFF(util.VN_CURTIME(), zc.hour + INTERVAL tc.packingDelay HOUR) > 0 INTO vIsTicketInTime
SELECT TIMEDIFF(CURRENT_TIME(), zc.hour + INTERVAL tc.packingDelay HOUR) > 0 INTO vIsTicketInTime
FROM vn.ticket t
JOIN vn.zoneClosure zc ON zc.zoneFk = t.zoneFk
LEFT JOIN vn.ticketConfig tc ON TRUE
@ -50647,7 +50584,7 @@ BEGIN
CREATE TEMPORARY TABLE tmp.duaToDelete
SELECT *
FROM vn.dua
WHERE operated < TIMESTAMPADD(YEAR,-2,util.VN_CURDATE());
WHERE operated < TIMESTAMPADD(YEAR,-2,CURDATE());
UPDATE tmp.duaToDelete tm
JOIN vn.dms d ON d.id = tm.gestdocFk
@ -52947,7 +52884,7 @@ BEGIN
AND r.isBooked
AND r.companyFk = vSelf
ORDER BY supplierFk, companyFk, companyFk, dueDated, isPayment DESC, id;
-- util.VN_NOW, we calculate the outstanding amount for each receipt in descending order
-- Now, we calculate the outstanding amount for each receipt in descending order
SET @risk := 0.0;
SET @supplier := 0.0;
SET @company := 0.0;
@ -61352,7 +61289,7 @@ BEGIN
CALL ticket_getWithParameters(
vClientFk,
vWarehouseFk,
util.VN_CURDATE(),
CURDATE(),
NULL,
vCompanyFk,
vAgencyModeFk,
@ -74823,7 +74760,7 @@ BEGIN
JOIN travel t ON t.id = e.travelFk
JOIN buy b on b.entryFk = e.id
SET b.packing = vPacking
WHERE t.shipped >= util.dayEnd(util.VN_CURDATE())
WHERE t.shipped >= util.dayEnd(CURDATE())
AND t.warehouseInFk = vMainWarehouseFk
AND t.warehouseOutFk = vAuctionWarehouseFk
AND b.itemFk = vItemFk;
@ -76599,7 +76536,7 @@ BEGIN
/**
* Verifica si el empleado puede fichar
* @param vWorker Identificador del trabajador
* @param vTimed valor de la fichada, IF vTimed IS NULL vTimed = util.VN_NOW
* @param vTimed valor de la fichada, IF vTimed IS NULL vTimed = NOW
* @param vDirection solo se pueden pasa los valores del campo
* workerTimeControl.direction ENUM('in', 'out', 'middle')
* @return Si todo es correcto, retorna el número de id la tabla workerTimeControl.
@ -79799,7 +79736,7 @@ USE `edi`;
/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ektRecent` AS select `e`.`id` AS `id`,`e`.`barcode` AS `barcode`,`e`.`entryYear` AS `entryYear`,`e`.`batchNumber` AS `batchNumber`,`e`.`deliveryNumber` AS `deliveryNumber`,`e`.`vendorOrderNumber` AS `vendorOrderNumber`,`e`.`fec` AS `fec`,`e`.`hor` AS `hor`,`e`.`util.VN_NOW` AS `util.VN_NOW`,`e`.`ptj` AS `ptj`,`e`.`ref` AS `ref`,`e`.`item` AS `item`,`e`.`pac` AS `pac`,`e`.`qty` AS `qty`,`e`.`ori` AS `ori`,`e`.`cat` AS `cat`,`e`.`agj` AS `agj`,`e`.`kop` AS `kop`,`e`.`ptd` AS `ptd`,`e`.`sub` AS `sub`,`e`.`pro` AS `pro`,`e`.`pri` AS `pri`,`e`.`package` AS `package`,`e`.`auction` AS `auction`,`e`.`klo` AS `klo`,`e`.`k1` AS `k1`,`e`.`k2` AS `k2`,`e`.`k3` AS `k3`,`e`.`k4` AS `k4`,`e`.`s1` AS `s1`,`e`.`s2` AS `s2`,`e`.`s3` AS `s3`,`e`.`s4` AS `s4`,`e`.`s5` AS `s5`,`e`.`s6` AS `s6`,`e`.`ok` AS `ok`,`e`.`trolleyFk` AS `trolleyFk`,`e`.`putOrderFk` AS `putOrderFk`,`e`.`scanned` AS `scanned`,`e`.`cps` AS `cps`,`e`.`dp` AS `dp`,`e`.`sender` AS `sender`,`ec`.`usefulAuctionLeftSegmentLength` AS `usefulAuctionLeftSegmentLength`,`ec`.`standardBarcodeLength` AS `standardBarcodeLength`,`ec`.`floridayBarcodeLength` AS `floridayBarcodeLength`,`ec`.`floramondoBarcodeLength` AS `floramondoBarcodeLength`,`ec`.`defaultKlo` AS `defaultKlo`,`ec`.`ektRecentScopeDays` AS `ektRecentScopeDays` from (`ekt` `e` join `ektConfig` `ec`) where `e`.`entryYear` = year(`util`.`VN_CURDATE`()) and `e`.`fec` >= `util`.`VN_CURDATE`() + interval -`ec`.`ektRecentScopeDays` day */;
/*!50001 VIEW `ektRecent` AS select `e`.`id` AS `id`,`e`.`barcode` AS `barcode`,`e`.`entryYear` AS `entryYear`,`e`.`batchNumber` AS `batchNumber`,`e`.`deliveryNumber` AS `deliveryNumber`,`e`.`vendorOrderNumber` AS `vendorOrderNumber`,`e`.`fec` AS `fec`,`e`.`hor` AS `hor`,`e`.`now` AS `now`,`e`.`ptj` AS `ptj`,`e`.`ref` AS `ref`,`e`.`item` AS `item`,`e`.`pac` AS `pac`,`e`.`qty` AS `qty`,`e`.`ori` AS `ori`,`e`.`cat` AS `cat`,`e`.`agj` AS `agj`,`e`.`kop` AS `kop`,`e`.`ptd` AS `ptd`,`e`.`sub` AS `sub`,`e`.`pro` AS `pro`,`e`.`pri` AS `pri`,`e`.`package` AS `package`,`e`.`auction` AS `auction`,`e`.`klo` AS `klo`,`e`.`k1` AS `k1`,`e`.`k2` AS `k2`,`e`.`k3` AS `k3`,`e`.`k4` AS `k4`,`e`.`s1` AS `s1`,`e`.`s2` AS `s2`,`e`.`s3` AS `s3`,`e`.`s4` AS `s4`,`e`.`s5` AS `s5`,`e`.`s6` AS `s6`,`e`.`ok` AS `ok`,`e`.`trolleyFk` AS `trolleyFk`,`e`.`putOrderFk` AS `putOrderFk`,`e`.`scanned` AS `scanned`,`e`.`cps` AS `cps`,`e`.`dp` AS `dp`,`e`.`sender` AS `sender`,`ec`.`usefulAuctionLeftSegmentLength` AS `usefulAuctionLeftSegmentLength`,`ec`.`standardBarcodeLength` AS `standardBarcodeLength`,`ec`.`floridayBarcodeLength` AS `floridayBarcodeLength`,`ec`.`floramondoBarcodeLength` AS `floramondoBarcodeLength`,`ec`.`defaultKlo` AS `defaultKlo`,`ec`.`ektRecentScopeDays` AS `ektRecentScopeDays` from (`ekt` `e` join `ektConfig` `ec`) where `e`.`entryYear` = year(`util`.`VN_CURDATE`()) and `e`.`fec` >= `util`.`VN_CURDATE`() + interval -`ec`.`ektRecentScopeDays` day */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@ -80745,7 +80682,7 @@ USE `vn`;
/*!50001 SET character_set_results = utf8mb3 */;
/*!50001 SET collation_connection = utf8mb3_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`jenkins`@`10.0.%.%` SQL SECURITY DEFINER */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `companyL10n` AS select `c`.`id` AS `id`,ifnull(`ci`.`footnotes`,`c`.`footnotes`) AS `footnotes` from (`company` `c` left join `companyI18n` `ci` on(`ci`.`companyFk` = `c`.`id` and `ci`.`lang` = `util`.`LANG`())) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
@ -82588,7 +82525,7 @@ USE `vn`;
/*!50001 SET character_set_results = utf8mb3 */;
/*!50001 SET collation_connection = utf8mb3_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`jenkins`@`10.0.%.%` SQL SECURITY DEFINER */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `zoneEstimatedDelivery` AS select `t`.`zoneFk` AS `zoneFk`,cast(`util`.`VN_CURDATE`() + interval hour(ifnull(`zc`.`hour`,`z`.`hour`)) * 60 + minute(ifnull(`zc`.`hour`,`z`.`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`)) straight_join `vn`.`zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `vn`.`zoneClosure` `zc` on(`zc`.`zoneFk` = `t`.`zoneFk` and `zc`.`dated` = `util`.`VN_CURDATE`())) left join `cache`.`departure_limit` `dl` on(`dl`.`warehouse_id` = `t`.`warehouseFk` and `dl`.`fecha` = `util`.`VN_CURDATE`())) where `w`.`hasProduction` <> 0 and cast(`t`.`shipped` as date) = `util`.`VN_CURDATE`() group by `t`.`zoneFk` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
@ -82603,4 +82540,4 @@ USE `vn`;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-12 11:47:03
-- Dump completed on 2023-05-16 8:23:56

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Account Alias create and basic data path', () => {
fdescribe('Account Alias create and basic data path', () => {
let browser;
let page;